Mercurial > geeqie.yaz
comparison src/rcfile.c @ 1335:588d96cda850
save and restore toolbar configuration
author | nadvornik |
---|---|
date | Sat, 28 Feb 2009 12:50:39 +0000 |
parents | 1fc356f629fe |
children | 4179d41d1149 |
comparison
equal
deleted
inserted
replaced
1334:f97450e632a1 | 1335:588d96cda850 |
---|---|
885 DEBUG_1("unexpected in <bar>: <%s>", element_name); | 885 DEBUG_1("unexpected in <bar>: <%s>", element_name); |
886 options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL); | 886 options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL); |
887 } | 887 } |
888 } | 888 } |
889 | 889 |
890 static void options_parse_toolbar(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error) | |
891 { | |
892 LayoutWindow *lw = data; | |
893 if (g_ascii_strcasecmp(element_name, "toolitem") == 0) | |
894 { | |
895 layout_toolbar_add_from_config(lw, attribute_names, attribute_values); | |
896 options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL); | |
897 } | |
898 else | |
899 { | |
900 DEBUG_1("unexpected in <toolbar>: <%s>", element_name); | |
901 options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL); | |
902 } | |
903 } | |
904 | |
890 static void options_parse_layout(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error) | 905 static void options_parse_layout(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error) |
891 { | 906 { |
892 LayoutWindow *lw = data; | 907 LayoutWindow *lw = data; |
893 if (g_ascii_strcasecmp(element_name, "bar") == 0) | 908 if (g_ascii_strcasecmp(element_name, "bar") == 0) |
894 { | 909 { |
899 else if (g_ascii_strcasecmp(element_name, "bar_sort") == 0) | 914 else if (g_ascii_strcasecmp(element_name, "bar_sort") == 0) |
900 { | 915 { |
901 GtkWidget *bar = bar_sort_new_from_config(lw, attribute_names, attribute_values); | 916 GtkWidget *bar = bar_sort_new_from_config(lw, attribute_names, attribute_values); |
902 layout_bar_sort_set(lw, bar); | 917 layout_bar_sort_set(lw, bar); |
903 options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL); | 918 options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL); |
919 } | |
920 else if (g_ascii_strcasecmp(element_name, "toolbar") == 0) | |
921 { | |
922 layout_toolbar_clear(lw); | |
923 options_parse_func_push(parser_data, options_parse_toolbar, NULL, lw); | |
904 } | 924 } |
905 else | 925 else |
906 { | 926 { |
907 DEBUG_1("unexpected in <layout>: <%s>", element_name); | 927 DEBUG_1("unexpected in <layout>: <%s>", element_name); |
908 options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL); | 928 options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL); |