From: Ira W. Snyder Date: Thu, 17 Jan 2008 05:57:49 +0000 (-0800) Subject: [Window] Make TildaWindow respect size changes X-Git-Url: https://www.irasnyder.com/gitweb/?p=tilda-gobject.git;a=commitdiff_plain;h=67f3e23982c6a3cef9a31d2ac601d520de896514 [Window] Make TildaWindow respect size changes This makes TildaWindow respect changes in its size via the "height" and "width" properties. Previously, these were NOOPs. --- diff --git a/tilda-window.c b/tilda-window.c index 13b9825..3a1d923 100644 --- a/tilda-window.c +++ b/tilda-window.c @@ -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);