aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-08-09 20:05:51 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-09 20:05:51 +0800
commited9c8cc740baed6a67c9a8e5953bb062862c845b (patch)
tree854acca168db2681a6b35e976a2e7b5b8e39ffb0 /shell/e-shell.c
parent2351455697b4b31d41e9d2fa6fe86e3c1cb864fb (diff)
downloadgsoc2013-evolution-ed9c8cc740baed6a67c9a8e5953bb062862c845b.tar
gsoc2013-evolution-ed9c8cc740baed6a67c9a8e5953bb062862c845b.tar.gz
gsoc2013-evolution-ed9c8cc740baed6a67c9a8e5953bb062862c845b.tar.bz2
gsoc2013-evolution-ed9c8cc740baed6a67c9a8e5953bb062862c845b.tar.lz
gsoc2013-evolution-ed9c8cc740baed6a67c9a8e5953bb062862c845b.tar.xz
gsoc2013-evolution-ed9c8cc740baed6a67c9a8e5953bb062862c845b.tar.zst
gsoc2013-evolution-ed9c8cc740baed6a67c9a8e5953bb062862c845b.zip
Treat the Preferences window as a singleton.
Kill a bunch of Bonobo crud, which breaks compilation again. svn path=/branches/kill-bonobo/; revision=35947
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 2fe703f077..25572dbcdc 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -21,15 +21,14 @@
#include "e-shell.h"
#include <glib/gi18n.h>
+#include <e-preferences-window.h>
#include "e-shell-module.h"
#include "e-shell-registry.h"
-#include "e-shell-settings-dialog.h"
#define SHUTDOWN_TIMEOUT 500 /* milliseconds */
static GList *active_windows;
-static GtkWidget *preferences;
static gboolean
shell_window_delete_event_cb (EShellWindow *shell_window)
@@ -160,18 +159,13 @@ e_shell_handle_uri (const gchar *uri)
return e_shell_module_handle_uri (shell_module, uri);
}
-void
-e_shell_show_preferences (GtkWindow *parent)
+GtkWidget *
+e_shell_get_preferences_window (void)
{
- if (preferences != NULL) {
- gtk_window_present (GTK_WINDOW (preferences));
- return;
- }
+ static GtkWidget *preferences_window = NULL;
- preferences = e_shell_settings_dialog_new ();
- /* FIXME e_shell_settings_dialog_show_type (...); */
+ if (G_UNLIKELY (preferences_window == NULL))
+ preferences_window = e_preferences_window_new ();
- gtk_window_set_transient_for (GTK_WINDOW (preferences), parent);
- gtk_window_set_destroy_with_parent (GTK_WINDOW (preferences), TRUE);
- gtk_widget_show (preferences);
+ return preferences_window;
}