aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-27 06:55:27 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-27 06:55:27 +0800
commit62c86e7472d3e4c13726bb6b3c735f1fc47b0151 (patch)
treeea0f85af2c1f831d10137b6fa06f67a5f5dd187b /shell/e-storage-set-view.c
parentb49fae7c51b832be0fdc7b7068708834d2dcbb1e (diff)
downloadgsoc2013-evolution-62c86e7472d3e4c13726bb6b3c735f1fc47b0151.tar
gsoc2013-evolution-62c86e7472d3e4c13726bb6b3c735f1fc47b0151.tar.gz
gsoc2013-evolution-62c86e7472d3e4c13726bb6b3c735f1fc47b0151.tar.bz2
gsoc2013-evolution-62c86e7472d3e4c13726bb6b3c735f1fc47b0151.tar.lz
gsoc2013-evolution-62c86e7472d3e4c13726bb6b3c735f1fc47b0151.tar.xz
gsoc2013-evolution-62c86e7472d3e4c13726bb6b3c735f1fc47b0151.tar.zst
gsoc2013-evolution-62c86e7472d3e4c13726bb6b3c735f1fc47b0151.zip
New helper function. (folder_selected_cb): Call it.
* e-shell-view.c (setup_verb_sensitivity_for_folder): New helper function. (folder_selected_cb): Call it. (folder_context_menu_popping_up_cb): New callback for the "folder_context_menu_popping_up" signal on the folder bar's EStorageSetView; set the sensitivities of the verbs according to the right-clicked folder. (folder_context_menu_popped_down_cb): New, callback for the "folder_context_menu_popped_down" signal on the folder bar's EStorageSetView; set the sensitivities of the verbs according to the currently displayed folder. (e_shell_view_get_folder_bar_right_click_path): Add a cast to placate a warning. * e-storage-set-view.c (class_init): Set up the "folder_context_menu_popping_up" and "folder_context_menu_popped_down" signals. (right_click): Emit "folder_context_menu_popping_up" before popping up the menu, "folder_context_menu_popped_down" after the menu is gone. * e-storage-set-view.h: New signals "folder_context_menu_popping_up" and "folder_context_menu_popped_down". svn path=/trunk/; revision=13171
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index fe941b2715..96b705954a 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -106,6 +106,8 @@ enum {
FOLDER_SELECTED,
STORAGE_SELECTED,
DND_ACTION,
+ FOLDER_CONTEXT_MENU_POPPING_UP,
+ FOLDER_CONTEXT_MENU_POPPED_DOWN,
LAST_SIGNAL
};
@@ -1248,9 +1250,17 @@ right_click (ETree *etree,
g_free (priv->right_click_row_path);
priv->right_click_row_path = g_strdup (e_tree_memory_node_get_data (E_TREE_MEMORY(priv->etree_model), path));
- if (priv->container)
+ if (priv->container) {
+ gtk_signal_emit (GTK_OBJECT (storage_set_view),
+ signals[FOLDER_CONTEXT_MENU_POPPING_UP],
+ priv->right_click_row_path);
+
popup_folder_menu (storage_set_view, (GdkEventButton *) event);
+ gtk_signal_emit (GTK_OBJECT (storage_set_view),
+ signals[FOLDER_CONTEXT_MENU_POPPED_DOWN]);
+ }
+
g_free (priv->right_click_row_path);
priv->right_click_row_path = NULL;
@@ -1671,6 +1681,23 @@ class_init (EStorageSetViewClass *klass)
GTK_TYPE_STRING,
GTK_TYPE_STRING);
+ signals[FOLDER_CONTEXT_MENU_POPPING_UP]
+ = gtk_signal_new ("folder_context_menu_popping_up",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_context_menu_popping_up),
+ gtk_marshal_NONE__STRING,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_STRING);
+
+ signals[FOLDER_CONTEXT_MENU_POPPED_DOWN]
+ = gtk_signal_new ("folder_context_menu_popped_down",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_context_menu_popped_down),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
}