aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/shortcut-bar
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/shortcut-bar')
-rw-r--r--widgets/shortcut-bar/ChangeLog4
-rw-r--r--widgets/shortcut-bar/e-shortcut-bar.c17
-rw-r--r--widgets/shortcut-bar/e-shortcut-bar.h52
3 files changed, 48 insertions, 25 deletions
diff --git a/widgets/shortcut-bar/ChangeLog b/widgets/shortcut-bar/ChangeLog
index 5033b6da94..f3baab779a 100644
--- a/widgets/shortcut-bar/ChangeLog
+++ b/widgets/shortcut-bar/ChangeLog
@@ -1,3 +1,7 @@
+2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
+
+ * e-shortcut-bar.c (e_shortcut_bar_get_view_type): New function.
+
2000-05-25 Ettore Perazzoli <ettore@helixcode.com>
* e-shortcut-bar.c (e_shortcut_bar_load_image): Leak plug: free
diff --git a/widgets/shortcut-bar/e-shortcut-bar.c b/widgets/shortcut-bar/e-shortcut-bar.c
index d668516338..f3af57d659 100644
--- a/widgets/shortcut-bar/e-shortcut-bar.c
+++ b/widgets/shortcut-bar/e-shortcut-bar.c
@@ -422,6 +422,23 @@ e_shortcut_bar_set_view_type (EShortcutBar *shortcut_bar,
}
+EIconBarViewType
+e_shortcut_bar_get_view_type (EShortcutBar *shortcut_bar,
+ gint group_num)
+{
+ EShortcutBarGroup *group;
+
+ g_return_val_if_fail (E_IS_SHORTCUT_BAR (shortcut_bar), E_ICON_BAR_SMALL_ICONS);
+ g_return_val_if_fail (group_num >= 0, E_ICON_BAR_SMALL_ICONS);
+ g_return_val_if_fail (group_num < shortcut_bar->groups->len, E_ICON_BAR_SMALL_ICONS);
+
+ group = &g_array_index (shortcut_bar->groups,
+ EShortcutBarGroup, group_num);
+
+ return E_ICON_BAR (group->icon_bar)->view_type;
+}
+
+
static void
e_shortcut_bar_item_selected (EIconBar *icon_bar,
GdkEvent *event,
diff --git a/widgets/shortcut-bar/e-shortcut-bar.h b/widgets/shortcut-bar/e-shortcut-bar.h
index b02626fdef..8d151b0a4e 100644
--- a/widgets/shortcut-bar/e-shortcut-bar.h
+++ b/widgets/shortcut-bar/e-shortcut-bar.h
@@ -103,39 +103,41 @@ struct _EShortcutBarClass
};
-GtkType e_shortcut_bar_get_type (void);
-GtkWidget* e_shortcut_bar_new (void);
+GtkType e_shortcut_bar_get_type (void);
+GtkWidget* e_shortcut_bar_new (void);
/* Adds a new group, returning the index. */
-gint e_shortcut_bar_add_group (EShortcutBar *shortcut_bar,
- const gchar *group_name);
-void e_shortcut_bar_remove_group (EShortcutBar *shortcut_bar,
- gint group_num);
-
-/* Sets the view type for the group. */
-void e_shortcut_bar_set_view_type (EShortcutBar *shortcut_bar,
- gint group_num,
- EIconBarViewType view_type);
+gint e_shortcut_bar_add_group (EShortcutBar *shortcut_bar,
+ const gchar *group_name);
+void e_shortcut_bar_remove_group (EShortcutBar *shortcut_bar,
+ gint group_num);
+
+/* Sets/gets the view type for the group. */
+void e_shortcut_bar_set_view_type (EShortcutBar *shortcut_bar,
+ gint group_num,
+ EIconBarViewType view_type);
+EIconBarViewType e_shortcut_bar_get_view_type (EShortcutBar *shortcut_bar,
+ gint group_num);
/* Adds a new item to a group, returning the index within the group. */
-gint e_shortcut_bar_add_item (EShortcutBar *shortcut_bar,
- gint group_num,
- const gchar *item_url,
- const gchar *item_name);
-
-void e_shortcut_bar_start_editing_item (EShortcutBar *shortcut_bar,
- gint group_num,
- gint item_num);
-void e_shortcut_bar_remove_item (EShortcutBar *shortcut_bar,
- gint group_num,
- gint item_num);
+gint e_shortcut_bar_add_item (EShortcutBar *shortcut_bar,
+ gint group_num,
+ const gchar *item_url,
+ const gchar *item_name);
+
+void e_shortcut_bar_start_editing_item (EShortcutBar *shortcut_bar,
+ gint group_num,
+ gint item_num);
+void e_shortcut_bar_remove_item (EShortcutBar *shortcut_bar,
+ gint group_num,
+ gint item_num);
/* Sets the callback which is called to return the icon to use for a particular
URL. This callback must be set before any items are added. If the callback
returns NULL the default icon is used. */
-void e_shortcut_bar_set_icon_callback (EShortcutBar *shortcut_bar,
- EShortcutBarIconCallback cb,
- gpointer data);
+void e_shortcut_bar_set_icon_callback (EShortcutBar *shortcut_bar,
+ EShortcutBarIconCallback cb,
+ gpointer data);
#ifdef __cplusplus
}