[Xfce4-commits] [apps/xfce4-terminal] 01/01: Correctly update window actions after un-closing a tab
noreply at xfce.org
noreply at xfce.org
Wed Aug 10 11:02:42 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 5690e3be1951a274af2c322ca1f31d25490e3c36
Author: Igor <f2404 at yandex.ru>
Date: Wed Aug 10 12:02:37 2016 +0300
Correctly update window actions after un-closing a tab
---
terminal/terminal-window.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 8e69571..62fbafb 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1370,22 +1370,25 @@ terminal_window_action_undo_close_tab (GtkAction *action,
terminal = g_object_new (TERMINAL_TYPE_SCREEN, NULL);
- terminal_window_add (window, TERMINAL_SCREEN (terminal));
-
if (G_LIKELY (window->closed_tabs_list != NULL))
{
- /* set working directory and position of the last closed tab */
+ /* get info on the last closed tab and remove it from the list */
link = g_list_last (window->closed_tabs_list);
+ window->closed_tabs_list = g_list_remove_link (window->closed_tabs_list, link);
+
+ /* set info to the new tab */
tab_info = (TerminalWindowTabInfo *) link->data;
+ terminal_window_add (window, TERMINAL_SCREEN (terminal));
terminal_screen_set_working_directory (TERMINAL_SCREEN (terminal),
tab_info->working_directory);
gtk_notebook_reorder_child (GTK_NOTEBOOK (window->notebook), terminal, tab_info->position);
- /* remove it from the list */
- window->closed_tabs_list = g_list_remove_link (window->closed_tabs_list, link);
+ /* free info */
terminal_window_tab_info_free (tab_info);
g_list_free (link);
}
+ else
+ terminal_window_add (window, TERMINAL_SCREEN (terminal));
terminal_screen_launch_child (TERMINAL_SCREEN (terminal));
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list