a bit of more optimization
This commit is contained in:
parent
d52a911b8e
commit
6b0d6cac30
1 changed files with 4 additions and 4 deletions
|
@ -45,6 +45,8 @@
|
|||
|
||||
static GSwitchItConfig currentConfig;
|
||||
static GSwitchItKbdConfig currentKbdConfig;
|
||||
|
||||
/* never terminated */
|
||||
static GSwitchItKbdConfig initialSysKbdConfig;
|
||||
|
||||
static gboolean initedOk;
|
||||
|
@ -143,9 +145,7 @@ apply_xkb_settings (void)
|
|||
|
||||
if (currentKbdConfig.overrideSettings) {
|
||||
/* initialization - from the system settings */
|
||||
GSwitchItKbdConfigLoadFromXInitial (¤tKbdConfig);
|
||||
currentKbdConfig.overrideSettings = FALSE;
|
||||
GSwitchItKbdConfigSaveToGConf (¤tKbdConfig);
|
||||
GSwitchItKbdConfigSaveToGConf (&initialSysKbdConfig);
|
||||
} else {
|
||||
GSwitchItKbdConfigLoadFromXCurrent (¤tSysKbdConfig);
|
||||
/* Activate - only if different! */
|
||||
|
@ -181,7 +181,6 @@ gnome_settings_keyboard_xkb_sysconfig_changed_response (GtkDialog * dialog,
|
|||
break;
|
||||
}
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
GSwitchItKbdConfigTerm (&initialSysKbdConfig);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -199,6 +198,7 @@ gnome_settings_keyboard_xkb_analyze_sysconfig (void)
|
|||
g_object_unref (confClient);
|
||||
GSwitchItKbdConfigLoadFromGConfBackup (&backupGConfKbdConfig);
|
||||
GSwitchItKbdConfigLoadFromXInitial (&initialSysKbdConfig);
|
||||
initialSysKbdConfig.overrideSettings = FALSE;
|
||||
|
||||
isConfigChanged = g_slist_length (backupGConfKbdConfig.layouts) &&
|
||||
!GSwitchItKbdConfigEquals (&initialSysKbdConfig, &backupGConfKbdConfig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue