Tue, 30 Aug 2022 01:37:10 -0500
Make Plugin window a singleton
In the style of the account manager window.
Testing Done:
Open Plugin Manager, and then clicked the menu button again. No extra dialogs showed up.
Reviewed at https://reviews.imfreedom.org/r/1693/
| pidgin/pidginapplication.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/pidginapplication.c Tue Aug 30 01:36:00 2022 -0500 +++ b/pidgin/pidginapplication.c Tue Aug 30 01:37:10 2022 -0500 @@ -395,14 +395,19 @@ pidgin_application_plugins(GSimpleAction *simple, GVariant *parameter, gpointer data) { - GtkWidget *dialog = pidgin_plugins_dialog_new(); + static GtkWidget *dialog = NULL; + + if(!GTK_IS_WIDGET(dialog)) { + dialog = pidgin_plugins_dialog_new(); + g_object_add_weak_pointer(G_OBJECT(dialog), (gpointer)&dialog); /* fixme? */ #if 0 gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(window)); #endif + } - gtk_widget_show(dialog); + gtk_window_present_with_time(GTK_WINDOW(dialog), GDK_CURRENT_TIME); } static void