patch by Thomas Cataldo <thomas.cataldo@aliacom.fr> to fix a bunch of
2004-10-21 Sebastien Bacher <seb128@debian.org> * gnome-settings-default-editor.c: (vfs_change_cb): * gnome-settings-font.c: (load_cursor): * gnome-settings-gtk1theme.c: (apply_settings): * gnome-settings-keyboard.c: (apply_settings): * gnome-settings-multimedia-keys.c: (init_kbd): * gnome-settings-xsettings.c: (gnome_settings_xsettings_load): patch by Thomas Cataldo <thomas.cataldo@aliacom.fr> to fix a bunch of memory leaks (Closes: #150145).
This commit is contained in:
parent
6f620d298d
commit
ad0968036a
7 changed files with 47 additions and 10 deletions
|
@ -1,3 +1,14 @@
|
||||||
|
2004-10-21 Sebastien Bacher <seb128@debian.org>
|
||||||
|
|
||||||
|
* gnome-settings-default-editor.c: (vfs_change_cb):
|
||||||
|
* gnome-settings-font.c: (load_cursor):
|
||||||
|
* gnome-settings-gtk1theme.c: (apply_settings):
|
||||||
|
* gnome-settings-keyboard.c: (apply_settings):
|
||||||
|
* gnome-settings-multimedia-keys.c: (init_kbd):
|
||||||
|
* gnome-settings-xsettings.c: (gnome_settings_xsettings_load):
|
||||||
|
patch by Thomas Cataldo <thomas.cataldo@aliacom.fr> to fix a bunch of
|
||||||
|
memory leaks (Closes: #150145).
|
||||||
|
|
||||||
2004-10-14 Jody Goldberg <jody@gnome.org>
|
2004-10-14 Jody Goldberg <jody@gnome.org>
|
||||||
|
|
||||||
* Release 2.8.1
|
* Release 2.8.1
|
||||||
|
|
|
@ -92,10 +92,20 @@ vfs_change_cb (GnomeVFSMIMEMonitor *monitor, GConfClient *client)
|
||||||
star_app = gnome_vfs_mime_get_default_application ("text/*");
|
star_app = gnome_vfs_mime_get_default_application ("text/*");
|
||||||
plain_app = gnome_vfs_mime_get_default_application ("text/plain");
|
plain_app = gnome_vfs_mime_get_default_application ("text/plain");
|
||||||
|
|
||||||
if (star_app == NULL || plain_app == NULL)
|
if (star_app == NULL || plain_app == NULL) {
|
||||||
|
if (star_app != NULL) {
|
||||||
|
gnome_vfs_mime_application_free (star_app);
|
||||||
|
}
|
||||||
|
if (plain_app != NULL) {
|
||||||
|
gnome_vfs_mime_application_free (plain_app);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
if (!strcmp (star_app->id, plain_app->id))
|
}
|
||||||
|
if (!strcmp (star_app->id, plain_app->id)) {
|
||||||
|
gnome_vfs_mime_application_free (star_app);
|
||||||
|
gnome_vfs_mime_application_free (plain_app);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#if DE_DEBUG
|
#if DE_DEBUG
|
||||||
g_message ("Synching text/plain to text/*...");
|
g_message ("Synching text/plain to text/*...");
|
||||||
|
@ -104,6 +114,8 @@ vfs_change_cb (GnomeVFSMIMEMonitor *monitor, GConfClient *client)
|
||||||
action = gnome_vfs_mime_get_default_action_type ("text/plain");
|
action = gnome_vfs_mime_get_default_action_type ("text/plain");
|
||||||
|
|
||||||
gnome_vfs_mime_set_default_application ("text/*", plain_app->id);
|
gnome_vfs_mime_set_default_application ("text/*", plain_app->id);
|
||||||
|
gnome_vfs_mime_application_free (plain_app);
|
||||||
|
|
||||||
gnome_vfs_mime_set_default_action_type ("text/*", action);
|
gnome_vfs_mime_set_default_action_type ("text/*", action);
|
||||||
|
|
||||||
PRINT_STATE;
|
PRINT_STATE;
|
||||||
|
|
|
@ -121,8 +121,9 @@ load_cursor (GConfClient *client)
|
||||||
{
|
{
|
||||||
g_free (link_name);
|
g_free (link_name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
g_free (link_name);
|
||||||
|
|
||||||
if (S_ISLNK (st.st_mode))
|
if (S_ISLNK (st.st_mode))
|
||||||
unlink (link_name);
|
unlink (link_name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,6 +176,7 @@ apply_settings (void)
|
||||||
theme_filename = check_filename (g_build_filename (DATADIR, "themes", NULL),
|
theme_filename = check_filename (g_build_filename (DATADIR, "themes", NULL),
|
||||||
current_theme);
|
current_theme);
|
||||||
}
|
}
|
||||||
|
g_free (current_theme);
|
||||||
|
|
||||||
/* If we don't find a match, use Raleigh
|
/* If we don't find a match, use Raleigh
|
||||||
*/
|
*/
|
||||||
|
@ -193,6 +194,7 @@ apply_settings (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
new_contents = make_contents (theme_filename);
|
new_contents = make_contents (theme_filename);
|
||||||
|
g_free (theme_filename);
|
||||||
|
|
||||||
if (!current_contents ||
|
if (!current_contents ||
|
||||||
current_length != strlen (new_contents) ||
|
current_length != strlen (new_contents) ||
|
||||||
|
|
|
@ -86,7 +86,7 @@ apply_settings (void)
|
||||||
gboolean repeat, click;
|
gboolean repeat, click;
|
||||||
int rate, delay;
|
int rate, delay;
|
||||||
int click_volume, bell_volume, bell_pitch, bell_duration;
|
int click_volume, bell_volume, bell_pitch, bell_duration;
|
||||||
const char *volume_string;
|
char *volume_string;
|
||||||
|
|
||||||
XKeyboardControl kbdcontrol;
|
XKeyboardControl kbdcontrol;
|
||||||
|
|
||||||
|
@ -105,6 +105,7 @@ apply_settings (void)
|
||||||
|
|
||||||
volume_string = gconf_client_get_string (client, "/desktop/gnome/peripherals/keyboard/bell_mode", NULL);
|
volume_string = gconf_client_get_string (client, "/desktop/gnome/peripherals/keyboard/bell_mode", NULL);
|
||||||
bell_volume = (volume_string && !strcmp (volume_string, "on")) ? 50 : 0;
|
bell_volume = (volume_string && !strcmp (volume_string, "on")) ? 50 : 0;
|
||||||
|
g_free (volume_string);
|
||||||
|
|
||||||
gdk_error_trap_push ();
|
gdk_error_trap_push ();
|
||||||
if (repeat) {
|
if (repeat) {
|
||||||
|
|
|
@ -416,7 +416,7 @@ init_kbd (Acme *acme)
|
||||||
|
|
||||||
for (i = 0; i < PLAY_KEY; i++)
|
for (i = 0; i < PLAY_KEY; i++)
|
||||||
{
|
{
|
||||||
const char *tmp;
|
char *tmp;
|
||||||
Key *key;
|
Key *key;
|
||||||
|
|
||||||
gconf_client_notify_add (acme->conf_client,
|
gconf_client_notify_add (acme->conf_client,
|
||||||
|
@ -425,15 +425,19 @@ init_kbd (Acme *acme)
|
||||||
|
|
||||||
tmp = gconf_client_get_string (acme->conf_client,
|
tmp = gconf_client_get_string (acme->conf_client,
|
||||||
keys[i].gconf_key, NULL);
|
keys[i].gconf_key, NULL);
|
||||||
if (is_valid_shortcut (tmp) == FALSE)
|
if (!is_valid_shortcut (tmp)) {
|
||||||
|
g_free (tmp);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
key = g_new0 (Key, 1);
|
key = g_new0 (Key, 1);
|
||||||
if (egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state) == FALSE)
|
if (!egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state))
|
||||||
{
|
{
|
||||||
|
g_free (tmp);
|
||||||
g_free (key);
|
g_free (key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
g_free (tmp);
|
||||||
|
|
||||||
keys[i].key = key;
|
keys[i].key = key;
|
||||||
|
|
||||||
|
@ -442,7 +446,7 @@ init_kbd (Acme *acme)
|
||||||
|
|
||||||
for (i = PLAY_KEY; i < HANDLED_KEYS; i++)
|
for (i = PLAY_KEY; i < HANDLED_KEYS; i++)
|
||||||
{
|
{
|
||||||
const char *tmp;
|
char *tmp;
|
||||||
Key *key;
|
Key *key;
|
||||||
|
|
||||||
gconf_client_notify_add (acme->conf_client,
|
gconf_client_notify_add (acme->conf_client,
|
||||||
|
@ -451,15 +455,19 @@ init_kbd (Acme *acme)
|
||||||
|
|
||||||
tmp = gconf_client_get_string (acme->conf_client,
|
tmp = gconf_client_get_string (acme->conf_client,
|
||||||
keys[i].gconf_key, NULL);
|
keys[i].gconf_key, NULL);
|
||||||
if (is_valid_shortcut (tmp) == FALSE)
|
if (!is_valid_shortcut (tmp)) {
|
||||||
|
g_free (tmp);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
key = g_new0 (Key, 1);
|
key = g_new0 (Key, 1);
|
||||||
if (egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state) == FALSE)
|
if (egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state) == FALSE)
|
||||||
{
|
{
|
||||||
|
g_free (tmp);
|
||||||
g_free (key);
|
g_free (key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
g_free (tmp);
|
||||||
|
|
||||||
keys[i].key = key;
|
keys[i].key = key;
|
||||||
|
|
||||||
|
|
|
@ -437,6 +437,8 @@ gnome_settings_xsettings_load (GConfClient *client)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
process_value (&translations[i], val);
|
process_value (&translations[i], val);
|
||||||
|
if (val != NULL)
|
||||||
|
gconf_value_free (val);
|
||||||
}
|
}
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
|
|
Loading…
Add table
Reference in a new issue