aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-10 11:22:33 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-10 11:22:33 +0800
commitf37767da8e80f84a5ecf98c17259c24c9a875ebc (patch)
tree0dc6fcf7ac16b158cdc59a22b2f453a91efbb608 /widgets
parentbdb627f2439cdff4c1acd0ed05bcd16d3b45c139 (diff)
downloadgsoc2013-evolution-f37767da8e80f84a5ecf98c17259c24c9a875ebc.tar.gz
gsoc2013-evolution-f37767da8e80f84a5ecf98c17259c24c9a875ebc.tar.zst
gsoc2013-evolution-f37767da8e80f84a5ecf98c17259c24c9a875ebc.zip
Changed resizeable to resizable in ETableCol for consistency.
2001-04-09 Christopher James Lahey <clahey@ximian.com> * e-table-col.c, e-table-col.h, e-table-header-item.c, e-table-header.c, e-table-item.c: Changed resizeable to resizable in ETableCol for consistency. * e-tree-selection-model.c (etsm_row_of_node): Return -1 here if the path isn't found. (etsm_sorted_node_changed): If cursor_row is -1, make cursor_col -1 as well. svn path=/trunk/; revision=9211
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-table-col.c4
-rw-r--r--widgets/table/e-table-col.h2
-rw-r--r--widgets/table/e-table-header-item.c12
-rw-r--r--widgets/table/e-table-header.c14
-rw-r--r--widgets/table/e-table-item.c6
-rw-r--r--widgets/table/e-tree-selection-model.c8
6 files changed, 25 insertions, 21 deletions
diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c
index 38ae4a9b51..7a67a7cf55 100644
--- a/widgets/table/e-table-col.c
+++ b/widgets/table/e-table-col.c
@@ -140,7 +140,7 @@ e_table_col_new (int col_idx, const char *text, double expansion, int min_width,
etc->compare = compare;
etc->selected = 0;
- etc->resizeable = resizable;
+ etc->resizable = resizable;
gtk_object_ref (GTK_OBJECT(etc->ecell));
@@ -198,7 +198,7 @@ e_table_col_new_with_pixbuf (int col_idx, const char *text, GdkPixbuf *pixbuf, d
etc->compare = compare;
etc->selected = 0;
- etc->resizeable = resizable;
+ etc->resizable = resizable;
gtk_object_ref (GTK_OBJECT(etc->ecell));
gdk_pixbuf_ref (etc->pixbuf);
diff --git a/widgets/table/e-table-col.h b/widgets/table/e-table-col.h
index 036b317d69..8377beb37e 100644
--- a/widgets/table/e-table-col.h
+++ b/widgets/table/e-table-col.h
@@ -35,7 +35,7 @@ typedef struct {
GCompareFunc compare;
unsigned int is_pixbuf:1;
unsigned int selected:1;
- unsigned int resizeable:1;
+ unsigned int resizable:1;
unsigned int sortable:1;
unsigned int groupable:1;
int col_idx;
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 2a7c36facf..12f6c1f9db 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -889,7 +889,7 @@ set_cursor (ETableHeaderItem *ethi, int pos)
{
int col;
GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas);
- gboolean resizeable = FALSE;
+ gboolean resizable = FALSE;
/* We might be invoked before we are realized */
if (!canvas->window)
@@ -900,7 +900,7 @@ set_cursor (ETableHeaderItem *ethi, int pos)
ETableCol *ecol = e_table_header_get_column (ethi->eth, col);
/* Last column is not resizable */
- if (ecol->resizeable && col != last_col) {
+ if (ecol->resizable && col != last_col) {
int c = col + 1;
/* Column is not resizable if all columns after it
@@ -909,15 +909,15 @@ set_cursor (ETableHeaderItem *ethi, int pos)
ETableCol *ecol2;
ecol2 = e_table_header_get_column (ethi->eth, c);
- if (ecol2->resizeable) {
- resizeable = TRUE;
+ if (ecol2->resizable) {
+ resizable = TRUE;
break;
}
}
}
}
- if (resizeable)
+ if (resizable)
e_cursor_set (canvas->window, E_CURSOR_SIZE_X);
else
gdk_window_set_cursor (canvas->window, NULL);
@@ -1429,7 +1429,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
*/
ecol = e_table_header_get_column (ethi->eth, col);
- if (!ecol->resizeable)
+ if (!ecol->resizable)
break;
ethi->resize_col = col;
ethi->resize_start_pos = start - ecol->width;
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 58d60480cd..6b378e7df0 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -619,7 +619,7 @@ eth_set_size (ETableHeader *eth, int idx, int size)
g_return_if_fail (idx < eth->col_count);
/* If this column is not resizable, don't do anything. */
- if (!eth->columns[idx]->resizeable)
+ if (!eth->columns[idx]->resizable)
return;
expansion = 0;
@@ -642,7 +642,7 @@ eth_set_size (ETableHeader *eth, int idx, int size)
*/
for (; i < eth->col_count; i++) {
min_width += eth->columns[i]->min_width + eth->width_extras;
- if (eth->columns[i]->resizeable) {
+ if (eth->columns[i]->resizable) {
expansion += eth->columns[i]->expansion;
expandable_count ++;
}
@@ -703,7 +703,7 @@ eth_set_size (ETableHeader *eth, int idx, int size)
*/
if (old_expansion == 0) {
for (i = idx + 1; i < eth->col_count; i++) {
- if (eth->columns[idx]->resizeable) {
+ if (eth->columns[idx]->resizable) {
/* expandable_count != 0 by (1) */
eth->columns[i]->expansion = expansion / expandable_count;
}
@@ -714,7 +714,7 @@ eth_set_size (ETableHeader *eth, int idx, int size)
/* Remove from total_extra the amount used for this column. */
total_extra -= size - (eth->columns[idx]->min_width + eth->width_extras);
for (i = idx + 1; i < eth->col_count; i++) {
- if (eth->columns[idx]->resizeable) {
+ if (eth->columns[idx]->resizable) {
/* old_expansion != 0 by (2) */
eth->columns[i]->expansion *= expansion / old_expansion;
}
@@ -769,9 +769,9 @@ eth_calc_widths (ETableHeader *eth)
expansion = 0;
for (i = 0; i < eth->col_count; i++) {
extra -= eth->columns[i]->min_width + eth->width_extras;
- if (eth->columns[i]->resizeable && eth->columns[i]->expansion > 0)
+ if (eth->columns[i]->resizable && eth->columns[i]->expansion > 0)
last_resizable = i;
- expansion += eth->columns[i]->resizeable ? eth->columns[i]->expansion : 0;
+ expansion += eth->columns[i]->resizable ? eth->columns[i]->expansion : 0;
eth->columns[i]->width = eth->columns[i]->min_width + eth->width_extras;
}
if (eth->sort_info)
@@ -779,7 +779,7 @@ eth_calc_widths (ETableHeader *eth)
if (expansion == 0 || extra <= 0)
return;
for (i = 0; i < last_resizable; i++) {
- next_position += extra * (eth->columns[i]->resizeable ? eth->columns[i]->expansion : 0)/expansion;
+ next_position += extra * (eth->columns[i]->resizable ? eth->columns[i]->expansion : 0)/expansion;
eth->columns[i]->width += next_position - last_position;
last_position = next_position;
}
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 36b79866bb..8408a5805a 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -2428,13 +2428,13 @@ e_table_item_calculate_print_widths (ETableHeader *eth, gdouble width)
expansion = 0;
for (i = 0; i < eth->col_count; i++) {
extra -= eth->columns[i]->min_width * scale;
- if (eth->columns[i]->resizeable && eth->columns[i]->expansion > 0)
+ if (eth->columns[i]->resizable && eth->columns[i]->expansion > 0)
last_resizable = i;
- expansion += eth->columns[i]->resizeable ? eth->columns[i]->expansion : 0;
+ expansion += eth->columns[i]->resizable ? eth->columns[i]->expansion : 0;
widths[i] = eth->columns[i]->min_width * scale;
}
for (i = 0; i <= last_resizable; i++) {
- widths[i] += extra * (eth->columns[i]->resizeable ? eth->columns[i]->expansion : 0)/expansion;
+ widths[i] += extra * (eth->columns[i]->resizable ? eth->columns[i]->expansion : 0)/expansion;
}
return widths;
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index 30cbc5aa90..e376352f19 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -142,7 +142,7 @@ etsm_row_of_node(ETreeSelectionModel *etsm, ETreePath path)
if (path)
return e_tree_table_adapter_row_of_node(etsm->priv->etta, path);
else
- return 0;
+ return -1;
}
static int
@@ -389,8 +389,12 @@ etsm_sorted_pre_change (ETreeModel *etm, ETreeSelectionModel *etsm)
static void
etsm_sorted_node_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel *etsm)
{
+ int cursor_row = etsm_cursor_row_real (etsm);
e_selection_model_selection_changed(E_SELECTION_MODEL(etsm));
- e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), etsm_cursor_row_real(etsm), etsm->priv->cursor_col);
+ if (cursor_row != -1)
+ e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), cursor_row, etsm->priv->cursor_col);
+ else
+ e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), -1, -1);
}
static void