Make desktop-entry an attribute rather than a child node

2001-04-27  Bradford Hovinen  <hovinen@ximian.com>

	* capplets/wm-properties/wm-list.c (wm_read_from_xml): Make
	desktop-entry an attribute rather than a child node

	* capplets/*/main.c: Do not try to load preferences from XML if
	there was not XML data
This commit is contained in:
Bradford Hovinen 2001-04-29 16:22:27 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent 78636aecbc
commit fc7487ef4f
16 changed files with 653 additions and 370 deletions

View file

@ -135,28 +135,31 @@ do_set_xml (gboolean apply_settings)
xmlDocPtr doc;
char *buffer = NULL;
int len = 0;
int bytes_read;
int bytes_read = 0;
while (!feof (stdin)) {
if (!len) buffer = g_new (char, 16384);
else buffer = g_renew (char, buffer, len + 16384);
if (!len) buffer = g_new (char, 16385);
else buffer = g_renew (char, buffer, len + 16385);
bytes_read = fread (buffer + len, 1, 16384, stdin);
buffer[len + bytes_read] = '\0';
len += 16384;
}
doc = xmlParseMemory (buffer, strlen (buffer));
if (len > 0 && bytes_read + len - 16384 > 0) {
doc = xmlParseMemory (buffer, strlen (buffer));
prefs = preferences_read_xml (doc);
prefs = preferences_read_xml (doc);
if (prefs) {
preferences_save (prefs);
if (prefs) {
preferences_save (prefs);
if (apply_settings)
preferences_apply_now (prefs);
} else {
g_warning ("Error while reading the screensaver config file");
if (apply_settings)
preferences_apply_now (prefs);
return;
}
}
g_warning ("Error while reading the background config file");
return;
}
static void