Commit 73683f2ee7f255e05a1cbfd7f2caead606108614

Authored by perry.werneck@gmail.com
1 parent 86d3732f

Melhorando mensagem de erro no processamento do xml, incluindo teste por atributo invalido

src/gtk/actions.c
@@ -270,6 +270,9 @@ static int id_from_array(const gchar *key, const gchar **array, GError **error) @@ -270,6 +270,9 @@ static int id_from_array(const gchar *key, const gchar **array, GError **error)
270 { 270 {
271 int f; 271 int f;
272 272
  273 + if(!key)
  274 + return -1;
  275 +
273 for(f = 0;array[f];f++) 276 for(f = 0;array[f];f++)
274 { 277 {
275 if(!g_strcasecmp(key,array[f])) 278 if(!g_strcasecmp(key,array[f]))
src/gtk/uiparser/parsefile.c
@@ -312,7 +312,7 @@ trace("%s ----",__FUNCTION__); @@ -312,7 +312,7 @@ trace("%s ----",__FUNCTION__);
312 return -1; 312 return -1;
313 } 313 }
314 314
315 - context = g_markup_parse_context_new(&parser,G_MARKUP_TREAT_CDATA_AS_TEXT,info,NULL); 315 + context = g_markup_parse_context_new(&parser,G_MARKUP_TREAT_CDATA_AS_TEXT|G_MARKUP_PREFIX_ERROR_POSITION,info,NULL);
316 316
317 if(!g_markup_parse_context_parse(context,text,strlen(text),&error)) 317 if(!g_markup_parse_context_parse(context,text,strlen(text),&error))
318 { 318 {
ui/00default.xml
@@ -152,9 +152,9 @@ @@ -152,9 +152,9 @@
152 </toolbar> 152 </toolbar>
153 153
154 <popup name='selectionpopup' type='selection'> 154 <popup name='selectionpopup' type='selection'>
155 - <menuitem action='Copy'/>  
156 - <menuitem action='Append'/>  
157 - <menuitem action='Unselect'/> 155 + <menuitem action='copy' mode='begin' />
  156 + <menuitem action='copy' mode='append' />
  157 + <menuitem action='unselect'/>
158 <menuitem action='selectall'/> 158 <menuitem action='selectall'/>
159 159
160 <separator /> 160 <separator />