aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-06-24 01:47:35 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-06-24 01:47:35 +0800
commit92d5ddd3b17ffd521be156b1b8ed472d07889084 (patch)
tree2f269ef1b73b232ee183bd58f64f1dbc3c01f128 /shell
parentf23683363bc57fa208e29ae88810c52799b34096 (diff)
downloadgsoc2013-evolution-92d5ddd3b17ffd521be156b1b8ed472d07889084.tar.gz
gsoc2013-evolution-92d5ddd3b17ffd521be156b1b8ed472d07889084.tar.zst
gsoc2013-evolution-92d5ddd3b17ffd521be156b1b8ed472d07889084.zip
Stylistical changes: move
e_shell_view_{get,set}_current_shortcuts_group_num() at the bottom of the file, add pre-conditions to them, and reindent the header file slightly. svn path=/trunk/; revision=10444
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-shell-view.c66
-rw-r--r--shell/e-shell-view.h7
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
}