From ddf8fccbe9c2afd3c432c06bf2240c398732c279 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 8 Aug 2003 16:21:19 +0000 Subject: Update 2003-08-08 Marco Pesenti Gritti * lib/egg/egg-toolbars-model.c: * lib/egg/egg-toolbars-model.h: Update * src/ephy-toolbars-model.c: (get_toolbar_and_item_pos), (impl_add_item), (ephy_toolbars_model_class_init), (get_toolbar_pos): Do not add duped bookmarks to toolbars --- lib/egg/egg-toolbars-model.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'lib/egg/egg-toolbars-model.c') 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, -- cgit v1.2.3