aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/egg/egg-toolbars-model.c26
-rwxr-xr-xlib/egg/egg-toolbars-model.h7
2 files changed, 26 insertions, 7 deletions
diff --git a/lib/egg/egg-toolbars-model.c b/lib/egg/egg-toolbars-model.c
index 2166ede5f..436f018d7 100755
--- a/lib/egg/egg-toolbars-model.c
+++ b/lib/egg/egg-toolbars-model.c
@@ -313,12 +313,12 @@ egg_toolbars_model_add_separator (EggToolbarsModel *t,
toolbar_position, real_position);
}
-void
-egg_toolbars_model_add_item (EggToolbarsModel *t,
- int toolbar_position,
- int position,
- const char *id,
- const char *type)
+gboolean
+impl_add_item (EggToolbarsModel *t,
+ int toolbar_position,
+ int position,
+ const char *id,
+ const char *type)
{
GNode *parent_node;
GNode *node;
@@ -338,6 +338,8 @@ egg_toolbars_model_add_item (EggToolbarsModel *t,
g_signal_emit (G_OBJECT (t), egg_toolbars_model_signals[ITEM_ADDED], 0,
toolbar_position, real_position);
+
+ return TRUE;
}
static void
@@ -485,6 +487,7 @@ egg_toolbars_model_class_init (EggToolbarsModelClass *klass)
object_class->finalize = egg_toolbars_model_finalize;
+ klass->add_item = impl_add_item;
klass->get_item_id = impl_get_item_id;
klass->get_item_name = impl_get_item_name;
klass->get_item_type = impl_get_item_type;
@@ -664,6 +667,17 @@ egg_toolbars_model_toolbar_nth (EggToolbarsModel *t,
return tdata->name;
}
+gboolean
+egg_toolbars_model_add_item (EggToolbarsModel *t,
+ int toolbar_position,
+ int position,
+ const char *id,
+ const char *type)
+{
+ EggToolbarsModelClass *klass = EGG_TOOLBARS_MODEL_GET_CLASS (t);
+ return klass->add_item (t, toolbar_position, position, id, type);
+}
+
char *
egg_toolbars_model_get_item_id (EggToolbarsModel *t,
const char *type,
diff --git a/lib/egg/egg-toolbars-model.h b/lib/egg/egg-toolbars-model.h
index 5de72fbcb..baf4b6ac6 100755
--- a/lib/egg/egg-toolbars-model.h
+++ b/lib/egg/egg-toolbars-model.h
@@ -70,6 +70,11 @@ struct EggToolbarsModelClass
int position);
/* Virtual Table */
+ gboolean (* add_item) (EggToolbarsModel *t,
+ int toolbar_position,
+ int position,
+ const char *id,
+ const char *type);
char * (* get_item_type) (EggToolbarsModel *t,
GdkAtom dnd_type);
char * (* get_item_id) (EggToolbarsModel *t,
@@ -106,7 +111,7 @@ char *egg_toolbars_model_get_item_id (EggToolbarsModel *t,
char *egg_toolbars_model_get_item_name (EggToolbarsModel *t,
const char *type,
const char *id);
-void egg_toolbars_model_add_item (EggToolbarsModel *t,
+gboolean egg_toolbars_model_add_item (EggToolbarsModel *t,
int toolbar_position,
int position,
const char *id,