From: Ira W. Snyder Date: Sat, 19 Jan 2008 23:02:16 +0000 (-0800) Subject: [Terminal] Remove "window-number" attribute X-Git-Url: https://www.irasnyder.com/gitweb/?p=tilda-gobject.git;a=commitdiff_plain;h=44782eff888e6eb99f44ca6dac9cb552fb31ca23 [Terminal] Remove "window-number" attribute TildaTerminal already has a direct reference to the parent window through the "parent-window" property, therefore, this is no longer needed. --- diff --git a/tilda-terminal.c b/tilda-terminal.c index c91ee8a..d35344b 100644 --- a/tilda-terminal.c +++ b/tilda-terminal.c @@ -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", diff --git a/tilda-terminal.h b/tilda-terminal.h index 6b07128..9abff00 100644 --- a/tilda-terminal.h +++ b/tilda-terminal.h @@ -23,7 +23,6 @@ struct _TildaTerminal { gboolean dispose_has_run; /* Instance Members */ - gint window_number; GObject *parent_window; GtkWidget *vte_term; GtkWidget *scrollbar; diff --git a/tilda-window.c b/tilda-window.c index d994a57..3bddd2d 100644 --- a/tilda-window.c +++ b/tilda-window.c @@ -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);