Updating branch refs/heads/nick/dropdown
to 32a435f145684caefd0046ada4a64d689ec4d110 (commit)
from 59dbd2db44b8724c776d516141ebffa86aa454f0 (commit)
commit 32a435f145684caefd0046ada4a64d689ec4d110
Author: Nick Schermer <[email protected]>
Date: Sat Dec 29 15:52:21 2012 +0100
Keep window with normal preferences dialog.
terminal/terminal-window.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 245036d..ed5f5c1 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1366,6 +1366,21 @@ terminal_window_action_select_all (GtkAction
*action,
static void
+terminal_window_action_prefs_died (gpointer user_data,
+ GObject *where_the_object_was)
+{
+ TerminalWindow *window = TERMINAL_WINDOW (user_data);
+
+ window->preferences_dialog = NULL;
+ window->n_child_windows--;
+
+ if (window->drop_down)
+ terminal_activate_window (GTK_WINDOW (window));
+}
+
+
+
+static void
terminal_window_action_prefs (GtkAction *action,
TerminalWindow *window)
{
@@ -1374,8 +1389,9 @@ terminal_window_action_prefs (GtkAction *action,
window->preferences_dialog = terminal_preferences_dialog_new ();
if (G_LIKELY (window->preferences_dialog != NULL))
{
- g_object_add_weak_pointer (G_OBJECT (window->preferences_dialog),
- (gpointer) &window->preferences_dialog);
+ window->n_child_windows++;
+ g_object_weak_ref (G_OBJECT (window->preferences_dialog),
+ terminal_window_action_prefs_died, window);
}
}
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits