aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-05-12 07:59:32 +0800
committerChris Toshok <toshok@src.gnome.org>2001-05-12 07:59:32 +0800
commitd35a3f652b8059e20e6dbe53f5f136bdf7f2f354 (patch)
tree4d374f42efa5e7c0a013f66152d94e34af81c176 /shell/e-storage-set-view.c
parent12de520a89398e2c9810f042b3d10e3c4c1ed1ef (diff)
downloadgsoc2013-evolution-d35a3f652b8059e20e6dbe53f5f136bdf7f2f354.tar
gsoc2013-evolution-d35a3f652b8059e20e6dbe53f5f136bdf7f2f354.tar.gz
gsoc2013-evolution-d35a3f652b8059e20e6dbe53f5f136bdf7f2f354.tar.bz2
gsoc2013-evolution-d35a3f652b8059e20e6dbe53f5f136bdf7f2f354.tar.lz
gsoc2013-evolution-d35a3f652b8059e20e6dbe53f5f136bdf7f2f354.tar.xz
gsoc2013-evolution-d35a3f652b8059e20e6dbe53f5f136bdf7f2f354.tar.zst
gsoc2013-evolution-d35a3f652b8059e20e6dbe53f5f136bdf7f2f354.zip
add RemoveFolder menu item and verb. (folder_context_menu_remove_cb): new
2001-05-11 Chris Toshok <toshok@ximian.com> * e-storage-set-view.c (populate_folder_context_menu_with_common_items): add RemoveFolder menu item and verb. (folder_context_menu_remove_cb): new function, call e_storage_set_async_remove_folder. (remove_cb): callack for e_storage_set_async_remove_folder. * evolution-shell-component-client.c (evolution_shell_component_client_populate_folder_context_menu): fix prototype to reflect Component -> Container. * evolution-shell-component-client.h: same. svn path=/trunk/; revision=9778
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 2a51735854..8b9d054361 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -647,12 +647,34 @@ folder_context_menu_activate_cb (BonoboUIComponent *uih,
}
static void
+remove_cb(EStorageSet *storage_set, EStorageResult result, void *data)
+{
+ g_print ("remove_cb: %d\n", result);
+}
+
+static void
+folder_context_menu_remove_cb (BonoboUIComponent *uih,
+ void *data,
+ const char *path)
+{
+ EStorageSetView *storage_set_view;
+ EStorageSetViewPrivate *priv;
+
+ storage_set_view = E_STORAGE_SET_VIEW (data);
+ priv = storage_set_view->priv;
+
+ e_storage_set_async_remove_folder (priv->storage_set, priv->selected_row_path,
+ remove_cb, storage_set_view);
+}
+
+static void
populate_folder_context_menu_with_common_items (EStorageSetView *storage_set_view,
BonoboUIComponent *uih)
{
static char popup_xml[] =
"<submenu name=\"Folder\" _label=\"Folder\">\n"
" <menuitem name=\"Activate\" verb=\"ActivateView\" _label=\"_View\" _tip=\"View the selected folder\"/>\n"
+ " <menuitem name=\"Remove\" verb=\"RemoveFolder\" _label=\"_Remove\" _tip=\"Remove the selected folder\"/>\n"
" <placeholder name=\"componentPlaceholder\" delimit=\"top\"/>\n"
#ifdef DEBUG_XML
" <separator/>\n"
@@ -664,6 +686,10 @@ populate_folder_context_menu_with_common_items (EStorageSetView *storage_set_vie
folder_context_menu_activate_cb,
storage_set_view);
+ bonobo_ui_component_add_verb (uih, "RemoveFolder",
+ folder_context_menu_remove_cb,
+ storage_set_view);
+
bonobo_ui_component_set_translate (uih, "/popups/folderPopup", popup_xml, NULL);
}