diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-07-06 06:34:00 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-07-06 06:34:00 +0800 |
commit | 53bf8c9074f73cbf5c2e180695dbe944ef3b5592 (patch) | |
tree | 5781f9103c835c1f3f29c6475312d2401e418647 /shell | |
parent | ce499eadb84864c513338a47883c5828fda6adad (diff) | |
download | gsoc2013-evolution-53bf8c9074f73cbf5c2e180695dbe944ef3b5592.tar gsoc2013-evolution-53bf8c9074f73cbf5c2e180695dbe944ef3b5592.tar.gz gsoc2013-evolution-53bf8c9074f73cbf5c2e180695dbe944ef3b5592.tar.bz2 gsoc2013-evolution-53bf8c9074f73cbf5c2e180695dbe944ef3b5592.tar.lz gsoc2013-evolution-53bf8c9074f73cbf5c2e180695dbe944ef3b5592.tar.xz gsoc2013-evolution-53bf8c9074f73cbf5c2e180695dbe944ef3b5592.tar.zst gsoc2013-evolution-53bf8c9074f73cbf5c2e180695dbe944ef3b5592.zip |
Shell command for creating new folders.
svn path=/trunk/; revision=3901
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 7 | ||||
-rw-r--r-- | shell/e-shell-view-menu.c | 30 |
2 files changed, 36 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 338c7798d6..427e9bfab7 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2000-07-05 Ettore Perazzoli <ettore@helixcode.com> + + * e-shell-view-menu.c (command_goto_folder): Set the folder + selection dialog as transient for the shell view. + (command_create_folder): New, bound to the "Create folder" + command in the "File" menu. + 2000-07-01 Ettore Perazzoli <ettore@helixcode.com> * e-shell.c (impl_Shell_user_select_folder): New arg diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index d47b15b0aa..51c190f242 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -301,6 +301,8 @@ command_goto_folder (BonoboUIHandler *uih, _("Go to folder..."), default_folder, NULL); + gtk_window_set_transient_for (GTK_WINDOW (folder_selection_dialog), GTK_WINDOW (shell_view)); + gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "folder_selected", GTK_SIGNAL_FUNC (folder_selection_dialog_folder_selected_cb), shell_view); gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "cancelled", @@ -309,6 +311,30 @@ command_goto_folder (BonoboUIHandler *uih, gtk_widget_show (folder_selection_dialog); } +static void +command_create_folder (BonoboUIHandler *uih, + void *data, + const char *path) +{ + GtkWidget *folder_selection_dialog; + EShellView *shell_view; + EShell *shell; + const char *current_uri; + const char *default_folder; + + shell_view = E_SHELL_VIEW (data); + shell = e_shell_view_get_shell (shell_view); + + current_uri = e_shell_view_get_current_uri (shell_view); + + if (strncmp (current_uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0) + default_folder = current_uri + E_SHELL_URI_PREFIX_LEN; + else + default_folder = NULL; + + e_shell_show_folder_creation_dialog (shell, GTK_WINDOW (shell_view), default_folder); +} + /* Unimplemented commands. */ @@ -397,8 +423,10 @@ static GnomeUIInfo menu_file [] = { command_close_open_items), GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_ITEM_NONE (N_("Go to folder..."), N_("Display a different folder"), + GNOMEUIINFO_ITEM_NONE (N_("_Go to folder..."), N_("Display a different folder"), command_goto_folder), + GNOMEUIINFO_ITEM_NONE (N_("_Create new folder..."), N_("Create a new folder"), + command_create_folder), GNOMEUIINFO_SEPARATOR, |