aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-02-19 14:22:32 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-02-19 14:22:32 +0800
commit1a40acf554290883d6cf2a491dc36685842fd26b (patch)
treea920466e9b41ee104dd13d1335820770a17904a2 /shell/e-shell.c
parent0110c94c6abdbb25b4fea6a21f20f00b82a0fdd8 (diff)
downloadgsoc2013-evolution-1a40acf554290883d6cf2a491dc36685842fd26b.tar
gsoc2013-evolution-1a40acf554290883d6cf2a491dc36685842fd26b.tar.gz
gsoc2013-evolution-1a40acf554290883d6cf2a491dc36685842fd26b.tar.bz2
gsoc2013-evolution-1a40acf554290883d6cf2a491dc36685842fd26b.tar.lz
gsoc2013-evolution-1a40acf554290883d6cf2a491dc36685842fd26b.tar.xz
gsoc2013-evolution-1a40acf554290883d6cf2a491dc36685842fd26b.tar.zst
gsoc2013-evolution-1a40acf554290883d6cf2a491dc36685842fd26b.zip
Documentation tweaks.
Have e_shell_get_preferences_window() take an EShell argument. svn path=/branches/kill-bonobo/; revision=37294
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 3b5c78393d..fa25edd463 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -41,6 +41,7 @@ struct _EShellPrivate {
GList *watched_windows;
EShellSettings *settings;
GConfClient *gconf_client;
+ GtkWidget *preferences_window;
/* Shell Modules */
GList *loaded_modules;
@@ -465,6 +466,11 @@ shell_dispose (GObject *object)
priv->gconf_client = NULL;
}
+ if (priv->preferences_window != NULL) {
+ g_object_unref (priv->preferences_window);
+ priv->preferences_window = NULL;
+ }
+
g_list_foreach (
priv->loaded_modules,
(GFunc) g_type_module_unuse, NULL);
@@ -771,7 +777,7 @@ shell_class_init (EShellClass *class)
* EShell::window-destroyed
* @shell: the #EShell which emitted the signal
*
- * Emitted when an #EShellWindow is destroyed.
+ * Emitted when a watched is destroyed.
**/
signals[WINDOW_DESTROYED] = g_signal_new (
"window-destroyed",
@@ -837,6 +843,7 @@ shell_init (EShell *shell)
shell->priv->settings = g_object_new (E_TYPE_SHELL_SETTINGS, NULL);
shell->priv->gconf_client = gconf_client_get_default ();
+ shell->priv->preferences_window = e_preferences_window_new ();
shell->priv->modules_by_name = modules_by_name;
shell->priv->modules_by_scheme = modules_by_scheme;
shell->priv->safe_mode = e_file_lock_exists ();
@@ -1333,15 +1340,20 @@ e_shell_set_online (EShell *shell,
shell_prepare_for_offline (shell);
}
+/**
+ * e_shell_get_preferences_window:
+ * @shell: an #EShell
+ *
+ * Returns the Evolution Preferences window.
+ *
+ * Returns: the preferences window
+ **/
GtkWidget *
-e_shell_get_preferences_window (void)
+e_shell_get_preferences_window (EShell *shell)
{
- static GtkWidget *preferences_window = NULL;
-
- if (G_UNLIKELY (preferences_window == NULL))
- preferences_window = e_preferences_window_new ();
+ g_return_val_if_fail (E_IS_SHELL (shell), NULL);
- return preferences_window;
+ return shell->priv->preferences_window;
}
/**