[Xfce4-commits] <terminal:master> Use the initial title if the dynamic title is set to hidden in tabs too.
Nick Schermer
nick at xfce.org
Wed Aug 26 21:42:02 CEST 2009
Updating branch refs/heads/master
to c834367872733421232dc558a5e0fb830b3407b4 (commit)
from 9f1b818846f83c27928bf8526110c463ebe1b56f (commit)
commit c834367872733421232dc558a5e0fb830b3407b4
Author: Nick Schermer <nick at xfce.org>
Date: Thu Aug 20 22:13:27 2009 +0200
Use the initial title if the dynamic title is set to hidden in tabs too.
This is closer to the behaviour in 0.2 releases of
the terminal. See bug #5653.
terminal/terminal-screen.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 5390b11..1a07c0e 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -343,6 +343,8 @@ terminal_screen_get_property (GObject *object,
{
TerminalScreen *screen = TERMINAL_SCREEN (object);
const gchar *title = NULL;
+ TerminalTitle mode;
+ gchar *initial = NULL;
switch (prop_id)
{
@@ -355,10 +357,26 @@ terminal_screen_get_property (GObject *object,
case PROP_TITLE:
if (G_UNLIKELY (screen->custom_title != NULL))
- title = screen->custom_title;
+ {
+ title = screen->custom_title;
+ }
else if (G_LIKELY (screen->terminal != NULL))
- title = vte_terminal_get_window_title (VTE_TERMINAL (screen->terminal));
+ {
+ g_object_get (G_OBJECT (screen->preferences), "title-mode", &mode, NULL);
+ if (G_UNLIKELY (mode == TERMINAL_TITLE_HIDE))
+ {
+ /* 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;
+ }
+ else
+ {
+ /* show the vte title */
+ title = vte_terminal_get_window_title (VTE_TERMINAL (screen->terminal));
+ }
+ }
g_value_set_string (value, title != NULL ? title : _("Untitled"));
+ g_free (initial);
break;
default:
More information about the Xfce4-commits
mailing list