diff options
author | Chris Toshok <toshok@helixcode.com> | 2000-10-03 10:53:08 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-10-03 10:53:08 +0800 |
commit | cc6dbb8f3cf2f9d64e0f0577a08177630e72219b (patch) | |
tree | 83e6c04ea986f69de94f268c793601773db4d54a /shell/e-storage-set-view.c | |
parent | 78320752289da1ace70bf6bfe3edef1671a3be61 (diff) | |
download | gsoc2013-evolution-cc6dbb8f3cf2f9d64e0f0577a08177630e72219b.tar.gz gsoc2013-evolution-cc6dbb8f3cf2f9d64e0f0577a08177630e72219b.tar.zst gsoc2013-evolution-cc6dbb8f3cf2f9d64e0f0577a08177630e72219b.zip |
add storage_selected behavior - loop over the listeners calling
2000-10-02 Chris Toshok <toshok@helixcode.com>
* evolution-storage-set-view.c: add storage_selected behavior -
loop over the listeners calling _storage_selected.
* Evolution-StorageSetView.idl: add storage_selected to the
Listener interface.
* e-storage-set-view.c add storage_selected signal.
(on_cursor_change): if the depth is less than 2, emit
"storage_selected", otherwise emit "folder_selected".
* e-storage-set-view.h: add storage_selected signal.
* evolution-storage-set-view-listener.h: add storage_selected
signal.
* evolution-storage-set-view-listener.c: add storage_selected
signal.
svn path=/trunk/; revision=5686
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r-- | shell/e-storage-set-view.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index 3fb50f4b13..040e2dc571 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -69,6 +69,7 @@ struct _EStorageSetViewPrivate { enum { FOLDER_SELECTED, + STORAGE_SELECTED, LAST_SIGNAL }; @@ -678,6 +679,15 @@ class_init (EStorageSetViewClass *klass) GTK_TYPE_NONE, 1, GTK_TYPE_STRING); + signals[FOLDER_SELECTED] + = gtk_signal_new ("storage_selected", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageSetViewClass, storage_selected), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); /* Set up DND. */ @@ -859,14 +869,18 @@ on_cursor_change (EStorageSetView *storage_set_view, int row, gpointer user_data node = e_tree_model_node_at_row (priv->etree_model, row); - /* don't emit the folder selected signal for storages */ - if (e_tree_model_node_depth (priv->etree_model, node) < 2) - return; - priv->selected_row_path = e_tree_model_node_get_data (priv->etree_model, node); - gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[FOLDER_SELECTED], - priv->selected_row_path); + if (e_tree_model_node_depth (priv->etree_model, node) >= 2) { + /* it was a folder */ + gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[FOLDER_SELECTED], + priv->selected_row_path); + } + else { + /* it was a storage */ + gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[STORAGE_SELECTED], + priv->selected_row_path); + } } void |