diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-11-03 01:28:16 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-11-03 01:28:16 +0800 |
commit | 89beb886b9c5e242e7a426e51d2d9d4810a79cd4 (patch) | |
tree | 97cc07255dfe64f3e96f715ec91b356d5e331518 /widgets/table | |
parent | e72460cd5b8e5b6522e4f9702e351c034715c31c (diff) | |
download | gsoc2013-evolution-89beb886b9c5e242e7a426e51d2d9d4810a79cd4.tar.gz gsoc2013-evolution-89beb886b9c5e242e7a426e51d2d9d4810a79cd4.tar.zst gsoc2013-evolution-89beb886b9c5e242e7a426e51d2d9d4810a79cd4.zip |
Updated these unused glade files to better match the versions in the code.
2000-11-02 Christopher James Lahey <clahey@helixcode.com>
* e-table-config.glade, e-table-config.glade.h: Updated these
unused glade files to better match the versions in the code.
* e-table.c, e-table.h: Added e_table_selected_count and
"selection_change" signal.
* e-tree-model.c: Fixed an out of order
svn path=/trunk/; revision=6354
Diffstat (limited to 'widgets/table')
-rw-r--r-- | widgets/table/e-table-config.glade | 158 | ||||
-rw-r--r-- | widgets/table/e-table-config.glade.h | 8 | ||||
-rw-r--r-- | widgets/table/e-table.c | 60 | ||||
-rw-r--r-- | widgets/table/e-table.h | 2 | ||||
-rw-r--r-- | widgets/table/e-tree-model.c | 2 |
5 files changed, 130 insertions, 100 deletions
diff --git a/widgets/table/e-table-config.glade b/widgets/table/e-table-config.glade index 823992af39..3cc9c0e8e7 100644 --- a/widgets/table/e-table-config.glade +++ b/widgets/table/e-table-config.glade @@ -179,85 +179,6 @@ </widget> <widget> - <class>GtkLabel</class> - <name>label5</name> - <label>Icon, Attachment, Flag Status, -Full Name, Company, </label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>0</top_attach> - <bottom_attach>1</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>False</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> - <class>GtkLabel</class> - <name>label6</name> - <label>None</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>1</top_attach> - <bottom_attach>2</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>False</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> - <class>GtkLabel</class> - <name>label7</name> - <label>File As (ascending</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>2</top_attach> - <bottom_attach>3</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>False</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> <class>GtkButton</class> <name>button15</name> <can_default>True</can_default> @@ -340,6 +261,85 @@ Full Name, Company, </label> <yfill>False</yfill> </child> </widget> + + <widget> + <class>GtkLabel</class> + <name>label5</name> + <label>Icon, Attachment, Flag Status, +Full Name, Company, </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>True</yfill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label6</name> + <label>None</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>True</yfill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label7</name> + <label>File As (ascending)</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>True</yfill> + </child> + </widget> </widget> </widget> </widget> diff --git a/widgets/table/e-table-config.glade.h b/widgets/table/e-table-config.glade.h index ce5520bb27..de73232529 100644 --- a/widgets/table/e-table-config.glade.h +++ b/widgets/table/e-table-config.glade.h @@ -6,13 +6,13 @@ gchar *s = N_("View Summary"); gchar *s = N_("Description"); -gchar *s = N_("Icon, Attachment, Flag Status,\n" - "Full Name, Company, "); -gchar *s = N_("None"); -gchar *s = N_("File As (ascending"); gchar *s = N_("_Fields..."); gchar *s = N_("_Sort..."); gchar *s = N_("_Group By..."); +gchar *s = N_("Icon, Attachment, Flag Status,\n" + "Full Name, Company, "); +gchar *s = N_("None"); +gchar *s = N_("File As (ascending)"); gchar *s = N_("Show Fields"); gchar *s = N_("A_vailable Fields:"); gchar *s = N_("Sh_ow these fields in order:"); diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 88e305b88d..6da35fea39 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -41,6 +41,7 @@ static GtkObjectClass *e_table_parent_class; enum { CURSOR_CHANGE, + SELECTION_CHANGE, DOUBLE_CLICK, RIGHT_CLICK, CLICK, @@ -837,6 +838,12 @@ void e_table_save_state (ETable *e_table gtk_object_sink(GTK_OBJECT(state)); } +static void +et_selection_model_selection_change (ETableGroup *etg, ETable *et) +{ + gtk_signal_emit (GTK_OBJECT (et), + et_signals [SELECTION_CHANGE]); +} static ETable * et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, @@ -880,6 +887,9 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, "sorter", e_table->sorter, NULL); + gtk_signal_connect(GTK_OBJECT(e_table->selection), "selection_changed", + GTK_SIGNAL_FUNC(et_selection_model_selection_change), e_table); + if (!specification->no_headers) { e_table_setup_header (e_table); } @@ -1204,6 +1214,15 @@ e_table_selected_row_foreach (ETable *e_table, closure); } +gint +e_table_selected_count (ETable *e_table) +{ + g_return_val_if_fail(e_table != NULL, -1); + g_return_val_if_fail(E_IS_TABLE(e_table), -1); + + return e_table_selection_model_selected_count(e_table->selection); +} + void e_table_select_all (ETable *table) { @@ -1887,25 +1906,26 @@ e_table_class_init (GtkObjectClass *object_class) e_table_parent_class = gtk_type_class (PARENT_TYPE); - object_class->destroy = et_destroy; - object_class->set_arg = et_set_arg; - object_class->get_arg = et_get_arg; + object_class->destroy = et_destroy; + object_class->set_arg = et_set_arg; + object_class->get_arg = et_get_arg; - klass->cursor_change = NULL; - klass->double_click = NULL; - klass->right_click = NULL; - klass->click = NULL; - klass->key_press = NULL; + klass->cursor_change = NULL; + klass->selection_change = NULL; + klass->double_click = NULL; + klass->right_click = NULL; + klass->click = NULL; + klass->key_press = NULL; - klass->table_drag_begin = NULL; - klass->table_drag_end = NULL; - klass->table_drag_data_get = NULL; - klass->table_drag_data_delete = NULL; + klass->table_drag_begin = NULL; + klass->table_drag_end = NULL; + klass->table_drag_data_get = NULL; + klass->table_drag_data_delete = NULL; - klass->table_drag_leave = NULL; - klass->table_drag_motion = NULL; - klass->table_drag_drop = NULL; - klass->table_drag_data_received = NULL; + klass->table_drag_leave = NULL; + klass->table_drag_motion = NULL; + klass->table_drag_drop = NULL; + klass->table_drag_data_received = NULL; et_signals [CURSOR_CHANGE] = gtk_signal_new ("cursor_change", @@ -1915,6 +1935,14 @@ e_table_class_init (GtkObjectClass *object_class) gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); + et_signals [SELECTION_CHANGE] = + gtk_signal_new ("selection_change", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (ETableClass, selection_change), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); + et_signals [DOUBLE_CLICK] = gtk_signal_new ("double_click", GTK_RUN_LAST, diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h index 2d115e54fb..9954c934f7 100644 --- a/widgets/table/e-table.h +++ b/widgets/table/e-table.h @@ -101,6 +101,7 @@ typedef struct { GtkTableClass parent_class; void (*cursor_change) (ETable *et, int row); + void (*selection_change) (ETable *et); void (*double_click) (ETable *et, int row); gint (*right_click) (ETable *et, int row, int col, GdkEvent *event); gint (*click) (ETable *et, int row, int col, GdkEvent *event); @@ -207,6 +208,7 @@ int e_table_get_cursor_row (ETable *e_table void e_table_selected_row_foreach (ETable *e_table, ETableForeachFunc callback, gpointer closure); +gint e_table_selected_count (ETable *e_table); EPrintable *e_table_get_printable (ETable *e_table); gint e_table_get_next_row (ETable *e_table, diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c index 2b5f3fa6b0..6e8c7856dd 100644 --- a/widgets/table/e-tree-model.c +++ b/widgets/table/e-tree-model.c @@ -994,8 +994,8 @@ e_tree_model_node_remove (ETreeModel *etree, ETreePath *path) if (parent) { if (e_tree_model_node_is_visible (etree, path)) { int row = e_tree_model_row_of_node (etree, path); - e_table_model_row_deleted (E_TABLE_MODEL (etree), row); priv->row_array = g_array_remove_index (priv->row_array, row); + e_table_model_row_deleted (E_TABLE_MODEL (etree), row); /* we need to iterate back up to the root, incrementing the number of visible descendents */ |