[Window] Add positioning capability
authorIra W. Snyder <devel@irasnyder.com>
Wed, 16 Jan 2008 20:16:42 +0000 (12:16 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Wed, 16 Jan 2008 20:16:42 +0000 (12:16 -0800)
The TildaWindow class had the capability to set the x-position and
y-position properties, but they had no effect. This adds the appropriate
gtk_window_move() calls so the position is set up correctly.

tilda-window.c

index 3455112..158d33a 100644 (file)
@@ -310,11 +310,13 @@ tilda_window_set_property (GObject      *object,
 
                case TILDA_WINDOW_X_POSITION:
                        self->x_position = g_value_get_int (value);
 
                case TILDA_WINDOW_X_POSITION:
                        self->x_position = g_value_get_int (value);
+                       gtk_window_move (GTK_WINDOW(self->window), self->x_position, self->y_position);
                        g_print ("window x position: %d\n", self->x_position);
                        break;
 
                case TILDA_WINDOW_Y_POSITION:
                        self->y_position = g_value_get_int (value);
                        g_print ("window x position: %d\n", self->x_position);
                        break;
 
                case TILDA_WINDOW_Y_POSITION:
                        self->y_position = g_value_get_int (value);
+                       gtk_window_move (GTK_WINDOW(self->window), self->x_position, self->y_position);
                        g_print ("window y position: %d\n", self->y_position);
                        break;
 
                        g_print ("window y position: %d\n", self->y_position);
                        break;
 
@@ -494,6 +496,10 @@ tilda_window_constructor (GType                  type,
        gtk_container_add (GTK_CONTAINER(self->window), self->notebook);
        gtk_widget_show (self->notebook);
 
        gtk_container_add (GTK_CONTAINER(self->window), self->notebook);
        gtk_widget_show (self->notebook);
 
+       // FIXME: Remove these, and replace with reads from the config system
+       g_object_set (G_OBJECT(self), "key", "F2", NULL);
+       g_object_set (G_OBJECT(self), "x-position", 0, "y-position", 0, NULL);
+
        tilda_window_add_term (self);
        tilda_window_add_term (self);
        gtk_widget_show_all (self->window);
        tilda_window_add_term (self);
        tilda_window_add_term (self);
        gtk_widget_show_all (self->window);