diff options
-rw-r--r-- | shell/ChangeLog | 17 | ||||
-rw-r--r-- | shell/e-shell-folder-commands.c | 13 | ||||
-rw-r--r-- | shell/e-shell-view-menu.c | 13 | ||||
-rw-r--r-- | shell/e-shell-view.c | 16 | ||||
-rw-r--r-- | shell/e-shell-view.h | 1 | ||||
-rw-r--r-- | shell/e-shell.c | 1 |
6 files changed, 58 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 9e564517b3..3306a23b40 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,20 @@ +2001-05-30 Jason Leach <jleach@ximian.com> + + * e-shell.c (e_shell_construct): Removed an unecessary sleep(2) + call, so evolution will start up 2 seconds faster now. + +2001-05-30 Jason Leach <jleach@ximian.com> + + * e-shell-view-menu.c: Connect the AddFolderToShortcutBar verb to + their implementation functions. + + * e-shell-view.c (e_shell_view_get_current_shortcuts_group_num): + New function, use it to find out which shourtcut group is + currently open on the shortcut bar. + + * e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar): + Implement this using new function described above. + 2001-05-29 Federico Mena Quintero <federico@ximian.com> * e-shell-view.c (setup_progress_bar): Added missing castt. diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c index 7621294609..f0a39f0e4e 100644 --- a/shell/e-shell-folder-commands.c +++ b/shell/e-shell-folder-commands.c @@ -314,11 +314,20 @@ void e_shell_command_add_to_shortcut_bar (EShell *shell, EShellView *shell_view) { + EShortcuts *shortcuts; + int group_num; + char *uri; + g_return_if_fail (shell != NULL); g_return_if_fail (E_IS_SHELL (shell)); - g_return_if_fail (shell_view != NULL && E_IS_SHELL_VIEW (shell_view)); + g_return_if_fail (shell_view != NULL); + g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); - g_warning ("To be implemented"); + shortcuts = e_shell_get_shortcuts (shell); + group_num = e_shell_view_get_current_shortcuts_group_num (shell_view); + uri = e_shell_view_get_current_uri (shell_view); + + e_shortcuts_add_shortcut (shortcuts, group_num, -1, uri); } diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index de0dfbca1a..12d2b3ab02 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -371,6 +371,17 @@ command_copy_folder (BonoboUIComponent *uih, e_shell_command_copy_folder (e_shell_view_get_shell (shell_view), shell_view); } +static void +command_add_folder_to_shortcut_bar (BonoboUIComponent *uih, + void *data, + const char *path) +{ + EShellView *shell_view; + + shell_view = E_SHELL_VIEW (data); + e_shell_command_add_to_shortcut_bar (e_shell_view_get_shell (shell_view), shell_view); +} + /* Going to a folder. */ @@ -545,6 +556,8 @@ BonoboUIVerb folder_verbs [] = { BONOBO_UI_VERB ("MoveFolder", command_move_folder), BONOBO_UI_VERB ("CopyFolder", command_copy_folder), + BONOBO_UI_VERB ("AddFolderToShortcutBar", command_add_folder_to_shortcut_bar), + BONOBO_UI_VERB_END }; diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index aa9abc01b7..6bd47ebcf7 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -677,6 +677,22 @@ setup_progress_bar (EShellView *shell_view) bonobo_object_unref (BONOBO_OBJECT (control)); } +int +e_shell_view_get_current_shortcuts_group_num (EShellView *shell_view) +{ + EShellViewPrivate *priv; + EShortcutsView *shortcuts_view; + int group; + + priv = shell_view->priv; + + shortcuts_view = E_SHORTCUTS_VIEW (priv->shortcut_bar); + + group = e_group_bar_get_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view))); + + return group; +} + static void setup_widgets (EShellView *shell_view) { diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h index 8b4d35093d..804379b1c0 100644 --- a/shell/e-shell-view.h +++ b/shell/e-shell-view.h @@ -90,6 +90,7 @@ BonoboUIContainer *e_shell_view_get_bonobo_ui_container (EShellView *shell_view GtkWidget *e_shell_view_get_appbar (EShellView *shell_view); const char *e_shell_view_get_current_uri (EShellView *shell_view); const char *e_shell_view_get_current_path (EShellView *shell_view); +int e_shell_view_get_current_shortcuts_group_num (EShellView *shell_view); gboolean e_shell_view_save_settings (EShellView *shell_view, const char *prefix); diff --git a/shell/e-shell.c b/shell/e-shell.c index 3682373350..566a9e6a72 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -796,7 +796,6 @@ e_shell_construct (EShell *shell, g_free (shortcut_path); - sleep (2); gtk_widget_unref (splash); gtk_widget_destroy (splash); |