[Window] Make TildaWindow respect size changes
authorIra W. Snyder <devel@irasnyder.com>
Thu, 17 Jan 2008 05:57:49 +0000 (21:57 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Thu, 17 Jan 2008 05:57:49 +0000 (21:57 -0800)
This makes TildaWindow respect changes in its size via the "height" and
"width" properties. Previously, these were NOOPs.

tilda-window.c

index 13b9825..3a1d923 100644 (file)
@@ -318,11 +318,15 @@ tilda_window_set_property (GObject      *object,
 
                case TILDA_WINDOW_HEIGHT:
                        self->height = g_value_get_int (value);
+                       gtk_widget_set_size_request (self->window, self->width, self->height);
+                       gtk_window_resize (GTK_WINDOW(self->window), self->width, self->height);
                        g_print ("window height: %d\n", self->height);
                        break;
 
                case TILDA_WINDOW_WIDTH:
                        self->width = g_value_get_int (value);
+                       gtk_widget_set_size_request (self->window, self->width, self->height);
+                       gtk_window_resize (GTK_WINDOW(self->window), self->width, self->height);
                        g_print ("window width: %d\n", self->width);
                        break;
 
@@ -509,6 +513,7 @@ tilda_window_constructor (GType                  type,
        // 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);
+       g_object_set (G_OBJECT(self), "height", 400, "width", 1680, NULL);
 
        gtk_window_set_decorated (GTK_WINDOW(self->window), FALSE);