Mercurial > geeqie
comparison 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 |
comparison
equal
deleted
inserted
replaced
1468:e9f9d3da3f43 | 1469:607c60506863 |
---|---|
1826 | 1826 |
1827 | 1827 |
1828 void layout_toolbar_add(LayoutWindow *lw, const gchar *action) | 1828 void layout_toolbar_add(LayoutWindow *lw, const gchar *action) |
1829 { | 1829 { |
1830 if (!action || !lw->ui_manager) return; | 1830 if (!action || !lw->ui_manager) return; |
1831 | |
1832 if (g_list_find_custom(lw->toolbar_actions, action, (GCompareFunc)strcmp)) return; | |
1833 | |
1831 gtk_ui_manager_add_ui(lw->ui_manager, lw->toolbar_merge_id, "/ToolBar", action, action, GTK_UI_MANAGER_TOOLITEM, FALSE); | 1834 gtk_ui_manager_add_ui(lw->ui_manager, lw->toolbar_merge_id, "/ToolBar", action, action, GTK_UI_MANAGER_TOOLITEM, FALSE); |
1832 lw->toolbar_actions = g_list_append(lw->toolbar_actions, g_strdup(action)); | 1835 lw->toolbar_actions = g_list_append(lw->toolbar_actions, g_strdup(action)); |
1833 } | 1836 } |
1834 | 1837 |
1835 | 1838 |
1850 void layout_toolbar_write_config(LayoutWindow *lw, GString *outstr, gint indent) | 1853 void layout_toolbar_write_config(LayoutWindow *lw, GString *outstr, gint indent) |
1851 { | 1854 { |
1852 GList *work = lw->toolbar_actions; | 1855 GList *work = lw->toolbar_actions; |
1853 WRITE_NL(); WRITE_STRING("<toolbar>"); | 1856 WRITE_NL(); WRITE_STRING("<toolbar>"); |
1854 indent++; | 1857 indent++; |
1858 WRITE_NL(); WRITE_STRING("<clear/>"); | |
1855 while (work) | 1859 while (work) |
1856 { | 1860 { |
1857 gchar *action = work->data; | 1861 gchar *action = work->data; |
1858 work = work->next; | 1862 work = work->next; |
1859 WRITE_NL(); WRITE_STRING("<toolitem "); | 1863 WRITE_NL(); WRITE_STRING("<toolitem "); |