summaryrefslogtreecommitdiff
blob: 82507421d66e7130b05010131fb2357993a97a31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
From 3bb41272b7509a16ec2a5cd93e44f73d5743b626 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Wed, 16 Apr 2014 17:39:39 +0200
Subject: [PATCH 49/61] screen: Remove unused description and user_title API

These were used by various parts of the static title code, which has
now been removed.

https://bugzilla.gnome.org/show_bug.cgi?id=724110
---
 src/terminal-screen.c | 63 ---------------------------------------------------
 src/terminal-screen.h |  6 -----
 2 files changed, 69 deletions(-)

diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index d03ed80..e35914c 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -77,7 +77,6 @@ struct _TerminalScreenPrivate
   GSettings *profile; /* never NULL */
   guint profile_changed_id;
   guint profile_forgotten_id;
-  char *title;
   char *initial_working_directory;
   char **initial_env;
   char **override_command;
@@ -102,7 +101,6 @@ enum {
   PROP_ICON_TITLE,
   PROP_ICON_TITLE_SET,
   PROP_TITLE,
-  PROP_DESCRIPTION,
   PROP_INITIAL_ENVIRONMENT
 };
 
@@ -390,9 +388,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;
@@ -418,7 +413,6 @@ terminal_screen_set_property (GObject *object,
       case PROP_ICON_TITLE:
       case PROP_ICON_TITLE_SET:
       case PROP_TITLE:
-      case PROP_DESCRIPTION:
         /* not writable */
       default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -517,13 +511,6 @@ terminal_screen_class_init (TerminalScreenClass *klass)
                           NULL,
                           G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
 
-  g_object_class_install_property (object_class,
-                                   PROP_DESCRIPTION,
-                                   g_param_spec_string ("description", NULL, NULL,
-                                                        NULL,
-                                                        G_PARAM_READABLE | 
-                                                        G_PARAM_STATIC_STRINGS));
-
   g_object_class_install_property
     (object_class,
      PROP_INITIAL_ENVIRONMENT,
@@ -606,7 +593,6 @@ terminal_screen_finalize (GObject *object)
 
   terminal_screen_set_profile (screen, NULL);
 
-  g_free (priv->title);
   g_free (priv->initial_working_directory);
   g_strfreev (priv->override_command);
   g_strfreev (priv->initial_env);
@@ -713,21 +699,6 @@ terminal_screen_get_icon_title_set (TerminalScreen *screen)
   return vte_terminal_get_icon_title (VTE_TERMINAL (screen)) != NULL;
 }
 
-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,
@@ -949,7 +920,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*
@@ -1359,8 +1329,6 @@ out:
   g_strfreev (env);
   free_fd_setup_data (data);
 
-  g_object_notify (G_OBJECT (screen), "description");
-
   return result;
 }
 
@@ -1543,35 +1511,6 @@ terminal_screen_button_press (GtkWidget      *widget,
   return FALSE;
 }
 
-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) : NULL;
-
-  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), NULL);
-
-  priv = screen->priv;
-
-  return priv->title ? priv->title : _("Terminal");
-}
-
 /**
  * terminal_screen_get_current_dir:
  * @screen:
@@ -1629,8 +1568,6 @@ terminal_screen_child_exited (VteTerminal *terminal,
 
   priv->child_pid = -1;
   
-  g_object_notify (G_OBJECT (screen), "description");
-
   action = g_settings_get_enum (priv->profile, TERMINAL_PROFILE_EXIT_ACTION_KEY);
   
   switch (action)
diff --git a/src/terminal-screen.h b/src/terminal-screen.h
index 2a0d391..96f0a0d 100644
--- a/src/terminal-screen.h
+++ b/src/terminal-screen.h
@@ -100,15 +100,9 @@ void         terminal_screen_set_initial_environment (TerminalScreen  *screen,
                                                       char           **argv);
 char **      terminal_screen_get_initial_environment (TerminalScreen  *screen);
 
-const char *terminal_screen_get_user_title     (TerminalScreen *screen);
 const char* terminal_screen_get_title          (TerminalScreen *screen);
 const char* terminal_screen_get_icon_title     (TerminalScreen *screen);
 gboolean    terminal_screen_get_icon_title_set (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);
 
-- 
1.9.0