gnome-terminal r2714 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2714 - trunk/src
- Date: Thu, 29 May 2008 19:47:34 +0000 (UTC)
Author: chpe
Date: Thu May 29 19:47:34 2008
New Revision: 2714
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2714&view=rev
Log:
Add a property for the override-command.
Modified:
trunk/src/terminal-screen.c
Modified: trunk/src/terminal-screen.c
==============================================================================
--- trunk/src/terminal-screen.c (original)
+++ trunk/src/terminal-screen.c Thu May 29 19:47:34 2008
@@ -82,6 +82,7 @@
PROP_0,
PROP_ICON_TITLE,
PROP_ICON_TITLE_SET,
+ PROP_OVERRIDE_COMMAND,
PROP_TITLE,
};
@@ -412,6 +413,9 @@
case PROP_ICON_TITLE_SET:
g_value_set_boolean (value, terminal_screen_get_icon_title_set (screen));
break;
+ case PROP_OVERRIDE_COMMAND:
+ g_value_set_boxed (value, terminal_screen_get_override_command (screen));
+ break;
case PROP_TITLE:
g_value_set_string (value, terminal_screen_get_title (screen));
break;
@@ -422,6 +426,29 @@
}
static void
+terminal_screen_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ TerminalScreen *screen = TERMINAL_SCREEN (object);
+
+ switch (prop_id)
+ {
+ case PROP_OVERRIDE_COMMAND:
+ terminal_screen_set_override_command (screen, g_value_get_boxed (value));
+ break;
+ case PROP_ICON_TITLE:
+ case PROP_ICON_TITLE_SET:
+ case PROP_TITLE:
+ /* not writable */
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
terminal_screen_class_init (TerminalScreenClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -430,6 +457,7 @@
object_class->dispose = terminal_screen_dispose;
object_class->finalize = terminal_screen_finalize;
object_class->get_property = terminal_screen_get_property;
+ object_class->set_property = terminal_screen_set_property;
widget_class->screen_changed = terminal_screen_screen_changed;
@@ -470,6 +498,13 @@
g_object_class_install_property
(object_class,
+ PROP_ICON_TITLE,
+ g_param_spec_boxed ("override-command", NULL, NULL,
+ G_TYPE_STRV,
+ G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+ g_object_class_install_property
+ (object_class,
PROP_TITLE,
g_param_spec_string ("title", NULL, NULL,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]