aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-04-19 02:57:45 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-04-19 02:57:45 +0800
commitbd6359c660895ea0765c216563957c3a2f44e112 (patch)
treedebd12250550fe90aed6a37ec6455ea4dd479f7f /shell/e-shell.c
parentb997798e3573be6e4e8051807ca66a03756d4bec (diff)
downloadgsoc2013-evolution-bd6359c660895ea0765c216563957c3a2f44e112.tar
gsoc2013-evolution-bd6359c660895ea0765c216563957c3a2f44e112.tar.gz
gsoc2013-evolution-bd6359c660895ea0765c216563957c3a2f44e112.tar.bz2
gsoc2013-evolution-bd6359c660895ea0765c216563957c3a2f44e112.tar.lz
gsoc2013-evolution-bd6359c660895ea0765c216563957c3a2f44e112.tar.xz
gsoc2013-evolution-bd6359c660895ea0765c216563957c3a2f44e112.tar.zst
gsoc2013-evolution-bd6359c660895ea0765c216563957c3a2f44e112.zip
emit show_settings signal (corba_class_init): assign epv method
2002-04-18 JP Rosevear <jpr@ximian.com> * evolution-shell-view.c (impl_ShellView_show_settings): emit show_settings signal (corba_class_init): assign epv method (class_init): add signal * evolution-shell-view.h: new signal * e-shell.c (init): init settings_dialog private member (settings_dialog_destroy_cb): reset dialog pointer (e_shell_show_settings): show the settings dialog, bring it to the front if one already exists for this shell * e-shell.h: new proto * e-shell-view.c (corba_interface_show_settings): implement showSettings method (setup_corba_interface): listen for show_settings signal (e_shell_view_show_settings): show the settings dialog * e-shell-view.h: new proto * e-shell-view-menu.c (command_settings): call e_shell_view_show_settings instead * Evolution-ShellView.idl: add showSettings method svn path=/trunk/; revision=16510
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index a129d7a8d9..4b561078c6 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -62,6 +62,7 @@
#include "e-shell-corba-icon-utils.h"
#include "e-shell-folder-selection-dialog.h"
#include "e-shell-offline-handler.h"
+#include "e-shell-settings-dialog.h"
#include "e-shell-startup-wizard.h"
#include "e-shell-view.h"
#include "e-shortcuts.h"
@@ -119,6 +120,9 @@ struct _EShellPrivate {
/* Line status. */
EShellLineStatus line_status;
+ /* Settings Dialog */
+ GtkWidget *settings_dialog;
+
/* Configuration Database */
Bonobo_ConfigDatabase db;
@@ -1165,6 +1169,7 @@ init (EShell *shell)
priv->offline_handler = NULL;
priv->crash_type_names = NULL;
priv->line_status = E_SHELL_LINE_STATUS_OFFLINE;
+ priv->settings_dialog = NULL;
priv->db = CORBA_OBJECT_NIL;
priv->is_initialized = FALSE;
priv->is_interactive = FALSE;
@@ -2014,6 +2019,46 @@ e_shell_send_receive (EShell *shell)
e_free_string_list (id_list);
}
+static void
+settings_dialog_destroy_cb (GtkWidget *widget, void *data)
+{
+ EShell *shell;
+ EShellPrivate *priv;
+
+ shell = E_SHELL (data);
+ priv = shell->priv;
+
+ priv->settings_dialog = NULL;
+}
+
+void
+e_shell_show_settings (EShell *shell, const char *type, EShellView *shell_view)
+{
+ EShellPrivate *priv;
+
+ g_return_if_fail (shell != NULL);
+ g_return_if_fail (E_IS_SHELL (shell));
+ g_return_if_fail (type != NULL);
+
+ priv = shell->priv;
+
+ if (priv->settings_dialog != NULL) {
+ gdk_window_show (priv->settings_dialog->window);
+ gtk_widget_grab_focus (priv->settings_dialog);
+ return;
+ }
+
+ priv->settings_dialog = e_shell_settings_dialog_new ();
+ e_shell_settings_dialog_show_type (E_SHELL_SETTINGS_DIALOG (priv->settings_dialog), type);
+
+ gtk_signal_connect (GTK_OBJECT (priv->settings_dialog), "destroy",
+ GTK_SIGNAL_FUNC (settings_dialog_destroy_cb), shell);
+
+ gtk_window_set_transient_for (GTK_WINDOW (priv->settings_dialog), GTK_WINDOW (shell_view));
+ gtk_widget_show (priv->settings_dialog);
+
+}
+
Bonobo_ConfigDatabase
e_shell_get_config_db (EShell *shell)