aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-03 04:35:31 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-03-03 08:45:09 +0800
commit7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2 (patch)
tree1ccda4c2c864e0c0dccccde1811093ecefde1753
parent18bdb8b9205e70f725bf49a6f13dc3c2fe3fadf7 (diff)
downloadgsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.tar.gz
gsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.tar.zst
gsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.zip
Update API documentation.
-rw-r--r--doc/reference/libeutil/Makefile.am2
-rw-r--r--doc/reference/libeutil/libeutil-sections.txt15
-rw-r--r--e-util/e-alert.c6
-rw-r--r--e-util/e-bit-array.c224
-rw-r--r--e-util/e-bit-array.h28
-rw-r--r--e-util/e-cell.c4
-rw-r--r--e-util/e-cell.h4
-rw-r--r--e-util/e-config.c289
-rw-r--r--e-util/e-config.h27
-rw-r--r--e-util/e-dateedit.c38
-rw-r--r--e-util/e-event.c40
-rw-r--r--e-util/e-event.h4
-rw-r--r--e-util/e-filter-part.c6
-rw-r--r--e-util/e-import.c77
-rw-r--r--e-util/e-import.h2
-rw-r--r--e-util/e-plugin.c85
-rw-r--r--e-util/e-reflow-model.c129
-rw-r--r--e-util/e-rule-context.c6
-rw-r--r--e-util/e-selection-model-array.c46
-rw-r--r--e-util/e-selection-model.c406
-rw-r--r--e-util/e-selection-model.h88
-rw-r--r--e-util/e-table-group.c279
-rw-r--r--e-util/e-table-group.h90
-rw-r--r--e-util/e-table-header-utils.c2
-rw-r--r--e-util/e-table-memory-store.c11
-rw-r--r--e-util/e-table-memory.c135
-rw-r--r--e-util/e-table-memory.h16
-rw-r--r--e-util/e-table-sort-info.c6
-rw-r--r--e-util/e-table-specification.c18
-rw-r--r--e-util/e-table-specification.h5
-rw-r--r--e-util/e-table.c12
-rw-r--r--e-util/e-table.h10
-rw-r--r--e-util/e-tree-memory.c182
-rw-r--r--e-util/e-tree-memory.h28
-rw-r--r--e-util/e-tree-model.c472
-rw-r--r--e-util/e-tree-model.h208
-rw-r--r--e-util/e-tree-selection-model.c46
-rw-r--r--e-util/e-tree.c18
-rw-r--r--e-util/e-tree.h10
-rw-r--r--e-util/gal-define-views-model.h6
-rw-r--r--e-util/gal-view-factory-etable.c2
41 files changed, 1481 insertions, 1601 deletions
diff --git a/doc/reference/libeutil/Makefile.am b/doc/reference/libeutil/Makefile.am
index f987bcb975..7fee929e74 100644
--- a/doc/reference/libeutil/Makefile.am
+++ b/doc/reference/libeutil/Makefile.am
@@ -43,7 +43,7 @@ IGNORE_HFILES = \
gal-a11y-e-text.h \
gal-a11y-e-tree-factory.h \
gal-a11y-e-tree.h \
- gal-a11y-factory.h
+ gal-a11y-factory.h \
gal-a11y-util.h \
$(NULL)
diff --git a/doc/reference/libeutil/libeutil-sections.txt b/doc/reference/libeutil/libeutil-sections.txt
index 1a3e8a2d63..d681b4e092 100644
--- a/doc/reference/libeutil/libeutil-sections.txt
+++ b/doc/reference/libeutil/libeutil-sections.txt
@@ -1327,6 +1327,7 @@ EClientSelectorPrivate
<FILE>e-config</FILE>
<TITLE>EConfig</TITLE>
EConfig
+e_config_t
EConfigItem
EConfigFactory
EConfigTarget
@@ -1340,6 +1341,7 @@ e_config_add_items
e_config_add_page_check
e_config_set_target
e_config_create_widget
+e_config_target_change_t
e_config_target_changed
e_config_page_check
e_config_abort
@@ -1362,6 +1364,12 @@ E_TYPE_CONFIG
E_CONFIG_CLASS
E_IS_CONFIG_CLASS
E_CONFIG_GET_CLASS
+E_CONFIG_HOOK
+E_IS_CONFIG_HOOK
+E_TYPE_CONFIG_HOOK
+E_CONFIG_HOOK_CLASS
+E_IS_CONFIG_HOOK_CLASS
+E_CONFIG_HOOK_GET_CLASS
EConfigClass
e_config_get_type
<SUBSECTION Standard>
@@ -1495,6 +1503,7 @@ e_dialog_combo_box_get
<FILE>e-event</FILE>
<TITLE>EEvent</TITLE>
EEvent
+e_event_t
EEventItem
EEventFactory
EEventTarget
@@ -1698,6 +1707,7 @@ EFilterIntPrivate
<SECTION>
<FILE>e-filter-option</FILE>
<TITLE>EFilterOption</TITLE>
+filter_option
EFilterOption
e_filter_option_new
e_filter_option_set_current
@@ -1752,6 +1762,8 @@ EFilterPartPrivate
<SECTION>
<FILE>e-filter-rule</FILE>
<TITLE>EFilterRule</TITLE>
+filter_grouping_t
+filter_threading_t
EFilterRule
e_filter_rule_new
e_filter_rule_clone
@@ -1873,6 +1885,7 @@ EImageChooserPrivate
<FILE>e-import</FILE>
<TITLE>EImport</TITLE>
EImport
+e_import_target_t
EImportImporter
EImportFactory
EImportTarget
@@ -2739,6 +2752,8 @@ e_reflow_model_get_type
<SECTION>
<FILE>e-rule-context</FILE>
<TITLE>ERuleContext</TITLE>
+part_set_map
+rule_set_map
ERuleContext
ERuleContextRegisterFunc
ERuleContextPartFunc
diff --git a/e-util/e-alert.c b/e-util/e-alert.c
index 5a08e07122..e1d8ba26e9 100644
--- a/e-util/e-alert.c
+++ b/e-util/e-alert.c
@@ -697,13 +697,11 @@ e_alert_init (EAlert *alert)
/**
* e_alert_new:
* @tag: alert identifier
- * @arg0: The first argument for the alert formatter. The list must
- * be NULL terminated.
+ * @...: %NULL-terminated argument list
*
* Creates a new EAlert. The @tag argument is used to determine
* which alert to use, it is in the format domain:alert-id. The NULL
- * terminated list of arguments, starting with @arg0 is used to fill
- * out the alert definition.
+ * terminated list of arguments is used to fill out the alert definition.
*
* Returns: a new #EAlert
**/
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index 045f8e2439..60618ca851 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -43,37 +43,39 @@ G_DEFINE_TYPE (
G_TYPE_OBJECT)
static void
-e_bit_array_insert_real (EBitArray *eba,
+e_bit_array_insert_real (EBitArray *bit_array,
gint row)
{
gint box;
gint i;
- if (eba->bit_count >= 0) {
+ if (bit_array->bit_count >= 0) {
/* Add another word if needed. */
- if ((eba->bit_count & 0x1f) == 0) {
- eba->data = g_renew (
- guint32, eba->data,
- (eba->bit_count >> 5) + 1);
- eba->data[eba->bit_count >> 5] = 0;
+ if ((bit_array->bit_count & 0x1f) == 0) {
+ bit_array->data = g_renew (
+ guint32, bit_array->data,
+ (bit_array->bit_count >> 5) + 1);
+ bit_array->data[bit_array->bit_count >> 5] = 0;
}
/* The box is the word that our row is in. */
box = BOX (row);
/* Shift all words to the right of our box right one bit. */
- for (i = eba->bit_count >> 5; i > box; i--) {
- eba->data[i] = (eba->data[i] >> 1) | (eba->data[i - 1] << 31);
+ for (i = bit_array->bit_count >> 5; i > box; i--) {
+ bit_array->data[i] =
+ (bit_array->data[i] >> 1) |
+ (bit_array->data[i - 1] << 31);
}
/* Shift right half of box one bit to the right. */
- eba->data[box] =
- (eba->data[box] & BITMASK_LEFT (row)) |
- ((eba->data[box] & BITMASK_RIGHT (row)) >> 1);
- eba->bit_count++;
+ bit_array->data[box] =
+ (bit_array->data[box] & BITMASK_LEFT (row)) |
+ ((bit_array->data[box] & BITMASK_RIGHT (row)) >> 1);
+ bit_array->bit_count++;
}
}
static void
-e_bit_array_delete_real (EBitArray *eba,
+e_bit_array_delete_real (EBitArray *bit_array,
gint row,
gboolean move_selection_mode)
{
@@ -82,105 +84,103 @@ e_bit_array_delete_real (EBitArray *eba,
gint last;
gint selected = FALSE;
- if (eba->bit_count > 0) {
+ if (bit_array->bit_count > 0) {
guint32 bitmask;
box = row >> 5;
- last = (eba->bit_count - 1) >> 5;
+ last = (bit_array->bit_count - 1) >> 5;
/* Build bitmasks for the left and right half of the box */
bitmask = BITMASK_RIGHT (row) >> 1;
if (move_selection_mode)
- selected = e_bit_array_value_at (eba, row);
+ selected = e_bit_array_value_at (bit_array, row);
/* Shift right half of box one bit to the left. */
- eba->data[box] =
- (eba->data[box] & BITMASK_LEFT (row)) |
- ((eba->data[box] & bitmask) << 1);
+ bit_array->data[box] =
+ (bit_array->data[box] & BITMASK_LEFT (row)) |
+ ((bit_array->data[box] & bitmask) << 1);
/* Shift all words to the right of our box left one bit. */
if (box < last) {
- eba->data[box] &= eba->data[box + 1] >> 31;
+ bit_array->data[box] &= bit_array->data[box + 1] >> 31;
for (i = box + 1; i < last; i++) {
- eba->data[i] =
- (eba->data[i] << 1) |
- (eba->data[i + 1] >> 31);
+ bit_array->data[i] =
+ (bit_array->data[i] << 1) |
+ (bit_array->data[i + 1] >> 31);
}
/* this over-runs our memory! */
- /*eba->data[i] = eba->data[i] << 1; */
+ /*bit_array->data[i] = bit_array->data[i] << 1; */
}
- eba->bit_count--;
+ bit_array->bit_count--;
/* Remove the last word if not needed. */
- if ((eba->bit_count & 0x1f) == 0) {
- eba->data = g_renew (guint32, eba->data, eba->bit_count >> 5);
+ if ((bit_array->bit_count & 0x1f) == 0) {
+ bit_array->data = g_renew (guint32, bit_array->data, bit_array->bit_count >> 5);
}
- if (move_selection_mode && selected && eba->bit_count > 0) {
+ if (move_selection_mode && selected && bit_array->bit_count > 0) {
e_bit_array_select_single_row (
- eba, row == eba->bit_count ? row - 1 : row);
+ bit_array, row == bit_array->bit_count ? row - 1 : row);
}
}
}
/* FIXME : Improve efficiency here. */
void
-e_bit_array_delete (EBitArray *eba,
+e_bit_array_delete (EBitArray *bit_array,
gint row,
gint count)
{
gint i;
for (i = 0; i < count; i++)
- e_bit_array_delete_real (eba, row, FALSE);
+ e_bit_array_delete_real (bit_array, row, FALSE);
}
/* FIXME : Improve efficiency here. */
void
-e_bit_array_delete_single_mode (EBitArray *eba,
+e_bit_array_delete_single_mode (EBitArray *bit_array,
gint row,
gint count)
{
gint i;
for (i = 0; i < count; i++)
- e_bit_array_delete_real (eba, row, TRUE);
+ e_bit_array_delete_real (bit_array, row, TRUE);
}
/* FIXME : Improve efficiency here. */
void
-e_bit_array_insert (EBitArray *eba,
+e_bit_array_insert (EBitArray *bit_array,
gint row,
gint count)
{
gint i;
for (i = 0; i < count; i++)
- e_bit_array_insert_real (eba, row);
+ e_bit_array_insert_real (bit_array, row);
}
/* FIXME: Implement this more efficiently. */
void
-e_bit_array_move_row (EBitArray *eba,
+e_bit_array_move_row (EBitArray *bit_array,
gint old_row,
gint new_row)
{
- e_bit_array_delete_real (eba, old_row, FALSE);
- e_bit_array_insert_real (eba, new_row);
+ e_bit_array_delete_real (bit_array, old_row, FALSE);
+ e_bit_array_insert_real (bit_array, new_row);
}
static void
-eba_dispose (GObject *object)
+bit_array_finalize (GObject *object)
{
- EBitArray *eba;
+ EBitArray *bit_array;
- eba = E_BIT_ARRAY (object);
+ bit_array = E_BIT_ARRAY (object);
- if (eba->data)
- g_free (eba->data);
- eba->data = NULL;
+ g_free (bit_array->data);
- /* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (e_bit_array_parent_class)->dispose (object);
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (e_bit_array_parent_class)->finalize (object);
}
/**
- * e_selection_model_is_row_selected
- * @selection: #EBitArray to check
+ * e_bit_array_value_at
+ * @bit_array: #EBitArray to check
* @n: The row to check
*
* This routine calculates whether the given row is selected.
@@ -188,18 +188,18 @@ eba_dispose (GObject *object)
* Returns: %TRUE if the given row is selected
*/
gboolean
-e_bit_array_value_at (EBitArray *eba,
+e_bit_array_value_at (EBitArray *bit_array,
gint n)
{
- if (eba->bit_count < n || eba->bit_count == 0)
+ if (bit_array->bit_count < n || bit_array->bit_count == 0)
return 0;
else
- return (eba->data[BOX (n)] >> OFFSET (n)) & 0x1;
+ return (bit_array->data[BOX (n)] >> OFFSET (n)) & 0x1;
}
/**
- * e_selection_model_foreach
- * @selection: #EBitArray to traverse
+ * e_bit_array_foreach
+ * @bit_array: #EBitArray to traverse
* @callback: The callback function to call back.
* @closure: The closure
*
@@ -207,16 +207,16 @@ e_bit_array_value_at (EBitArray *eba,
* selected row, passing closure as the closure.
*/
void
-e_bit_array_foreach (EBitArray *eba,
+e_bit_array_foreach (EBitArray *bit_array,
EForeachFunc callback,
gpointer closure)
{
gint i;
- gint last = (eba->bit_count + 31) / 32;
+ gint last = (bit_array->bit_count + 31) / 32;
for (i = 0; i < last; i++) {
- if (eba->data[i]) {
+ if (bit_array->data[i]) {
gint j;
- guint32 value = eba->data[i];
+ guint32 value = bit_array->data[i];
for (j = 0; j < 32; j++) {
if (value & 0x80000000) {
callback (i * 32 + j, closure);
@@ -231,32 +231,32 @@ e_bit_array_foreach (EBitArray *eba,
#define SECTION(x, n) (((x) >> (n * 8)) & 0xff)
/**
- * e_selection_model_selected_count
- * @selection: #EBitArray to count
+ * e_bit_array_selected_count
+ * @bit_array: #EBitArray to count
*
* This routine calculates the number of rows selected.
*
* Returns: The number of rows selected in the given model.
*/
gint
-e_bit_array_selected_count (EBitArray *eba)
+e_bit_array_selected_count (EBitArray *bit_array)
{
gint count;
gint i;
gint last;
- if (!eba->data)
+ if (!bit_array->data)
return 0;
count = 0;
- last = BOX (eba->bit_count - 1);
+ last = BOX (bit_array->bit_count - 1);
for (i = 0; i <= last; i++) {
gint j;
guint32 thiscount = 0;
for (j = 0; j < 8; j++)
- thiscount += PART (eba->data[i], j);
+ thiscount += PART (bit_array->data[i], j);
for (j = 0; j < 4; j++)
count += SECTION (thiscount, j);
}
@@ -265,61 +265,61 @@ e_bit_array_selected_count (EBitArray *eba)
}
/**
- * e_selection_model_select_all
- * @selection: #EBitArray to select all
+ * e_bit_array_select_all
+ * @bit_array: #EBitArray to select all
*
* This routine selects all the rows in the given
* #EBitArray.
*/
void
-e_bit_array_select_all (EBitArray *eba)
+e_bit_array_select_all (EBitArray *bit_array)
{
gint i;
- if (!eba->data)
- eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
+ if (!bit_array->data)
+ bit_array->data = g_new0 (guint32, (bit_array->bit_count + 31) / 32);
- for (i = 0; i < (eba->bit_count + 31) / 32; i++) {
- eba->data[i] = ONES;
+ for (i = 0; i < (bit_array->bit_count + 31) / 32; i++) {
+ bit_array->data[i] = ONES;
}
/* need to zero out the bits corresponding to the rows not
* selected in the last full 32 bit mask */
- if (eba->bit_count % 32) {
+ if (bit_array->bit_count % 32) {
gint unselected_mask = 0;
- gint num_unselected_in_last_byte = 32 - eba->bit_count % 32;
+ gint num_unselected_in_last_byte = 32 - bit_array->bit_count % 32;
for (i = 0; i < num_unselected_in_last_byte; i++)
unselected_mask |= 1 << i;
- eba->data[(eba->bit_count + 31) / 32 - 1] &= ~unselected_mask;
+ bit_array->data[(bit_array->bit_count + 31) / 32 - 1] &= ~unselected_mask;
}
}
/**
- * e_selection_model_invert_selection
- * @selection: #EBitArray to invert
+ * e_bit_array_invert_selection
+ * @bit_array: #EBitArray to invert
*
* This routine inverts all the rows in the given
* #EBitArray.
*/
void
-e_bit_array_invert_selection (EBitArray *eba)
+e_bit_array_invert_selection (EBitArray *bit_array)
{
gint i;
- if (!eba->data)
- eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
+ if (!bit_array->data)
+ bit_array->data = g_new0 (guint32, (bit_array->bit_count + 31) / 32);
- for (i = 0; i < (eba->bit_count + 31) / 32; i++) {
- eba->data[i] = ~eba->data[i];
+ for (i = 0; i < (bit_array->bit_count + 31) / 32; i++) {
+ bit_array->data[i] = ~bit_array->data[i];
}
}
gint
-e_bit_array_bit_count (EBitArray *eba)
+e_bit_array_bit_count (EBitArray *bit_array)
{
- return eba->bit_count;
+ return bit_array->bit_count;
}
#define OPERATE(object, i,mask,grow) \
@@ -327,18 +327,18 @@ e_bit_array_bit_count (EBitArray *eba)
(((object)->data[(i)]) &= (mask)))
void
-e_bit_array_change_one_row (EBitArray *eba,
+e_bit_array_change_one_row (EBitArray *bit_array,
gint row,
gboolean grow)
{
gint i;
i = BOX (row);
- OPERATE (eba, i, ~BITMASK (row), grow);
+ OPERATE (bit_array, i, ~BITMASK (row), grow);
}
void
-e_bit_array_change_range (EBitArray *eba,
+e_bit_array_change_range (EBitArray *bit_array,
gint start,
gint end,
gboolean grow)
@@ -350,32 +350,32 @@ e_bit_array_change_range (EBitArray *eba,
if (i == last) {
OPERATE (
- eba, i, BITMASK_LEFT (start) |
+ bit_array, i, BITMASK_LEFT (start) |
BITMASK_RIGHT (end), grow);
} else {
- OPERATE (eba, i, BITMASK_LEFT (start), grow);
+ OPERATE (bit_array, i, BITMASK_LEFT (start), grow);
if (grow)
for (i++; i < last; i++)
- eba->data[i] = ONES;
+ bit_array->data[i] = ONES;
else
for (i++; i < last; i++)
- eba->data[i] = 0;
- OPERATE (eba, i, BITMASK_RIGHT (end), grow);
+ bit_array->data[i] = 0;
+ OPERATE (bit_array, i, BITMASK_RIGHT (end), grow);
}
}
}
void
-e_bit_array_select_single_row (EBitArray *eba,
+e_bit_array_select_single_row (EBitArray *bit_array,
gint row)
{
gint i;
- for (i = 0; i < ((eba->bit_count + 31) / 32); i++) {
- if (!((i == BOX (row) && eba->data[i] == BITMASK (row)) ||
- (i != BOX (row) && eba->data[i] == 0))) {
- g_free (eba->data);
- eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
- eba->data[BOX (row)] = BITMASK (row);
+ for (i = 0; i < ((bit_array->bit_count + 31) / 32); i++) {
+ if (!((i == BOX (row) && bit_array->data[i] == BITMASK (row)) ||
+ (i != BOX (row) && bit_array->data[i] == 0))) {
+ g_free (bit_array->data);
+ bit_array->data = g_new0 (guint32, (bit_array->bit_count + 31) / 32);
+ bit_array->data[BOX (row)] = BITMASK (row);
break;
}
@@ -383,20 +383,20 @@ e_bit_array_select_single_row (EBitArray *eba,
}
void
-e_bit_array_toggle_single_row (EBitArray *eba,
+e_bit_array_toggle_single_row (EBitArray *bit_array,
gint row)
{
- if (eba->data[BOX (row)] & BITMASK (row))
- eba->data[BOX (row)] &= ~BITMASK (row);
+ if (bit_array->data[BOX (row)] & BITMASK (row))
+ bit_array->data[BOX (row)] &= ~BITMASK (row);
else
- eba->data[BOX (row)] |= BITMASK (row);
+ bit_array->data[BOX (row)] |= BITMASK (row);
}
static void
-e_bit_array_init (EBitArray *eba)
+e_bit_array_init (EBitArray *bit_array)
{
- eba->data = NULL;
- eba->bit_count = 0;
+ bit_array->data = NULL;
+ bit_array->bit_count = 0;
}
static void
@@ -405,15 +405,17 @@ e_bit_array_class_init (EBitArrayClass *class)
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (class);
-
- object_class->dispose = eba_dispose;
+ object_class->finalize = bit_array_finalize;
}
EBitArray *
e_bit_array_new (gint count)
{
- EBitArray *eba = g_object_new (E_TYPE_BIT_ARRAY, NULL);
- eba->bit_count = count;
- eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
- return eba;
+ EBitArray *bit_array;
+
+ bit_array = g_object_new (E_TYPE_BIT_ARRAY, NULL);
+ bit_array->bit_count = count;
+ bit_array->data = g_new0 (guint32, (bit_array->bit_count + 31) / 32);
+
+ return bit_array;
}
diff --git a/e-util/e-bit-array.h b/e-util/e-bit-array.h
index 93fb17ed85..514bdb75bd 100644
--- a/e-util/e-bit-array.h
+++ b/e-util/e-bit-array.h
@@ -68,37 +68,37 @@ struct _EBitArrayClass {
GType e_bit_array_get_type (void) G_GNUC_CONST;
EBitArray * e_bit_array_new (gint count);
-gboolean e_bit_array_value_at (EBitArray *selection,
+gboolean e_bit_array_value_at (EBitArray *bit_array,
gint n);
-void e_bit_array_foreach (EBitArray *selection,
+void e_bit_array_foreach (EBitArray *bit_array,
EForeachFunc callback,
gpointer closure);
-gint e_bit_array_selected_count (EBitArray *selection);
-void e_bit_array_select_all (EBitArray *selection);
-void e_bit_array_invert_selection (EBitArray *selection);
-gint e_bit_array_bit_count (EBitArray *selection);
-void e_bit_array_change_one_row (EBitArray *selection,
+gint e_bit_array_selected_count (EBitArray *bit_array);
+void e_bit_array_select_all (EBitArray *bit_array);
+void e_bit_array_invert_selection (EBitArray *bit_array);
+gint e_bit_array_bit_count (EBitArray *bit_array);
+void e_bit_array_change_one_row (EBitArray *bit_array,
gint row,
gboolean grow);
-void e_bit_array_change_range (EBitArray *selection,
+void e_bit_array_change_range (EBitArray *bit_array,
gint start,
gint end,
gboolean grow);
-void e_bit_array_select_single_row (EBitArray *eba,
+void e_bit_array_select_single_row (EBitArray *bit_array,
gint row);
-void e_bit_array_toggle_single_row (EBitArray *eba,
+void e_bit_array_toggle_single_row (EBitArray *bit_array,
gint row);
-void e_bit_array_insert (EBitArray *esm,
+void e_bit_array_insert (EBitArray *bit_array,
gint row,
gint count);
-void e_bit_array_delete (EBitArray *esm,
+void e_bit_array_delete (EBitArray *bit_array,
gint row,
gint count);
-void e_bit_array_delete_single_mode (EBitArray *esm,
+void e_bit_array_delete_single_mode (EBitArray *bit_array,
gint row,
gint count);
-void e_bit_array_move_row (EBitArray *esm,
+void e_bit_array_move_row (EBitArray *bit_array,
gint old_row,
gint new_row);
diff --git a/e-util/e-cell.c b/e-util/e-cell.c
index 34046e1b38..bfd85570e3 100644
--- a/e-util/e-cell.c
+++ b/e-util/e-cell.c
@@ -562,7 +562,6 @@ e_cell_load_state (ECellView *ecell_view,
* @model_col: the column in the model
* @view_col: the column in the view
* @row: the row
- * @edit_context: the editing context
* @save_state: the save state to free
*
* Requests that the ECellView free the given save state.
@@ -634,9 +633,6 @@ e_cell_max_width_by_row (ECellView *ecell_view,
/**
* e_cell_max_width_by_row_implemented:
* @ecell_view: the ECellView that we are curious about
- * @model_col: the column in the model
- * @view_col: the column in the view.
- * @row: The row in the model.
*
* Returns: the maximum width for the ECellview at @model_col which
* is being rendered as @view_col for the data in @row.
diff --git a/e-util/e-cell.h b/e-util/e-cell.h
index 390d4b07ac..8f0cc335d3 100644
--- a/e-util/e-cell.h
+++ b/e-util/e-cell.h
@@ -285,12 +285,12 @@ void e_cell_load_state (ECellView *ecell_view,
gint view_col,
gint row,
gpointer edit_context,
- gpointer state);
+ gpointer save_state);
void e_cell_free_state (ECellView *ecell_view,
gint model_col,
gint view_col,
gint row,
- gpointer state);
+ gpointer save_state);
G_END_DECLS
diff --git a/e-util/e-config.c b/e-util/e-config.c
index 265b48bf7b..916045d612 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -93,7 +93,7 @@ struct _EConfigPrivate {
};
static GtkWidget *
- ech_config_section_factory (EConfig *config,
+ config_hook_section_factory (EConfig *config,
EConfigItem *item,
GtkWidget *parent,
GtkWidget *old,
@@ -225,27 +225,26 @@ e_config_init (EConfig *config)
/**
* e_config_construct:
- * @ep: The instance to initialise.
+ * @config: The instance to initialise.
* @id: The name of the configuration window this manager drives.
*
* Used by implementing classes to initialise base parameters.
*
- * Return value: @ep is returned.
+ * Return value: @config is returned.
**/
EConfig *
-e_config_construct (EConfig *ep,
+e_config_construct (EConfig *config,
const gchar *id)
{
- ep->id = g_strdup (id);
+ config->id = g_strdup (id);
- return ep;
+ return config;
}
/**
* e_config_add_items:
- * @ec: An initialised implementing instance of EConfig.
- * @items: A list of EConfigItem's to add to the configuration manager
- * @ec.
+ * @config: An initialised implementing instance of EConfig.
+ * @items: A list of EConfigItem's to add to the configuration manager.
* @freefunc: If supplied, called to free the item list (and/or items)
* once they are no longer needed.
* @data: Data for the callback methods.
@@ -273,7 +272,7 @@ e_config_add_items (EConfig *ec,
/**
* e_config_add_page_check:
- * @ec: Initialised implemeting instance of EConfig.
+ * @config: Initialised implemeting instance of EConfig.
* @pageid: pageid to check.
* @func: checking callback.
* @data: user-data for the callback.
@@ -341,9 +340,9 @@ ec_widget_destroyed (GtkWidget *widget,
}
static void
-ec_rebuild (EConfig *emp)
+ec_rebuild (EConfig *config)
{
- EConfigPrivate *p = emp->priv;
+ EConfigPrivate *p = config->priv;
struct _widget_node *sectionnode = NULL, *pagenode = NULL;
GtkWidget *book = NULL, *page = NULL, *section = NULL, *root = NULL;
gint pageno = 0, sectionno = 0, itemno = 0;
@@ -420,14 +419,14 @@ ec_rebuild (EConfig *emp)
if (wn->widget == NULL) {
if (item->factory) {
root = item->factory (
- emp, item, NULL, wn->widget,
+ config, item, NULL, wn->widget,
0, wn->context->data);
} else {
root = gtk_notebook_new ();
gtk_widget_show (root);
}
- emp->widget = root;
+ config->widget = root;
wn->widget = root;
} else {
root = wn->widget;
@@ -452,7 +451,7 @@ ec_rebuild (EConfig *emp)
if (item->factory) {
page = item->factory (
- emp, item, root, wn->frame,
+ config, item, root, wn->frame,
pageno, wn->context->data);
wn->frame = page;
if (page)
@@ -513,20 +512,20 @@ ec_rebuild (EConfig *emp)
EConfigItemSectionFactoryFunc factory = (EConfigItemSectionFactoryFunc) item->factory;
section = factory (
- emp, item, page, wn->widget, 0,
+ config, item, page, wn->widget, 0,
wn->context->data, &wn->real_frame);
wn->frame = section;
if (section)
itemno = 1;
- if (factory != ech_config_section_factory) {
+ if (factory != config_hook_section_factory) {
/* This means there is a section that came from a user-specified factory,
* so we don't know what is inside the section. In that case, we increment
* n_visible_widgets so that the section will not get hidden later (we don't know
* if the section is empty or not, so we cannot decide to hide it).
*
- * For automatically-generated sections, we use a special ech_config_section_factory() -
- * see emph_construct_item().
+ * For automatically-generated sections, we use a special config_hook_section_factory() -
+ * see config_hook_construct_item().
*/
n_visible_widgets++;
d (printf (" n_visible_widgets++ because there is a section factory -> frame=%p\n", section));
@@ -614,7 +613,7 @@ ec_rebuild (EConfig *emp)
g_warning ("EConfig item parent type is incorrect: %s", item->path);
else if (item->factory)
w = item->factory (
- emp, item, section, wn->widget,
+ config, item, section, wn->widget,
0, wn->context->data);
if (wn->widget && wn->widget != w) {
@@ -678,8 +677,8 @@ ec_rebuild (EConfig *emp)
/**
* e_config_set_target:
- * @emp: An initialised EConfig.
- * @target: A target allocated from @emp.
+ * @config: An initialised EConfig.
+ * @target: A target allocated from @config.
*
* Sets the target object for the config window. Generally the target
* is set only once, and will supply its own "changed" signal which
@@ -688,11 +687,11 @@ ec_rebuild (EConfig *emp)
* initiate a e_config_target_changed() call where appropriate.
**/
void
-e_config_set_target (EConfig *emp,
+e_config_set_target (EConfig *config,
EConfigTarget *target)
{
- if (emp->target != target)
- ((EConfigClass *) G_OBJECT_GET_CLASS (emp))->set_target (emp, target);
+ if (config->target != target)
+ E_CONFIG_GET_CLASS (config)->set_target (config, target);
}
static void
@@ -709,30 +708,30 @@ ec_widget_destroy (GtkWidget *w,
/**
* e_config_create_widget:
- * @emp: An initialised EConfig object.
+ * @config: An initialised EConfig object.
*
- * Create the #GtkNotebook described by @emp.
+ * Create the #GtkNotebook described by @config.
*
* This object will be self-driving, but will not close itself once
* complete.
*
- * Unless reffed otherwise, the management object @emp will be
+ * Unless reffed otherwise, the management object @config will be
* finalized when the widget is.
*
- * Return value: The widget, also available in @emp.widget
+ * Return value: The widget, also available in @config.widget
**/
GtkWidget *
-e_config_create_widget (EConfig *emp)
+e_config_create_widget (EConfig *config)
{
- EConfigPrivate *p = emp->priv;
+ EConfigPrivate *p = config->priv;
GPtrArray *items = g_ptr_array_new ();
GList *link;
GSList *l;
gint i;
- g_return_val_if_fail (emp->target != NULL, NULL);
+ g_return_val_if_fail (config->target != NULL, NULL);
- ec_add_static_items (emp);
+ ec_add_static_items (config);
/* FIXME: need to override old ones with new names */
link = p->menus;
@@ -745,7 +744,7 @@ e_config_create_widget (EConfig *emp)
wn->item = item;
wn->context = mnode;
- wn->config = emp;
+ wn->config = config;
g_ptr_array_add (items, wn);
}
@@ -758,27 +757,27 @@ e_config_create_widget (EConfig *emp)
p->widgets = g_list_append (p->widgets, items->pdata[i]);
g_ptr_array_free (items, TRUE);
- ec_rebuild (emp);
+ ec_rebuild (config);
/* auto-unref it */
g_signal_connect (
- emp->widget, "destroy",
- G_CALLBACK (ec_widget_destroy), emp);
+ config->widget, "destroy",
+ G_CALLBACK (ec_widget_destroy), config);
/* FIXME: for some reason ec_rebuild puts the widget on page 1, this is just to override that */
- gtk_notebook_set_current_page ((GtkNotebook *) emp->widget, 0);
+ gtk_notebook_set_current_page ((GtkNotebook *) config->widget, 0);
- return emp->widget;
+ return config->widget;
}
static void
-ec_call_page_check (EConfig *emp)
+ec_call_page_check (EConfig *config)
{
- if (emp->window) {
- if (e_config_page_check (emp, NULL)) {
- gtk_dialog_set_response_sensitive ((GtkDialog *) emp->window, GTK_RESPONSE_OK, TRUE);
+ if (config->window) {
+ if (e_config_page_check (config, NULL)) {
+ gtk_dialog_set_response_sensitive ((GtkDialog *) config->window, GTK_RESPONSE_OK, TRUE);
} else {
- gtk_dialog_set_response_sensitive ((GtkDialog *) emp->window, GTK_RESPONSE_OK, FALSE);
+ gtk_dialog_set_response_sensitive ((GtkDialog *) config->window, GTK_RESPONSE_OK, FALSE);
}
}
}
@@ -786,17 +785,17 @@ ec_call_page_check (EConfig *emp)
static gboolean
ec_idle_handler_for_rebuild (gpointer data)
{
- EConfig *emp = (EConfig *) data;
+ EConfig *config = (EConfig *) data;
- ec_rebuild (emp);
- ec_call_page_check (emp);
+ ec_rebuild (config);
+ ec_call_page_check (config);
return FALSE;
}
/**
* e_config_target_changed:
- * @emp: an #EConfig
+ * @config: an #EConfig
* @how: an enum value indicating how the target has changed
*
* Indicate that the target has changed. This may be called by the
@@ -808,13 +807,13 @@ ec_idle_handler_for_rebuild (gpointer data)
* button for the Notebook mode.
**/
void
-e_config_target_changed (EConfig *emp,
+e_config_target_changed (EConfig *config,
e_config_target_change_t how)
{
if (how == E_CONFIG_TARGET_CHANGED_REBUILD) {
- g_idle_add (ec_idle_handler_for_rebuild, emp);
+ g_idle_add (ec_idle_handler_for_rebuild, config);
} else {
- ec_call_page_check (emp);
+ ec_call_page_check (config);
}
/* virtual method/signal? */
@@ -838,7 +837,7 @@ e_config_abort (EConfig *config)
/**
* e_config_commit:
- * @ec: an #EConfig
+ * @config: an #EConfig
*
* Signify that the stateful configuration changes should be saved.
* This is used by the self-driven assistant or notebook, or may be used
@@ -890,12 +889,11 @@ e_config_page_check (EConfig *config,
/**
* e_config_class_add_factory:
- * @class: Implementing class pointer.
+ * @klass: Implementing class pointer.
* @id: The name of the configuration window you're interested in.
- * This may be NULL to be called for all windows.
- * @func: An EConfigFactoryFunc to call when the window @id is being
- * created.
- * @data: Callback data.
+ * This may be NULL to be called for all windows.
+ * @func: An EConfigFactoryFunc to call when the window @id is being created.
+ * @user_data: Callback data.
*
* Add a config factory which will be called to add_items() any
* extra items's if wants to, to the current Config window.
@@ -905,14 +903,14 @@ e_config_page_check (EConfig *config,
* Return value: A handle to the factory.
**/
EConfigFactory *
-e_config_class_add_factory (EConfigClass *class,
+e_config_class_add_factory (EConfigClass *klass,
const gchar *id,
EConfigFactoryFunc func,
gpointer user_data)
{
EConfigFactory *factory;
- g_return_val_if_fail (E_IS_CONFIG_CLASS (class), NULL);
+ g_return_val_if_fail (E_IS_CONFIG_CLASS (klass), NULL);
g_return_val_if_fail (func != NULL, NULL);
factory = g_slice_new0 (EConfigFactory);
@@ -920,52 +918,53 @@ e_config_class_add_factory (EConfigClass *class,
factory->func = func;
factory->user_data = user_data;
- class->factories = g_list_append (class->factories, factory);
+ klass->factories = g_list_append (klass->factories, factory);
return factory;
}
/**
* e_config_target_new:
- * @ep: Parent EConfig object.
+ * @config: an #EConfig
* @type: type, up to implementor
- * @size: Size of object to allocate.
+ * @size: size of object to allocate
*
* Allocate a new config target suitable for this class. Implementing
* classes will define the actual content of the target.
**/
-gpointer e_config_target_new (EConfig *ep, gint type, gsize size)
+gpointer
+e_config_target_new (EConfig *config,
+ gint type,
+ gsize size)
{
- EConfigTarget *t;
+ EConfigTarget *target;
if (size < sizeof (EConfigTarget)) {
g_warning ("Size is less than size of EConfigTarget\n");
size = sizeof (EConfigTarget);
}
- t = g_malloc0 (size);
- t->config = ep;
- g_object_ref (ep);
- t->type = type;
+ target = g_malloc0 (size);
+ target->config = g_object_ref (config);
+ target->type = type;
- return t;
+ return target;
}
/**
* e_config_target_free:
- * @ep: Parent EConfig object.
- * @o: The target to fre.
+ * @config: an #EConfig
+ * @target: the target to free
*
* Free a target. The implementing class can override this method to
* free custom targets.
**/
void
-e_config_target_free (EConfig *ep,
- gpointer o)
+e_config_target_free (EConfig *config,
+ gpointer target)
{
- EConfigTarget *t = o;
-
- ((EConfigClass *) G_OBJECT_GET_CLASS (ep))->target_free (ep, t);
+ E_CONFIG_GET_CLASS (config)->target_free (
+ config, (EConfigTarget *) target);
}
/* ********************************************************************** */
@@ -994,9 +993,7 @@ e_config_target_free (EConfig *ep,
* </e-plugin>
*/
-#define emph ((EConfigHook *)eph)
-
-static const EPluginHookTargetKey ech_item_types[] = {
+static const EPluginHookTargetKey config_hook_item_types[] = {
{ "book", E_CONFIG_BOOK },
{ "page", E_CONFIG_PAGE },
@@ -1013,25 +1010,25 @@ G_DEFINE_TYPE (
E_TYPE_PLUGIN_HOOK)
static void
-ech_commit (EConfig *ec,
- EConfigHookGroup *group)
+config_hook_commit (EConfig *ec,
+ EConfigHookGroup *group)
{
if (group->commit && group->hook->hook.plugin->enabled)
e_plugin_invoke (group->hook->hook.plugin, group->commit, ec->target);
}
static void
-ech_abort (EConfig *ec,
- EConfigHookGroup *group)
+config_hook_abort (EConfig *ec,
+ EConfigHookGroup *group)
{
if (group->abort && group->hook->hook.plugin->enabled)
e_plugin_invoke (group->hook->hook.plugin, group->abort, ec->target);
}
static gboolean
-ech_check (EConfig *ec,
- const gchar *pageid,
- gpointer data)
+config_hook_check (EConfig *ec,
+ const gchar *pageid,
+ gpointer data)
{
EConfigHookGroup *group = data;
EConfigHookPageCheckData hdata;
@@ -1047,33 +1044,33 @@ ech_check (EConfig *ec,
}
static void
-ech_config_factory (EConfig *emp,
- gpointer data)
+config_hook_factory (EConfig *config,
+ gpointer data)
{
EConfigHookGroup *group = data;
d (printf ("config factory called %s\n", group->id ? group->id:"all menus"));
- if (emp->target->type != group->target_type
+ if (config->target->type != group->target_type
|| !group->hook->hook.plugin->enabled)
return;
if (group->items) {
- e_config_add_items (emp, group->items, NULL, group);
+ e_config_add_items (config, group->items, NULL, group);
g_signal_connect (
- emp, "abort",
- G_CALLBACK (ech_abort), group);
+ config, "abort",
+ G_CALLBACK (config_hook_abort), group);
g_signal_connect (
- emp, "commit",
- G_CALLBACK (ech_commit), group);
+ config, "commit",
+ G_CALLBACK (config_hook_commit), group);
}
if (group->check)
- e_config_add_page_check (emp, NULL, ech_check, group);
+ e_config_add_page_check (config, NULL, config_hook_check, group);
}
static void
-emph_free_item (struct _EConfigItem *item)
+config_hook_free_item (struct _EConfigItem *item)
{
g_free (item->path);
g_free (item->label);
@@ -1082,9 +1079,9 @@ emph_free_item (struct _EConfigItem *item)
}
static void
-emph_free_group (EConfigHookGroup *group)
+config_hook_free_group (EConfigHookGroup *group)
{
- g_slist_foreach (group->items, (GFunc) emph_free_item, NULL);
+ g_slist_foreach (group->items, (GFunc) config_hook_free_item, NULL);
g_slist_free (group->items);
g_free (group->id);
@@ -1092,12 +1089,12 @@ emph_free_group (EConfigHookGroup *group)
}
static GtkWidget *
-ech_config_widget_factory (EConfig *config,
- EConfigItem *item,
- GtkWidget *parent,
- GtkWidget *old,
- gint position,
- gpointer data)
+config_hook_widget_factory (EConfig *config,
+ EConfigItem *item,
+ GtkWidget *parent,
+ GtkWidget *old,
+ gint position,
+ gpointer data)
{
EConfigHookGroup *group = data;
EConfigHookItemFactoryData factory_data;
@@ -1115,13 +1112,13 @@ ech_config_widget_factory (EConfig *config,
}
static GtkWidget *
-ech_config_section_factory (EConfig *config,
- EConfigItem *item,
- GtkWidget *parent,
- GtkWidget *old,
- gint position,
- gpointer data,
- GtkWidget **real_frame)
+config_hook_section_factory (EConfig *config,
+ EConfigItem *item,
+ GtkWidget *parent,
+ GtkWidget *old,
+ gint position,
+ gpointer data,
+ GtkWidget **real_frame)
{
EConfigHookGroup *group = data;
GtkWidget *label = NULL;
@@ -1189,7 +1186,7 @@ ech_config_section_factory (EConfig *config,
}
static struct _EConfigItem *
-emph_construct_item (EPluginHook *eph,
+config_hook_construct_item (EPluginHook *eph,
EConfigHookGroup *menu,
xmlNodePtr root,
EConfigHookTargetMap *map)
@@ -1198,7 +1195,7 @@ emph_construct_item (EPluginHook *eph,
d (printf (" loading config item\n"));
item = g_malloc0 (sizeof (*item));
- if ((item->type = e_plugin_hook_id (root, ech_item_types, "type")) == -1)
+ if ((item->type = e_plugin_hook_id (root, config_hook_item_types, "type")) == -1)
goto error;
item->path = e_plugin_xml_prop (root, "path");
item->label = e_plugin_xml_prop_domain (root, "label", eph->plugin->domain);
@@ -1209,31 +1206,33 @@ emph_construct_item (EPluginHook *eph,
goto error;
if (item->user_data)
- item->factory = ech_config_widget_factory;
+ item->factory = config_hook_widget_factory;
else if (item->type == E_CONFIG_SECTION)
- item->factory = (EConfigItemFactoryFunc) ech_config_section_factory;
+ item->factory = (EConfigItemFactoryFunc) config_hook_section_factory;
else if (item->type == E_CONFIG_SECTION_TABLE)
- item->factory = (EConfigItemFactoryFunc) ech_config_section_factory;
+ item->factory = (EConfigItemFactoryFunc) config_hook_section_factory;
d (printf (" path=%s label=%s factory=%s\n", item->path, item->label, (gchar *) item->user_data));
return item;
error:
d (printf ("error!\n"));
- emph_free_item (item);
+ config_hook_free_item (item);
return NULL;
}
static EConfigHookGroup *
-emph_construct_menu (EPluginHook *eph,
- xmlNodePtr root)
+config_hook_construct_menu (EPluginHook *eph,
+ xmlNodePtr root)
{
EConfigHookGroup *menu;
xmlNodePtr node;
EConfigHookTargetMap *map;
- EConfigHookClass *class = (EConfigHookClass *) G_OBJECT_GET_CLASS (eph);
+ EConfigHookClass *class;
gchar *tmp;
+ class = E_CONFIG_HOOK_GET_CLASS (eph);
+
d (printf (" loading menu\n"));
menu = g_malloc0 (sizeof (*menu));
@@ -1251,7 +1250,7 @@ emph_construct_menu (EPluginHook *eph,
g_warning (
"Plugin '%s' missing 'id' field in group for '%s'\n",
eph->plugin->name,
- ((EPluginHookClass *) G_OBJECT_GET_CLASS (eph))->id);
+ E_PLUGIN_HOOK_CLASS (class)->id);
goto error;
}
menu->check = e_plugin_xml_prop (root, "check");
@@ -1263,7 +1262,7 @@ emph_construct_menu (EPluginHook *eph,
if (0 == strcmp ((gchar *) node->name, "item")) {
struct _EConfigItem *item;
- item = emph_construct_item (eph, menu, node, map);
+ item = config_hook_construct_item (eph, menu, node, map);
if (item)
menu->items = g_slist_append (menu->items, item);
}
@@ -1272,34 +1271,37 @@ emph_construct_menu (EPluginHook *eph,
return menu;
error:
- emph_free_group (menu);
+ config_hook_free_group (menu);
return NULL;
}
static gint
-emph_construct (EPluginHook *eph,
- EPlugin *ep,
- xmlNodePtr root)
+config_hook_construct (EPluginHook *eph,
+ EPlugin *ep,
+ xmlNodePtr root)
{
xmlNodePtr node;
EConfigClass *class;
+ EConfigHook *config_hook;
+
+ config_hook = (EConfigHook *) eph;
d (printf ("loading config hook\n"));
if (((EPluginHookClass *) e_config_hook_parent_class)->construct (eph, ep, root) == -1)
return -1;
- class = ((EConfigHookClass *) G_OBJECT_GET_CLASS (eph))->config_class;
+ class = E_CONFIG_HOOK_GET_CLASS (eph)->config_class;
node = root->children;
while (node) {
if (strcmp ((gchar *) node->name, "group") == 0) {
EConfigHookGroup *group;
- group = emph_construct_menu (eph, node);
+ group = config_hook_construct_menu (eph, node);
if (group) {
- e_config_class_add_factory (class, group->id, ech_config_factory, group);
- emph->groups = g_slist_append (emph->groups, group);
+ e_config_class_add_factory (class, group->id, config_hook_factory, group);
+ config_hook->groups = g_slist_append (config_hook->groups, group);
}
}
node = node->next;
@@ -1311,14 +1313,16 @@ emph_construct (EPluginHook *eph,
}
static void
-emph_finalize (GObject *o)
+config_hook_finalize (GObject *object)
{
- EPluginHook *eph = (EPluginHook *) o;
+ EConfigHook *config_hook = (EConfigHook *) object;
- g_slist_foreach (emph->groups, (GFunc) emph_free_group, NULL);
- g_slist_free (emph->groups);
+ g_slist_free_full (
+ config_hook->groups,
+ (GDestroyNotify) config_hook_free_group);
- ((GObjectClass *) e_config_hook_parent_class)->finalize (o);
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (e_config_hook_parent_class)->finalize (object);
}
static void
@@ -1328,10 +1332,10 @@ e_config_hook_class_init (EConfigHookClass *class)
EPluginHookClass *plugin_hook_class;
object_class = G_OBJECT_CLASS (class);
- object_class->finalize = emph_finalize;
+ object_class->finalize = config_hook_finalize;
plugin_hook_class = E_PLUGIN_HOOK_CLASS (class);
- plugin_hook_class->construct = emph_construct;
+ plugin_hook_class->construct = config_hook_construct;
/* this is actually an abstract implementation but list it anyway */
plugin_hook_class->id = "org.gnome.evolution.config:1.0";
@@ -1348,17 +1352,18 @@ e_config_hook_init (EConfigHook *hook)
/**
* e_config_hook_class_add_target_map:
*
- * @class: The dervied EconfigHook class.
- * @map: A map used to describe a single EConfigTarget type for this
- * class.
+ * @hook_class: The dervied #EConfigHook class.
+ * @map: A map used to describe a single EConfigTarget type for this class.
*
* Add a targe tmap to a concrete derived class of EConfig. The
* target map enumates the target types available for the implenting
* class.
**/
void
-e_config_hook_class_add_target_map (EConfigHookClass *class,
+e_config_hook_class_add_target_map (EConfigHookClass *hook_class,
const EConfigHookTargetMap *map)
{
- g_hash_table_insert (class->target_map, (gpointer) map->type, (gpointer) map);
+ g_hash_table_insert (
+ hook_class->target_map,
+ (gpointer) map->type, (gpointer) map);
}
diff --git a/e-util/e-config.h b/e-util/e-config.h
index 16e3106ddc..c89a91f703 100644
--- a/e-util/e-config.h
+++ b/e-util/e-config.h
@@ -282,7 +282,9 @@ gpointer e_config_target_new (EConfig *config,
gint type,
gsize size);
void e_config_target_free (EConfig *config,
- gpointer);
+ gpointer target);
+
+G_END_DECLS
/* ********************************************************************** */
@@ -293,6 +295,27 @@ void e_config_target_free (EConfig *config,
#include <e-util/e-plugin.h>
+/* Standard GObject macros */
+#define E_TYPE_CONFIG_HOOK \
+ (e_config_hook_get_type ())
+#define E_CONFIG_HOOK(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_CONFIG_HOOK, EConfigHook))
+#define E_CONFIG_HOOK_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_CONFIG_HOOK, EConfigHookClass))
+#define E_IS_CONFIG_HOOK(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_CONFIG_HOOK))
+#define E_IS_CONFIG_HOOK_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_CONFIG_HOOK))
+#define E_CONFIG_HOOK_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_CONFIG_HOOK, EConfigHookClass))
+
+G_BEGIN_DECLS
+
typedef struct _EConfigHookGroup EConfigHookGroup;
typedef struct _EConfigHook EConfigHook;
typedef struct _EConfigHookClass EConfigHookClass;
@@ -414,7 +437,7 @@ GType e_config_hook_get_type (void);
/* for implementors */
void e_config_hook_class_add_target_map
- (EConfigHookClass *klass,
+ (EConfigHookClass *hook_class,
const EConfigHookTargetMap *map);
G_END_DECLS
diff --git a/e-util/e-dateedit.c b/e-util/e-dateedit.c
index ab569bebb0..0a30750b54 100644
--- a/e-util/e-dateedit.c
+++ b/e-util/e-dateedit.c
@@ -754,7 +754,7 @@ e_date_edit_grab_focus (GtkWidget *widget)
/**
* e_date_edit_set_editable:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @editable: whether or not the widget should accept edits.
*
* Allows the programmer to disallow editing (and the popping up of
@@ -777,15 +777,15 @@ e_date_edit_set_editable (EDateEdit *dedit,
/**
* e_date_edit_get_time:
- * @dedit: an #EDateEdit widget.
- * @the_time: returns the last valid time entered.
- * @Returns: the last valid time entered, or -1 if the time is not set.
+ * @dedit: an #EDateEdit
*
* Returns the last valid time entered. If empty times are valid, by calling
* e_date_edit_set_allow_no_date_set(), then it may return -1.
*
* Note that the last time entered may actually have been invalid. You can
* check this with e_date_edit_time_is_valid().
+ *
+ * Returns: the last valid time entered, or -1 if the time is not set.
*/
time_t
e_date_edit_get_time (EDateEdit *dedit)
@@ -823,7 +823,7 @@ e_date_edit_get_time (EDateEdit *dedit)
/**
* e_date_edit_set_time:
- * @dedit: the EDateEdit widget
+ * @dedit: an #EDateEdit
* @the_time: The time and date that should be set on the widget
*
* Description: Changes the displayed date and time in the EDateEdit
@@ -889,7 +889,7 @@ e_date_edit_set_time (EDateEdit *dedit,
/**
* e_date_edit_get_date:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @year: returns the year set.
* @month: returns the month set (1 - 12).
* @day: returns the day set (1 - 31).
@@ -925,7 +925,7 @@ e_date_edit_get_date (EDateEdit *dedit,
/**
* e_date_edit_set_date:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @year: the year to set.
* @month: the month to set (1 - 12).
* @day: the day to set (1 - 31).
@@ -957,7 +957,7 @@ e_date_edit_set_date (EDateEdit *dedit,
/**
* e_date_edit_get_time_of_day:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @hour: returns the hour set, or 0 if the time isn't set.
* @minute: returns the minute set, or 0 if the time isn't set.
* @Returns: TRUE if a time was set, or FALSE if the field is empty or 'None'.
@@ -991,7 +991,7 @@ e_date_edit_get_time_of_day (EDateEdit *dedit,
/**
* e_date_edit_set_time_of_day:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @hour: the hour to set, or -1 to set the time to None (i.e. empty).
* @minute: the minute to set.
*
@@ -1060,7 +1060,7 @@ e_date_edit_set_date_and_time_of_day (EDateEdit *dedit,
/**
* e_date_edit_get_show_date:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @Returns: Whether the date field is shown.
*
* Description: Returns TRUE if the date field is currently shown.
@@ -1075,7 +1075,7 @@ e_date_edit_get_show_date (EDateEdit *dedit)
/**
* e_date_edit_set_show_date:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @show_date: TRUE if the date field should be shown.
*
* Description: Specifies whether the date field should be shown. The date
@@ -1117,7 +1117,7 @@ e_date_edit_set_show_date (EDateEdit *dedit,
/**
* e_date_edit_get_show_time:
- * @dedit: an #EDateEdit widget
+ * @dedit: an #EDateEdit
* @Returns: Whether the time field is shown.
*
* Description: Returns TRUE if the time field is currently shown.
@@ -1132,7 +1132,7 @@ e_date_edit_get_show_time (EDateEdit *dedit)
/**
* e_date_edit_set_show_time:
- * @dedit: an #EDateEdit widget
+ * @dedit: an #EDateEdit
* @show_time: TRUE if the time field should be shown.
*
* Description: Specifies whether the time field should be shown. The time
@@ -1160,7 +1160,7 @@ e_date_edit_set_show_time (EDateEdit *dedit,
/**
* e_date_edit_get_make_time_insensitive:
- * @dedit: an #EDateEdit widget
+ * @dedit: an #EDateEdit
* @Returns: Whether the time field is be made insensitive instead of hiding
* it.
*
@@ -1177,7 +1177,7 @@ e_date_edit_get_make_time_insensitive (EDateEdit *dedit)
/**
* e_date_edit_set_make_time_insensitive:
- * @dedit: an #EDateEdit widget
+ * @dedit: an #EDateEdit
* @make_insensitive: TRUE if the time field should be made insensitive instead
* of hiding it.
*
@@ -1208,7 +1208,7 @@ e_date_edit_set_make_time_insensitive (EDateEdit *dedit,
/**
* e_date_edit_get_week_start_day:
- * @dedit: an #EDateEdit widget
+ * @dedit: an #EDateEdit
* @Returns: the week start day, from 0 (Monday) to 6 (Sunday).
*
* Description: Returns the week start day currently used in the calendar
@@ -1230,7 +1230,7 @@ e_date_edit_get_week_start_day (EDateEdit *dedit)
/**
* e_date_edit_set_week_start_day:
- * @dedit: an #EDateEdit widget
+ * @dedit: an #EDateEdit
* @week_start_day: the week start day, from 0 (Monday) to 6 (Sunday).
*
* Description: Sets the week start day to use in the calendar popup.
@@ -2304,7 +2304,7 @@ e_date_edit_check_time_changed (EDateEdit *dedit)
/**
* e_date_edit_date_is_valid:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @Returns: TRUE if the last date entered was valid.
*
* Returns TRUE if the last date entered was valid.
@@ -2331,7 +2331,7 @@ e_date_edit_date_is_valid (EDateEdit *dedit)
/**
* e_date_edit_time_is_valid:
- * @dedit: an #EDateEdit widget.
+ * @dedit: an #EDateEdit
* @Returns: TRUE if the last time entered was valid.
*
* Returns TRUE if the last time entered was valid.
diff --git a/e-util/e-event.c b/e-util/e-event.c
index c9d046c041..276c55e990 100644
--- a/e-util/e-event.c
+++ b/e-util/e-event.c
@@ -120,18 +120,20 @@ e_event_init (EEvent *event)
/**
* e_event_construct:
- * @ep: An instantiated but uninitialised EEvent.
+ * @event: An instantiated but uninitialised EEvent.
* @id: Event manager id.
*
* Construct the base event instance with standard parameters.
*
- * Return value: Returns @ep.
+ * Returns: the @event
**/
-EEvent *e_event_construct (EEvent *ep, const gchar *id)
+EEvent *
+e_event_construct (EEvent *event,
+ const gchar *id)
{
- ep->id = g_strdup (id);
+ event->id = g_strdup (id);
- return ep;
+ return event;
}
/**
@@ -213,7 +215,7 @@ ee_cmp (gconstpointer ap,
/**
* e_event_emit:
- * @ee: An initialised EEvent, potentially with registered event listeners.
+ * event: An initialised EEvent, potentially with registered event listeners.
* @id: Event name. This will be compared against EEventItem.id.
* @target: The target describing the event context. This will be
* implementation defined.
@@ -281,7 +283,7 @@ e_event_emit (EEvent *event,
/**
* e_event_target_new:
- * @ep: An initialised EEvent instance.
+ * @event: An initialised EEvent instance.
* @type: type, up to implementor
* @size: The size of memory to allocate. This must be >= sizeof(EEventTarget).
*
@@ -310,18 +312,17 @@ e_event_target_new (EEvent *event,
/**
* e_event_target_free:
- * @ep: An initialised EEvent instance on which this target was allocated.
- * @o: The target to free.
+ * @event: An initialised EEvent instance on which this target was allocated.
+ * @target: The target to free.
*
* Free a target. This invokes the virtual free method on the EEventClass.
**/
void
e_event_target_free (EEvent *event,
- gpointer object)
+ gpointer target)
{
- EEventTarget *target = object;
-
- E_EVENT_GET_CLASS (event)->target_free (event, target);
+ E_EVENT_GET_CLASS (event)->target_free (
+ event, (EEventTarget *) target);
}
/* ********************************************************************** */
@@ -510,17 +511,18 @@ e_event_hook_init (EEventHook *hook)
/**
* e_event_hook_class_add_target_map:
- * @class: The derived EEventHook class.
- * @map: A map used to describe a single EEventTarget type for this
- * class.
+ * @hook_class: The derived EEventHook class.
+ * @map: A map used to describe a single EEventTarget type for this class.
*
* Add a target map to a concrete derived class of EEvent. The target
* map enumerates a single target type and th eenable mask bit names,
* so that the type can be loaded automatically by the base EEvent class.
**/
-void e_event_hook_class_add_target_map (EEventHookClass *class,
- const EEventHookTargetMap *map)
+void
+e_event_hook_class_add_target_map (EEventHookClass *hook_class,
+ const EEventHookTargetMap *map)
{
g_hash_table_insert (
- class->target_map, (gpointer) map->type, (gpointer) map);
+ hook_class->target_map,
+ (gpointer) map->type, (gpointer) map);
}
diff --git a/e-util/e-event.h b/e-util/e-event.h
index 65f3b9b5f0..59d5f5e017 100644
--- a/e-util/e-event.h
+++ b/e-util/e-event.h
@@ -189,7 +189,7 @@ gpointer e_event_target_new (EEvent *event,
gint type,
gsize size);
void e_event_target_free (EEvent *event,
- gpointer object);
+ gpointer target);
/* ********************************************************************** */
@@ -272,7 +272,7 @@ struct _EEventHookClass {
GType e_event_hook_get_type (void) G_GNUC_CONST;
void e_event_hook_class_add_target_map
- (EEventHookClass *klass,
+ (EEventHookClass *hook_class,
const EEventHookTargetMap *map);
G_END_DECLS
diff --git a/e-util/e-filter-part.c b/e-util/e-filter-part.c
index 775b7a300a..75988339e4 100644
--- a/e-util/e-filter-part.c
+++ b/e-util/e-filter-part.c
@@ -382,7 +382,7 @@ e_filter_part_build_code (EFilterPart *part,
/**
* e_filter_part_build_code_list:
- * @l:
+ * @list:
* @out:
*
* Construct a list of the filter parts code into
@@ -406,7 +406,7 @@ e_filter_part_build_code_list (GList *list,
/**
* e_filter_part_find_list:
- * @l:
+ * @list:
* @name:
*
* Find a filter part stored in a list.
@@ -433,7 +433,7 @@ e_filter_part_find_list (GList *list,
/**
* e_filter_part_next_list:
- * @l:
+ * @list:
* @last: The last item retrieved, or NULL to start
* from the beginning of the list.
*
diff --git a/e-util/e-import.c b/e-util/e-import.c
index 8b806899a2..a396f2d9fe 100644
--- a/e-util/e-import.c
+++ b/e-util/e-import.c
@@ -101,18 +101,20 @@ e_import_init (EImport *import)
/**
* e_import_construct:
- * @ep: The instance to initialise.
+ * @import: The instance to initialise.
* @id: The name of the instance.
*
* Used by implementing classes to initialise base parameters.
*
* Return value: @ep is returned.
**/
-EImport *e_import_construct (EImport *ep, const gchar *id)
+EImport *
+e_import_construct (EImport *import,
+ const gchar *id)
{
- ep->id = g_strdup (id);
+ import->id = g_strdup (id);
- return ep;
+ return import;
}
EImport *
@@ -128,8 +130,8 @@ e_import_new (const gchar *id)
/**
* e_import_import:
* @import: an #EImport
- * @t: Target to import.
- * @im: Importer to use.
+ * @target: Target to import.
+ * @importer: Importer to use.
* @status: Status callback, called with progress information.
* @done: Complete callback, will always be called once complete.
* @data: user data for callback functions
@@ -143,19 +145,19 @@ e_import_new (const gchar *id)
**/
void
e_import_import (EImport *import,
- EImportTarget *t,
- EImportImporter *im,
+ EImportTarget *target,
+ EImportImporter *importer,
EImportStatusFunc status,
EImportCompleteFunc done,
gpointer data)
{
- g_return_if_fail (im != NULL);
+ g_return_if_fail (importer != NULL);
import->status = status;
import->done = done;
import->done_data = data;
- im->import (import, t, im);
+ importer->import (import, target, importer);
}
void
@@ -171,7 +173,7 @@ e_import_cancel (EImport *import,
* e_import_get_widget:
* @import: an #EImport
* @target: Target of interest
- * @im: Importer to get widget of
+ * @importer: Importer to get widget of
*
* Gets a widget that the importer uses to configure its
* destination. This widget should be packed into a container
@@ -183,12 +185,12 @@ e_import_cancel (EImport *import,
GtkWidget *
e_import_get_widget (EImport *import,
EImportTarget *target,
- EImportImporter *im)
+ EImportImporter *importer)
{
- g_return_val_if_fail (im != NULL, NULL);
+ g_return_val_if_fail (importer != NULL, NULL);
g_return_val_if_fail (target != NULL, NULL);
- return im->get_widget (import, target, im);
+ return importer->get_widget (import, target, importer);
}
/**
@@ -245,7 +247,7 @@ e_import_status (EImport *import,
/**
* e_import_get_importers:
- * @emp: an #EImport
+ * @import: an #EImport
* @target: an #EImportTarget
*
* Get a list of importers. If @target is supplied, then only
@@ -257,20 +259,20 @@ e_import_status (EImport *import,
* no longer needed.
**/
GSList *
-e_import_get_importers (EImport *emp,
+e_import_get_importers (EImport *import,
EImportTarget *target)
{
GSList *importers = NULL;
GList *link;
- link = E_IMPORT_GET_CLASS (emp)->importers;
+ link = E_IMPORT_GET_CLASS (import)->importers;
while (link != NULL) {
EImportImporters *ei = link->data;
if (target == NULL
|| (ei->importer->type == target->type
- && ei->importer->supported (emp, target, ei->importer))) {
+ && ei->importer->supported (import, target, ei->importer))) {
importers = g_slist_append (importers, ei->importer);
}
@@ -294,7 +296,7 @@ importer_compare (EImportImporters *node_a,
/**
* e_import_class_add_importer:
- * @ec: An initialised implementing instance of EImport.
+ * @klass: An initialised implementing instance of EImport.
* @importer: Importer to add.
* @freefunc: If supplied, called to free the importer node
* when it is no longer needed.
@@ -302,7 +304,7 @@ importer_compare (EImportImporters *node_a,
*
**/
void
-e_import_class_add_importer (EImportClass *class,
+e_import_class_add_importer (EImportClass *klass,
EImportImporter *importer,
EImportImporterFunc freefunc,
gpointer data)
@@ -314,14 +316,14 @@ e_import_class_add_importer (EImportClass *class,
node->free = freefunc;
node->data = data;
- class->importers = g_list_sort (
- g_list_prepend (class->importers, node),
+ klass->importers = g_list_sort (
+ g_list_prepend (klass->importers, node),
(GCompareFunc) importer_compare);
}
/**
* e_import_target_new:
- * @ep: Parent EImport object.
+ * @import: an #EImport
* @type: type, up to implementor
* @size: Size of object to allocate.
*
@@ -329,41 +331,40 @@ e_import_class_add_importer (EImportClass *class,
* classes will define the actual content of the target.
**/
gpointer
-e_import_target_new (EImport *ep,
+e_import_target_new (EImport *import,
gint type,
gsize size)
{
- EImportTarget *t;
+ EImportTarget *target;
if (size < sizeof (EImportTarget)) {
g_warning ("Size less than size of EImportTarget\n");
size = sizeof (EImportTarget);
}
- t = g_malloc0 (size);
- t->import = ep;
- g_object_ref (ep);
- t->type = type;
- g_datalist_init (&t->data);
+ target = g_malloc0 (size);
+ target->import = g_object_ref (import);
+ target->type = type;
- return t;
+ g_datalist_init (&target->data);
+
+ return target;
}
/**
* e_import_target_free:
- * @ep: Parent EImport object.
- * @o: The target to fre.
+ * @import: an #EImport
+ * @target: the target to free
*
* Free a target. The implementing class can override this method to
* free custom targets.
**/
void
-e_import_target_free (EImport *ep,
- gpointer o)
+e_import_target_free (EImport *import,
+ gpointer target)
{
- EImportTarget *t = o;
-
- ((EImportClass *) G_OBJECT_GET_CLASS (ep))->target_free (ep, t);
+ E_IMPORT_GET_CLASS (import)->target_free (
+ import, (EImportTarget *) target);
}
EImportTargetURI *
diff --git a/e-util/e-import.h b/e-util/e-import.h
index 79d6bf0d43..b790d6d786 100644
--- a/e-util/e-import.h
+++ b/e-util/e-import.h
@@ -233,7 +233,7 @@ gpointer e_import_target_new (EImport *import,
gint type,
gsize size);
void e_import_target_free (EImport *import,
- gpointer object);
+ gpointer target);
EImportTargetURI *
e_import_target_new_uri (EImport *import,
const gchar *uri_src,
diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c
index 7044107a92..7fd4778b9a 100644
--- a/e-util/e-plugin.c
+++ b/e-util/e-plugin.c
@@ -574,7 +574,7 @@ e_plugin_list_plugins (void)
/**
* e_plugin_construct:
- * @ep: an #EPlugin
+ * @plugin: an #EPlugin
* @root: The XML root node of the sub-tree containing the plugin
* definition.
*
@@ -583,22 +583,22 @@ e_plugin_list_plugins (void)
* Return value: The return from the construct virtual method.
**/
gint
-e_plugin_construct (EPlugin *ep,
+e_plugin_construct (EPlugin *plugin,
xmlNodePtr root)
{
EPluginClass *class;
- g_return_val_if_fail (E_IS_PLUGIN (ep), -1);
+ g_return_val_if_fail (E_IS_PLUGIN (plugin), -1);
- class = E_PLUGIN_GET_CLASS (ep);
+ class = E_PLUGIN_GET_CLASS (plugin);
g_return_val_if_fail (class->construct != NULL, -1);
- return class->construct (ep, root);
+ return class->construct (plugin, root);
}
/**
* e_plugin_invoke:
- * @ep: an #EPlugin
+ * @plugin: an #EPlugin
* @name: The name of the function to invoke. The format of this name
* will depend on the EPlugin type and its language conventions.
* @data: The argument to the function. Its actual type depends on
@@ -610,27 +610,27 @@ e_plugin_construct (EPlugin *ep,
* Return value: The return of the plugin invocation.
**/
gpointer
-e_plugin_invoke (EPlugin *ep,
+e_plugin_invoke (EPlugin *plugin,
const gchar *name,
gpointer data)
{
EPluginClass *class;
- g_return_val_if_fail (E_IS_PLUGIN (ep), NULL);
+ g_return_val_if_fail (E_IS_PLUGIN (plugin), NULL);
g_return_val_if_fail (name != NULL, NULL);
/* Prevent invocation on a disabled plugin. */
- g_return_val_if_fail (ep->enabled, NULL);
+ g_return_val_if_fail (plugin->enabled, NULL);
- class = E_PLUGIN_GET_CLASS (ep);
+ class = E_PLUGIN_GET_CLASS (plugin);
g_return_val_if_fail (class->invoke != NULL, NULL);
- return class->invoke (ep, name, data);
+ return class->invoke (plugin, name, data);
}
/**
* e_plugin_get_symbol:
- * @ep: an #EPlugin
+ * @plugin: an #EPlugin
* @name: The name of the symbol to fetch. The format of this name
* will depend on the EPlugin type and its language conventions.
*
@@ -639,22 +639,22 @@ e_plugin_invoke (EPlugin *ep,
* Return value: the symbol value, or %NULL if not found
**/
gpointer
-e_plugin_get_symbol (EPlugin *ep,
+e_plugin_get_symbol (EPlugin *plugin,
const gchar *name)
{
EPluginClass *class;
- g_return_val_if_fail (E_IS_PLUGIN (ep), NULL);
+ g_return_val_if_fail (E_IS_PLUGIN (plugin), NULL);
- class = E_PLUGIN_GET_CLASS (ep);
+ class = E_PLUGIN_GET_CLASS (plugin);
g_return_val_if_fail (class->get_symbol != NULL, NULL);
- return class->get_symbol (ep, name);
+ return class->get_symbol (plugin, name);
}
/**
* e_plugin_enable:
- * @ep: an #EPlugin
+ * @plugin: an #EPlugin
* @state: %TRUE to enable, %FALSE to disable
*
* Set the enable state of a plugin.
@@ -662,26 +662,27 @@ e_plugin_get_symbol (EPlugin *ep,
* THIS IS NOT FULLY IMPLEMENTED YET
**/
void
-e_plugin_enable (EPlugin *ep,
+e_plugin_enable (EPlugin *plugin,
gint state)
{
EPluginClass *class;
- g_return_if_fail (E_IS_PLUGIN (ep));
+ g_return_if_fail (E_IS_PLUGIN (plugin));
- if ((ep->enabled == 0) == (state == 0))
+ if ((plugin->enabled == 0) == (state == 0))
return;
- class = E_PLUGIN_GET_CLASS (ep);
+ class = E_PLUGIN_GET_CLASS (plugin);
g_return_if_fail (class->enable != NULL);
- class->enable (ep, state);
- g_object_notify (G_OBJECT (ep), "enabled");
+ class->enable (plugin, state);
+
+ g_object_notify (G_OBJECT (plugin), "enabled");
}
/**
* e_plugin_get_configure_widget
- * @ep: an #EPlugin
+ * @plugin: an #EPlugin
*
* Plugin itself should have implemented "e_plugin_lib_get_configure_widget"
* function * of prototype EPluginLibGetConfigureWidgetFunc.
@@ -689,17 +690,17 @@ e_plugin_enable (EPlugin *ep,
* Returns: Configure widget or %NULL
**/
GtkWidget *
-e_plugin_get_configure_widget (EPlugin *ep)
+e_plugin_get_configure_widget (EPlugin *plugin)
{
EPluginClass *class;
- g_return_val_if_fail (E_IS_PLUGIN (ep), NULL);
+ g_return_val_if_fail (E_IS_PLUGIN (plugin), NULL);
- class = E_PLUGIN_GET_CLASS (ep);
+ class = E_PLUGIN_GET_CLASS (plugin);
if (class->get_configure_widget == NULL)
return NULL;
- return class->get_configure_widget (ep);
+ return class->get_configure_widget (plugin);
}
/**
@@ -846,18 +847,18 @@ G_DEFINE_TYPE (
G_TYPE_OBJECT)
static gint
-eph_construct (EPluginHook *eph,
- EPlugin *ep,
- xmlNodePtr root)
+plugin_hook_construct (EPluginHook *plugin_hook,
+ EPlugin *plugin,
+ xmlNodePtr root)
{
- eph->plugin = ep;
+ plugin_hook->plugin = plugin;
return 0;
}
static void
-eph_enable (EPluginHook *eph,
- gint state)
+plugin_hook_enable (EPluginHook *plugin_hook,
+ gint state)
{
/* NOOP */
}
@@ -865,8 +866,8 @@ eph_enable (EPluginHook *eph,
static void
e_plugin_hook_class_init (EPluginHookClass *class)
{
- class->construct = eph_construct;
- class->enable = eph_enable;
+ class->construct = plugin_hook_construct;
+ class->enable = plugin_hook_enable;
}
static void
@@ -875,8 +876,8 @@ e_plugin_hook_init (EPluginHook *hook)
}
/**
- * e_plugin_hook_enable: Set hook enabled state.
- * @eph:
+ * e_plugin_hook_enable:
+ * @plugin_hook:
* @state:
*
* Set the enabled state of the plugin hook. This is called by the
@@ -885,17 +886,17 @@ e_plugin_hook_init (EPluginHook *hook)
* THIS IS NOT FULY IMEPLEMENTED YET
**/
void
-e_plugin_hook_enable (EPluginHook *eph,
+e_plugin_hook_enable (EPluginHook *plugin_hook,
gint state)
{
EPluginHookClass *class;
- g_return_if_fail (E_IS_PLUGIN_HOOK (eph));
+ g_return_if_fail (E_IS_PLUGIN_HOOK (plugin_hook));
- class = E_PLUGIN_HOOK_GET_CLASS (eph);
+ class = E_PLUGIN_HOOK_GET_CLASS (plugin_hook);
g_return_if_fail (class->enable != NULL);
- class->enable (eph, state);
+ class->enable (plugin_hook, state);
}
/**
diff --git a/e-util/e-reflow-model.c b/e-util/e-reflow-model.c
index 4f5b219b90..336afc4038 100644
--- a/e-util/e-reflow-model.c
+++ b/e-util/e-reflow-model.c
@@ -48,68 +48,68 @@ static guint signals[LAST_SIGNAL] = { 0, };
/**
* e_reflow_model_set_width:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @width: The new value for the width of each item.
*/
void
-e_reflow_model_set_width (EReflowModel *e_reflow_model,
+e_reflow_model_set_width (EReflowModel *reflow_model,
gint width)
{
EReflowModelClass *class;
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_if_fail (class->set_width != NULL);
- class->set_width (e_reflow_model, width);
+ class->set_width (reflow_model, width);
}
/**
* e_reflow_model_count:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
*
* Returns: the number of items in the reflow model.
*/
gint
-e_reflow_model_count (EReflowModel *e_reflow_model)
+e_reflow_model_count (EReflowModel *reflow_model)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), 0);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), 0);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_val_if_fail (class->count != NULL, 0);
- return class->count (e_reflow_model);
+ return class->count (reflow_model);
}
/**
* e_reflow_model_height:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @n: The item number to get the height of.
* @parent: The parent GnomeCanvasItem.
*
* Returns: the height of the nth item.
*/
gint
-e_reflow_model_height (EReflowModel *e_reflow_model,
+e_reflow_model_height (EReflowModel *reflow_model,
gint n,
GnomeCanvasGroup *parent)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), 0);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), 0);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_val_if_fail (class->height != NULL, 0);
- return class->height (e_reflow_model, n, parent);
+ return class->height (reflow_model, n, parent);
}
/**
* e_reflow_model_incarnate:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @n: The item to create.
* @parent: The parent GnomeCanvasItem to create a child of.
*
@@ -118,23 +118,23 @@ e_reflow_model_height (EReflowModel *e_reflow_model,
* Returns: the new GnomeCanvasItem.
*/
GnomeCanvasItem *
-e_reflow_model_incarnate (EReflowModel *e_reflow_model,
+e_reflow_model_incarnate (EReflowModel *reflow_model,
gint n,
GnomeCanvasGroup *parent)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), NULL);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), NULL);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_val_if_fail (class->incarnate != NULL, NULL);
- return class->incarnate (e_reflow_model, n, parent);
+ return class->incarnate (reflow_model, n, parent);
}
/**
* e_reflow_model_create_cmp_cache:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
*
* Creates a compare cache for quicker sorting. The sorting function
* may not depend on the cache, but it should benefit from it if available.
@@ -143,28 +143,28 @@ e_reflow_model_incarnate (EReflowModel *e_reflow_model,
* automatically freed with g_hash_table_destroy() when no longer needed.
**/
GHashTable *
-e_reflow_model_create_cmp_cache (EReflowModel *e_reflow_model)
+e_reflow_model_create_cmp_cache (EReflowModel *reflow_model)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), NULL);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), NULL);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
if (class->create_cmp_cache == NULL)
return NULL;
- return class->create_cmp_cache (e_reflow_model);
+ return class->create_cmp_cache (reflow_model);
}
/**
* e_reflow_model_compare:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @n1: The first item to compare
* @n2: The second item to compare
* @cmp_cache: #GHashTable of cached compare values, created by
* e_reflow_model_create_cmp_cache(). This can be NULL, when
- * caching is not available, even when @e_reflow_model defines
+ * caching is not available, even when @reflow_model defines
* the create_cmp_cache function.
*
* Compares item n1 and item n2 to see which should come first.
@@ -172,42 +172,42 @@ e_reflow_model_create_cmp_cache (EReflowModel *e_reflow_model)
* Returns: strcmp like semantics for the comparison value.
*/
gint
-e_reflow_model_compare (EReflowModel *e_reflow_model,
+e_reflow_model_compare (EReflowModel *reflow_model,
gint n1,
gint n2,
GHashTable *cmp_cache)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), 0);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), 0);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_val_if_fail (class->compare != NULL, 0);
- return class->compare (e_reflow_model, n1, n2, cmp_cache);
+ return class->compare (reflow_model, n1, n2, cmp_cache);
}
/**
* e_reflow_model_reincarnate:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @n: The item to create.
* @item: The item to reuse.
*
* Update item to represent the nth piece of data.
*/
void
-e_reflow_model_reincarnate (EReflowModel *e_reflow_model,
+e_reflow_model_reincarnate (EReflowModel *reflow_model,
gint n,
GnomeCanvasItem *item)
{
EReflowModelClass *class;
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_if_fail (class->reincarnate != NULL);
- class->reincarnate (e_reflow_model, n, item);
+ class->reincarnate (reflow_model, n, item);
}
static void
@@ -290,11 +290,11 @@ print_tabs (void)
/**
* e_reflow_model_changed:
- * @e_reflow_model: the reflow model to notify of the change
+ * @reflow_model: the reflow model to notify of the change
*
* Use this function to notify any views of this reflow model that
* the contents of the reflow model have changed. This will emit
- * the signal "model_changed" on the @e_reflow_model object.
+ * the signal "model_changed" on the @reflow_model object.
*
* It is preferable to use the e_reflow_model_item_changed() signal to
* notify of smaller changes than to invalidate the entire model, as
@@ -302,21 +302,20 @@ print_tabs (void)
* from the model.
*/
void
-e_reflow_model_changed (EReflowModel *e_reflow_model)
+e_reflow_model_changed (EReflowModel *reflow_model)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
- d (g_print ("Emitting model_changed on model 0x%p.\n", e_reflow_model));
+ d (g_print ("Emitting model_changed on model 0x%p.\n", reflow_model));
d (depth++);
- g_signal_emit (e_reflow_model, signals[MODEL_CHANGED], 0);
+ g_signal_emit (reflow_model, signals[MODEL_CHANGED], 0);
d (depth--);
}
/**
* e_reflow_model_comparison_changed:
- * @e_reflow_model: the reflow model to notify of the change
+ * @reflow_model: the reflow model to notify of the change
*
* Use this function to notify any views of this reflow model that the
* sorting has changed. The actual contents of the items hasn't, so
@@ -324,23 +323,22 @@ e_reflow_model_changed (EReflowModel *e_reflow_model)
* individual items.
*/
void
-e_reflow_model_comparison_changed (EReflowModel *e_reflow_model)
+e_reflow_model_comparison_changed (EReflowModel *reflow_model)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
d (g_print (
"Emitting comparison_changed on model 0x%p.\n",
- e_reflow_model));
+ reflow_model));
d (depth++);
- g_signal_emit (e_reflow_model, signals[COMPARISON_CHANGED], 0);
+ g_signal_emit (reflow_model, signals[COMPARISON_CHANGED], 0);
d (depth--);
}
/**
* e_reflow_model_items_inserted:
- * @e_reflow_model: The model changed.
+ * @reflow_model: The model changed.
* @position: The position the items were insert in.
* @count: The number of items inserted.
*
@@ -348,17 +346,16 @@ e_reflow_model_comparison_changed (EReflowModel *e_reflow_model)
* of items have been inserted.
**/
void
-e_reflow_model_items_inserted (EReflowModel *e_reflow_model,
+e_reflow_model_items_inserted (EReflowModel *reflow_model,
gint position,
gint count)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
d (depth++);
g_signal_emit (
- e_reflow_model,
+ reflow_model,
signals[MODEL_ITEMS_INSERTED], 0,
position, count);
d (depth--);
@@ -366,46 +363,44 @@ e_reflow_model_items_inserted (EReflowModel *e_reflow_model,
/**
* e_reflow_model_item_removed:
- * @e_reflow_model: The model changed.
+ * @reflow_model: The model changed.
* @n: The position from which the items were removed.
*
* Use this function to notify any views of the reflow model that an
* item has been removed.
**/
void
-e_reflow_model_item_removed (EReflowModel *e_reflow_model,
+e_reflow_model_item_removed (EReflowModel *reflow_model,
gint n)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
d (depth++);
- g_signal_emit (e_reflow_model, signals[MODEL_ITEM_REMOVED], 0, n);
+ g_signal_emit (reflow_model, signals[MODEL_ITEM_REMOVED], 0, n);
d (depth--);
}
/**
* e_reflow_model_item_changed:
- * @e_reflow_model: the reflow model to notify of the change
- * @item: the item that was changed in the model.
+ * @reflow_model: the reflow model to notify of the change
+ * @n: the item that was changed in the model.
*
* Use this function to notify any views of the reflow model that the
* contents of item @item have changed in model such that the height
* has changed or the item needs to be reincarnated. This function
- * will emit the "model_item_changed" signal on the @e_reflow_model
+ * will emit the "model_item_changed" signal on the @reflow_model
* object
*/
void
-e_reflow_model_item_changed (EReflowModel *e_reflow_model,
+e_reflow_model_item_changed (EReflowModel *reflow_model,
gint n)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
- d (g_print ("Emitting item_changed on model 0x%p, n=%d.\n", e_reflow_model, n));
+ d (g_print ("Emitting item_changed on model 0x%p, n=%d.\n", reflow_model, n));
d (depth++);
- g_signal_emit (e_reflow_model, signals[MODEL_ITEM_CHANGED], 0, n);
+ g_signal_emit (reflow_model, signals[MODEL_ITEM_CHANGED], 0, n);
d (depth--);
}
diff --git a/e-util/e-rule-context.c b/e-util/e-rule-context.c
index dc7ce8160d..f5edd574f4 100644
--- a/e-util/e-rule-context.c
+++ b/e-util/e-rule-context.c
@@ -631,7 +631,7 @@ e_rule_context_add_rule_set (ERuleContext *context,
/**
* e_rule_context_load:
- * @f:
+ * @context:
* @system:
* @user:
*
@@ -663,7 +663,7 @@ e_rule_context_load (ERuleContext *context,
/**
* e_rule_context_save:
- * @f:
+ * @context:
* @user:
*
* Save a rule context to disk.
@@ -687,7 +687,7 @@ e_rule_context_save (ERuleContext *context,
/**
* e_rule_context_revert:
- * @f:
+ * @context:
* @user:
*
* Reverts a rule context from a user description file. Assumes the
diff --git a/e-util/e-selection-model-array.c b/e-util/e-selection-model-array.c
index f019f8c66b..76515aa27b 100644
--- a/e-util/e-selection-model-array.c
+++ b/e-util/e-selection-model-array.c
@@ -240,15 +240,6 @@ esma_set_property (GObject *object,
}
}
-/**
- * e_selection_model_is_row_selected
- * @selection: #ESelectionModel to check
- * @n: The row to check
- *
- * This routine calculates whether the given row is selected.
- *
- * Returns: %TRUE if the given row is selected
- */
static gboolean
esma_is_row_selected (ESelectionModel *selection,
gint n)
@@ -260,15 +251,6 @@ esma_is_row_selected (ESelectionModel *selection,
return FALSE;
}
-/**
- * e_selection_model_foreach
- * @selection: #ESelectionModel to traverse
- * @callback: The callback function to call back.
- * @closure: The closure
- *
- * This routine calls the given callback function once for each
- * selected row, passing closure as the closure.
- */
static void
esma_foreach (ESelectionModel *selection,
EForeachFunc callback,
@@ -279,12 +261,6 @@ esma_foreach (ESelectionModel *selection,
e_bit_array_foreach (esma->eba, callback, closure);
}
-/**
- * e_selection_model_clear
- * @selection: #ESelectionModel to clear
- *
- * This routine clears the selection to no rows selected.
- */
static void
esma_clear (ESelectionModel *selection)
{
@@ -305,14 +281,6 @@ esma_clear (ESelectionModel *selection)
#define PART(x,n) (((x) & (0x01010101 << n)) >> n)
#define SECTION(x, n) (((x) >> (n * 8)) & 0xff)
-/**
- * e_selection_model_selected_count
- * @selection: #ESelectionModel to count
- *
- * This routine calculates the number of rows selected.
- *
- * Returns: The number of rows selected in the given model.
- */
static gint
esma_selected_count (ESelectionModel *selection)
{
@@ -323,13 +291,6 @@ esma_selected_count (ESelectionModel *selection)
return 0;
}
-/**
- * e_selection_model_select_all
- * @selection: #ESelectionModel to select all
- *
- * This routine selects all the rows in the given
- * #ESelectionModel.
- */
static void
esma_select_all (ESelectionModel *selection)
{
@@ -349,13 +310,6 @@ esma_select_all (ESelectionModel *selection)
e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), 0, 0);
}
-/**
- * e_selection_model_invert_selection
- * @selection: #ESelectionModel to invert
- *
- * This routine inverts all the rows in the given
- * #ESelectionModel.
- */
static void
esma_invert_selection (ESelectionModel *selection)
{
diff --git a/e-util/e-selection-model.c b/e-util/e-selection-model.c
index ddd2a104b7..698dcfe9fb 100644
--- a/e-util/e-selection-model.c
+++ b/e-util/e-selection-model.c
@@ -54,97 +54,89 @@ enum {
};
inline static void
-add_sorter (ESelectionModel *esm,
+add_sorter (ESelectionModel *model,
ESorter *sorter)
{
- esm->sorter = sorter;
+ model->sorter = sorter;
if (sorter) {
g_object_ref (sorter);
}
}
inline static void
-drop_sorter (ESelectionModel *esm)
+drop_sorter (ESelectionModel *model)
{
- if (esm->sorter) {
- g_object_unref (esm->sorter);
+ if (model->sorter) {
+ g_object_unref (model->sorter);
}
- esm->sorter = NULL;
+ model->sorter = NULL;
}
static void
-esm_dispose (GObject *object)
+selection_model_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- ESelectionModel *esm;
-
- esm = E_SELECTION_MODEL (object);
-
- drop_sorter (esm);
-
- /* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (e_selection_model_parent_class)->dispose (object);
-}
-
-static void
-esm_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- ESelectionModel *esm = E_SELECTION_MODEL (object);
+ ESelectionModel *model = E_SELECTION_MODEL (object);
switch (property_id) {
case PROP_SORTER:
- g_value_set_object (value, esm->sorter);
+ drop_sorter (model);
+ add_sorter (
+ model, g_value_get_object (value) ?
+ E_SORTER (g_value_get_object (value)) : NULL);
break;
case PROP_SELECTION_MODE:
- g_value_set_int (value, esm->mode);
+ model->mode = g_value_get_int (value);
+ if (model->mode == GTK_SELECTION_SINGLE) {
+ gint cursor_row = e_selection_model_cursor_row (model);
+ gint cursor_col = e_selection_model_cursor_col (model);
+ e_selection_model_do_something (model, cursor_row, cursor_col, 0);
+ }
break;
case PROP_CURSOR_MODE:
- g_value_set_int (value, esm->cursor_mode);
+ model->cursor_mode = g_value_get_int (value);
break;
}
}
static void
-esm_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+selection_model_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- ESelectionModel *esm = E_SELECTION_MODEL (object);
+ ESelectionModel *model = E_SELECTION_MODEL (object);
switch (property_id) {
case PROP_SORTER:
- drop_sorter (esm);
- add_sorter (
- esm, g_value_get_object (value) ?
- E_SORTER (g_value_get_object (value)) : NULL);
+ g_value_set_object (value, model->sorter);
break;
case PROP_SELECTION_MODE:
- esm->mode = g_value_get_int (value);
- if (esm->mode == GTK_SELECTION_SINGLE) {
- gint cursor_row = e_selection_model_cursor_row (esm);
- gint cursor_col = e_selection_model_cursor_col (esm);
- e_selection_model_do_something (esm, cursor_row, cursor_col, 0);
- }
+ g_value_set_int (value, model->mode);
break;
case PROP_CURSOR_MODE:
- esm->cursor_mode = g_value_get_int (value);
+ g_value_set_int (value, model->cursor_mode);
break;
}
}
static void
-e_selection_model_init (ESelectionModel *selection)
+selection_model_dispose (GObject *object)
{
- selection->mode = GTK_SELECTION_MULTIPLE;
- selection->cursor_mode = E_CURSOR_SIMPLE;
- selection->old_selection = -1;
+ ESelectionModel *model;
+
+ model = E_SELECTION_MODEL (object);
+
+ drop_sorter (model);
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_selection_model_parent_class)->dispose (object);
}
static void
@@ -153,9 +145,9 @@ e_selection_model_class_init (ESelectionModelClass *class)
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (class);
- object_class->dispose = esm_dispose;
- object_class->get_property = esm_get_property;
- object_class->set_property = esm_set_property;
+ object_class->set_property = selection_model_set_property;
+ object_class->get_property = selection_model_get_property;
+ object_class->dispose = selection_model_dispose;
signals[CURSOR_CHANGED] = g_signal_new (
"cursor_changed",
@@ -233,9 +225,17 @@ e_selection_model_class_init (ESelectionModelClass *class)
G_PARAM_READWRITE));
}
+static void
+e_selection_model_init (ESelectionModel *model)
+{
+ model->mode = GTK_SELECTION_MULTIPLE;
+ model->cursor_mode = E_CURSOR_SIMPLE;
+ model->old_selection = -1;
+}
+
/**
* e_selection_model_is_row_selected
- * @selection: #ESelectionModel to check
+ * @model: #ESelectionModel to check
* @n: The row to check
*
* This routine calculates whether the given row is selected.
@@ -243,22 +243,22 @@ e_selection_model_class_init (ESelectionModelClass *class)
* Returns: %TRUE if the given row is selected
*/
gboolean
-e_selection_model_is_row_selected (ESelectionModel *selection,
+e_selection_model_is_row_selected (ESelectionModel *model,
gint n)
{
ESelectionModelClass *class;
- g_return_val_if_fail (E_IS_SELECTION_MODEL (selection), FALSE);
+ g_return_val_if_fail (E_IS_SELECTION_MODEL (model), FALSE);
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_val_if_fail (class->is_row_selected != NULL, FALSE);
- return class->is_row_selected (selection, n);
+ return class->is_row_selected (model, n);
}
/**
* e_selection_model_foreach
- * @selection: #ESelectionModel to traverse
+ * @model: #ESelectionModel to traverse
* @callback: The callback function to call back.
* @closure: The closure
*
@@ -266,229 +266,229 @@ e_selection_model_is_row_selected (ESelectionModel *selection,
* selected row, passing closure as the closure.
*/
void
-e_selection_model_foreach (ESelectionModel *selection,
+e_selection_model_foreach (ESelectionModel *model,
EForeachFunc callback,
gpointer closure)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
g_return_if_fail (callback != NULL);
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->foreach != NULL);
- class->foreach (selection, callback, closure);
+ class->foreach (model, callback, closure);
}
/**
* e_selection_model_clear
- * @selection: #ESelectionModel to clear
+ * @model: #ESelectionModel to clear
*
* This routine clears the selection to no rows selected.
*/
void
-e_selection_model_clear (ESelectionModel *selection)
+e_selection_model_clear (ESelectionModel *model)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->clear != NULL);
- class->clear (selection);
+ class->clear (model);
}
/**
* e_selection_model_selected_count
- * @selection: #ESelectionModel to count
+ * @model: #ESelectionModel to count
*
* This routine calculates the number of rows selected.
*
* Returns: The number of rows selected in the given model.
*/
gint
-e_selection_model_selected_count (ESelectionModel *selection)
+e_selection_model_selected_count (ESelectionModel *model)
{
ESelectionModelClass *class;
- g_return_val_if_fail (E_IS_SELECTION_MODEL (selection), 0);
+ g_return_val_if_fail (E_IS_SELECTION_MODEL (model), 0);
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_val_if_fail (class->selected_count != NULL, 0);
- return class->selected_count (selection);
+ return class->selected_count (model);
}
/**
* e_selection_model_select_all
- * @selection: #ESelectionModel to select all
+ * @model: #ESelectionModel to select all
*
* This routine selects all the rows in the given
* #ESelectionModel.
*/
void
-e_selection_model_select_all (ESelectionModel *selection)
+e_selection_model_select_all (ESelectionModel *model)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->select_all != NULL);
- class->select_all (selection);
+ class->select_all (model);
}
/**
* e_selection_model_invert_selection
- * @selection: #ESelectionModel to invert
+ * @model: #ESelectionModel to invert
*
* This routine inverts all the rows in the given
* #ESelectionModel.
*/
void
-e_selection_model_invert_selection (ESelectionModel *selection)
+e_selection_model_invert_selection (ESelectionModel *model)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->invert_selection != NULL);
- class->invert_selection (selection);
+ class->invert_selection (model);
}
gint
-e_selection_model_row_count (ESelectionModel *selection)
+e_selection_model_row_count (ESelectionModel *model)
{
ESelectionModelClass *class;
- g_return_val_if_fail (E_IS_SELECTION_MODEL (selection), 0);
+ g_return_val_if_fail (E_IS_SELECTION_MODEL (model), 0);
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_val_if_fail (class->row_count != NULL, 0);
- return class->row_count (selection);
+ return class->row_count (model);
}
void
-e_selection_model_change_one_row (ESelectionModel *selection,
+e_selection_model_change_one_row (ESelectionModel *model,
gint row,
gboolean grow)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->change_one_row != NULL);
- return class->change_one_row (selection, row, grow);
+ return class->change_one_row (model, row, grow);
}
void
-e_selection_model_change_cursor (ESelectionModel *selection,
+e_selection_model_change_cursor (ESelectionModel *model,
gint row,
gint col)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->change_cursor != NULL);
- class->change_cursor (selection, row, col);
+ class->change_cursor (model, row, col);
}
gint
-e_selection_model_cursor_row (ESelectionModel *selection)
+e_selection_model_cursor_row (ESelectionModel *model)
{
ESelectionModelClass *class;
- g_return_val_if_fail (E_IS_SELECTION_MODEL (selection), -1);
+ g_return_val_if_fail (E_IS_SELECTION_MODEL (model), -1);
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_val_if_fail (class->cursor_row != NULL, -1);
- return class->cursor_row (selection);
+ return class->cursor_row (model);
}
gint
-e_selection_model_cursor_col (ESelectionModel *selection)
+e_selection_model_cursor_col (ESelectionModel *model)
{
ESelectionModelClass *class;
- g_return_val_if_fail (E_IS_SELECTION_MODEL (selection), -1);
+ g_return_val_if_fail (E_IS_SELECTION_MODEL (model), -1);
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_val_if_fail (class->cursor_col != NULL, -1);
- return class->cursor_col (selection);
+ return class->cursor_col (model);
}
void
-e_selection_model_select_single_row (ESelectionModel *selection,
+e_selection_model_select_single_row (ESelectionModel *model,
gint row)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->select_single_row != NULL);
- class->select_single_row (selection, row);
+ class->select_single_row (model, row);
}
void
-e_selection_model_toggle_single_row (ESelectionModel *selection,
+e_selection_model_toggle_single_row (ESelectionModel *model,
gint row)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->toggle_single_row != NULL);
- class->toggle_single_row (selection, row);
+ class->toggle_single_row (model, row);
}
void
-e_selection_model_move_selection_end (ESelectionModel *selection,
+e_selection_model_move_selection_end (ESelectionModel *model,
gint row)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->move_selection_end != NULL);
- class->move_selection_end (selection, row);
+ class->move_selection_end (model, row);
}
void
-e_selection_model_set_selection_end (ESelectionModel *selection,
+e_selection_model_set_selection_end (ESelectionModel *model,
gint row)
{
ESelectionModelClass *class;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- class = E_SELECTION_MODEL_GET_CLASS (selection);
+ class = E_SELECTION_MODEL_GET_CLASS (model);
g_return_if_fail (class->set_selection_end != NULL);
- class->set_selection_end (selection, row);
+ class->set_selection_end (model, row);
}
/**
* e_selection_model_do_something
- * @selection: #ESelectionModel to do something to.
+ * @model: #ESelectionModel to do something to.
* @row: The row to do something in.
* @col: The col to do something in.
* @state: The state in which to do something.
@@ -497,7 +497,7 @@ e_selection_model_set_selection_end (ESelectionModel *selection,
* the mouse in the given row and column.
*/
void
-e_selection_model_do_something (ESelectionModel *selection,
+e_selection_model_do_something (ESelectionModel *model,
guint row,
guint col,
GdkModifierType state)
@@ -506,30 +506,30 @@ e_selection_model_do_something (ESelectionModel *selection,
gint ctrl_p = state & GDK_CONTROL_MASK;
gint row_count;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- selection->old_selection = -1;
+ model->old_selection = -1;
if (row == -1 && col != -1)
row = 0;
if (col == -1 && row != -1)
col = 0;
- row_count = e_selection_model_row_count (selection);
+ row_count = e_selection_model_row_count (model);
if (row_count >= 0 && row < row_count) {
- switch (selection->mode) {
+ switch (model->mode) {
case GTK_SELECTION_SINGLE:
- e_selection_model_select_single_row (selection, row);
+ e_selection_model_select_single_row (model, row);
break;
case GTK_SELECTION_BROWSE:
case GTK_SELECTION_MULTIPLE:
if (shift_p) {
- e_selection_model_set_selection_end (selection, row);
+ e_selection_model_set_selection_end (model, row);
} else {
if (ctrl_p) {
- e_selection_model_toggle_single_row (selection, row);
+ e_selection_model_toggle_single_row (model, row);
} else {
- e_selection_model_select_single_row (selection, row);
+ e_selection_model_select_single_row (model, row);
}
}
break;
@@ -537,13 +537,13 @@ e_selection_model_do_something (ESelectionModel *selection,
g_return_if_reached ();
break;
}
- e_selection_model_change_cursor (selection, row, col);
+ e_selection_model_change_cursor (model, row, col);
g_signal_emit (
- selection,
+ model,
signals[CURSOR_CHANGED], 0,
row, col);
g_signal_emit (
- selection,
+ model,
signals[CURSOR_ACTIVATED], 0,
row, col);
}
@@ -551,7 +551,7 @@ e_selection_model_do_something (ESelectionModel *selection,
/**
* e_selection_model_maybe_do_something
- * @selection: #ESelectionModel to do something to.
+ * @model: #ESelectionModel to do something to.
* @row: The row to do something in.
* @col: The col to do something in.
* @state: The state in which to do something.
@@ -563,63 +563,63 @@ e_selection_model_do_something (ESelectionModel *selection,
* they don't want it to change.
*/
gboolean
-e_selection_model_maybe_do_something (ESelectionModel *selection,
+e_selection_model_maybe_do_something (ESelectionModel *model,
guint row,
guint col,
GdkModifierType state)
{
- g_return_val_if_fail (E_IS_SELECTION_MODEL (selection), FALSE);
+ g_return_val_if_fail (E_IS_SELECTION_MODEL (model), FALSE);
- selection->old_selection = -1;
+ model->old_selection = -1;
- if (e_selection_model_is_row_selected (selection, row)) {
- e_selection_model_change_cursor (selection, row, col);
+ if (e_selection_model_is_row_selected (model, row)) {
+ e_selection_model_change_cursor (model, row, col);
g_signal_emit (
- selection,
+ model,
signals[CURSOR_CHANGED], 0,
row, col);
return FALSE;
} else {
- e_selection_model_do_something (selection, row, col, state);
+ e_selection_model_do_something (model, row, col, state);
return TRUE;
}
}
void
-e_selection_model_right_click_down (ESelectionModel *selection,
+e_selection_model_right_click_down (ESelectionModel *model,
guint row,
guint col,
GdkModifierType state)
{
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- if (selection->mode == GTK_SELECTION_SINGLE) {
- selection->old_selection =
- e_selection_model_cursor_row (selection);
- e_selection_model_select_single_row (selection, row);
+ if (model->mode == GTK_SELECTION_SINGLE) {
+ model->old_selection =
+ e_selection_model_cursor_row (model);
+ e_selection_model_select_single_row (model, row);
} else {
e_selection_model_maybe_do_something (
- selection, row, col, state);
+ model, row, col, state);
}
}
void
-e_selection_model_right_click_up (ESelectionModel *selection)
+e_selection_model_right_click_up (ESelectionModel *model)
{
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- if (selection->mode != GTK_SELECTION_SINGLE)
+ if (model->mode != GTK_SELECTION_SINGLE)
return;
- if (selection->old_selection == -1)
+ if (model->old_selection == -1)
return;
e_selection_model_select_single_row (
- selection, selection->old_selection);
+ model, model->old_selection);
}
void
-e_selection_model_select_as_key_press (ESelectionModel *selection,
+e_selection_model_select_as_key_press (ESelectionModel *model,
guint row,
guint col,
GdkModifierType state)
@@ -629,53 +629,53 @@ e_selection_model_select_as_key_press (ESelectionModel *selection,
gint shift_p = state & GDK_SHIFT_MASK;
gint ctrl_p = state & GDK_CONTROL_MASK;
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- selection->old_selection = -1;
+ model->old_selection = -1;
- switch (selection->mode) {
+ switch (model->mode) {
case GTK_SELECTION_BROWSE:
case GTK_SELECTION_MULTIPLE:
if (shift_p) {
- e_selection_model_set_selection_end (selection, row);
+ e_selection_model_set_selection_end (model, row);
} else if (!ctrl_p) {
- e_selection_model_select_single_row (selection, row);
+ e_selection_model_select_single_row (model, row);
} else
cursor_activated = FALSE;
break;
case GTK_SELECTION_SINGLE:
- e_selection_model_select_single_row (selection, row);
+ e_selection_model_select_single_row (model, row);
break;
default:
g_return_if_reached ();
break;
}
if (row != -1) {
- e_selection_model_change_cursor (selection, row, col);
+ e_selection_model_change_cursor (model, row, col);
g_signal_emit (
- selection,
+ model,
signals[CURSOR_CHANGED], 0,
row, col);
if (cursor_activated)
g_signal_emit (
- selection,
+ model,
signals[CURSOR_ACTIVATED], 0,
row, col);
}
}
static gint
-move_selection (ESelectionModel *selection,
+move_selection (ESelectionModel *model,
gboolean up,
GdkModifierType state)
{
- gint row = e_selection_model_cursor_row (selection);
- gint col = e_selection_model_cursor_col (selection);
+ gint row = e_selection_model_cursor_row (model);
+ gint col = e_selection_model_cursor_col (model);
gint row_count;
/* there is no selected row when row is -1 */
if (row != -1)
- row = e_sorter_model_to_sorted (selection->sorter, row);
+ row = e_sorter_model_to_sorted (model->sorter, row);
if (up)
row--;
@@ -683,18 +683,18 @@ move_selection (ESelectionModel *selection,
row++;
if (row < 0)
row = 0;
- row_count = e_selection_model_row_count (selection);
+ row_count = e_selection_model_row_count (model);
if (row >= row_count)
row = row_count - 1;
- row = e_sorter_sorted_to_model (selection->sorter, row);
+ row = e_sorter_sorted_to_model (model->sorter, row);
- e_selection_model_select_as_key_press (selection, row, col, state);
+ e_selection_model_select_as_key_press (model, row, col, state);
return TRUE;
}
/**
* e_selection_model_key_press
- * @selection: #ESelectionModel to affect.
+ * @model: #ESelectionModel to affect.
* @key: The event.
*
* This routine does whatever is appropriate as if the user pressed
@@ -703,32 +703,32 @@ move_selection (ESelectionModel *selection,
* Returns: %TRUE if the #ESelectionModel used the key.
*/
gboolean
-e_selection_model_key_press (ESelectionModel *selection,
+e_selection_model_key_press (ESelectionModel *model,
GdkEventKey *key)
{
- g_return_val_if_fail (E_IS_SELECTION_MODEL (selection), FALSE);
+ g_return_val_if_fail (E_IS_SELECTION_MODEL (model), FALSE);
g_return_val_if_fail (key != NULL, FALSE);
- selection->old_selection = -1;
+ model->old_selection = -1;
switch (key->keyval) {
case GDK_KEY_Up:
case GDK_KEY_KP_Up:
- return move_selection (selection, TRUE, key->state);
+ return move_selection (model, TRUE, key->state);
case GDK_KEY_Down:
case GDK_KEY_KP_Down:
- return move_selection (selection, FALSE, key->state);
+ return move_selection (model, FALSE, key->state);
case GDK_KEY_space:
case GDK_KEY_KP_Space:
- if (selection->mode != GTK_SELECTION_SINGLE) {
- gint row = e_selection_model_cursor_row (selection);
- gint col = e_selection_model_cursor_col (selection);
+ if (model->mode != GTK_SELECTION_SINGLE) {
+ gint row = e_selection_model_cursor_row (model);
+ gint col = e_selection_model_cursor_col (model);
if (row == -1)
break;
- e_selection_model_toggle_single_row (selection, row);
+ e_selection_model_toggle_single_row (model, row);
g_signal_emit (
- selection,
+ model,
signals[CURSOR_ACTIVATED], 0,
row, col);
return TRUE;
@@ -736,12 +736,12 @@ e_selection_model_key_press (ESelectionModel *selection,
break;
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
- if (selection->mode != GTK_SELECTION_SINGLE) {
- gint row = e_selection_model_cursor_row (selection);
- gint col = e_selection_model_cursor_col (selection);
- e_selection_model_select_single_row (selection, row);
+ if (model->mode != GTK_SELECTION_SINGLE) {
+ gint row = e_selection_model_cursor_row (model);
+ gint col = e_selection_model_cursor_col (model);
+ e_selection_model_select_single_row (model, row);
g_signal_emit (
- selection,
+ model,
signals[CURSOR_ACTIVATED], 0,
row, col);
return TRUE;
@@ -749,25 +749,25 @@ e_selection_model_key_press (ESelectionModel *selection,
break;
case GDK_KEY_Home:
case GDK_KEY_KP_Home:
- if (selection->cursor_mode == E_CURSOR_LINE) {
+ if (model->cursor_mode == E_CURSOR_LINE) {
gint row = 0;
- gint cursor_col = e_selection_model_cursor_col (selection);
+ gint cursor_col = e_selection_model_cursor_col (model);
- row = e_sorter_sorted_to_model (selection->sorter, row);
+ row = e_sorter_sorted_to_model (model->sorter, row);
e_selection_model_select_as_key_press (
- selection, row, cursor_col, key->state);
+ model, row, cursor_col, key->state);
return TRUE;
}
break;
case GDK_KEY_End:
case GDK_KEY_KP_End:
- if (selection->cursor_mode == E_CURSOR_LINE) {
- gint row = e_selection_model_row_count (selection) - 1;
- gint cursor_col = e_selection_model_cursor_col (selection);
+ if (model->cursor_mode == E_CURSOR_LINE) {
+ gint row = e_selection_model_row_count (model) - 1;
+ gint cursor_col = e_selection_model_cursor_col (model);
- row = e_sorter_sorted_to_model (selection->sorter, row);
+ row = e_sorter_sorted_to_model (model->sorter, row);
e_selection_model_select_as_key_press (
- selection, row, cursor_col, key->state);
+ model, row, cursor_col, key->state);
return TRUE;
}
break;
@@ -776,38 +776,38 @@ e_selection_model_key_press (ESelectionModel *selection,
}
void
-e_selection_model_cursor_changed (ESelectionModel *selection,
+e_selection_model_cursor_changed (ESelectionModel *model,
gint row,
gint col)
{
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- g_signal_emit (selection, signals[CURSOR_CHANGED], 0, row, col);
+ g_signal_emit (model, signals[CURSOR_CHANGED], 0, row, col);
}
void
-e_selection_model_cursor_activated (ESelectionModel *selection,
+e_selection_model_cursor_activated (ESelectionModel *model,
gint row,
gint col)
{
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- g_signal_emit (selection, signals[CURSOR_ACTIVATED], 0, row, col);
+ g_signal_emit (model, signals[CURSOR_ACTIVATED], 0, row, col);
}
void
-e_selection_model_selection_changed (ESelectionModel *selection)
+e_selection_model_selection_changed (ESelectionModel *model)
{
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- g_signal_emit (selection, signals[SELECTION_CHANGED], 0);
+ g_signal_emit (model, signals[SELECTION_CHANGED], 0);
}
void
-e_selection_model_selection_row_changed (ESelectionModel *selection,
+e_selection_model_selection_row_changed (ESelectionModel *model,
gint row)
{
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
+ g_return_if_fail (E_IS_SELECTION_MODEL (model));
- g_signal_emit (selection, signals[SELECTION_ROW_CHANGED], 0, row);
+ g_signal_emit (model, signals[SELECTION_ROW_CHANGED], 0, row);
}
diff --git a/e-util/e-selection-model.h b/e-util/e-selection-model.h
index 5450910bbe..ccfd25b8d8 100644
--- a/e-util/e-selection-model.h
+++ b/e-util/e-selection-model.h
@@ -78,125 +78,125 @@ struct _ESelectionModelClass {
GObjectClass parent_class;
/* Virtual methods */
- gboolean (*is_row_selected) (ESelectionModel *esm,
+ gboolean (*is_row_selected) (ESelectionModel *model,
gint row);
- void (*foreach) (ESelectionModel *esm,
+ void (*foreach) (ESelectionModel *model,
EForeachFunc callback,
gpointer closure);
- void (*clear) (ESelectionModel *esm);
- gint (*selected_count) (ESelectionModel *esm);
- void (*select_all) (ESelectionModel *esm);
- void (*invert_selection) (ESelectionModel *esm);
- gint (*row_count) (ESelectionModel *esm);
+ void (*clear) (ESelectionModel *model);
+ gint (*selected_count) (ESelectionModel *model);
+ void (*select_all) (ESelectionModel *model);
+ void (*invert_selection) (ESelectionModel *model);
+ gint (*row_count) (ESelectionModel *model);
/* Protected virtual methods. */
- void (*change_one_row) (ESelectionModel *esm,
+ void (*change_one_row) (ESelectionModel *model,
gint row,
gboolean on);
- void (*change_cursor) (ESelectionModel *esm,
+ void (*change_cursor) (ESelectionModel *model,
gint row,
gint col);
- gint (*cursor_row) (ESelectionModel *esm);
- gint (*cursor_col) (ESelectionModel *esm);
+ gint (*cursor_row) (ESelectionModel *model);
+ gint (*cursor_col) (ESelectionModel *model);
- void (*select_single_row) (ESelectionModel *selection,
+ void (*select_single_row) (ESelectionModel *model,
gint row);
- void (*toggle_single_row) (ESelectionModel *selection,
+ void (*toggle_single_row) (ESelectionModel *model,
gint row);
- void (*move_selection_end) (ESelectionModel *selection,
+ void (*move_selection_end) (ESelectionModel *model,
gint row);
- void (*set_selection_end) (ESelectionModel *selection,
+ void (*set_selection_end) (ESelectionModel *model,
gint row);
/* Signals */
- void (*cursor_changed) (ESelectionModel *esm,
+ void (*cursor_changed) (ESelectionModel *model,
gint row,
gint col);
- void (*cursor_activated) (ESelectionModel *esm,
+ void (*cursor_activated) (ESelectionModel *model,
gint row,
gint col);
- void (*selection_row_changed)(ESelectionModel *esm,
+ void (*selection_row_changed)(ESelectionModel *model,
gint row);
- void (*selection_changed) (ESelectionModel *esm);
+ void (*selection_changed) (ESelectionModel *model);
};
GType e_selection_model_get_type (void) G_GNUC_CONST;
-void e_selection_model_do_something (ESelectionModel *esm,
+void e_selection_model_do_something (ESelectionModel *model,
guint row,
guint col,
GdkModifierType state);
gboolean e_selection_model_maybe_do_something
- (ESelectionModel *esm,
+ (ESelectionModel *model,
guint row,
guint col,
GdkModifierType state);
void e_selection_model_right_click_down
- (ESelectionModel *selection,
+ (ESelectionModel *model,
guint row,
guint col,
GdkModifierType state);
void e_selection_model_right_click_up
- (ESelectionModel *selection);
-gboolean e_selection_model_key_press (ESelectionModel *esm,
+ (ESelectionModel *model);
+gboolean e_selection_model_key_press (ESelectionModel *model,
GdkEventKey *key);
void e_selection_model_select_as_key_press
- (ESelectionModel *esm,
+ (ESelectionModel *model,
guint row,
guint col,
GdkModifierType state);
/* Virtual functions */
gboolean e_selection_model_is_row_selected
- (ESelectionModel *esm,
+ (ESelectionModel *model,
gint n);
-void e_selection_model_foreach (ESelectionModel *esm,
+void e_selection_model_foreach (ESelectionModel *model,
EForeachFunc callback,
gpointer closure);
-void e_selection_model_clear (ESelectionModel *esm);
+void e_selection_model_clear (ESelectionModel *model);
gint e_selection_model_selected_count
- (ESelectionModel *esm);
-void e_selection_model_select_all (ESelectionModel *esm);
+ (ESelectionModel *model);
+void e_selection_model_select_all (ESelectionModel *model);
void e_selection_model_invert_selection
- (ESelectionModel *esm);
-gint e_selection_model_row_count (ESelectionModel *esm);
+ (ESelectionModel *model);
+gint e_selection_model_row_count (ESelectionModel *model);
/* Private virtual Functions */
void e_selection_model_change_one_row
- (ESelectionModel *esm,
+ (ESelectionModel *model,
gint row,
gboolean on);
-void e_selection_model_change_cursor (ESelectionModel *esm,
+void e_selection_model_change_cursor (ESelectionModel *model,
gint row,
gint col);
-gint e_selection_model_cursor_row (ESelectionModel *esm);
-gint e_selection_model_cursor_col (ESelectionModel *esm);
+gint e_selection_model_cursor_row (ESelectionModel *model);
+gint e_selection_model_cursor_col (ESelectionModel *model);
void e_selection_model_select_single_row
- (ESelectionModel *selection,
+ (ESelectionModel *model,
gint row);
void e_selection_model_toggle_single_row
- (ESelectionModel *selection,
+ (ESelectionModel *model,
gint row);
void e_selection_model_move_selection_end
- (ESelectionModel *selection,
+ (ESelectionModel *model,
gint row);
void e_selection_model_set_selection_end
- (ESelectionModel *selection,
+ (ESelectionModel *model,
gint row);
/* Signals */
void e_selection_model_cursor_changed
- (ESelectionModel *selection,
+ (ESelectionModel *model,
gint row,
gint col);
void e_selection_model_cursor_activated
- (ESelectionModel *selection,
+ (ESelectionModel *model,
gint row,
gint col);
void e_selection_model_selection_row_changed
- (ESelectionModel *selection,
+ (ESelectionModel *model,
gint row);
void e_selection_model_selection_changed
- (ESelectionModel *selection);
+ (ESelectionModel *model);
G_END_DECLS
diff --git a/e-util/e-table-group.c b/e-util/e-table-group.c
index b119b06982..b5671d90f8 100644
--- a/e-util/e-table-group.c
+++ b/e-util/e-table-group.c
@@ -51,26 +51,26 @@ enum {
static guint etg_signals[LAST_SIGNAL] = { 0, };
-static gboolean etg_get_focus (ETableGroup *etg);
+static gboolean etg_get_focus (ETableGroup *table_group);
static void
etg_dispose (GObject *object)
{
- ETableGroup *etg = E_TABLE_GROUP (object);
+ ETableGroup *table_group = E_TABLE_GROUP (object);
- if (etg->header) {
- g_object_unref (etg->header);
- etg->header = NULL;
+ if (table_group->header) {
+ g_object_unref (table_group->header);
+ table_group->header = NULL;
}
- if (etg->full_header) {
- g_object_unref (etg->full_header);
- etg->full_header = NULL;
+ if (table_group->full_header) {
+ g_object_unref (table_group->full_header);
+ table_group->full_header = NULL;
}
- if (etg->model) {
- g_object_unref (etg->model);
- etg->model = NULL;
+ if (table_group->model) {
+ g_object_unref (table_group->model);
+ table_group->model = NULL;
}
/* Chain up to parent's dispose() method. */
@@ -80,20 +80,20 @@ etg_dispose (GObject *object)
/**
* e_table_group_new
* @parent: The %GnomeCanvasGroup to create a child of.
- * @full_header: The full header of the %ETable.
- * @header: The current header of the %ETable.
- * @model: The %ETableModel of the %ETable.
- * @sort_info: The %ETableSortInfo of the %ETable.
+ * @full_header: The full header of the #ETable.
+ * @header: The current header of the #ETable.
+ * @model: The #ETableModel of the #ETable.
+ * @sort_info: The #ETableSortInfo of the #ETable.
* @n: The grouping information object to group by.
*
- * %ETableGroup is a collection of rows of an %ETable. It's a
+ * #ETableGroup is a collection of rows of an #ETable. It's a
* %GnomeCanvasItem. There are two different forms. If n < the
- * number of groupings in the given %ETableSortInfo, then the
- * %ETableGroup will need to contain other %ETableGroups, thus it
- * creates an %ETableGroupContainer. Otherwise, it will just contain
- * an %ETableItem, and thus it creates an %ETableGroupLeaf.
+ * number of groupings in the given #ETableSortInfo, then the
+ * #ETableGroup will need to contain other #ETableGroups, thus it
+ * creates an #ETableGroupContainer. Otherwise, it will just contain
+ * an #ETableItem, and thus it creates an #ETableGroupLeaf.
*
- * Returns: The new %ETableGroup.
+ * Returns: The new #ETableGroup.
*/
ETableGroup *
e_table_group_new (GnomeCanvasGroup *parent,
@@ -117,51 +117,47 @@ e_table_group_new (GnomeCanvasGroup *parent,
/**
* e_table_group_construct
* @parent: The %GnomeCanvasGroup to create a child of.
- * @etg: The %ETableGroup to construct.
- * @full_header: The full header of the %ETable.
- * @header: The current header of the %ETable.
- * @model: The %ETableModel of the %ETable.
+ * @table_group: The #ETableGroup to construct.
+ * @full_header: The full header of the #ETable.
+ * @header: The current header of the #ETable.
+ * @model: The #ETableModel of the #ETable.
*
- * This routine does the base construction of the %ETableGroup.
+ * This routine does the base construction of the #ETableGroup.
*/
void
e_table_group_construct (GnomeCanvasGroup *parent,
- ETableGroup *etg,
+ ETableGroup *table_group,
ETableHeader *full_header,
ETableHeader *header,
ETableModel *model)
{
- etg->full_header = full_header;
- g_object_ref (etg->full_header);
- etg->header = header;
- g_object_ref (etg->header);
- etg->model = model;
- g_object_ref (etg->model);
- g_object_set (etg, "parent", parent, NULL);
+ table_group->full_header = g_object_ref (full_header);
+ table_group->header = g_object_ref (header);
+ table_group->model = g_object_ref (model);
+ g_object_set (table_group, "parent", parent, NULL);
}
/**
* e_table_group_add
- * @etg: The %ETableGroup to add a row to
+ * @table_group: The #ETableGroup to add a row to
* @row: The row to add.
*
- * This routine adds the given row from the %ETableModel to this set
+ * This routine adds the given row from the #ETableModel to this set
* of rows.
*/
void
-e_table_group_add (ETableGroup *etg,
+e_table_group_add (ETableGroup *table_group,
gint row)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->add != NULL);
- ETG_CLASS (etg)->add (etg, row);
+ g_return_if_fail (ETG_CLASS (table_group)->add != NULL);
+ ETG_CLASS (table_group)->add (table_group, row);
}
/**
* e_table_group_add_array
- * @etg: The %ETableGroup to add to
+ * @table_group: The #ETableGroup to add to
* @array: The array to add.
* @count: The number of times to add
*
@@ -169,59 +165,56 @@ e_table_group_add (ETableGroup *etg,
* It assumes that the array is already sorted properly.
*/
void
-e_table_group_add_array (ETableGroup *etg,
+e_table_group_add_array (ETableGroup *table_group,
const gint *array,
gint count)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->add_array != NULL);
- ETG_CLASS (etg)->add_array (etg, array, count);
+ g_return_if_fail (ETG_CLASS (table_group)->add_array != NULL);
+ ETG_CLASS (table_group)->add_array (table_group, array, count);
}
/**
* e_table_group_add_all
- * @etg: The %ETableGroup to add to
+ * @table_group: The #ETableGroup to add to
*
- * This routine adds all the rows from the %ETableModel to this set
+ * This routine adds all the rows from the #ETableModel to this set
* of rows.
*/
void
-e_table_group_add_all (ETableGroup *etg)
+e_table_group_add_all (ETableGroup *table_group)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->add_all != NULL);
- ETG_CLASS (etg)->add_all (etg);
+ g_return_if_fail (ETG_CLASS (table_group)->add_all != NULL);
+ ETG_CLASS (table_group)->add_all (table_group);
}
/**
* e_table_group_remove
- * @etg: The %ETableGroup to remove a row from
+ * @table_group: The #ETableGroup to remove a row from
* @row: The row to remove.
*
- * This routine removes the given row from the %ETableModel from this
+ * This routine removes the given row from the #ETableModel from this
* set of rows.
*
* Returns: TRUE if the row was deleted and FALSE if the row was not
* found.
*/
gboolean
-e_table_group_remove (ETableGroup *etg,
+e_table_group_remove (ETableGroup *table_group,
gint row)
{
- g_return_val_if_fail (etg != NULL, FALSE);
- g_return_val_if_fail (E_IS_TABLE_GROUP (etg), FALSE);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (table_group), FALSE);
- g_return_val_if_fail (ETG_CLASS (etg)->remove != NULL, FALSE);
- return ETG_CLASS (etg)->remove (etg, row);
+ g_return_val_if_fail (ETG_CLASS (table_group)->remove != NULL, FALSE);
+ return ETG_CLASS (table_group)->remove (table_group, row);
}
/**
* e_table_group_increment
- * @etg: The %ETableGroup to increment
+ * @table_group: The #ETableGroup to increment
* @position: The position to increment from
* @amount: The amount to increment.
*
@@ -230,20 +223,19 @@ e_table_group_remove (ETableGroup *etg,
* model.
*/
void
-e_table_group_increment (ETableGroup *etg,
+e_table_group_increment (ETableGroup *table_group,
gint position,
gint amount)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->increment != NULL);
- ETG_CLASS (etg)->increment (etg, position, amount);
+ g_return_if_fail (ETG_CLASS (table_group)->increment != NULL);
+ ETG_CLASS (table_group)->increment (table_group, position, amount);
}
/**
* e_table_group_increment
- * @etg: The %ETableGroup to decrement
+ * @table_group: The #ETableGroup to decrement
* @position: The position to decrement from
* @amount: The amount to decrement
*
@@ -252,38 +244,36 @@ e_table_group_increment (ETableGroup *etg,
* model.
*/
void
-e_table_group_decrement (ETableGroup *etg,
+e_table_group_decrement (ETableGroup *table_group,
gint position,
gint amount)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->decrement != NULL);
- ETG_CLASS (etg)->decrement (etg, position, amount);
+ g_return_if_fail (ETG_CLASS (table_group)->decrement != NULL);
+ ETG_CLASS (table_group)->decrement (table_group, position, amount);
}
/**
* e_table_group_increment
- * @etg: The %ETableGroup to count
+ * @table_group: The #ETableGroup to count
*
* This routine calculates the number of rows shown in this group.
*
* Returns: The number of rows.
*/
gint
-e_table_group_row_count (ETableGroup *etg)
+e_table_group_row_count (ETableGroup *table_group)
{
- g_return_val_if_fail (etg != NULL, 0);
- g_return_val_if_fail (E_IS_TABLE_GROUP (etg), -1);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (table_group), -1);
- g_return_val_if_fail (ETG_CLASS (etg)->row_count != NULL, -1);
- return ETG_CLASS (etg)->row_count (etg);
+ g_return_val_if_fail (ETG_CLASS (table_group)->row_count != NULL, -1);
+ return ETG_CLASS (table_group)->row_count (table_group);
}
/**
* e_table_group_set_focus
- * @etg: The %ETableGroup to set
+ * @table_group: The #ETableGroup to set
* @direction: The direction the focus is coming from.
* @view_col: The column to set the focus in.
*
@@ -291,115 +281,109 @@ e_table_group_row_count (ETableGroup *etg)
* coming from direction direction.
*/
void
-e_table_group_set_focus (ETableGroup *etg,
+e_table_group_set_focus (ETableGroup *table_group,
EFocus direction,
gint view_col)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->set_focus != NULL);
- ETG_CLASS (etg)->set_focus (etg, direction, view_col);
+ g_return_if_fail (ETG_CLASS (table_group)->set_focus != NULL);
+ ETG_CLASS (table_group)->set_focus (table_group, direction, view_col);
}
/**
* e_table_group_get_focus
- * @etg: The %ETableGroup to check
+ * @table_group: The #ETableGroup to check
*
* Calculates if this group has the focus.
*
* Returns: TRUE if this group has the focus.
*/
gboolean
-e_table_group_get_focus (ETableGroup *etg)
+e_table_group_get_focus (ETableGroup *table_group)
{
- g_return_val_if_fail (etg != NULL, FALSE);
- g_return_val_if_fail (E_IS_TABLE_GROUP (etg), FALSE);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (table_group), FALSE);
- g_return_val_if_fail (ETG_CLASS (etg)->get_focus != NULL, FALSE);
- return ETG_CLASS (etg)->get_focus (etg);
+ g_return_val_if_fail (ETG_CLASS (table_group)->get_focus != NULL, FALSE);
+ return ETG_CLASS (table_group)->get_focus (table_group);
}
/**
* e_table_group_get_focus_column
- * @etg: The %ETableGroup to check
+ * @table_group: The #ETableGroup to check
*
* Calculates which column in this group has the focus.
*
* Returns: The column index (view column).
*/
gint
-e_table_group_get_focus_column (ETableGroup *etg)
+e_table_group_get_focus_column (ETableGroup *table_group)
{
- g_return_val_if_fail (etg != NULL, -1);
- g_return_val_if_fail (E_IS_TABLE_GROUP (etg), -1);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (table_group), -1);
- g_return_val_if_fail (ETG_CLASS (etg)->get_focus_column != NULL, -1);
- return ETG_CLASS (etg)->get_focus_column (etg);
+ g_return_val_if_fail (ETG_CLASS (table_group)->get_focus_column != NULL, -1);
+ return ETG_CLASS (table_group)->get_focus_column (table_group);
}
/**
* e_table_group_get_printable
- * @etg: %ETableGroup which will be printed
+ * @table_group: #ETableGroup which will be printed
*
* This routine creates and returns an %EPrintable that can be used to
- * print the given %ETableGroup.
+ * print the given #ETableGroup.
*
* Returns: The %EPrintable.
*/
EPrintable *
-e_table_group_get_printable (ETableGroup *etg)
+e_table_group_get_printable (ETableGroup *table_group)
{
- g_return_val_if_fail (etg != NULL, NULL);
- g_return_val_if_fail (E_IS_TABLE_GROUP (etg), NULL);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (table_group), NULL);
- g_return_val_if_fail (ETG_CLASS (etg)->get_printable != NULL, NULL);
- return ETG_CLASS (etg)->get_printable (etg);
+ g_return_val_if_fail (ETG_CLASS (table_group)->get_printable != NULL, NULL);
+ return ETG_CLASS (table_group)->get_printable (table_group);
}
/**
* e_table_group_compute_location
- * @eti: %ETableGroup to look in.
- * @x: A pointer to the x location to find in the %ETableGroup.
- * @y: A pointer to the y location to find in the %ETableGroup.
+ * @table_group: #ETableGroup to look in.
+ * @x: A pointer to the x location to find in the #ETableGroup.
+ * @y: A pointer to the y location to find in the #ETableGroup.
* @row: A pointer to the location to store the found row in.
* @col: A pointer to the location to store the found col in.
*
* This routine locates the pixel location (*x, *y) in the
- * %ETableGroup. If that location is in the %ETableGroup, *row and
+ * #ETableGroup. If that location is in the #ETableGroup, *row and
* *col are set to the view row and column where it was found. If
- * that location is not in the %ETableGroup, the height of the
- * %ETableGroup is removed from the value y points to.
+ * that location is not in the #ETableGroup, the height of the
+ * #ETableGroup is removed from the value y points to.
*/
void
-e_table_group_compute_location (ETableGroup *etg,
+e_table_group_compute_location (ETableGroup *table_group,
gint *x,
gint *y,
gint *row,
gint *col)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->compute_location != NULL);
- ETG_CLASS (etg)->compute_location (etg, x, y, row, col);
+ g_return_if_fail (ETG_CLASS (table_group)->compute_location != NULL);
+ ETG_CLASS (table_group)->compute_location (table_group, x, y, row, col);
}
void
-e_table_group_get_mouse_over (ETableGroup *etg,
+e_table_group_get_mouse_over (ETableGroup *table_group,
gint *row,
gint *col)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->get_mouse_over != NULL);
- ETG_CLASS (etg)->get_mouse_over (etg, row, col);
+ g_return_if_fail (ETG_CLASS (table_group)->get_mouse_over != NULL);
+ ETG_CLASS (table_group)->get_mouse_over (table_group, row, col);
}
/**
* e_table_group_get_position
- * @eti: %ETableGroup to look in.
+ * @table_group: #ETableGroup to look in.
* @x: A pointer to the location to store the found x location in.
* @y: A pointer to the location to store the found y location in.
* @row: A pointer to the row number to find.
@@ -412,7 +396,7 @@ e_table_group_get_mouse_over (ETableGroup *etg,
* removed from the value row points to.
*/
void
-e_table_group_get_cell_geometry (ETableGroup *etg,
+e_table_group_get_cell_geometry (ETableGroup *table_group,
gint *row,
gint *col,
gint *x,
@@ -420,16 +404,15 @@ e_table_group_get_cell_geometry (ETableGroup *etg,
gint *width,
gint *height)
{
- g_return_if_fail (etg != NULL);
- g_return_if_fail (E_IS_TABLE_GROUP (etg));
+ g_return_if_fail (E_IS_TABLE_GROUP (table_group));
- g_return_if_fail (ETG_CLASS (etg)->get_cell_geometry != NULL);
- ETG_CLASS (etg)->get_cell_geometry (etg, row, col, x, y, width, height);
+ g_return_if_fail (ETG_CLASS (table_group)->get_cell_geometry != NULL);
+ ETG_CLASS (table_group)->get_cell_geometry (table_group, row, col, x, y, width, height);
}
/**
* e_table_group_cursor_change
- * @eti: %ETableGroup to emit the signal on
+ * @table_group: #ETableGroup to emit the signal on
* @row: The new cursor row (model row)
*
* This routine emits the "cursor_change" signal.
@@ -449,7 +432,7 @@ e_table_group_cursor_change (ETableGroup *e_table_group,
/**
* e_table_group_cursor_activated
- * @eti: %ETableGroup to emit the signal on
+ * @table_group: #ETableGroup to emit the signal on
* @row: The cursor row (model row)
*
* This routine emits the "cursor_activated" signal.
@@ -469,7 +452,7 @@ e_table_group_cursor_activated (ETableGroup *e_table_group,
/**
* e_table_group_double_click
- * @eti: %ETableGroup to emit the signal on
+ * @table_group: #ETableGroup to emit the signal on
* @row: The row clicked on (model row)
* @col: The col clicked on (model col)
* @event: The event that caused this signal
@@ -493,7 +476,7 @@ e_table_group_double_click (ETableGroup *e_table_group,
/**
* e_table_group_right_click
- * @eti: %ETableGroup to emit the signal on
+ * @table_group: #ETableGroup to emit the signal on
* @row: The row clicked on (model row)
* @col: The col clicked on (model col)
* @event: The event that caused this signal
@@ -521,7 +504,7 @@ e_table_group_right_click (ETableGroup *e_table_group,
/**
* e_table_group_click
- * @eti: %ETableGroup to emit the signal on
+ * @table_group: #ETableGroup to emit the signal on
* @row: The row clicked on (model row)
* @col: The col clicked on (model col)
* @event: The event that caused this signal
@@ -529,18 +512,17 @@ e_table_group_right_click (ETableGroup *e_table_group,
* This routine emits the "click" signal.
*/
gboolean
-e_table_group_click (ETableGroup *e_table_group,
+e_table_group_click (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event)
{
gboolean return_val = FALSE;
- g_return_val_if_fail (e_table_group != NULL, FALSE);
- g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (table_group), FALSE);
g_signal_emit (
- e_table_group,
+ table_group,
etg_signals[CLICK], 0,
row, col, event, &return_val);
@@ -549,7 +531,7 @@ e_table_group_click (ETableGroup *e_table_group,
/**
* e_table_group_key_press
- * @eti: %ETableGroup to emit the signal on
+ * @table_group: #ETableGroup to emit the signal on
* @row: The cursor row (model row)
* @col: The cursor col (model col)
* @event: The event that caused this signal
@@ -577,7 +559,7 @@ e_table_group_key_press (ETableGroup *e_table_group,
/**
* e_table_group_start_drag
- * @eti: %ETableGroup to emit the signal on
+ * @table_group: #ETableGroup to emit the signal on
* @row: The cursor row (model row)
* @col: The cursor col (model col)
* @event: The event that caused this signal
@@ -605,32 +587,31 @@ e_table_group_start_drag (ETableGroup *e_table_group,
/**
* e_table_group_get_header
- * @eti: %ETableGroup to check
+ * @table_group: #ETableGroup to check
*
- * This routine returns the %ETableGroup's header.
+ * This routine returns the #ETableGroup's header.
*
- * Returns: The %ETableHeader.
+ * Returns: The #ETableHeader.
*/
ETableHeader *
-e_table_group_get_header (ETableGroup *etg)
+e_table_group_get_header (ETableGroup *table_group)
{
- g_return_val_if_fail (etg != NULL, NULL);
- g_return_val_if_fail (E_IS_TABLE_GROUP (etg), NULL);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (table_group), NULL);
- return etg->header;
+ return table_group->header;
}
static gint
etg_event (GnomeCanvasItem *item,
GdkEvent *event)
{
- ETableGroup *etg = E_TABLE_GROUP (item);
+ ETableGroup *table_group = E_TABLE_GROUP (item);
gboolean return_val = TRUE;
switch (event->type) {
case GDK_FOCUS_CHANGE:
- etg->has_focus = event->focus_change.in;
+ table_group->has_focus = event->focus_change.in;
return_val = FALSE;
break;
@@ -646,9 +627,9 @@ etg_event (GnomeCanvasItem *item,
}
static gboolean
-etg_get_focus (ETableGroup *etg)
+etg_get_focus (ETableGroup *table_group)
{
- return etg->has_focus;
+ return table_group->has_focus;
}
static void
@@ -765,7 +746,7 @@ etg_class_init (ETableGroupClass *class)
}
static void
-etg_init (ETableGroup *etg)
+etg_init (ETableGroup *table_group)
{
/* nothing to do */
}
diff --git a/e-util/e-table-group.h b/e-util/e-table-group.h
index 7e9e905753..985450074b 100644
--- a/e-util/e-table-group.h
+++ b/e-util/e-table-group.h
@@ -90,62 +90,62 @@ struct _ETableGroupClass {
GnomeCanvasGroupClass parent_class;
/* Signals */
- void (*cursor_change) (ETableGroup *etg,
+ void (*cursor_change) (ETableGroup *table_group,
gint row);
- void (*cursor_activated) (ETableGroup *etg,
+ void (*cursor_activated) (ETableGroup *table_group,
gint row);
- void (*double_click) (ETableGroup *etg,
+ void (*double_click) (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
- gboolean (*right_click) (ETableGroup *etg,
+ gboolean (*right_click) (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
- gboolean (*click) (ETableGroup *etg,
+ gboolean (*click) (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
- gboolean (*key_press) (ETableGroup *etg,
+ gboolean (*key_press) (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
- gint (*start_drag) (ETableGroup *etg,
+ gint (*start_drag) (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
/* Virtual functions. */
- void (*add) (ETableGroup *etg,
+ void (*add) (ETableGroup *table_group,
gint row);
- void (*add_array) (ETableGroup *etg,
+ void (*add_array) (ETableGroup *table_group,
const gint *array,
gint count);
- void (*add_all) (ETableGroup *etg);
- gboolean (*remove) (ETableGroup *etg,
+ void (*add_all) (ETableGroup *table_group);
+ gboolean (*remove) (ETableGroup *table_group,
gint row);
- gint (*row_count) (ETableGroup *etg);
- void (*increment) (ETableGroup *etg,
+ gint (*row_count) (ETableGroup *table_group);
+ void (*increment) (ETableGroup *table_group,
gint position,
gint amount);
- void (*decrement) (ETableGroup *etg,
+ void (*decrement) (ETableGroup *table_group,
gint position,
gint amount);
- void (*set_focus) (ETableGroup *etg,
+ void (*set_focus) (ETableGroup *table_group,
EFocus direction,
gint view_col);
- gboolean (*get_focus) (ETableGroup *etg);
- gint (*get_focus_column) (ETableGroup *etg);
- EPrintable * (*get_printable) (ETableGroup *etg);
- void (*compute_location) (ETableGroup *etg,
+ gboolean (*get_focus) (ETableGroup *table_group);
+ gint (*get_focus_column) (ETableGroup *table_group);
+ EPrintable * (*get_printable) (ETableGroup *table_group);
+ void (*compute_location) (ETableGroup *table_group,
gint *x,
gint *y,
gint *row,
gint *col);
- void (*get_mouse_over) (ETableGroup *etg,
+ void (*get_mouse_over) (ETableGroup *table_group,
gint *row,
gint *col);
- void (*get_cell_geometry) (ETableGroup *etg,
+ void (*get_cell_geometry) (ETableGroup *table_group,
gint *row,
gint *col,
gint *x,
@@ -162,43 +162,43 @@ ETableGroup * e_table_group_new (GnomeCanvasGroup *parent,
ETableSortInfo *sort_info,
gint n);
void e_table_group_construct (GnomeCanvasGroup *parent,
- ETableGroup *etg,
+ ETableGroup *table_group,
ETableHeader *full_header,
ETableHeader *header,
ETableModel *model);
/* Virtual functions */
-void e_table_group_add (ETableGroup *etg,
+void e_table_group_add (ETableGroup *table_group,
gint row);
-void e_table_group_add_array (ETableGroup *etg,
+void e_table_group_add_array (ETableGroup *table_group,
const gint *array,
gint count);
-void e_table_group_add_all (ETableGroup *etg);
-gboolean e_table_group_remove (ETableGroup *etg,
+void e_table_group_add_all (ETableGroup *table_group);
+gboolean e_table_group_remove (ETableGroup *table_group,
gint row);
-void e_table_group_increment (ETableGroup *etg,
+void e_table_group_increment (ETableGroup *table_group,
gint position,
gint amount);
-void e_table_group_decrement (ETableGroup *etg,
+void e_table_group_decrement (ETableGroup *table_group,
gint position,
gint amount);
-gint e_table_group_row_count (ETableGroup *etg);
-void e_table_group_set_focus (ETableGroup *etg,
+gint e_table_group_row_count (ETableGroup *table_group);
+void e_table_group_set_focus (ETableGroup *table_group,
EFocus direction,
gint view_col);
-gboolean e_table_group_get_focus (ETableGroup *etg);
-gint e_table_group_get_focus_column (ETableGroup *etg);
-ETableHeader * e_table_group_get_header (ETableGroup *etg);
-EPrintable * e_table_group_get_printable (ETableGroup *etg);
-void e_table_group_compute_location (ETableGroup *etg,
+gboolean e_table_group_get_focus (ETableGroup *table_group);
+gint e_table_group_get_focus_column (ETableGroup *table_group);
+ETableHeader * e_table_group_get_header (ETableGroup *table_group);
+EPrintable * e_table_group_get_printable (ETableGroup *table_group);
+void e_table_group_compute_location (ETableGroup *table_group,
gint *x,
gint *y,
gint *row,
gint *col);
-void e_table_group_get_mouse_over (ETableGroup *etg,
+void e_table_group_get_mouse_over (ETableGroup *table_group,
gint *row,
gint *col);
-void e_table_group_get_cell_geometry (ETableGroup *etg,
+void e_table_group_get_cell_geometry (ETableGroup *table_group,
gint *row,
gint *col,
gint *x,
@@ -207,33 +207,33 @@ void e_table_group_get_cell_geometry (ETableGroup *etg,
gint *height);
/* For emitting the signals */
-void e_table_group_cursor_change (ETableGroup *etg,
+void e_table_group_cursor_change (ETableGroup *table_group,
gint row);
-void e_table_group_cursor_activated (ETableGroup *etg,
+void e_table_group_cursor_activated (ETableGroup *table_group,
gint row);
-void e_table_group_double_click (ETableGroup *etg,
+void e_table_group_double_click (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
-gboolean e_table_group_right_click (ETableGroup *etg,
+gboolean e_table_group_right_click (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
-gboolean e_table_group_click (ETableGroup *etg,
+gboolean e_table_group_click (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
-gboolean e_table_group_key_press (ETableGroup *etg,
+gboolean e_table_group_key_press (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
-gint e_table_group_start_drag (ETableGroup *etg,
+gint e_table_group_start_drag (ETableGroup *table_group,
gint row,
gint col,
GdkEvent *event);
typedef void (*ETableGroupLeafFn) (gpointer e_table_item, gpointer closure);
-void e_table_group_apply_to_leafs (ETableGroup *etg,
+void e_table_group_apply_to_leafs (ETableGroup *table_group,
ETableGroupLeafFn fn,
gpointer closure);
diff --git a/e-util/e-table-header-utils.c b/e-util/e-table-header-utils.c
index d3ee1aca38..66efb01d30 100644
--- a/e-util/e-table-header-utils.c
+++ b/e-util/e-table-header-utils.c
@@ -103,7 +103,7 @@ e_table_header_width_extras (GtkWidget *widget)
/**
* e_table_header_draw_button:
- * @drawable: Destination drawable.
+ * @cr: a cairo context
* @ecol: Table column for the header information.
* @widget: The table widget.
* @x: Leftmost coordinate of the button.
diff --git a/e-util/e-table-memory-store.c b/e-util/e-table-memory-store.c
index 066d319122..6a28aaeeea 100644
--- a/e-util/e-table-memory-store.c
+++ b/e-util/e-table-memory-store.c
@@ -295,16 +295,7 @@ e_table_memory_store_class_init (ETableMemoryStoreClass *class)
/**
* e_table_memory_store_new:
- * @col_count:
- * @value_at:
- * @set_value_at:
- * @is_cell_editable:
- * @duplicate_value:
- * @free_value:
- * @initialize_value:
- * @value_is_empty:
- * @value_to_string:
- * @data: closure pointer.
+ * @columns:
*
* This initializes a new ETableMemoryStoreModel object. ETableMemoryStoreModel is
* an implementaiton of the abstract class ETableModel. The ETableMemoryStoreModel
diff --git a/e-util/e-table-memory.c b/e-util/e-table-memory.c
index b9a7eb94e7..e12deb3007 100644
--- a/e-util/e-table-memory.c
+++ b/e-util/e-table-memory.c
@@ -50,7 +50,7 @@ struct _ETableMemoryPrivate {
};
static void
-etmm_finalize (GObject *object)
+table_memory_finalize (GObject *object)
{
ETableMemoryPrivate *priv;
@@ -63,11 +63,11 @@ etmm_finalize (GObject *object)
}
static gint
-etmm_row_count (ETableModel *etm)
+table_memory_row_count (ETableModel *etm)
{
- ETableMemory *etmm = E_TABLE_MEMORY (etm);
+ ETableMemory *table_memory = E_TABLE_MEMORY (etm);
- return etmm->priv->num_rows;
+ return table_memory->priv->num_rows;
}
static void
@@ -79,16 +79,16 @@ e_table_memory_class_init (ETableMemoryClass *class)
g_type_class_add_private (class, sizeof (ETableMemoryPrivate));
object_class = G_OBJECT_CLASS (class);
- object_class->finalize = etmm_finalize;
+ object_class->finalize = table_memory_finalize;
table_model_class = E_TABLE_MODEL_CLASS (class);
- table_model_class->row_count = etmm_row_count;
+ table_model_class->row_count = table_memory_row_count;
}
static void
-e_table_memory_init (ETableMemory *etmm)
+e_table_memory_init (ETableMemory *table_memory)
{
- etmm->priv = E_TABLE_MEMORY_GET_PRIVATE (etmm);
+ table_memory->priv = E_TABLE_MEMORY_GET_PRIVATE (table_memory);
}
/**
@@ -106,132 +106,119 @@ e_table_memory_new (void)
/**
* e_table_memory_get_data:
- * @etmm:
+ * @table_memory:
* @row:
*
- *
- *
* Return value:
**/
gpointer
-e_table_memory_get_data (ETableMemory *etmm,
+e_table_memory_get_data (ETableMemory *table_memory,
gint row)
{
g_return_val_if_fail (row >= 0, NULL);
- g_return_val_if_fail (row < etmm->priv->num_rows, NULL);
+ g_return_val_if_fail (row < table_memory->priv->num_rows, NULL);
- return etmm->priv->data[row];
+ return table_memory->priv->data[row];
}
/**
* e_table_memory_set_data:
- * @etmm:
+ * @table_memory:
* @row:
* @data:
*
- *
**/
void
-e_table_memory_set_data (ETableMemory *etmm,
+e_table_memory_set_data (ETableMemory *table_memory,
gint row,
gpointer data)
{
g_return_if_fail (row >= 0);
- g_return_if_fail (row < etmm->priv->num_rows);
+ g_return_if_fail (row < table_memory->priv->num_rows);
- etmm->priv->data[row] = data;
+ table_memory->priv->data[row] = data;
}
/**
* e_table_memory_insert:
- * @table_model:
- * @parent_path:
- * @position:
+ * @table_memory:
+ * @row:
* @data:
*
- *
- *
* Return value:
**/
void
-e_table_memory_insert (ETableMemory *etmm,
+e_table_memory_insert (ETableMemory *table_memory,
gint row,
gpointer data)
{
g_return_if_fail (row >= -1);
- g_return_if_fail (row <= etmm->priv->num_rows);
+ g_return_if_fail (row <= table_memory->priv->num_rows);
- if (!etmm->priv->frozen)
- e_table_model_pre_change (E_TABLE_MODEL (etmm));
+ if (!table_memory->priv->frozen)
+ e_table_model_pre_change (E_TABLE_MODEL (table_memory));
if (row == -1)
- row = etmm->priv->num_rows;
- etmm->priv->data = g_renew (gpointer, etmm->priv->data, etmm->priv->num_rows + 1);
+ row = table_memory->priv->num_rows;
+ table_memory->priv->data = g_renew (gpointer, table_memory->priv->data, table_memory->priv->num_rows + 1);
memmove (
- etmm->priv->data + row + 1,
- etmm->priv->data + row,
- (etmm->priv->num_rows - row) * sizeof (gpointer));
- etmm->priv->data[row] = data;
- etmm->priv->num_rows++;
- if (!etmm->priv->frozen)
- e_table_model_row_inserted (E_TABLE_MODEL (etmm), row);
+ table_memory->priv->data + row + 1,
+ table_memory->priv->data + row,
+ (table_memory->priv->num_rows - row) * sizeof (gpointer));
+ table_memory->priv->data[row] = data;
+ table_memory->priv->num_rows++;
+ if (!table_memory->priv->frozen)
+ e_table_model_row_inserted (E_TABLE_MODEL (table_memory), row);
}
/**
* e_table_memory_remove:
- * @etable:
- * @path:
- *
- *
+ * @table_memory:
+ * @row:
*
* Return value:
**/
gpointer
-e_table_memory_remove (ETableMemory *etmm,
+e_table_memory_remove (ETableMemory *table_memory,
gint row)
{
gpointer ret;
g_return_val_if_fail (row >= 0, NULL);
- g_return_val_if_fail (row < etmm->priv->num_rows, NULL);
+ g_return_val_if_fail (row < table_memory->priv->num_rows, NULL);
- if (!etmm->priv->frozen)
- e_table_model_pre_change (E_TABLE_MODEL (etmm));
- ret = etmm->priv->data[row];
+ if (!table_memory->priv->frozen)
+ e_table_model_pre_change (E_TABLE_MODEL (table_memory));
+ ret = table_memory->priv->data[row];
memmove (
- etmm->priv->data + row,
- etmm->priv->data + row + 1,
- (etmm->priv->num_rows - row - 1) * sizeof (gpointer));
- etmm->priv->num_rows--;
- if (!etmm->priv->frozen)
- e_table_model_row_deleted (E_TABLE_MODEL (etmm), row);
+ table_memory->priv->data + row,
+ table_memory->priv->data + row + 1,
+ (table_memory->priv->num_rows - row - 1) * sizeof (gpointer));
+ table_memory->priv->num_rows--;
+ if (!table_memory->priv->frozen)
+ e_table_model_row_deleted (E_TABLE_MODEL (table_memory), row);
return ret;
}
/**
* e_table_memory_clear:
- * @etable:
- * @path:
- *
- *
- *
- * Return value:
+ * @table_memory:
**/
void
-e_table_memory_clear (ETableMemory *etmm)
+e_table_memory_clear (ETableMemory *table_memory)
{
- if (!etmm->priv->frozen)
- e_table_model_pre_change (E_TABLE_MODEL (etmm));
- g_free (etmm->priv->data);
- etmm->priv->data = NULL;
- etmm->priv->num_rows = 0;
- if (!etmm->priv->frozen)
- e_table_model_changed (E_TABLE_MODEL (etmm));
+ if (!table_memory->priv->frozen)
+ e_table_model_pre_change (E_TABLE_MODEL (table_memory));
+ g_free (table_memory->priv->data);
+ table_memory->priv->data = NULL;
+ table_memory->priv->num_rows = 0;
+ if (!table_memory->priv->frozen)
+ e_table_model_changed (E_TABLE_MODEL (table_memory));
}
/**
* e_table_memory_freeze:
- * @etmm: the ETableModel to freeze.
+ * @table_memory: the ETableModel to freeze.
*
* This function prepares an ETableModel for a period of much change.
* All signals regarding changes to the table are deferred until we
@@ -239,19 +226,19 @@ e_table_memory_clear (ETableMemory *etmm)
*
**/
void
-e_table_memory_freeze (ETableMemory *etmm)
+e_table_memory_freeze (ETableMemory *table_memory)
{
- ETableMemoryPrivate *priv = etmm->priv;
+ ETableMemoryPrivate *priv = table_memory->priv;
if (priv->frozen == 0)
- e_table_model_pre_change (E_TABLE_MODEL (etmm));
+ e_table_model_pre_change (E_TABLE_MODEL (table_memory));
priv->frozen++;
}
/**
* e_table_memory_thaw:
- * @etmm: the ETableMemory to thaw.
+ * @table_memory: the ETableMemory to thaw.
*
* This function thaws an ETableMemory. All the defered signals can add
* up to a lot, we don't know - so we just emit a model_changed
@@ -259,13 +246,13 @@ e_table_memory_freeze (ETableMemory *etmm)
*
**/
void
-e_table_memory_thaw (ETableMemory *etmm)
+e_table_memory_thaw (ETableMemory *table_memory)
{
- ETableMemoryPrivate *priv = etmm->priv;
+ ETableMemoryPrivate *priv = table_memory->priv;
if (priv->frozen > 0)
priv->frozen--;
if (priv->frozen == 0) {
- e_table_model_changed (E_TABLE_MODEL (etmm));
+ e_table_model_changed (E_TABLE_MODEL (table_memory));
}
}
diff --git a/e-util/e-table-memory.h b/e-util/e-table-memory.h
index 8762027eaf..e374fca5ca 100644
--- a/e-util/e-table-memory.h
+++ b/e-util/e-table-memory.h
@@ -67,22 +67,22 @@ struct _ETableMemoryClass {
GType e_table_memory_get_type (void) G_GNUC_CONST;
ETableMemory * e_table_memory_new (void);
-void e_table_memory_construct (ETableMemory *etable);
+void e_table_memory_construct (ETableMemory *table_memory);
/* row operations */
-void e_table_memory_insert (ETableMemory *etable,
+void e_table_memory_insert (ETableMemory *table_memory,
gint row,
gpointer data);
-gpointer e_table_memory_remove (ETableMemory *etable,
+gpointer e_table_memory_remove (ETableMemory *table_memory,
gint row);
-void e_table_memory_clear (ETableMemory *etable);
+void e_table_memory_clear (ETableMemory *table_memory);
/* Freeze and thaw */
-void e_table_memory_freeze (ETableMemory *etable);
-void e_table_memory_thaw (ETableMemory *etable);
-gpointer e_table_memory_get_data (ETableMemory *etm,
+void e_table_memory_freeze (ETableMemory *table_memory);
+void e_table_memory_thaw (ETableMemory *table_memory);
+gpointer e_table_memory_get_data (ETableMemory *table_memory,
gint row);
-void e_table_memory_set_data (ETableMemory *etm,
+void e_table_memory_set_data (ETableMemory *table_memory,
gint row,
gpointer data);
diff --git a/e-util/e-table-sort-info.c b/e-util/e-table-sort-info.c
index d2654c55b4..0dce87b329 100644
--- a/e-util/e-table-sort-info.c
+++ b/e-util/e-table-sort-info.c
@@ -202,7 +202,7 @@ e_table_sort_info_grouping_real_truncate (ETableSortInfo *info,
/**
* e_table_sort_info_grouping_truncate:
* @info: The ETableSortInfo object
- * @lenght: position where the truncation happens.
+ * @length: position where the truncation happens.
*
* This routine can be used to reduce or grow the number of grouping
* criteria in the object.
@@ -283,7 +283,7 @@ e_table_sort_info_sorting_real_truncate (ETableSortInfo *info,
/**
* e_table_sort_info_sorting_truncate:
* @info: The ETableSortInfo object
- * @lenght: position where the truncation happens.
+ * @length: position where the truncation happens.
*
* This routine can be used to reduce or grow the number of sort
* criteria in the object.
@@ -316,7 +316,7 @@ e_table_sort_info_sorting_get_nth (ETableSortInfo *info,
}
/**
- * e_table_sort_info_sorting_get_nth:
+ * e_table_sort_info_sorting_set_nth:
* @info: The ETableSortInfo object
* @n: Item information to fetch.
* @column: new values for the sorting
diff --git a/e-util/e-table-specification.c b/e-util/e-table-specification.c
index 03cb429131..b00db491aa 100644
--- a/e-util/e-table-specification.c
+++ b/e-util/e-table-specification.c
@@ -289,9 +289,8 @@ e_table_specification_save_to_file (ETableSpecification *specification,
xmlDoc *doc;
gint ret;
- g_return_val_if_fail (specification != NULL, -1);
- g_return_val_if_fail (filename != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), -1);
+ g_return_val_if_fail (filename != NULL, -1);
if ((doc = xmlNewDoc ((const guchar *)"1.0")) == NULL)
return -1;
@@ -323,7 +322,6 @@ e_table_specification_save_to_string (ETableSpecification *specification)
gint length;
xmlDoc *doc;
- g_return_val_if_fail (specification != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
doc = xmlNewDoc ((const guchar *)"1.0");
@@ -353,9 +351,8 @@ e_table_specification_save_to_node (ETableSpecification *specification,
xmlNode *node;
const gchar *s;
- g_return_val_if_fail (doc != NULL, NULL);
- g_return_val_if_fail (specification != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
+ g_return_val_if_fail (doc != NULL, NULL);
node = xmlNewNode (NULL, (const guchar *)"ETableSpecification");
e_xml_set_bool_prop_by_name (node, (const guchar *)"no-headers", specification->no_headers);
@@ -407,23 +404,22 @@ e_table_specification_save_to_node (ETableSpecification *specification,
/**
* e_table_specification_duplicate:
- * @spec: specification to duplicate
+ * @specification: specification to duplicate
*
- * This creates a copy of the %ETableSpecification @spec
+ * This creates a copy of the %ETableSpecification @specification.
*
* Returns: The duplicated %ETableSpecification.
*/
ETableSpecification *
-e_table_specification_duplicate (ETableSpecification *spec)
+e_table_specification_duplicate (ETableSpecification *specification)
{
ETableSpecification *new_spec;
gchar *spec_str;
- g_return_val_if_fail (spec != NULL, NULL);
- g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (spec), NULL);
+ g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
new_spec = e_table_specification_new ();
- spec_str = e_table_specification_save_to_string (spec);
+ spec_str = e_table_specification_save_to_string (specification);
if (!e_table_specification_load_from_string (new_spec, spec_str)) {
g_warning ("Unable to duplicate ETable specification");
g_object_unref (new_spec);
diff --git a/e-util/e-table-specification.h b/e-util/e-table-specification.h
index 8ed43aed73..97cc7d05f8 100644
--- a/e-util/e-table-specification.h
+++ b/e-util/e-table-specification.h
@@ -86,7 +86,8 @@ struct _ETableSpecificationClass {
GObjectClass parent_class;
};
-GType e_table_specification_get_type (void) G_GNUC_CONST;
+GType e_table_specification_get_type
+ (void) G_GNUC_CONST;
ETableSpecification *
e_table_specification_new (void);
@@ -107,7 +108,7 @@ gchar * e_table_specification_save_to_string
(ETableSpecification *specification);
xmlNode * e_table_specification_save_to_node
(ETableSpecification *specification,
- xmlDoc *doc);
+ xmlDoc *doc);
ETableSpecification *
e_table_specification_duplicate (ETableSpecification *specification);
diff --git a/e-util/e-table.c b/e-util/e-table.c
index 4dc90bebf1..6d7ebbbcf3 100644
--- a/e-util/e-table.c
+++ b/e-util/e-table.c
@@ -1983,8 +1983,8 @@ e_table_construct_from_spec_file (ETable *e_table,
* e_table_new:
* @etm: The model for this table.
* @ete: An optional #ETableExtras. (%NULL is valid.)
- * @spec: The spec.
- * @state: An optional state. (%NULL is valid.)
+ * @spec_str: The spec.
+ * @state_str: An optional state. (%NULL is valid.)
*
* This function creates an #ETable from the given parameters. The
* #ETableModel is a table model to be represented. The #ETableExtras
@@ -2003,18 +2003,18 @@ e_table_construct_from_spec_file (ETable *e_table,
GtkWidget *
e_table_new (ETableModel *etm,
ETableExtras *ete,
- const gchar *spec,
- const gchar *state)
+ const gchar *spec_str,
+ const gchar *state_str)
{
ETable *e_table;
g_return_val_if_fail (E_IS_TABLE_MODEL (etm), NULL);
g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), NULL);
- g_return_val_if_fail (spec != NULL, NULL);
+ g_return_val_if_fail (spec_str != NULL, NULL);
e_table = g_object_new (E_TYPE_TABLE, NULL);
- e_table = e_table_construct (e_table, etm, ete, spec, state);
+ e_table = e_table_construct (e_table, etm, ete, spec_str, state_str);
return GTK_WIDGET (e_table);
}
diff --git a/e-util/e-table.h b/e-util/e-table.h
index 3509888a69..f3b36d0a5e 100644
--- a/e-util/e-table.h
+++ b/e-util/e-table.h
@@ -270,12 +270,12 @@ GType e_table_get_type (void) G_GNUC_CONST;
ETable * e_table_construct (ETable *e_table,
ETableModel *etm,
ETableExtras *ete,
- const gchar *spec,
- const gchar *state);
+ const gchar *spec_str,
+ const gchar *state_str);
GtkWidget * e_table_new (ETableModel *etm,
ETableExtras *ete,
- const gchar *spec,
- const gchar *state);
+ const gchar *spec_str,
+ const gchar *state_str);
/* Create an ETable using files. */
ETable * e_table_construct_from_spec_file
@@ -297,7 +297,7 @@ ETableState * e_table_get_state_object (ETable *e_table);
/* note that it is more efficient to provide the state at creation time */
void e_table_set_state (ETable *e_table,
- const gchar *state);
+ const gchar *state_str);
void e_table_set_state_object (ETable *e_table,
ETableState *state);
void e_table_load_state (ETable *e_table,
diff --git a/e-util/e-tree-memory.c b/e-util/e-tree-memory.c
index 0af5d27b31..5cde4b1ae6 100644
--- a/e-util/e-tree-memory.c
+++ b/e-util/e-tree-memory.c
@@ -173,7 +173,7 @@ e_tree_path_unlink (ETreeMemoryPath *path)
/**
* e_tree_memory_freeze:
- * @etmm: the ETreeModel to freeze.
+ * @tree_memory: the ETreeModel to freeze.
*
* This function prepares an ETreeModel for a period of much change.
* All signals regarding changes to the tree are deferred until we
@@ -181,19 +181,19 @@ e_tree_path_unlink (ETreeMemoryPath *path)
*
**/
void
-e_tree_memory_freeze (ETreeMemory *etmm)
+e_tree_memory_freeze (ETreeMemory *tree_memory)
{
- ETreeMemoryPrivate *priv = etmm->priv;
+ ETreeMemoryPrivate *priv = tree_memory->priv;
if (priv->frozen == 0)
- e_tree_model_pre_change (E_TREE_MODEL (etmm));
+ e_tree_model_pre_change (E_TREE_MODEL (tree_memory));
priv->frozen++;
}
/**
* e_tree_memory_thaw:
- * @etmm: the ETreeMemory to thaw.
+ * @tree_memory: the ETreeMemory to thaw.
*
* This function thaws an ETreeMemory. All the defered signals can add
* up to a lot, we don't know - so we just emit a model_changed
@@ -201,21 +201,21 @@ e_tree_memory_freeze (ETreeMemory *etmm)
*
**/
void
-e_tree_memory_thaw (ETreeMemory *etmm)
+e_tree_memory_thaw (ETreeMemory *tree_memory)
{
- ETreeMemoryPrivate *priv = etmm->priv;
+ ETreeMemoryPrivate *priv = tree_memory->priv;
if (priv->frozen > 0)
priv->frozen--;
if (priv->frozen == 0) {
- e_tree_model_node_changed (E_TREE_MODEL (etmm), priv->root);
+ e_tree_model_node_changed (E_TREE_MODEL (tree_memory), priv->root);
}
}
/* virtual methods */
static void
-etmm_dispose (GObject *object)
+tree_memory_dispose (GObject *object)
{
ETreeMemoryPrivate *priv;
@@ -229,14 +229,14 @@ etmm_dispose (GObject *object)
}
static ETreePath
-etmm_get_root (ETreeModel *etm)
+tree_memory_get_root (ETreeModel *etm)
{
ETreeMemoryPrivate *priv = E_TREE_MEMORY (etm)->priv;
return priv->root;
}
static ETreePath
-etmm_get_parent (ETreeModel *etm,
+tree_memory_get_parent (ETreeModel *etm,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -244,7 +244,7 @@ etmm_get_parent (ETreeModel *etm,
}
static ETreePath
-etmm_get_first_child (ETreeModel *etm,
+tree_memory_get_first_child (ETreeModel *etm,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -254,7 +254,7 @@ etmm_get_first_child (ETreeModel *etm,
}
static ETreePath
-etmm_get_last_child (ETreeModel *etm,
+tree_memory_get_last_child (ETreeModel *etm,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -264,7 +264,7 @@ etmm_get_last_child (ETreeModel *etm,
}
static ETreePath
-etmm_get_next (ETreeModel *etm,
+tree_memory_get_next (ETreeModel *etm,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -272,7 +272,7 @@ etmm_get_next (ETreeModel *etm,
}
static ETreePath
-etmm_get_prev (ETreeModel *etm,
+tree_memory_get_prev (ETreeModel *etm,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -280,7 +280,7 @@ etmm_get_prev (ETreeModel *etm,
}
static gboolean
-etmm_is_root (ETreeModel *etm,
+tree_memory_is_root (ETreeModel *etm,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -288,7 +288,7 @@ etmm_is_root (ETreeModel *etm,
}
static gboolean
-etmm_is_expandable (ETreeModel *etm,
+tree_memory_is_expandable (ETreeModel *etm,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -298,7 +298,7 @@ etmm_is_expandable (ETreeModel *etm,
}
static guint
-etmm_get_children (ETreeModel *etm,
+tree_memory_get_children (ETreeModel *etm,
ETreePath node,
ETreePath **nodes)
{
@@ -323,38 +323,38 @@ etmm_get_children (ETreeModel *etm,
}
static guint
-etmm_depth (ETreeModel *etm,
+tree_memory_depth (ETreeModel *etm,
ETreePath path)
{
return e_tree_memory_path_depth (path);
}
static gboolean
-etmm_get_expanded_default (ETreeModel *etm)
+tree_memory_get_expanded_default (ETreeModel *etm)
{
- ETreeMemory *etmm = E_TREE_MEMORY (etm);
- ETreeMemoryPrivate *priv = etmm->priv;
+ ETreeMemory *tree_memory = E_TREE_MEMORY (etm);
+ ETreeMemoryPrivate *priv = tree_memory->priv;
return priv->expanded_default;
}
static void
-etmm_clear_children_computed (ETreeMemoryPath *path)
+tree_memory_clear_children_computed (ETreeMemoryPath *path)
{
for (path = path->first_child; path; path = path->next_sibling) {
path->children_computed = FALSE;
- etmm_clear_children_computed (path);
+ tree_memory_clear_children_computed (path);
}
}
static void
-etmm_node_request_collapse (ETreeModel *etm,
+tree_memory_node_request_collapse (ETreeModel *etm,
ETreePath node)
{
ETreeModelClass *parent_class;
if (node)
- etmm_clear_children_computed (node);
+ tree_memory_clear_children_computed (node);
parent_class = E_TREE_MODEL_CLASS (e_tree_memory_parent_class);
@@ -371,23 +371,23 @@ e_tree_memory_class_init (ETreeMemoryClass *class)
g_type_class_add_private (class, sizeof (ETreeMemoryPrivate));
object_class = G_OBJECT_CLASS (class);
- object_class->dispose = etmm_dispose;
+ object_class->dispose = tree_memory_dispose;
tree_model_class = E_TREE_MODEL_CLASS (class);
- tree_model_class->get_root = etmm_get_root;
- tree_model_class->get_prev = etmm_get_prev;
- tree_model_class->get_next = etmm_get_next;
- tree_model_class->get_first_child = etmm_get_first_child;
- tree_model_class->get_last_child = etmm_get_last_child;
- tree_model_class->get_parent = etmm_get_parent;
+ tree_model_class->get_root = tree_memory_get_root;
+ tree_model_class->get_prev = tree_memory_get_prev;
+ tree_model_class->get_next = tree_memory_get_next;
+ tree_model_class->get_first_child = tree_memory_get_first_child;
+ tree_model_class->get_last_child = tree_memory_get_last_child;
+ tree_model_class->get_parent = tree_memory_get_parent;
- tree_model_class->is_root = etmm_is_root;
- tree_model_class->is_expandable = etmm_is_expandable;
- tree_model_class->get_children = etmm_get_children;
- tree_model_class->depth = etmm_depth;
- tree_model_class->get_expanded_default = etmm_get_expanded_default;
+ tree_model_class->is_root = tree_memory_is_root;
+ tree_model_class->is_expandable = tree_memory_is_expandable;
+ tree_model_class->get_children = tree_memory_get_children;
+ tree_model_class->depth = tree_memory_depth;
+ tree_model_class->get_expanded_default = tree_memory_get_expanded_default;
- tree_model_class->node_request_collapse = etmm_node_request_collapse;
+ tree_model_class->node_request_collapse = tree_memory_node_request_collapse;
class->fill_in_children = NULL;
@@ -403,19 +403,19 @@ e_tree_memory_class_init (ETreeMemoryClass *class)
}
static void
-e_tree_memory_init (ETreeMemory *etmm)
+e_tree_memory_init (ETreeMemory *tree_memory)
{
- etmm->priv = E_TREE_MEMORY_GET_PRIVATE (etmm);
+ tree_memory->priv = E_TREE_MEMORY_GET_PRIVATE (tree_memory);
}
/**
* e_tree_memory_construct:
- * @etree:
+ * @tree_memory:
*
*
**/
void
-e_tree_memory_construct (ETreeMemory *etmm)
+e_tree_memory_construct (ETreeMemory *tree_memory)
{
}
@@ -440,17 +440,17 @@ e_tree_memory_new (void)
* the value of @expanded.
*/
void
-e_tree_memory_set_expanded_default (ETreeMemory *etree,
+e_tree_memory_set_expanded_default (ETreeMemory *tree_memory,
gboolean expanded)
{
- g_return_if_fail (etree != NULL);
+ g_return_if_fail (tree_memory != NULL);
- etree->priv->expanded_default = expanded;
+ tree_memory->priv->expanded_default = expanded;
}
/**
* e_tree_memory_node_get_data:
- * @etmm:
+ * @tree_memory:
* @node:
*
*
@@ -458,7 +458,7 @@ e_tree_memory_set_expanded_default (ETreeMemory *etree,
* Return value:
**/
gpointer
-e_tree_memory_node_get_data (ETreeMemory *etmm,
+e_tree_memory_node_get_data (ETreeMemory *tree_memory,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -470,14 +470,14 @@ e_tree_memory_node_get_data (ETreeMemory *etmm,
/**
* e_tree_memory_node_set_data:
- * @etmm:
+ * @tree_memory:
* @node:
* @node_data:
*
*
**/
void
-e_tree_memory_node_set_data (ETreeMemory *etmm,
+e_tree_memory_node_set_data (ETreeMemory *tree_memory,
ETreePath node,
gpointer node_data)
{
@@ -490,8 +490,8 @@ e_tree_memory_node_set_data (ETreeMemory *etmm,
/**
* e_tree_memory_node_insert:
- * @tree_model:
- * @parent_path:
+ * @tree_memory:
+ * @parent_node:
* @position:
* @node_data:
*
@@ -500,7 +500,7 @@ e_tree_memory_node_set_data (ETreeMemory *etmm,
* Return value:
**/
ETreePath
-e_tree_memory_node_insert (ETreeMemory *tree_model,
+e_tree_memory_node_insert (ETreeMemory *tree_memory,
ETreePath parent_node,
gint position,
gpointer node_data)
@@ -509,16 +509,16 @@ e_tree_memory_node_insert (ETreeMemory *tree_model,
ETreeMemoryPath *new_path;
ETreeMemoryPath *parent_path = parent_node;
- g_return_val_if_fail (tree_model != NULL, NULL);
+ g_return_val_if_fail (tree_memory != NULL, NULL);
- priv = tree_model->priv;
+ priv = tree_memory->priv;
g_return_val_if_fail (parent_path != NULL || priv->root == NULL, NULL);
- priv = tree_model->priv;
+ priv = tree_memory->priv;
- if (!tree_model->priv->frozen)
- e_tree_model_pre_change (E_TREE_MODEL (tree_model));
+ if (!tree_memory->priv->frozen)
+ e_tree_model_pre_change (E_TREE_MODEL (tree_memory));
new_path = g_slice_new0 (ETreeMemoryPath);
@@ -527,33 +527,33 @@ e_tree_memory_node_insert (ETreeMemory *tree_model,
if (parent_path != NULL) {
e_tree_memory_path_insert (parent_path, position, new_path);
- if (!tree_model->priv->frozen)
+ if (!tree_memory->priv->frozen)
e_tree_model_node_inserted (
- E_TREE_MODEL (tree_model),
+ E_TREE_MODEL (tree_memory),
parent_path, new_path);
} else {
priv->root = new_path;
- if (!tree_model->priv->frozen)
+ if (!tree_memory->priv->frozen)
e_tree_model_node_changed (
- E_TREE_MODEL (tree_model), new_path);
+ E_TREE_MODEL (tree_memory), new_path);
}
return new_path;
}
ETreePath
-e_tree_memory_node_insert_id (ETreeMemory *etree,
+e_tree_memory_node_insert_id (ETreeMemory *tree_memory,
ETreePath parent,
gint position,
gpointer node_data,
gchar *id)
{
- return e_tree_memory_node_insert (etree, parent, position, node_data);
+ return e_tree_memory_node_insert (tree_memory, parent, position, node_data);
}
/**
* e_tree_memory_node_insert_before:
- * @etree:
+ * @tree_memory:
* @parent:
* @sibling:
* @node_data:
@@ -563,7 +563,7 @@ e_tree_memory_node_insert_id (ETreeMemory *etree,
* Return value:
**/
ETreePath
-e_tree_memory_node_insert_before (ETreeMemory *etree,
+e_tree_memory_node_insert_before (ETreeMemory *tree_memory,
ETreePath parent,
ETreePath sibling,
gpointer node_data)
@@ -573,7 +573,7 @@ e_tree_memory_node_insert_before (ETreeMemory *etree,
ETreeMemoryPath *sibling_path = sibling;
gint position = 0;
- g_return_val_if_fail (etree != NULL, NULL);
+ g_return_val_if_fail (tree_memory != NULL, NULL);
if (sibling != NULL) {
for (child = parent_path->first_child; child; child = child->next_sibling) {
@@ -583,12 +583,12 @@ e_tree_memory_node_insert_before (ETreeMemory *etree,
}
} else
position = parent_path->num_children;
- return e_tree_memory_node_insert (etree, parent, position, node_data);
+ return e_tree_memory_node_insert (tree_memory, parent, position, node_data);
}
/* just blows away child data, doesn't take into account unlinking/etc */
static void
-child_free (ETreeMemory *etree,
+child_free (ETreeMemory *tree_memory,
ETreeMemoryPath *node)
{
ETreeMemoryPath *child, *next;
@@ -596,12 +596,12 @@ child_free (ETreeMemory *etree,
child = node->first_child;
while (child) {
next = child->next_sibling;
- child_free (etree, child);
+ child_free (tree_memory, child);
child = next;
}
- if (etree->priv->destroy_func) {
- etree->priv->destroy_func (node->node_data, etree->priv->destroy_user_data);
+ if (tree_memory->priv->destroy_func) {
+ tree_memory->priv->destroy_func (node->node_data, tree_memory->priv->destroy_user_data);
}
g_slice_free (ETreeMemoryPath, node);
@@ -609,7 +609,7 @@ child_free (ETreeMemory *etree,
/**
* e_tree_memory_node_remove:
- * @etree:
+ * @tree_memory:
* @path:
*
*
@@ -617,7 +617,7 @@ child_free (ETreeMemory *etree,
* Return value:
**/
gpointer
-e_tree_memory_node_remove (ETreeMemory *etree,
+e_tree_memory_node_remove (ETreeMemory *tree_memory,
ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -626,10 +626,10 @@ e_tree_memory_node_remove (ETreeMemory *etree,
gpointer ret = path->node_data;
gint old_position = 0;
- g_return_val_if_fail (etree != NULL, NULL);
+ g_return_val_if_fail (tree_memory != NULL, NULL);
- if (!etree->priv->frozen) {
- e_tree_model_pre_change (E_TREE_MODEL (etree));
+ if (!tree_memory->priv->frozen) {
+ e_tree_model_pre_change (E_TREE_MODEL (tree_memory));
for (old_position = 0, sibling = path;
sibling;
old_position++, sibling = sibling->prev_sibling)
@@ -642,16 +642,16 @@ e_tree_memory_node_remove (ETreeMemory *etree,
e_tree_path_unlink (path);
/*printf("removing %d nodes from position %d\n", visible, base);*/
- if (!etree->priv->frozen)
- e_tree_model_node_removed (E_TREE_MODEL (etree), parent, path, old_position);
+ if (!tree_memory->priv->frozen)
+ e_tree_model_node_removed (E_TREE_MODEL (tree_memory), parent, path, old_position);
- child_free (etree, path);
+ child_free (tree_memory, path);
- if (path == etree->priv->root)
- etree->priv->root = NULL;
+ if (path == tree_memory->priv->root)
+ tree_memory->priv->root = NULL;
- if (!etree->priv->frozen)
- e_tree_model_node_deleted (E_TREE_MODEL (etree), path);
+ if (!tree_memory->priv->frozen)
+ e_tree_model_node_deleted (E_TREE_MODEL (tree_memory), path);
return ret;
}
@@ -674,7 +674,7 @@ sort_callback (gconstpointer data1,
}
void
-e_tree_memory_sort_node (ETreeMemory *etmm,
+e_tree_memory_sort_node (ETreeMemory *tree_memory,
ETreePath node,
ETreeMemorySortCallback callback,
gpointer user_data)
@@ -687,7 +687,7 @@ e_tree_memory_sort_node (ETreeMemory *etmm,
MemoryAndClosure mac;
ETreeMemoryPath *last;
- e_tree_model_pre_change (E_TREE_MODEL (etmm));
+ e_tree_model_pre_change (E_TREE_MODEL (tree_memory));
i = 0;
for (child = path->first_child; child; child = child->next_sibling)
@@ -703,7 +703,7 @@ e_tree_memory_sort_node (ETreeMemory *etmm,
children[i] = child;
}
- mac.memory = etmm;
+ mac.memory = tree_memory;
mac.closure = user_data;
mac.callback = callback;
@@ -730,14 +730,14 @@ e_tree_memory_sort_node (ETreeMemory *etmm,
g_free (children);
- e_tree_model_node_changed (E_TREE_MODEL (etmm), node);
+ e_tree_model_node_changed (E_TREE_MODEL (tree_memory), node);
}
void
-e_tree_memory_set_node_destroy_func (ETreeMemory *etmm,
+e_tree_memory_set_node_destroy_func (ETreeMemory *tree_memory,
GFunc destroy_func,
gpointer user_data)
{
- etmm->priv->destroy_func = destroy_func;
- etmm->priv->destroy_user_data = user_data;
+ tree_memory->priv->destroy_func = destroy_func;
+ tree_memory->priv->destroy_user_data = user_data;
}
diff --git a/e-util/e-tree-memory.h b/e-util/e-tree-memory.h
index 3e58952ad2..b11afef256 100644
--- a/e-util/e-tree-memory.h
+++ b/e-util/e-tree-memory.h
@@ -58,7 +58,7 @@ typedef struct _ETreeMemory ETreeMemory;
typedef struct _ETreeMemoryClass ETreeMemoryClass;
typedef struct _ETreeMemoryPrivate ETreeMemoryPrivate;
-typedef gint (*ETreeMemorySortCallback) (ETreeMemory *etmm,
+typedef gint (*ETreeMemorySortCallback) (ETreeMemory *tree_memory,
ETreePath path1,
ETreePath path2,
gpointer closure);
@@ -77,44 +77,44 @@ struct _ETreeMemoryClass {
};
GType e_tree_memory_get_type (void) G_GNUC_CONST;
-void e_tree_memory_construct (ETreeMemory *etree);
+void e_tree_memory_construct (ETreeMemory *tree_memory);
ETreeMemory * e_tree_memory_new (void);
/* node operations */
-ETreePath e_tree_memory_node_insert (ETreeMemory *etree,
- ETreePath parent,
+ETreePath e_tree_memory_node_insert (ETreeMemory *tree_memory,
+ ETreePath parent_node,
gint position,
gpointer node_data);
-ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree,
+ETreePath e_tree_memory_node_insert_id (ETreeMemory *tree_memory,
ETreePath parent,
gint position,
gpointer node_data,
gchar *id);
ETreePath e_tree_memory_node_insert_before
- (ETreeMemory *etree,
+ (ETreeMemory *tree_memory,
ETreePath parent,
ETreePath sibling,
gpointer node_data);
-gpointer e_tree_memory_node_remove (ETreeMemory *etree,
+gpointer e_tree_memory_node_remove (ETreeMemory *tree_memory,
ETreePath path);
/* Freeze and thaw */
-void e_tree_memory_freeze (ETreeMemory *etree);
-void e_tree_memory_thaw (ETreeMemory *etree);
+void e_tree_memory_freeze (ETreeMemory *tree_memory);
+void e_tree_memory_thaw (ETreeMemory *tree_memory);
void e_tree_memory_set_expanded_default
- (ETreeMemory *etree,
+ (ETreeMemory *tree_memory,
gboolean expanded);
-gpointer e_tree_memory_node_get_data (ETreeMemory *etm,
+gpointer e_tree_memory_node_get_data (ETreeMemory *tree_memory,
ETreePath node);
-void e_tree_memory_node_set_data (ETreeMemory *etm,
+void e_tree_memory_node_set_data (ETreeMemory *tree_memory,
ETreePath node,
gpointer node_data);
-void e_tree_memory_sort_node (ETreeMemory *etm,
+void e_tree_memory_sort_node (ETreeMemory *tree_memory,
ETreePath node,
ETreeMemorySortCallback callback,
gpointer user_data);
void e_tree_memory_set_node_destroy_func
- (ETreeMemory *etmm,
+ (ETreeMemory *tree_memory,
GFunc destroy_func,
gpointer user_data);
diff --git a/e-util/e-tree-model.c b/e-util/e-tree-model.c
index db763cf782..0ca6ac206b 100644
--- a/e-util/e-tree-model.c
+++ b/e-util/e-tree-model.c
@@ -224,11 +224,8 @@ e_tree_model_init (ETreeModel *tree_model)
/* signals */
/**
- * e_tree_model_node_changed:
+ * e_tree_model_pre_change:
* @tree_model:
- * @node:
- *
- *
*
* Return value:
**/
@@ -241,11 +238,8 @@ e_tree_model_pre_change (ETreeModel *tree_model)
}
/**
- * e_tree_model_node_changed:
+ * e_tree_model_no_change:
* @tree_model:
- * @node:
- *
- *
*
* Return value:
**/
@@ -260,9 +254,6 @@ e_tree_model_no_change (ETreeModel *tree_model)
/**
* e_tree_model_rebuilt:
* @tree_model:
- * @node:
- *
- *
*
* Return value:
**/
@@ -276,7 +267,7 @@ e_tree_model_rebuilt (ETreeModel *tree_model)
/**
* e_tree_model_node_changed:
* @tree_model:
- * @node:
+ * @path:
*
*
*
@@ -284,17 +275,17 @@ e_tree_model_rebuilt (ETreeModel *tree_model)
**/
void
e_tree_model_node_changed (ETreeModel *tree_model,
- ETreePath node)
+ ETreePath path)
{
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- g_signal_emit (tree_model, signals[NODE_CHANGED], 0, node);
+ g_signal_emit (tree_model, signals[NODE_CHANGED], 0, path);
}
/**
* e_tree_model_node_data_changed:
* @tree_model:
- * @node:
+ * @path:
*
*
*
@@ -302,17 +293,17 @@ e_tree_model_node_changed (ETreeModel *tree_model,
**/
void
e_tree_model_node_data_changed (ETreeModel *tree_model,
- ETreePath node)
+ ETreePath path)
{
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- g_signal_emit (tree_model, signals[NODE_DATA_CHANGED], 0, node);
+ g_signal_emit (tree_model, signals[NODE_DATA_CHANGED], 0, path);
}
/**
* e_tree_model_node_col_changed:
* @tree_model:
- * @node:
+ * @path:
*
*
*
@@ -320,85 +311,85 @@ e_tree_model_node_data_changed (ETreeModel *tree_model,
**/
void
e_tree_model_node_col_changed (ETreeModel *tree_model,
- ETreePath node,
+ ETreePath path,
gint col)
{
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- g_signal_emit (tree_model, signals[NODE_COL_CHANGED], 0, node, col);
+ g_signal_emit (tree_model, signals[NODE_COL_CHANGED], 0, path, col);
}
/**
* e_tree_model_node_inserted:
* @tree_model:
- * @parent_node:
- * @inserted_node:
+ * @parent_path:
+ * @inserted_path:
*
*
**/
void
e_tree_model_node_inserted (ETreeModel *tree_model,
- ETreePath parent_node,
- ETreePath inserted_node)
+ ETreePath parent_path,
+ ETreePath inserted_path)
{
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
g_signal_emit (
tree_model, signals[NODE_INSERTED], 0,
- parent_node, inserted_node);
+ parent_path, inserted_path);
}
/**
* e_tree_model_node_removed:
* @tree_model:
- * @parent_node:
- * @removed_node:
+ * @parent_path:
+ * @removed_path:
*
*
**/
void
e_tree_model_node_removed (ETreeModel *tree_model,
- ETreePath parent_node,
- ETreePath removed_node,
+ ETreePath parent_path,
+ ETreePath removed_path,
gint old_position)
{
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
g_signal_emit (
tree_model, signals[NODE_REMOVED], 0,
- parent_node, removed_node, old_position);
+ parent_path, removed_path, old_position);
}
/**
* e_tree_model_node_deleted:
* @tree_model:
- * @deleted_node:
+ * @deleted_path:
*
*
**/
void
e_tree_model_node_deleted (ETreeModel *tree_model,
- ETreePath deleted_node)
+ ETreePath deleted_path)
{
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- g_signal_emit (tree_model, signals[NODE_DELETED], 0, deleted_node);
+ g_signal_emit (tree_model, signals[NODE_DELETED], 0, deleted_path);
}
/**
* e_tree_model_node_request_collapse:
* @tree_model:
- * @collapsed_node:
+ * @collapsed_path:
*
*
**/
void
e_tree_model_node_request_collapse (ETreeModel *tree_model,
- ETreePath collapsed_node)
+ ETreePath collapsed_path)
{
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- g_signal_emit (tree_model, signals[NODE_REQUEST_COLLAPSE], 0, collapsed_node);
+ g_signal_emit (tree_model, signals[NODE_REQUEST_COLLAPSE], 0, collapsed_path);
}
/**
@@ -416,26 +407,26 @@ e_tree_model_new (void)
/**
* e_tree_model_get_root
- * @etree: the ETreeModel of which we want the root node.
+ * @tree_model: the ETreeModel of which we want the root node.
*
- * Accessor for the root node of @etree.
+ * Accessor for the root node of @tree_model.
*
* return values: the ETreePath corresponding to the root node.
*/
ETreePath
-e_tree_model_get_root (ETreeModel *etree)
+e_tree_model_get_root (ETreeModel *tree_model)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->get_root)
- return ETM_CLASS (etree)->get_root (etree);
+ if (ETM_CLASS (tree_model)->get_root)
+ return ETM_CLASS (tree_model)->get_root (tree_model);
else
return NULL;
}
/**
* e_tree_model_node_get_parent:
- * @etree:
+ * @tree_model:
* @path:
*
*
@@ -443,104 +434,104 @@ e_tree_model_get_root (ETreeModel *etree)
* Return value:
**/
ETreePath
-e_tree_model_node_get_parent (ETreeModel *etree,
- ETreePath node)
+e_tree_model_node_get_parent (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->get_parent)
- return ETM_CLASS (etree)->get_parent (etree, node);
+ if (ETM_CLASS (tree_model)->get_parent)
+ return ETM_CLASS (tree_model)->get_parent (tree_model, path);
else
return NULL;
}
/**
* e_tree_model_node_get_first_child:
- * @etree:
- * @node:
+ * @tree_model:
+ * @path:
*
*
*
* Return value:
**/
ETreePath
-e_tree_model_node_get_first_child (ETreeModel *etree,
- ETreePath node)
+e_tree_model_node_get_first_child (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->get_first_child)
- return ETM_CLASS (etree)->get_first_child (etree, node);
+ if (ETM_CLASS (tree_model)->get_first_child)
+ return ETM_CLASS (tree_model)->get_first_child (tree_model, path);
else
return NULL;
}
/**
* e_tree_model_node_get_last_child:
- * @etree:
- * @node:
+ * @tree_model:
+ * @path:
*
*
*
* Return value:
**/
ETreePath
-e_tree_model_node_get_last_child (ETreeModel *etree,
- ETreePath node)
+e_tree_model_node_get_last_child (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->get_last_child)
- return ETM_CLASS (etree)->get_last_child (etree, node);
+ if (ETM_CLASS (tree_model)->get_last_child)
+ return ETM_CLASS (tree_model)->get_last_child (tree_model, path);
else
return NULL;
}
/**
* e_tree_model_node_get_next:
- * @etree:
- * @node:
+ * @tree_model:
+ * @path:
*
*
*
* Return value:
**/
ETreePath
-e_tree_model_node_get_next (ETreeModel *etree,
- ETreePath node)
+e_tree_model_node_get_next (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->get_next)
- return ETM_CLASS (etree)->get_next (etree, node);
+ if (ETM_CLASS (tree_model)->get_next)
+ return ETM_CLASS (tree_model)->get_next (tree_model, path);
else
return NULL;
}
/**
* e_tree_model_node_get_prev:
- * @etree:
- * @node:
+ * @tree_model:
+ * @path:
*
*
*
* Return value:
**/
ETreePath
-e_tree_model_node_get_prev (ETreeModel *etree,
- ETreePath node)
+e_tree_model_node_get_prev (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->get_prev)
- return ETM_CLASS (etree)->get_prev (etree, node);
+ if (ETM_CLASS (tree_model)->get_prev)
+ return ETM_CLASS (tree_model)->get_prev (tree_model, path);
else
return NULL;
}
/**
* e_tree_model_node_is_root:
- * @etree:
+ * @tree_model:
* @path:
*
*
@@ -548,20 +539,20 @@ e_tree_model_node_get_prev (ETreeModel *etree,
* Return value:
**/
gboolean
-e_tree_model_node_is_root (ETreeModel *etree,
- ETreePath node)
+e_tree_model_node_is_root (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (etree != NULL, FALSE);
+ g_return_val_if_fail (tree_model != NULL, FALSE);
- if (ETM_CLASS (etree)->is_root)
- return ETM_CLASS (etree)->is_root (etree, node);
+ if (ETM_CLASS (tree_model)->is_root)
+ return ETM_CLASS (tree_model)->is_root (tree_model, path);
else
return FALSE;
}
/**
* e_tree_model_node_is_expandable:
- * @etree:
+ * @tree_model:
* @path:
*
*
@@ -569,33 +560,33 @@ e_tree_model_node_is_root (ETreeModel *etree,
* Return value:
**/
gboolean
-e_tree_model_node_is_expandable (ETreeModel *etree,
- ETreePath node)
+e_tree_model_node_is_expandable (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (etree != NULL, FALSE);
- g_return_val_if_fail (node != NULL, FALSE);
+ g_return_val_if_fail (tree_model != NULL, FALSE);
+ g_return_val_if_fail (path != NULL, FALSE);
- if (ETM_CLASS (etree)->is_expandable)
- return ETM_CLASS (etree)->is_expandable (etree, node);
+ if (ETM_CLASS (tree_model)->is_expandable)
+ return ETM_CLASS (tree_model)->is_expandable (tree_model, path);
else
return FALSE;
}
guint
-e_tree_model_node_get_children (ETreeModel *etree,
- ETreePath node,
- ETreePath **nodes)
+e_tree_model_node_get_children (ETreeModel *tree_model,
+ ETreePath path,
+ ETreePath **paths)
{
- g_return_val_if_fail (etree != NULL, 0);
- if (ETM_CLASS (etree)->get_children)
- return ETM_CLASS (etree)->get_children (etree, node, nodes);
+ g_return_val_if_fail (tree_model != NULL, 0);
+ if (ETM_CLASS (tree_model)->get_children)
+ return ETM_CLASS (tree_model)->get_children (tree_model, path, paths);
else
return 0;
}
/**
* e_tree_model_node_depth:
- * @etree:
+ * @tree_model:
* @path:
*
*
@@ -603,20 +594,20 @@ e_tree_model_node_get_children (ETreeModel *etree,
* Return value:
**/
guint
-e_tree_model_node_depth (ETreeModel *etree,
- ETreePath node)
+e_tree_model_node_depth (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), 0);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), 0);
- if (ETM_CLASS (etree)->depth)
- return ETM_CLASS (etree)->depth (etree, node);
+ if (ETM_CLASS (tree_model)->depth)
+ return ETM_CLASS (tree_model)->depth (tree_model, path);
else
return 0;
}
/**
* e_tree_model_icon_at
- * @etree: The ETreeModel.
+ * @tree_model: The ETreeModel.
* @path: The ETreePath to the node we're getting the icon of.
*
* XXX docs here.
@@ -624,118 +615,118 @@ e_tree_model_node_depth (ETreeModel *etree,
* return values: the GdkPixbuf associated with this node.
*/
GdkPixbuf *
-e_tree_model_icon_at (ETreeModel *etree,
- ETreePath node)
+e_tree_model_icon_at (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->icon_at)
- return ETM_CLASS (etree)->icon_at (etree, node);
+ if (ETM_CLASS (tree_model)->icon_at)
+ return ETM_CLASS (tree_model)->icon_at (tree_model, path);
else
return NULL;
}
/**
* e_tree_model_get_expanded_default
- * @etree: The ETreeModel.
+ * @tree_model: The ETreeModel.
*
* XXX docs here.
*
* return values: Whether nodes should be expanded by default.
*/
gboolean
-e_tree_model_get_expanded_default (ETreeModel *etree)
+e_tree_model_get_expanded_default (ETreeModel *tree_model)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), FALSE);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), FALSE);
- if (ETM_CLASS (etree)->get_expanded_default)
- return ETM_CLASS (etree)->get_expanded_default (etree);
+ if (ETM_CLASS (tree_model)->get_expanded_default)
+ return ETM_CLASS (tree_model)->get_expanded_default (tree_model);
else
return FALSE;
}
/**
* e_tree_model_column_count
- * @etree: The ETreeModel.
+ * @tree_model: The ETreeModel.
*
* XXX docs here.
*
* return values: The number of columns
*/
gint
-e_tree_model_column_count (ETreeModel *etree)
+e_tree_model_column_count (ETreeModel *tree_model)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), 0);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), 0);
- if (ETM_CLASS (etree)->column_count)
- return ETM_CLASS (etree)->column_count (etree);
+ if (ETM_CLASS (tree_model)->column_count)
+ return ETM_CLASS (tree_model)->column_count (tree_model);
else
return 0;
}
/**
* e_tree_model_has_save_id
- * @etree: The ETreeModel.
+ * @tree_model: The ETreeModel.
*
* XXX docs here.
*
* return values: Whether this tree has valid save id data.
*/
gboolean
-e_tree_model_has_save_id (ETreeModel *etree)
+e_tree_model_has_save_id (ETreeModel *tree_model)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), FALSE);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), FALSE);
- if (ETM_CLASS (etree)->has_save_id)
- return ETM_CLASS (etree)->has_save_id (etree);
+ if (ETM_CLASS (tree_model)->has_save_id)
+ return ETM_CLASS (tree_model)->has_save_id (tree_model);
else
return FALSE;
}
/**
* e_tree_model_get_save_id
- * @etree: The ETreeModel.
- * @node: The ETreePath.
+ * @tree_model: The ETreeModel.
+ * @path: The ETreePath.
*
* XXX docs here.
*
* return values: The save id for this path.
*/
gchar *
-e_tree_model_get_save_id (ETreeModel *etree,
- ETreePath node)
+e_tree_model_get_save_id (ETreeModel *tree_model,
+ ETreePath path)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->get_save_id)
- return ETM_CLASS (etree)->get_save_id (etree, node);
+ if (ETM_CLASS (tree_model)->get_save_id)
+ return ETM_CLASS (tree_model)->get_save_id (tree_model, path);
else
return NULL;
}
/**
* e_tree_model_has_get_node_by_id
- * @etree: The ETreeModel.
+ * @tree_model: The ETreeModel.
*
* XXX docs here.
*
* return values: Whether this tree can quickly get a node from its save id.
*/
gboolean
-e_tree_model_has_get_node_by_id (ETreeModel *etree)
+e_tree_model_has_get_node_by_id (ETreeModel *tree_model)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), FALSE);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), FALSE);
- if (ETM_CLASS (etree)->has_get_node_by_id)
- return ETM_CLASS (etree)->has_get_node_by_id (etree);
+ if (ETM_CLASS (tree_model)->has_get_node_by_id)
+ return ETM_CLASS (tree_model)->has_get_node_by_id (tree_model);
else
return FALSE;
}
/**
* e_tree_model_get_node_by_id
- * @etree: The ETreeModel.
- * @node: The ETreePath.
+ * @tree_model: The ETreeModel.
+ * @save_id:
*
* get_node_by_id(get_save_id(node)) should be the original node.
* Likewise if get_node_by_id is not NULL, then
@@ -745,44 +736,44 @@ e_tree_model_has_get_node_by_id (ETreeModel *etree)
* return values: The path for this save id.
*/
ETreePath
-e_tree_model_get_node_by_id (ETreeModel *etree,
+e_tree_model_get_node_by_id (ETreeModel *tree_model,
const gchar *save_id)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->get_node_by_id)
- return ETM_CLASS (etree)->get_node_by_id (etree, save_id);
+ if (ETM_CLASS (tree_model)->get_node_by_id)
+ return ETM_CLASS (tree_model)->get_node_by_id (tree_model, save_id);
else
return NULL;
}
/**
* e_tree_model_has_change_pending
- * @etree: The ETreeModel.
+ * @tree_model: The ETreeModel.
*
* XXX docs here.
*
* return values: Whether this tree has valid save id data.
*/
gboolean
-e_tree_model_has_change_pending (ETreeModel *etree)
+e_tree_model_has_change_pending (ETreeModel *tree_model)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), FALSE);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), FALSE);
- if (ETM_CLASS (etree)->has_change_pending)
- return ETM_CLASS (etree)->has_change_pending (etree);
+ if (ETM_CLASS (tree_model)->has_change_pending)
+ return ETM_CLASS (tree_model)->has_change_pending (tree_model);
else
return FALSE;
}
/**
* e_tree_model_sort_value_at:
- * @etree: The ETreeModel.
- * @node: The ETreePath to the node we're getting the data from.
+ * @tree_model: The ETreeModel.
+ * @path: The ETreePath to the node we're getting the data from.
* @col: the column to retrieve data from
*
* Return value: This function returns the value that is stored by the
- * @etree in column @col and node @node. The data returned can be a
+ * @tree_model in column @col and node @path. The data returned can be a
* pointer or any data value that can be stored inside a pointer.
*
* The data returned is typically used by an sort renderer if it wants
@@ -796,26 +787,26 @@ e_tree_model_has_change_pending (ETreeModel *etree)
* node_removed, and no_change don't affect any data in this way.
**/
gpointer
-e_tree_model_sort_value_at (ETreeModel *etree,
- ETreePath node,
+e_tree_model_sort_value_at (ETreeModel *tree_model,
+ ETreePath path,
gint col)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->sort_value_at)
- return ETM_CLASS (etree)->sort_value_at (etree, node, col);
+ if (ETM_CLASS (tree_model)->sort_value_at)
+ return ETM_CLASS (tree_model)->sort_value_at (tree_model, path, col);
else
return NULL;
}
/**
* e_tree_model_value_at:
- * @etree: The ETreeModel.
- * @node: The ETreePath to the node we're getting the data from.
+ * @tree_model: The ETreeModel.
+ * @path: The ETreePath to the node we're getting the data from.
* @col: the column to retrieve data from
*
* Return value: This function returns the value that is stored by the
- * @etree in column @col and node @node. The data returned can be a
+ * @tree_model in column @col and node @path. The data returned can be a
* pointer or any data value that can be stored inside a pointer.
*
* The data returned is typically used by an ECell renderer.
@@ -828,33 +819,33 @@ e_tree_model_sort_value_at (ETreeModel *etree,
* node_removed, and no_change don't affect any data in this way.
**/
gpointer
-e_tree_model_value_at (ETreeModel *etree,
- ETreePath node,
+e_tree_model_value_at (ETreeModel *tree_model,
+ ETreePath path,
gint col)
{
- g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
- if (ETM_CLASS (etree)->value_at)
- return ETM_CLASS (etree)->value_at (etree, node, col);
+ if (ETM_CLASS (tree_model)->value_at)
+ return ETM_CLASS (tree_model)->value_at (tree_model, path, col);
else
return NULL;
}
void
-e_tree_model_set_value_at (ETreeModel *etree,
- ETreePath node,
+e_tree_model_set_value_at (ETreeModel *tree_model,
+ ETreePath path,
gint col,
gconstpointer val)
{
- g_return_if_fail (E_IS_TREE_MODEL (etree));
+ g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- if (ETM_CLASS (etree)->set_value_at)
- ETM_CLASS (etree)->set_value_at (etree, node, col, val);
+ if (ETM_CLASS (tree_model)->set_value_at)
+ ETM_CLASS (tree_model)->set_value_at (tree_model, path, col, val);
}
/**
* e_tree_model_node_is_editable:
- * @etree:
+ * @tree_model:
* @path:
*
*
@@ -862,128 +853,128 @@ e_tree_model_set_value_at (ETreeModel *etree,
* Return value:
**/
gboolean
-e_tree_model_node_is_editable (ETreeModel *etree,
- ETreePath node,
+e_tree_model_node_is_editable (ETreeModel *tree_model,
+ ETreePath path,
gint col)
{
- g_return_val_if_fail (etree != NULL, FALSE);
+ g_return_val_if_fail (tree_model != NULL, FALSE);
- if (ETM_CLASS (etree)->is_editable)
- return ETM_CLASS (etree)->is_editable (etree, node, col);
+ if (ETM_CLASS (tree_model)->is_editable)
+ return ETM_CLASS (tree_model)->is_editable (tree_model, path, col);
else
return FALSE;
}
/**
* e_tree_model_duplicate_value:
- * @etree:
- * @path:
- *
+ * @tree_model:
+ * @col:
+ * @value:
*
*
* Return value:
**/
gpointer
-e_tree_model_duplicate_value (ETreeModel *etree,
+e_tree_model_duplicate_value (ETreeModel *tree_model,
gint col,
gconstpointer value)
{
- g_return_val_if_fail (etree != NULL, NULL);
+ g_return_val_if_fail (tree_model != NULL, NULL);
- if (ETM_CLASS (etree)->duplicate_value)
- return ETM_CLASS (etree)->duplicate_value (etree, col, value);
+ if (ETM_CLASS (tree_model)->duplicate_value)
+ return ETM_CLASS (tree_model)->duplicate_value (tree_model, col, value);
else
return NULL;
}
/**
* e_tree_model_free_value:
- * @etree:
- * @path:
- *
+ * @tree_model:
+ * @col:
+ * @value:
*
*
* Return value:
**/
void
-e_tree_model_free_value (ETreeModel *etree,
+e_tree_model_free_value (ETreeModel *tree_model,
gint col,
gpointer value)
{
- g_return_if_fail (etree != NULL);
+ g_return_if_fail (tree_model != NULL);
- if (ETM_CLASS (etree)->free_value)
- ETM_CLASS (etree)->free_value (etree, col, value);
+ if (ETM_CLASS (tree_model)->free_value)
+ ETM_CLASS (tree_model)->free_value (tree_model, col, value);
}
/**
* e_tree_model_initialize_value:
- * @etree:
- * @path:
+ * @tree_model:
+ * @col:
*
*
*
* Return value:
**/
gpointer
-e_tree_model_initialize_value (ETreeModel *etree,
+e_tree_model_initialize_value (ETreeModel *tree_model,
gint col)
{
- g_return_val_if_fail (etree != NULL, NULL);
+ g_return_val_if_fail (tree_model != NULL, NULL);
- if (ETM_CLASS (etree)->initialize_value)
- return ETM_CLASS (etree)->initialize_value (etree, col);
+ if (ETM_CLASS (tree_model)->initialize_value)
+ return ETM_CLASS (tree_model)->initialize_value (tree_model, col);
else
return NULL;
}
/**
* e_tree_model_value_is_empty:
- * @etree:
- * @path:
- *
+ * @tree_model:
+ * @col:
+ * @value:
*
*
* Return value:
**/
gboolean
-e_tree_model_value_is_empty (ETreeModel *etree,
+e_tree_model_value_is_empty (ETreeModel *tree_model,
gint col,
gconstpointer value)
{
- g_return_val_if_fail (etree != NULL, TRUE);
+ g_return_val_if_fail (tree_model != NULL, TRUE);
- if (ETM_CLASS (etree)->value_is_empty)
- return ETM_CLASS (etree)->value_is_empty (etree, col, value);
+ if (ETM_CLASS (tree_model)->value_is_empty)
+ return ETM_CLASS (tree_model)->value_is_empty (tree_model, col, value);
else
return TRUE;
}
/**
* e_tree_model_value_to_string:
- * @etree:
- * @path:
- *
+ * @tree_model:
+ * @col:
+ * @value:
*
*
* Return value:
**/
gchar *
-e_tree_model_value_to_string (ETreeModel *etree,
+e_tree_model_value_to_string (ETreeModel *tree_model,
gint col,
gconstpointer value)
{
- g_return_val_if_fail (etree != NULL, g_strdup (""));
+ g_return_val_if_fail (tree_model != NULL, g_strdup (""));
- if (ETM_CLASS (etree)->value_to_string)
- return ETM_CLASS (etree)->value_to_string (etree, col, value);
+ if (ETM_CLASS (tree_model)->value_to_string)
+ return ETM_CLASS (tree_model)->value_to_string (tree_model, col, value);
else
return g_strdup ("");
}
/**
* e_tree_model_node_traverse:
- * @model:
+ * @tree_model:
* @path:
* @func:
* @data:
@@ -991,24 +982,24 @@ e_tree_model_value_to_string (ETreeModel *etree,
*
**/
void
-e_tree_model_node_traverse (ETreeModel *model,
+e_tree_model_node_traverse (ETreeModel *tree_model,
ETreePath path,
ETreePathFunc func,
gpointer data)
{
ETreePath child;
- g_return_if_fail (E_IS_TREE_MODEL (model));
+ g_return_if_fail (E_IS_TREE_MODEL (tree_model));
g_return_if_fail (path != NULL);
- child = e_tree_model_node_get_first_child (model, path);
+ child = e_tree_model_node_get_first_child (tree_model, path);
while (child) {
ETreePath next_child;
- next_child = e_tree_model_node_get_next (model, child);
- e_tree_model_node_traverse (model, child, func, data);
- if (func (model, child, data))
+ next_child = e_tree_model_node_get_next (tree_model, child);
+ e_tree_model_node_traverse (tree_model, child, func, data);
+ if (func (tree_model, child, data))
return;
child = next_child;
@@ -1017,7 +1008,7 @@ e_tree_model_node_traverse (ETreeModel *model,
/**
* e_tree_model_node_traverse_preorder:
- * @model:
+ * @tree_model:
* @path:
* @func:
* @data:
@@ -1025,40 +1016,31 @@ e_tree_model_node_traverse (ETreeModel *model,
*
**/
void
-e_tree_model_node_traverse_preorder (ETreeModel *model,
+e_tree_model_node_traverse_preorder (ETreeModel *tree_model,
ETreePath path,
ETreePathFunc func,
gpointer data)
{
ETreePath child;
- g_return_if_fail (E_IS_TREE_MODEL (model));
+ g_return_if_fail (E_IS_TREE_MODEL (tree_model));
g_return_if_fail (path != NULL);
- child = e_tree_model_node_get_first_child (model, path);
+ child = e_tree_model_node_get_first_child (tree_model, path);
while (child) {
ETreePath next_child;
- if (func (model, child, data))
+ if (func (tree_model, child, data))
return;
- next_child = e_tree_model_node_get_next (model, child);
- e_tree_model_node_traverse_preorder (model, child, func, data);
+ next_child = e_tree_model_node_get_next (tree_model, child);
+ e_tree_model_node_traverse_preorder (tree_model, child, func, data);
child = next_child;
}
}
-/**
- * e_tree_model_node_traverse_preorder:
- * @model:
- * @path:
- * @func:
- * @data:
- *
- *
- **/
static ETreePath
e_tree_model_node_real_traverse (ETreeModel *model,
ETreePath path,
@@ -1100,16 +1082,18 @@ e_tree_model_node_real_traverse (ETreeModel *model,
}
/**
- * e_tree_model_node_traverse_preorder:
- * @model:
+ * e_tree_model_node_find:
+ * @tree_model:
* @path:
+ * @end_path:
+ * @forward_direction:
* @func:
* @data:
*
*
**/
ETreePath
-e_tree_model_node_find (ETreeModel *model,
+e_tree_model_node_find (ETreeModel *tree_model,
ETreePath path,
ETreePath end_path,
gboolean forward_direction,
@@ -1119,22 +1103,22 @@ e_tree_model_node_find (ETreeModel *model,
ETreePath result;
ETreePath next;
- g_return_val_if_fail (E_IS_TREE_MODEL (model), NULL);
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
/* Just search the whole tree in this case. */
if (path == NULL) {
ETreePath root;
- root = e_tree_model_get_root (model);
+ root = e_tree_model_get_root (tree_model);
- if (forward_direction && (end_path == root || func (model, root, data)))
+ if (forward_direction && (end_path == root || func (tree_model, root, data)))
return root;
result = e_tree_model_node_real_traverse (
- model, root, end_path, forward_direction, func, data);
+ tree_model, root, end_path, forward_direction, func, data);
if (result)
return result;
- if (!forward_direction && (end_path == root || func (model, root, data)))
+ if (!forward_direction && (end_path == root || func (tree_model, root, data)))
return root;
return NULL;
@@ -1144,31 +1128,31 @@ e_tree_model_node_find (ETreeModel *model,
if (forward_direction) {
if ((result = e_tree_model_node_real_traverse (
- model, path, end_path,
+ tree_model, path, end_path,
forward_direction, func, data)))
return result;
- next = e_tree_model_node_get_next (model, path);
+ next = e_tree_model_node_get_next (tree_model, path);
} else {
- next = e_tree_model_node_get_prev (model, path);
+ next = e_tree_model_node_get_prev (tree_model, path);
if (next && (result = e_tree_model_node_real_traverse (
- model, next, end_path,
+ tree_model, next, end_path,
forward_direction, func, data)))
return result;
}
while (next == NULL) {
- path = e_tree_model_node_get_parent (model, path);
+ path = e_tree_model_node_get_parent (tree_model, path);
if (path == NULL)
return NULL;
if (forward_direction)
- next = e_tree_model_node_get_next (model, path);
+ next = e_tree_model_node_get_next (tree_model, path);
else
next = path;
}
- if (end_path == next || func (model, next, data))
+ if (end_path == next || func (tree_model, next, data))
return next;
path = next;
diff --git a/e-util/e-tree-model.h b/e-util/e-tree-model.h
index 56b0474239..000a017b93 100644
--- a/e-util/e-tree-model.h
+++ b/e-util/e-tree-model.h
@@ -57,7 +57,7 @@ typedef gpointer ETreePath;
typedef struct _ETreeModel ETreeModel;
typedef struct _ETreeModelClass ETreeModelClass;
-typedef gboolean (*ETreePathFunc) (ETreeModel *model,
+typedef gboolean (*ETreePathFunc) (ETreeModel *tree_model,
ETreePath path,
gpointer data);
@@ -71,74 +71,74 @@ struct _ETreeModelClass {
/*
* Virtual methods
*/
- ETreePath (*get_root) (ETreeModel *etm);
+ ETreePath (*get_root) (ETreeModel *tree_model);
- ETreePath (*get_parent) (ETreeModel *etm,
- ETreePath node);
- ETreePath (*get_first_child) (ETreeModel *etm,
- ETreePath node);
- ETreePath (*get_last_child) (ETreeModel *etm,
- ETreePath node);
- ETreePath (*get_next) (ETreeModel *etm,
- ETreePath node);
- ETreePath (*get_prev) (ETreeModel *etm,
- ETreePath node);
+ ETreePath (*get_parent) (ETreeModel *tree_model,
+ ETreePath path);
+ ETreePath (*get_first_child) (ETreeModel *tree_model,
+ ETreePath path);
+ ETreePath (*get_last_child) (ETreeModel *tree_model,
+ ETreePath path);
+ ETreePath (*get_next) (ETreeModel *tree_model,
+ ETreePath path);
+ ETreePath (*get_prev) (ETreeModel *tree_model,
+ ETreePath path);
- gboolean (*is_root) (ETreeModel *etm,
- ETreePath node);
- gboolean (*is_expandable) (ETreeModel *etm,
- ETreePath node);
- guint (*get_children) (ETreeModel *etm,
- ETreePath node,
+ gboolean (*is_root) (ETreeModel *tree_model,
+ ETreePath path);
+ gboolean (*is_expandable) (ETreeModel *tree_model,
+ ETreePath path);
+ guint (*get_children) (ETreeModel *tree_model,
+ ETreePath path,
ETreePath **paths);
- guint (*depth) (ETreeModel *etm,
- ETreePath node);
+ guint (*depth) (ETreeModel *tree_model,
+ ETreePath path);
- GdkPixbuf * (*icon_at) (ETreeModel *etm,
- ETreePath node);
+ GdkPixbuf * (*icon_at) (ETreeModel *tree_model,
+ ETreePath path);
- gboolean (*get_expanded_default) (ETreeModel *etm);
- gint (*column_count) (ETreeModel *etm);
+ gboolean (*get_expanded_default) (ETreeModel *tree_model);
+ gint (*column_count) (ETreeModel *tree_model);
- gboolean (*has_save_id) (ETreeModel *etm);
- gchar * (*get_save_id) (ETreeModel *etm,
- ETreePath node);
+ gboolean (*has_save_id) (ETreeModel *tree_model);
+ gchar * (*get_save_id) (ETreeModel *tree_model,
+ ETreePath path);
- gboolean (*has_get_node_by_id) (ETreeModel *etm);
- ETreePath (*get_node_by_id) (ETreeModel *etm,
+ gboolean (*has_get_node_by_id) (ETreeModel *tree_model);
+ ETreePath (*get_node_by_id) (ETreeModel *tree_model,
const gchar *save_id);
- gboolean (*has_change_pending) (ETreeModel *etm);
+ gboolean (*has_change_pending) (ETreeModel *tree_model);
/*
* ETable analogs
*/
- gpointer (*sort_value_at) (ETreeModel *etm,
- ETreePath node,
+ gpointer (*sort_value_at) (ETreeModel *tree_model,
+ ETreePath path,
gint col);
- gpointer (*value_at) (ETreeModel *etm,
- ETreePath node,
+ gpointer (*value_at) (ETreeModel *tree_model,
+ ETreePath path,
gint col);
- void (*set_value_at) (ETreeModel *etm,
- ETreePath node,
+ void (*set_value_at) (ETreeModel *tree_model,
+ ETreePath path,
gint col,
gconstpointer val);
- gboolean (*is_editable) (ETreeModel *etm,
- ETreePath node,
+ gboolean (*is_editable) (ETreeModel *tree_model,
+ ETreePath path,
gint col);
- gpointer (*duplicate_value) (ETreeModel *etm,
+ gpointer (*duplicate_value) (ETreeModel *tree_model,
gint col,
gconstpointer value);
- void (*free_value) (ETreeModel *etm,
+ void (*free_value) (ETreeModel *tree_model,
gint col,
gpointer value);
- gpointer (*initialize_value) (ETreeModel *etm,
+ gpointer (*initialize_value) (ETreeModel *tree_model,
gint col);
- gboolean (*value_is_empty) (ETreeModel *etm,
+ gboolean (*value_is_empty) (ETreeModel *tree_model,
gint col,
gconstpointer value);
- gchar * (*value_to_string) (ETreeModel *etm,
+ gchar * (*value_to_string) (ETreeModel *tree_model,
gint col,
gconstpointer value);
@@ -151,113 +151,113 @@ struct _ETreeModelClass {
* node_deleted, the ETreePath is no longer valid.
*/
- void (*pre_change) (ETreeModel *etm);
- void (*no_change) (ETreeModel *etm);
- void (*node_changed) (ETreeModel *etm,
- ETreePath node);
- void (*node_data_changed) (ETreeModel *etm,
- ETreePath node);
- void (*node_col_changed) (ETreeModel *etm,
- ETreePath node,
+ void (*pre_change) (ETreeModel *tree_model);
+ void (*no_change) (ETreeModel *tree_model);
+ void (*node_changed) (ETreeModel *tree_model,
+ ETreePath path);
+ void (*node_data_changed) (ETreeModel *tree_model,
+ ETreePath path);
+ void (*node_col_changed) (ETreeModel *tree_model,
+ ETreePath path,
gint col);
- void (*node_inserted) (ETreeModel *etm,
+ void (*node_inserted) (ETreeModel *tree_model,
ETreePath parent,
- ETreePath inserted_node);
- void (*node_removed) (ETreeModel *etm,
+ ETreePath inserted_path);
+ void (*node_removed) (ETreeModel *tree_model,
ETreePath parent,
- ETreePath removed_node,
+ ETreePath removed_path,
gint old_position);
- void (*node_deleted) (ETreeModel *etm,
- ETreePath deleted_node);
- void (*rebuilt) (ETreeModel *etm);
+ void (*node_deleted) (ETreeModel *tree_model,
+ ETreePath deleted_path);
+ void (*rebuilt) (ETreeModel *tree_model);
/* This signal requests that any viewers of the tree that
* collapse and expand nodes collapse this node.
*/
void (*node_request_collapse)
- (ETreeModel *etm,
- ETreePath node);
+ (ETreeModel *tree_model,
+ ETreePath path);
};
GType e_tree_model_get_type (void) G_GNUC_CONST;
ETreeModel * e_tree_model_new (void);
/* tree traversal operations */
-ETreePath e_tree_model_get_root (ETreeModel *etree);
-ETreePath e_tree_model_node_get_parent (ETreeModel *etree,
+ETreePath e_tree_model_get_root (ETreeModel *tree_model);
+ETreePath e_tree_model_node_get_parent (ETreeModel *tree_model,
ETreePath path);
ETreePath e_tree_model_node_get_first_child
- (ETreeModel *etree,
+ (ETreeModel *tree_model,
ETreePath path);
ETreePath e_tree_model_node_get_last_child
- (ETreeModel *etree,
+ (ETreeModel *tree_model,
ETreePath path);
-ETreePath e_tree_model_node_get_next (ETreeModel *etree,
+ETreePath e_tree_model_node_get_next (ETreeModel *tree_model,
ETreePath path);
-ETreePath e_tree_model_node_get_prev (ETreeModel *etree,
+ETreePath e_tree_model_node_get_prev (ETreeModel *tree_model,
ETreePath path);
/* node accessors */
-gboolean e_tree_model_node_is_root (ETreeModel *etree,
+gboolean e_tree_model_node_is_root (ETreeModel *tree_model,
ETreePath path);
-gboolean e_tree_model_node_is_expandable (ETreeModel *etree,
+gboolean e_tree_model_node_is_expandable (ETreeModel *tree_model,
ETreePath path);
-guint e_tree_model_node_get_children (ETreeModel *etree,
+guint e_tree_model_node_get_children (ETreeModel *tree_model,
ETreePath path,
ETreePath **paths);
-guint e_tree_model_node_depth (ETreeModel *etree,
+guint e_tree_model_node_depth (ETreeModel *tree_model,
ETreePath path);
-GdkPixbuf * e_tree_model_icon_at (ETreeModel *etree,
+GdkPixbuf * e_tree_model_icon_at (ETreeModel *tree_model,
ETreePath path);
gboolean e_tree_model_get_expanded_default
- (ETreeModel *model);
-gint e_tree_model_column_count (ETreeModel *model);
-gboolean e_tree_model_has_save_id (ETreeModel *model);
-gchar * e_tree_model_get_save_id (ETreeModel *model,
- ETreePath node);
-gboolean e_tree_model_has_get_node_by_id (ETreeModel *model);
-ETreePath e_tree_model_get_node_by_id (ETreeModel *model,
+ (ETreeModel *tree_model);
+gint e_tree_model_column_count (ETreeModel *tree_model);
+gboolean e_tree_model_has_save_id (ETreeModel *tree_model);
+gchar * e_tree_model_get_save_id (ETreeModel *tree_model,
+ ETreePath path);
+gboolean e_tree_model_has_get_node_by_id (ETreeModel *tree_model);
+ETreePath e_tree_model_get_node_by_id (ETreeModel *tree_model,
const gchar *save_id);
-gboolean e_tree_model_has_change_pending (ETreeModel *model);
-gpointer e_tree_model_sort_value_at (ETreeModel *etree,
- ETreePath node,
+gboolean e_tree_model_has_change_pending (ETreeModel *tree_model);
+gpointer e_tree_model_sort_value_at (ETreeModel *tree_model,
+ ETreePath path,
gint col);
-gpointer e_tree_model_value_at (ETreeModel *etree,
- ETreePath node,
+gpointer e_tree_model_value_at (ETreeModel *tree_model,
+ ETreePath path,
gint col);
-void e_tree_model_set_value_at (ETreeModel *etree,
- ETreePath node,
+void e_tree_model_set_value_at (ETreeModel *tree_model,
+ ETreePath path,
gint col,
gconstpointer val);
-gboolean e_tree_model_node_is_editable (ETreeModel *etree,
- ETreePath node,
+gboolean e_tree_model_node_is_editable (ETreeModel *tree_model,
+ ETreePath path,
gint col);
-gpointer e_tree_model_duplicate_value (ETreeModel *etree,
+gpointer e_tree_model_duplicate_value (ETreeModel *tree_model,
gint col,
gconstpointer value);
-void e_tree_model_free_value (ETreeModel *etree,
+void e_tree_model_free_value (ETreeModel *tree_model,
gint col,
gpointer value);
-gpointer e_tree_model_initialize_value (ETreeModel *etree,
+gpointer e_tree_model_initialize_value (ETreeModel *tree_model,
gint col);
-gboolean e_tree_model_value_is_empty (ETreeModel *etree,
+gboolean e_tree_model_value_is_empty (ETreeModel *tree_model,
gint col,
gconstpointer value);
-gchar * e_tree_model_value_to_string (ETreeModel *etree,
+gchar * e_tree_model_value_to_string (ETreeModel *tree_model,
gint col,
gconstpointer value);
/* depth first traversal of path's descendents, calling func on each one */
-void e_tree_model_node_traverse (ETreeModel *model,
+void e_tree_model_node_traverse (ETreeModel *tree_model,
ETreePath path,
ETreePathFunc func,
gpointer data);
void e_tree_model_node_traverse_preorder
- (ETreeModel *model,
+ (ETreeModel *tree_model,
ETreePath path,
ETreePathFunc func,
gpointer data);
-ETreePath e_tree_model_node_find (ETreeModel *model,
+ETreePath e_tree_model_node_find (ETreeModel *tree_model,
ETreePath path,
ETreePath end_path,
gboolean forward_direction,
@@ -271,24 +271,24 @@ void e_tree_model_pre_change (ETreeModel *tree_model);
void e_tree_model_no_change (ETreeModel *tree_model);
void e_tree_model_rebuilt (ETreeModel *tree_model);
void e_tree_model_node_changed (ETreeModel *tree_model,
- ETreePath node);
+ ETreePath path);
void e_tree_model_node_data_changed (ETreeModel *tree_model,
- ETreePath node);
+ ETreePath path);
void e_tree_model_node_col_changed (ETreeModel *tree_model,
- ETreePath node,
+ ETreePath path,
gint col);
void e_tree_model_node_inserted (ETreeModel *tree_model,
- ETreePath parent_node,
- ETreePath inserted_node);
+ ETreePath parent_path,
+ ETreePath inserted_path);
void e_tree_model_node_removed (ETreeModel *tree_model,
- ETreePath parent_node,
- ETreePath removed_node,
+ ETreePath parent_path,
+ ETreePath removed_path,
gint old_position);
void e_tree_model_node_deleted (ETreeModel *tree_model,
- ETreePath deleted_node);
+ ETreePath deleted_path);
void e_tree_model_node_request_collapse
(ETreeModel *tree_model,
- ETreePath deleted_node);
+ ETreePath collapsed_path);
G_END_DECLS
diff --git a/e-util/e-tree-selection-model.c b/e-util/e-tree-selection-model.c
index 480b5a4e8a..fc059d5e6d 100644
--- a/e-util/e-tree-selection-model.c
+++ b/e-util/e-tree-selection-model.c
@@ -422,15 +422,6 @@ etsm_is_path_selected (ETreeSelectionModel *etsm,
return FALSE;
}
-/**
- * e_selection_model_is_row_selected
- * @selection: #ESelectionModel to check
- * @n: The row to check
- *
- * This routine calculates whether the given row is selected.
- *
- * Returns: %TRUE if the given row is selected
- */
static gboolean
etsm_is_row_selected (ESelectionModel *selection,
gint row)
@@ -467,15 +458,6 @@ etsm_row_foreach_cb (gpointer key,
mac->callback (row, mac->closure);
}
-/**
- * e_selection_model_foreach
- * @selection: #ESelectionModel to traverse
- * @callback: The callback function to call back.
- * @closure: The closure
- *
- * This routine calls the given callback function once for each
- * selected row, passing closure as the closure.
- */
static void
etsm_foreach (ESelectionModel *selection,
EForeachFunc callback,
@@ -491,12 +473,6 @@ etsm_foreach (ESelectionModel *selection,
g_hash_table_foreach (etsm->priv->paths, etsm_row_foreach_cb, &mac);
}
-/**
- * e_selection_model_clear
- * @selection: #ESelectionModel to clear
- *
- * This routine clears the selection to no rows selected.
- */
static void
etsm_clear (ESelectionModel *selection)
{
@@ -509,14 +485,6 @@ etsm_clear (ESelectionModel *selection)
e_selection_model_cursor_changed (E_SELECTION_MODEL (etsm), -1, -1);
}
-/**
- * e_selection_model_selected_count
- * @selection: #ESelectionModel to count
- *
- * This routine calculates the number of rows selected.
- *
- * Returns: The number of rows selected in the given model.
- */
static gint
etsm_selected_count (ESelectionModel *selection)
{
@@ -532,13 +500,6 @@ etsm_row_count (ESelectionModel *selection)
return e_table_model_row_count (E_TABLE_MODEL (etsm->priv->etta));
}
-/**
- * e_selection_model_select_all
- * @selection: #ESelectionModel to select all
- *
- * This routine selects all the rows in the given
- * #ESelectionModel.
- */
static void
etsm_select_all (ESelectionModel *selection)
{
@@ -563,13 +524,6 @@ etsm_select_all (ESelectionModel *selection)
get_cursor_row (etsm), etsm->priv->cursor_col);
}
-/**
- * e_selection_model_invert_selection
- * @selection: #ESelectionModel to invert
- *
- * This routine inverts all the rows in the given
- * #ESelectionModel.
- */
static void
etsm_invert_selection (ESelectionModel *selection)
{
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index 139171c07d..5a6b52452e 100644
--- a/e-util/e-tree.c
+++ b/e-util/e-tree.c
@@ -1692,9 +1692,7 @@ e_tree_construct (ETree *e_tree,
ETableSpecification *specification;
ETableState *state;
- g_return_val_if_fail (e_tree != NULL, FALSE);
g_return_val_if_fail (E_IS_TREE (e_tree), FALSE);
- g_return_val_if_fail (etm != NULL, FALSE);
g_return_val_if_fail (E_IS_TREE_MODEL (etm), FALSE);
g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), FALSE);
g_return_val_if_fail (spec_str != NULL, FALSE);
@@ -1755,9 +1753,7 @@ e_tree_construct_from_spec_file (ETree *e_tree,
ETableSpecification *specification;
ETableState *state;
- g_return_val_if_fail (e_tree != NULL, FALSE);
g_return_val_if_fail (E_IS_TREE (e_tree), FALSE);
- g_return_val_if_fail (etm != NULL, FALSE);
g_return_val_if_fail (E_IS_TREE_MODEL (etm), FALSE);
g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), FALSE);
g_return_val_if_fail (spec_fn != NULL, FALSE);
@@ -1802,8 +1798,8 @@ e_tree_construct_from_spec_file (ETree *e_tree,
* e_tree_new:
* @etm: The model for this tree
* @ete: An optional #ETableExtras (%NULL is valid.)
- * @spec: The spec
- * @state: An optional state (%NULL is valid.)
+ * @spec_str: The spec
+ * @state_str: An optional state (%NULL is valid.)
*
* This function creates an #ETree from the given parameters. The
* #ETreeModel is a tree model to be represented. The #ETableExtras
@@ -1822,19 +1818,18 @@ e_tree_construct_from_spec_file (ETree *e_tree,
GtkWidget *
e_tree_new (ETreeModel *etm,
ETableExtras *ete,
- const gchar *spec,
- const gchar *state)
+ const gchar *spec_str,
+ const gchar *state_str)
{
ETree *e_tree;
- g_return_val_if_fail (etm != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etm), NULL);
g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), NULL);
- g_return_val_if_fail (spec != NULL, NULL);
+ g_return_val_if_fail (spec_str != NULL, NULL);
e_tree = g_object_new (E_TYPE_TREE, NULL);
- if (!e_tree_construct (e_tree, etm, ete, spec, state)) {
+ if (!e_tree_construct (e_tree, etm, ete, spec_str, state_str)) {
g_object_unref (e_tree);
return NULL;
}
@@ -1870,7 +1865,6 @@ e_tree_new_from_spec_file (ETreeModel *etm,
{
ETree *e_tree;
- g_return_val_if_fail (etm != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etm), NULL);
g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), NULL);
g_return_val_if_fail (spec_fn != NULL, NULL);
diff --git a/e-util/e-tree.h b/e-util/e-tree.h
index ace9aedb39..0fbdd67d17 100644
--- a/e-util/e-tree.h
+++ b/e-util/e-tree.h
@@ -175,12 +175,12 @@ GType e_tree_get_type (void) G_GNUC_CONST;
gboolean e_tree_construct (ETree *e_tree,
ETreeModel *etm,
ETableExtras *ete,
- const gchar *spec,
- const gchar *state);
+ const gchar *spec_str,
+ const gchar *state_str);
GtkWidget * e_tree_new (ETreeModel *etm,
ETableExtras *ete,
- const gchar *spec,
- const gchar *state);
+ const gchar *spec_str,
+ const gchar *state_str);
/* Create an ETree using files. */
gboolean e_tree_construct_from_spec_file (ETree *e_tree,
@@ -205,7 +205,7 @@ ETableSpecification *
void e_tree_set_search_column (ETree *e_tree,
gint col);
void e_tree_set_state (ETree *e_tree,
- const gchar *state);
+ const gchar *state_str);
void e_tree_set_state_object (ETree *e_tree,
ETableState *state);
void e_tree_load_state (ETree *e_tree,
diff --git a/e-util/gal-define-views-model.h b/e-util/gal-define-views-model.h
index 19a5028aa6..8bc243d52c 100644
--- a/e-util/gal-define-views-model.h
+++ b/e-util/gal-define-views-model.h
@@ -74,13 +74,13 @@ ETableModel * gal_define_views_model_new (void);
void gal_define_views_model_append (GalDefineViewsModel *model,
GalView *view);
GalView * gal_define_views_model_get_view (GalDefineViewsModel *model,
- gint i);
+ gint n);
void gal_define_views_model_delete_view
(GalDefineViewsModel *model,
- gint i);
+ gint n);
void gal_define_views_model_copy_view
(GalDefineViewsModel *model,
- gint i);
+ gint n);
G_END_DECLS
diff --git a/e-util/gal-view-factory-etable.c b/e-util/gal-view-factory-etable.c
index 632c959a85..cfa7bc2fb5 100644
--- a/e-util/gal-view-factory-etable.c
+++ b/e-util/gal-view-factory-etable.c
@@ -168,7 +168,7 @@ gal_view_factory_etable_init (GalViewFactoryEtable *factory)
}
/**
- * gal_view_etable_new:
+ * gal_view_factory_etable_new:
* @specification: The spec to create GalViewEtables based upon.
*
* A new GalViewFactory for creating ETable views. Create one of