From 62b482ca293ced476d6f682bd03e34139f4ff5b1 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 2 Dec 2003 05:16:22 +0000 Subject: Added empty_trash prompt key. 2003-12-02 Not Zed * evolution-mail.schemas: Added empty_trash prompt key. * em-utils.c (em_utils_prompt_user): changed to take the gconf 'prompt again' key directly. Fixed callers. (em_utils_expunge_folder): prompt the user with an expunge specific message. (em_utils_empty_trash): have an empty-trash specific message for prompting confirm. (emu_confirm_expunge): removed, no longer needed. Bug #38613. (em_utils_expunge_folder): remove most line feeds, let the label wrap them. (em_utils_empty_trash): ditto. * em-subscribe-editor.c (sub_folder_subscribed): update the ui selection state after we're done. maybe we should listen on the model but this is easier. Bug #50861. * em-message-browser.c (emmb_activate): hook up our own verb list. (emmb_message_verbs[], emmb_close): implement the close verb. Bug #51558. * em-format-html-display.c (efhd_attachment_popup): duh, actually add the menu list we create. Bug #49902. * em-format.c (d): turn off debug, committed by accident. svn path=/trunk/; revision=23562 --- mail/em-message-browser.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'mail/em-message-browser.c') diff --git a/mail/em-message-browser.c b/mail/em-message-browser.c index 5621fe07bf..9a72fec0c5 100644 --- a/mail/em-message-browser.c +++ b/mail/em-message-browser.c @@ -182,11 +182,33 @@ emmb_set_message(EMFolderView *emfv, const char *uid) camel_folder_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN); } +static void +emmb_close(BonoboUIComponent *uid, void *data, const char *path) +{ + EMMessageBrowser *emmb = data; + + gtk_widget_destroy(gtk_widget_get_toplevel((GtkWidget *)emmb)); +} + +static BonoboUIVerb emmb_verbs[] = { + BONOBO_UI_UNSAFE_VERB ("MessageBrowserClose", emmb_close), + BONOBO_UI_VERB_END +}; + static void emmb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state) { - emmb_parent->activate(emfv, uic, state); + if (state) { + emmb_parent->activate(emfv, uic, state); - if (state) + bonobo_ui_component_add_verb_list_with_data(uic, emmb_verbs, emfv); bonobo_ui_component_set_prop(uic, "/commands/EditPaste", "sensitive", "0", NULL); + } else { + const BonoboUIVerb *v; + + for (v = &emmb_verbs[0]; v->cname; v++) + bonobo_ui_component_remove_verb(uic, v->cname); + + emmb_parent->activate(emfv, uic, state); + } } -- cgit