From 625a04713d6b3d36d99eccfa1de484ad3991bfe0 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 9 Oct 2000 12:01:27 +0000 Subject: re-write. 2000-10-09 Michael Meeks * message-list.c (message_list_toggle_threads): re-write. * folder-browser-factory.c (control_activate): update paths, need CVS HEAD bonobo, use a listener not a verb. svn path=/trunk/; revision=5792 --- mail/ChangeLog | 7 +++++++ mail/folder-browser-factory.c | 8 ++++---- mail/message-list.c | 12 +++++++++--- mail/message-list.h | 10 ++++++---- 4 files changed, 26 insertions(+), 11 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index d62a3a59b0..42e30b5e00 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2000-10-09 Michael Meeks + + * message-list.c (message_list_toggle_threads): re-write. + + * folder-browser-factory.c (control_activate): update paths, need + CVS HEAD bonobo, use a listener not a verb. + 2000-10-08 Miguel de Icaza * mail-ops.c (mail_incorporate_messages): Tag string for translation diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index c629e00151..7f590465ea 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -189,14 +189,14 @@ control_activate (BonoboControl *control, if (mail_config_thread_list ()) bonobo_ui_component_set_prop ( - uic, "/menu/View/Threaded", "state", "1", NULL); + uic, "/commands/ViewThreaded", "state", "1", NULL); else bonobo_ui_component_set_prop ( - uic, "/menu/View/Threaded", "state", "0", NULL); + uic, "/commands/ViewThreaded", "state", "0", NULL); - bonobo_ui_component_add_verb ( + bonobo_ui_component_add_listener ( uic, "ViewThreaded", - (BonoboUIVerbFn) message_list_toggle_threads, + message_list_toggle_threads, FOLDER_BROWSER (folder_browser)->message_list); create_ondemand_hooks (fb, uic); diff --git a/mail/message-list.c b/mail/message-list.c index 59ce592f7e..4f02e1d7b8 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1655,12 +1655,18 @@ message_list_foreach (MessageList *message_list, } void -message_list_toggle_threads (BonoboUIHandler *uih, void *user_data, - const char *path) +message_list_toggle_threads (BonoboUIComponent *component, + const char *path, + Bonobo_UIComponent_EventType type, + const char *state, + gpointer user_data) { MessageList *ml = user_data; - mail_config_set_thread_list (bonobo_ui_handler_menu_get_toggle_state (uih, path)); + if (type != Bonobo_UIComponent_STATE_CHANGED) + return; + + mail_config_set_thread_list (atoi (state)); mail_do_regenerate_messagelist (ml, ml->search); } diff --git a/mail/message-list.h b/mail/message-list.h index 4871d74a8a..4d02e7815a 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -6,7 +6,7 @@ #include "mail-types.h" #include #include -#include +#include #include #include #include @@ -113,8 +113,10 @@ void message_list_home (MessageList *message_list); void message_list_end (MessageList *message_list); extern gboolean threaded_view; -void message_list_toggle_threads (BonoboUIHandler *uih, - void *user_data, - const char *path); +void message_list_toggle_threads (BonoboUIComponent *component, + const char *path, + Bonobo_UIComponent_EventType type, + const char *state, + gpointer user_data); #endif /* _MESSAGE_LIST_H_ */ -- cgit