aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-09 03:44:22 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-09 03:44:22 +0800
commitbf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d (patch)
tree5183e93fad2ca5634034d844c858c40439c9cd69 /lib
parent20dd70b526a557dccd623f9a1c0b05720317e9f7 (diff)
downloadgsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar
gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.gz
gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.bz2
gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.lz
gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.xz
gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.zst
gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.zip
Update.
2003-04-08 Marco Pesenti Gritti <marco@it.gnome.org> * lib/egg/egg-toolbars-group.c: * lib/egg/egg-toolbars-group.h: Update. * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_class_init), (bookmarks_removed_cb), (topics_removed_cb), (ephy_bookmarks_init): * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_response_cb): * src/popup-commands.c: (popup_cmd_bookmark_link): * src/toolbar.c: (toolbar_get_action_name), (toolbar_get_action), (topic_remove_cb), (bookmark_remove_cb), (toolbar_init): * src/window-commands.c: (window_cmd_file_bookmark_page): Update toolbars when bookmarks and topics are removed. Use dialog_run for new_bookmark dialog. (Dave I hope this doesnt break something, but it's necessary to url dnd to toolbars to work correctly)
Diffstat (limited to 'lib')
-rwxr-xr-xlib/egg/egg-toolbars-group.c25
-rwxr-xr-xlib/egg/egg-toolbars-group.h4
2 files changed, 29 insertions, 0 deletions
diff --git a/lib/egg/egg-toolbars-group.c b/lib/egg/egg-toolbars-group.c
index c99f0cd06..975456b8e 100755
--- a/lib/egg/egg-toolbars-group.c
+++ b/lib/egg/egg-toolbars-group.c
@@ -465,6 +465,31 @@ egg_toolbars_group_new (void)
return t;
}
+static void
+remove_action (EggToolbarsItem *item,
+ gpointer *data)
+{
+ char *action = data[0];
+ EggToolbarsGroup *group = EGG_TOOLBARS_GROUP (data[1]);
+
+ if (strcmp (item->action, action) == 0)
+ {
+ egg_toolbars_group_remove_item (group, item);
+ }
+}
+
+void
+egg_toolbars_group_remove_action (EggToolbarsGroup *group,
+ const char *action)
+{
+ gpointer data[2];
+ data[0] = (char *)action;
+ data[1] = group;
+ egg_toolbars_group_foreach_item
+ (group, (EggToolbarsGroupForeachItemFunc) remove_action, data);
+ g_signal_emit (G_OBJECT (group), egg_toolbars_group_signals[CHANGED], 0);
+}
+
void
egg_toolbars_group_remove_toolbar (EggToolbarsGroup *t,
EggToolbarsToolbar *toolbar)
diff --git a/lib/egg/egg-toolbars-group.h b/lib/egg/egg-toolbars-group.h
index 7e278dcf3..ec4163281 100755
--- a/lib/egg/egg-toolbars-group.h
+++ b/lib/egg/egg-toolbars-group.h
@@ -73,6 +73,10 @@ EggToolbarsGroup *egg_toolbars_group_new (void);
void egg_toolbars_group_set_source (EggToolbarsGroup *group,
const char *defaults,
const char *user);
+void egg_toolbars_group_remove_action (EggToolbarsGroup *group,
+ const char *action);
+
+/* These should be used only by editable toolbar */
EggToolbarsToolbar *egg_toolbars_group_add_toolbar (EggToolbarsGroup *t);
void egg_toolbars_group_add_item (EggToolbarsGroup *t,
EggToolbarsToolbar *parent,