fixing one leak, pointed by kmaraas
This commit is contained in:
parent
bf88391b66
commit
b98fd2ff69
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-09-27 Sergey V. Udaltsov <svu@gnome.org>
|
||||
|
||||
* gnome-settings-keyboard-xkb.c: fix one GSwitchItXkbConfig memory
|
||||
leak, spotted by kmaraas.
|
||||
|
||||
2004-08-30 Carlos Garnacho Parro <carlosg@gnome.org>
|
||||
|
||||
* gnome-settings-multimedia-keys.c: applied patch from Pierre Ossman
|
||||
|
|
|
@ -147,6 +147,7 @@ gnome_settings_keyboard_xkb_analyze_sysconfig (void)
|
|||
{
|
||||
GConfClient *confClient;
|
||||
GSwitchItXkbConfig gswicWas, *pgswicNow;
|
||||
gboolean isConfigChanged;
|
||||
|
||||
if (!initedOk)
|
||||
return;
|
||||
|
@ -158,9 +159,10 @@ gnome_settings_keyboard_xkb_analyze_sysconfig (void)
|
|||
GSwitchItXkbConfigLoadSysBackup (&gswicWas);
|
||||
GSwitchItXkbConfigLoadInitial (pgswicNow);
|
||||
|
||||
isConfigChanged = g_slist_length (gswicWas.layouts) &&
|
||||
!GSwitchItXkbConfigEquals (pgswicNow, &gswicWas);
|
||||
/* config was changed!!! */
|
||||
if (g_slist_length (gswicWas.layouts) &&
|
||||
!GSwitchItXkbConfigEquals (pgswicNow, &gswicWas)) {
|
||||
if (isConfigChanged) {
|
||||
GtkWidget *msg = gtk_message_dialog_new_with_markup (NULL,
|
||||
0,
|
||||
GTK_MESSAGE_INFO,
|
||||
|
@ -183,6 +185,8 @@ gnome_settings_keyboard_xkb_analyze_sysconfig (void)
|
|||
gtk_widget_show (msg);
|
||||
}
|
||||
GSwitchItXkbConfigSaveSysBackup (pgswicNow);
|
||||
if (!isConfigChanged)
|
||||
g_free (pgswicNow);
|
||||
GSwitchItXkbConfigTerm (&gswicWas);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue