[Xfce4-commits] <terminal:master> Parse the tab title if dynamic title is hidden.

Nick Schermer noreply at xfce.org
Sun Jun 6 11:32:01 CEST 2010


Updating branch refs/heads/master
         to 7d718bdf16a3d546a2f0d23726ea94a712069b8c (commit)
       from 999a5c246c1dfb66f8736d3b12304bba59864a08 (commit)

commit 7d718bdf16a3d546a2f0d23726ea94a712069b8c
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Jun 6 11:30:38 2010 +0200

    Parse the tab title if dynamic title is hidden.

 terminal/terminal-screen.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 0333206..9ba86fb 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -356,7 +356,8 @@ terminal_screen_get_property (GObject          *object,
   TerminalScreen *screen = TERMINAL_SCREEN (object);
   const gchar    *title = NULL;
   TerminalTitle   mode;
-  gchar          *initial = NULL;
+  gchar          *initial;
+  gchar          *parsed_title = NULL;
   gchar          *custom_title;
 
   switch (prop_id)
@@ -381,7 +382,9 @@ terminal_screen_get_property (GObject          *object,
             {
               /* show the initial title if the dynamic title is set to hidden */
               g_object_get (G_OBJECT (screen->preferences), "title-initial", &initial, NULL);
-              title = initial;
+              parsed_title = terminal_screen_parse_title (screen, initial);
+              title = parsed_title;
+              g_free (initial);
             }
           else if (G_LIKELY (screen->terminal != NULL))
             {
@@ -390,9 +393,12 @@ terminal_screen_get_property (GObject          *object,
 
           /* TRANSLATORS: title for the tab/window used when all other
            * possible titles were empty strings */
-          g_value_set_string (value, title != NULL ? title : _("Untitled"));
+          if (title == NULL || *title == '\0')
+            title = _("Untitled");
 
-          g_free (initial);
+          g_value_set_string (value, title);
+
+          g_free (parsed_title);
         }
       break;
 



More information about the Xfce4-commits mailing list