Jacob the all-knowing all-seeing eye found a bug which Ian and Arik (masters of all things gdb) scorched...
fixed recreate desktop icons in gdesktop-init.c:(desktop_load_init_from)
Этот коммит содержится в:
родитель
de25393f02
Коммит
98a682d32f
@ -1,3 +1,8 @@
|
||||
2000-05-24 Arik Devens <arik@helixcode.com> and Ian Peters <itp@helixcode.com>
|
||||
|
||||
* gdesktop-init.c (desktop_load_init_from): don't crash on
|
||||
recreating icons, iterating over NULL pointer.
|
||||
|
||||
2000-05-15 Andrew Post <apost@cbmi.upmc.edu>
|
||||
|
||||
* gdesktop.c (get_icon_snap_pos): Icons no longer count themselves
|
||||
|
@ -19,22 +19,22 @@
|
||||
static void
|
||||
desktop_load_init_from (const char *file)
|
||||
{
|
||||
char *key;
|
||||
char *file_and_section;
|
||||
char *title, *type;
|
||||
|
||||
void *iterator_handle;
|
||||
char *config_path = g_strconcat ("=", file, "=", NULL);
|
||||
|
||||
iterator_handle = gnome_config_init_iterator_sections (config_path);
|
||||
|
||||
iterator_handle = gnome_config_iterator_next (
|
||||
iterator_handle, &key, NULL);
|
||||
|
||||
do {
|
||||
char *key;
|
||||
char *file_and_section;
|
||||
char *title, *type;
|
||||
|
||||
/* Get next section name */
|
||||
iterator_handle = gnome_config_iterator_next (
|
||||
iterator_handle, &key, NULL);
|
||||
|
||||
/* Now access the values in the section */
|
||||
file_and_section = g_strconcat (config_path, "/", key, "/", NULL);
|
||||
|
||||
gnome_config_push_prefix (file_and_section);
|
||||
title = gnome_config_get_translated_string ("title=None");
|
||||
type = gnome_config_get_string ("type=url");
|
||||
@ -71,6 +71,11 @@ desktop_load_init_from (const char *file)
|
||||
g_free (title);
|
||||
g_free (file_and_section);
|
||||
gnome_config_pop_prefix ();
|
||||
|
||||
/* Get next section name */
|
||||
iterator_handle = gnome_config_iterator_next (
|
||||
iterator_handle, &key, NULL);
|
||||
|
||||
} while (iterator_handle);
|
||||
|
||||
g_free (config_path);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user