summaryrefslogtreecommitdiff
path: root/endless
diff options
context:
space:
mode:
Diffstat (limited to 'endless')
-rw-r--r--endless/eoswindow.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index f6451e2..0f507e0 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -369,6 +369,18 @@ eos_window_get_property (GObject *object,
}
static void
+set_application (EosWindow *self,
+ EosApplication *application)
+{
+ self->priv->application = application;
+ gtk_window_set_application (GTK_WINDOW (self),
+ GTK_APPLICATION (self->priv->application));
+ if (self->priv->application == NULL)
+ g_error ("In order to create a window, you must have an application "
+ "for it to connect to.");
+}
+
+static void
eos_window_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -379,12 +391,7 @@ eos_window_set_property (GObject *object,
switch (property_id)
{
case PROP_APPLICATION:
- self->priv->application = g_value_get_object (value);
- gtk_window_set_application (GTK_WINDOW (self),
- GTK_APPLICATION (self->priv->application));
- if (self->priv->application == NULL)
- g_error ("In order to create a window, you must have an application "
- "for it to connect to.");
+ set_application (self, g_value_get_object (value));
break;
case PROP_PAGE_MANAGER: