Mercurial > geeqie
diff src/layout_util.c @ 1469:607c60506863
added a possibility to update existing bars from config
author | nadvornik |
---|---|
date | Fri, 20 Mar 2009 21:28:31 +0000 |
parents | e9f9d3da3f43 |
children | 38925ff71a46 |
line wrap: on
line diff
--- a/src/layout_util.c Fri Mar 20 17:02:00 2009 +0000 +++ b/src/layout_util.c Fri Mar 20 21:28:31 2009 +0000 @@ -1828,6 +1828,9 @@ void layout_toolbar_add(LayoutWindow *lw, const gchar *action) { if (!action || !lw->ui_manager) return; + + if (g_list_find_custom(lw->toolbar_actions, action, (GCompareFunc)strcmp)) return; + gtk_ui_manager_add_ui(lw->ui_manager, lw->toolbar_merge_id, "/ToolBar", action, action, GTK_UI_MANAGER_TOOLITEM, FALSE); lw->toolbar_actions = g_list_append(lw->toolbar_actions, g_strdup(action)); } @@ -1852,6 +1855,7 @@ GList *work = lw->toolbar_actions; WRITE_NL(); WRITE_STRING("<toolbar>"); indent++; + WRITE_NL(); WRITE_STRING("<clear/>"); while (work) { gchar *action = work->data;