From bd6359c660895ea0765c216563957c3a2f44e112 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 18 Apr 2002 18:57:45 +0000 Subject: emit show_settings signal (corba_class_init): assign epv method 2002-04-18 JP Rosevear * 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 --- shell/e-shell-view.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'shell/e-shell-view.c') diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 0125004d8a..07ef3d2aa4 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1517,6 +1517,22 @@ corba_interface_set_folder_bar_label (EvolutionShellView *evolution_shell_view, text); } +static void +corba_interface_show_settings (EvolutionShellView *evolution_shell_view, + void *data) +{ + EShellView *shell_view; + EShellViewPrivate *priv; + + g_return_if_fail (data != NULL); + g_return_if_fail (E_IS_SHELL_VIEW (data)); + + shell_view = E_SHELL_VIEW (data); + priv = shell_view->priv; + + e_shell_view_show_settings (shell_view); +} + static void unmerge_on_error (BonoboObject *object, CORBA_Object cobject, @@ -1945,6 +1961,9 @@ setup_corba_interface (EShellView *shell_view, gtk_signal_connect_while_alive (GTK_OBJECT (corba_interface), "set_folder_bar_label", GTK_SIGNAL_FUNC (corba_interface_set_folder_bar_label), shell_view, GTK_OBJECT (shell_view)); + gtk_signal_connect_while_alive (GTK_OBJECT (corba_interface), "show_settings", + GTK_SIGNAL_FUNC (corba_interface_show_settings), + shell_view, GTK_OBJECT (shell_view)); bonobo_object_add_interface (BONOBO_OBJECT (control_frame), BONOBO_OBJECT (corba_interface)); @@ -2349,6 +2368,21 @@ e_shell_view_show_folder_bar (EShellView *shell_view, priv->folder_bar_shown); } +void +e_shell_view_show_settings (EShellView *shell_view) +{ + EShellViewPrivate *priv; + const char *type; + + g_return_if_fail (shell_view != NULL); + g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); + + priv = shell_view->priv; + + type = e_shell_view_get_current_folder_type (shell_view); + e_shell_show_settings (priv->shell, type, shell_view); +} + gboolean e_shell_view_shortcut_bar_shown (EShellView *shell_view) { -- cgit v1.2.3