aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-08-23 23:36:32 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-23 23:36:32 +0800
commitfd6cd9e3a6dc06f9b8e44ec13ac881ebd6793e6e (patch)
treee97b9ea12c3007cee5933246893d18a63461ce3a /shell/e-shell-window.c
parent036bb44de80f86a9fa5d92ce9e8848332f2a9cd2 (diff)
downloadgsoc2013-evolution-fd6cd9e3a6dc06f9b8e44ec13ac881ebd6793e6e.tar.gz
gsoc2013-evolution-fd6cd9e3a6dc06f9b8e44ec13ac881ebd6793e6e.tar.zst
gsoc2013-evolution-fd6cd9e3a6dc06f9b8e44ec13ac881ebd6793e6e.zip
Progress update:
- Discard libnm-glib method of monitoring network connectivity. - Decided to make EShell a singleton GObject after all. Makes the design cleaner, despite having to pass a singleton instance around. - Make the switcher button style persistent. svn path=/branches/kill-bonobo/; revision=36043
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r--shell/e-shell-window.c48
1 files changed, 45 insertions, 3 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index ca7776c201..c12e6ecc64 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -42,12 +42,21 @@
enum {
PROP_0,
PROP_CURRENT_VIEW,
- PROP_SAFE_MODE
+ PROP_SAFE_MODE,
+ PROP_SHELL
};
static gpointer parent_class;
static void
+shell_window_set_shell (EShellWindow *shell_window,
+ EShell *shell)
+{
+ g_return_if_fail (shell_window->priv->shell == NULL);
+ shell_window->priv->shell = g_object_ref (shell);
+}
+
+static void
shell_window_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -65,6 +74,12 @@ shell_window_set_property (GObject *object,
E_SHELL_WINDOW (object),
g_value_get_boolean (value));
return;
+
+ case PROP_SHELL:
+ shell_window_set_shell (
+ E_SHELL_WINDOW (object),
+ g_value_get_object (value));
+ return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -88,6 +103,12 @@ shell_window_get_property (GObject *object,
value, e_shell_window_get_safe_mode (
E_SHELL_WINDOW (object)));
return;
+
+ case PROP_SHELL:
+ g_value_set_object (
+ value, e_shell_window_get_shell (
+ E_SHELL_WINDOW (object)));
+ return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -146,6 +167,17 @@ shell_window_class_init (EShellWindowClass *class)
FALSE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SHELL,
+ g_param_spec_object (
+ "shell",
+ NULL,
+ NULL,
+ E_TYPE_SHELL,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
}
static void
@@ -190,10 +222,20 @@ e_shell_window_get_type (void)
}
GtkWidget *
-e_shell_window_new (gboolean safe_mode)
+e_shell_window_new (EShell *shell,
+ gboolean safe_mode)
{
return g_object_new (
- E_TYPE_SHELL_WINDOW, "safe-mode", safe_mode, NULL);
+ E_TYPE_SHELL_WINDOW, "shell", shell,
+ "safe-mode", safe_mode, NULL);
+}
+
+EShell *
+e_shell_window_get_shell (EShellWindow *shell_window)
+{
+ g_return_val_if_fail (E_IS_SHELL_WINDOW (shell_window), NULL);
+
+ return shell_window->priv->shell;
}
GtkUIManager *