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
This commit is contained in:
committed by
Chris Toshok
parent
12de520a89
commit
d35a3f652b
@ -1,3 +1,18 @@
|
||||
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.
|
||||
|
||||
2001-05-11 Chris Toshok <toshok@ximian.com>
|
||||
|
||||
* evolution-shell-component.h
|
||||
|
||||
@ -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[] =
|
||||
"<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);
|
||||
}
|
||||
|
||||
|
||||
@ -707,11 +707,11 @@ evolution_shell_component_client_async_xfer_folder (EvolutionShellComponentClien
|
||||
|
||||
void
|
||||
evolution_shell_component_client_populate_folder_context_menu (EvolutionShellComponentClient *shell_component_client,
|
||||
BonoboUIComponent *uih,
|
||||
BonoboUIContainer *container,
|
||||
const char *physical_uri,
|
||||
const char *type)
|
||||
{
|
||||
Bonobo_UIContainer corba_uih;
|
||||
Bonobo_UIContainer corba_container;
|
||||
EvolutionShellComponentClientPrivate *priv;
|
||||
GNOME_Evolution_ShellComponent corba_shell_component;
|
||||
CORBA_Environment ev;
|
||||
@ -726,13 +726,13 @@ evolution_shell_component_client_populate_folder_context_menu (EvolutionShellCom
|
||||
CORBA_exception_init (&ev);
|
||||
|
||||
corba_shell_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
|
||||
corba_uih = bonobo_object_corba_objref (BONOBO_OBJECT (uih));
|
||||
corba_container = bonobo_object_corba_objref (BONOBO_OBJECT (container));
|
||||
|
||||
GNOME_Evolution_ShellComponent_populateFolderContextMenu (corba_shell_component,
|
||||
corba_uih,
|
||||
physical_uri,
|
||||
type,
|
||||
&ev);
|
||||
corba_container,
|
||||
physical_uri,
|
||||
type,
|
||||
&ev);
|
||||
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
||||
@ -25,6 +25,8 @@
|
||||
#define EVOLUTION_SHELL_COMPONENT_CLIENT_H
|
||||
|
||||
#include <bonobo/bonobo-object-client.h>
|
||||
#include <bonobo/bonobo-ui-container.h>
|
||||
#include <bonobo/bonobo-ui-component.h>
|
||||
|
||||
#include "evolution-shell-component.h"
|
||||
|
||||
@ -107,7 +109,7 @@ void evolution_shell_component_client_async_xfer_folder (EvolutionShellCompo
|
||||
void *data);
|
||||
|
||||
void evolution_shell_component_client_populate_folder_context_menu (EvolutionShellComponentClient *shell_component_client,
|
||||
BonoboUIComponent *uih,
|
||||
BonoboUIContainer *container,
|
||||
const char *physical_uri,
|
||||
const char *type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user