[Xfce4-commits] <xfce4-settings:master> Fix the old shortcut duplicate after editing a command.

Nick Schermer noreply at xfce.org
Sun Feb 7 16:02:01 CET 2010


Updating branch refs/heads/master
         to 7320e6f15a13c369343e59e11b44ad9ec6b394b2 (commit)
       from c4d8931f930907cf59f2f2c6fdb0e3bc57f4b191 (commit)

commit 7320e6f15a13c369343e59e11b44ad9ec6b394b2
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Feb 7 16:00:03 2010 +0100

    Fix the old shortcut duplicate after editing a command.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 5ff7ae3..e3555b7 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -599,6 +599,10 @@ 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);
+
           /* Save settings */
           xfce_shortcuts_provider_set_shortcut (settings->priv->provider, shortcut, new_command);
         }



More information about the Xfce4-commits mailing list