diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-06-01 08:56:00 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-06-01 08:56:00 +0800 |
commit | a718dec073135b0dac15e0f36e9a7ac6b9b9ddfa (patch) | |
tree | 6372937cce97db28833b55e6ff2a9287a4ad9482 /widgets | |
parent | 19150e7c7b614544188f93dbffd748a2846d2a1b (diff) | |
download | gsoc2013-evolution-a718dec073135b0dac15e0f36e9a7ac6b9b9ddfa.tar.gz gsoc2013-evolution-a718dec073135b0dac15e0f36e9a7ac6b9b9ddfa.tar.zst gsoc2013-evolution-a718dec073135b0dac15e0f36e9a7ac6b9b9ddfa.zip |
Implemented right-click menus for the shell's shortcut bar (the user
can remove shortcuts now) and added status bar to the shell view.
Also, added an API call to EShortcutBar to get the view type for a
specified group.
svn path=/trunk/; revision=3318
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/shortcut-bar/ChangeLog | 4 | ||||
-rw-r--r-- | widgets/shortcut-bar/e-shortcut-bar.c | 17 | ||||
-rw-r--r-- | widgets/shortcut-bar/e-shortcut-bar.h | 52 |
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 } |