[gnome-terminal] screen: Remove unused description and user_title API
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] screen: Remove unused description and user_title API
- Date: Thu, 17 Apr 2014 08:24:57 +0000 (UTC)
commit 3bb41272b7509a16ec2a5cd93e44f73d5743b626
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Apr 16 17:39:39 2014 +0200
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, 0 insertions(+), 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]