[Xfce4-commits] <xfce4-settings:master> Fix and improve previous commit.
Nick Schermer
noreply at xfce.org
Sun Feb 7 17:10:01 CET 2010
Updating branch refs/heads/master
to f712f6dbadec39b664b4dab6adc6c2a6526307e7 (commit)
from 7320e6f15a13c369343e59e11b44ad9ec6b394b2 (commit)
commit f712f6dbadec39b664b4dab6adc6c2a6526307e7
Author: Nick Schermer <nick at xfce.org>
Date: Sun Feb 7 17:07:56 2010 +0100
Fix and improve previous commit.
dialogs/keyboard-settings/xfce-keyboard-settings.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index e3555b7..c8ff615 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -599,12 +599,14 @@ xfce_keyboard_settings_edit_command (XfceKeyboardSettings *settings,
/* Get the command entered by the user */
new_command = command_dialog_get_command (COMMAND_DIALOG (dialog));
- /* Remove the row if we're going (though Xfconf) add a new one */
- if (g_strcmp0 (shortcut, new_command) != 0)
- gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+ if (g_strcmp0 (command, new_command) != 0)
+ {
+ /* Remove the row because we add new one from the shortcut-added signal */
+ gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
- /* Save settings */
- xfce_shortcuts_provider_set_shortcut (settings->priv->provider, shortcut, new_command);
+ /* Save settings */
+ xfce_shortcuts_provider_set_shortcut (settings->priv->provider, shortcut, new_command);
+ }
}
/* Destroy the shortcut dialog */
More information about the Xfce4-commits
mailing list