From d35a3f652b8059e20e6dbe53f5f136bdf7f2f354 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 11 May 2001 23:59:32 +0000 Subject: add RemoveFolder menu item and verb. (folder_context_menu_remove_cb): new 2001-05-11 Chris Toshok * 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 --- shell/e-storage-set-view.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'shell/e-storage-set-view.c') 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 @@ -646,6 +646,27 @@ folder_context_menu_activate_cb (BonoboUIComponent *uih, priv->selected_row_path); } +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) @@ -653,6 +674,7 @@ populate_folder_context_menu_with_common_items (EStorageSetView *storage_set_vie static char popup_xml[] = "\n" " \n" + " \n" " \n" #ifdef DEBUG_XML " \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); } -- cgit