aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/shortcut-bar/e-shortcut-bar.h
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-07-17 14:22:18 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-07-17 14:22:18 +0800
commit4c3eaff412bf29bf8eb5e5dda2f11a9b24a46abb (patch)
tree0c5573bb616e7dd351bb3ed7f5d441daddfdf381 /widgets/shortcut-bar/e-shortcut-bar.h
parent237f2dc92b27da3e11c2ea4fcea7b45f7196f583 (diff)
downloadgsoc2013-evolution-4c3eaff412bf29bf8eb5e5dda2f11a9b24a46abb.tar
gsoc2013-evolution-4c3eaff412bf29bf8eb5e5dda2f11a9b24a46abb.tar.gz
gsoc2013-evolution-4c3eaff412bf29bf8eb5e5dda2f11a9b24a46abb.tar.bz2
gsoc2013-evolution-4c3eaff412bf29bf8eb5e5dda2f11a9b24a46abb.tar.lz
gsoc2013-evolution-4c3eaff412bf29bf8eb5e5dda2f11a9b24a46abb.tar.xz
gsoc2013-evolution-4c3eaff412bf29bf8eb5e5dda2f11a9b24a46abb.tar.zst
gsoc2013-evolution-4c3eaff412bf29bf8eb5e5dda2f11a9b24a46abb.zip
new files implementing a simple model for the shortcuts, so we can have
2000-07-16 Damon Chaplin <damon@helixcode.com> * e-shortcut-model.[hc]: new files implementing a simple model for the shortcuts, so we can have multiple views. * Makefile.am (libshortcut_bar_a_SOURCES): added e-shortcut-model.[hc] * e-shortcut-bar.[hc]: updated to use the model. * e-icon-bar.c (e_icon_bar_item_pressed): set mouse_over_item_num as well as pressed_item_num to fix bug. svn path=/trunk/; revision=4186
Diffstat (limited to 'widgets/shortcut-bar/e-shortcut-bar.h')
-rw-r--r--widgets/shortcut-bar/e-shortcut-bar.h32
1 files changed, 7 insertions, 25 deletions
diff --git a/widgets/shortcut-bar/e-shortcut-bar.h b/widgets/shortcut-bar/e-shortcut-bar.h
index 8d151b0a4e..573303d290 100644
--- a/widgets/shortcut-bar/e-shortcut-bar.h
+++ b/widgets/shortcut-bar/e-shortcut-bar.h
@@ -26,6 +26,7 @@
#include "e-group-bar.h"
#include "e-icon-bar.h"
+#include "e-shortcut-model.h"
#ifdef __cplusplus
extern "C" {
@@ -58,7 +59,6 @@ struct _EShortcutBarGroup
#define E_TYPE_SHORTCUT_BAR (e_shortcut_bar_get_type ())
-#define SHORTCUT_BAR(obj) GTK_CHECK_CAST (obj, e_shortcut_bar_get_type (), EShortcutBar)
#define E_SHORTCUT_BAR(obj) GTK_CHECK_CAST (obj, e_shortcut_bar_get_type (), EShortcutBar)
#define E_SHORTCUT_BAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_shortcut_bar_get_type (), EShortcutBarClass)
#define E_IS_SHORTCUT_BAR(obj) GTK_CHECK_TYPE (obj, e_shortcut_bar_get_type ())
@@ -68,6 +68,9 @@ struct _EShortcutBar
{
EGroupBar group_bar;
+ /* This is the underlying model. */
+ EShortcutModel *model;
+
/* This is an array of EShortcutBarGroup elements. */
GArray *groups;
@@ -90,27 +93,15 @@ struct _EShortcutBarClass
GdkEvent *event,
gint group_num,
gint item_num);
- void (*added_item) (EShortcutBar *shortcut_bar,
- gint group_num,
- gint item_num);
- void (*removed_item) (EShortcutBar *shortcut_bar,
- gint group_num,
- gint item_num);
- void (*added_group) (EShortcutBar *shortcut_bar,
- gint group_num);
- void (*removed_group) (EShortcutBar *shortcut_bar,
- gint group_num);
};
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 underlying model. */
+void e_shortcut_bar_set_model (EShortcutBar *shortcut_bar,
+ EShortcutModel *shortcut_model);
/* Sets/gets the view type for the group. */
void e_shortcut_bar_set_view_type (EShortcutBar *shortcut_bar,
@@ -119,18 +110,9 @@ void e_shortcut_bar_set_view_type (EShortcutBar *shortcut_bar
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);
/* 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