[Xfce4-commits] [apps/xfce4-terminal] 01/01: Make Preferences dialog app-global
noreply at xfce.org
noreply at xfce.org
Mon Feb 13 15:22:21 CET 2017
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit 2042aaa224185e0dc10e71edd01826fbbf8057c3
Author: Igor <f2404 at yandex.ru>
Date: Mon Feb 13 17:20:50 2017 +0300
Make Preferences dialog app-global
The same dialog will be used if open Preferences from multiple windows; no
new dialogs will be created.
---
terminal/terminal-preferences-dialog.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index b4739ff..64e3eb4 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -988,12 +988,17 @@ terminal_preferences_dialog_encoding_changed (GtkComboBox *combobo
GtkWidget*
terminal_preferences_dialog_new (gboolean show_drop_down)
{
- GtkBuilder *builder;
- GObject *dialog;
- GObject *object;
- GObject *notebook;
+ static GtkBuilder *builder = NULL;
- builder = g_object_new (TERMINAL_TYPE_PREFERENCES_DIALOG, NULL);
+ GObject *dialog;
+ GObject *object;
+ GObject *notebook;
+
+ if (builder == NULL)
+ {
+ builder = g_object_new (TERMINAL_TYPE_PREFERENCES_DIALOG, NULL);
+ g_object_add_weak_pointer (G_OBJECT (builder), (gpointer) &builder);
+ }
object = gtk_builder_get_object (builder, "dropdown-box");
terminal_return_val_if_fail (GTK_IS_WIDGET (object), NULL);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list