[Xfce4-commits] [apps/xfce4-terminal] 01/01: Do not un-close tab that was moved to another window

noreply at xfce.org noreply at xfce.org
Fri Aug 12 15:06:27 CEST 2016


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 5530cd93575623d1c3bfd3e2613641171ea00856
Author: Igor <f2404 at yandex.ru>
Date:   Fri Aug 12 16:06:22 2016 +0300

    Do not un-close tab that was moved to another window
---
 terminal/terminal-window.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index ed42816..f5a1335 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1152,7 +1152,9 @@ terminal_window_notebook_drag_data_received (GtkWidget        *widget,
   GtkWidget  *child, *label;
   gint        i, n_pages;
   gboolean    succeed = FALSE;
-  cairo_rectangle_int_t allocation;
+  GtkAllocation allocation;
+  TerminalWindow *orig_window;
+  TerminalWindowTabInfo *tab_info;
 
   terminal_return_if_fail (TERMINAL_IS_WINDOW (window));
   terminal_return_if_fail (TERMINAL_IS_SCREEN (widget));
@@ -1217,7 +1219,14 @@ terminal_window_notebook_drag_data_received (GtkWidget        *widget,
           /* release reference */
           g_object_unref (G_OBJECT (*screen));
           g_object_unref (G_OBJECT (window));
-        }
+
+          /* erase last closed tabs entry from the original window as we don't want it on DND */
+          orig_window = TERMINAL_WINDOW (gtk_widget_get_toplevel (notebook));
+          tab_info = g_queue_pop_tail (orig_window->closed_tabs_list);
+          terminal_window_tab_info_free (tab_info);
+          /* and update action to make the undo action inactive */
+          terminal_window_update_actions (orig_window);
+      }
 
       /* looks like everything worked out */
       succeed = TRUE;

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


More information about the Xfce4-commits mailing list