--- a/ChangeLog.API Mon Feb 20 09:50:04 2023 -0600
+++ b/ChangeLog.API Tue Feb 21 21:41:53 2023 -0600
@@ -1171,6 +1171,7 @@
* pidgin_pounces_manager_show
* pidgin_prefs_labeled_entry
* pidgin_prefs_labeled_password
* pidgin_privacy_dialog_hide
* pidgin_privacy_dialog_show
--- a/pidgin/pidginapplication.c Mon Feb 20 09:50:04 2023 -0600
+++ b/pidgin/pidginapplication.c Tue Feb 21 21:41:53 2023 -0600
@@ -479,9 +479,19 @@
pidgin_application_preferences(G_GNUC_UNUSED GSimpleAction *simple,
G_GNUC_UNUSED GVariant *parameter,
- G_GNUC_UNUSED gpointer data)
+ PidginApplication *application = data; + static GtkWidget *preferences = NULL; + if(!GTK_IS_WIDGET(preferences)) { + preferences = g_object_new(PIDGIN_TYPE_PREFS_WINDOW, NULL); + g_object_add_weak_pointer(G_OBJECT(preferences), (gpointer)&preferences); + pidgin_application_present_transient_window(application, + GTK_WINDOW(preferences)); --- a/pidgin/prefs/pidginprefs.c Mon Feb 20 09:50:04 2023 -0600
+++ b/pidgin/prefs/pidginprefs.c Tue Feb 21 21:41:53 2023 -0600
@@ -42,9 +42,6 @@
-static PidginPrefsWindow *prefs = NULL;
G_DEFINE_TYPE(PidginPrefsWindow, pidgin_prefs_window, GTK_TYPE_DIALOG);
/******************************************************************************
@@ -475,19 +472,6 @@
-delete_prefs(G_GNUC_UNUSED GtkWidget *asdf, G_GNUC_UNUSED void *gdsa)
- /* Close any request dialogs */
- purple_request_close_with_handle(prefs);
- purple_notify_close_with_handle(prefs);
- /* Unregister callbacks. */
- purple_prefs_disconnect_by_handle(prefs);
vv_test_switch_page_cb(GtkStack *stack, G_GNUC_UNUSED GParamSpec *pspec,
@@ -503,17 +487,26 @@
*****************************************************************************/
+pidgin_prefs_window_finalize(GObject *obj) { + purple_prefs_disconnect_by_handle(obj); + G_OBJECT_CLASS(pidgin_prefs_window_parent_class)->finalize(obj); pidgin_prefs_window_class_init(PidginPrefsWindowClass *klass)
+ GObjectClass *obj_class = G_OBJECT_CLASS(klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
+ obj_class->finalize = pidgin_prefs_window_finalize; gtk_widget_class_set_template_from_resource(
"/im/pidgin/Pidgin3/Prefs/prefs.ui"
- gtk_widget_class_bind_template_callback(widget_class, delete_prefs);
gtk_widget_class_bind_template_callback(widget_class,
@@ -528,17 +521,6 @@
*****************************************************************************/
- prefs = PIDGIN_PREFS_WINDOW(g_object_new(
- pidgin_prefs_window_get_type(), NULL));
- gtk_window_present(GTK_WINDOW(prefs));
purple_prefs_add_none(PIDGIN_PREFS_ROOT "");
--- a/pidgin/prefs/pidginprefs.h Mon Feb 20 09:50:04 2023 -0600
+++ b/pidgin/prefs/pidginprefs.h Tue Feb 21 21:41:53 2023 -0600
@@ -45,13 +45,6 @@
void pidgin_prefs_init(void);
- * Shows the preferences dialog.
-void pidgin_prefs_show(void);
* @title: The text to be displayed as the checkbox label
* @key: The key of the purple bool pref that will be represented by the checkbox
--- a/pidgin/resources/Prefs/prefs.ui Mon Feb 20 09:50:04 2023 -0600
+++ b/pidgin/resources/Prefs/prefs.ui Tue Feb 21 21:41:53 2023 -0600
@@ -28,7 +28,6 @@
<!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
<template class="PidginPrefsWindow" parent="GtkDialog">
<property name="title" translatable="1">Preferences</property>
- <signal name="destroy" handler="delete_prefs" swapped="no"/>
<child internal-child="content_area">
<property name="vexpand">1</property>