After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644844 - Clear logs improvements
Clear logs improvements
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Archives
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-15 17:27 UTC by Emilio Pozuelo Monfort
Modified: 2011-03-16 11:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
squashed patch (37.66 KB, patch)
2011-03-15 17:31 UTC, Emilio Pozuelo Monfort
needs-work Details | Review

Description Emilio Pozuelo Monfort 2011-03-15 17:27:55 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".
Comment 2 Danielle Madeley 2011-03-16 01:22:04 UTC
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
Comment 3 Emilio Pozuelo Monfort 2011-03-16 11:08:41 UTC
(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.
Comment 4 Emilio Pozuelo Monfort 2011-03-16 11:19:26 UTC
Guillaume has reviewed it. Merged.