diff options
-rw-r--r-- | src/window.c | 13 | ||||
-rw-r--r-- | src/window.h | 1 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/window.c b/src/window.c index 65d2dc1..f530b31 100644 --- a/src/window.c +++ b/src/window.c @@ -88,26 +88,25 @@ MqWindow * mq_window_new(MqApplication *application, const gchar **uris) { MqWindow *window; - MqConfig *config; guint i; window = malloc(sizeof(*window)); window->application = application; + window->config = mq_application_get_config(application); window->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - config = mq_application_get_config(application); - if (mq_config_get_boolean(config, "window.maximized")) { + if (mq_config_get_boolean(window->config, "window.maximized")) { gtk_window_maximize(GTK_WINDOW(window->window)); } else { gtk_window_unmaximize(GTK_WINDOW(window->window)); } gtk_window_set_default_size(GTK_WINDOW(window->window), - mq_config_get_integer(config, "window.width"), - mq_config_get_integer(config, "window.height")); + mq_config_get_integer(window->config, "window.width"), + mq_config_get_integer(window->config, "window.height")); g_signal_connect(window->window, "notify::is-maximized", - G_CALLBACK(is_maximized_cb), config); + G_CALLBACK(is_maximized_cb), window->config); g_signal_connect(window->window, "configure-event", - G_CALLBACK(configure_event_cb), config); + G_CALLBACK(configure_event_cb), window->config); g_signal_connect(window->window, "destroy", G_CALLBACK(destroy_cb), window); diff --git a/src/window.h b/src/window.h index 26d02b3..2cbdb1d 100644 --- a/src/window.h +++ b/src/window.h @@ -31,6 +31,7 @@ typedef struct MqWindow MqWindow; struct MqWindow { MqApplication *application; + MqConfig *config; GtkWidget *window; GtkWidget *notebook; MqTab *root_tab; |