358
/* FIXME: duplicated code; refactor loop */
351
360
attrs[0].name = first_attribute_name;
352
361
attrs[0].retloc = first_attribute_retloc;
362
attrs[0].required = attrs[0].name[0]=='!';
363
if (attrs[0].required)
364
attrs[0].name++; /* skip past it */
353
365
*first_attribute_retloc = NULL;
355
367
va_start (args, first_attribute_retloc);
366
378
attrs[n_attrs].name = name;
367
379
attrs[n_attrs].retloc = retloc;
380
attrs[n_attrs].required = attrs[n_attrs].name[0]=='!';
381
if (attrs[n_attrs].required)
382
attrs[n_attrs].name++; /* skip past it */
446
/* Did we catch them all? */
450
if (attrs[i].required && *(attrs[i].retloc)==NULL)
452
set_error (error, context,
454
G_MARKUP_ERROR_PARSE,
456
attrs[i].name, element_name);
786
827
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
788
"name", &name, "value", &value,
829
"!name", &name, "!value", &value,
794
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
795
_("No \"%s\" attribute on <%s> element"),
796
"name", element_name);
802
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
803
_("No \"%s\" attribute on <%s> element"),
804
"value", element_name);
808
833
if (strchr (value, '.') && parse_double (value, &dval, context, error))
810
835
g_clear_error (error);
870
895
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
872
"name", &name, "parent", &parent,
897
"!name", &name, "parent", &parent,
873
898
"has_title", &has_title, "title_scale", &title_scale,
874
899
"rounded_top_left", &rounded_top_left,
875
900
"rounded_top_right", &rounded_top_right,
884
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
885
_("No \"%s\" attribute on <%s> element"),
886
"name", element_name);
890
907
has_title_val = TRUE;
891
908
if (has_title && !parse_boolean (has_title, &has_title_val, context, error))
973
990
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
981
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
982
_("No \"%s\" attribute on <%s> element"),
983
"name", element_name);
987
996
if (meta_theme_lookup_draw_op_list (info->theme, name))
989
998
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1012
1021
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1014
"name", &name, "parent", &parent,
1023
"!name", &name, "parent", &parent,
1015
1024
"geometry", &geometry,
1016
1025
"background", &background,
1017
1026
"alpha", &alpha,
1023
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1024
_("No \"%s\" attribute on <%s> element"),
1025
"name", element_name);
1029
1030
if (meta_theme_lookup_style (info->theme, name))
1031
1032
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1126
1127
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1128
"name", &name, "parent", &parent,
1129
"!name", &name, "parent", &parent,
1134
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1135
_("No \"%s\" attribute on <%s> element"),
1136
"name", element_name);
1140
1133
if (meta_theme_lookup_style_set (info->theme, name))
1142
1135
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1176
1169
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1178
"type", &type_name, "style_set", &style_set_name,
1171
"!type", &type_name, "!style_set", &style_set_name,
1182
if (type_name == NULL)
1184
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1185
_("No \"%s\" attribute on <%s> element"),
1186
"type", element_name);
1190
if (style_set_name == NULL)
1192
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1193
_("No \"%s\" attribute on <%s> element"),
1194
"style_set", element_name);
1198
1175
type = meta_frame_type_from_string (type_name);
1200
1177
if (type == META_FRAME_TYPE_LAST)
1241
1218
else if (ELEMENT_IS ("fallback"))
1243
const char *icon = NULL;
1244
const char *mini_icon = NULL;
1246
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1249
"mini_icon", &mini_icon,
1255
if (info->theme->fallback_icon != NULL)
1257
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1258
_("Theme already has a fallback icon"));
1262
info->theme->fallback_icon = meta_theme_load_image(info->theme, icon, 64, error);
1267
if (info->theme->fallback_mini_icon != NULL)
1269
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1270
_("Theme already has a fallback mini_icon"));
1274
info->theme->fallback_mini_icon = meta_theme_load_image(info->theme, mini_icon, 16, error);
1220
/* Not supported any more, but we have to parse it if they include it,
1221
* for backwards compatibility.
1277
1223
push_state (info, STATE_FALLBACK);
1364
1310
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1366
"name", &name, "value", &value,
1312
"!name", &name, "!value", &value,
1372
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1373
_("No \"name\" attribute on element <%s>"), element_name);
1379
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1380
_("No \"value\" attribute on element <%s>"), element_name);
1385
1317
if (!parse_positive_integer (value, &val, context, info->theme, error))
1451
1383
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1453
"name", &name, "value", &value,
1385
"!name", &name, "!value", &value,
1459
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1460
_("No \"name\" attribute on element <%s>"), element_name);
1466
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1467
_("No \"value\" attribute on element <%s>"), element_name);
1472
1390
if (!parse_double (value, &val, context, error))
1517
1435
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1529
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1530
_("No \"name\" attribute on element <%s>"), element_name);
1536
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1537
_("No \"top\" attribute on element <%s>"), element_name);
1543
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1544
_("No \"bottom\" attribute on element <%s>"), element_name);
1550
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1551
_("No \"left\" attribute on element <%s>"), element_name);
1557
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1558
_("No \"right\" attribute on element <%s>"), element_name);
1563
1446
if (!parse_positive_integer (top, &top_val, context, info->theme, error))
1722
1605
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1725
"x1", &x1, "y1", &y1,
1726
"x2", &x2, "y2", &y2,
1608
"!x1", &x1, "!y1", &y1,
1609
"!x2", &x2, "!y2", &y2,
1727
1610
"dash_on_length", &dash_on_length,
1728
1611
"dash_off_length", &dash_off_length,
1729
1612
"width", &width,
1735
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1736
_("No \"color\" attribute on element <%s>"), element_name);
1742
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1743
_("No \"x1\" attribute on element <%s>"), element_name);
1749
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1750
_("No \"y1\" attribute on element <%s>"), element_name);
1756
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1757
_("No \"x2\" attribute on element <%s>"), element_name);
1763
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1764
_("No \"y2\" attribute on element <%s>"), element_name);
1769
1617
if (!check_expression (x1, FALSE, info->theme, context, error))
1838
1686
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1842
"width", &width, "height", &height,
1690
"!width", &width, "!height", &height,
1843
1691
"filled", &filled,
1849
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1850
_("No \"color\" attribute on element <%s>"), element_name);
1856
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1857
_("No \"x\" attribute on element <%s>"), element_name);
1863
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1864
_("No \"y\" attribute on element <%s>"), element_name);
1870
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1871
_("No \"width\" attribute on element <%s>"), element_name);
1877
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1878
_("No \"height\" attribute on element <%s>"), element_name);
1883
1696
if (!check_expression (x, FALSE, info->theme, context, error))
1945
1758
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1949
"width", &width, "height", &height,
1762
"!width", &width, "!height", &height,
1950
1763
"filled", &filled,
1951
1764
"start_angle", &start_angle,
1952
1765
"extent_angle", &extent_angle,
1960
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1961
_("No \"color\" attribute on element <%s>"), element_name);
1967
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1968
_("No \"x\" attribute on element <%s>"), element_name);
1974
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1975
_("No \"y\" attribute on element <%s>"), element_name);
1981
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1982
_("No \"width\" attribute on element <%s>"), element_name);
1988
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1989
_("No \"height\" attribute on element <%s>"), element_name);
1993
1771
if (META_THEME_ALLOWS (info->theme, META_THEME_DEGREES_IN_ARCS) )
1995
1773
if (start_angle == NULL && from == NULL)
2011
1789
if (start_angle == NULL)
2013
1791
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2014
_("No \"start_angle\" attribute on element <%s>"), element_name);
1792
ATTRIBUTE_NOT_FOUND, "start_angle", element_name);
2018
1796
if (extent_angle == NULL)
2020
1798
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2021
_("No \"extent_angle\" attribute on element <%s>"), element_name);
1799
ATTRIBUTE_NOT_FOUND, "extent_angle", element_name);
2107
1885
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2110
"width", &width, "height", &height,
1888
"!width", &width, "!height", &height,
2116
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2117
_("No \"x\" attribute on element <%s>"), element_name);
2123
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2124
_("No \"y\" attribute on element <%s>"), element_name);
2130
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2131
_("No \"width\" attribute on element <%s>"), element_name);
2137
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2138
_("No \"height\" attribute on element <%s>"), element_name);
2143
1893
if (!check_expression (x, FALSE, info->theme, context, error))
2180
1930
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2184
"width", &width, "height", &height,
1934
"!width", &width, "!height", &height,
2191
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2192
_("No \"color\" attribute on element <%s>"), element_name);
2198
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2199
_("No \"x\" attribute on element <%s>"), element_name);
2205
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2206
_("No \"y\" attribute on element <%s>"), element_name);
2212
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2213
_("No \"width\" attribute on element <%s>"), element_name);
2219
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2220
_("No \"height\" attribute on element <%s>"), element_name);
2226
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2227
_("No \"alpha\" attribute on element <%s>"), element_name);
2231
1940
if (!check_expression (x, FALSE, info->theme, context, error))
2287
1996
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2291
"width", &width, "height", &height,
2000
"!width", &width, "!height", &height,
2292
2001
"alpha", &alpha,
2298
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2299
_("No \"type\" attribute on element <%s>"), element_name);
2305
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2306
_("No \"x\" attribute on element <%s>"), element_name);
2312
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2313
_("No \"y\" attribute on element <%s>"), element_name);
2319
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2320
_("No \"width\" attribute on element <%s>"), element_name);
2326
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2327
_("No \"height\" attribute on element <%s>"), element_name);
2332
2006
if (!check_expression (x, FALSE, info->theme, context, error))
2395
2069
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2398
"width", &width, "height", &height,
2399
"alpha", &alpha, "filename", &filename,
2072
"!width", &width, "!height", &height,
2073
"alpha", &alpha, "!filename", &filename,
2400
2074
"colorize", &colorize,
2401
2075
"fill_type", &fill_type,
2407
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2408
_("No \"x\" attribute on element <%s>"), element_name);
2414
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2415
_("No \"y\" attribute on element <%s>"), element_name);
2421
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2422
_("No \"width\" attribute on element <%s>"), element_name);
2428
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2429
_("No \"height\" attribute on element <%s>"), element_name);
2433
if (filename == NULL)
2435
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2436
_("No \"filename\" attribute on element <%s>"), element_name);
2440
2080
if (!check_expression (x, TRUE, info->theme, context, error))
2595
2235
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2601
"width", &width, "height", &height,
2241
"!width", &width, "!height", &height,
2602
2242
"filled", &filled,
2608
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2609
_("No \"state\" attribute on element <%s>"), element_name);
2615
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2616
_("No \"shadow\" attribute on element <%s>"), element_name);
2622
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2623
_("No \"arrow\" attribute on element <%s>"), element_name);
2629
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2630
_("No \"x\" attribute on element <%s>"), element_name);
2636
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2637
_("No \"y\" attribute on element <%s>"), element_name);
2643
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2644
_("No \"width\" attribute on element <%s>"), element_name);
2650
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2651
_("No \"height\" attribute on element <%s>"), element_name);
2655
2247
if (!check_expression (x, FALSE, info->theme, context, error))
2732
2324
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2737
"width", &width, "height", &height,
2329
"!width", &width, "!height", &height,
2743
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2744
_("No \"state\" attribute on element <%s>"), element_name);
2750
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2751
_("No \"shadow\" attribute on element <%s>"), element_name);
2757
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2758
_("No \"x\" attribute on element <%s>"), element_name);
2764
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2765
_("No \"y\" attribute on element <%s>"), element_name);
2771
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2772
_("No \"width\" attribute on element <%s>"), element_name);
2778
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2779
_("No \"height\" attribute on element <%s>"), element_name);
2783
2334
if (!check_expression (x, FALSE, info->theme, context, error))
2840
2391
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2843
"x", &x, "y1", &y1, "y2", &y2,
2394
"!x", &x, "!y1", &y1, "!y2", &y2,
2849
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2850
_("No \"state\" attribute on element <%s>"), element_name);
2856
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2857
_("No \"x\" attribute on element <%s>"), element_name);
2863
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2864
_("No \"y1\" attribute on element <%s>"), element_name);
2870
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2871
_("No \"y2\" attribute on element <%s>"), element_name);
2876
2399
if (!check_expression (x, FALSE, info->theme, context, error))
2922
2445
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2925
"width", &width, "height", &height,
2448
"!width", &width, "!height", &height,
2926
2449
"alpha", &alpha,
2927
2450
"fill_type", &fill_type,
2933
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2934
_("No \"x\" attribute on element <%s>"), element_name);
2940
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2941
_("No \"y\" attribute on element <%s>"), element_name);
2947
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2948
_("No \"width\" attribute on element <%s>"), element_name);
2954
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2955
_("No \"height\" attribute on element <%s>"), element_name);
2959
2455
if (!check_expression (x, FALSE, info->theme, context, error))
3013
2509
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3022
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3023
_("No \"color\" attribute on element <%s>"), element_name);
3029
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3030
_("No \"x\" attribute on element <%s>"), element_name);
3036
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3037
_("No \"y\" attribute on element <%s>"), element_name);
3042
2517
if (!check_expression (x, FALSE, info->theme, context, error))
3084
2559
"x", &x, "y", &y,
3085
2560
"width", &width, "height", &height,
3092
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3093
_("No \"%s\" attribute on <%s> element"), "name", element_name);
3097
2565
/* x/y/width/height default to 0,0,width,height - should
3098
2566
* probably do this for all the draw ops
3171
2639
"x", &x, "y", &y,
3172
2640
"width", &width, "height", &height,
3174
2642
"tile_xoffset", &tile_xoffset,
3175
2643
"tile_yoffset", &tile_yoffset,
3176
"tile_width", &tile_width,
3177
"tile_height", &tile_height,
2644
"!tile_width", &tile_width,
2645
"!tile_height", &tile_height,
3183
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3184
_("No \"%s\" attribute on <%s> element"), "name", element_name);
3188
if (tile_width == NULL)
3190
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3191
_("No \"%s\" attribute on <%s> element"), "tile_width", element_name);
3195
if (tile_height == NULL)
3197
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3198
_("No \"%s\" attribute on <%s> element"), "tile_height", element_name);
3202
2649
/* These default to 0 */
3204
2651
if (tile_xoffset && !check_expression (tile_xoffset, FALSE, info->theme, context, error))
3305
2752
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3313
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3314
_("No \"value\" attribute on <%s> element"),
3319
2758
color_spec = parse_color (info->theme, value, error);
3320
2759
if (color_spec == NULL)
3361
2800
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3363
"position", &position,
2802
"!position", &position,
3364
2803
"draw_ops", &draw_ops,
3368
if (position == NULL)
3370
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3371
_("No \"position\" attribute on <%s> element"),
3376
2807
info->piece = meta_frame_piece_from_string (position);
3377
2808
if (info->piece == META_FRAME_PIECE_LAST)
3422
2853
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3424
"function", &function,
2855
"!function", &function,
3426
2857
"draw_ops", &draw_ops,
3430
if (function == NULL)
3432
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3433
_("No \"function\" attribute on <%s> element"),
3440
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3441
_("No \"state\" attribute on <%s> element"),
3446
2861
info->button_type = meta_button_type_from_string (function, info->theme);
3447
2862
if (info->button_type == META_BUTTON_TYPE_LAST)
3537
2952
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3541
2956
"resize", &resize,
3548
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3549
_("No \"focus\" attribute on <%s> element"),
3556
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3557
_("No \"state\" attribute on <%s> element"),
3564
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3565
_("No \"style\" attribute on <%s> element"),
3570
2961
frame_focus = meta_frame_focus_from_string (focus);
3571
2962
if (frame_focus == META_FRAME_FOCUS_LAST)