[gnome-terminal] Remove the static title setting from profile preferences



commit e9cb8fea14a849704074c5d69f173bcf4dc2fb27
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Apr 16 16:01:56 2014 +0200

    Remove the static title setting from profile preferences
    
    The static title setting does not work because TerminalWindow hardcodes
    the title as "Terminal" in the absence of VteTerminal:window-title,
    which is set dynamically via escape sequences. Usually the escape
    sequence is emitted from a suitable PROMPT_COMMAND. You can do the same
    if you want a customized title.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724110

 src/migration.c                    |    3 -
 src/org.gnome.Terminal.gschema.xml |    5 --
 src/profile-editor.c               |    3 -
 src/profile-preferences.ui         |   86 ------------------------------------
 src/terminal-schemas.h             |    1 -
 src/terminal-screen.c              |    9 ----
 6 files changed, 0 insertions(+), 107 deletions(-)
---
diff --git a/src/migration.c b/src/migration.c
index b626ec5..ecd1493 100644
--- a/src/migration.c
+++ b/src/migration.c
@@ -86,7 +86,6 @@ enum {
 #define KEY_SCROLL_ON_KEYSTROKE "scroll_on_keystroke"
 #define KEY_SCROLL_ON_OUTPUT "scroll_on_output"
 #define KEY_SILENT_BELL "silent_bell"
-#define KEY_TITLE "title"
 #define KEY_UPDATE_RECORDS "update_records"
 #define KEY_USE_CUSTOM_COMMAND "use_custom_command"
 #define KEY_USE_CUSTOM_DEFAULT_SIZE "use_custom_default_size"
@@ -395,8 +394,6 @@ migrate_profile (TerminalSettingsList *list,
   migrate_bool (client, path, KEY_BOLD_COLOR_SAME_AS_FG,
                 settings, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG_KEY,
                 FALSE);
-  migrate_string (client, path, KEY_TITLE,
-                  settings, TERMINAL_PROFILE_TITLE_KEY);
   migrate_bool (client, path, KEY_ALLOW_BOLD,
                 settings, TERMINAL_PROFILE_ALLOW_BOLD_KEY,
                 FALSE);
diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index be8f104..af7f418 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -116,11 +116,6 @@
       <summary>Whether bold text should use the same color as normal text</summary>
       <description>If true, boldface text will be rendered using the same color as normal text.</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="allow-bold" type="b">
       <default>true</default>
       <summary>Whether to allow bold text</summary>
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 4bc1f7f..70a1afa 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -1014,9 +1014,6 @@ terminal_profile_edit (GSettings  *profile,
                    gtk_builder_get_object (builder,
                                            "system-font-checkbutton"),
                    "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_TITLE_KEY,
-                   gtk_builder_get_object (builder, "title-entry"), "text",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
   g_settings_bind (profile, TERMINAL_PROFILE_UPDATE_RECORDS_KEY,
                    gtk_builder_get_object (builder,
                                            "update-records-checkbutton"),
diff --git a/src/profile-preferences.ui b/src/profile-preferences.ui
index 02889a3..e730681 100644
--- a/src/profile-preferences.ui
+++ b/src/profile-preferences.ui
@@ -579,92 +579,6 @@
                 <property name="border_width">12</property>
                 <property name="spacing">18</property>
                 <child>
-                  <object class="GtkVBox" id="vbox79">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkLabel" id="label33">
-                        <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="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkAlignment" id="alignment10108">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <object class="GtkVBox" id="vbox93">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
-                            <child>
-                              <object class="GtkHBox" id="hbox137">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">12</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="justify">center</property>
-                                    <property name="mnemonic_widget">title-entry</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkEntry" id="title-entry">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</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">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
                   <object class="GtkVBox" id="vbox80">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
diff --git a/src/terminal-schemas.h b/src/terminal-schemas.h
index 7673da1..0bddcab 100644
--- a/src/terminal-schemas.h
+++ b/src/terminal-schemas.h
@@ -56,7 +56,6 @@ 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_TITLE_KEY                      "title"
 #define TERMINAL_PROFILE_UPDATE_RECORDS_KEY             "update-records"
 #define TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY         "use-custom-command"
 #define TERMINAL_PROFILE_USE_CUSTOM_DEFAULT_SIZE_KEY    "use-custom-default-size"
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index bb05924..d03ed80 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -717,14 +717,11 @@ char *
 terminal_screen_get_description (TerminalScreen *screen)
 {
   TerminalScreenPrivate *priv = screen->priv;
-  gs_free char *title_string = NULL;
   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"),
@@ -772,12 +769,6 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
       vte_terminal_set_cjk_ambiguous_width (vte_terminal, (int) 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) ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]