re-enable popup menu. (populate_folder_context_menu): If we're on a

2002-01-30  Not Zed  <NotZed@Ximian.com>

        * component-factory.c (create_component): re-enable popup menu.
        (populate_folder_context_menu): If we're on a vfolder, and its not
        UNMATCHED, create a change properties item, and set it up
        approriately.
        (change_prop_popup): Callback to edit the vfolder rule.  For
        #3358.

svn path=/trunk/; revision=15523
This commit is contained in:
Not Zed
2002-01-30 07:28:21 +00:00
committed by Michael Zucci
parent bfe2921eb8
commit d4c2e5853d
2 changed files with 31 additions and 8 deletions

View File

@ -1,3 +1,12 @@
2002-01-30 Not Zed <NotZed@Ximian.com>
* component-factory.c (create_component): re-enable popup menu.
(populate_folder_context_menu): If we're on a vfolder, and its not
UNMATCHED, create a change properties item, and set it up
approriately.
(change_prop_popup): Callback to edit the vfolder rule. For
#3358.
2002-01-29 Dave West <kat@unleashed.org>
* mail-callbacks.c (create_msg_composer): Changed the function

View File

@ -420,7 +420,14 @@ xfer_folder (EvolutionShellComponent *shell_component,
camel_url_free(dst);
}
#if 0
static void
configure_folder_popup(BonoboUIComponent *component, void *user_data, const char *cname)
{
char *uri = user_data;
vfolder_edit_rule(uri);
}
static void
populate_folder_context_menu (EvolutionShellComponent *shell_component,
BonoboUIComponent *uic,
@ -432,16 +439,23 @@ populate_folder_context_menu (EvolutionShellComponent *shell_component,
static char popup_xml_i18n[] = {N_("Properties..."), N_("Change this folder's properties")};
#endif
static char popup_xml[] =
"<menuitem name=\"ChangeFolderProperties\" verb=\"ChangeFolderProperties\""
"<menuitem name=\"ChangeFolderPropertiesPopUp\" verb=\"ChangeFolderPropertiesPopUp\""
" _label=\"Properties...\" _tip=\"Change this folder's properties\"/>";
if (strcmp (type, "mail") != 0)
return;
bonobo_ui_component_set_translate (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER,
popup_xml, NULL);
/* FIXME: handle other types */
/* the unmatched test is a bit of a hack but it works */
if (strncmp(physical_uri, "vfolder:", 8) != 0
|| strstr(physical_uri, "#" CAMEL_UNMATCHED_NAME) != NULL)
return;
bonobo_ui_component_add_verb_full(uic, "ChangeFolderPropertiesPopUp", configure_folder_popup, g_strdup(physical_uri), g_free);
bonobo_ui_component_set_translate (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER, popup_xml, NULL);
}
#endif
static char *
get_dnd_selection (EvolutionShellComponent *shell_component,
@ -938,7 +952,7 @@ create_component (void)
create_folder,
remove_folder,
xfer_folder,
/*populate_folder_context_menu*/NULL,
populate_folder_context_menu,
get_dnd_selection,
NULL);