diff options
author | Bolian Yin <bolian.yin@sun.com> | 2003-11-11 11:42:17 +0800 |
---|---|---|
committer | Bolian Yin <byin@src.gnome.org> | 2003-11-11 11:42:17 +0800 |
commit | ad315e4a7d241e510888b8e18188e4cf30cd8077 (patch) | |
tree | 58ec240cf06f1fdaedf1d6e6758757e2c1e5178f /widgets/table | |
parent | 8e69b93f1596d3f4844c26cfd99767295db8be03 (diff) | |
download | gsoc2013-evolution-ad315e4a7d241e510888b8e18188e4cf30cd8077.tar.gz gsoc2013-evolution-ad315e4a7d241e510888b8e18188e4cf30cd8077.tar.zst gsoc2013-evolution-ad315e4a7d241e510888b8e18188e4cf30cd8077.zip |
Fixes # 50480
2003-11-11 Bolian Yin <bolian.yin@sun.com>
Fixes # 50480
* e-table-item: add two signals: "selection_model_removed" and "selection_model_added"
svn path=/trunk/; revision=23281
Diffstat (limited to 'widgets/table')
-rw-r--r-- | widgets/table/e-table-item.c | 28 | ||||
-rw-r--r-- | widgets/table/e-table-item.h | 2 |
2 files changed, 30 insertions, 0 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index d02b4501ad..4a2bd6f33b 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -75,6 +75,8 @@ enum { KEY_PRESS, START_DRAG, STYLE_SET, + SELECTION_MODEL_REMOVED, + SELECTION_MODEL_ADDED, LAST_SIGNAL }; @@ -551,6 +553,8 @@ eti_remove_selection_model (ETableItem *eti) eti->cursor_change_id); g_signal_handler_disconnect (eti->selection, eti->cursor_activated_id); + g_signal_emit_by_name (G_OBJECT(eti), + "selection_model_removed", eti->selection); g_object_unref (eti->selection); eti->selection_change_id = 0; @@ -1315,6 +1319,8 @@ eti_add_selection_model (ETableItem *eti, ESelectionModel *selection) G_CALLBACK (eti_cursor_activated), eti); eti_selection_change(selection, eti); + g_signal_emit_by_name (G_OBJECT(eti), + "selection_model_added", eti->selection); } static void @@ -2897,6 +2903,8 @@ eti_class_init (GObjectClass *object_class) eti_class->key_press = NULL; eti_class->start_drag = NULL; eti_class->style_set = eti_style_set; + eti_class->selection_model_removed = NULL; + eti_class->selection_model_added = NULL; g_object_class_install_property (object_class, PROP_TABLE_HEADER, g_param_spec_object ("ETableHeader", @@ -3072,6 +3080,26 @@ eti_class_init (GObjectClass *object_class) e_marshal_NONE__OBJECT, G_TYPE_NONE, 1, GTK_TYPE_STYLE); + eti_signals[SELECTION_MODEL_REMOVED] = + g_signal_new ("selection_model_removed", + G_TYPE_FROM_CLASS (object_class), + G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (ETableItemClass, selection_model_removed), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, + G_TYPE_POINTER); + + eti_signals[SELECTION_MODEL_ADDED] = + g_signal_new ("selection_model_added", + G_TYPE_FROM_CLASS (object_class), + G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (ETableItemClass, selection_model_added), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, + G_TYPE_POINTER); + atk_registry_set_factory_type (atk_get_default_registry (), E_TABLE_ITEM_TYPE, gal_a11y_e_table_item_factory_get_type ()); diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h index 4776bc8ca7..e5b5322019 100644 --- a/widgets/table/e-table-item.h +++ b/widgets/table/e-table-item.h @@ -182,6 +182,8 @@ typedef struct { gint (*key_press) (ETableItem *eti, int row, int col, GdkEvent *event); gint (*start_drag) (ETableItem *eti, int row, int col, GdkEvent *event); void (*style_set) (ETableItem *eti, GtkStyle *previous_style); + void (*selection_model_removed) (ETableItem *eti, ESelectionModel *selection); + void (*selection_model_added) (ETableItem *eti, ESelectionModel *selection); } ETableItemClass; GType e_table_item_get_type (void); |