From 152c6a69b1c2454bc0920092e42005e168e01743 Mon Sep 17 00:00:00 2001 From: Jason Leach Date: Wed, 24 Jan 2001 18:55:10 +0000 Subject: (Fix #1252: Need a File->Close way to close a view) 2001-01-24 Jason Leach (Fix #1252: Need a File->Close way to close a view) * evolution.xml: new File->Close menu item and associated command. 2001-01-24 Jason Leach (Fix #1252: Need a File->Close way to close a view) * e-shell-view-menu.c (command_close): New function, destroys the current view. * e-shell.c (view_destroy_cb): Make sure shell settings get saved when the last view is destroyed. svn path=/trunk/; revision=7787 --- shell/e-shell-view-menu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (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 f396bf9f6d..ec2e2edfb2 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -82,6 +82,19 @@ folder_bar_mode_changed_cb (EShellView *shell_view, /* Command callbacks. */ + +static void +command_close (BonoboUIComponent *uih, + void *data, + const char *path) +{ + EShellView *shell_view; + + shell_view = E_SHELL_VIEW (data); + + gtk_object_destroy (GTK_OBJECT (shell_view)); +} + static void command_quit (BonoboUIComponent *uih, void *data, @@ -423,6 +436,7 @@ BonoboUIVerb file_verbs [] = { BONOBO_UI_VERB ("FileImporter", show_import_wizard), BONOBO_UI_VERB ("FileGoToFolder", command_goto_folder), BONOBO_UI_VERB ("FileCreateFolder", command_create_folder), + BONOBO_UI_VERB ("FileClose", command_close), BONOBO_UI_VERB ("FileExit", command_quit), BONOBO_UI_VERB_END -- cgit v1.2.3