[Xfce4-commits] [apps/xfce4-terminal] 01/01: Close Set Title when closing its corresponding tab

noreply at xfce.org noreply at xfce.org
Tue Feb 7 08:12:30 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 0af90319c109a67698e8c5069aaf6274176e141b
Author: Igor <f2404 at yandex.ru>
Date:   Tue Feb 7 10:12:25 2017 +0300

    Close Set Title when closing its corresponding tab
---
 terminal/terminal-window.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 37b2dd6..5118aa2 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1857,7 +1857,7 @@ static void
 title_dialog_close (GtkWidget      *dialog,
                     TerminalWindow *window)
 {
-  terminal_return_if_fail (window->priv->title_dialog == dialog);
+  terminal_return_if_fail (window->priv->title_dialog != NULL);
 
   /* need for hiding on focus */
   if (window->drop_down)
@@ -1865,7 +1865,8 @@ title_dialog_close (GtkWidget      *dialog,
 
   /* close the dialog */
   window->priv->n_child_windows--;
-  gtk_widget_destroy (dialog);
+  if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->priv->notebook)) > 0)
+    gtk_widget_destroy (window->priv->title_dialog);
   window->priv->title_dialog = NULL;
 }
 
@@ -1956,6 +1957,8 @@ terminal_window_action_set_title (GtkAction      *action,
                         G_CALLBACK (title_dialog_response), window);
       g_signal_connect (G_OBJECT (window->priv->title_dialog), "close",
                         G_CALLBACK (title_dialog_close), window);
+      g_signal_connect (G_OBJECT (window->priv->active), "destroy",
+                        G_CALLBACK (title_dialog_close), window);
     }
 
     if (!gtk_widget_get_visible (window->priv->title_dialog))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list