From 83c3321d9df4c571ff1a8a7aea3d61190e2a342a Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Mon, 12 May 2014 14:57:18 +0200
Subject: [PATCH 01/16] Restore transparency

The transparency settings were removed as a side effect of
2bff4b63ed3ceef6055e35563e9b0b33ad57349d

This restores them and you will need a compositing window manager to
use it. The background image setting, also known as faux transparency,
was not restored.

The transparency checkbox lost its mnemonic accelerator because 't'
is already taken and using any other letter would make it hard to
restore the translations of the string.

Some changes by Peter Weber <peter.weber@mailbox.org>
---
 src/org.gnome.Terminal.gschema.xml | 10 +++++++
 src/preferences.ui                 | 47 ++++++++++++++++++++++++++++++
 src/profile-editor.cc              | 19 ++++++++++++
 src/terminal-schemas.hh            |  3 ++
 src/terminal-screen.cc             | 22 +++++++++++++-
 src/terminal-window.cc             |  7 +++++
 6 files changed, 107 insertions(+), 1 deletion(-)

diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index 882b251a..d34e8dc2 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -349,6 +349,16 @@
       <default>'narrow'</default>
       <summary>Whether ambiguous-width characters are narrow or wide when using UTF-8 encoding</summary>
     </key>
+    <key name="use-transparent-background" type="b">
+      <default>false</default>
+      <summary>Whether to use a transparent background</summary>
+    </key>
+    <key name="background-transparency-percent" type="i">
+      <default>50</default>
+      <range min="0" max="100"/>
+      <summary>Adjust the amount of transparency</summary>
+      <description>A value between 0 and 100, where 0 is opaque and 100 is fully transparent.</description>
+    </key>
   </schema>
 
   <!-- Keybinding settings -->
diff --git a/src/preferences.ui b/src/preferences.ui
index ca58c656..f3979307 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -95,6 +95,11 @@
     <property name="step_increment">0.05</property>
     <property name="page_increment">0.25</property>
   </object>
+  <object class="GtkAdjustment" id="background-transparent-adjustment">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkListStore" id="cjk-ambiguous-width-model">
     <columns>
       <!-- column-name gchararray -->
@@ -1435,6 +1440,48 @@
                                             <property name="position">1</property>
                                           </packing>
                                         </child>
+                                        <child>
+                                          <object class="GtkBox" id="use-transparent-background-box">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="orientation">horizontal</property>
+                                            <property name="spacing">12</property>
+                                            <child>
+                                              <object class="GtkCheckButton" id="use-transparent-background">
+                                                <property name="label" translatable="yes">Transparent background</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="xalign">0</property>
+                                                <property name="draw_indicator">True</property>
+                                              </object>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkScale" id="background-transparent-scale">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="adjustment">background-transparent-adjustment</property>
+                                                <property name="draw_value">False</property>
+                                              </object>
+                                              <packing>
+                                                <property name="expand">True</property>
+                                                <property name="fill">True</property>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
                                       </object>
                                     </child>
                                   </object>
diff --git a/src/profile-editor.cc b/src/profile-editor.cc
index 0cb99b62..d0e71e26 100644
--- a/src/profile-editor.cc
+++ b/src/profile-editor.cc
@@ -1491,6 +1491,25 @@ profile_prefs_load (const char *uuid, GSettings *profile)
 			       GSettingsBindFlags(G_SETTINGS_BIND_GET |
 						  G_SETTINGS_BIND_SET));
   gtk_widget_set_visible (w, (vte_get_feature_flags() & VTE_FEATURE_FLAG_SIXEL) != 0);
+
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND,
+                               gtk_builder_get_object (builder, "use-transparent-background"),
+                               "active",
+                               GSettingsBindFlags(G_SETTINGS_BIND_GET |
+                                                  G_SETTINGS_BIND_SET));
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND,
+                               gtk_builder_get_object (builder, "background-transparent-scale"),
+                               "sensitive",
+                               GSettingsBindFlags(G_SETTINGS_BIND_GET |
+                                                  G_SETTINGS_BIND_NO_SENSITIVITY));
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT,
+                               gtk_builder_get_object (builder, "background-transparent-adjustment"),
+                               "value",
+                               GSettingsBindFlags(G_SETTINGS_BIND_GET |
+                                                  G_SETTINGS_BIND_SET));
 }
 
 /* Called once per Preferences window, to destroy stuff that doesn't depend on the profile being edited */
diff --git a/src/terminal-schemas.hh b/src/terminal-schemas.hh
index 61f1305e..c33723bf 100644
--- a/src/terminal-schemas.hh
+++ b/src/terminal-schemas.hh
@@ -78,6 +78,9 @@ G_BEGIN_DECLS
 #define TERMINAL_PROFILE_VISIBLE_NAME_KEY               "visible-name"
 #define TERMINAL_PROFILE_WORD_CHAR_EXCEPTIONS_KEY       "word-char-exceptions"
 
+#define TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND      "use-transparent-background"
+#define TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT "background-transparency-percent"
+
 #define TERMINAL_SETTING_CONFIRM_CLOSE_KEY              "confirm-close"
 #define TERMINAL_SETTING_CONTEXT_INFO_KEY               "context-info"
 #define TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR_KEY       "default-show-menubar"
diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index a559f7f9..16f98c9d 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -1059,7 +1059,9 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
       prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY) ||
       prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_BACKGROUND_COLOR_KEY) ||
       prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_FOREGROUND_COLOR_KEY) ||
-      prop_name == I_(TERMINAL_PROFILE_PALETTE_KEY))
+      prop_name == I_(TERMINAL_PROFILE_PALETTE_KEY) ||
+      prop_name == I_(TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND) ||
+      prop_name == I_(TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT))
     update_color_scheme (screen);
 
   if (!prop_name || prop_name == I_(TERMINAL_PROFILE_AUDIBLE_BELL_KEY))
@@ -1144,6 +1146,8 @@ update_color_scheme (TerminalScreen *screen)
   GdkRGBA *cursor_bgp = nullptr, *cursor_fgp = nullptr;
   GdkRGBA *highlight_bgp = nullptr, *highlight_fgp = nullptr;
   GtkStyleContext *context;
+  GtkWidget *toplevel;
+  gboolean transparent;
   gboolean use_theme_colors;
 
   context = gtk_widget_get_style_context (widget);
@@ -1187,6 +1191,18 @@ update_color_scheme (TerminalScreen *screen)
     }
 
   colors = terminal_g_settings_get_rgba_palette (priv->profile, TERMINAL_PROFILE_PALETTE_KEY, &n_colors);
+
+  transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND);
+  if (transparent)
+    {
+      gint transparency_percent;
+
+      transparency_percent = g_settings_get_int (profile, TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT);
+      bg.alpha = (100 - transparency_percent) / 100.0;
+    }
+  else
+    bg.alpha = 1.0;
+
   vte_terminal_set_colors (VTE_TERMINAL (screen), &fg, &bg,
                            colors, n_colors);
   vte_terminal_set_color_bold (VTE_TERMINAL (screen), boldp);
@@ -1194,6 +1210,10 @@ update_color_scheme (TerminalScreen *screen)
   vte_terminal_set_color_cursor_foreground (VTE_TERMINAL (screen), cursor_fgp);
   vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
   vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
+
+  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
+  if (toplevel != nullptr && gtk_widget_is_toplevel (toplevel))
+    gtk_widget_set_app_paintable (toplevel, transparent);
 }
 
 static void
diff --git a/src/terminal-window.cc b/src/terminal-window.cc
index 36eb7ce7..a41d2de2 100644
--- a/src/terminal-window.cc
+++ b/src/terminal-window.cc
@@ -2173,6 +2173,8 @@ terminal_window_init (TerminalWindow *window)
   };
   TerminalWindowPrivate *priv;
   TerminalApp *app;
+  GdkScreen *screen;
+  GdkVisual *visual;
   GSettings *gtk_debug_settings;
   GtkWindowGroup *window_group;
   //  GtkAccelGroup *accel_group;
@@ -2188,6 +2190,11 @@ terminal_window_init (TerminalWindow *window)
 
   gtk_widget_init_template (GTK_WIDGET (window));
 
+  screen = gtk_widget_get_screen (GTK_WIDGET (window));
+  visual = gdk_screen_get_rgba_visual (screen);
+  if (visual != nullptr)
+    gtk_widget_set_visual (GTK_WIDGET (window), visual);
+
   uuid_generate (u);
   uuid_unparse (u, uuidstr);
   priv->uuid = g_strdup (uuidstr);
-- 
2.40.1


From 29759ac03fe09c82d65aac2d28d174ed75df7637 Mon Sep 17 00:00:00 2001
From: Lars Uebernickel <lars.uebernickel@canonical.com>
Date: Wed, 28 May 2014 14:11:02 +0200
Subject: [PATCH 02/16] window: Make the drawing robust across all themes

There are lots of themes out there in the wild that do not specify a
background-color for all widgets and the default is transparent. This
is usually not a problem because GTK+ sets an opaque region on the
whole window and things without a background-color get drawn with the
theme's default background colour. However, to achieve transparency
we disable the opaque region by making the window app-paintable. This
can lead to transparent menubars or notebook tabs in some themes. We
can avoid this by ensuring that the window always renders a background.

https://bugzilla.gnome.org/show_bug.cgi?id=730016
---
 src/terminal-window.cc | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/terminal-window.cc b/src/terminal-window.cc
index a41d2de2..11d93419 100644
--- a/src/terminal-window.cc
+++ b/src/terminal-window.cc
@@ -2003,6 +2003,26 @@ terminal_window_realize (GtkWidget *widget)
   terminal_window_update_size (window);
 }
 
+static gboolean
+terminal_window_draw (GtkWidget *widget,
+                      cairo_t   *cr)
+{
+  if (gtk_widget_get_app_paintable (widget))
+    {
+      GtkStyleContext *context;
+      int width;
+      int height;
+
+      context = gtk_widget_get_style_context (widget);
+      width = gtk_widget_get_allocated_width (widget);
+      height = gtk_widget_get_allocated_height (widget);
+      gtk_render_background (context, cr, 0, 0, width, height);
+      gtk_render_frame (context, cr, 0, 0, width, height);
+    }
+
+  return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
+}
+
 static gboolean
 terminal_window_state_event (GtkWidget            *widget,
                              GdkEventWindowState  *event)
@@ -2368,6 +2388,7 @@ terminal_window_class_init (TerminalWindowClass *klass)
 
   widget_class->show = terminal_window_show;
   widget_class->realize = terminal_window_realize;
+  widget_class->draw = terminal_window_draw;
   widget_class->window_state_event = terminal_window_state_event;
   widget_class->screen_changed = terminal_window_screen_changed;
   widget_class->style_updated = terminal_window_style_updated;
-- 
2.40.1


From b86eb377db75fa04417f46dc037eaaa45e8dcdec Mon Sep 17 00:00:00 2001
From: "Owen W. Taylor" <otaylor@fishsoup.net>
Date: Fri, 13 Nov 2015 15:16:42 +0100
Subject: [PATCH 03/16] screen, window: Extra padding around transparent
 terminals in Wayland

https://bugzilla.redhat.com/show_bug.cgi?id=1207943
---
 src/terminal-screen.cc | 41 +++++++++++++++++++++++++++++++++++++----
 src/terminal-window.cc | 18 ++++++++++++------
 2 files changed, 49 insertions(+), 10 deletions(-)

diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 16f98c9d..51fdc20b 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -156,6 +156,8 @@ static void terminal_screen_system_font_changed_cb (GSettings *,
 static gboolean terminal_screen_popup_menu (GtkWidget *widget);
 static gboolean terminal_screen_button_press (GtkWidget *widget,
                                               GdkEventButton *event);
+static void terminal_screen_hierarchy_changed (GtkWidget *widget,
+                                               GtkWidget *previous_toplevel);
 static void terminal_screen_child_exited  (VteTerminal *terminal,
                                            int status);
 
@@ -599,6 +601,7 @@ terminal_screen_class_init (TerminalScreenClass *klass)
   widget_class->drag_data_received = terminal_screen_drag_data_received;
   widget_class->button_press_event = terminal_screen_button_press;
   widget_class->popup_menu = terminal_screen_popup_menu;
+  widget_class->hierarchy_changed = terminal_screen_hierarchy_changed;
 
   terminal_class->child_exited = terminal_screen_child_exited;
 
@@ -1131,6 +1134,32 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
   g_object_thaw_notify (object);
 }
 
+static void
+update_toplevel_transparency (TerminalScreen *screen)
+{
+  GtkWidget *widget = GTK_WIDGET (screen);
+  TerminalScreenPrivate *priv = screen->priv;
+  GSettings *profile = priv->profile;
+  GtkWidget *toplevel;
+
+  toplevel = gtk_widget_get_toplevel (widget);
+  if (toplevel != nullptr && gtk_widget_is_toplevel (toplevel))
+    {
+      gboolean transparent;
+
+      transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND);
+      if (gtk_widget_get_app_paintable (toplevel) != transparent)
+        {
+          gtk_widget_set_app_paintable (toplevel, transparent);
+
+          /* The opaque region of the toplevel isn't updated until the toplevel is allocated;
+           * set_app_paintable() doesn't force an allocation, so do that manually.
+           */
+          gtk_widget_queue_resize (toplevel);
+        }
+    }
+}
+
 static void
 update_color_scheme (TerminalScreen *screen)
 {
@@ -1146,7 +1175,6 @@ update_color_scheme (TerminalScreen *screen)
   GdkRGBA *cursor_bgp = nullptr, *cursor_fgp = nullptr;
   GdkRGBA *highlight_bgp = nullptr, *highlight_fgp = nullptr;
   GtkStyleContext *context;
-  GtkWidget *toplevel;
   gboolean transparent;
   gboolean use_theme_colors;
 
@@ -1211,9 +1239,7 @@ update_color_scheme (TerminalScreen *screen)
   vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
   vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
 
-  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
-  if (toplevel != nullptr && gtk_widget_is_toplevel (toplevel))
-    gtk_widget_set_app_paintable (toplevel, transparent);
+  update_toplevel_transparency (screen);
 }
 
 static void
@@ -1755,6 +1781,13 @@ terminal_screen_do_popup (TerminalScreen *screen,
   terminal_screen_popup_info_unref (info);
 }
 
+static void
+terminal_screen_hierarchy_changed (GtkWidget *widget,
+                                   GtkWidget *previous_toplevel)
+{
+  update_toplevel_transparency (TERMINAL_SCREEN (widget));
+}
+
 static gboolean
 terminal_screen_button_press (GtkWidget      *widget,
                               GdkEventButton *event)
diff --git a/src/terminal-window.cc b/src/terminal-window.cc
index 11d93419..61857bfe 100644
--- a/src/terminal-window.cc
+++ b/src/terminal-window.cc
@@ -2009,15 +2009,21 @@ terminal_window_draw (GtkWidget *widget,
 {
   if (gtk_widget_get_app_paintable (widget))
     {
+      GtkAllocation child_allocation;
       GtkStyleContext *context;
-      int width;
-      int height;
+      GtkWidget *child;
+
+      /* Get the *child* allocation, so we don't overwrite window borders */
+      child = gtk_bin_get_child (GTK_BIN (widget));
+      gtk_widget_get_allocation (child, &child_allocation);
 
       context = gtk_widget_get_style_context (widget);
-      width = gtk_widget_get_allocated_width (widget);
-      height = gtk_widget_get_allocated_height (widget);
-      gtk_render_background (context, cr, 0, 0, width, height);
-      gtk_render_frame (context, cr, 0, 0, width, height);
+      gtk_render_background (context, cr,
+                             child_allocation.x, child_allocation.y,
+                             child_allocation.width, child_allocation.height);
+      gtk_render_frame (context, cr,
+                        child_allocation.x, child_allocation.y,
+                        child_allocation.width, child_allocation.height);
     }
 
   return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
-- 
2.40.1


From 8e92d96543a2f8b343bde1d7060064bc8da1dfee Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Fri, 18 May 2018 20:15:34 +0200
Subject: [PATCH 04/16] screen: Try harder to find a foreground process group
 member

For pipelined commands, it's possible that the process group leader,
whose PID is used as the group ID, has terminated but not the entire
group. eg., $ cat <file> | less.  Sadly, there's no nice user-space
API to list the members of a group, and crawling the entire /proc like
pgrep might be overkill if the system is overloaded.

Therefore, the next 20 PIDs after the group ID and the first 20 PIDs
starting from 2 are checked in the hope that one of them would belong
to the foreground process group.

Subsequent commits will use this to track the current foreground
process, instead of using the shell's history, to notify when a
long-running foreground process group terminates.

https://bugzilla.gnome.org/show_bug.cgi?id=711059
---
 src/terminal-screen.cc | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 51fdc20b..82c607a2 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -2346,7 +2346,35 @@ terminal_screen_has_foreground_process (TerminalScreen *screen,
 #else
   g_snprintf (filename, sizeof (filename), "/proc/%d/cmdline", fgpid);
   if (!g_file_get_contents (filename, &data_buf, &len, nullptr))
-    return TRUE;
+    {
+      int j;
+
+      for (j = 0; j < 20; j++)
+        {
+          pid_t pgid;
+          pid_t pid;
+
+          pid = (pid_t) (fgpid + 1 + j);
+          pgid = getpgid (pid);
+          if (pgid != fgpid)
+            {
+              pid = (pid_t) (2 + j);
+              pgid = getpgid (pid);
+              if (pgid != fgpid)
+                continue;
+            }
+
+          g_snprintf (filename, sizeof (filename), "/proc/%d/cmdline", (int) pid);
+
+          g_clear_pointer (&data_buf, g_free);
+          if (g_file_get_contents (filename, &data_buf, &len, nullptr))
+            break;
+        }
+
+      if (j == 20)
+        return TRUE;
+    }
+
   data = data_buf;
 #endif
 
-- 
2.40.1


From 0a6a5448ca292032f3b5daf9a9e772a6fe64f811 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 3 May 2018 16:49:28 +0200
Subject: [PATCH 05/16] screen: Track the current foreground process

... using the interactive shell's precmd and preexec hooks, by
monitoring the contents of the terminal, and a combination of
tcgetpgrp(3) and /proc, instead of relying on the shell's history.

The shell's history cannot be reliably used to find out the current
foreground process. The history can be optionally turned off, and when
job control is in play, it will mistakenly record 'fg' as the current
process.

https://bugzilla.gnome.org/show_bug.cgi?id=711059
---
 src/terminal-debug.cc  |   1 +
 src/terminal-debug.hh  |   1 +
 src/terminal-screen.cc | 150 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+)

diff --git a/src/terminal-debug.cc b/src/terminal-debug.cc
index bf2db7e9..e2645335 100644
--- a/src/terminal-debug.cc
+++ b/src/terminal-debug.cc
@@ -40,6 +40,7 @@ _terminal_debug_init(void)
     { "search",        TERMINAL_DEBUG_SEARCH        },
     { "bridge",        TERMINAL_DEBUG_BRIDGE        },
     { "default",       TERMINAL_DEBUG_DEFAULT       },
+    { "shell-command", TERMINAL_DEBUG_SHELL_COMMAND },
   };
 
   _terminal_debug_flags = TerminalDebugFlags(g_parse_debug_string (g_getenv ("GNOME_TERMINAL_DEBUG"),
diff --git a/src/terminal-debug.hh b/src/terminal-debug.hh
index fedc9e4d..94f0e30b 100644
--- a/src/terminal-debug.hh
+++ b/src/terminal-debug.hh
@@ -37,6 +37,7 @@ typedef enum {
   TERMINAL_DEBUG_SEARCH        = 1 << 9,
   TERMINAL_DEBUG_BRIDGE        = 1 << 10,
   TERMINAL_DEBUG_DEFAULT       = 1 << 11,
+  TERMINAL_DEBUG_SHELL_COMMAND = 1 << 12,
 } TerminalDebugFlags;
 
 void _terminal_debug_init(void);
diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 82c607a2..5de5ce91 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -112,6 +112,11 @@ struct _TerminalScreenPrivate
   gboolean exec_on_realize;
   guint idle_exec_source;
   ExecData *exec_data;
+
+  gboolean between_preexec_and_precmd;
+  char *current_cmdline;
+  guint contents_changed_source_id;
+  guint shell_preexec_source_id;
 };
 
 enum
@@ -161,6 +166,12 @@ static void terminal_screen_hierarchy_changed (GtkWidget *widget,
 static void terminal_screen_child_exited  (VteTerminal *terminal,
                                            int status);
 
+static void terminal_screen_contents_changed (VteTerminal *terminal);
+
+static void terminal_screen_shell_precmd (VteTerminal *terminal);
+
+static void terminal_screen_shell_preexec (VteTerminal *terminal);
+
 static void terminal_screen_window_title_changed      (VteTerminal *vte_terminal,
                                                        TerminalScreen *screen);
 
@@ -604,6 +615,9 @@ terminal_screen_class_init (TerminalScreenClass *klass)
   widget_class->hierarchy_changed = terminal_screen_hierarchy_changed;
 
   terminal_class->child_exited = terminal_screen_child_exited;
+  terminal_class->contents_changed = terminal_screen_contents_changed;
+  terminal_class->shell_precmd = terminal_screen_shell_precmd;
+  terminal_class->shell_preexec = terminal_screen_shell_preexec;
 
   signals[PROFILE_SET] =
     g_signal_new (I_("profile-set"),
@@ -709,6 +723,18 @@ terminal_screen_dispose (GObject *object)
                                         0, 0, nullptr, nullptr,
                                         screen);
 
+  if (priv->contents_changed_source_id != 0)
+    {
+      g_source_remove (priv->contents_changed_source_id);
+      priv->contents_changed_source_id = 0;
+    }
+
+  if (priv->shell_preexec_source_id != 0)
+    {
+      g_source_remove (priv->shell_preexec_source_id);
+      priv->shell_preexec_source_id = 0;
+    }
+
   if (priv->idle_exec_source != 0)
     {
       g_source_remove (priv->idle_exec_source);
@@ -745,6 +771,7 @@ terminal_screen_finalize (GObject *object)
   g_slist_free_full (priv->match_tags, (GDestroyNotify) free_tag_data);
 
   g_free (priv->uuid);
+  g_free (priv->current_cmdline);
 
   G_OBJECT_CLASS (terminal_screen_parent_class)->finalize (object);
 }
@@ -1969,6 +1996,125 @@ terminal_screen_child_exited (VteTerminal *terminal,
     }
 }
 
+static gboolean
+terminal_screen_contents_changed_cb (TerminalScreen *screen)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+  gs_free char *cmdline = nullptr;
+
+  g_return_val_if_fail (priv->between_preexec_and_precmd, G_SOURCE_REMOVE);
+  g_return_val_if_fail (priv->shell_preexec_source_id == 0, G_SOURCE_REMOVE);
+
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Contents changed [timeout]\n");
+
+  if (!terminal_screen_has_foreground_process (screen, nullptr, &cmdline))
+    goto out;
+
+  if (g_strcmp0 (priv->current_cmdline, cmdline) == 0)
+    goto out;
+
+  g_free (priv->current_cmdline);
+  priv->current_cmdline = cmdline;
+  cmdline = nullptr;
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Current foreground command-line: %s\n", priv->current_cmdline);
+
+ out:
+  priv->contents_changed_source_id = 0;
+  return G_SOURCE_REMOVE;
+}
+
+static void
+terminal_screen_contents_changed (VteTerminal *terminal)
+{
+  TerminalScreen *screen = TERMINAL_SCREEN (terminal);
+  TerminalScreenPrivate *priv = screen->priv;
+
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Contents changed\n");
+
+  if (!priv->between_preexec_and_precmd)
+    return;
+
+  if (priv->shell_preexec_source_id != 0)
+    return;
+
+  if (priv->contents_changed_source_id != 0)
+    return;
+
+  priv->contents_changed_source_id = g_timeout_add (500,
+                                                    (GSourceFunc) terminal_screen_contents_changed_cb,
+                                                    screen);
+}
+
+static void
+terminal_screen_shell_precmd (VteTerminal *terminal)
+{
+  TerminalScreen *screen = TERMINAL_SCREEN (terminal);
+  TerminalScreenPrivate *priv = screen->priv;
+
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Shell precmd\n");
+
+  priv->between_preexec_and_precmd = FALSE;
+
+  if (priv->contents_changed_source_id != 0)
+    {
+      g_source_remove (priv->contents_changed_source_id);
+      priv->contents_changed_source_id = 0;
+    }
+
+  if (priv->shell_preexec_source_id != 0)
+    {
+      g_source_remove (priv->shell_preexec_source_id);
+      priv->shell_preexec_source_id = 0;
+    }
+
+  g_clear_pointer (&priv->current_cmdline, g_free);
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Current foreground command-line: (none)\n");
+}
+
+static gboolean
+terminal_screen_shell_preexec_cb (TerminalScreen *screen)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+  gboolean retval = G_SOURCE_CONTINUE;
+  gs_free char *cmdline = nullptr;
+
+  g_return_val_if_fail (priv->between_preexec_and_precmd, G_SOURCE_REMOVE);
+  g_return_val_if_fail (priv->current_cmdline == nullptr, G_SOURCE_REMOVE);
+
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Shell preexec [timeout]\n");
+
+  if (!terminal_screen_has_foreground_process (screen, nullptr, &cmdline))
+    goto out;
+
+  priv->current_cmdline = cmdline;
+  cmdline = nullptr;
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Current foreground command-line: %s\n", priv->current_cmdline);
+
+  priv->shell_preexec_source_id = 0;
+  retval = G_SOURCE_REMOVE;
+
+ out:
+  return retval;
+}
+
+static void
+terminal_screen_shell_preexec (VteTerminal *terminal)
+{
+  TerminalScreen *screen = TERMINAL_SCREEN (terminal);
+  TerminalScreenPrivate *priv = screen->priv;
+
+  g_return_if_fail (!priv->between_preexec_and_precmd);
+  g_return_if_fail (priv->contents_changed_source_id == 0);
+  g_return_if_fail (priv->current_cmdline == nullptr);
+  g_return_if_fail (priv->shell_preexec_source_id == 0);
+
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Shell preexec\n");
+
+  priv->between_preexec_and_precmd = TRUE;
+
+  priv->shell_preexec_source_id = g_timeout_add (200, (GSourceFunc) terminal_screen_shell_preexec_cb, screen);
+}
+
 static void
 terminal_screen_drag_data_received (GtkWidget        *widget,
                                     GdkDragContext   *context,
@@ -2315,7 +2461,11 @@ terminal_screen_has_foreground_process (TerminalScreen *screen,
   if (fd == -1)
     return FALSE;
 
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Child PID: %d\n", priv->child_pid);
+
   fgpid = tcgetpgrp (fd);
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Current foreground process group [tcgetpgrp]: %d\n", fgpid);
+
   if (fgpid == -1 || fgpid == priv->child_pid)
     return FALSE;
 
-- 
2.40.1


From af10b8861e565ee92ae42ee3e894440989189951 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 10 May 2018 19:23:16 +0200
Subject: [PATCH 06/16] Notify when a long-running foreground process group
 terminates

Notifications are only sent if the VteTerminal in which the process
was running doesn't have the keyboard focus. If it's a tab in the
currently active window then the dialog-information-symbolic icon is
used to highlight the tab's label; otherwise a desktop-wide
notification is sent.

https://bugzilla.gnome.org/show_bug.cgi?id=711059
---
 src/terminal-app.cc       |  32 +++++++++++
 src/terminal-screen.cc    | 109 ++++++++++++++++++++++++++++++++++++++
 src/terminal-tab-label.cc |  30 ++++++++++-
 src/terminal-tab-label.hh |   4 ++
 4 files changed, 174 insertions(+), 1 deletion(-)

diff --git a/src/terminal-app.cc b/src/terminal-app.cc
index b6740e3c..f8ea76fe 100644
--- a/src/terminal-app.cc
+++ b/src/terminal-app.cc
@@ -850,6 +850,31 @@ app_menu_quit_cb (GSimpleAction *action,
     gtk_widget_destroy (GTK_WIDGET (window));
 }
 
+/* Other action callbacks */
+
+static void
+action_activate_tab_cb (GSimpleAction *action,
+                        GVariant      *parameter,
+                        gpointer       user_data)
+{
+  GtkApplication *application = (GtkApplication*)user_data;
+  GtkWidget *toplevel;
+  TerminalScreen *screen;
+  const char *uuid;
+
+  g_variant_get (parameter, "&s", &uuid);
+  screen = terminal_app_get_screen_by_uuid (TERMINAL_APP (application), uuid);
+  if (screen == nullptr)
+    return;
+
+  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
+  if (!gtk_widget_is_toplevel (toplevel))
+    return;
+
+  terminal_window_switch_screen (TERMINAL_WINDOW (toplevel), screen);
+  gtk_window_present (GTK_WINDOW (toplevel));
+}
+
 #endif /* TERMINAL_SERVER */
 
 /* Class implementation */
@@ -892,9 +917,16 @@ terminal_app_startup (GApplication *application)
     { "quit",        app_menu_quit_cb,          nullptr, nullptr, nullptr }
   };
 
+  GActionEntry const other_actions[] = {
+    { "activate-tab", action_activate_tab_cb, "s", nullptr, nullptr }
+  };
+
   g_action_map_add_action_entries (G_ACTION_MAP (application),
                                    action_entries, G_N_ELEMENTS (action_entries),
                                    application);
+  g_action_map_add_action_entries (G_ACTION_MAP (application),
+                                   other_actions, G_N_ELEMENTS (other_actions),
+                                   application);
 
   /* Figure out whether the shell shows the menubar */
   gboolean shell_shows_menubar;
diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 5de5ce91..4d610170 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -55,6 +55,7 @@
 #include "terminal-marshal.h"
 #include "terminal-schemas.hh"
 #include "terminal-screen-container.hh"
+#include "terminal-tab-label.hh"
 #include "terminal-util.hh"
 #include "terminal-window.hh"
 #include "terminal-info-bar.hh"
@@ -161,6 +162,10 @@ static void terminal_screen_system_font_changed_cb (GSettings *,
 static gboolean terminal_screen_popup_menu (GtkWidget *widget);
 static gboolean terminal_screen_button_press (GtkWidget *widget,
                                               GdkEventButton *event);
+
+static gboolean terminal_screen_focus_in (GtkWidget *widget,
+                                          GdkEventFocus *event);
+
 static void terminal_screen_hierarchy_changed (GtkWidget *widget,
                                                GtkWidget *previous_toplevel);
 static void terminal_screen_child_exited  (VteTerminal *terminal,
@@ -607,6 +612,7 @@ terminal_screen_class_init (TerminalScreenClass *klass)
   object_class->get_property = terminal_screen_get_property;
   object_class->set_property = terminal_screen_set_property;
 
+  widget_class->focus_in_event = terminal_screen_focus_in;
   widget_class->realize = terminal_screen_realize;
   widget_class->style_updated = terminal_screen_style_updated;
   widget_class->drag_data_received = terminal_screen_drag_data_received;
@@ -712,6 +718,10 @@ terminal_screen_dispose (GObject *object)
   TerminalScreen *screen = TERMINAL_SCREEN (object);
   TerminalScreenPrivate *priv = screen->priv;
   GtkSettings *settings;
+  TerminalApp *app;
+
+  app = terminal_app_get ();
+  g_application_withdraw_notification (G_APPLICATION (app), priv->uuid);
 
   /* Unset child PID so that when an eventual child-exited signal arrives,
    * we don't emit "close".
@@ -1900,6 +1910,45 @@ terminal_screen_button_press (GtkWidget      *widget,
   return FALSE;
 }
 
+static gboolean
+terminal_screen_focus_in (GtkWidget     *widget,
+                          GdkEventFocus *event)
+{
+  TerminalScreen *screen = TERMINAL_SCREEN (widget);
+  TerminalApp *app;
+  TerminalWindow *window;
+
+  _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Notification withdrawn\n");
+
+  window = terminal_screen_get_window (screen);
+  if (window != nullptr)
+    {
+      TerminalScreenContainer *screen_container;
+
+      screen_container = terminal_screen_container_get_from_screen (screen);
+      if (screen_container != nullptr)
+        {
+          GtkWidget *mdi_container;
+
+          mdi_container = terminal_window_get_mdi_container (window);
+          /* FIXME: add interface method to retrieve tab label */
+          if (GTK_IS_NOTEBOOK (mdi_container))
+            {
+              GtkWidget *tab_label;
+
+              tab_label = gtk_notebook_get_tab_label (GTK_NOTEBOOK (mdi_container), GTK_WIDGET (screen_container));
+              terminal_tab_label_set_bold (TERMINAL_TAB_LABEL (tab_label), FALSE);
+              terminal_tab_label_set_icon (TERMINAL_TAB_LABEL (tab_label), nullptr, nullptr);
+            }
+        }
+    }
+
+  app = terminal_app_get ();
+  g_application_withdraw_notification (G_APPLICATION (app), screen->priv->uuid);
+
+  return GTK_WIDGET_CLASS (terminal_screen_parent_class)->focus_in_event (widget, event);
+}
+
 /**
  * terminal_screen_get_current_dir:
  * @screen:
@@ -2045,6 +2094,63 @@ terminal_screen_contents_changed (VteTerminal *terminal)
                                                     screen);
 }
 
+static void
+terminal_screen_show_notification (TerminalScreen *screen)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+  TerminalWindow *window;
+
+  window = terminal_screen_get_window (screen);
+  if (window == nullptr)
+    return;
+
+  if (gtk_window_is_active (GTK_WINDOW (window)))
+    {
+      GtkWidget *mdi_container;
+      TerminalScreenContainer *screen_container;
+
+      if (screen == terminal_window_get_active (window))
+        return;
+
+      screen_container = terminal_screen_container_get_from_screen (screen);
+      if (screen_container == nullptr)
+        return;
+
+      mdi_container = terminal_window_get_mdi_container (window);
+      /* FIXME: add interface method to retrieve tab label */
+      if (GTK_IS_NOTEBOOK (mdi_container))
+        {
+          GtkWidget *tab_label;
+
+          tab_label = gtk_notebook_get_tab_label (GTK_NOTEBOOK (mdi_container), GTK_WIDGET (screen_container));
+          terminal_tab_label_set_bold (TERMINAL_TAB_LABEL (tab_label), TRUE);
+          terminal_tab_label_set_icon (TERMINAL_TAB_LABEL (tab_label),
+                                       "dialog-information-symbolic",
+                                       _("Command completed"));
+          _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Notify tab\n");
+        }
+    }
+  else
+    {
+      gs_unref_object GNotification *notification = nullptr;
+      TerminalApp *app;
+      gs_free char *current_cmdline_valid = nullptr;
+      gs_free char *detailed_action = nullptr;
+
+      notification = g_notification_new (_("Command completed"));
+
+      current_cmdline_valid = g_utf8_make_valid (priv->current_cmdline, -1);
+      g_notification_set_body (notification, current_cmdline_valid);
+
+      detailed_action = g_strdup_printf ("app.activate-tab::%s", priv->uuid);
+      g_notification_set_default_action (notification, detailed_action);
+
+      app = terminal_app_get ();
+      g_application_send_notification (G_APPLICATION (app), priv->uuid, notification);
+      _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Notify desktop\n");
+    }
+}
+
 static void
 terminal_screen_shell_precmd (VteTerminal *terminal)
 {
@@ -2067,6 +2173,9 @@ terminal_screen_shell_precmd (VteTerminal *terminal)
       priv->shell_preexec_source_id = 0;
     }
 
+  if (priv->current_cmdline != nullptr)
+    terminal_screen_show_notification (screen);
+
   g_clear_pointer (&priv->current_cmdline, g_free);
   _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Current foreground command-line: (none)\n");
 }
diff --git a/src/terminal-tab-label.cc b/src/terminal-tab-label.cc
index 88af5d41..d6423f11 100644
--- a/src/terminal-tab-label.cc
+++ b/src/terminal-tab-label.cc
@@ -34,6 +34,7 @@
 struct _TerminalTabLabelPrivate
 {
   TerminalScreen *screen;
+  GtkWidget *icon;
   GtkWidget *label;
   GtkWidget *close_button;
   gboolean bold;
@@ -179,7 +180,7 @@ terminal_tab_label_constructed (GObject *object)
 {
   TerminalTabLabel *tab_label = TERMINAL_TAB_LABEL (object);
   TerminalTabLabelPrivate *priv = tab_label->priv;
-  GtkWidget *hbox, *label, *close_button;
+  GtkWidget *hbox, *icon, *label, *close_button;
 
   G_OBJECT_CLASS (terminal_tab_label_parent_class)->constructed (object);
 
@@ -189,6 +190,10 @@ terminal_tab_label_constructed (GObject *object)
   
   gtk_box_set_spacing (GTK_BOX (hbox), SPACING);
 
+  priv->icon = icon = gtk_image_new ();
+  gtk_widget_set_no_show_all (icon, TRUE);
+  gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
+
   priv->label = label = gtk_label_new (nullptr);
   gtk_widget_set_halign (label, GTK_ALIGN_CENTER);
   gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
@@ -380,6 +385,29 @@ terminal_tab_label_set_bold (TerminalTabLabel *tab_label,
     pango_attr_list_unref (attr_list);
 }
 
+/**
+ * terminal_tab_label_set_icon:
+ * @tab_label: a #TerminalTabLabel
+ * @icon_name: (allow-none): an icon name
+ * @tooltip: (allow-none): text to be used as tooltip
+ *
+ * Shows an icon at the beginning of @tab_label. If @icon_name is
+ * %nullptr, then the icon will be hidden.
+ */
+void
+terminal_tab_label_set_icon (TerminalTabLabel *tab_label,
+                             const char *icon_name,
+                             const char *tooltip)
+{
+  TerminalTabLabelPrivate *priv = tab_label->priv;
+
+  g_return_if_fail (TERMINAL_IS_TAB_LABEL (tab_label));
+
+  gtk_widget_set_visible (priv->icon, icon_name != nullptr);
+  gtk_image_set_from_icon_name (GTK_IMAGE (priv->icon), icon_name, GTK_ICON_SIZE_MENU);
+  gtk_widget_set_tooltip_text (GTK_WIDGET (priv->icon), tooltip);
+}
+
 /**
  * terminal_tab_label_get_screen:
  * @tab_label: a #TerminalTabLabel
diff --git a/src/terminal-tab-label.hh b/src/terminal-tab-label.hh
index 91b7e617..37e808a7 100644
--- a/src/terminal-tab-label.hh
+++ b/src/terminal-tab-label.hh
@@ -59,6 +59,10 @@ GtkWidget *     terminal_tab_label_new        (TerminalScreen *screen);
 void            terminal_tab_label_set_bold   (TerminalTabLabel *tab_label,
                                                gboolean bold);
 
+void            terminal_tab_label_set_icon   (TerminalTabLabel *tab_label,
+                                               const char *icon_name,
+                                               const char *tooltip);
+
 TerminalScreen *terminal_tab_label_get_screen (TerminalTabLabel *tab_label);
 
 G_END_DECLS
-- 
2.40.1


From 8fe4f430026f28ac0067b22983beb69ff903fd86 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Tue, 10 Apr 2018 15:39:35 +0200
Subject: [PATCH 07/16] profile: Split the Command tab into two nested GtkGrids

This will let the subsequent patch add a "Command" sub-heading to keep
the command settings separate from the to-be-restored title settings.

https://bugzilla.redhat.com/show_bug.cgi?id=1296110
---
 src/preferences.ui | 239 +++++++++++++++++++++++----------------------
 1 file changed, 123 insertions(+), 116 deletions(-)

diff --git a/src/preferences.ui b/src/preferences.ui
index f3979307..285a3c61 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -1998,130 +1998,137 @@
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">12</property>
-                            <property name="column_spacing">12</property>
-                            <property name="row_spacing">6</property>
-                            <child>
-                              <object class="GtkCheckButton" id="login-shell-checkbutton">
-                                <property name="label" translatable="yes">_Run command as a login shell</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">0</property>
-                                <property name="left_attach">0</property>
-                                <property name="width">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkCheckButton" id="use-custom-command-checkbutton">
-                                <property name="label" translatable="yes">Ru_n a custom command instead of my shell</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="left_attach">0</property>
-                                <property name="width">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="custom-command-entry-label">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">Custom co_mmand:</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">custom-command-entry</property>
-                                <property name="xalign">0</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="left_attach">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkEntry" id="custom-command-entry">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="hexpand">True</property>
-                                <property name="input_hints">GTK_INPUT_HINT_NO_EMOJI</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="left_attach">1</property>
-                              </packing>
-                            </child>
+                            <property name="row_spacing">18</property>
                             <child>
-                              <object class="GtkLabel" id="preserve-working-directory-checkbutton-label">
+                              <object class="GtkGrid">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">_Preserve working directory:</property>
-                                <property name="use_underline">True</property>
-                                <property name="justify">center</property>
-                                <property name="mnemonic_widget">preserve-working-directory-combobox</property>
-                                <property name="xalign">0</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">3</property>
-                                <property name="left_attach">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkComboBox" id="preserve-working-directory-combobox">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="model">preserve-working-directory-model</property>
-                                <property name="focus_on_click">False</property>
-                                <property name="halign">start</property>
+                                <property name="column_spacing">12</property>
+                                <property name="row_spacing">6</property>
                                 <child>
-                                  <object class="GtkCellRendererText" id="preserve-working-directory-renderer"/>
-                                  <attributes>
-                                    <attribute name="text">0</attribute>
-                                  </attributes>
+                                  <object class="GtkCheckButton" id="login-shell-checkbutton">
+                                    <property name="label" translatable="yes">_Run command as a login shell</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">0</property>
+                                    <property name="left_attach">0</property>
+                                    <property name="width">2</property>
+                                  </packing>
                                 </child>
-                              </object>
-                              <packing>
-                                <property name="top_attach">3</property>
-                                <property name="left_attach">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="exit-action-combobox-label">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">When command _exits:</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">exit-action-combobox</property>
-                                <property name="xalign">0</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">4</property>
-                                <property name="left_attach">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkComboBox" id="exit-action-combobox">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="model">model3</property>
-                                <property name="focus_on_click">False</property>
-                                <property name="halign">start</property>
                                 <child>
-                                  <object class="GtkCellRendererText" id="renderer3"/>
-                                  <attributes>
-                                    <attribute name="text">0</attribute>
-                                  </attributes>
+                                  <object class="GtkCheckButton" id="use-custom-command-checkbutton">
+                                    <property name="label" translatable="yes">Ru_n a custom command instead of my shell</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="left_attach">0</property>
+                                    <property name="width">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="custom-command-entry-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Custom co_mmand:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">custom-command-entry</property>
+                                    <property name="xalign">0</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">2</property>
+                                    <property name="left_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" id="custom-command-entry">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="input_hints">GTK_INPUT_HINT_NO_EMOJI</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">2</property>
+                                    <property name="left_attach">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="preserve-working-directory-checkbutton-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">_Preserve working directory:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="justify">center</property>
+                                    <property name="mnemonic_widget">preserve-working-directory-combobox</property>
+                                    <property name="xalign">0</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">3</property>
+                                    <property name="left_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" id="preserve-working-directory-combobox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="model">preserve-working-directory-model</property>
+                                    <property name="focus_on_click">False</property>
+                                    <property name="halign">start</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="preserve-working-directory-renderer"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">3</property>
+                                    <property name="left_attach">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="exit-action-combobox-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">When command _exits:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">exit-action-combobox</property>
+                                    <property name="xalign">0</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">4</property>
+                                    <property name="left_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" id="exit-action-combobox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="model">model3</property>
+                                    <property name="focus_on_click">False</property>
+                                    <property name="halign">start</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer3"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">4</property>
+                                    <property name="left_attach">1</property>
+                                  </packing>
                                 </child>
                               </object>
-                              <packing>
-                                <property name="top_attach">4</property>
-                                <property name="left_attach">1</property>
-                              </packing>
                             </child>
                           </object>
                           <packing>
-- 
2.40.1


From 434a35e941965b363fce6f1205aece9a28e93434 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Tue, 10 Apr 2018 16:01:51 +0200
Subject: [PATCH 08/16] Revert "profile: Remove the "Command" sub-heading"

This reverts commit 8e27479299d075df0a52d0e8e7baeab344dcaa6c.

https://bugzilla.redhat.com/show_bug.cgi?id=1296110
---
 src/preferences.ui | 247 ++++++++++++++++++++++++++-------------------
 1 file changed, 143 insertions(+), 104 deletions(-)

diff --git a/src/preferences.ui b/src/preferences.ui
index 285a3c61..5422de71 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -2006,129 +2006,168 @@
                                 <property name="column_spacing">12</property>
                                 <property name="row_spacing">6</property>
                                 <child>
-                                  <object class="GtkCheckButton" id="login-shell-checkbutton">
-                                    <property name="label" translatable="yes">_Run command as a login shell</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">0</property>
-                                    <property name="left_attach">0</property>
-                                    <property name="width">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="use-custom-command-checkbutton">
-                                    <property name="label" translatable="yes">Ru_n a custom command instead of my shell</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="left_attach">0</property>
-                                    <property name="width">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="custom-command-entry-label">
+                                  <object class="GtkLabel">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">Custom co_mmand:</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">custom-command-entry</property>
-                                    <property name="xalign">0</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="left_attach">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkEntry" id="custom-command-entry">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="input_hints">GTK_INPUT_HINT_NO_EMOJI</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="left_attach">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="preserve-working-directory-checkbutton-label">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">_Preserve working directory:</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="justify">center</property>
-                                    <property name="mnemonic_widget">preserve-working-directory-combobox</property>
                                     <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Command</property>
+                                    <attributes>
+                                      <attribute name="weight" value="bold"/>
+                                    </attributes>
                                   </object>
                                   <packing>
-                                    <property name="top_attach">3</property>
+                                    <property name="top_attach">0</property>
                                     <property name="left_attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkComboBox" id="preserve-working-directory-combobox">
+                                  <object class="GtkAlignment">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="model">preserve-working-directory-model</property>
-                                    <property name="focus_on_click">False</property>
-                                    <property name="halign">start</property>
+                                    <property name="left_padding">12</property>
                                     <child>
-                                      <object class="GtkCellRendererText" id="preserve-working-directory-renderer"/>
-                                      <attributes>
-                                        <attribute name="text">0</attribute>
-                                      </attributes>
+                                      <object class="GtkGrid">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="column_spacing">12</property>
+                                        <property name="row_spacing">6</property>
+                                        <child>
+                                          <object class="GtkCheckButton" id="login-shell-checkbutton">
+                                            <property name="label" translatable="yes">_Run command as a login shell</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="draw_indicator">True</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">0</property>
+                                            <property name="left_attach">0</property>
+                                            <property name="width">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkCheckButton" id="use-custom-command-checkbutton">
+                                            <property name="label" translatable="yes">Ru_n a custom command instead of my shell</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="draw_indicator">True</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">1</property>
+                                            <property name="left_attach">0</property>
+                                            <property name="width">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="custom-command-entry-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="label" translatable="yes">Custom co_mmand:</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="mnemonic_widget">custom-command-entry</property>
+                                            <property name="xalign">0</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">2</property>
+                                            <property name="left_attach">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkEntry" id="custom-command-entry">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="hexpand">True</property>
+                                            <property name="input_hints">GTK_INPUT_HINT_NO_EMOJI</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">2</property>
+                                            <property name="left_attach">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="preserve-working-directory-checkbutton-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="label" translatable="yes">_Preserve working directory:</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="justify">center</property>
+                                            <property name="mnemonic_widget">preserve-working-directory-combobox</property>
+                                            <property name="xalign">0</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">3</property>
+                                            <property name="left_attach">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkComboBox" id="preserve-working-directory-combobox">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="model">preserve-working-directory-model</property>
+                                            <property name="focus_on_click">False</property>
+                                            <property name="halign">start</property>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="preserve-working-directory-renderer"/>
+                                              <attributes>
+                                                <attribute name="text">0</attribute>
+                                              </attributes>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">3</property>
+                                            <property name="left_attach">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="exit-action-combobox-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="label" translatable="yes">When command _exits:</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="mnemonic_widget">exit-action-combobox</property>
+                                            <property name="xalign">0</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">4</property>
+                                            <property name="left_attach">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkComboBox" id="exit-action-combobox">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="model">model3</property>
+                                            <property name="focus_on_click">False</property>
+                                            <property name="halign">start</property>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="renderer3"/>
+                                              <attributes>
+                                                <attribute name="text">0</attribute>
+                                              </attributes>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">4</property>
+                                            <property name="left_attach">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="top_attach">3</property>
-                                    <property name="left_attach">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="exit-action-combobox-label">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">When command _exits:</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">exit-action-combobox</property>
-                                    <property name="xalign">0</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">4</property>
+                                    <property name="top_attach">1</property>
                                     <property name="left_attach">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkComboBox" id="exit-action-combobox">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="model">model3</property>
-                                    <property name="focus_on_click">False</property>
-                                    <property name="halign">start</property>
-                                    <child>
-                                      <object class="GtkCellRendererText" id="renderer3"/>
-                                      <attributes>
-                                        <attribute name="text">0</attribute>
-                                      </attributes>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">4</property>
-                                    <property name="left_attach">1</property>
+                                    <property name="width">3</property>
                                   </packing>
                                 </child>
                               </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="left_attach">0</property>
+                              </packing>
                             </child>
                           </object>
                           <packing>
-- 
2.40.1


From 774c4e3f0ae5da786a2792a27ac5244d2f310d30 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 30 Jun 2016 16:02:13 +0200
Subject: [PATCH 09/16] Revert "screen: Remove unused description and
 user_title API"

This reverts commit 3bb41272b7509a16ec2a5cd93e44f73d5743b626.

https://bugzilla.redhat.com/show_bug.cgi?id=1296110
---
 src/terminal-screen.cc | 64 ++++++++++++++++++++++++++++++++++++++++++
 src/terminal-screen.hh |  5 ++++
 2 files changed, 69 insertions(+)

diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 4d610170..8b37de55 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -116,6 +116,7 @@ struct _TerminalScreenPrivate
 
   gboolean between_preexec_and_precmd;
   char *current_cmdline;
+  char *title;
   guint contents_changed_source_id;
   guint shell_preexec_source_id;
 };
@@ -133,6 +134,7 @@ enum {
   PROP_0,
   PROP_PROFILE,
   PROP_TITLE,
+  PROP_DESCRIPTION
 };
 
 enum
@@ -571,6 +573,9 @@ terminal_screen_get_property (GObject *object,
       case PROP_TITLE:
         g_value_set_string (value, terminal_screen_get_title (screen));
         break;
+      case PROP_DESCRIPTION:
+        g_value_take_string (value, terminal_screen_get_description (screen));
+        break;
       default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
         break;
@@ -591,6 +596,7 @@ terminal_screen_set_property (GObject *object,
         terminal_screen_set_profile (screen, (GSettings*)g_value_get_object (value));
         break;
       case PROP_TITLE:
+      case PROP_DESCRIPTION:
         /* not writable */
       default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -686,6 +692,14 @@ terminal_screen_class_init (TerminalScreenClass *klass)
 				      G_PARAM_STATIC_NICK |
 				      G_PARAM_STATIC_BLURB)));
 
+  g_object_class_install_property
+    (object_class,
+     PROP_DESCRIPTION,
+     g_param_spec_string ("description", nullptr, nullptr,
+                          nullptr,
+                          GParamFlags(G_PARAM_READABLE |
+                                      G_PARAM_STATIC_STRINGS)));
+
   g_type_class_add_private (object_class, sizeof (TerminalScreenPrivate));
 
   n_url_regexes = G_N_ELEMENTS (url_regex_patterns);
@@ -782,6 +796,7 @@ terminal_screen_finalize (GObject *object)
 
   g_free (priv->uuid);
   g_free (priv->current_cmdline);
+  g_free (priv->title);
 
   G_OBJECT_CLASS (terminal_screen_parent_class)->finalize (object);
 }
@@ -1040,6 +1055,21 @@ terminal_screen_get_title (TerminalScreen *screen)
   return vte_terminal_get_window_title (VTE_TERMINAL (screen));
 }
 
+char *
+terminal_screen_get_description (TerminalScreen *screen)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+  const char *title;
+
+  /* use --title argument if one was supplied, otherwise ask the profile */
+  if (priv->title)
+    title = priv->title;
+
+  return g_strdup_printf ("%s — %d",
+                          title && title[0] ? title : _("Terminal"),
+                          screen->priv->child_pid);
+}
+
 static void
 terminal_screen_profile_changed_cb (GSettings     *profile,
                                     const char    *prop_name,
@@ -1368,6 +1398,7 @@ terminal_screen_set_profile (TerminalScreen *screen,
     g_object_unref (old_profile);
 
   g_object_notify (G_OBJECT (screen), "profile");
+  g_object_notify (G_OBJECT (screen), "description");
 }
 
 GSettings*
@@ -1658,6 +1689,8 @@ spawn_result_cb (VteTerminal *terminal,
 
   priv->child_pid = pid;
 
+  g_object_notify (G_OBJECT (screen), "description");
+
   if (error) {
      // FIXMEchpe should be unnecessary, vte already does this internally
     vte_terminal_set_pty (terminal, nullptr);
@@ -1949,6 +1982,35 @@ terminal_screen_focus_in (GtkWidget     *widget,
   return GTK_WIDGET_CLASS (terminal_screen_parent_class)->focus_in_event (widget, event);
 }
 
+void
+terminal_screen_set_user_title (TerminalScreen *screen,
+                                const char     *title)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+
+  g_return_if_fail (TERMINAL_IS_SCREEN (screen));
+
+  if (g_strcmp0 (priv->title, title) == 0)
+    return;
+
+  g_free (priv->title);
+  priv->title = title && title[0] ? g_strdup (title) : nullptr;
+
+  g_object_notify (G_OBJECT (screen), "description");
+}
+
+const char*
+terminal_screen_get_user_title (TerminalScreen *screen)
+{
+  TerminalScreenPrivate *priv;
+
+  g_return_val_if_fail (TERMINAL_IS_SCREEN (screen), nullptr);
+
+  priv = screen->priv;
+
+  return priv->title ? priv->title : _("Terminal");
+}
+
 /**
  * terminal_screen_get_current_dir:
  * @screen:
@@ -2002,6 +2064,8 @@ terminal_screen_child_exited (VteTerminal *terminal,
 
   priv->child_pid = -1;
 
+  g_object_notify (G_OBJECT (screen), "description");
+
   action = TerminalExitAction(g_settings_get_enum (priv->profile, TERMINAL_PROFILE_EXIT_ACTION_KEY));
 
   switch (action)
diff --git a/src/terminal-screen.hh b/src/terminal-screen.hh
index ded6b8ca..f4ec9047 100644
--- a/src/terminal-screen.hh
+++ b/src/terminal-screen.hh
@@ -113,7 +113,12 @@ void terminal_screen_set_profile (TerminalScreen *screen,
 GSettings* terminal_screen_get_profile (TerminalScreen *screen);
 GSettings* terminal_screen_ref_profile (TerminalScreen *screen);
 
+const char *terminal_screen_get_user_title     (TerminalScreen *screen);
 const char* terminal_screen_get_title          (TerminalScreen *screen);
+char *      terminal_screen_get_description    (TerminalScreen *screen);
+
+void terminal_screen_set_user_title (TerminalScreen *screen,
+                                     const char *text);
 
 char *terminal_screen_get_current_dir (TerminalScreen *screen);
 
-- 
2.40.1


From 4c0ac030a8667debd3175de0f57579e6c672eb9e Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 30 Jun 2016 17:39:48 +0200
Subject: [PATCH 10/16] Revert "Remove the static title setting from profile
 preferences"

This reverts commit e9cb8fea14a849704074c5d69f173bcf4dc2fb27.

https://bugzilla.redhat.com/show_bug.cgi?id=1296110
---
 src/org.gnome.Terminal.gschema.xml |  5 +++
 src/preferences.ui                 | 71 ++++++++++++++++++++++++++++++
 src/profile-editor.cc              |  6 +++
 src/terminal-schemas.hh            |  1 +
 src/terminal-screen.cc             |  9 ++++
 5 files changed, 92 insertions(+)

diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index d34e8dc2..9ba0f3b5 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -209,6 +209,11 @@
       <summary>Whether to enable SIXEL images</summary>
       <description>If true, SIXEL sequences are parsed and images are rendered.</description>
     </key>
+    <key name="title" type="s">
+      <default l10n="messages" context="title">'Terminal'</default>
+      <summary>Title for terminal</summary>
+      <description>Title to display for the terminal window or tab. This title may be replaced by or combined with the title set by the application inside the terminal, depending on the title_mode setting.</description>
+    </key>
     <key name="bold-is-bright" type="b">
       <default>false</default>
       <summary>Whether bold is also bright</summary>
diff --git a/src/preferences.ui b/src/preferences.ui
index 5422de71..d851bcb6 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -1999,6 +1999,77 @@
                             <property name="can_focus">False</property>
                             <property name="border_width">12</property>
                             <property name="row_spacing">18</property>
+                            <child>
+                              <object class="GtkGrid">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="row_spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Title</property>
+                                    <attributes>
+                                      <attribute name="weight" value="bold"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">0</property>
+                                    <property name="left_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkAlignment">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="left_padding">12</property>
+                                    <child>
+                                      <object class="GtkGrid">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="column_spacing">12</property>
+                                        <property name="row_spacing">6</property>
+                                        <child>
+                                          <object class="GtkLabel" id="title-entry-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">Title:</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="mnemonic_widget">title-entry</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">0</property>
+                                            <property name="left_attach">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkEntry" id="title-entry">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="hexpand">True</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">0</property>
+                                            <property name="left_attach">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="left_attach">0</property>
+                                    <property name="width">3</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">0</property>
+                                <property name="left_attach">0</property>
+                              </packing>
+                            </child>
                             <child>
                               <object class="GtkGrid">
                                 <property name="visible">True</property>
diff --git a/src/profile-editor.cc b/src/profile-editor.cc
index d0e71e26..f7997fbf 100644
--- a/src/profile-editor.cc
+++ b/src/profile-editor.cc
@@ -1416,6 +1416,12 @@ profile_prefs_load (const char *uuid, GSettings *profile)
                                             (GSettingsBindSetMapping) enum_to_string,
                                             terminal_preserve_working_directory_get_type, nullptr);
 
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_TITLE_KEY,
+                               gtk_builder_get_object (builder, "title-entry"),
+                               "text",
+                               GSettingsBindFlags(G_SETTINGS_BIND_GET |
+                                                  G_SETTINGS_BIND_SET));
   profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
                                gtk_builder_get_object (builder,
                                                        "use-custom-command-checkbutton"),
diff --git a/src/terminal-schemas.hh b/src/terminal-schemas.hh
index c33723bf..d0f111a0 100644
--- a/src/terminal-schemas.hh
+++ b/src/terminal-schemas.hh
@@ -71,6 +71,7 @@ G_BEGIN_DECLS
 #define TERMINAL_PROFILE_SCROLL_ON_KEYSTROKE_KEY        "scroll-on-keystroke"
 #define TERMINAL_PROFILE_SCROLL_ON_OUTPUT_KEY           "scroll-on-output"
 #define TERMINAL_PROFILE_TEXT_BLINK_MODE_KEY            "text-blink-mode"
+#define TERMINAL_PROFILE_TITLE_KEY                      "title"
 #define TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY         "use-custom-command"
 #define TERMINAL_PROFILE_USE_SKEY_KEY                   "use-skey"
 #define TERMINAL_PROFILE_USE_SYSTEM_FONT_KEY            "use-system-font"
diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 8b37de55..506ab66e 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -1059,11 +1059,14 @@ char *
 terminal_screen_get_description (TerminalScreen *screen)
 {
   TerminalScreenPrivate *priv = screen->priv;
+  gs_free char *title_string = nullptr;
   const char *title;
 
   /* use --title argument if one was supplied, otherwise ask the profile */
   if (priv->title)
     title = priv->title;
+  else
+    title = title_string = g_settings_get_string (priv->profile, TERMINAL_PROFILE_TITLE_KEY);
 
   return g_strdup_printf ("%s — %d",
                           title && title[0] ? title : _("Terminal"),
@@ -1109,6 +1112,12 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
       vte_terminal_set_cjk_ambiguous_width (vte_terminal, width);
     }
 
+  if (!prop_name ||
+      prop_name == I_(TERMINAL_PROFILE_TITLE_KEY))
+    {
+      g_object_notify (object, "description");
+    }
+
   if (gtk_widget_get_realized (GTK_WIDGET (screen)) &&
       (!prop_name ||
        prop_name == I_(TERMINAL_PROFILE_USE_SYSTEM_FONT_KEY) ||
-- 
2.40.1


From 210b3de7896fe3a03f9fa14ce60d436f3c09aa3b Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Tue, 17 Feb 2015 17:06:17 +0100
Subject: [PATCH 11/16] Restore translations for setting a title and
 transparency

---
 po/am.po          |   8 +-
 po/an.po          |  12 +-
 po/ar.po          |  16 +-
 po/as.po          |  16 +-
 po/ast.po         |   8 +-
 po/az.po          |   8 +-
 po/be.po          |   3 +
 po/be@latin.po    |   8 +-
 po/bg.po          |   9 +
 po/bn.po          |   8 +-
 po/bn_IN.po       |  11 +-
 po/br.po          |   6 +-
 po/bs.po          |  10 +
 po/ca.po          |  12 +
 po/ca@valencia.po |  12 +
 po/cs.po          |  14 +-
 po/cy.po          |   8 +-
 po/da.po          |  12 +
 po/de.po          |  12 +
 po/dz.po          |   8 +-
 po/el.po          |  15 +-
 po/en@shaw.po     |   8 +-
 po/en_CA.po       |   8 +-
 po/en_GB.po       |  16 +-
 po/eo.po          |   8 +-
 po/es.po          |  16 +-
 po/et.po          |   3 +
 po/eu.po          |  12 +
 po/fa.po          |  18 +-
 po/fi.po          |  12 +
 po/fr.po          |  24 ++
 po/fur.po         |  11 +-
 po/ga.po          |   3 +
 po/gl.po          |  15 +-
 po/gu.po          |  16 +-
 po/he.po          |  16 +-
 po/hi.po          |  17 +-
 po/hr.po          |  10 +
 po/hu.po          |  12 +
 po/hy.po          |   8 +-
 po/id.po          |  12 +
 po/it.po          |  12 +
 po/ja.po          |  12 +
 po/ka.po          |   5 +
 po/kk.po          |  12 +
 po/km.po          |   4 +-
 po/kn.po          |  15 +-
 po/ko.po          |  12 +
 po/ku.po          |   8 +-
 po/lt.po          |  12 +
 po/lv.po          |  16 ++
 po/mai.po         |   8 +-
 po/mg.po          |   8 +-
 po/mk.po          |   8 +-
 po/ml.po          |   3 +
 po/mn.po          |   8 +-
 po/mr.po          |  16 +-
 po/ms.po          |   4 +-
 po/nb.po          |  12 +
 po/nds.po         |   8 +-
 po/ne.po          |  11 +-
 po/nl.po          |  12 +
 po/nn.po          |   8 +-
 po/oc.po          |  12 +-
 po/or.po          |   4 +-
 po/pa.po          |  23 +-
 po/ps.po          |   8 +-
 po/pt.po          |  16 +-
 po/pt_BR.po       |  12 +
 po/ro.po          |   4 +-
 po/ru.po          |  16 ++
 po/rw.po          |   3 +-
 po/si.po          |   8 +-
 po/sk.po          |  12 +
 po/sl.po          | 559 +---------------------------------------------
 po/sq.po          |   8 +-
 po/sr.po          |  22 +-
 po/sr@latin.po    |  22 +-
 po/sv.po          |  12 +
 po/ta.po          |  27 ++-
 po/te.po          |  27 ++-
 po/tg.po          |  16 +-
 po/th.po          |  20 +-
 po/tr.po          |  12 +
 po/ug.po          |   4 +-
 po/uk.po          |  15 ++
 po/vi.po          |  15 +-
 po/wa.po          |  12 +-
 po/xh.po          |  12 +-
 po/zh_CN.po       |  15 +-
 po/zh_HK.po       |  15 +-
 po/zh_TW.po       |  15 +-
 92 files changed, 734 insertions(+), 887 deletions(-)

diff --git a/po/am.po b/po/am.po
index 3445d96d..ee992f07 100644
--- a/po/am.po
+++ b/po/am.po
@@ -214,8 +214,8 @@ msgid "<b>Background</b>"
 msgstr "<b>መደብ</b>"
 
 #: ../src/gnome-terminal.glade2.h:2
-msgid "<b>Command</b>"
-msgstr "<b>ትእዛዝ</b>"
+msgid "Command"
+msgstr "ትእዛዝ"
 
 #: ../src/gnome-terminal.glade2.h:3
 msgid "<b>Compatibility</b>"
@@ -614,8 +614,8 @@ msgid "_Text color:"
 msgstr "የ_ጽሑፍ ቀለም፦"
 
 #: ../src/gnome-terminal.glade2.h:102
-msgid "_Transparent background"
-msgstr "_የሚያሳይ መደብ"
+msgid "Transparent background"
+msgstr "የሚያሳይ መደብ"
 
 #: ../src/gnome-terminal.glade2.h:103
 msgid "_Update login records when command is launched"
diff --git a/po/an.po b/po/an.po
index fcec2668..9e07cb68 100644
--- a/po/an.po
+++ b/po/an.po
@@ -2241,8 +2241,8 @@ msgstr "_Zarrar a finestra"
 #~ msgid "Use custom default terminal si_ze"
 #~ msgstr "Emplegar grandaria predeterminada presonali_zada de terminal"
 
-#~ msgid "Title"
-#~ msgstr "Titol"
+msgid "Title"
+msgstr "Titol"
 
 #~ msgid "When terminal commands set their o_wn titles:"
 #~ msgstr ""
@@ -2266,8 +2266,8 @@ msgstr "_Zarrar a finestra"
 #~ msgid "Close Window"
 #~ msgstr "Zarrar a finestra"
 
-#~ msgid "Set Title"
-#~ msgstr "Establir titol"
+msgid "Set Title"
+msgstr "Establir titol"
 
 #~ msgid "Switch to Tab 2"
 #~ msgstr "Cambiar a la pestanya 2"
@@ -2340,8 +2340,8 @@ msgstr "_Zarrar a finestra"
 #~ msgid "_Input Methods"
 #~ msgstr "Me_todos de dentrada"
 
-#~ msgid "_Title:"
-#~ msgstr "_Titol:"
+msgid "_Title:"
+msgstr "_Titol:"
 
 #~ msgid "Keyboard Shortcuts"
 #~ msgstr "Alcorces de teclau"
diff --git a/po/ar.po b/po/ar.po
index fac62fd1..f77804d8 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -2574,11 +2574,11 @@ msgstr "أغ_لق النافذة"
 #~ msgid "Default size:"
 #~ msgstr "الحجم المبدئي:"
 
-#~ msgid "Title"
-#~ msgstr "العنوان"
+msgid "Title"
+msgstr "العنوان"
 
-#~ msgid "_Title:"
-#~ msgstr "ال_عنوان:"
+msgid "_Title:"
+msgstr "ال_عنوان:"
 
 #~ msgid "Title and Command"
 #~ msgstr "العنوان والأمر"
@@ -2586,8 +2586,8 @@ msgstr "أغ_لق النافذة"
 #~ msgid "_Unlimited"
 #~ msgstr "_غير محدود"
 
-#~ msgid "Set Title"
-#~ msgstr "حدد العنوان"
+msgid "Set Title"
+msgstr "حدد العنوان"
 
 #~ msgid "Current Locale"
 #~ msgstr "المحليّة الحالية"
@@ -3330,8 +3330,8 @@ msgstr "أغ_لق النافذة"
 #~ msgid "Background image _scrolls"
 #~ msgstr "صورة الخلفية ت_لتف"
 
-#~ msgid "_Transparent background"
-#~ msgstr "خلفية _شفافة"
+msgid "Transparent background"
+msgstr "خلفية شفافة"
 
 #~ msgid "S_hade transparent or image background:"
 #~ msgstr "_ظلل شفافية أو صورة الخلفية:"
diff --git a/po/as.po b/po/as.po
index 3fade2b8..5b905340 100644
--- a/po/as.po
+++ b/po/as.po
@@ -2163,11 +2163,11 @@ msgstr "উইন্ডো বন্ধ কৰক (_l)"
 #~ msgid "Default size:"
 #~ msgstr "অবিকল্পিত আকাৰ:"
 
-#~ msgid "Title"
-#~ msgstr "শীৰ্ষক"
+msgid "Title"
+msgstr "শীৰ্ষক"
 
-#~ msgid "_Title:"
-#~ msgstr "শীৰ্ষক (_T):"
+msgid "_Title:"
+msgstr "শীৰ্ষক (_T):"
 
 #~ msgid "Title and Command"
 #~ msgstr "শীৰ্ষক আৰু কমান্ড"
@@ -2175,8 +2175,8 @@ msgstr "উইন্ডো বন্ধ কৰক (_l)"
 #~ msgid "_Unlimited"
 #~ msgstr "অসীমিত (_U)"
 
-#~ msgid "Set Title"
-#~ msgstr "শীৰ্ষক নিৰ্ধাৰণ কৰক"
+msgid "Set Title"
+msgstr "শীৰ্ষক নিৰ্ধাৰণ কৰক"
 
 #~ msgid "Current Locale"
 #~ msgstr "বৰ্তমান স্থানীয়"
@@ -2979,8 +2979,8 @@ msgstr "উইন্ডো বন্ধ কৰক (_l)"
 #~ msgid "Background image _scrolls"
 #~ msgstr "পটভূমিৰ ছবি স্ক্ৰল কৰক (_s)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "স্বচ্চ পটভূমি (_T)"
+msgid "Transparent background"
+msgstr "স্বচ্চ পটভূমি "
 
 #~ msgid "S_hade transparent or image background:"
 #~ msgstr "স্বচ্ছ বা ছবিৰ সৈতে পটভূমি ছায়া আচ্ছন্ন কৰক (_h):"
diff --git a/po/ast.po b/po/ast.po
index d1c6e7b8..4dc0892e 100644
--- a/po/ast.po
+++ b/po/ast.po
@@ -1304,8 +1304,8 @@ msgid "_Base on:"
 msgstr "_Basáu en:"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>Comandu</b>"
+msgid "Command"
+msgstr "Comandu"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground, Background, Bold and Underline</b>"
@@ -1598,8 +1598,8 @@ msgid "_Text color:"
 msgstr "Color del _testu:"
 
 #: ../src/profile-preferences.glade.h:77
-msgid "_Transparent background"
-msgstr "Fondu _tresparente"
+msgid "Transparent background"
+msgstr "Fondu tresparente"
 
 #: ../src/profile-preferences.glade.h:78
 msgid "_Underline color:"
diff --git a/po/az.po b/po/az.po
index 586c1e4d..4bd84679 100644
--- a/po/az.po
+++ b/po/az.po
@@ -218,8 +218,8 @@ msgid "<b>Background</b>"
 msgstr "<b>Arxa plan</b>"
 
 #: ../src/gnome-terminal.glade2.h:2
-msgid "<b>Command</b>"
-msgstr "<b>Əmr</b>"
+msgid "Command"
+msgstr "Əmr"
 
 #: ../src/gnome-terminal.glade2.h:3
 msgid "<b>Compatibility</b>"
@@ -620,8 +620,8 @@ msgid "_Text color:"
 msgstr "_Mətn rəngi:"
 
 #: ../src/gnome-terminal.glade2.h:102
-msgid "_Transparent background"
-msgstr "_Şəffaf arxa plan"
+msgid "Transparent background"
+msgstr "Şəffaf arxa plan"
 
 #: ../src/gnome-terminal.glade2.h:103
 msgid "_Update login records when command is launched"
diff --git a/po/be.po b/po/be.po
index 298ec2d6..50f46093 100644
--- a/po/be.po
+++ b/po/be.po
@@ -2635,3 +2635,6 @@ msgstr "_Закрыць акно"
 
 #~ msgid "Current Locale"
 #~ msgstr "Дзейная лакальнасць"
+
+msgid "Transparent background"
+msgstr "Празрысты фон"
diff --git a/po/be@latin.po b/po/be@latin.po
index 82ef0664..27e9877f 100644
--- a/po/be@latin.po
+++ b/po/be@latin.po
@@ -1146,8 +1146,8 @@ msgid "_Base on:"
 msgstr "Na _bazie:"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>Zahad</b>"
+msgid "Command"
+msgstr "Zahad"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground and Background</b>"
@@ -1426,8 +1426,8 @@ msgid "_Text color:"
 msgstr "Koler _tekstu:"
 
 #: ../src/profile-preferences.glade.h:73
-msgid "_Transparent background"
-msgstr "_Prazrysty fon"
+msgid "Transparent background"
+msgstr "Prazrysty fon"
 
 #: ../src/profile-preferences.glade.h:74
 msgid "_Update login records when command is launched"
diff --git a/po/bg.po b/po/bg.po
index b2c4e9d5..83ad8e14 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -2480,3 +2480,12 @@ msgstr "_Затваряне на този прозорец"
 #, c-format
 msgid "Failed to parse arguments: %s\n"
 msgstr "Аргументите не могат да бъдат анализирани: %s\n"
+
+msgid "Transparent background"
+msgstr "Прозрачен фон"
+
+msgid "_Title:"
+msgstr "_Заглавие:"
+
+msgid "Set Title"
+msgstr "Задаване на заглавие"
diff --git a/po/bn.po b/po/bn.po
index 4906009c..f97d43b0 100644
--- a/po/bn.po
+++ b/po/bn.po
@@ -1217,8 +1217,8 @@ msgid "_Base on:"
 msgstr "চিহ্নিত বস্তুর উপর ভিত্তি করে: (_B)"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>কমান্ড</b>"
+msgid "Command"
+msgstr "কমান্ড"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground, Background, and Bold</b>"
@@ -1524,8 +1524,8 @@ msgid "_Text color:"
 msgstr "পাঠ্যের রং: (_T)"
 
 #: ../src/profile-preferences.glade.h:76
-msgid "_Transparent background"
-msgstr "স্বচ্ছ পটভূমি (_T)"
+msgid "Transparent background"
+msgstr "স্বচ্ছ পটভূমি "
 
 #: ../src/profile-preferences.glade.h:77
 msgid "_Unlimited"
diff --git a/po/bn_IN.po b/po/bn_IN.po
index 96f28aae..fdd0ef72 100644
--- a/po/bn_IN.po
+++ b/po/bn_IN.po
@@ -2894,8 +2894,8 @@ msgstr "উইন্ডো বন্ধ করুন (_l)"
 #~ msgid "_Unlimited"
 #~ msgstr "সীমাহীন (_U)"
 
-#~ msgid "Set Title"
-#~ msgstr "শিরোনাম নির্ধারণ করুন"
+msgid "Set Title"
+msgstr "শিরোনাম নির্ধারণ করুন"
 
 #~ msgid "Switch to Tab 3"
 #~ msgstr "ট্যাব ৩-এ পরিবর্তন করুন"
@@ -2936,5 +2936,8 @@ msgstr "উইন্ডো বন্ধ করুন (_l)"
 #~ msgid "_Input Methods"
 #~ msgstr "ইনপুট পদ্ধতি (_I)"
 
-#~ msgid "_Title:"
-#~ msgstr "শিরোনাম: (_T)"
+msgid "_Title:"
+msgstr "শিরোনাম: (_T)"
+
+msgid "Transparent background"
+msgstr "স্বচ্চ পটভূমি "
diff --git a/po/br.po b/po/br.po
index e16ea07d..f4cbe857 100644
--- a/po/br.po
+++ b/po/br.po
@@ -958,8 +958,8 @@ msgid "_Base on:"
 msgstr ""
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>Arc'had</b>"
+msgid "Command"
+msgstr "Arc'had"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground and Background</b>"
@@ -1211,7 +1211,7 @@ msgid "_Text color:"
 msgstr "Liv an destenn :"
 
 #: ../src/profile-preferences.glade.h:73
-msgid "_Transparent background"
+msgid "Transparent background"
 msgstr ""
 
 #: ../src/profile-preferences.glade.h:74
diff --git a/po/bs.po b/po/bs.po
index 49e71085..87035529 100644
--- a/po/bs.po
+++ b/po/bs.po
@@ -680,6 +680,10 @@ msgstr "Kratica tastature za povećavanje fonta"
 msgid "Keyboard shortcut to make font smaller"
 msgstr "Kratica tastature za smanjivanje fonta"
 
+#: ../src/gnome-terminal.glade2.h:102
+msgid "Transparent background"
+msgstr "Providna pozadina"
+
 #: ../src/org.gnome.Terminal.gschema.xml.h:78
 msgid "Keyboard shortcut to make font normal-size"
 msgstr "Kratica tastature za postavljanje fonta na normalnu veličinu"
@@ -2054,3 +2058,9 @@ msgstr ""
 #: ../src/terminal-window.c:3652
 msgid "C_lose Window"
 msgstr "_Zatvori prozor"
+
+msgid "_Title:"
+msgstr "_Naslov:"
+
+msgid "Set Title"
+msgstr "Postavi naslov"
diff --git a/po/ca.po b/po/ca.po
index 17de40fa..7661e3da 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -2510,3 +2510,15 @@ msgstr "Tanca la _finestra"
 #, c-format
 msgid "Failed to parse arguments: %s\n"
 msgstr "Ha fallat l'anàlisi dels arguments: %s\n"
+
+msgid "Transparent background"
+msgstr "Fons transparent"
+
+msgid "Title"
+msgstr "Títol"
+
+msgid "_Title:"
+msgstr "Tít_ol:"
+
+msgid "Set Title"
+msgstr "Estableix el títol"
diff --git a/po/ca@valencia.po b/po/ca@valencia.po
index a6e8fb42..c9ed8508 100644
--- a/po/ca@valencia.po
+++ b/po/ca@valencia.po
@@ -2357,3 +2357,15 @@ msgstr "Tanca la _finestra"
 
 #~ msgid "Whether to use a dark theme variant"
 #~ msgstr "Si s'ha d'utilitzar la variant de tema fosc"
+
+msgid "Transparent background"
+msgstr "Fons transparent"
+
+msgid "Title"
+msgstr "Títol"
+
+msgid "_Title:"
+msgstr "Tít_ol:"
+
+msgid "Set Title"
+msgstr "Estableix el títol"
diff --git a/po/cs.po b/po/cs.po
index 723fd2c4..39d9bdfd 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -2473,8 +2473,14 @@ msgstr "_Zavřít okno"
 msgid "Failed to parse arguments: %s\n"
 msgstr "Selhala analýza argumentů: %s\n"
 
-#~ msgid "Armenian"
-#~ msgstr "Arménské"
+msgid "Transparent background"
+msgstr "Průsvitné pozadí"
 
-#~ msgid "Georgian"
-#~ msgstr "Gruzínské"
+msgid "Title"
+msgstr "Záhlaví"
+
+msgid "_Title:"
+msgstr "Zá_hlaví:"
+
+msgid "Set Title"
+msgstr "Nastavit záhlaví"
diff --git a/po/cy.po b/po/cy.po
index 644df823..cd862feb 100644
--- a/po/cy.po
+++ b/po/cy.po
@@ -1167,8 +1167,8 @@ msgid "_Base on:"
 msgstr "Ei _seilio ar:"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>Gorchymyn</b>"
+msgid "Command"
+msgstr "Gorchymyn"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground and Background</b>"
@@ -1448,8 +1448,8 @@ msgid "_Text color:"
 msgstr "Lliw'r _testun:"
 
 #: ../src/profile-preferences.glade.h:73
-msgid "_Transparent background"
-msgstr "Cefndir _tryloyw"
+msgid "Transparent background"
+msgstr "Cefndir tryloyw"
 
 #: ../src/profile-preferences.glade.h:74
 msgid "_Update login records when command is launched"
diff --git a/po/da.po b/po/da.po
index f3fbaec7..352fcf1c 100644
--- a/po/da.po
+++ b/po/da.po
@@ -2517,3 +2517,15 @@ msgstr "Kunne ikke fortolke argumenter: %s\n"
 
 #~ msgid "_Detach Tab"
 #~ msgstr "_Løsriv faneblad"
+
+msgid "Title"
+msgstr "Titel"
+
+msgid "_Title:"
+msgstr "_Titel:"
+
+msgid "Set Title"
+msgstr "Sæt titel"
+
+msgid "Transparent background"
+msgstr "Gennemsigtig baggrund"
diff --git a/po/de.po b/po/de.po
index 988a392b..6a82f915 100644
--- a/po/de.po
+++ b/po/de.po
@@ -2604,3 +2604,15 @@ msgstr "Einlesen der Argumente schlug fehl: %s\n"
 
 #~ msgid "_Quit"
 #~ msgstr "_Beenden"
+
+msgid "Title"
+msgstr "Titel"
+
+msgid "_Title:"
+msgstr "_Titel:"
+
+msgid "Set Title"
+msgstr "Titel festlegen"
+
+msgid "Transparent background"
+msgstr "Transparenter Hintergrund"
diff --git a/po/dz.po b/po/dz.po
index d97e6102..a768fe4a 100644
--- a/po/dz.po
+++ b/po/dz.po
@@ -1255,8 +1255,8 @@ msgid "_Base on:"
 msgstr "གཞི་བཞག་སྟེ་:(_B)"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>བརྡ་བཀོད་</b>"
+msgid "Command"
+msgstr "བརྡ་བཀོད་"
 
 #: ../src/profile-preferences.glade.h:2
 #, fuzzy
@@ -1551,8 +1551,8 @@ msgid "_Text color:"
 msgstr "ཚིག་ཡིག་ཚོས་གཞི་:(_T)"
 
 #: ../src/profile-preferences.glade.h:77
-msgid "_Transparent background"
-msgstr "དྭངས་གསལ་རྒྱབ་གཞི།(_T)"
+msgid "Transparent background"
+msgstr "དྭངས་གསལ་རྒྱབ་གཞི།"
 
 #: ../src/profile-preferences.glade.h:78
 #, fuzzy
diff --git a/po/el.po b/po/el.po
index 6ec773a0..258c9e84 100644
--- a/po/el.po
+++ b/po/el.po
@@ -2940,17 +2940,17 @@ msgstr "Αποτυχία ανάλυσης των ορισμάτων: %s\n"
 #~ msgid "Default size:"
 #~ msgstr "Προεπιλεγμένο μέγεθος:"
 
-#~ msgid "Title"
-#~ msgstr "Τίτλος"
+msgid "Title"
+msgstr "Τίτλος"
 
-#~ msgid "_Title:"
-#~ msgstr "_Τίτλος:"
+msgid "_Title:"
+msgstr "_Τίτλος:"
 
 #~ msgid "Title and Command"
 #~ msgstr "Τίτλος και εντολή"
 
-#~ msgid "Set Title"
-#~ msgstr "Ορισμός τίτλου"
+msgid "Set Title"
+msgstr "Ορισμός τίτλου"
 
 #~ msgid "Current Locale"
 #~ msgstr "Τρέχουσα τοπική ρύθμιση"
@@ -2988,3 +2988,6 @@ msgstr "Αποτυχία ανάλυσης των ορισμάτων: %s\n"
 
 #~ msgid "_Input Methods"
 #~ msgstr "_Μέθοδοι εισαγωγής"
+
+msgid "Transparent background"
+msgstr "Διάφανο παρασκήνιο"
diff --git a/po/en@shaw.po b/po/en@shaw.po
index 5bdb3925..6fb8a7e1 100644
--- a/po/en@shaw.po
+++ b/po/en@shaw.po
@@ -1212,8 +1212,8 @@ msgid "_Base on:"
 msgstr "_𐑚𐑱𐑕 𐑪𐑯:"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>𐑒𐑩𐑥𐑭𐑯𐑛</b>"
+msgid "Command"
+msgstr "𐑒𐑩𐑥𐑭𐑯𐑛"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground, Background, Bold and Underline</b>"
@@ -1468,8 +1468,8 @@ msgid "_Text color:"
 msgstr "_𐑑𐑧𐑒𐑕𐑑 𐑒𐑳𐑤𐑼:"
 
 #: ../src/profile-preferences.glade.h:78
-msgid "_Transparent background"
-msgstr "_𐑑𐑮𐑨𐑯𐑕𐑐𐑸𐑩𐑯𐑑 𐑚𐑨𐑒𐑜𐑮𐑬𐑯𐑛"
+msgid "Transparent background"
+msgstr "𐑑𐑮𐑨𐑯𐑕𐑐𐑸𐑩𐑯𐑑 𐑚𐑨𐑒𐑜𐑮𐑬𐑯𐑛"
 
 #: ../src/profile-preferences.glade.h:79
 msgid "_Underline color:"
diff --git a/po/en_CA.po b/po/en_CA.po
index 6c9e0cd7..db4aa891 100644
--- a/po/en_CA.po
+++ b/po/en_CA.po
@@ -219,8 +219,8 @@ msgid "<b>Background</b>"
 msgstr "<b>Background</b>"
 
 #: ../src/gnome-terminal.glade2.h:3
-msgid "<b>Command</b>"
-msgstr "<b>Command</b>"
+msgid "Command"
+msgstr "Command"
 
 #: ../src/gnome-terminal.glade2.h:4
 msgid "<b>Compatibility</b>"
@@ -557,8 +557,8 @@ msgid "_Text color:"
 msgstr "_Text colour:"
 
 #: ../src/gnome-terminal.glade2.h:86
-msgid "_Transparent background"
-msgstr "_Transparent background"
+msgid "Transparent background"
+msgstr "Transparent background"
 
 #: ../src/gnome-terminal.glade2.h:87
 msgid "_Update login records when command is launched"
diff --git a/po/en_GB.po b/po/en_GB.po
index 2d112348..675cdb3d 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -2858,8 +2858,8 @@ msgstr "Failed to parse arguments: %s\n"
 #~ msgid "Default size:"
 #~ msgstr "Default size:"
 
-#~ msgid "Title"
-#~ msgstr "Title"
+msgid "Title"
+msgstr "Title"
 
 #~ msgid "When terminal commands set their o_wn titles:"
 #~ msgstr "When terminal commands set their o_wn titles:"
@@ -2876,8 +2876,8 @@ msgstr "Failed to parse arguments: %s\n"
 #~ msgid "_Unlimited"
 #~ msgstr "_Unlimited"
 
-#~ msgid "Set Title"
-#~ msgstr "Set Title"
+msgid "Set Title"
+msgstr "Set Title"
 
 #~ msgid "Switch to Tab 3"
 #~ msgstr "Switch to Tab 3"
@@ -2918,8 +2918,8 @@ msgstr "Failed to parse arguments: %s\n"
 #~ msgid "_Input Methods"
 #~ msgstr "_Input Methods"
 
-#~ msgid "_Title:"
-#~ msgstr "_Title:"
+msgid "_Title:"
+msgstr "_Title:"
 
 #~ msgid "Add or Remove Terminal Encodings"
 #~ msgstr "Add or Remove Terminal Encodings"
@@ -3614,8 +3614,8 @@ msgstr "Failed to parse arguments: %s\n"
 #~ msgid "Background image _scrolls"
 #~ msgstr "Background image _scrolls"
 
-#~ msgid "_Transparent background"
-#~ msgstr "_Transparent background"
+msgid "Transparent background"
+msgstr "Transparent background"
 
 #~ msgid "S_hade transparent or image background:"
 #~ msgstr "S_hade transparent or image background:"
diff --git a/po/eo.po b/po/eo.po
index 0e83b981..0d98ea57 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -2827,8 +2827,8 @@ msgstr "_Fermi la fenestron"
 #~ msgid "_Font:"
 #~ msgstr "_Tiparo:"
 
-#~ msgid "Set Title"
-#~ msgstr "Agordi titolon"
+msgid "Set Title"
+msgstr "Agordi titolon"
 
 #~ msgid "Switch to Tab 3"
 #~ msgstr "Ŝalti al langeto 3"
@@ -2890,8 +2890,8 @@ msgstr "_Fermi la fenestron"
 #~ msgid "_Input Methods"
 #~ msgstr "_Enigmetodoj"
 
-#~ msgid "_Title:"
-#~ msgstr "_Titolo:"
+msgid "_Title:"
+msgstr "_Titolo:"
 
 #~ msgid "On the left side"
 #~ msgstr "Maldekstre"
diff --git a/po/es.po b/po/es.po
index fefea713..1cef08bf 100644
--- a/po/es.po
+++ b/po/es.po
@@ -2946,17 +2946,17 @@ msgstr "Falló al analizar los argumentos: %s\n"
 #~ msgid "Default size:"
 #~ msgstr "Tamaño predeterminado:"
 
-#~ msgid "Title"
-#~ msgstr "Título"
+msgid "Title"
+msgstr "Título"
 
-#~ msgid "_Title:"
-#~ msgstr "_Título:"
+msgid "_Title:"
+msgstr "_Título:"
 
 #~ msgid "Title and Command"
 #~ msgstr "Título y comando"
 
-#~ msgid "Set Title"
-#~ msgstr "Establecer título"
+msgid "Set Title"
+msgstr "Establecer título"
 
 #~ msgid "Current Locale"
 #~ msgstr "Configuración regional actual"
@@ -3783,8 +3783,8 @@ msgstr "Falló al analizar los argumentos: %s\n"
 #~ msgid "_Solid color"
 #~ msgstr "Color _sólido"
 
-#~ msgid "_Transparent background"
-#~ msgstr "Fondo _transparente"
+msgid "Transparent background"
+msgstr "Fondo transparente"
 
 #~ msgid "No such profile \"%s\", using default profile\n"
 #~ msgstr "No existe el perfil «%s», usando el perfil predeterminado\n"
diff --git a/po/et.po b/po/et.po
index 4b1c2a7c..77076116 100644
--- a/po/et.po
+++ b/po/et.po
@@ -1747,3 +1747,6 @@ msgstr "Su_lge aken"
 
 #~ msgid "Choose base profile"
 #~ msgstr "Vali põhiprofiil"
+
+msgid "Transparent background"
+msgstr "Läbipaistev taust"
diff --git a/po/eu.po b/po/eu.po
index 05484111..7f93de46 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -2391,3 +2391,15 @@ msgstr "Huts egin du argumentuak analizatzean: %s\n"
 
 #~ msgid "_Detach Tab"
 #~ msgstr "_Desuztartu fitxa"
+
+msgid "Title"
+msgstr "Titulua"
+
+msgid "_Title:"
+msgstr "_Titulua:"
+
+msgid "Set Title"
+msgstr "Ezarri titulua"
+
+msgid "Transparent background"
+msgstr "Atzeko plano gardena"
diff --git a/po/fa.po b/po/fa.po
index bf738bca..352d7365 100644
--- a/po/fa.po
+++ b/po/fa.po
@@ -2818,8 +2818,11 @@ msgstr "تجزیهٔ آرگومان‌ها ممکن نبود: %s\n"
 #~ msgid "_Font:"
 #~ msgstr "_قلم:"
 
-#~ msgid "Title"
-#~ msgstr "عنوان"
+#~ msgid "Use custom default terminal si_ze"
+#~ msgstr "استفاده از اندازه‌ی _سفارشی پایانه‌ی پیش‌فرض"
+
+msgid "Title"
+msgstr "عنوان"
 
 #~ msgid "When terminal commands set their o_wn titles:"
 #~ msgstr "وقتی که فرمان‌های پایانه عنوان‌های _خودشان را تنظیم می‌کنند:"
@@ -2833,8 +2836,8 @@ msgstr "تجزیهٔ آرگومان‌ها ممکن نبود: %s\n"
 #~ msgid "_Unlimited"
 #~ msgstr "_نامحدود"
 
-#~ msgid "Set Title"
-#~ msgstr "تنظیم عنوان"
+msgid "Set Title"
+msgstr "تنظیم عنوان"
 
 #~ msgid "Switch to Tab 3"
 #~ msgstr "تعویض به زبانه‌ی ۳"
@@ -2875,5 +2878,8 @@ msgstr "تجزیهٔ آرگومان‌ها ممکن نبود: %s\n"
 #~ msgid "_Input Methods"
 #~ msgstr "روش‌های _ورودی"
 
-#~ msgid "_Title:"
-#~ msgstr "_عنوان:"
+msgid "_Title:"
+msgstr "_عنوان:"
+
+msgid "Transparent background"
+msgstr "پس‌زمینه‌ی شفاف"
diff --git a/po/fi.po b/po/fi.po
index 28f05dbd..ba5995c9 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -2782,9 +2782,21 @@ msgstr "Virhe tulkittaessa argumentteja: %s\n"
 #~ msgid "_Update login records when command is launched"
 #~ msgstr "_Päivitä kirjautumistallenne kun komento käynnistetään"
 
+msgid "Transparent background"
+msgstr "Läpinäkyvä tausta"
+
 #~| msgid "Error parsing command: %s"
 #~ msgid "Missing command"
 #~ msgstr "Puuttuva komento"
 
 #~ msgid "Whether to use a dark theme variant"
 #~ msgstr "Käytetäänkö teeman tummaan muunnelmaa"
+
+msgid "Title"
+msgstr "Otsikko"
+
+msgid "_Title:"
+msgstr "_Otsikko:"
+
+msgid "Set Title"
+msgstr "Aseta otsikko"
diff --git a/po/fr.po b/po/fr.po
index 60db7700..71628caa 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -2569,3 +2569,27 @@ msgstr "Impossible d’analyser les paramètres : %s\n"
 
 #~ msgid "Icelandic"
 #~ msgstr "Islandais"
+
+#~ msgid "Set _Character Encoding"
+#~ msgstr "_Définir le codage des caractères"
+
+#~ msgid "Move Tab _Left"
+#~ msgstr "Déplacer l’onglet vers la _gauche"
+
+#~ msgid "Move Tab _Right"
+#~ msgstr "Déplacer l’onglet vers la _droite"
+
+#~ msgid "_Detach Tab"
+#~ msgstr "_Détacher l’onglet"
+
+msgid "Transparent background"
+msgstr "Arrière-plan transparent"
+
+msgid "Title"
+msgstr "Titre"
+
+msgid "_Title:"
+msgstr "_Titre :"
+
+msgid "Set Title"
+msgstr "Définir le titre"
diff --git a/po/fur.po b/po/fur.po
index bfcab11d..4a7aed17 100644
--- a/po/fur.po
+++ b/po/fur.po
@@ -571,6 +571,10 @@ msgstr ""
 msgid "Which encoding to use"
 msgstr "Codifiche di doprâ"
 
+#: ../src/gnome-terminal.glade2.h:86
+msgid "Transparent background"
+msgstr "Fondâl trasparent"
+
 #: src/org.gnome.Terminal.gschema.xml:350
 msgid ""
 "Whether ambiguous-width characters are narrow or wide when using UTF-8 "
@@ -3613,6 +3617,9 @@ msgstr "Analisi dai argoments falide: %s\n"
 #~ msgid "The text you clicked on doesn't seem to be a valid OTP challenge."
 #~ msgstr "Il test fracât nol samee jessi un OTP challenge."
 
+msgid "Set Title"
+msgstr "Imposte titul"
+
 #~ msgid "Switch to Tab 3"
 #~ msgstr "Passe a la schede 3"
 
@@ -3668,8 +3675,8 @@ msgstr "Analisi dai argoments falide: %s\n"
 #~ msgid "_Input Methods"
 #~ msgstr "_Cemût inserî test"
 
-#~ msgid "_Title:"
-#~ msgstr "_Titul:"
+msgid "_Title:"
+msgstr "_Titul:"
 
 #~ msgid "text/plain dropped on terminal had wrong format (%d) or length (%d)\n"
 #~ msgstr ""
diff --git a/po/ga.po b/po/ga.po
index 93d5fa9d..feb87dce 100644
--- a/po/ga.po
+++ b/po/ga.po
@@ -1925,3 +1925,6 @@ msgstr "_Dún Fuinneog"
 #: ../src/terminal-window.c:3582
 msgid "C_lose Terminal"
 msgstr "_Dún Teirminéal"
+
+msgid "Transparent background"
+msgstr "Cúlra trédhearcach"
diff --git a/po/gl.po b/po/gl.po
index c0dc3349..adea6024 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -2500,11 +2500,14 @@ msgstr "P_echar a xanela"
 msgid "Failed to parse arguments: %s\n"
 msgstr "Produciuse un erro ao analizar os argumentos: %s\n"
 
-#~ msgid "org.gnome.Terminal"
-#~ msgstr "org.gnome.Terminal"
+msgid "Title"
+msgstr "Título"
 
-#~ msgid "Armenian"
-#~ msgstr "Armenio"
+msgid "_Title:"
+msgstr "_Título:"
 
-#~ msgid "Georgian"
-#~ msgstr "Xeorxiano"
+msgid "Set Title"
+msgstr "Definir o título"
+
+msgid "Transparent background"
+msgstr "Fondo transparente"
diff --git a/po/gu.po b/po/gu.po
index 76b459cf..485beeac 100644
--- a/po/gu.po
+++ b/po/gu.po
@@ -2155,8 +2155,8 @@ msgstr "વિન્ડો બંધ કરો (_l)"
 #~ msgid "Default size:"
 #~ msgstr "મૂળભૂત માપ:"
 
-#~ msgid "Title"
-#~ msgstr "શીર્ષક"
+msgid "Title"
+msgstr "શીર્ષક"
 
 #~ msgid "When terminal commands set their o_wn titles:"
 #~ msgstr "જ્યારે આદેશો તેમના પોતાના શીર્ષકો સુયોજીત કરે (_w):"
@@ -2176,8 +2176,8 @@ msgstr "વિન્ડો બંધ કરો (_l)"
 #~ msgid "Close Window"
 #~ msgstr "વિન્ડો બંધ કરો"
 
-#~ msgid "Set Title"
-#~ msgstr "શીર્ષકની ગોઠવણી કરો"
+msgid "Set Title"
+msgstr "શીર્ષકની ગોઠવણી કરો"
 
 #~ msgid "The shortcut key “%s” is already bound to the “%s” action"
 #~ msgstr "ટુંકાણ કી “%s“ એ પહેલાથી ક્રિયા “%s“ સાથે બંધાયેલી છે"
@@ -2203,8 +2203,8 @@ msgstr "વિન્ડો બંધ કરો (_l)"
 #~ msgid "_Input Methods"
 #~ msgstr "ઈનપુટ માટેની પધ્ધિતિઓ (_I)"
 
-#~ msgid "_Title:"
-#~ msgstr "શીર્ષક (_T):"
+msgid "_Title:"
+msgstr "શીર્ષક (_T):"
 
 #~ msgid "Keyboard shortcut to switch to tab 1"
 #~ msgstr "ટૅબ ૧ પર જવા માટે કીબોર્ડનું ટુંકાણ"
@@ -2944,8 +2944,8 @@ msgstr "વિન્ડો બંધ કરો (_l)"
 #~ msgid "_Solid color"
 #~ msgstr "ઘટ્ટ રંગ (_S)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "પારદર્શક પાશ્વ ભાગનો ભાગ (_T)"
+msgid "Transparent background"
+msgstr "પારદર્શક પાશ્વ ભાગનો ભાગ"
 
 #~ msgid "No such profile \"%s\", using default profile\n"
 #~ msgstr "\"%s\" જેવી કોઈ રૂપરેખા નથી, મૂળભૂત રૂપરેખા વાપરી રહ્યા છે\n"
diff --git a/po/he.po b/po/he.po
index 8c1c6012..e198baff 100644
--- a/po/he.po
+++ b/po/he.po
@@ -2818,17 +2818,17 @@ msgstr "Failed to parse arguments: %s\n"
 #~ msgid "Default size:"
 #~ msgstr "גודל בררת מחדל:"
 
-#~ msgid "Title"
-#~ msgstr "כותרת"
+msgid "Title"
+msgstr "כותרת"
 
-#~ msgid "_Title:"
-#~ msgstr "_כותרת:"
+msgid "_Title:"
+msgstr "_כותרת:"
 
 #~ msgid "Title and Command"
 #~ msgstr "כותרת ופקודה"
 
-#~ msgid "Set Title"
-#~ msgstr "הגדרת כותרת"
+msgid "Set Title"
+msgstr "הגדרת כותרת"
 
 #~ msgid "Current Locale"
 #~ msgstr "השפה הנוכחית"
@@ -3642,8 +3642,8 @@ msgstr "Failed to parse arguments: %s\n"
 #~ msgid "_Solid color"
 #~ msgstr "צבע _אחיד"
 
-#~ msgid "_Transparent background"
-#~ msgstr "רקע _שקוף"
+msgid "Transparent background"
+msgstr "רקע שקוף"
 
 #~ msgid "No such profile \"%s\", using default profile\n"
 #~ msgstr "No such profile \"%s\", using default profile\n"
diff --git a/po/hi.po b/po/hi.po
index 2d7dc5b1..8d3d0529 100644
--- a/po/hi.po
+++ b/po/hi.po
@@ -2267,9 +2267,8 @@ msgstr "विंडो बंद करें (_l)"
 #~ msgid "Use custom default terminal si_ze"
 #~ msgstr "कस्टम डिफ़ॉल्ट टर्मिनल आकार का उपयोग करें (_z)"
 
-#~| msgid "_Title:"
-#~ msgid "Title"
-#~ msgstr "शीर्षक"
+msgid "Title"
+msgstr "शीर्षक"
 
 #~ msgid "When terminal commands set their o_wn titles:"
 #~ msgstr "जब टर्मिनल कमांड उनका अपना शीर्षक सेट करता है (_w):"
@@ -2289,8 +2288,8 @@ msgstr "विंडो बंद करें (_l)"
 #~ msgid "Close Window"
 #~ msgstr "विंडो बंद करें"
 
-#~ msgid "Set Title"
-#~ msgstr "शीर्षक नियत करें"
+msgid "Set Title"
+msgstr "शीर्षक नियत करें"
 
 #~ msgid "Switch to Tab 2"
 #~ msgstr "टैब 2 पर जाएँ"
@@ -2349,8 +2348,8 @@ msgstr "विंडो बंद करें (_l)"
 #~ msgid "_Input Methods"
 #~ msgstr "इनपुट विधियाँ (_I)"
 
-#~ msgid "_Title:"
-#~ msgstr "शीर्षक (_T):"
+msgid "_Title:"
+msgstr "शीर्षक (_T):"
 
 #~ msgid "Disable connection to session manager"
 #~ msgstr "सत्र प्रबंधक में कनेक्शन निष्क्रिय करें"
@@ -2979,8 +2978,8 @@ msgstr "विंडो बंद करें (_l)"
 #~ msgid "_Background image"
 #~ msgstr "पृष्ठभूमि छवि (_B)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "पारदर्शी पृष्ठभूमि (_T)"
+msgid "Transparent background"
+msgstr "पारदर्शी पृष्ठभूमि"
 
 #~ msgid "S/Key Challenge Response"
 #~ msgstr "एस/कुंजी चैलेंज प्रतिक्रिया"
diff --git a/po/hr.po b/po/hr.po
index aa384812..4a28d9ae 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -2771,3 +2771,13 @@ msgstr "Greška u obradi argumenata: %s\n"
 
 #~ msgid "Use transparency from system theme"
 #~ msgstr "Koristi prozirnost iz teme sustava"
+
+#: ../src/profile-preferences.glade.h:69
+msgid "Transparent background"
+msgstr "Prozirna pozadina"
+
+msgid "_Title:"
+msgstr "_Naslov:"
+
+msgid "Set Title"
+msgstr "Postavi naslov"
diff --git a/po/hu.po b/po/hu.po
index d09d6ece..8911e09d 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -2483,3 +2483,15 @@ msgstr "_Ablak bezárása"
 #, c-format
 msgid "Failed to parse arguments: %s\n"
 msgstr "A paraméterek feldolgozása meghiúsult: %s\n"
+
+msgid "Title"
+msgstr "Cím"
+
+msgid "_Title:"
+msgstr "_Cím:"
+
+msgid "Set Title"
+msgstr "Cím beállítása"
+
+msgid "Transparent background"
+msgstr "Áttetsző háttér"
diff --git a/po/hy.po b/po/hy.po
index aaf2d9b2..4d466f16 100644
--- a/po/hy.po
+++ b/po/hy.po
@@ -757,8 +757,8 @@ msgid "_Base on:"
 msgstr ""
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>Հրաման</b>"
+msgid "Command"
+msgstr "Հրաման"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground and Background</b>"
@@ -1012,8 +1012,8 @@ msgid "_Text color:"
 msgstr "_Տեքստի գույնը՝"
 
 #: ../src/profile-preferences.glade.h:73
-msgid "_Transparent background"
-msgstr "_Թափանցիկ նախադրյալ"
+msgid "Transparent background"
+msgstr "Թափանցիկ նախադրյալ"
 
 #: ../src/profile-preferences.glade.h:74
 msgid "_Update login records when command is launched"
diff --git a/po/id.po b/po/id.po
index 28527487..2cff39a2 100644
--- a/po/id.po
+++ b/po/id.po
@@ -2500,3 +2500,15 @@ msgstr "Gagal mengurai argumen: \"%s\"\n"
 
 #~ msgid "_Detach Tab"
 #~ msgstr "_Pisahkan Tab"
+
+msgid "Transparent background"
+msgstr "Latar belakang transparan"
+
+msgid "Title"
+msgstr "Judul"
+
+msgid "_Title:"
+msgstr "_Judul:"
+
+msgid "Set Title"
+msgstr "Atur Judul"
diff --git a/po/it.po b/po/it.po
index c559a981..a69b00e5 100644
--- a/po/it.po
+++ b/po/it.po
@@ -2428,3 +2428,15 @@ msgstr "Chiudi _finestra"
 #, c-format
 msgid "Failed to parse arguments: %s\n"
 msgstr "Analisi degli argomenti non riuscita: %s\n"
+
+msgid "Transparent background"
+msgstr "Sfondo trasparente"
+
+msgid "Title"
+msgstr "Titolo"
+
+msgid "_Title:"
+msgstr "_Titolo:"
+
+msgid "Set Title"
+msgstr "Imposta titolo"
diff --git a/po/ja.po b/po/ja.po
index ab72bc42..690281a6 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -2534,3 +2534,15 @@ msgstr "ウィンドウを閉じる(_L)"
 
 #~ msgid "_Incremental Search…"
 #~ msgstr "インクリメンタル検索(_I)…"
+
+msgid "Transparent background"
+msgstr "透過な画像にする"
+
+msgid "Title"
+msgstr "タイトル"
+
+msgid "_Title:"
+msgstr "タイトル(_T):"
+
+msgid "Set Title"
+msgstr "タイトルを設定する"
diff --git a/po/ka.po b/po/ka.po
index 6d5c2b62..a2d0ef3a 100644
--- a/po/ka.po
+++ b/po/ka.po
@@ -177,6 +177,11 @@ msgstr "პროფილის ადამიანისთვის-სა
 msgid "Human-readable name of the profile."
 msgstr "პროფილის ადამიანისთვის-სასიამოვნო წასაკითხი სახელი."
 
+#: ../src/gnome-terminal.glade2.h:86
+#, fuzzy
+msgid "Transparent background"
+msgstr "გამჭირვალე"
+
 #: src/org.gnome.Terminal.gschema.xml:139
 msgid "Default color of text in the terminal"
 msgstr "ტერმინალის ტექსტის ნაგულისხმები ფერი"
diff --git a/po/kk.po b/po/kk.po
index 34ce6b2a..5d415eb3 100644
--- a/po/kk.po
+++ b/po/kk.po
@@ -2741,3 +2741,15 @@ msgstr "Аргументтерді өндеу қатемен аяқталды: %
 
 #~ msgid "Be quiet"
 #~ msgstr "Тыныш болу"
+
+msgid "Transparent background"
+msgstr "Мөлдір фон"
+
+msgid "Title"
+msgstr "Атауы"
+
+msgid "_Title:"
+msgstr "А_тауы:"
+
+msgid "Set Title"
+msgstr "Атауын орнату"
diff --git a/po/km.po b/po/km.po
index 352897d2..b6db9394 100644
--- a/po/km.po
+++ b/po/km.po
@@ -2909,8 +2909,8 @@ msgstr "បិទ​បង្អួច"
 #~ msgid "Background image _scrolls"
 #~ msgstr "រមូរ​រូបភាព​ផ្ទៃខាងក្រោយ"
 
-#~ msgid "_Transparent background"
-#~ msgstr "ផ្ទៃខាងក្រោយ​ថ្លា"
+msgid "Transparent background"
+msgstr "ផ្ទៃខាងក្រោយ​ថ្លា"
 
 #~ msgid "S_hade transparent or image background:"
 #~ msgstr "ដាក់​ស្រមោល​ផ្ទៃខាងក្រោយ​ថ្លា ឬ​ផ្ទៃខាងក្រោយ​​រូបភាព ៖"
diff --git a/po/kn.po b/po/kn.po
index c887f88a..0fc1c313 100644
--- a/po/kn.po
+++ b/po/kn.po
@@ -2261,8 +2261,8 @@ msgstr "ಕಿಟಕಿಯನ್ನು ಮುಚ್ಚು  (_l)"
 #~ msgid "Use custom default terminal si_ze"
 #~ msgstr "ಅಗತ್ಯಾನುಗುಣ ಆದೇಶತೆರೆ ಗಾತ್ರವನ್ನು ಬಳಸು (_z)"
 
-#~ msgid "Title"
-#~ msgstr "ಶೀರ್ಷಿಕೆ"
+msgid "Title"
+msgstr "ಶೀರ್ಷಿಕೆ"
 
 #~ msgid "When terminal commands set their o_wn titles:"
 #~ msgstr "ಆದೇಶಗಳು ತಮ್ಮದೆ ಆದ ಹೆಸರಗಳನ್ನು ಇರಿಸಿಕೊಂಡಾಗ (_w):"
@@ -2282,8 +2282,8 @@ msgstr "ಕಿಟಕಿಯನ್ನು ಮುಚ್ಚು  (_l)"
 #~ msgid "Close Window"
 #~ msgstr "ಕಿಟಕಿಯನ್ನು ಮುಚ್ಚು"
 
-#~ msgid "Set Title"
-#~ msgstr "ಶೀರ್ಷಿಕೆಯನ್ನು ನೀಡು"
+msgid "Set Title"
+msgstr "ಶೀರ್ಷಿಕೆಯನ್ನು ನೀಡು"
 
 #~ msgid "Switch to Tab 2"
 #~ msgstr "2 ನೆ ಟ್ಯಾಬ್‌ಗೆ ಬದಲಾಯಿಸಿ"
@@ -2342,5 +2342,8 @@ msgstr "ಕಿಟಕಿಯನ್ನು ಮುಚ್ಚು  (_l)"
 #~ msgid "_Input Methods"
 #~ msgstr "ಇನ್‌ಪುಟ್ ಕ್ರಮಗಳು (_I)"
 
-#~ msgid "_Title:"
-#~ msgstr "ಶೀರ್ಷಿಕೆ(_T):"
+msgid "_Title:"
+msgstr "ಶೀರ್ಷಿಕೆ(_T):"
+
+msgid "Transparent background"
+msgstr "ಪಾರದರ್ಶಕ ಹಿನ್ನಲೆ"
diff --git a/po/ko.po b/po/ko.po
index d30b5fd7..627ca437 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -2537,3 +2537,15 @@ msgstr "인자 파싱에 실패했습니다: %s\n"
 
 #~ msgid "Verbose output"
 #~ msgstr "많이 출력"
+
+msgid "Transparent background"
+msgstr "투명한 배경"
+
+msgid "Title"
+msgstr "제목"
+
+msgid "_Title:"
+msgstr "제목(_T):"
+
+msgid "Set Title"
+msgstr "제목 설정"
diff --git a/po/ku.po b/po/ku.po
index bc2bb7f0..d2a83a00 100644
--- a/po/ku.po
+++ b/po/ku.po
@@ -223,8 +223,8 @@ msgid "<b>Background</b>"
 msgstr "<b>Zemîn</b>"
 
 #: ../src/gnome-terminal.glade2.h:3
-msgid "<b>Command</b>"
-msgstr "<b>Ferman</b>"
+msgid "Command"
+msgstr "Ferman"
 
 #: ../src/gnome-terminal.glade2.h:4
 msgid "<b>Compatibility</b>"
@@ -558,8 +558,8 @@ msgid "_Text color:"
 msgstr "Rengê _nivîsê:"
 
 #: ../src/gnome-terminal.glade2.h:86
-msgid "_Transparent background"
-msgstr "Rûerdê _transparan"
+msgid "Transparent background"
+msgstr "Rûerdê transparan"
 
 #: ../src/gnome-terminal.glade2.h:87
 msgid "_Update login records when command is launched"
diff --git a/po/lt.po b/po/lt.po
index 20f4a6c1..ace70da0 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -2795,3 +2795,15 @@ msgstr "Nepavyko apdoroti argumentų: %s\n"
 
 #~ msgid "Whether to use a dark theme variant"
 #~ msgstr "Ar naudoti tamsų temos variantą"
+
+msgid "Transparent background"
+msgstr "Permatomas fonas"
+
+msgid "Title"
+msgstr "Pavadinimas"
+
+msgid "_Title:"
+msgstr "_Pavadinimas:"
+
+msgid "Set Title"
+msgstr "Nustatyti pavadinimą"
diff --git a/po/lv.po b/po/lv.po
index dd601873..1544e268 100644
--- a/po/lv.po
+++ b/po/lv.po
@@ -2715,3 +2715,19 @@ msgstr "Neizdevās parsēt parametrus — “%s”\n"
 
 #~ msgid "_Add or Remove…"
 #~ msgstr "_Pievienot vai izņemt…"
+
+msgid "Transparent background"
+msgstr "Caurspīdīgs fons"
+
+msgid "Title"
+msgstr "Nosaukums"
+
+msgid "_Title:"
+msgstr "_Nosaukums:"
+
+msgctxt "title"
+msgid "'Terminal'"
+msgstr "“Terminālis”"
+
+msgid "Set Title"
+msgstr "Iestatīt nosaukumu"
diff --git a/po/mai.po b/po/mai.po
index 715d0b9e..0f31634e 100644
--- a/po/mai.po
+++ b/po/mai.po
@@ -1044,8 +1044,8 @@ msgid "_Base on:"
 msgstr "आधार पर: (_B)"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>कमांड</b>"
+msgid "Command"
+msgstr "कमांड"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground and Background</b>"
@@ -1291,8 +1291,8 @@ msgid "_Text color:"
 msgstr "पाठ रँग (_T):"
 
 #: ../src/profile-preferences.glade.h:69
-msgid "_Transparent background"
-msgstr "पारदर्शी पृष्ठभूमि (_T)"
+msgid "Transparent background"
+msgstr "पारदर्शी पृष्ठभूमि"
 
 #: ../src/profile-preferences.glade.h:70
 msgid "_Update login records when command is launched"
diff --git a/po/mg.po b/po/mg.po
index 99fa0f5e..a2166025 100644
--- a/po/mg.po
+++ b/po/mg.po
@@ -220,8 +220,8 @@ msgid "<b>Background</b>"
 msgstr "<b>Afara</b>"
 
 #: ../src/gnome-terminal.glade2.h:3
-msgid "<b>Command</b>"
-msgstr "<b>Baiko</b>"
+msgid "Command"
+msgstr "Baiko"
 
 #: ../src/gnome-terminal.glade2.h:4
 msgid "<b>Compatibility</b>"
@@ -567,8 +567,8 @@ msgid "_Text color:"
 msgstr "Lokon'ny _soratra:"
 
 #: ../src/gnome-terminal.glade2.h:86
-msgid "_Transparent background"
-msgstr "_Afara tatera-pahazavana"
+msgid "Transparent background"
+msgstr "Afara tatera-pahazavana"
 
 #: ../src/gnome-terminal.glade2.h:87
 msgid "_Update login records when command is launched"
diff --git a/po/mk.po b/po/mk.po
index 4fe43192..a5a874b4 100644
--- a/po/mk.po
+++ b/po/mk.po
@@ -863,8 +863,8 @@ msgid "_Base on:"
 msgstr "_Базирано на:"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>Команда</b>"
+msgid "Command"
+msgstr "Команда"
 
 #: ../src/profile-preferences.glade.h:2
 #| msgid "<b>Foreground and Background</b>"
@@ -1167,8 +1167,8 @@ msgid "_Text color:"
 msgstr "_Боја на текстот:"
 
 #: ../src/profile-preferences.glade.h:77
-msgid "_Transparent background"
-msgstr "_Транспарентна позадина"
+msgid "Transparent background"
+msgstr "Транспарентна позадина"
 
 #: ../src/profile-preferences.glade.h:78
 #| msgid "_Text color:"
diff --git a/po/ml.po b/po/ml.po
index 29614970..e3bce122 100644
--- a/po/ml.po
+++ b/po/ml.po
@@ -2577,3 +2577,6 @@ msgstr "ജാലകം അടയ്ക്കുക (_l)"
 
 #~ msgid "_Unlimited"
 #~ msgstr "പരിധിയില്ല (_U)"
+
+msgid "Transparent background"
+msgstr "പുറകിലുള്ളവ കാണാവുന്ന പശ്ചാത്തലം"
diff --git a/po/mn.po b/po/mn.po
index 2f9d8607..09c4437d 100644
--- a/po/mn.po
+++ b/po/mn.po
@@ -217,8 +217,8 @@ msgid "<b>Background</b>"
 msgstr "<b>Дэвсгэр</b>"
 
 #: ../src/gnome-terminal.glade2.h:2
-msgid "<b>Command</b>"
-msgstr "<b>Тушаал</b>"
+msgid "Command"
+msgstr "Тушаал"
 
 #: ../src/gnome-terminal.glade2.h:3
 msgid "<b>Compatibility</b>"
@@ -618,8 +618,8 @@ msgid "_Text color:"
 msgstr "_Текстийн өнгө:"
 
 #: ../src/gnome-terminal.glade2.h:102
-msgid "_Transparent background"
-msgstr "_Тунгалаг дэвсгэр"
+msgid "Transparent background"
+msgstr "Тунгалаг дэвсгэр"
 
 #: ../src/gnome-terminal.glade2.h:103
 msgid "_Update login records when command is launched"
diff --git a/po/mr.po b/po/mr.po
index 61997daf..9c7dc77a 100644
--- a/po/mr.po
+++ b/po/mr.po
@@ -2219,8 +2219,8 @@ msgstr "चौकट बंद करा (_l)"
 #~ msgid "Default size:"
 #~ msgstr "पूर्वनिर्धारीत आकार:"
 
-#~ msgid "Title"
-#~ msgstr "शीर्षक"
+msgid "Title"
+msgstr "शीर्षक"
 
 #~ msgid "When terminal commands set their o_wn titles:"
 #~ msgstr "जेव्हा टर्मिनल आदेश स्वतःचे शिर्षक निश्चित करते (_w):"
@@ -2240,8 +2240,8 @@ msgstr "चौकट बंद करा (_l)"
 #~ msgid "Close Window"
 #~ msgstr "चौकट बंद करा"
 
-#~ msgid "Set Title"
-#~ msgstr "शिर्षक निश्चित करा"
+msgid "Set Title"
+msgstr "शिर्षक निश्चित करा"
 
 #~ msgid "The shortcut key “%s” is already bound to the “%s” action"
 #~ msgstr "“%s” ही शार्टकट कि “%s” या कृतीशी संलग्न आहे"
@@ -2267,8 +2267,8 @@ msgstr "चौकट बंद करा (_l)"
 #~ msgid "_Input Methods"
 #~ msgstr "इनपुट पध्दती (_I)"
 
-#~ msgid "_Title:"
-#~ msgstr "शिर्षक (_T):"
+msgid "_Title:"
+msgstr "शिर्षक (_T):"
 
 #~ msgid "Keyboard shortcut to switch to tab 1"
 #~ msgstr "टॅब 1 वापरण्याकरीता कळफलक शॉर्टकट"
@@ -3015,8 +3015,8 @@ msgstr "चौकट बंद करा (_l)"
 #~ msgid "_Solid color"
 #~ msgstr "गडद रंग (_S)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "पारदर्शी पार्श्वभूमी(_T)"
+msgid "Transparent background"
+msgstr "पारदर्शी पार्श्वभूमी"
 
 #~ msgid "Disabled"
 #~ msgstr "अकार्यान्वीतित"
diff --git a/po/ms.po b/po/ms.po
index 114f0d4e..5d3f2e01 100644
--- a/po/ms.po
+++ b/po/ms.po
@@ -2717,8 +2717,8 @@ msgstr "T_utup Tetingkap"
 #~ msgid "_Profile name:"
 #~ msgstr "_Nama profil: "
 
-#~ msgid "_Transparent background"
-#~ msgstr "LatarBelakang _Telus"
+msgid "Transparent background"
+msgstr "LatarBelakang Telus"
 
 #~ msgid "_Update login records when command is launched"
 #~ msgstr "_Kemaskini rekod logmasuk bila arahan dilancarkan"
diff --git a/po/nb.po b/po/nb.po
index 99cb5599..5b1a79ad 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -2436,3 +2436,15 @@ msgstr "_Lukk vindu"
 #, c-format
 msgid "Failed to parse arguments: %s\n"
 msgstr "Klarte ikke å lese argumenter: %s\n"
+
+msgid "Transparent background"
+msgstr "Gjennomsiktig bakgrunn"
+
+msgid "Title"
+msgstr "Tittel"
+
+msgid "_Title:"
+msgstr "_Tittel:"
+
+msgid "Set Title"
+msgstr "Sett tittel"
diff --git a/po/nds.po b/po/nds.po
index 82f930b1..d52fbd94 100644
--- a/po/nds.po
+++ b/po/nds.po
@@ -748,8 +748,8 @@ msgid "_Base on:"
 msgstr "_Steiht op:"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>Order</b>"
+msgid "Command"
+msgstr "Order"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground and Background</b>"
@@ -996,8 +996,8 @@ msgid "_Text color:"
 msgstr "_Textklöör:"
 
 #: ../src/profile-preferences.glade.h:73
-msgid "_Transparent background"
-msgstr "_Döörschienenachtergrund:"
+msgid "Transparent background"
+msgstr "Döörschienenachtergrund:"
 
 #: ../src/profile-preferences.glade.h:74
 msgid "_Update login records when command is launched"
diff --git a/po/ne.po b/po/ne.po
index 992d7bad..7c560b83 100644
--- a/po/ne.po
+++ b/po/ne.po
@@ -2745,8 +2745,8 @@ msgstr "%sतर्कहरू पार्स गर्न असफल\n"
 #~ msgid "_None (use solid color)"
 #~ msgstr "कुनै पनि होइन (एउटै रङ प्रयोग गर्नुहोस्)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "पारदर्शी पृष्ठभूमि"
+msgid "Transparent background"
+msgstr "पारदर्शी पृष्ठभूमि"
 
 #~ msgid "_Use the system fixed width font"
 #~ msgstr "प्रणाली निश्चित गरिएको फन्ट चौडाइ प्रयोग गर्नुहोस्"
@@ -3338,6 +3338,9 @@ msgstr "%sतर्कहरू पार्स गर्न असफल\n"
 #~ msgid "The text you clicked on doesn't seem to be a valid OTP challenge."
 #~ msgstr "तपाईँले क्लिक गरेको पाठ वैध OTP चुनौती नहुने देखिन्छ ।"
 
+msgid "Set Title"
+msgstr "शीर्षक सेट गर्नुहोस्"
+
 #~ msgid "Switch to Tab 3"
 #~ msgstr "ट्याब ३ मा स्विच गर्नुहोस्"
 
@@ -3477,8 +3480,8 @@ msgstr "%sतर्कहरू पार्स गर्न असफल\n"
 #~ msgid "_Input Methods"
 #~ msgstr "आगत विधि"
 
-#~ msgid "_Title:"
-#~ msgstr "शीर्षक:"
+msgid "_Title:"
+msgstr "शीर्षक:"
 
 #~ msgid "text/plain dropped on terminal had wrong format (%d) or length (%d)\n"
 #~ msgstr "टर्मिनलमा छोडिएको पाठ/सादा गलत ढाँचा (%d) वा लम्बाइ (%d)को थियो\n"
diff --git a/po/nl.po b/po/nl.po
index 91320a33..38a58507 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -2831,3 +2831,15 @@ msgstr "Argumenten ontleden is mislukt: %s\n"
 
 #~ msgid "_Add or Remove…"
 #~ msgstr "_Toevoegen of verwijderen…"
+
+msgid "Title"
+msgstr "Titel"
+
+msgid "_Title:"
+msgstr "_Titel:"
+
+msgid "Set Title"
+msgstr "Titel instellen"
+
+msgid "Transparent background"
+msgstr "Transparante achtergrond"
diff --git a/po/nn.po b/po/nn.po
index 5aa43b11..f892290c 100644
--- a/po/nn.po
+++ b/po/nn.po
@@ -1149,8 +1149,8 @@ msgid "_Base on:"
 msgstr "_Tuft på:"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>Kommando</b>"
+msgid "Command"
+msgstr "Kommando"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground and Background</b>"
@@ -1429,8 +1429,8 @@ msgid "_Text color:"
 msgstr "_Tekstfarge:"
 
 #: ../src/profile-preferences.glade.h:73
-msgid "_Transparent background"
-msgstr "_Gjennomskinleg bakgrunn"
+msgid "Transparent background"
+msgstr "Gjennomskinleg bakgrunn"
 
 #: ../src/profile-preferences.glade.h:74
 msgid "_Update login records when command is launched"
diff --git a/po/oc.po b/po/oc.po
index 4563b354..0ecd5919 100644
--- a/po/oc.po
+++ b/po/oc.po
@@ -3057,8 +3057,8 @@ msgstr "Impossible d'analisar los paramètres : %s\n"
 #~ msgid "Save as..."
 #~ msgstr "Enregistrar jos..."
 
-#~ msgid "_Title:"
-#~ msgstr "_Títol :"
+msgid "_Title:"
+msgstr "_Títol :"
 
 #~ msgid "_Detach tab"
 #~ msgstr "Des_tacar l'onglet"
@@ -3518,8 +3518,8 @@ msgstr "Impossible d'analisar los paramètres : %s\n"
 #~ msgid "_Use the system fixed width font"
 #~ msgstr "_Utilizar la poliça de chassa fixa del sistèma"
 
-#~ msgid "Set Title"
-#~ msgstr "Definir lo títol"
+msgid "Set Title"
+msgstr "Definir lo títol"
 
 #~ msgid "The shortcut key “%s” is already bound to the “%s” action"
 #~ msgstr "L'acorchi de clavièr « %s » es ja atribuit a l'accion « %s »"
@@ -3833,8 +3833,8 @@ msgstr "Impossible d'analisar los paramètres : %s\n"
 #~ msgid "Run;"
 #~ msgstr "Executar;Consòla;Shell;"
 
-#~ msgid "_Transparent background"
-#~ msgstr "Rèireplan _transparent"
+msgid "Transparent background"
+msgstr "Rèireplan transparent"
 
 #~ msgid ""
 #~ "A subset of possible encodings are presented in the Encoding submenu. "
diff --git a/po/or.po b/po/or.po
index ec1e6bfb..218acd71 100644
--- a/po/or.po
+++ b/po/or.po
@@ -2705,8 +2705,8 @@ msgstr "ଶୀର୍ଷକ (_T):"
 #~ msgid "Background image _scrolls"
 #~ msgstr "ପୃଷ୍ଠଭୂମି ଚିତ୍ର ସ୍କ୍ରୋଲଗୁଡିକ (_s)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "ସ୍ବଚ୍ଛ ପୃଷ୍ଠଭୂମି (_T)"
+msgid "Transparent background"
+msgstr "ସ୍ବଚ୍ଛ ପୃଷ୍ଠଭୂମି"
 
 #~ msgid "S_hade transparent or image background:"
 #~ msgstr "ଛାୟା ସ୍ବଚ୍ଛ କିମ୍ବା ଚିତ୍ର ପୃଷ୍ଠଭୂମି (_h):"
diff --git a/po/pa.po b/po/pa.po
index 1cb4b46d..2bdd01fe 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -2718,10 +2718,9 @@ msgstr "ਵਿੰਡੋ ਬੰਦ ਕਰੋ(_l)"
 #~ msgid "GNOME Terminal Client"
 #~ msgstr "ਗਨੋਮ ਟਰਮੀਨਲ ਕਲਾਇਟ"
 
-#~| msgid "Terminal"
-#~ msgctxt "title"
-#~ msgid "'Terminal'"
-#~ msgstr "'ਟਰਮੀਨਲ'"
+msgctxt "title"
+msgid "'Terminal'"
+msgstr "'ਟਰਮੀਨਲ'"
 
 #~ msgid "Title for terminal"
 #~ msgstr "ਟਰਮੀਨਲ ਲਈ ਟਾਈਟਲ"
@@ -2766,11 +2765,11 @@ msgstr "ਵਿੰਡੋ ਬੰਦ ਕਰੋ(_l)"
 #~ msgid "Default size:"
 #~ msgstr "ਡਿਫਾਲਟ ਸਾਈਜ਼:"
 
-#~ msgid "Title"
-#~ msgstr "ਟਾਈਟਲ"
+msgid "Title"
+msgstr "ਟਾਈਟਲ"
 
-#~ msgid "_Title:"
-#~ msgstr "ਟਾਈਟਲ(_T):"
+msgid "_Title:"
+msgstr "ਟਾਈਟਲ(_T):"
 
 #~ msgid "Title and Command"
 #~ msgstr "ਟਾਈਟਲ ਅਤੇ ਕਮਾਂਡ"
@@ -2778,8 +2777,8 @@ msgstr "ਵਿੰਡੋ ਬੰਦ ਕਰੋ(_l)"
 #~ msgid "_Unlimited"
 #~ msgstr "ਬੇਅੰਤ(_U)"
 
-#~ msgid "Set Title"
-#~ msgstr "ਟਾਈਟਲ ਸੈੱਟ ਕਰੋ"
+msgid "Set Title"
+msgstr "ਟਾਈਟਲ ਸੈੱਟ ਕਰੋ"
 
 #~ msgid "Current Locale"
 #~ msgstr "ਮੌਜੂਦ ਲੋਕੇਲ"
@@ -3559,8 +3558,8 @@ msgstr "ਵਿੰਡੋ ਬੰਦ ਕਰੋ(_l)"
 #~ msgid "_Solid color"
 #~ msgstr "ਇੱਕ ਰੰਗ ਵਰਤੋਂ(_S)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "ਪਾਰਦਰਸ਼ੀ ਬੈਕਗਰਾਊਂਡ(_T)"
+msgid "Transparent background"
+msgstr "ਪਾਰਦਰਸ਼ੀ ਬੈਕਗਰਾਊਂਡ"
 
 #~ msgid "S/Key Challenge Response"
 #~ msgstr "S/ਸਵਿੱਚ ਚੈਲੰਜ਼ ਜਵਾਬ"
diff --git a/po/ps.po b/po/ps.po
index b25a2cb4..3855b2f3 100644
--- a/po/ps.po
+++ b/po/ps.po
@@ -810,8 +810,8 @@ msgid "_Base on:"
 msgstr ":پر بنسټ د_"
 
 #: ../src/profile-preferences.glade.h:1
-msgid "<b>Command</b>"
-msgstr "<b>بولۍ</b>"
+msgid "Command"
+msgstr "بولۍ"
 
 #: ../src/profile-preferences.glade.h:2
 msgid "<b>Foreground and Background</b>"
@@ -1053,8 +1053,8 @@ msgid "_Text color:"
 msgstr ":د ليکنې رنګ_"
 
 #: ../src/profile-preferences.glade.h:69
-msgid "_Transparent background"
-msgstr "روڼ شاليد_"
+msgid "Transparent background"
+msgstr "روڼ شاليد"
 
 #: ../src/profile-preferences.glade.h:70
 msgid "_Update login records when command is launched"
diff --git a/po/pt.po b/po/pt.po
index f5df7eb5..9728483b 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -2865,11 +2865,11 @@ msgstr "Falha ao processar argumentos: %s\n"
 #~ msgid "Default size:"
 #~ msgstr "Tamanho predefinido:"
 
-#~ msgid "Title"
-#~ msgstr "Título"
+msgid "Title"
+msgstr "Título"
 
-#~ msgid "_Title:"
-#~ msgstr "_Título:"
+msgid "_Title:"
+msgstr "_Título:"
 
 #~ msgid "Title and Command"
 #~ msgstr "Título e comando"
@@ -2877,8 +2877,8 @@ msgstr "Falha ao processar argumentos: %s\n"
 #~ msgid "_Unlimited"
 #~ msgstr "_Ilimitado"
 
-#~ msgid "Set Title"
-#~ msgstr "Definir o Título"
+msgid "Set Title"
+msgstr "Definir o Título"
 
 #~ msgid "Current Locale"
 #~ msgstr "Configuração Regional Atual"
@@ -3633,8 +3633,8 @@ msgstr "Falha ao processar argumentos: %s\n"
 #~ msgid "Background image _scrolls"
 #~ msgstr "Imagem de fundo _rola"
 
-#~ msgid "_Transparent background"
-#~ msgstr "Fundo _transparente"
+msgid "Transparent background"
+msgstr "Fundo transparente"
 
 #~ msgid "S_hade transparent or image background:"
 #~ msgstr "Transparente som_breado ou imagem de fundo:"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 4fac562a..117f63bb 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -2423,3 +2423,15 @@ msgstr "_Fechar janela"
 #, c-format
 msgid "Failed to parse arguments: %s\n"
 msgstr "Falha ao analisar os argumentos: %s\n"
+
+msgid "Title"
+msgstr "Título"
+
+msgid "_Title:"
+msgstr "_Título:"
+
+msgid "Set Title"
+msgstr "Definir título"
+
+msgid "Transparent background"
+msgstr "Fundo transparente"
diff --git a/po/ro.po b/po/ro.po
index 627aea90..14d04172 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -3545,8 +3545,8 @@ msgstr "Parsarea argumentelor a eșuat: %s\n"
 #~ msgid "_Solid color"
 #~ msgstr "Culoare _solidă"
 
-#~ msgid "_Transparent background"
-#~ msgstr "Fundal _transparent"
+msgid "Transparent background"
+msgstr "Fundal transparent"
 
 #~ msgid "_Unlimited"
 #~ msgstr "_Neliminat"
diff --git a/po/ru.po b/po/ru.po
index e563cb75..d3fabaca 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -2771,3 +2771,19 @@ msgstr "Не удалось разобрать аргументы: %s\n"
 
 #~ msgid "_Add or Remove…"
 #~ msgstr "_Добавить или удалить…"
+
+msgid "Transparent background"
+msgstr "Прозрачный фон"
+
+msgid "Title"
+msgstr "Заголовок"
+
+msgid "_Title:"
+msgstr "За_головок:"
+
+msgctxt "title"
+msgid "'Terminal'"
+msgstr "'Терминал'"
+
+msgid "Set Title"
+msgstr "Установить заголовок"
diff --git a/po/rw.po b/po/rw.po
index 012f64e3..5ff633f8 100644
--- a/po/rw.po
+++ b/po/rw.po
@@ -749,7 +749,7 @@ msgstr "Ibara ry'Inyandiko..."
 
 #: ../src/gnome-terminal.glade2.h:102
 #, fuzzy
-msgid "_Transparent background"
+msgid "Transparent background"
 msgstr "Mbuganyuma"
 
 #: ../src/gnome-terminal.glade2.h:103
@@ -2398,7 +2398,6 @@ msgstr ""
 
 # sch/source\ui\app\menu.src:RID_MENU.WORKAROUND_22.SID_INSERT_TITLE.text
 #: ../src/terminal-screen.c:2005
-#, fuzzy
 msgid "_Title:"
 msgstr "Umutwe..."
 
diff --git a/po/si.po b/po/si.po
index adca7d5a..6379cee7 100644
--- a/po/si.po
+++ b/po/si.po
@@ -218,8 +218,8 @@ msgid "<b>Background</b>"
 msgstr "<b>පසුබිම</b>"
 
 #: ../src/gnome-terminal.glade2.h:3
-msgid "<b>Command</b>"
-msgstr "<b>විධානය</b>"
+msgid "Command"
+msgstr "විධානය"
 
 #: ../src/gnome-terminal.glade2.h:4
 msgid "<b>Compatibility</b>"
@@ -538,8 +538,8 @@ msgid "_Text color:"
 msgstr "පෙළ වර්‍ණ: (_T)"
 
 #: ../src/gnome-terminal.glade2.h:86
-msgid "_Transparent background"
-msgstr "විනිවිද පෙනෙන පසුබිම (_T)"
+msgid "Transparent background"
+msgstr "විනිවිද පෙනෙන පසුබිම"
 
 #: ../src/gnome-terminal.glade2.h:87
 msgid "_Update login records when command is launched"
diff --git a/po/sk.po b/po/sk.po
index e6745075..20d303c8 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -3086,3 +3086,15 @@ msgstr "_Zavrieť okno"
 #~ "\n"
 #~ "Viac informácii o jednotlivých príkazoch získate pomocou „%s PRÍKAZ --"
 #~ "help“.\n"
+
+msgid "Transparent background"
+msgstr "Priehľadné pozadie"
+
+msgid "Title"
+msgstr "Titulok"
+
+msgid "_Title:"
+msgstr "_Titulok:"
+
+msgid "Set Title"
+msgstr "Nastaviť titulok"
diff --git a/po/sl.po b/po/sl.po
index 796c3a09..a8344029 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -2461,557 +2461,14 @@ msgstr "_Zapri okno"
 msgid "Failed to parse arguments: %s\n"
 msgstr "Napaka med razčlenjevanjem argumentov: %s\n"
 
-#~ msgid "org.gnome.Terminal"
-#~ msgstr "org.gnome.Terminal"
+msgid "Title"
+msgstr "Naslov"
 
-#~ msgid "Armenian"
-#~ msgstr "Armenski"
+msgid "_Title:"
+msgstr "_Naziv:"
 
-#~ msgid "Georgian"
-#~ msgstr "Gruzijski"
+msgid "Set Title"
+msgstr "Določitev naziva okna"
 
-#~ msgid "Whether to allow bold text"
-#~ msgstr "Ali naj se dovoli krepko besedilo"
-
-#~ msgid "If true, allow applications in the terminal to make text boldface."
-#~ msgstr ""
-#~ "Izbrana možnost omogoča, da programi izpišejo krepko oblikovano besedilo"
-
-#~ msgid "Hindi"
-#~ msgstr "Hindujski"
-
-#~ msgid "Persian"
-#~ msgstr "Perzijski"
-
-#~ msgid "Gujarati"
-#~ msgstr "Gujaratski"
-
-#~ msgid "Gurmukhi"
-#~ msgstr "Gurmukijski"
-
-#~ msgid "Icelandic"
-#~ msgstr "Islandski"
-
-#~ msgid "Set _Character Encoding"
-#~ msgstr "Določi nabor _znakov"
-
-#~ msgid "Move Tab _Left"
-#~ msgstr "Premakni zavihek _levo"
-
-#~ msgid "Move Tab _Right"
-#~ msgstr "Premakni zavihek _desno"
-
-#~ msgid "_Detach Tab"
-#~ msgstr "_Odpni zavihek"
-
-#~ msgid "Whether to show menubar in new windows/tabs"
-#~ msgstr "Ali naj bo v novih oknih ali zavihkih vidna menijska vrstica"
-
-#~ msgid "True if the menubar should be shown in new window"
-#~ msgstr ""
-#~ "Izbrana možnost določa, da bo v novih oknih prikazana menijska vrstica"
-
-#~ msgid "_Quit"
-#~ msgstr "_Končaj"
-
-#~ msgid "Unnamed"
-#~ msgstr "Neimenovan"
-
-#~ msgid "Open in _Midnight Commander"
-#~ msgstr "Odpri s programom _Midnight Commander"
-
-#~ msgid ""
-#~ "Open the currently selected folder in the terminal file manager Midnight "
-#~ "Commander"
-#~ msgstr ""
-#~ "Odpri trenutno izbrano mapo v terminalu s programom Midnight Commander"
-
-#~ msgid ""
-#~ "Open the currently open folder in the terminal file manager Midnight "
-#~ "Commander"
-#~ msgstr ""
-#~ "Odpri trenutno odprto mapo v terminalu s programom Midnight Commander"
-
-#~ msgid "Open _Midnight Commander"
-#~ msgstr "Odpri program _Midnight Commander"
-
-#~ msgid "Open the terminal file manager Midnight Commander"
-#~ msgstr "V terminalu odpri program Midnight Commander"
-
-#~ msgid "Verbose output"
-#~ msgstr "Podroben izpis"
-
-#~ msgid "Output options:"
-#~ msgstr "Možnosti izpisa:"
-
-#~ msgid "Show output options"
-#~ msgstr "Prikaže možnosti odvoda"
-
-#~ msgid "“%s” is not a valid application ID"
-#~ msgstr "»%s« ni veljaven ID programa"
-
-#~ msgid "Server application ID"
-#~ msgstr "ID programa strežnika"
-
-#~ msgid "ID"
-#~ msgstr "ID"
-
-#~ msgid "Show completions"
-#~ msgstr "Pokaži dopolnjevanje"
-
-#~ msgid "Global options:"
-#~ msgstr "Splošne možnosti:"
-
-#~ msgid "Show global options"
-#~ msgstr "Pokaže splošne možnosti"
-
-#~ msgid "FD passing of stdin is not supported"
-#~ msgstr "Sklic FD na standardni vhod ni podprt"
-
-#~ msgid "FD passing of stdout is not supported"
-#~ msgstr "Sklic FD na standardni izhod ni podprt"
-
-#~ msgid "FD passing of stderr is not supported"
-#~ msgstr "Sklic FD na standardno napako ni podprt"
-
-#~ msgid "Invalid argument “%s” to --fd option"
-#~ msgstr "Neveljaven argument »%s« za možnost --fd"
-
-#~ msgid "Forward stdin"
-#~ msgstr "Posreduj standardni vhod"
-
-#~ msgid "Forward stdout"
-#~ msgstr "Posreduj standardni izhod"
-
-#~ msgid "Forward stderr"
-#~ msgstr "Posreduj standardno napako"
-
-#~ msgid "Exec options:"
-#~ msgstr "Možnosti izvajanja:"
-
-#~ msgid "Show exec options"
-#~ msgstr "Prikaže možnosti izvajanja"
-
-#~ msgid "Maximise the window"
-#~ msgstr "Razpni okno"
-
-#~ msgid "Window options:"
-#~ msgstr "Možnosti okna:"
-
-#~ msgid "Show window options"
-#~ msgstr "Pokaži možnosti okna"
-
-#~ msgid "Zoom value “%s” is outside allowed range"
-#~ msgstr "Vrednost približanja »%s« je izven veljavnega območja"
-
-#~ msgid "UUID"
-#~ msgstr "UUID"
-
-#~ msgid "Terminal options:"
-#~ msgstr "Možnosti terminala:"
-
-#~ msgid "Processing options:"
-#~ msgstr "Možnosti opravil:"
-
-#~ msgid "Show processing options"
-#~ msgstr "Prikaže možnosti opravil"
-
-#~ msgid "Missing argument"
-#~ msgstr "Manjka argument"
-
-#~ msgid "Unknown command “%s”"
-#~ msgstr "Neznan ukaz »%s«"
-
-#~ msgid "“%s” needs the command to run as arguments after “--”"
-#~ msgstr "»%s« zahteva ukaz za zagon ukaza kot argument za '--'"
-
-#~ msgid "Extraneous arguments after “--”"
-#~ msgstr "Dodatni argument za » -- «"
-
-#~ msgid "GTerminal"
-#~ msgstr "GTerminal"
-
-#~ msgid "Error processing arguments: %s\n"
-#~ msgstr "Napaka med obdelavo argumentov: %s\n"
-
-#~ msgid "Keyboard shortcut to create a new profile"
-#~ msgstr "Tipkovna bližnjica za ustvarjanje novega profila"
-
-#~ msgid "Keyboard shortcut to open the current profile’s Preferences dialog"
-#~ msgstr "Tipkovna bližnjica za odpiranje pogovornega okna lastnosti profila"
-
-#~ msgid "List of available encodings"
-#~ msgstr "Seznam razpoložljivih znakovnih naborov"
-
-#~ msgid ""
-#~ "A subset of possible encodings are presented in the Encoding submenu. "
-#~ "This is a list of encodings to appear there."
-#~ msgstr ""
-#~ "Podrejeni izbor razpoložljivih naborov znakov je prikazan v podmeniju "
-#~ "kodiranja. Seznam je prikazan spodaj."
-
-#~ msgid "_Profile used when launching a new terminal:"
-#~ msgstr "Profil, ki naj se _uporabi ob zagonu novega terminala:"
-
-#~ msgid "E_ncodings shown in menu:"
-#~ msgstr "Nabori _prikazani v meniju:"
-
-#~ msgid "Profile Editor"
-#~ msgstr "Urejevalnik profilov"
-
-#~ msgid "_Profile name:"
-#~ msgstr "Ime _profila:"
-
-#~ msgid "_Rewrap on resize"
-#~ msgstr "_Samodejno prelomi"
-
-#~ msgid ""
-#~ "<b>Note:</b> Terminal applications have these colors available to them."
-#~ msgstr "<b>Opomba:</b> programi terminala imajo na voljo te barve."
-
-#~ msgid ""
-#~ "<b>Note:</b> These options may cause some applications to behave "
-#~ "incorrectly.  They are only here to allow you to work around certain "
-#~ "applications and operating systems that expect different terminal "
-#~ "behavior."
-#~ msgstr ""
-#~ "<b>Opomba:</b> Te možnosti lahko vplivajo na nepravilno delovanje "
-#~ "nekaterih programov. Tu so le zato, da lahko delate z določenimi programi "
-#~ "in operacijskimi sistemi, ki pričakujejo drugačno delovanje terminala."
-
-#~ msgid "New Terminal in New Tab"
-#~ msgstr "Nov terminal v novem zavihku"
-
-#~ msgid "New Terminal in New Window"
-#~ msgstr "Nov terminal v novem oknu"
-
-#~ msgid "Close All Terminals"
-#~ msgstr "Zapri vsa okna terminala"
-
-#~ msgid "Clear Find Highlight"
-#~ msgstr "Počisti poudarjanje iskanja"
-
-#~ msgid "Detach Terminal"
-#~ msgstr "Odpni terminal"
-
-#~ msgid "User Defined"
-#~ msgstr "Prikrojeno"
-
-#~ msgid "Click button to choose profile"
-#~ msgstr "Kliknite gumb za izbiro profila"
-
-#~ msgid "Profile list"
-#~ msgstr "Seznam profilov"
-
-#~ msgid "Show"
-#~ msgstr "Pokaži"
-
-#~ msgid "_Encoding"
-#~ msgstr "_Nabor znakov"
-
-#~ msgid "_Profile Preferences"
-#~ msgstr "_Možnosti profila"
-
-#~ msgid "Switch to this tab"
-#~ msgstr "Preklopi na ta zavihek"
-
-#~ msgid "_%u. %s"
-#~ msgstr "_%u. %s"
-
-#~ msgid "_%c. %s"
-#~ msgstr "_%c. %s"
-
-#~ msgid "Open _Terminal"
-#~ msgstr "Odpri _terminal"
-
-#~ msgid "Open Ta_b"
-#~ msgstr "Odpri za_vihek"
-
-#~ msgid "New _Profile"
-#~ msgstr "Nov _profil"
-
-#~ msgid "_Close All Terminals"
-#~ msgstr "_Zapri vsa okna terminala"
-
-#~ msgid "Pre_ferences"
-#~ msgstr "_Možnosti"
-
-#~ msgid "Find Ne_xt"
-#~ msgstr "Najdi _naslednje"
-
-#~ msgid "Find Pre_vious"
-#~ msgstr "Najdi _predhodne"
-
-#~ msgid "Go to _Line…"
-#~ msgstr "Skoči v _vrstico ..."
-
-#~ msgid "_Incremental Search…"
-#~ msgstr "_Postopno iskanje ..."
-
-#~ msgid "_Add or Remove…"
-#~ msgstr "_Dodaj ali odstrani ..."
-
-#~ msgid "_Next Terminal"
-#~ msgstr "_Naslednji terminal"
-
-#~ msgid ""
-#~ "Default color of bold text in the terminal, as a color specification (can "
-#~ "be HTML-style hex digits, or a color name such as \"red\"). This is "
-#~ "ignored if bold_color_same_as_fg is true."
-#~ msgstr ""
-#~ "Privzeta barva krepkega besedila terminala. Določena je lahko kot HTML, "
-#~ "šestnajstiško ali pa z imenom (\"red\" za rdečo). Možnost je prezrta "
-#~ "kadar barva krepkega besedila enaka običajnemu besedilu."
-
-#~ msgid "_Custom font"
-#~ msgstr "Pisava po _meri"
-
-#~ msgid "_Text color:"
-#~ msgstr "Barva _besedila:"
-
-#~ msgid "_Background color:"
-#~ msgstr "Barva _ozadja:"
-
-#~ msgid "_Same as text color"
-#~ msgstr "Enako barvi _besedila"
-
-#~ msgid "Bol_d color:"
-#~ msgstr "Barva krepkega besedila:"
-
-#~ msgid "Search _backwards"
-#~ msgstr "Poišči _nazaj"
-
-#~ msgid ""
-#~ "Possible values are \"close\" to close the terminal, and \"restart\" to "
-#~ "restart the command."
-#~ msgstr ""
-#~ "Mogoče vrednosti so \"close\" (zapri) za zapiranje terminala in "
-#~ "\"restart\" (ponovni zagon) za vnovičen zagon ukaza."
-
-#~ msgid "shell;prompt;command;commandline;"
-#~ msgstr "lupina;ukaz;ukazna vrstica;terminal;"
-
-#~ msgid ""
-#~ "If true, the system login records utmp and wtmp will be updated when the "
-#~ "command inside the terminal is launched."
-#~ msgstr ""
-#~ "Izbrana možnost omogoča, da bosta prijavna zapisa utmp in wtmp "
-#~ "posodobljena, ko se bo zagnal ukaz znotraj terminala."
-
-#~ msgid "_Update login records when command is launched"
-#~ msgstr "Posodobi prijavne zapise, ko je _ukaz zagnan"
-
-#~ msgid "Unknown completion request for \"%s\""
-#~ msgstr "Neznana zahteva za dokončanje \"%s\""
-
-#~ msgid "Missing command"
-#~ msgstr "Manjka ukaz"
-
-#~ msgid "Whether to use a dark theme variant"
-#~ msgstr "Ali naj se uporabi temna tema okna"
-
-#~ msgid "Use _dark theme variant"
-#~ msgstr "Uporabi _temno temo"
-
-#~ msgid "Set the terminal title"
-#~ msgstr "Nastavi naziv terminala"
-
-#~ msgid "_Use the system fixed width font"
-#~ msgstr "_Uporabi sistemsko pisavo določene širine"
-
-#~ msgid "_Font:"
-#~ msgstr "_Pisava:"
-
-#~ msgid "_Unlimited"
-#~ msgstr "_Neomejeno"
-
-#~ msgid ""
-#~ "Commands:\n"
-#~ "  help    Shows this information\n"
-#~ "  run     Create a new terminal running the specified command\n"
-#~ "  shell   Create a new terminal running the user shell\n"
-#~ "\n"
-#~ "Use \"%s COMMAND --help\" to get help on each command.\n"
-#~ msgstr ""
-#~ "Ukazi:\n"
-#~ "  help    Pokaže podrobnosti pomoči\n"
-#~ "  run     Ustvari nov terminalno okno z izvedenim določenim ukazom\n"
-#~ "  shell   Ustvari nov terminalno okno z uporabniško lupino\n"
-#~ "\n"
-#~ "Uporaba \"%s UKAZ --help\" za več podrobnosti o ukazu.\n"
-
-#~ msgid "Be quiet"
-#~ msgstr "Brez sporočanja"
-
-#~ msgid "GNOME Terminal Client"
-#~ msgstr "Terminalski odjemalec GNOME"
-
-#~ msgid "Show server options"
-#~ msgstr "Pokaže možnosti strežnika"
-
-#~ msgctxt "title"
-#~ msgid "'Terminal'"
-#~ msgstr "'Terminal'"
-
-#~ msgid "Title for terminal"
-#~ msgstr "Naziv terminala"
-
-#~ msgid ""
-#~ "Title to display for the terminal window or tab. This title may be "
-#~ "replaced by or combined with the title set by the application inside the "
-#~ "terminal, depending on the title_mode setting."
-#~ msgstr ""
-#~ "Naziv, ki naj bo prikazan v zavihku ali oknu terminala. Naziv lahko "
-#~ "spremeni program zagnan znotraj terminala, to pa določa ključ title_mode."
-
-#~ msgid "Characters that are considered \"part of a word\""
-#~ msgstr "Znaki, ki pripadajo besedam"
-
-#~ msgid ""
-#~ "When selecting text by word, sequences of these characters are considered "
-#~ "single words. Ranges can be given as \"A-Z\". Literal hyphen (not "
-#~ "expressing a range) should be the first character given."
-#~ msgstr ""
-#~ "Kadar se izbira besedilo po besedi, se nize teh znakov obravnava kot dele "
-#~ "besede. Lahko so podani intervali v obliki \"A-Z\". Pomišljaj, ki ne "
-#~ "predstavlja intervala, mora biti prvi podani znak."
-
-#~ msgid "Whether to use custom terminal size for new windows"
-#~ msgstr "Ali naj se za nova okna uporabi privzeta velikost terminalnega okna"
-
-#~ msgid ""
-#~ "If true, newly created terminal windows will have custom size specified "
-#~ "by default_size_columns and default_size_rows."
-#~ msgstr ""
-#~ "Izbrana možnost omogoča, da bo pri novo ustvarjenem terminalu privzeto "
-#~ "uporabljena velikost po meri s podatki privzete velikosti stolpcev in "
-#~ "vrstic."
-
-#~ msgid "Default size:"
-#~ msgstr "Privzeta velikost:"
-
-#~ msgid "Title"
-#~ msgstr "Naslov"
-
-#~ msgid "_Title:"
-#~ msgstr "_Naziv:"
-
-#~ msgid "Title and Command"
-#~ msgstr "Naziv in ukaz"
-
-#~ msgid "Set Title"
-#~ msgstr "Določitev naziva okna"
-
-#~ msgid "Current Locale"
-#~ msgstr "Trenutne jezikovne nastavitve"
-
-#~ msgid "Visible only when necessary"
-#~ msgstr "Vidno po potrebi"
-
-#~ msgid "Hidden"
-#~ msgstr "Skrito"
-
-#~ msgid "_About Terminal"
-#~ msgstr "_O programu"
-
-#~ msgid "What to do with dynamic title"
-#~ msgstr "Kaj narediti z dinamičnim nazivom"
-
-#~ msgid ""
-#~ "If the application in the terminal sets the title (most typically people "
-#~ "have their shell set up to do this), the dynamically-set title can erase "
-#~ "the configured title, go before it, go after it, or replace it. The "
-#~ "possible values are \"replace\", \"before\", \"after\", and \"ignore\"."
-#~ msgstr ""
-#~ "V primeru, da program nastavi naziv terminala (to je običajna nastavitev) "
-#~ "lahko dinamično izbran naziv izbriše prej določeno nastavitev naziva, je "
-#~ "postavljen pred njim, za njim, ali pa ga zamenja. Možne vrednosti so "
-#~ "\"replace\" (zamenjaj), \"before\" (pred), \"after\" (za) in "
-#~ "\"ignore\" (prezri)."
-
-#~ msgid "When terminal commands set their o_wn titles:"
-#~ msgstr "Ko terminalski ukazi določajo lastne naslove:"
-
-#~ msgid "The shortcut key “%s” is already bound to the “%s” action"
-#~ msgstr "Tipkovna bližnjica  “%s” je že povezana z dejanjem “%s”"
-
-#~ msgid "_Input Methods"
-#~ msgstr "_Načini vnosa"
-
-#~ msgid "Keyboard shortcut to switch to tab 1"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 1"
-
-#~ msgid "Keyboard shortcut to switch to tab 2"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 2"
-
-#~ msgid "Keyboard shortcut to switch to tab 3"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 3"
-
-#~ msgid "Keyboard shortcut to switch to tab 4"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 4"
-
-#~ msgid "Keyboard shortcut to switch to tab 5"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 5"
-
-#~ msgid "Keyboard shortcut to switch to tab 6"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 6"
-
-#~ msgid "Keyboard shortcut to switch to tab 7"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 7"
-
-#~ msgid "Keyboard shortcut to switch to tab 8"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 8"
-
-#~ msgid "Keyboard shortcut to switch to tab 9"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 9"
-
-#~ msgid "Keyboard shortcut to switch to tab 10"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 10"
-
-#~ msgid "Keyboard shortcut to switch to tab 11"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 11"
-
-#~ msgid "Keyboard shortcut to switch to tab 12"
-#~ msgstr "Tipkovna bližnjica za preklop na zavihek 12"
-
-#~ msgid "Switch to Tab 3"
-#~ msgstr "Preklopi na zavihek 3"
-
-#~ msgid "Switch to Tab 4"
-#~ msgstr "Preklopi na zavihek 4"
-
-#~ msgid "Switch to Tab 5"
-#~ msgstr "Preklopi na zavihek 5"
-
-#~ msgid "Switch to Tab 6"
-#~ msgstr "Preklopi na zavihek 6"
-
-#~ msgid "Switch to Tab 7"
-#~ msgstr "Preklopi na zavihek 7"
-
-#~ msgid "Switch to Tab 8"
-#~ msgstr "Preklopi na zavihek 8"
-
-#~ msgid "Switch to Tab 9"
-#~ msgstr "Preklopi na zavihek 9"
-
-#~ msgid "Switch to Tab 10"
-#~ msgstr "Preklopi na zavihek 10"
-
-#~ msgid "Switch to Tab 11"
-#~ msgstr "Preklopi na zavihek 11"
-
-#~ msgid "Switch to Tab 12"
-#~ msgstr "Preklopi na zavihek 12"
-
-#~ msgid "Keybindings"
-#~ msgstr "Tipkovne bližnjice"
-
-#~ msgid "Foreground, Background, Bold and Underline"
-#~ msgstr "Pisava, ozadje, krepko in podčrtano besedilo"
-
-#~ msgid "New _Profile…"
-#~ msgstr "Nov _profil ..."
-
-#~ msgid "_Profile Preferences…"
-#~ msgstr "Možnosti _profila ..."
+msgid "Transparent background"
+msgstr "Prosojno ozadje"
diff --git a/po/sq.po b/po/sq.po
index 158f6cb1..a3494fb7 100644
--- a/po/sq.po
+++ b/po/sq.po
@@ -225,8 +225,8 @@ msgid "<b>Background</b>"
 msgstr "<b>Sfondi</b>"
 
 #: ../src/gnome-terminal.glade2.h:3
-msgid "<b>Command</b>"
-msgstr "<b>Komanda</b>"
+msgid "Command"
+msgstr "Komanda"
 
 #: ../src/gnome-terminal.glade2.h:4
 msgid "<b>Compatibility</b>"
@@ -568,8 +568,8 @@ msgstr "Ngjyra e _tekstit:"
 
 # (pofilter) simplecaps: checks the capitalisation of two strings isn't wildly different
 #: ../src/gnome-terminal.glade2.h:85
-msgid "_Transparent background"
-msgstr "Sfond _Trasparent"
+msgid "Transparent background"
+msgstr "Sfond Trasparent"
 
 #: ../src/gnome-terminal.glade2.h:86
 msgid "_Update login records when command is launched"
diff --git a/po/sr.po b/po/sr.po
index af7e13ed..b6ff94d7 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -2780,10 +2780,9 @@ msgstr "Нисам успео да обрадим аргументе: %s\n"
 #~ msgid "GNOME Terminal Client"
 #~ msgstr "Клијент Гномовог терминала"
 
-#~| msgid "Terminal"
-#~ msgctxt "title"
-#~ msgid "'Terminal'"
-#~ msgstr "„Терминал“"
+msgctxt "title"
+msgid "'Terminal'"
+msgstr "„Терминал“"
 
 #~ msgid "Title for terminal"
 #~ msgstr "Наслов за терминал"
@@ -2829,11 +2828,11 @@ msgstr "Нисам успео да обрадим аргументе: %s\n"
 #~ msgid "Default size:"
 #~ msgstr "Основна величина:"
 
-#~ msgid "Title"
-#~ msgstr "Наслов"
+msgid "Title"
+msgstr "Наслов"
 
-#~ msgid "_Title:"
-#~ msgstr "_Наслов:"
+msgid "_Title:"
+msgstr "_Наслов:"
 
 #~ msgid "Title and Command"
 #~ msgstr "Наслов и наредба"
@@ -2841,8 +2840,8 @@ msgstr "Нисам успео да обрадим аргументе: %s\n"
 #~ msgid "_Unlimited"
 #~ msgstr "_Неограничено"
 
-#~ msgid "Set Title"
-#~ msgstr "Постави наслов"
+msgid "Set Title"
+msgstr "Постави наслов"
 
 #~ msgid "Current Locale"
 #~ msgstr "Текући локалитет"
@@ -2852,3 +2851,6 @@ msgstr "Нисам успео да обрадим аргументе: %s\n"
 
 #~ msgid "Hidden"
 #~ msgstr "Скривен"
+
+msgid "Transparent background"
+msgstr "Провидна позадина"
diff --git a/po/sr@latin.po b/po/sr@latin.po
index 45dbad07..852c47cc 100644
--- a/po/sr@latin.po
+++ b/po/sr@latin.po
@@ -2576,10 +2576,9 @@ msgstr "_Zatvori prozor"
 #~ msgid "GNOME Terminal Client"
 #~ msgstr "Klijent Gnomovog terminala"
 
-#~| msgid "Terminal"
-#~ msgctxt "title"
-#~ msgid "'Terminal'"
-#~ msgstr "„Terminal“"
+msgctxt "title"
+msgid "'Terminal'"
+msgstr "„Terminal“"
 
 #~ msgid "Title for terminal"
 #~ msgstr "Naslov za terminal"
@@ -2625,11 +2624,11 @@ msgstr "_Zatvori prozor"
 #~ msgid "Default size:"
 #~ msgstr "Osnovna veličina:"
 
-#~ msgid "Title"
-#~ msgstr "Naslov"
+msgid "Title"
+msgstr "Naslov"
 
-#~ msgid "_Title:"
-#~ msgstr "_Naslov:"
+msgid "_Title:"
+msgstr "_Naslov:"
 
 #~ msgid "Title and Command"
 #~ msgstr "Naslov i naredba"
@@ -2637,8 +2636,8 @@ msgstr "_Zatvori prozor"
 #~ msgid "_Unlimited"
 #~ msgstr "_Neograničeno"
 
-#~ msgid "Set Title"
-#~ msgstr "Postavi naslov"
+msgid "Set Title"
+msgstr "Postavi naslov"
 
 #~ msgid "Current Locale"
 #~ msgstr "Tekući lokalitet"
@@ -2648,3 +2647,6 @@ msgstr "_Zatvori prozor"
 
 #~ msgid "Hidden"
 #~ msgstr "Skriven"
+
+msgid "Transparent background"
+msgstr "Providna pozadina"
diff --git a/po/sv.po b/po/sv.po
index 74890c35..5abf9fa1 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -2800,5 +2800,17 @@ msgstr "Misslyckades med att tolka argument: %s\n"
 #~ msgid "Unknown completion request for \"%s\""
 #~ msgstr "Okänd kompletteringsbegäran för \"%s\""
 
+msgid "Transparent background"
+msgstr "Genomskinlig bakgrund"
+
 #~ msgid "Missing command"
 #~ msgstr "Kommando saknas"
+
+msgid "_Title:"
+msgstr "_Titel:"
+
+msgid "Set Title"
+msgstr "Ställ in titel"
+
+msgid "_Set Title…"
+msgstr "A_nge titel..."
diff --git a/po/ta.po b/po/ta.po
index 80aa2f68..afd335b0 100644
--- a/po/ta.po
+++ b/po/ta.po
@@ -2171,10 +2171,9 @@ msgstr "_l சாளரத்தை மூடவும்"
 #~ msgid "Show server options"
 #~ msgstr "சேவையக தேர்வுகளை காட்டுக"
 
-#~| msgid "Terminal"
-#~ msgctxt "title"
-#~ msgid "'Terminal'"
-#~ msgstr "'முனையம்'"
+msgctxt "title"
+msgid "'Terminal'"
+msgstr "'முனையம்'"
 
 #~ msgid "Title for terminal"
 #~ msgstr "முனையத்தின் தலைப்பு"
@@ -2221,11 +2220,11 @@ msgstr "_l சாளரத்தை மூடவும்"
 #~ msgid "Default size:"
 #~ msgstr "முன்னிருப்பு அளவு:"
 
-#~ msgid "Title"
-#~ msgstr "தலைப்பு"
+msgid "Title"
+msgstr "தலைப்பு"
 
-#~ msgid "_Title:"
-#~ msgstr "_T தலைப்பு:"
+msgid "_Title:"
+msgstr "_T தலைப்பு:"
 
 #~ msgid "Title and Command"
 #~ msgstr "தலைப்பும் கட்டளையும்"
@@ -2233,8 +2232,8 @@ msgstr "_l சாளரத்தை மூடவும்"
 #~ msgid "_Unlimited"
 #~ msgstr "_U வரையரை இல்லாத"
 
-#~ msgid "Set Title"
-#~ msgstr "தலைப்பை அமைக்க"
+msgid "Set Title"
+msgstr "தலைப்பை அமைக்க"
 
 #~| msgid "_Terminal"
 #~ msgid "_About Terminal"
@@ -2243,8 +2242,8 @@ msgstr "_l சாளரத்தை மூடவும்"
 #~ msgid "Current Locale"
 #~ msgstr "தற்போதைய மொழி"
 
-#~ msgid "_Set Title…"
-#~ msgstr "(_S) தலைப்பை அமைக்க..."
+msgid "_Set Title…"
+msgstr "(_S) தலைப்பை அமைக்க..."
 
 #~ msgid "_Next Tab"
 #~ msgstr "அடுத்த கீற்று (_N)"
@@ -3028,8 +3027,8 @@ msgstr "_l சாளரத்தை மூடவும்"
 #~ msgid "_Solid color"
 #~ msgstr "(_S) ஒரே வண்ணம்"
 
-#~ msgid "_Transparent background"
-#~ msgstr "_T புலப்பாடு பின்னணி"
+msgid "Transparent background"
+msgstr "புலப்பாடு பின்னணி"
 
 #~ msgid "No such profile \"%s\", using default profile\n"
 #~ msgstr "\"%s\" என்ற வரியுரு கிடையாது, முன்னிருப்பு வரியுரு பயன்படுத்தப்படும்\n"
diff --git a/po/te.po b/po/te.po
index 82c0e0fc..0dd3d871 100644
--- a/po/te.po
+++ b/po/te.po
@@ -2055,10 +2055,9 @@ msgstr "కిటికీని మూసివేయి (_l)"
 #~ msgid "Show server options"
 #~ msgstr "సేవకము ఐచ్చికాలను చూపించు"
 
-#, fuzzy
-#~ msgctxt "title"
-#~ msgid "'Terminal'"
-#~ msgstr "టెర్మినల్"
+msgctxt "title"
+msgid "'Terminal'"
+msgstr "టెర్మినల్"
 
 #~ msgid "Title for terminal"
 #~ msgstr "టెర్మినల్ కు శీర్షిక"
@@ -2104,11 +2103,11 @@ msgstr "కిటికీని మూసివేయి (_l)"
 #~ msgid "Default size:"
 #~ msgstr "అప్రమేయ పరిమాణం:"
 
-#~ msgid "Title"
-#~ msgstr "శీర్షిక:"
+msgid "Title"
+msgstr "శీర్షిక:"
 
-#~ msgid "_Title:"
-#~ msgstr "శీర్షిక (_T):"
+msgid "_Title:"
+msgstr "శీర్షిక (_T):"
 
 #~ msgid "Title and Command"
 #~ msgstr "శీర్షిక మరియు ఆదేశం"
@@ -2116,14 +2115,14 @@ msgstr "కిటికీని మూసివేయి (_l)"
 #~ msgid "_Unlimited"
 #~ msgstr "అపరిమితమైన (_U)"
 
-#~ msgid "Set Title"
-#~ msgstr "శీర్షికను అమర్చు"
+msgid "Set Title"
+msgstr "శీర్షికను అమర్చు"
 
 #~ msgid "Current Locale"
 #~ msgstr "ప్రస్తుత స్థానికం"
 
-#~ msgid "_Set Title…"
-#~ msgstr "శీర్షికను అమర్చు... (_S)"
+msgid "_Set Title…"
+msgstr "శీర్షికను అమర్చు... (_S)"
 
 #~ msgid "_Next Tab"
 #~ msgstr "తరువాతి ట్యాబ్(_N)"
@@ -2898,8 +2897,8 @@ msgstr "కిటికీని మూసివేయి (_l)"
 #~ msgid "Background image _scrolls"
 #~ msgstr "నేపథ్యచిత్రము స్క్రాల్స్ (_s)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "పారదర్శక నేపథ్యం (_T)"
+msgid "Transparent background"
+msgstr "పారదర్శక నేపథ్యం"
 
 #~ msgid "S_hade transparent or image background:"
 #~ msgstr "పారదర్శకంగా మారు లేదా చిత్రము బ్యాక్‌గ్రౌండ్ కు మారు(_h):"
diff --git a/po/tg.po b/po/tg.po
index e3feef65..6371c036 100644
--- a/po/tg.po
+++ b/po/tg.po
@@ -2158,23 +2158,23 @@ msgstr "П_ӯшонидани равзана"
 #~ msgid "Default size:"
 #~ msgstr "Андозаи пешфарз:"
 
-#~ msgid "Title"
-#~ msgstr "Сарлавҳа"
+msgid "Title"
+msgstr "Сарлавҳа"
 
-#~ msgid "_Title:"
-#~ msgstr "_Вазифа:"
+msgid "_Title:"
+msgstr "_Вазифа:"
 
 #~ msgid "Title and Command"
 #~ msgstr "Унвон ва Фармон"
 
-#~ msgid "Set Title"
-#~ msgstr "Таъин кардани сарлавҳа"
+msgid "Set Title"
+msgstr "Таъин кардани сарлавҳа"
 
 #~ msgid "Current Locale"
 #~ msgstr "Маҳаллигардонии ҷорӣ"
 
-#~ msgid "_Set Title…"
-#~ msgstr "_Танзими сарлавҳа..."
+msgid "_Set Title…"
+msgstr "_Танзими сарлавҳа..."
 
 #~ msgid "_Next Tab"
 #~ msgstr "_Варақаи навбатӣ"
diff --git a/po/th.po b/po/th.po
index 63263749..496da331 100644
--- a/po/th.po
+++ b/po/th.po
@@ -2308,23 +2308,23 @@ msgstr "ปิ_ดหน้าต่าง"
 #~ msgid "Default size:"
 #~ msgstr "ขนาดปริยาย:"
 
-#~ msgid "Title"
-#~ msgstr "หัวเรื่อง"
+msgid "Title"
+msgstr "หัวเรื่อง"
 
-#~ msgid "_Title:"
-#~ msgstr "_หัวเรื่อง:"
+msgid "_Title:"
+msgstr "_หัวเรื่อง:"
 
 #~ msgid "Title and Command"
 #~ msgstr "หัวเรื่องและคำสั่ง"
 
-#~ msgid "Set Title"
-#~ msgstr "ตั้งหัวเรื่อง"
+msgid "Set Title"
+msgstr "ตั้งหัวเรื่อง"
 
 #~ msgid "Current Locale"
 #~ msgstr "ตามโลแคลปัจจุบัน"
 
-#~ msgid "_Set Title…"
-#~ msgstr "ตั้งป้าย_ชื่อ…"
+msgid "_Set Title…"
+msgstr "ตั้งป้าย_ชื่อ…"
 
 #~ msgid "_Next Tab"
 #~ msgstr "แท็บ_ถัดไป"
@@ -2803,8 +2803,8 @@ msgstr "ปิ_ดหน้าต่าง"
 #~ msgid "_Solid color"
 #~ msgstr "สี_ทึบ"
 
-#~ msgid "_Transparent background"
-#~ msgstr "พื้นหลังโปร่งแ_สง"
+msgid "Transparent background"
+msgstr "พื้นหลังโปร่งแสง"
 
 #~ msgid ""
 #~ "You already have a profile called “%s”. Do you want to create another "
diff --git a/po/tr.po b/po/tr.po
index a5024ead..95834a7e 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -2465,3 +2465,15 @@ msgstr "_Pencereyi Kapat"
 #, c-format
 msgid "Failed to parse arguments: %s\n"
 msgstr "Bağımsız değişkenler ayrıştırılamadı: %s\n"
+
+msgid "Transparent background"
+msgstr "Şeffaf arkaplan"
+
+msgid "_Title:"
+msgstr "_Başlık:"
+
+msgid "Set Title"
+msgstr "Başlığı Düzenle"
+
+msgid "_Set Title…"
+msgstr "_Başlığı Ata..."
diff --git a/po/ug.po b/po/ug.po
index 313f76b9..be608976 100644
--- a/po/ug.po
+++ b/po/ug.po
@@ -2616,8 +2616,8 @@ msgstr "ماۋزۇ (_T):"
 #~ msgid "_Solid color"
 #~ msgstr "ساپ رەڭ(_S)"
 
-#~ msgid "_Transparent background"
-#~ msgstr "سۈزۈك تەگلىك(_T)"
+msgid "Transparent background"
+msgstr "سۈزۈك تەگلىك"
 
 #~ msgid ""
 #~ "You already have a profile called “%s”. Do you want to create another "
diff --git a/po/uk.po b/po/uk.po
index 74140f17..6dfb6d5f 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -2481,3 +2481,18 @@ msgstr "Не вдається визначити аргументи: %s\n"
 
 #~ msgid "Georgian"
 #~ msgstr "Грузинське"
+
+msgid "Title"
+msgstr "Заголовок"
+
+msgid "_Title:"
+msgstr "За_головок:"
+
+msgid "Set Title"
+msgstr "Встановлення заголовка"
+
+msgid "_Set Title…"
+msgstr "_Встановити заголовок…"
+
+msgid "Transparent background"
+msgstr "Прозоре тло"
diff --git a/po/vi.po b/po/vi.po
index 5304429b..af014ff2 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -2852,8 +2852,8 @@ msgstr "Đón_g cửa sổ"
 #~ msgid "Default size:"
 #~ msgstr "Cỡ mặc định:"
 
-#~ msgid "Title"
-#~ msgstr "Tựa đề"
+msgid "Title"
+msgstr "Tựa đề"
 
 #~ msgid "When terminal commands set their o_wn titles:"
 #~ msgstr "Khi câu lệnh thiết bị cuối tự đặt tựa đề _mình:"
@@ -2864,8 +2864,8 @@ msgstr "Đón_g cửa sổ"
 #~ msgid "_Unlimited"
 #~ msgstr "_Không hạn chế"
 
-#~ msgid "Set Title"
-#~ msgstr "Đặt tựa đề"
+msgid "Set Title"
+msgstr "Đặt tựa đề"
 
 #~ msgid "Switch to Tab 3"
 #~ msgstr "Chuyển sang Thanh 3"
@@ -2906,8 +2906,8 @@ msgstr "Đón_g cửa sổ"
 #~ msgid "_Input Methods"
 #~ msgstr "K_iểu gõ"
 
-#~ msgid "_Title:"
-#~ msgstr "_Tựa đề:"
+msgid "_Title:"
+msgstr "_Tựa đề:"
 
 #~ msgid "Disable connection to session manager"
 #~ msgstr "Tắt kết nối đến trình quản lý phiên làm việc"
@@ -3292,3 +3292,6 @@ msgstr "Đón_g cửa sổ"
 #~ "Phím tắt để đặt lại thiết bị cuối. Dùng dạng chuỗi có cùng một khuôn dạng "
 #~ "với tập tin tài nguyên GTK+. Nếu bạn đặt tùy chọn là chuỗi “disabled” (bị "
 #~ "tắt), nghĩa là không có phím tắt cho hành động này."
+
+msgid "Transparent background"
+msgstr "Nền trong suốt"
diff --git a/po/wa.po b/po/wa.po
index 2a29945b..4f1c57c7 100644
--- a/po/wa.po
+++ b/po/wa.po
@@ -224,8 +224,8 @@ msgid "<b>Background</b>"
 msgstr "<b>Fond</b>"
 
 #: ../src/gnome-terminal.glade2.h:3
-msgid "<b>Command</b>"
-msgstr "<b>Comande</b>"
+msgid "Command"
+msgstr "Comande"
 
 #: ../src/gnome-terminal.glade2.h:4
 msgid "<b>Compatibility</b>"
@@ -564,8 +564,8 @@ msgid "_Text color:"
 msgstr "Coleur pol _tecse:"
 
 #: ../src/gnome-terminal.glade2.h:86
-msgid "_Transparent background"
-msgstr "Fond k' on voet _houte"
+msgid "Transparent background"
+msgstr "Fond k' on voet houte"
 
 #: ../src/gnome-terminal.glade2.h:87
 msgid "_Update login records when command is launched"
@@ -2227,8 +2227,8 @@ msgid "Change _Profile"
 msgstr "Candjî _profil"
 
 #: ../src/terminal-window.c:1013
-msgid "_Set Title..."
-msgstr "_Candjî l' tite..."
+msgid "_Set Title…"
+msgstr "_Candjî l' tite…"
 
 #: ../src/terminal-window.c:1020
 msgid "Set _Character Encoding"
diff --git a/po/xh.po b/po/xh.po
index cb78ec67..a4f3b4dd 100644
--- a/po/xh.po
+++ b/po/xh.po
@@ -217,8 +217,8 @@ msgid "<b>Background</b>"
 msgstr "<b>Okungasemva</b>"
 
 #: ../src/gnome-terminal.glade2.h:2
-msgid "<b>Command</b>"
-msgstr "<b>Umyalelo</b>"
+msgid "Command"
+msgstr "Umyalelo"
 
 #: ../src/gnome-terminal.glade2.h:3
 msgid "<b>Compatibility</b>"
@@ -621,8 +621,8 @@ msgid "_Text color:"
 msgstr "_Umbala wombhalo:"
 
 #: ../src/gnome-terminal.glade2.h:102
-msgid "_Transparent background"
-msgstr "_Okungasemva okucace gca"
+msgid "Transparent background"
+msgstr "Okungasemva okucace gca"
 
 #: ../src/gnome-terminal.glade2.h:103
 msgid "_Update login records when command is launched"
@@ -2265,8 +2265,8 @@ msgid "Change _Profile"
 msgstr "Tsintsha i_Nkangeleko"
 
 #: ../src/terminal-window.c:979
-msgid "_Set Title..."
-msgstr "_Misela..."
+msgid "_Set Title…"
+msgstr "_Misela…"
 
 #: ../src/terminal-window.c:986
 msgid "Set _Character Encoding"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index f68c7ce5..a3be00e1 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -2805,17 +2805,17 @@ msgstr "无法处理参数：%s\n"
 #~ msgid "Default size:"
 #~ msgstr "默认大小："
 
-#~ msgid "Title"
-#~ msgstr "标题"
+msgid "Title"
+msgstr "标题"
 
-#~ msgid "_Title:"
-#~ msgstr "标题(_T)："
+msgid "_Title:"
+msgstr "标题(_T)："
 
 #~ msgid "Title and Command"
 #~ msgstr "标题和命令"
 
-#~ msgid "Set Title"
-#~ msgstr "设置标题"
+msgid "Set Title"
+msgstr "设置标题"
 
 #~ msgid "Current Locale"
 #~ msgstr "当前区域"
@@ -2928,3 +2928,6 @@ msgstr "无法处理参数：%s\n"
 
 #~ msgid "_Find..."
 #~ msgstr "查找(_F)..."
+
+msgid "Transparent background"
+msgstr "透明背景"
diff --git a/po/zh_HK.po b/po/zh_HK.po
index 61153529..c366abdd 100644
--- a/po/zh_HK.po
+++ b/po/zh_HK.po
@@ -2114,17 +2114,17 @@ msgstr "關閉視窗(_L)"
 #~ msgid "Default size:"
 #~ msgstr "預設大小："
 
-#~ msgid "Title"
-#~ msgstr "標題"
+msgid "Title"
+msgstr "標題"
 
-#~ msgid "_Title:"
-#~ msgstr "標題(_T):"
+msgid "_Title:"
+msgstr "標題(_T):"
 
 #~ msgid "Title and Command"
 #~ msgstr "標題及指令"
 
-#~ msgid "Set Title"
-#~ msgstr "設定標題"
+msgid "Set Title"
+msgstr "設定標題"
 
 #~ msgid "Current Locale"
 #~ msgstr "目前的地區設定"
@@ -2376,3 +2376,6 @@ msgstr "關閉視窗(_L)"
 
 #~ msgid "Show session management options"
 #~ msgstr "顯示作業階段管理選項"
+
+msgid "Transparent background"
+msgstr "透明背景"
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 80cb2343..20e2a93c 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -2735,17 +2735,17 @@ msgstr "關閉視窗(_L)"
 #~ msgid "Default size:"
 #~ msgstr "預設大小："
 
-#~ msgid "Title"
-#~ msgstr "標題"
+msgid "Title"
+msgstr "標題"
 
-#~ msgid "_Title:"
-#~ msgstr "標題(_T):"
+msgid "_Title:"
+msgstr "標題(_T):"
 
 #~ msgid "Title and Command"
 #~ msgstr "標題及指令"
 
-#~ msgid "Set Title"
-#~ msgstr "設定標題"
+msgid "Set Title"
+msgstr "設定標題"
 
 #~ msgid "Current Locale"
 #~ msgstr "目前的地區設定"
@@ -2957,3 +2957,6 @@ msgstr "關閉視窗(_L)"
 
 #~ msgid "Show session management options"
 #~ msgstr "顯示作業階段管理選項"
+
+msgid "Transparent background"
+msgstr "透明背景"
-- 
2.40.1


From 544248595a55c6aa76d53ff620806e92497d3a32 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Wed, 25 May 2016 13:47:36 +0200
Subject: [PATCH 12/16] Restore the action and shortcut to set a static title
 from the menus

This reverts 9bbe19e98f62aa3c9020913a3a5a8080a5177505 with various
minor adjustments to keep up with later changes.

https://bugzilla.redhat.com/show_bug.cgi?id=1296110
---
 src/org.gnome.Terminal.gschema.xml |  4 ++
 src/terminal-accels.cc             |  2 +
 src/terminal-window.cc             | 76 ++++++++++++++++++++++++++++++
 3 files changed, 82 insertions(+)

diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index 9ba0f3b5..c2b97e8b 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -429,6 +429,10 @@
       <default>'disabled'</default>
       <summary>Keyboard shortcut to toggle the read-only state</summary>
     </key>
+    <key name="set-terminal-title" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to set the terminal title</summary>
+    </key>
     <key name="reset" type="s">
       <default>'disabled'</default>
       <summary>Keyboard shortcut to reset the terminal</summary>
diff --git a/src/terminal-accels.cc b/src/terminal-accels.cc
index 66298100..b2b4e442 100644
--- a/src/terminal-accels.cc
+++ b/src/terminal-accels.cc
@@ -76,6 +76,7 @@
 #define KEY_RESET               "reset"
 #define KEY_SAVE_CONTENTS       "save-contents"
 #define KEY_SELECT_ALL          "select-all"
+#define KEY_SET_TERMINAL_TITLE  "set-terminal-title"
 #define KEY_TOGGLE_MENUBAR      "toggle-menubar"
 #define KEY_ZOOM_IN             "zoom-in"
 #define KEY_ZOOM_NORMAL         "zoom-normal"
@@ -165,6 +166,7 @@ static KeyEntry terminal_entries[] = {
   ENTRY (N_("Read-Only"),       KEY_READ_ONLY,          "read-only", nullptr, nullptr   ),
   ENTRY (N_("Reset"),           KEY_RESET,              "reset",     "b",  "false"),
   ENTRY (N_("Reset and Clear"), KEY_RESET_AND_CLEAR,    "reset",     "b",  "true" ),
+  ENTRY (N_("Set Title"),       KEY_SET_TERMINAL_TITLE, "set-title", nullptr, nullptr   ),
 };
 
 static KeyEntry tabs_entries[] = {
diff --git a/src/terminal-window.cc b/src/terminal-window.cc
index 61857bfe..98332c6d 100644
--- a/src/terminal-window.cc
+++ b/src/terminal-window.cc
@@ -764,6 +764,81 @@ action_select_all_cb (GSimpleAction *action,
   vte_terminal_select_all (VTE_TERMINAL (priv->active_screen));
 }
 
+static void
+terminal_set_title_dialog_response_cb (GtkWidget *dialog,
+                                       int response,
+                                       TerminalScreen *screen)
+{
+  if (response == GTK_RESPONSE_OK)
+    {
+      GtkEntry *entry;
+      const char *text;
+
+      entry = GTK_ENTRY (g_object_get_data (G_OBJECT (dialog), "title-entry"));
+      text = gtk_entry_get_text (entry);
+      terminal_screen_set_user_title (screen, text);
+    }
+
+  gtk_widget_destroy (dialog);
+}
+
+static void
+action_set_title_cb (GSimpleAction *action,
+                     GVariant *parameter,
+                     gpointer user_data)
+{
+  TerminalWindow *window = (TerminalWindow*)user_data;
+  TerminalWindowPrivate *priv = window->priv;
+  GtkWidget *dialog, *message_area, *hbox, *label, *entry;
+
+  if (priv->active_screen == nullptr)
+    return;
+
+  /* FIXME: hook the screen up so this dialogue closes if the terminal screen closes */
+
+  dialog = gtk_message_dialog_new (GTK_WINDOW (window),
+                                   GtkDialogFlags(GTK_DIALOG_MODAL |
+                                                  GTK_DIALOG_DESTROY_WITH_PARENT),
+                                   GTK_MESSAGE_OTHER,
+                                   GTK_BUTTONS_OK_CANCEL,
+                                   "%s", "");
+
+  gtk_window_set_title (GTK_WINDOW (dialog), _("Set Title"));
+  gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+  gtk_window_set_role (GTK_WINDOW (dialog), "gnome-terminal-change-title");
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+  /* Alternative button order was set automatically by GtkMessageDialog */
+
+  g_signal_connect (dialog, "response",
+                    G_CALLBACK (terminal_set_title_dialog_response_cb), priv->active_screen);
+  g_signal_connect (dialog, "delete-event",
+                    G_CALLBACK (terminal_util_dialog_response_on_delete), nullptr);
+
+  message_area = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (dialog));
+  gtk_container_foreach (GTK_CONTAINER (message_area), (GtkCallback) gtk_widget_hide, nullptr);
+
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+  gtk_box_pack_start (GTK_BOX (message_area), hbox, FALSE, FALSE, 0);
+
+  label = gtk_label_new_with_mnemonic (_("_Title:"));
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+  entry = gtk_entry_new ();
+  gtk_entry_set_width_chars (GTK_ENTRY (entry), 32);
+  gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
+  gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
+  gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
+  gtk_widget_show_all (hbox);
+
+  gtk_widget_grab_focus (entry);
+  gtk_entry_set_text (GTK_ENTRY (entry), terminal_screen_get_user_title (priv->active_screen));
+  gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
+  g_object_set_data (G_OBJECT (dialog), "title-entry", entry);
+
+  gtk_window_present (GTK_WINDOW (dialog));
+}
+
 static void
 action_reset_cb (GSimpleAction *action,
                  GVariant *parameter,
@@ -2165,6 +2240,7 @@ terminal_window_init (TerminalWindow *window)
     { "paste-uris",          action_paste_uris_cb,       nullptr,   nullptr, nullptr },
     { "reset",               action_reset_cb,            "b",    nullptr, nullptr },
     { "select-all",          action_select_all_cb,       nullptr,   nullptr, nullptr },
+    { "set-title",           action_set_title_cb,        nullptr,   nullptr, nullptr },
     { "size-to",             action_size_to_cb,          "(uu)", nullptr, nullptr },
     { "tab-detach",          action_tab_detach_cb,       nullptr,   nullptr, nullptr },
     { "tab-move-left",       action_tab_move_left_cb,    nullptr,   nullptr, nullptr },
-- 
2.40.1


From fa8333d5ffcd5c4db77a06128a7c928bd81183e2 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 30 Jun 2016 18:14:36 +0200
Subject: [PATCH 13/16] screen: Style fix

This brings the code in line with how it was before
de0dc7c2649c42e2aa02a66e4be27d262b34452d

https://bugzilla.redhat.com/show_bug.cgi?id=1296110
---
 src/terminal-screen.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 506ab66e..28088a98 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -819,7 +819,7 @@ terminal_screen_new (GSettings       *profile,
   /* If given an initial title, strip it of control characters and
    * feed it to the terminal.
    */
-  if (title != nullptr) {
+  if (title) {
     GString *seq;
     const char *p;
 
-- 
2.40.1


From 4260e6c04d0b718d825e3f80da80060faf9a3055 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 30 Jun 2016 16:58:15 +0200
Subject: [PATCH 14/16] Restore the rest of the title handling options and make
 it all work

This reverts commit f27bf0135a2d18ba22158d28bf1f8c5f6ec066c8 and makes
it use the user_title API instead of sending an escape sequence.

https://bugzilla.redhat.com/show_bug.cgi?id=1296110
---
 src/org.gnome.Terminal.gschema.xml |  12 ++
 src/preferences.ui                 |  33 +++-
 src/profile-editor.cc              |  10 ++
 src/terminal-enums.hh              |   8 +
 src/terminal-schemas.hh            |   1 +
 src/terminal-screen.cc             | 258 +++++++++++++++++++++--------
 src/terminal-screen.hh             |   8 +-
 src/terminal-window.cc             |   9 +-
 8 files changed, 264 insertions(+), 75 deletions(-)

diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index c2b97e8b..60d2e87f 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -24,6 +24,13 @@
 -->
 <schemalist gettext-domain="gnome-terminal">
 
+  <enum id='org.gnome.Terminal.TitleMode'>
+    <value nick='replace' value='0'/>
+    <value nick='before' value='1'/>
+    <value nick='after' value='2'/>
+    <value nick='ignore' value='3'/>
+  </enum>
+
    <enum id='org.gnome.Terminal.NewTerminalMode'>
     <value nick='window' value='0'/>
     <value nick='tab' value='1'/>
@@ -209,6 +216,11 @@
       <summary>Whether to enable SIXEL images</summary>
       <description>If true, SIXEL sequences are parsed and images are rendered.</description>
     </key>
+    <key name="title-mode" enum="org.gnome.Terminal.TitleMode">
+      <default>'replace'</default>
+      <summary>What to do with dynamic title</summary>
+      <description>If the application in the terminal sets the title (most typically people have their shell set up to do this), the dynamically-set title can erase the configured title, go before it, go after it, or replace it. The possible values are "replace", "before", "after", and "ignore".</description>
+    </key>
     <key name="title" type="s">
       <default l10n="messages" context="title">'Terminal'</default>
       <summary>Title for terminal</summary>
diff --git a/src/preferences.ui b/src/preferences.ui
index d851bcb6..a9600d9a 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -2035,7 +2035,7 @@
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
                                             <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">Title:</property>
+                                            <property name="label" translatable="yes">Initial _title:</property>
                                             <property name="use_underline">True</property>
                                             <property name="mnemonic_widget">title-entry</property>
                                           </object>
@@ -2055,6 +2055,37 @@
                                             <property name="left_attach">1</property>
                                           </packing>
                                         </child>
+                                        <child>
+                                          <object class="GtkLabel" id="title-mode-combobox-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">When terminal commands set their o_wn titles:</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="mnemonic_widget">title-mode-combobox</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">1</property>
+                                            <property name="left_attach">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkComboBox" id="title-mode-combobox">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="model">model2</property>
+                                            <child>
+                                              <object class="GtkCellRendererText"/>
+                                              <attributes>
+                                                <attribute name="text">0</attribute>
+                                              </attributes>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">1</property>
+                                            <property name="left_attach">1</property>
+                                          </packing>
+                                        </child>
                                       </object>
                                     </child>
                                   </object>
diff --git a/src/profile-editor.cc b/src/profile-editor.cc
index f7997fbf..2f756fa3 100644
--- a/src/profile-editor.cc
+++ b/src/profile-editor.cc
@@ -1422,6 +1422,16 @@ profile_prefs_load (const char *uuid, GSettings *profile)
                                "text",
                                GSettingsBindFlags(G_SETTINGS_BIND_GET |
                                                   G_SETTINGS_BIND_SET));
+  profile_prefs_settings_bind_with_mapping (profile,
+                                            TERMINAL_PROFILE_TITLE_MODE_KEY,
+                                            gtk_builder_get_object (builder,
+                                                                    "title-mode-combobox"),
+                                            "active",
+                                            GSettingsBindFlags(G_SETTINGS_BIND_GET |
+                                                               G_SETTINGS_BIND_SET),
+                                            (GSettingsBindGetMapping) string_to_enum,
+                                            (GSettingsBindSetMapping) enum_to_string,
+                                            terminal_title_mode_get_type, nullptr);
   profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
                                gtk_builder_get_object (builder,
                                                        "use-custom-command-checkbutton"),
diff --git a/src/terminal-enums.hh b/src/terminal-enums.hh
index 93f1460c..5e816f71 100644
--- a/src/terminal-enums.hh
+++ b/src/terminal-enums.hh
@@ -34,6 +34,14 @@ typedef enum {
   TERMINAL_NEW_TAB_POSITION_NEXT
 } TerminalNewTabPosition;
 
+typedef enum
+{
+  TERMINAL_TITLE_REPLACE,
+  TERMINAL_TITLE_BEFORE,
+  TERMINAL_TITLE_AFTER,
+  TERMINAL_TITLE_IGNORE
+} TerminalTitleMode;
+
 typedef enum
 {
   TERMINAL_EXIT_CLOSE,
diff --git a/src/terminal-schemas.hh b/src/terminal-schemas.hh
index d0f111a0..1c67e55d 100644
--- a/src/terminal-schemas.hh
+++ b/src/terminal-schemas.hh
@@ -71,6 +71,7 @@ G_BEGIN_DECLS
 #define TERMINAL_PROFILE_SCROLL_ON_KEYSTROKE_KEY        "scroll-on-keystroke"
 #define TERMINAL_PROFILE_SCROLL_ON_OUTPUT_KEY           "scroll-on-output"
 #define TERMINAL_PROFILE_TEXT_BLINK_MODE_KEY            "text-blink-mode"
+#define TERMINAL_PROFILE_TITLE_MODE_KEY                 "title-mode"
 #define TERMINAL_PROFILE_TITLE_KEY                      "title"
 #define TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY         "use-custom-command"
 #define TERMINAL_PROFILE_USE_SKEY_KEY                   "use-skey"
diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 28088a98..5456839a 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -115,8 +115,11 @@ struct _TerminalScreenPrivate
   ExecData *exec_data;
 
   gboolean between_preexec_and_precmd;
+  gboolean user_title; /* title was manually set */
   char *current_cmdline;
-  char *title;
+  char *raw_title;
+  char *cooked_title;
+  char *override_title;
   guint contents_changed_source_id;
   guint shell_preexec_source_id;
 };
@@ -133,8 +136,7 @@ enum
 enum {
   PROP_0,
   PROP_PROFILE,
-  PROP_TITLE,
-  PROP_DESCRIPTION
+  PROP_TITLE
 };
 
 enum
@@ -184,8 +186,13 @@ static void terminal_screen_window_title_changed      (VteTerminal *vte_terminal
 
 static void update_color_scheme                      (TerminalScreen *screen);
 
+static gboolean terminal_screen_format_title (TerminalScreen *screen, const char *raw_title, char **old_cooked_title);
+
+static void terminal_screen_cook_title      (TerminalScreen *screen);
+
 static char* terminal_screen_check_hyperlink   (TerminalScreen            *screen,
                                                 GdkEvent                  *event);
+
 static void terminal_screen_check_extra (TerminalScreen *screen,
                                          GdkEvent       *event,
                                          char           **number_info,
@@ -547,6 +554,9 @@ terminal_screen_init (TerminalScreen *screen)
   gtk_target_table_free (targets, n_targets);
   gtk_target_list_unref (target_list);
 
+  priv->override_title = nullptr;
+  priv->user_title = FALSE;
+
   g_signal_connect (screen, "window-title-changed",
                     G_CALLBACK (terminal_screen_window_title_changed),
                     screen);
@@ -573,9 +583,6 @@ terminal_screen_get_property (GObject *object,
       case PROP_TITLE:
         g_value_set_string (value, terminal_screen_get_title (screen));
         break;
-      case PROP_DESCRIPTION:
-        g_value_take_string (value, terminal_screen_get_description (screen));
-        break;
       default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
         break;
@@ -596,7 +603,6 @@ terminal_screen_set_property (GObject *object,
         terminal_screen_set_profile (screen, (GSettings*)g_value_get_object (value));
         break;
       case PROP_TITLE:
-      case PROP_DESCRIPTION:
         /* not writable */
       default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -692,14 +698,6 @@ terminal_screen_class_init (TerminalScreenClass *klass)
 				      G_PARAM_STATIC_NICK |
 				      G_PARAM_STATIC_BLURB)));
 
-  g_object_class_install_property
-    (object_class,
-     PROP_DESCRIPTION,
-     g_param_spec_string ("description", nullptr, nullptr,
-                          nullptr,
-                          GParamFlags(G_PARAM_READABLE |
-                                      G_PARAM_STATIC_STRINGS)));
-
   g_type_class_add_private (object_class, sizeof (TerminalScreenPrivate));
 
   n_url_regexes = G_N_ELEMENTS (url_regex_patterns);
@@ -796,7 +794,9 @@ terminal_screen_finalize (GObject *object)
 
   g_free (priv->uuid);
   g_free (priv->current_cmdline);
-  g_free (priv->title);
+  g_free (priv->raw_title);
+  g_free (priv->cooked_title);
+  g_free (priv->override_title);
 
   G_OBJECT_CLASS (terminal_screen_parent_class)->finalize (object);
 }
@@ -816,28 +816,8 @@ terminal_screen_new (GSettings       *profile,
                          g_settings_get_int (profile, TERMINAL_PROFILE_DEFAULT_SIZE_COLUMNS_KEY),
                          g_settings_get_int (profile, TERMINAL_PROFILE_DEFAULT_SIZE_ROWS_KEY));
 
-  /* If given an initial title, strip it of control characters and
-   * feed it to the terminal.
-   */
-  if (title) {
-    GString *seq;
-    const char *p;
-
-    seq = g_string_new ("\033]0;");
-    for (p = title; *p; p = g_utf8_next_char (p)) {
-      gunichar c = g_utf8_get_char (p);
-      if (c < 0x20 || (c >= 0x7f && c <= 0x9f))
-        continue;
-      else if (c == ';')
-        break;
-
-      g_string_append_unichar (seq, c);
-    }
-    g_string_append (seq, "\033\\");
-
-    vte_terminal_feed (VTE_TERMINAL (screen), seq->str, seq->len);
-    g_string_free (seq, TRUE);
-  }
+  if (title)
+    terminal_screen_set_override_title (screen, title);
 
   vte_terminal_set_font_scale (VTE_TERMINAL (screen), zoom);
   terminal_screen_set_font (screen);
@@ -1049,28 +1029,139 @@ terminal_screen_exec (TerminalScreen *screen,
   return TRUE;
 }
 
+const char*
+terminal_screen_get_raw_title (TerminalScreen *screen)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+
+  if (priv->raw_title)
+    return priv->raw_title;
+
+  return "";
+}
+
 const char*
 terminal_screen_get_title (TerminalScreen *screen)
 {
-  return vte_terminal_get_window_title (VTE_TERMINAL (screen));
+  TerminalScreenPrivate *priv = screen->priv;
+
+  if (priv->cooked_title == nullptr)
+    terminal_screen_cook_title (screen);
+
+  /* cooked_title may still be nullptr */
+  if (priv->cooked_title != nullptr)
+    return priv->cooked_title;
+  else
+    return "";
 }
 
-char *
-terminal_screen_get_description (TerminalScreen *screen)
+/* Supported format specifiers:
+ * %S = static title
+ * %D = dynamic title
+ * %A = dynamic title, falling back to static title if empty
+ * %- = separator, if not at start or end of string (excluding whitespace)
+ */
+static const char *
+terminal_screen_get_title_format (TerminalScreen *screen)
 {
   TerminalScreenPrivate *priv = screen->priv;
-  gs_free char *title_string = nullptr;
-  const char *title;
+  static const char *formats[] = {
+    "%A"      /* TERMINAL_TITLE_REPLACE */,
+    "%D%-%S"  /* TERMINAL_TITLE_BEFORE  */,
+    "%S%-%D"  /* TERMINAL_TITLE_AFTER   */,
+    "%S"      /* TERMINAL_TITLE_IGNORE  */
+  };
+
+  return formats[g_settings_get_enum (priv->profile, TERMINAL_PROFILE_TITLE_MODE_KEY)];
+}
+
+/**
+ * terminal_screen_format_title::
+ * @screen:
+ * @raw_title: main ingredient
+ * @titleptr <inout>: pointer of the current title string
+ *
+ * Format title according @format, and stores it in <literal>*titleptr</literal>.
+ * Always ensures that *titleptr will be non-nullptr.
+ *
+ * Returns: %TRUE iff the title changed
+ */
+static gboolean
+terminal_screen_format_title (TerminalScreen *screen,
+                              const char *raw_title,
+                              char **titleptr)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+  gs_free char *static_title_string = nullptr;
+  const char *format, *arg;
+  const char *static_title = nullptr;
+  GString *title;
+  gboolean add_sep = FALSE;
+
+  g_assert (titleptr);
 
   /* use --title argument if one was supplied, otherwise ask the profile */
-  if (priv->title)
-    title = priv->title;
+  if (priv->override_title)
+    static_title = priv->override_title;
   else
-    title = title_string = g_settings_get_string (priv->profile, TERMINAL_PROFILE_TITLE_KEY);
+    static_title = static_title_string = g_settings_get_string (priv->profile, TERMINAL_PROFILE_TITLE_KEY);
+
+  title = g_string_sized_new (128);
+
+  format = terminal_screen_get_title_format (screen);
+  for (arg = format; *arg; arg += 2)
+    {
+      const char *text_to_append = nullptr;
+
+      g_assert (arg[0] == '%');
 
-  return g_strdup_printf ("%s — %d",
-                          title && title[0] ? title : _("Terminal"),
-                          screen->priv->child_pid);
+      switch (arg[1])
+        {
+          case 'A':
+            text_to_append = raw_title ? raw_title : static_title;
+            break;
+          case 'D':
+            text_to_append = raw_title;
+            break;
+          case 'S':
+            text_to_append = static_title;
+            break;
+          case '-':
+            text_to_append = nullptr;
+            add_sep = TRUE;
+            break;
+          default:
+            g_assert_not_reached ();
+        }
+
+      if (!text_to_append || !text_to_append[0])
+        continue;
+
+      if (add_sep && title->len > 0)
+        g_string_append (title, " — ");
+
+      g_string_append (title, text_to_append);
+      add_sep = FALSE;
+    }
+
+  if (*titleptr == nullptr || strcmp (title->str, *titleptr) != 0)
+    {
+      g_free (*titleptr);
+      *titleptr = g_string_free (title, FALSE);
+      return TRUE;
+    }
+
+  g_string_free (title, TRUE);
+  return FALSE;
+}
+
+static void
+terminal_screen_cook_title (TerminalScreen *screen)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+
+  if (terminal_screen_format_title (screen, priv->raw_title, &priv->cooked_title))
+    g_object_notify (G_OBJECT (screen), "title");
 }
 
 static void
@@ -1113,9 +1204,10 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
     }
 
   if (!prop_name ||
+      prop_name == I_(TERMINAL_PROFILE_TITLE_MODE_KEY) ||
       prop_name == I_(TERMINAL_PROFILE_TITLE_KEY))
     {
-      g_object_notify (object, "description");
+      terminal_screen_cook_title (screen);
     }
 
   if (gtk_widget_get_realized (GTK_WIDGET (screen)) &&
@@ -1407,7 +1499,6 @@ terminal_screen_set_profile (TerminalScreen *screen,
     g_object_unref (old_profile);
 
   g_object_notify (G_OBJECT (screen), "profile");
-  g_object_notify (G_OBJECT (screen), "description");
 }
 
 GSettings*
@@ -1698,8 +1789,6 @@ spawn_result_cb (VteTerminal *terminal,
 
   priv->child_pid = pid;
 
-  g_object_notify (G_OBJECT (screen), "description");
-
   if (error) {
      // FIXMEchpe should be unnecessary, vte already does this internally
     vte_terminal_set_pty (terminal, nullptr);
@@ -1991,33 +2080,45 @@ terminal_screen_focus_in (GtkWidget     *widget,
   return GTK_WIDGET_CLASS (terminal_screen_parent_class)->focus_in_event (widget, event);
 }
 
-void
-terminal_screen_set_user_title (TerminalScreen *screen,
-                                const char     *title)
+static void
+terminal_screen_set_dynamic_title (TerminalScreen *screen,
+                                   const char     *title,
+				   gboolean	  userset)
 {
   TerminalScreenPrivate *priv = screen->priv;
 
-  g_return_if_fail (TERMINAL_IS_SCREEN (screen));
+  g_assert (TERMINAL_IS_SCREEN (screen));
 
-  if (g_strcmp0 (priv->title, title) == 0)
+  if ((priv->user_title && !userset) ||
+      (priv->raw_title && title &&
+       strcmp (priv->raw_title, title) == 0))
     return;
 
-  g_free (priv->title);
-  priv->title = title && title[0] ? g_strdup (title) : nullptr;
+  g_free (priv->raw_title);
+  priv->raw_title = g_strdup (title);
+  terminal_screen_cook_title (screen);
+}
+
+void
+terminal_screen_set_override_title (TerminalScreen *screen,
+                                    const char     *title)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+  char *old_title;
+
+  old_title = priv->override_title;
+  priv->override_title = g_strdup (title);
+  g_free (old_title);
 
-  g_object_notify (G_OBJECT (screen), "description");
+  terminal_screen_set_dynamic_title (screen, title, FALSE);
 }
 
 const char*
-terminal_screen_get_user_title (TerminalScreen *screen)
+terminal_screen_get_dynamic_title (TerminalScreen *screen)
 {
-  TerminalScreenPrivate *priv;
-
   g_return_val_if_fail (TERMINAL_IS_SCREEN (screen), nullptr);
 
-  priv = screen->priv;
-
-  return priv->title ? priv->title : _("Terminal");
+  return screen->priv->raw_title;
 }
 
 /**
@@ -2050,7 +2151,9 @@ static void
 terminal_screen_window_title_changed (VteTerminal *vte_terminal,
                                       TerminalScreen *screen)
 {
-  g_object_notify (G_OBJECT (screen), "title");
+  terminal_screen_set_dynamic_title (screen,
+                                     vte_terminal_get_window_title (vte_terminal),
+				     FALSE);
 }
 
 static void
@@ -2073,8 +2176,6 @@ terminal_screen_child_exited (VteTerminal *terminal,
 
   priv->child_pid = -1;
 
-  g_object_notify (G_OBJECT (screen), "description");
-
   action = TerminalExitAction(g_settings_get_enum (priv->profile, TERMINAL_PROFILE_EXIT_ACTION_KEY));
 
   switch (action)
@@ -2118,6 +2219,23 @@ terminal_screen_child_exited (VteTerminal *terminal,
     }
 }
 
+void
+terminal_screen_set_user_title (TerminalScreen *screen,
+                                const char *text)
+{
+  TerminalScreenPrivate *priv = screen->priv;
+
+  /* The user set the title to nothing, let's understand that as a
+     request to revert to dynamically setting the title again. */
+  if (!text || !text[0])
+    priv->user_title = FALSE;
+  else
+    {
+      priv->user_title = TRUE;
+      terminal_screen_set_dynamic_title (screen, text, TRUE);
+    }
+}
+
 static gboolean
 terminal_screen_contents_changed_cb (TerminalScreen *screen)
 {
diff --git a/src/terminal-screen.hh b/src/terminal-screen.hh
index f4ec9047..feeab852 100644
--- a/src/terminal-screen.hh
+++ b/src/terminal-screen.hh
@@ -113,13 +113,17 @@ void terminal_screen_set_profile (TerminalScreen *screen,
 GSettings* terminal_screen_get_profile (TerminalScreen *screen);
 GSettings* terminal_screen_ref_profile (TerminalScreen *screen);
 
-const char *terminal_screen_get_user_title     (TerminalScreen *screen);
+const char* terminal_screen_get_raw_title      (TerminalScreen *screen);
 const char* terminal_screen_get_title          (TerminalScreen *screen);
-char *      terminal_screen_get_description    (TerminalScreen *screen);
 
 void terminal_screen_set_user_title (TerminalScreen *screen,
                                      const char *text);
 
+void        terminal_screen_set_override_title     (TerminalScreen *screen,
+                                                    const char     *title);
+
+const char *terminal_screen_get_dynamic_title      (TerminalScreen *screen);
+
 char *terminal_screen_get_current_dir (TerminalScreen *screen);
 
 void       terminal_screen_get_size (TerminalScreen *screen,
diff --git a/src/terminal-window.cc b/src/terminal-window.cc
index 98332c6d..389d4d71 100644
--- a/src/terminal-window.cc
+++ b/src/terminal-window.cc
@@ -782,6 +782,12 @@ terminal_set_title_dialog_response_cb (GtkWidget *dialog,
   gtk_widget_destroy (dialog);
 }
 
+static const char *
+terminal_screen_get_user_title (TerminalScreen *screen)
+{
+  return terminal_screen_get_raw_title (screen);
+}
+
 static void
 action_set_title_cb (GSimpleAction *action,
                      GVariant *parameter,
@@ -2628,8 +2634,7 @@ sync_screen_title (TerminalScreen *screen,
     return;
 
   title = terminal_screen_get_title (screen);
-  gtk_window_set_title (GTK_WINDOW (window),
-                        title && title[0] ? title : _("Terminal"));
+  gtk_window_set_title (GTK_WINDOW (window), title);
 }
 
 static void
-- 
2.40.1


From 97a0aef0a716a2009a5eec011e2f1d9ac0a4aa9d Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Wed, 3 Apr 2019 15:38:09 +0200
Subject: [PATCH 15/16] Update the title with the current foreground process

Some changes by:
  Bill Nottingham <notting@splat.cc>
  Ting-Wei Lan <lantw44@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=711060
---
 src/org.gnome.Terminal.gschema.xml |  5 ++++
 src/terminal-schemas.hh            |  1 +
 src/terminal-screen.cc             | 45 +++++++++++++++++++++++++++++-
 3 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index 60d2e87f..f048c9c5 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -275,6 +275,11 @@
       <summary>Whether to scroll to the bottom when there’s new output</summary>
       <description>If true, whenever there’s new output the terminal will scroll to the bottom.</description>
     </key>
+    <key name="show-foreground-process-in-title" type="b">
+      <default>true</default>
+      <summary>Whether to show the current foreground process in the title</summary>
+      <description>If true, the current foreground process will be shown in the window and tab titles.</description>
+    </key>
     <key name="exit-action" enum="org.gnome.Terminal.ExitAction">
       <default>'close'</default>
       <summary>What to do with the terminal when the child command exits</summary>
diff --git a/src/terminal-schemas.hh b/src/terminal-schemas.hh
index 1c67e55d..443ebae4 100644
--- a/src/terminal-schemas.hh
+++ b/src/terminal-schemas.hh
@@ -70,6 +70,7 @@ G_BEGIN_DECLS
 #define TERMINAL_PROFILE_SCROLLBAR_POLICY_KEY           "scrollbar-policy"
 #define TERMINAL_PROFILE_SCROLL_ON_KEYSTROKE_KEY        "scroll-on-keystroke"
 #define TERMINAL_PROFILE_SCROLL_ON_OUTPUT_KEY           "scroll-on-output"
+#define TERMINAL_PROFILE_SHOW_FOREGROUND_PROCESS_IN_TITLE "show-foreground-process-in-title"
 #define TERMINAL_PROFILE_TEXT_BLINK_MODE_KEY            "text-blink-mode"
 #define TERMINAL_PROFILE_TITLE_MODE_KEY                 "title-mode"
 #define TERMINAL_PROFILE_TITLE_KEY                      "title"
diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 5456839a..177431d0 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -114,7 +114,9 @@ struct _TerminalScreenPrivate
   guint idle_exec_source;
   ExecData *exec_data;
 
+  gboolean application_title; /* title was set by an application */
   gboolean between_preexec_and_precmd;
+  gboolean show_foreground_process;
   gboolean user_title; /* title was manually set */
   char *current_cmdline;
   char *raw_title;
@@ -1144,6 +1146,26 @@ terminal_screen_format_title (TerminalScreen *screen,
       add_sep = FALSE;
     }
 
+  if (priv->show_foreground_process &&
+      !priv->application_title &&
+      !priv->user_title &&
+      priv->current_cmdline != nullptr &&
+      priv->current_cmdline[0] != '\0')
+    {
+      gs_free char *current_cmdline_truncated = nullptr;
+      gs_free char *current_cmdline_valid = nullptr;
+      glong len_truncated;
+      glong len_valid;
+
+      current_cmdline_valid = g_utf8_make_valid (priv->current_cmdline, -1);
+      len_valid = g_utf8_strlen (current_cmdline_valid, -1);
+
+      len_truncated = len_valid > 1024 ? 1024 : len_valid;
+      current_cmdline_truncated = g_utf8_substring (current_cmdline_valid, 0, len_truncated);
+
+      g_string_append_printf (title, " — %s", current_cmdline_truncated);
+    }
+
   if (*titleptr == nullptr || strcmp (title->str, *titleptr) != 0)
     {
       g_free (*titleptr);
@@ -1173,6 +1195,7 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
   GObject *object = G_OBJECT (screen);
   VteTerminal *vte_terminal = VTE_TERMINAL (screen);
   TerminalWindow *window;
+  gboolean cook_title = FALSE;
 
   g_object_freeze_notify (object);
 
@@ -1207,7 +1230,7 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
       prop_name == I_(TERMINAL_PROFILE_TITLE_MODE_KEY) ||
       prop_name == I_(TERMINAL_PROFILE_TITLE_KEY))
     {
-      terminal_screen_cook_title (screen);
+      cook_title = TRUE;
     }
 
   if (gtk_widget_get_realized (GTK_WIDGET (screen)) &&
@@ -1235,6 +1258,13 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
       prop_name == I_(TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT))
     update_color_scheme (screen);
 
+  if (!prop_name || prop_name == I_(TERMINAL_PROFILE_SHOW_FOREGROUND_PROCESS_IN_TITLE))
+    {
+      priv->show_foreground_process = g_settings_get_boolean (profile,
+                                                              TERMINAL_PROFILE_SHOW_FOREGROUND_PROCESS_IN_TITLE);
+      cook_title = TRUE;
+    }
+
   if (!prop_name || prop_name == I_(TERMINAL_PROFILE_AUDIBLE_BELL_KEY))
       vte_terminal_set_audible_bell (vte_terminal, g_settings_get_boolean (profile, TERMINAL_PROFILE_AUDIBLE_BELL_KEY));
 
@@ -1299,6 +1329,9 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
       vte_terminal_set_word_char_exceptions (vte_terminal, word_char_exceptions);
     }
 
+  if (cook_title)
+    terminal_screen_cook_title (screen);
+
   g_object_thaw_notify (object);
 }
 
@@ -2151,6 +2184,9 @@ static void
 terminal_screen_window_title_changed (VteTerminal *vte_terminal,
                                       TerminalScreen *screen)
 {
+  TerminalScreenPrivate *priv = screen->priv;
+
+  priv->application_title = priv->between_preexec_and_precmd;
   terminal_screen_set_dynamic_title (screen,
                                      vte_terminal_get_window_title (vte_terminal),
 				     FALSE);
@@ -2258,6 +2294,8 @@ terminal_screen_contents_changed_cb (TerminalScreen *screen)
   cmdline = nullptr;
   _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Current foreground command-line: %s\n", priv->current_cmdline);
 
+  terminal_screen_cook_title (screen);
+
  out:
   priv->contents_changed_source_id = 0;
   return G_SOURCE_REMOVE;
@@ -2350,6 +2388,7 @@ terminal_screen_shell_precmd (VteTerminal *terminal)
 
   _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Shell precmd\n");
 
+  priv->application_title = FALSE;
   priv->between_preexec_and_precmd = FALSE;
 
   if (priv->contents_changed_source_id != 0)
@@ -2369,6 +2408,8 @@ terminal_screen_shell_precmd (VteTerminal *terminal)
 
   g_clear_pointer (&priv->current_cmdline, g_free);
   _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Current foreground command-line: (none)\n");
+
+  terminal_screen_cook_title (screen);
 }
 
 static gboolean
@@ -2390,6 +2431,8 @@ terminal_screen_shell_preexec_cb (TerminalScreen *screen)
   cmdline = nullptr;
   _terminal_debug_print (TERMINAL_DEBUG_SHELL_COMMAND, "Current foreground command-line: %s\n", priv->current_cmdline);
 
+  terminal_screen_cook_title (screen);
+
   priv->shell_preexec_source_id = 0;
   retval = G_SOURCE_REMOVE;
 
-- 
2.40.1


From 506c1cf5c6ca12b2ac2675b07335b4a62aa120d9 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 27 Feb 2020 19:32:08 +0100
Subject: [PATCH 16/16] screen, window: Preserve current toolbox, if any

This relies on toolbox(1) emitting a terminal escape sequence that
advertises the name of the current toolbox container.

https://gitlab.freedesktop.org/terminal-wg/specifications/issues/17
---
 src/terminal-screen.cc | 33 ++++++++++++++++++++++++++++++++-
 src/terminal-screen.hh |  6 ++++++
 src/terminal-window.cc | 26 ++++++++++++++++++++++++--
 3 files changed, 62 insertions(+), 3 deletions(-)

diff --git a/src/terminal-screen.cc b/src/terminal-screen.cc
index 177431d0..3ce7fc05 100644
--- a/src/terminal-screen.cc
+++ b/src/terminal-screen.cc
@@ -862,6 +862,25 @@ terminal_screen_reexec_from_screen (TerminalScreen *screen,
                                     TerminalScreen *parent_screen,
                                     GCancellable *cancellable,
                                     GError **error)
+{
+  _terminal_debug_print (TERMINAL_DEBUG_PROCESSES,
+                         "[screen %p] reexec_from_screen: parent:%p\n",
+                         screen,
+                         parent_screen);
+
+  return terminal_screen_reexec_from_screen_with_override_command (screen,
+                                                                   parent_screen,
+                                                                   nullptr,
+                                                                   cancellable,
+                                                                   error);
+}
+
+gboolean
+terminal_screen_reexec_from_screen_with_override_command (TerminalScreen *screen,
+                                                          TerminalScreen *parent_screen,
+                                                          char **override_command,
+                                                          GCancellable *cancellable,
+                                                          GError **error)
 {
   g_return_val_if_fail (TERMINAL_IS_SCREEN (screen), FALSE);
 
@@ -873,8 +892,20 @@ terminal_screen_reexec_from_screen (TerminalScreen *screen,
   terminal_unref_exec_data ExecData* data = exec_data_clone (parent_screen->priv->exec_data, FALSE);
   gs_free char* cwd = terminal_screen_get_current_dir (parent_screen);
 
+  if (override_command != nullptr)
+    {
+      g_return_val_if_fail (parent_screen->priv->exec_data != nullptr, FALSE);
+      g_return_val_if_fail (data != nullptr, FALSE);
+
+      g_strfreev (data->argv);
+      data->argv = g_strdupv (override_command);
+
+      g_free (data->cwd);
+      data->cwd = g_strdup (cwd);
+    }
+
   _terminal_debug_print (TERMINAL_DEBUG_PROCESSES,
-                         "[screen %p] reexec_from_screen: parent:%p cwd:%s\n",
+                         "[screen %p] reexec_from_screen_with_override_command: parent:%p cwd:%s\n",
                          screen,
                          parent_screen,
                          cwd);
diff --git a/src/terminal-screen.hh b/src/terminal-screen.hh
index feeab852..b5ab7908 100644
--- a/src/terminal-screen.hh
+++ b/src/terminal-screen.hh
@@ -108,6 +108,12 @@ gboolean terminal_screen_reexec_from_screen (TerminalScreen *screen,
                                              GCancellable *cancellable,
                                              GError **error);
 
+gboolean terminal_screen_reexec_from_screen_with_override_command (TerminalScreen *screen,
+                                                                   TerminalScreen *parent_screen,
+                                                                   char **override_command,
+                                                                   GCancellable *cancellable,
+                                                                   GError **error);
+
 void terminal_screen_set_profile (TerminalScreen *screen,
                                   GSettings      *profile);
 GSettings* terminal_screen_get_profile (TerminalScreen *screen);
diff --git a/src/terminal-window.cc b/src/terminal-window.cc
index 389d4d71..d69cf1f0 100644
--- a/src/terminal-window.cc
+++ b/src/terminal-window.cc
@@ -417,8 +417,30 @@ action_new_terminal_cb (GSimpleAction *action,
   terminal_window_switch_screen (window, screen);
   gtk_widget_grab_focus (GTK_WIDGET (screen));
 
-  /* Start child process, if possible by using the same args as the parent screen */
-  terminal_screen_reexec_from_screen (screen, parent_screen, nullptr, nullptr);
+  const char *container_name = vte_terminal_get_current_container_name (VTE_TERMINAL (parent_screen));
+  const char *container_runtime = vte_terminal_get_current_container_runtime (VTE_TERMINAL (parent_screen));
+  if (g_strcmp0 (container_runtime, "toolbox") == 0 && container_name != nullptr && container_name[0] != '\0')
+    {
+      gs_free_error GError *error = nullptr;
+      gs_free char *override_command_str = nullptr;
+      gs_strfreev char **override_command = nullptr;
+
+      override_command_str = g_strdup_printf ("toolbox enter --container %s", container_name);
+      if (!g_shell_parse_argv (override_command_str, nullptr, &override_command, &error))
+        g_printerr ("Failed to parse '%s': %s\n", override_command_str, error->message);
+
+      /* Start child process, if possible by using the same args as the parent screen */
+      terminal_screen_reexec_from_screen_with_override_command (screen,
+                                                                parent_screen,
+                                                                override_command,
+                                                                nullptr,
+                                                                nullptr);
+    }
+  else
+    {
+      /* Start child process, if possible by using the same args as the parent screen */
+      terminal_screen_reexec_from_screen (screen, parent_screen, nullptr, nullptr);
+    }
 
   if (mode == TERMINAL_NEW_TERMINAL_MODE_WINDOW)
     gtk_window_present (GTK_WINDOW (window));
-- 
2.40.1

