[Terminal] Remove "window-number" attribute
authorIra W. Snyder <devel@irasnyder.com>
Sat, 19 Jan 2008 23:02:16 +0000 (15:02 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Sat, 19 Jan 2008 23:02:16 +0000 (15:02 -0800)
TildaTerminal already has a direct reference to the parent window through
the "parent-window" property, therefore, this is no longer needed.

tilda-terminal.c
tilda-terminal.h
tilda-window.c

index c91ee8a..d35344b 100644 (file)
@@ -12,11 +12,12 @@ tilda_terminal_dbus_register_object (TildaTerminal *tt)
        debug_enter  ();
        debug_assert (TILDA_IS_TERMINAL(tt));
 
+       TildaWindow *parent_window = TILDA_WINDOW(tt->parent_window);
        gchar *object_path;
 
        // Register this object with DBus
        object_path = g_strdup_printf ("/net/sourceforge/Tilda/Window%d/Terminal%d",
-                                                                  tt->window_number, tt->number);
+                                                                  parent_window->number, tt->number);
        dbus_g_connection_register_g_object (dbus_connection, object_path, G_OBJECT(tt));
        g_free (object_path);
 }
@@ -332,7 +333,6 @@ static GObjectClass *parent_class = NULL;
 
 enum tilda_terminal_properties {
        TILDA_TERMINAL_NUMBER = 1,
-       TILDA_TERMINAL_WINDOW_NUMBER,
        TILDA_TERMINAL_TW,
 
        /* All non-constructor-only properties */
@@ -397,11 +397,6 @@ tilda_terminal_set_property (GObject      *object,
                        debug_printf ("terminal number: %d\n", self->number);
                        break;
 
-               case TILDA_TERMINAL_WINDOW_NUMBER:
-                       self->window_number = g_value_get_int (value);
-                       debug_printf ("terminal parent window number: %d\n", self->window_number);
-                       break;
-
                case TILDA_TERMINAL_TW:
                        self->parent_window = g_value_get_pointer (value);
                        debug_printf ("terminal parent window: 0x%x\n", self->parent_window);
@@ -571,10 +566,6 @@ tilda_terminal_get_property (GObject    *object,
                        g_value_set_int (value, self->number);
                        break;
 
-               case TILDA_TERMINAL_WINDOW_NUMBER:
-                       g_value_set_int (value, self->window_number);
-                       break;
-
                case TILDA_TERMINAL_TW:
                        g_value_set_pointer (value, self->parent_window);
                        break;
@@ -813,18 +804,6 @@ tilda_terminal_class_init (gpointer g_class,
                                                                         TILDA_TERMINAL_NUMBER,
                                                                         pspec);
 
-       pspec = g_param_spec_int ("window-number",
-                                                         "Number of the window to which this terminal belongs",
-                                                         "Set the number of the parent window",
-                                                         0,
-                                                         INT_MAX,
-                                                         0x0000beef,
-                                                         G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
-
-       g_object_class_install_property (gobject_class,
-                                                                        TILDA_TERMINAL_WINDOW_NUMBER,
-                                                                        pspec);
-
        pspec = g_param_spec_pointer ("parent-window",
                                                                  "Pointer to terminal's parent TildaWindow",
                                                                  "Set the pointer to the terminal's parent TildaWindow",
index 6b07128..9abff00 100644 (file)
@@ -23,7 +23,6 @@ struct _TildaTerminal {
        gboolean dispose_has_run;
 
        /* Instance Members */
-       gint window_number;
        GObject *parent_window;
        GtkWidget *vte_term;
        GtkWidget *scrollbar;
index d994a57..3bddd2d 100644 (file)
@@ -76,7 +76,6 @@ tilda_window_add_term (TildaWindow *tw)
        number = tilda_window_find_next_free_terminal_number (tw);
        tt = g_object_new (TILDA_TYPE_TERMINAL,
                                           "number", number,
-                                          "window-number", tw->number,
                                           "parent-window", tw,
                                           NULL);
        g_ptr_array_add (tw->terms, tt);