[Xfce4-commits] [apps/xfce4-terminal] 01/01: Restore terminal colors when unclosing a tab

noreply at xfce.org noreply at xfce.org
Fri May 25 16:49:13 CEST 2018


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-terminal.

commit 9c1041c668bd35a621eb79a3b6fdee9e5aacb148
Author: Igor <f2404 at yandex.ru>
Date:   Fri May 25 10:49:06 2018 -0400

    Restore terminal colors when unclosing a tab
---
 terminal/terminal-screen.c | 18 ++++++++++++++++++
 terminal/terminal-screen.h |  4 ++++
 terminal/terminal-window.c |  6 +++++-
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index e28171a..8b93d22 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -2803,3 +2803,21 @@ terminal_screen_feed_text (TerminalScreen *screen,
   terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
   vte_terminal_feed_child (VTE_TERMINAL (screen->terminal), text, strlen (text));
 }
+
+
+
+const gchar *
+terminal_screen_get_custom_fg_color (TerminalScreen *screen)
+{
+  terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
+  return screen->custom_fg_color;
+}
+
+
+
+const gchar *
+terminal_screen_get_custom_bg_color (TerminalScreen *screen)
+{
+  terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
+  return screen->custom_bg_color;
+}
diff --git a/terminal/terminal-screen.h b/terminal/terminal-screen.h
index b70e5ef..f256dec 100644
--- a/terminal/terminal-screen.h
+++ b/terminal/terminal-screen.h
@@ -130,6 +130,10 @@ gboolean        terminal_screen_has_foreground_process    (TerminalScreen *scree
 void            terminal_screen_feed_text                 (TerminalScreen *screen,
                                                            const char     *text);
 
+const gchar    *terminal_screen_get_custom_fg_color       (TerminalScreen *screen);
+
+const gchar    *terminal_screen_get_custom_bg_color       (TerminalScreen *screen);
+
 G_END_DECLS
 
 #endif /* !TERMINAL_SCREEN_H */
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index a130a37..9a21fe6 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1097,7 +1097,7 @@ terminal_window_close_tab_request (TerminalScreen *screen,
 {
   if (terminal_window_confirm_close (screen, window))
     {
-      /* store info on the tab being closed */
+      /* store attrs of the tab being closed */
       TerminalTabAttr *tab_attr = g_slice_new0 (TerminalTabAttr);
       tab_attr->active = (screen == window->priv->active);
       tab_attr->dynamic_title_mode = TERMINAL_TITLE_DEFAULT;
@@ -1105,6 +1105,10 @@ terminal_window_close_tab_request (TerminalScreen *screen,
       tab_attr->directory = g_strdup (terminal_screen_get_working_directory (screen));
       tab_attr->title = IS_STRING (terminal_screen_get_custom_title (screen)) ?
                         g_strdup (terminal_screen_get_custom_title (screen)) : NULL;
+      tab_attr->color_text = IS_STRING (terminal_screen_get_custom_fg_color (screen)) ?
+                             g_strdup (terminal_screen_get_custom_fg_color (screen)) : NULL;
+      tab_attr->color_bg = IS_STRING (terminal_screen_get_custom_bg_color (screen)) ?
+                           g_strdup (terminal_screen_get_custom_bg_color (screen)) : NULL;
       g_queue_push_tail (window->priv->closed_tabs_list, tab_attr);
 
       gtk_widget_destroy (GTK_WIDGET (screen));

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


More information about the Xfce4-commits mailing list