From ff6a38b627b7052ef42322ee8fbaf730cb6aec89 Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Tue, 31 May 2005 18:20:52 +0000 Subject: Update these methods to use the listener method of access from bonobo as 2005-05-31 Rodney Dawes * em-folder-browser.c (emfb_view_hide_read, emfb_view_show_selected): (emfb_view_show_all): Update these methods to use the listener method of access from bonobo as they are radio buttons now (emfb_verbs): Comment out the verbs for the above methods, as they are configured through add_listener now (emfb_enable_map): s/ViewHideSelected/ViewShowSelected/ (emfb_activate): Add the listeners for the radio buttons for filtering the message list for unread, selected, or all messages svn path=/trunk/; revision=29432 --- mail/ChangeLog | 11 +++++++++++ mail/em-folder-browser.c | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index a28a7f2d8d..b13e9ff772 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,14 @@ +2005-05-31 Rodney Dawes + + * em-folder-browser.c (emfb_view_hide_read, emfb_view_show_selected): + (emfb_view_show_all): Update these methods to use the listener method + of access from bonobo as they are radio buttons now + (emfb_verbs): Comment out the verbs for the above methods, as they are + configured through add_listener now + (emfb_enable_map): s/ViewHideSelected/ViewShowSelected/ + (emfb_activate): Add the listeners for the radio buttons for filtering + the message list for unread, selected, or all messages + 2005-05-24 Rodney Dawes * em-folder-selector.c (folder_created_cb): Remove this unused method diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index c93c027bf7..820fa27321 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -691,7 +691,7 @@ emfb_mark_all_read(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_view_hide_read(BonoboUIComponent *uid, void *data, const char *path) +emfb_view_hide_read(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) { EMFolderView *emfv = data; @@ -699,7 +699,7 @@ emfb_view_hide_read(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_view_hide_selected(BonoboUIComponent *uid, void *data, const char *path) +emfb_view_show_selected(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) { EMFolderView *emfv = data; GPtrArray *uids; @@ -712,7 +712,7 @@ emfb_view_hide_selected(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_view_show_all(BonoboUIComponent *uid, void *data, const char *path) +emfb_view_show_all(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) { EMFolderView *emfv = data; @@ -782,9 +782,12 @@ static BonoboUIVerb emfb_verbs[] = { BONOBO_UI_UNSAFE_VERB ("FolderExpunge", emfb_folder_expunge), /* HideDeleted is a toggle */ BONOBO_UI_UNSAFE_VERB ("MessageMarkAllAsRead", emfb_mark_all_read), + /* + These are radio buttons now BONOBO_UI_UNSAFE_VERB ("ViewHideRead", emfb_view_hide_read), - BONOBO_UI_UNSAFE_VERB ("ViewHideSelected", emfb_view_hide_selected), + BONOBO_UI_UNSAFE_VERB ("ViewShowSelected", emfb_view_show_selected), BONOBO_UI_UNSAFE_VERB ("ViewShowAll", emfb_view_show_all), + */ /* ViewThreaded is a toggle */ BONOBO_UI_UNSAFE_VERB ("FolderCopy", emfb_folder_copy), @@ -822,7 +825,7 @@ static const EMFolderViewEnable emfb_enable_map[] = { { "FolderRename", EM_POPUP_SELECT_FOLDER }, { "MailPost", EM_POPUP_SELECT_FOLDER }, { "MessageMarkAllAsRead", EM_POPUP_SELECT_FOLDER }, - { "ViewHideSelected", EM_POPUP_SELECT_MANY }, + { "ViewShowSelected", EM_POPUP_SELECT_MANY }, { NULL }, }; @@ -1145,6 +1148,10 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) /* FIXME: Selection state */ + bonobo_ui_component_add_listener(uic, "ViewHideRead", emfb_view_hide_read, emfv); + bonobo_ui_component_add_listener(uic, "ViewShowSelected", emfb_view_show_selected, emfv); + bonobo_ui_component_add_listener(uic, "ViewShowAll", emfb_view_show_all, emfv); + /* FIXME: property menu customisation */ /*folder_browser_setup_property_menu (fb, fb->uicomp);*/ -- cgit