diff options
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-shell-view.c | 66 | ||||
-rw-r--r-- | shell/e-shell-view.h | 7 |
3 files changed, 46 insertions, 33 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 2a9d3ce796..0219f0bd3f 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,5 +1,11 @@ 2001-06-23 Ettore Perazzoli <ettore@ximian.com> + * e-shell-view.c (e_shell_view_set_current_shortcuts_group_num): + Moved at the bottom, as it's public API. Also add preconditions. + (e_shell_view_get_current_shortcuts_group_num): Likewise. + +2001-06-23 Ettore Perazzoli <ettore@ximian.com> + * e-shell-view.c: Get rid of some `#if 0'ed code. 2001-06-23 Ettore Perazzoli <ettore@ximian.com> diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index e929c122ef..fac392e19b 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -738,36 +738,6 @@ setup_statusbar_hints (EShellView *shell_view) } -void -e_shell_view_set_current_shortcuts_group_num (EShellView *shell_view, int group_num) -{ - /* This function could become static */ - EShellViewPrivate *priv; - EShortcutsView *shortcuts_view; - - priv = shell_view->priv; - - shortcuts_view = E_SHORTCUTS_VIEW (priv->shortcut_bar); - - e_group_bar_set_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view)), group_num, FALSE); -} - -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) { @@ -2233,6 +2203,42 @@ e_shell_view_load_settings (EShellView *shell_view, return TRUE; } + +/* FIXME: This function could become static */ +void +e_shell_view_set_current_shortcuts_group_num (EShellView *shell_view, int group_num) +{ + EShellViewPrivate *priv; + EShortcutsView *shortcuts_view; + + g_return_if_fail (shell_view != NULL); + g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); + + priv = shell_view->priv; + + shortcuts_view = E_SHORTCUTS_VIEW (priv->shortcut_bar); + + e_group_bar_set_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view)), group_num, FALSE); +} + +int +e_shell_view_get_current_shortcuts_group_num (EShellView *shell_view) +{ + EShellViewPrivate *priv; + EShortcutsView *shortcuts_view; + int group; + + g_return_val_if_fail (shell_view != NULL, -1); + g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), -1); + + 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; +} E_MAKE_TYPE (e_shell_view, "EShellView", EShellView, class_init, init, BONOBO_TYPE_WINDOW) diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h index 077c55705a..c9220b09ad 100644 --- a/shell/e-shell-view.h +++ b/shell/e-shell-view.h @@ -100,14 +100,15 @@ 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); -void e_shell_view_set_current_shortcuts_group_num (EShellView *shell_view, int group_num); - gboolean e_shell_view_save_settings (EShellView *shell_view, int view_num); gboolean e_shell_view_load_settings (EShellView *shell_view, int view_num); +int e_shell_view_get_current_shortcuts_group_num (EShellView *shell_view); +void e_shell_view_set_current_shortcuts_group_num (EShellView *shell_view, + int group_num); + #ifdef __cplusplus } |