From 0a7abd8b7fe1e51a1a18b8dfc4c670aae163b0c8 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 7 Mar 2002 22:23:40 +0000 Subject: New function to create a test configuration page for the test component. * evolution-test-component.c (create_configuration_page): New function to create a test configuration page for the test component. (configuration_control_factory_fn): Factory function for the configuration controls. (register_configuration_control_factory): New function to register the factory. (main): Call it. * e-shell-view-menu.c: Add verb "Settings". (command_settings): Implementation for the "Settings" verb. * GNOME_Evolution_TestComponent.oaf: Add a configuration control. * e-shell-settings-dialog.c: New. * e-shell-settings-dialog.h: New. svn path=/trunk/; revision=15977 --- shell/e-shell-view-menu.c | 50 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 13 deletions(-) (limited to 'shell/e-shell-view-menu.c') diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index 649e37b016..c72f899bd5 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -24,7 +24,25 @@ /* FIXME: This file is a bit of a mess. */ +#ifdef HAVE_CONFIG_H #include +#endif + +#include "e-shell-view-menu.h" + +#include "e-shell-folder-creation-dialog.h" +#include "e-shell-folder-selection-dialog.h" + +#include "e-shell-settings-dialog.h" + +#include "e-shell-constants.h" + +#include "e-shell-importer.h" +#include "e-shell-about-box.h" + +#include "e-shell-folder-commands.h" + +#include "evolution-shell-component-utils.h" #include @@ -46,19 +64,6 @@ #include -#include "e-shell-folder-creation-dialog.h" -#include "e-shell-folder-selection-dialog.h" - -#include "e-shell-constants.h" - -#include "e-shell-view-menu.h" -#include "e-shell-importer.h" -#include "e-shell-about-box.h" - -#include "e-shell-folder-commands.h" - -#include "evolution-shell-component-utils.h" - /* Utility functions. */ @@ -563,6 +568,23 @@ command_new_shortcut (BonoboUIComponent *uih, /* Tools menu. */ +static void +command_settings (BonoboUIComponent *uih, + void *data, + const char *path) +{ + EShellView *shell_view; + GtkWidget *dialog; + + shell_view = E_SHELL_VIEW (data); + + dialog = e_shell_settings_dialog_new (); + + gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (shell_view)); + + gtk_widget_show (dialog); +} + static void command_pilot_settings (BonoboUIComponent *uih, void *data, @@ -624,6 +646,8 @@ BonoboUIVerb folder_verbs [] = { }; BonoboUIVerb tools_verbs[] = { + BONOBO_UI_VERB ("Settings", command_settings), + BONOBO_UI_VERB ("PilotSettings", command_pilot_settings), BONOBO_UI_VERB_END -- cgit