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
This commit is contained in:
Christopher James Lahey
2000-11-02 17:28:16 +00:00
committed by Chris Lahey
parent e72460cd5b
commit 89beb886b9
5 changed files with 130 additions and 100 deletions

View File

@ -178,85 +178,6 @@
</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>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>
@ -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>

View File

@ -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:");

View File

@ -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,

View File

@ -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,

View File

@ -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 */