GNOME Bugzilla – Bug 644844
Clear logs improvements
Last modified: 2011-03-16 11:19:26 UTC
This branch makes "Delete" button in the history window a menu entry with a confirmation dialog that lets you select the account, including "All accounts".
Created attachment 183448 [details] [review] squashed patch http://git.collabora.co.uk/?p=user/pochu/empathy.git;a=shortlog;h=refs/heads/clear-history-644844
Review of attachment 183448 [details] [review]: ::: libempathy-gtk/empathy-log-window.c @@ +285,3 @@ + g_signal_connect (menu_delete, "activate", + G_CALLBACK (log_window_delete_menu_clicked_cb), window); + Add this into empathy_builder_connect() instead. Also it would be more modern if this menu was tied into a GtkUIManager, but that's not super important. @@ +1425,3 @@ + if (empathy_account_chooser_is_ready (account_chooser)) + empathy_account_chooser_set_account (account_chooser, + empathy_account_chooser_get_account (EMPATHY_ACCOUNT_CHOOSER (window->account_chooser_chats))); Rather than implement this code twice (meaning two places to change it later), just immediately call log_window_clear_logs_chooser_select_account() here. @@ +1431,3 @@ + + /* We need to use the chooser after the dialog is destroyed */ + g_object_ref (account_chooser); Just destroy the dialog once you've read the account setting from it. That is how everyone else does it. @@ +1498,2 @@ g_object_unref (logger); + g_object_unref (account_chooser); i.e., destroy the dialog here
(In reply to comment #2) > Review of attachment 183448 [details] [review]: > > ::: libempathy-gtk/empathy-log-window.c > @@ +285,3 @@ > + g_signal_connect (menu_delete, "activate", > + G_CALLBACK (log_window_delete_menu_clicked_cb), window); > + > > Add this into empathy_builder_connect() instead. Done (amended) > Also it would be more modern if this menu was tied into a GtkUIManager, but > that's not super important. > > @@ +1425,3 @@ > + if (empathy_account_chooser_is_ready (account_chooser)) > + empathy_account_chooser_set_account (account_chooser, > + empathy_account_chooser_get_account (EMPATHY_ACCOUNT_CHOOSER > (window->account_chooser_chats))); > > Rather than implement this code twice (meaning two places to change it later), > just immediately call log_window_clear_logs_chooser_select_account() here. Done (amended) > @@ +1431,3 @@ > + > + /* We need to use the chooser after the dialog is destroyed */ > + g_object_ref (account_chooser); > > Just destroy the dialog once you've read the account setting from it. That is > how everyone else does it. > > @@ +1498,2 @@ > g_object_unref (logger); > + g_object_unref (account_chooser); > > i.e., destroy the dialog here Oh I see. Done too.
Guillaume has reviewed it. Merged.