~andrewsomething/ubuntu/lucid/metacity/lp-515682

« back to all changes in this revision

Viewing changes to src/ui/theme-parser.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-11-07 23:28:05 UTC
  • mfrom: (1.2.47 upstream)
  • Revision ID: james.westby@ubuntu.com-20081107232805-fucpzd207twf72e6
Tags: 1:2.25.5-0ubuntu1
* New upstream release
  - Build-dep on gnome-doc-utils

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
  STATE_FRAME,
73
73
  /* assigning style sets to windows */
74
74
  STATE_WINDOW,
75
 
  /* and menu icons */
 
75
  /* things we don't use any more but we can still parse: */
76
76
  STATE_MENU_ICON,
77
 
  /* fallback icons */
78
77
  STATE_FALLBACK
79
78
} ParseState;
80
79
 
197
196
                                   gpointer              user_data,
198
197
                                   GError              **error);
199
198
 
 
199
/* Translators: This means that an attribute which should have been found
 
200
 * on an XML element was not in fact found.
 
201
 */
 
202
#define ATTRIBUTE_NOT_FOUND _("No \"%s\" attribute on element <%s>")
 
203
 
200
204
static GMarkupParser metacity_theme_parser = {
201
205
  start_element_handler,
202
206
  end_element_handler,
321
325
{
322
326
  const char  *name;
323
327
  const char **retloc;
 
328
  gboolean required;
324
329
} LocateAttr;
325
330
 
 
331
/* Attribute names can have a leading '!' to indicate that they are
 
332
 * required.
 
333
 */
326
334
static gboolean
327
335
locate_attributes (GMarkupParseContext *context,
328
336
                   const char  *element_name,
347
355
 
348
356
  retval = TRUE;
349
357
 
 
358
  /* FIXME: duplicated code; refactor loop */
350
359
  n_attrs = 1;
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;
354
366
  
355
367
  va_start (args, first_attribute_retloc);
365
377
      
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 */
 
383
 
368
384
      n_attrs += 1;
369
385
      *retloc = NULL;      
370
386
 
390
406
 
391
407
              if (*retloc != NULL)
392
408
                {
 
409
                
393
410
                  set_error (error, context,
394
411
                             G_MARKUP_ERROR,
395
412
                             G_MARKUP_ERROR_PARSE,
408
425
 
409
426
      if (!found)
410
427
        {
 
428
      j = 0;
 
429
      while (j < n_attrs)
 
430
        {
 
431
          g_warning ("It could have been %s.\n", attrs[j++].name);
 
432
        }
 
433
                  
411
434
          set_error (error, context,
412
435
                     G_MARKUP_ERROR,
413
436
                     G_MARKUP_ERROR_PARSE,
420
443
      ++i;
421
444
    }
422
445
 
 
446
    /* Did we catch them all? */
 
447
    i = 0;
 
448
    while (i < n_attrs)
 
449
      {
 
450
        if (attrs[i].required && *(attrs[i].retloc)==NULL)
 
451
          {
 
452
            set_error (error, context,
 
453
                       G_MARKUP_ERROR,
 
454
                       G_MARKUP_ERROR_PARSE,
 
455
                       ATTRIBUTE_NOT_FOUND,
 
456
                       attrs[i].name, element_name);
 
457
            retval = FALSE;
 
458
            goto out;
 
459
          }
 
460
 
 
461
        ++i;
 
462
      }
 
463
 
423
464
 out:
424
465
  return retval;
425
466
}
785
826
      
786
827
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
787
828
                              error,
788
 
                              "name", &name, "value", &value,
 
829
                              "!name", &name, "!value", &value,
789
830
                              NULL))
790
831
        return;
791
832
 
792
 
      if (name == NULL)
793
 
        {
794
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
795
 
                     _("No \"%s\" attribute on <%s> element"),
796
 
                     "name", element_name);
797
 
          return;
798
 
        }
799
 
      
800
 
      if (value == NULL)
801
 
        {
802
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
803
 
                     _("No \"%s\" attribute on <%s> element"),
804
 
                     "value", element_name);
805
 
          return;
806
 
        }
807
 
 
808
833
      if (strchr (value, '.') && parse_double (value, &dval, context, error))
809
834
        {
810
835
          g_clear_error (error);
869
894
 
870
895
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
871
896
                              error,
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,
879
904
                              NULL))
880
905
        return;
881
906
 
882
 
      if (name == NULL)
883
 
        {
884
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
885
 
                     _("No \"%s\" attribute on <%s> element"),
886
 
                     "name", element_name);
887
 
          return;
888
 
        }
889
 
 
890
907
      has_title_val = TRUE;
891
908
      if (has_title && !parse_boolean (has_title, &has_title_val, context, error))
892
909
        return;
972
989
 
973
990
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
974
991
                              error,
975
 
                              "name", &name,
 
992
                              "!name", &name,
976
993
                              NULL))
977
994
        return;
978
995
 
979
 
      if (name == NULL)
980
 
        {
981
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
982
 
                     _("No \"%s\" attribute on <%s> element"),
983
 
                     "name", element_name);
984
 
          return;
985
 
        }
986
 
 
987
996
      if (meta_theme_lookup_draw_op_list (info->theme, name))
988
997
        {
989
998
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1011
1020
 
1012
1021
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1013
1022
                              error,
1014
 
                              "name", &name, "parent", &parent,
 
1023
                              "!name", &name, "parent", &parent,
1015
1024
                              "geometry", &geometry,
1016
1025
                              "background", &background,
1017
1026
                              "alpha", &alpha,
1018
1027
                              NULL))
1019
1028
        return;
1020
1029
 
1021
 
      if (name == NULL)
1022
 
        {
1023
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1024
 
                     _("No \"%s\" attribute on <%s> element"),
1025
 
                     "name", element_name);
1026
 
          return;
1027
 
        }
1028
 
 
1029
1030
      if (meta_theme_lookup_style (info->theme, name))
1030
1031
        {
1031
1032
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1125
1126
 
1126
1127
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1127
1128
                              error,
1128
 
                              "name", &name, "parent", &parent,
 
1129
                              "!name", &name, "parent", &parent,
1129
1130
                              NULL))
1130
1131
        return;
1131
1132
 
1132
 
      if (name == NULL)
1133
 
        {
1134
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1135
 
                     _("No \"%s\" attribute on <%s> element"),
1136
 
                     "name", element_name);
1137
 
          return;
1138
 
        }
1139
 
 
1140
1133
      if (meta_theme_lookup_style_set (info->theme, name))
1141
1134
        {
1142
1135
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1175
1168
 
1176
1169
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1177
1170
                              error,
1178
 
                              "type", &type_name, "style_set", &style_set_name,
 
1171
                              "!type", &type_name, "!style_set", &style_set_name,
1179
1172
                              NULL))
1180
1173
        return;
1181
1174
 
1182
 
      if (type_name == NULL)
1183
 
        {
1184
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1185
 
                     _("No \"%s\" attribute on <%s> element"),
1186
 
                     "type", element_name);
1187
 
          return;
1188
 
        }
1189
 
 
1190
 
      if (style_set_name == NULL)
1191
 
        {
1192
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1193
 
                     _("No \"%s\" attribute on <%s> element"),
1194
 
                     "style_set", element_name);
1195
 
          return;
1196
 
        }
1197
 
 
1198
1175
      type = meta_frame_type_from_string (type_name);
1199
1176
 
1200
1177
      if (type == META_FRAME_TYPE_LAST)
1240
1217
    }
1241
1218
  else if (ELEMENT_IS ("fallback"))
1242
1219
    {
1243
 
      const char *icon = NULL;
1244
 
      const char *mini_icon = NULL;
1245
 
      
1246
 
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1247
 
                              error,
1248
 
                              "icon", &icon,
1249
 
                              "mini_icon", &mini_icon,
1250
 
                              NULL))
1251
 
        return;
1252
 
 
1253
 
      if (icon)
1254
 
        {
1255
 
          if (info->theme->fallback_icon != NULL)
1256
 
            {
1257
 
              set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1258
 
                         _("Theme already has a fallback icon"));
1259
 
              return;
1260
 
            }
1261
 
 
1262
 
          info->theme->fallback_icon = meta_theme_load_image(info->theme, icon, 64, error);
1263
 
        }
1264
 
 
1265
 
      if (mini_icon)
1266
 
        {
1267
 
          if (info->theme->fallback_mini_icon != NULL)
1268
 
            {
1269
 
              set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1270
 
                         _("Theme already has a fallback mini_icon"));
1271
 
              return;
1272
 
            }
1273
 
 
1274
 
          info->theme->fallback_mini_icon = meta_theme_load_image(info->theme, mini_icon, 16, error);
1275
 
        }
1276
 
 
 
1220
      /* Not supported any more, but we have to parse it if they include it,
 
1221
       * for backwards compatibility.
 
1222
       */
1277
1223
      push_state (info, STATE_FALLBACK);
1278
1224
    }
1279
1225
   else
1363
1309
  
1364
1310
  if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1365
1311
                          error,
1366
 
                          "name", &name, "value", &value,
 
1312
                          "!name", &name, "!value", &value,
1367
1313
                          NULL))
1368
1314
    return;
1369
1315
 
1370
 
  if (name == NULL)
1371
 
    {
1372
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1373
 
                 _("No \"name\" attribute on element <%s>"), element_name);
1374
 
      return;
1375
 
    }
1376
 
 
1377
 
  if (value == NULL)
1378
 
    {
1379
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1380
 
                 _("No \"value\" attribute on element <%s>"), element_name);
1381
 
      return;
1382
 
    }
1383
 
 
1384
1316
  val = 0;
1385
1317
  if (!parse_positive_integer (value, &val, context, info->theme, error))
1386
1318
    return;
1450
1382
  
1451
1383
  if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1452
1384
                          error,
1453
 
                          "name", &name, "value", &value,
 
1385
                          "!name", &name, "!value", &value,
1454
1386
                          NULL))
1455
1387
    return;
1456
1388
 
1457
 
  if (name == NULL)
1458
 
    {
1459
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1460
 
                 _("No \"name\" attribute on element <%s>"), element_name);
1461
 
      return;
1462
 
    }
1463
 
 
1464
 
  if (value == NULL)
1465
 
    {
1466
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1467
 
                 _("No \"value\" attribute on element <%s>"), element_name);
1468
 
      return;
1469
 
    }
1470
 
 
1471
1389
  val = 0;
1472
1390
  if (!parse_double (value, &val, context, error))
1473
1391
    return;
1516
1434
  
1517
1435
  if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1518
1436
                          error,
1519
 
                          "name", &name,
1520
 
                          "top", &top,
1521
 
                          "bottom", &bottom,
1522
 
                          "left", &left,
1523
 
                          "right", &right,
 
1437
                          "!name", &name,
 
1438
                          "!top", &top,
 
1439
                          "!bottom", &bottom,
 
1440
                          "!left", &left,
 
1441
                          "!right", &right,
1524
1442
                          NULL))
1525
1443
    return;
1526
1444
  
1527
 
  if (name == NULL)
1528
 
    {
1529
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1530
 
                 _("No \"name\" attribute on element <%s>"), element_name);
1531
 
      return;
1532
 
    }
1533
 
 
1534
 
  if (top == NULL)
1535
 
    {
1536
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1537
 
                 _("No \"top\" attribute on element <%s>"), element_name);
1538
 
      return;
1539
 
    }
1540
 
 
1541
 
  if (bottom == NULL)
1542
 
    {
1543
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1544
 
                 _("No \"bottom\" attribute on element <%s>"), element_name);
1545
 
      return;
1546
 
    }
1547
 
 
1548
 
  if (left == NULL)
1549
 
    {
1550
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1551
 
                 _("No \"left\" attribute on element <%s>"), element_name);
1552
 
      return;
1553
 
    }
1554
 
 
1555
 
  if (right == NULL)
1556
 
    {
1557
 
      set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1558
 
                 _("No \"right\" attribute on element <%s>"), element_name);
1559
 
      return;
1560
 
    }
1561
 
 
1562
1445
  top_val = 0;
1563
1446
  if (!parse_positive_integer (top, &top_val, context, info->theme, error))
1564
1447
    return;
1721
1604
      
1722
1605
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1723
1606
                              error,
1724
 
                              "color", &color,
1725
 
                              "x1", &x1, "y1", &y1,
1726
 
                              "x2", &x2, "y2", &y2,
 
1607
                              "!color", &color,
 
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,
1730
1613
                              NULL))
1731
1614
        return;
1732
1615
 
1733
 
      if (color == NULL)
1734
 
        {
1735
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1736
 
                     _("No \"color\" attribute on element <%s>"), element_name);
1737
 
          return;
1738
 
        }
1739
 
      
1740
 
      if (x1 == NULL)
1741
 
        {
1742
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1743
 
                     _("No \"x1\" attribute on element <%s>"), element_name);
1744
 
          return;
1745
 
        }
1746
 
 
1747
 
      if (y1 == NULL)
1748
 
        {
1749
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1750
 
                     _("No \"y1\" attribute on element <%s>"), element_name);
1751
 
          return;
1752
 
        }
1753
 
 
1754
 
      if (x2 == NULL)
1755
 
        {
1756
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1757
 
                     _("No \"x2\" attribute on element <%s>"), element_name);
1758
 
          return;
1759
 
        }
1760
 
 
1761
 
      if (y2 == NULL)
1762
 
        {
1763
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1764
 
                     _("No \"y2\" attribute on element <%s>"), element_name);
1765
 
          return;
1766
 
        }
1767
 
 
1768
1616
#if 0
1769
1617
      if (!check_expression (x1, FALSE, info->theme, context, error))
1770
1618
        return;
1837
1685
      
1838
1686
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1839
1687
                              error,
1840
 
                              "color", &color,
1841
 
                              "x", &x, "y", &y,
1842
 
                              "width", &width, "height", &height,
 
1688
                              "!color", &color,
 
1689
                              "!x", &x, "!y", &y,
 
1690
                              "!width", &width, "!height", &height,
1843
1691
                              "filled", &filled,
1844
1692
                              NULL))
1845
1693
        return;
1846
1694
 
1847
 
      if (color == NULL)
1848
 
        {
1849
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1850
 
                     _("No \"color\" attribute on element <%s>"), element_name);
1851
 
          return;
1852
 
        }
1853
 
      
1854
 
      if (x == NULL)
1855
 
        {
1856
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1857
 
                     _("No \"x\" attribute on element <%s>"), element_name);
1858
 
          return;
1859
 
        }
1860
 
 
1861
 
      if (y == NULL)
1862
 
        {
1863
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1864
 
                     _("No \"y\" attribute on element <%s>"), element_name);
1865
 
          return;
1866
 
        }
1867
 
 
1868
 
      if (width == NULL)
1869
 
        {
1870
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1871
 
                     _("No \"width\" attribute on element <%s>"), element_name);
1872
 
          return;
1873
 
        }
1874
 
 
1875
 
      if (height == NULL)
1876
 
        {
1877
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1878
 
                     _("No \"height\" attribute on element <%s>"), element_name);
1879
 
          return;
1880
 
        }
1881
 
 
1882
1695
#if 0
1883
1696
      if (!check_expression (x, FALSE, info->theme, context, error))
1884
1697
        return;
1944
1757
      
1945
1758
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
1946
1759
                              error,
1947
 
                              "color", &color,
1948
 
                              "x", &x, "y", &y,
1949
 
                              "width", &width, "height", &height,
 
1760
                              "!color", &color,
 
1761
                              "!x", &x, "!y", &y,
 
1762
                              "!width", &width, "!height", &height,
1950
1763
                              "filled", &filled,
1951
1764
                              "start_angle", &start_angle,
1952
1765
                              "extent_angle", &extent_angle,
1955
1768
                              NULL))
1956
1769
        return;
1957
1770
 
1958
 
      if (color == NULL)
1959
 
        {
1960
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1961
 
                     _("No \"color\" attribute on element <%s>"), element_name);
1962
 
          return;
1963
 
        }
1964
 
      
1965
 
      if (x == NULL)
1966
 
        {
1967
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1968
 
                     _("No \"x\" attribute on element <%s>"), element_name);
1969
 
          return;
1970
 
        }
1971
 
 
1972
 
      if (y == NULL)
1973
 
        {
1974
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1975
 
                     _("No \"y\" attribute on element <%s>"), element_name);
1976
 
          return;
1977
 
        }
1978
 
 
1979
 
      if (width == NULL)
1980
 
        {
1981
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1982
 
                     _("No \"width\" attribute on element <%s>"), element_name);
1983
 
          return;
1984
 
        }
1985
 
 
1986
 
      if (height == NULL)
1987
 
        {
1988
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1989
 
                     _("No \"height\" attribute on element <%s>"), element_name);
1990
 
          return;
1991
 
        }
1992
 
 
1993
1771
      if (META_THEME_ALLOWS (info->theme, META_THEME_DEGREES_IN_ARCS) )
1994
1772
        {
1995
1773
          if (start_angle == NULL && from == NULL)
2011
1789
          if (start_angle == NULL)
2012
1790
            {
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);
2015
1793
              return;
2016
1794
            }
2017
1795
 
2018
1796
          if (extent_angle == NULL)
2019
1797
            {
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);
2022
1800
              return;
2023
1801
            }
2024
1802
        }
2106
1884
      
2107
1885
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2108
1886
                              error,
2109
 
                              "x", &x, "y", &y,
2110
 
                              "width", &width, "height", &height,
 
1887
                              "!x", &x, "!y", &y,
 
1888
                              "!width", &width, "!height", &height,
2111
1889
                              NULL))
2112
1890
        return;
2113
1891
      
2114
 
      if (x == NULL)
2115
 
        {
2116
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2117
 
                     _("No \"x\" attribute on element <%s>"), element_name);
2118
 
          return;
2119
 
        }
2120
 
 
2121
 
      if (y == NULL)
2122
 
        {
2123
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2124
 
                     _("No \"y\" attribute on element <%s>"), element_name);
2125
 
          return;
2126
 
        }
2127
 
 
2128
 
      if (width == NULL)
2129
 
        {
2130
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2131
 
                     _("No \"width\" attribute on element <%s>"), element_name);
2132
 
          return;
2133
 
        }
2134
 
 
2135
 
      if (height == NULL)
2136
 
        {
2137
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2138
 
                     _("No \"height\" attribute on element <%s>"), element_name);
2139
 
          return;
2140
 
        }
2141
 
 
2142
1892
#if 0
2143
1893
      if (!check_expression (x, FALSE, info->theme, context, error))
2144
1894
        return;
2179
1929
      
2180
1930
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2181
1931
                              error,
2182
 
                              "color", &color,
2183
 
                              "x", &x, "y", &y,
2184
 
                              "width", &width, "height", &height,
2185
 
                              "alpha", &alpha,
 
1932
                              "!color", &color,
 
1933
                              "!x", &x, "!y", &y,
 
1934
                              "!width", &width, "!height", &height,
 
1935
                              "!alpha", &alpha,
2186
1936
                              NULL))
2187
1937
        return;
2188
1938
 
2189
 
      if (color == NULL)
2190
 
        {
2191
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2192
 
                     _("No \"color\" attribute on element <%s>"), element_name);
2193
 
          return;
2194
 
        }
2195
 
      
2196
 
      if (x == NULL)
2197
 
        {
2198
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2199
 
                     _("No \"x\" attribute on element <%s>"), element_name);
2200
 
          return;
2201
 
        }
2202
 
 
2203
 
      if (y == NULL)
2204
 
        {
2205
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2206
 
                     _("No \"y\" attribute on element <%s>"), element_name);
2207
 
          return;
2208
 
        }
2209
 
 
2210
 
      if (width == NULL)
2211
 
        {
2212
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2213
 
                     _("No \"width\" attribute on element <%s>"), element_name);
2214
 
          return;
2215
 
        }
2216
 
 
2217
 
      if (height == NULL)
2218
 
        {
2219
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2220
 
                     _("No \"height\" attribute on element <%s>"), element_name);
2221
 
          return;
2222
 
        }
2223
 
 
2224
 
      if (alpha == NULL)
2225
 
        {
2226
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2227
 
                     _("No \"alpha\" attribute on element <%s>"), element_name);
2228
 
          return;
2229
 
        }
2230
1939
#if 0
2231
1940
      if (!check_expression (x, FALSE, info->theme, context, error))
2232
1941
        return;
2286
1995
      
2287
1996
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2288
1997
                              error,
2289
 
                              "type", &type,
2290
 
                              "x", &x, "y", &y,
2291
 
                              "width", &width, "height", &height,
 
1998
                              "!type", &type,
 
1999
                              "!x", &x, "!y", &y,
 
2000
                              "!width", &width, "!height", &height,
2292
2001
                              "alpha", &alpha,
2293
2002
                              NULL))
2294
2003
        return;
2295
2004
 
2296
 
      if (type == NULL)
2297
 
        {
2298
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2299
 
                     _("No \"type\" attribute on element <%s>"), element_name);
2300
 
          return;
2301
 
        }
2302
 
      
2303
 
      if (x == NULL)
2304
 
        {
2305
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2306
 
                     _("No \"x\" attribute on element <%s>"), element_name);
2307
 
          return;
2308
 
        }
2309
 
 
2310
 
      if (y == NULL)
2311
 
        {
2312
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2313
 
                     _("No \"y\" attribute on element <%s>"), element_name);
2314
 
          return;
2315
 
        }
2316
 
 
2317
 
      if (width == NULL)
2318
 
        {
2319
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2320
 
                     _("No \"width\" attribute on element <%s>"), element_name);
2321
 
          return;
2322
 
        }
2323
 
 
2324
 
      if (height == NULL)
2325
 
        {
2326
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2327
 
                     _("No \"height\" attribute on element <%s>"), element_name);
2328
 
          return;
2329
 
        }
2330
 
 
2331
2005
#if 0
2332
2006
      if (!check_expression (x, FALSE, info->theme, context, error))
2333
2007
        return;
2394
2068
      
2395
2069
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2396
2070
                              error,
2397
 
                              "x", &x, "y", &y,
2398
 
                              "width", &width, "height", &height,
2399
 
                              "alpha", &alpha, "filename", &filename,
 
2071
                              "!x", &x, "!y", &y,
 
2072
                              "!width", &width, "!height", &height,
 
2073
                              "alpha", &alpha, "!filename", &filename,
2400
2074
                              "colorize", &colorize,
2401
2075
                              "fill_type", &fill_type,
2402
2076
                              NULL))
2403
2077
        return;
2404
2078
      
2405
 
      if (x == NULL)
2406
 
        {
2407
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2408
 
                     _("No \"x\" attribute on element <%s>"), element_name);
2409
 
          return;
2410
 
        }
2411
 
 
2412
 
      if (y == NULL)
2413
 
        {
2414
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2415
 
                     _("No \"y\" attribute on element <%s>"), element_name);
2416
 
          return;
2417
 
        }
2418
 
 
2419
 
      if (width == NULL)
2420
 
        {
2421
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2422
 
                     _("No \"width\" attribute on element <%s>"), element_name);
2423
 
          return;
2424
 
        }
2425
 
 
2426
 
      if (height == NULL)
2427
 
        {
2428
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2429
 
                     _("No \"height\" attribute on element <%s>"), element_name);
2430
 
          return;
2431
 
        }
2432
 
 
2433
 
      if (filename == NULL)
2434
 
        {
2435
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2436
 
                     _("No \"filename\" attribute on element <%s>"), element_name);
2437
 
          return;
2438
 
        }
2439
2079
#if 0      
2440
2080
      if (!check_expression (x, TRUE, info->theme, context, error))
2441
2081
        return;
2594
2234
      
2595
2235
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2596
2236
                              error,
2597
 
                              "state", &state,
2598
 
                              "shadow", &shadow,
2599
 
                              "arrow", &arrow,
2600
 
                              "x", &x, "y", &y,
2601
 
                              "width", &width, "height", &height,
 
2237
                              "!state", &state,
 
2238
                              "!shadow", &shadow,
 
2239
                              "!arrow", &arrow,
 
2240
                              "!x", &x, "!y", &y,
 
2241
                              "!width", &width, "!height", &height,
2602
2242
                              "filled", &filled,
2603
2243
                              NULL))
2604
2244
        return;
2605
2245
 
2606
 
      if (state == NULL)
2607
 
        {
2608
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2609
 
                     _("No \"state\" attribute on element <%s>"), element_name);
2610
 
          return;
2611
 
        }
2612
 
 
2613
 
      if (shadow == NULL)
2614
 
        {
2615
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2616
 
                     _("No \"shadow\" attribute on element <%s>"), element_name);
2617
 
          return;
2618
 
        }
2619
 
 
2620
 
      if (arrow == NULL)
2621
 
        {
2622
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2623
 
                     _("No \"arrow\" attribute on element <%s>"), element_name);
2624
 
          return;
2625
 
        }
2626
 
      
2627
 
      if (x == NULL)
2628
 
        {
2629
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2630
 
                     _("No \"x\" attribute on element <%s>"), element_name);
2631
 
          return;
2632
 
        }
2633
 
 
2634
 
      if (y == NULL)
2635
 
        {
2636
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2637
 
                     _("No \"y\" attribute on element <%s>"), element_name);
2638
 
          return;
2639
 
        }
2640
 
 
2641
 
      if (width == NULL)
2642
 
        {
2643
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2644
 
                     _("No \"width\" attribute on element <%s>"), element_name);
2645
 
          return;
2646
 
        }
2647
 
 
2648
 
      if (height == NULL)
2649
 
        {
2650
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2651
 
                     _("No \"height\" attribute on element <%s>"), element_name);
2652
 
          return;
2653
 
        }
2654
2246
#if 0
2655
2247
      if (!check_expression (x, FALSE, info->theme, context, error))
2656
2248
        return;
2731
2323
      
2732
2324
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2733
2325
                              error,
2734
 
                              "state", &state,
2735
 
                              "shadow", &shadow,
2736
 
                              "x", &x, "y", &y,
2737
 
                              "width", &width, "height", &height,
 
2326
                              "!state", &state,
 
2327
                              "!shadow", &shadow,
 
2328
                              "!x", &x, "!y", &y,
 
2329
                              "!width", &width, "!height", &height,
2738
2330
                              NULL))
2739
2331
        return;
2740
2332
 
2741
 
      if (state == NULL)
2742
 
        {
2743
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2744
 
                     _("No \"state\" attribute on element <%s>"), element_name);
2745
 
          return;
2746
 
        }
2747
 
 
2748
 
      if (shadow == NULL)
2749
 
        {
2750
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2751
 
                     _("No \"shadow\" attribute on element <%s>"), element_name);
2752
 
          return;
2753
 
        }
2754
 
      
2755
 
      if (x == NULL)
2756
 
        {
2757
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2758
 
                     _("No \"x\" attribute on element <%s>"), element_name);
2759
 
          return;
2760
 
        }
2761
 
 
2762
 
      if (y == NULL)
2763
 
        {
2764
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2765
 
                     _("No \"y\" attribute on element <%s>"), element_name);
2766
 
          return;
2767
 
        }
2768
 
 
2769
 
      if (width == NULL)
2770
 
        {
2771
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2772
 
                     _("No \"width\" attribute on element <%s>"), element_name);
2773
 
          return;
2774
 
        }
2775
 
 
2776
 
      if (height == NULL)
2777
 
        {
2778
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2779
 
                     _("No \"height\" attribute on element <%s>"), element_name);
2780
 
          return;
2781
 
        }
2782
2333
#if 0
2783
2334
      if (!check_expression (x, FALSE, info->theme, context, error))
2784
2335
        return;
2839
2390
      
2840
2391
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2841
2392
                              error,
2842
 
                              "state", &state,
2843
 
                              "x", &x, "y1", &y1, "y2", &y2,
 
2393
                              "!state", &state,
 
2394
                              "!x", &x, "!y1", &y1, "!y2", &y2,
2844
2395
                              NULL))
2845
2396
        return;
2846
2397
 
2847
 
      if (state == NULL)
2848
 
        {
2849
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2850
 
                     _("No \"state\" attribute on element <%s>"), element_name);
2851
 
          return;
2852
 
        }
2853
 
      
2854
 
      if (x == NULL)
2855
 
        {
2856
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2857
 
                     _("No \"x\" attribute on element <%s>"), element_name);
2858
 
          return;
2859
 
        }
2860
 
 
2861
 
      if (y1 == NULL)
2862
 
        {
2863
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2864
 
                     _("No \"y1\" attribute on element <%s>"), element_name);
2865
 
          return;
2866
 
        }
2867
 
 
2868
 
      if (y2 == NULL)
2869
 
        {
2870
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2871
 
                     _("No \"y2\" attribute on element <%s>"), element_name);
2872
 
          return;
2873
 
        }
2874
 
      
2875
2398
#if 0
2876
2399
      if (!check_expression (x, FALSE, info->theme, context, error))
2877
2400
        return;
2921
2444
      
2922
2445
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
2923
2446
                              error,
2924
 
                              "x", &x, "y", &y,
2925
 
                              "width", &width, "height", &height,
 
2447
                              "!x", &x, "!y", &y,
 
2448
                              "!width", &width, "!height", &height,
2926
2449
                              "alpha", &alpha,
2927
2450
                              "fill_type", &fill_type,
2928
2451
                              NULL))
2929
2452
        return;
2930
2453
      
2931
 
      if (x == NULL)
2932
 
        {
2933
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2934
 
                     _("No \"x\" attribute on element <%s>"), element_name);
2935
 
          return;
2936
 
        }
2937
 
 
2938
 
      if (y == NULL)
2939
 
        {
2940
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2941
 
                     _("No \"y\" attribute on element <%s>"), element_name);
2942
 
          return;
2943
 
        }
2944
 
 
2945
 
      if (width == NULL)
2946
 
        {
2947
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2948
 
                     _("No \"width\" attribute on element <%s>"), element_name);
2949
 
          return;
2950
 
        }
2951
 
 
2952
 
      if (height == NULL)
2953
 
        {
2954
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2955
 
                     _("No \"height\" attribute on element <%s>"), element_name);
2956
 
          return;
2957
 
        }
2958
2454
#if 0      
2959
2455
      if (!check_expression (x, FALSE, info->theme, context, error))
2960
2456
        return;
3012
2508
      
3013
2509
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3014
2510
                              error,
3015
 
                              "color", &color,
3016
 
                              "x", &x, "y", &y,
 
2511
                              "!color", &color,
 
2512
                              "!x", &x, "!y", &y,
3017
2513
                              NULL))
3018
2514
        return;
3019
2515
 
3020
 
      if (color == NULL)
3021
 
        {
3022
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3023
 
                     _("No \"color\" attribute on element <%s>"), element_name);
3024
 
          return;
3025
 
        }
3026
 
      
3027
 
      if (x == NULL)
3028
 
        {
3029
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3030
 
                     _("No \"x\" attribute on element <%s>"), element_name);
3031
 
          return;
3032
 
        }
3033
 
 
3034
 
      if (y == NULL)
3035
 
        {
3036
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3037
 
                     _("No \"y\" attribute on element <%s>"), element_name);
3038
 
          return;
3039
 
        }
3040
 
      
3041
2516
#if 0
3042
2517
      if (!check_expression (x, FALSE, info->theme, context, error))
3043
2518
        return;
3083
2558
                              error,
3084
2559
                              "x", &x, "y", &y,
3085
2560
                              "width", &width, "height", &height,
3086
 
                              "name", &name,
 
2561
                              "!name", &name,
3087
2562
                              NULL))
3088
2563
        return;
3089
2564
 
3090
 
      if (name == NULL)
3091
 
        {
3092
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3093
 
                     _("No \"%s\" attribute on <%s> element"), "name", element_name);
3094
 
          return;
3095
 
        }
3096
 
 
3097
2565
      /* x/y/width/height default to 0,0,width,height - should
3098
2566
       * probably do this for all the draw ops
3099
2567
       */
3170
2638
                              error,
3171
2639
                              "x", &x, "y", &y,
3172
2640
                              "width", &width, "height", &height,
3173
 
                              "name", &name,
 
2641
                              "!name", &name,
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,
3178
2646
                              NULL))
3179
2647
        return;
3180
2648
 
3181
 
      if (name == NULL)
3182
 
        {
3183
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3184
 
                     _("No \"%s\" attribute on <%s> element"), "name", element_name);
3185
 
          return;
3186
 
        }
3187
 
 
3188
 
      if (tile_width == NULL)
3189
 
        {
3190
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3191
 
                     _("No \"%s\" attribute on <%s> element"), "tile_width", element_name);
3192
 
          return;
3193
 
        }
3194
 
 
3195
 
      if (tile_height == NULL)
3196
 
        {
3197
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3198
 
                     _("No \"%s\" attribute on <%s> element"), "tile_height", element_name);
3199
 
          return;
3200
 
        }
3201
 
 
3202
2649
      /* These default to 0 */
3203
2650
#if 0
3204
2651
      if (tile_xoffset && !check_expression (tile_xoffset, FALSE, info->theme, context, error))
3304
2751
 
3305
2752
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3306
2753
                              error,
3307
 
                              "value", &value,
 
2754
                              "!value", &value,
3308
2755
                              NULL))
3309
2756
        return;
3310
2757
 
3311
 
      if (value == NULL)
3312
 
        {
3313
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3314
 
                     _("No \"value\" attribute on <%s> element"),
3315
 
                     element_name);
3316
 
          return;
3317
 
        }
3318
 
 
3319
2758
      color_spec = parse_color (info->theme, value, error);
3320
2759
      if (color_spec == NULL)
3321
2760
        {
3360
2799
      
3361
2800
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3362
2801
                              error,
3363
 
                              "position", &position,
 
2802
                              "!position", &position,
3364
2803
                              "draw_ops", &draw_ops,
3365
2804
                              NULL))
3366
2805
        return;
3367
2806
 
3368
 
      if (position == NULL)
3369
 
        {
3370
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3371
 
                     _("No \"position\" attribute on <%s> element"),
3372
 
                     element_name);
3373
 
          return;
3374
 
        }
3375
 
 
3376
2807
      info->piece = meta_frame_piece_from_string (position);
3377
2808
      if (info->piece == META_FRAME_PIECE_LAST)
3378
2809
        {
3421
2852
      
3422
2853
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3423
2854
                              error,
3424
 
                              "function", &function,
3425
 
                              "state", &state,
 
2855
                              "!function", &function,
 
2856
                              "!state", &state,
3426
2857
                              "draw_ops", &draw_ops,
3427
2858
                              NULL))
3428
2859
        return;
3429
2860
 
3430
 
      if (function == NULL)
3431
 
        {
3432
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3433
 
                     _("No \"function\" attribute on <%s> element"),
3434
 
                     element_name);
3435
 
          return;
3436
 
        }
3437
 
 
3438
 
      if (state == NULL)
3439
 
        {
3440
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3441
 
                     _("No \"state\" attribute on <%s> element"),
3442
 
                     element_name);
3443
 
          return;
3444
 
        }
3445
 
      
3446
2861
      info->button_type = meta_button_type_from_string (function, info->theme);
3447
2862
      if (info->button_type == META_BUTTON_TYPE_LAST)
3448
2863
        {
3536
2951
      
3537
2952
      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
3538
2953
                              error,
3539
 
                              "focus", &focus,
3540
 
                              "state", &state,
 
2954
                              "!focus", &focus,
 
2955
                              "!state", &state,
3541
2956
                              "resize", &resize,
3542
 
                              "style", &style,
 
2957
                              "!style", &style,
3543
2958
                              NULL))
3544
2959
        return;
3545
2960
 
3546
 
      if (focus == NULL)
3547
 
        {
3548
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3549
 
                     _("No \"focus\" attribute on <%s> element"),
3550
 
                     element_name);
3551
 
          return;
3552
 
        }
3553
 
 
3554
 
      if (state == NULL)
3555
 
        {
3556
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3557
 
                     _("No \"state\" attribute on <%s> element"),
3558
 
                     element_name);
3559
 
          return;
3560
 
        }
3561
 
      
3562
 
      if (style == NULL)
3563
 
        {
3564
 
          set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3565
 
                     _("No \"style\" attribute on <%s> element"),
3566
 
                     element_name);
3567
 
          return;
3568
 
        }
3569
 
 
3570
2961
      frame_focus = meta_frame_focus_from_string (focus);
3571
2962
      if (frame_focus == META_FRAME_FOCUS_LAST)
3572
2963
        {
3601
2992
          if (resize == NULL)
3602
2993
            {
3603
2994
              set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
3604
 
                         _("No \"resize\" attribute on <%s> element"),
3605
 
                         element_name);
 
2995
                         ATTRIBUTE_NOT_FOUND,
 
2996
                         "resize", element_name);
3606
2997
              return;
3607
2998
            }
3608
2999