[Xfce4-commits] [xfce/xfce4-settings] 01/01: keyboard: Fix crash when editing shortcut (Bug #15958)

noreply at xfce.org noreply at xfce.org
Sat Mar 28 20:27:25 CET 2020


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-settings.

commit d5f96a214230a9fd3e0d137cb733f284ba23bfe4
Author: Theo Linkspfeifer <lastonestanding at tutanota.com>
Date:   Tue Mar 10 15:44:32 2020 +0100

    keyboard: Fix crash when editing shortcut (Bug #15958)
    
    Signed-off-by: Sean Davis <smd.seandavis at gmail.com>
---
 dialogs/keyboard-settings/xfce-keyboard-settings.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 3b2f430..76169ad 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -1159,14 +1159,16 @@ xfce_keyboard_settings_edit_button_clicked (XfceKeyboardSettings *settings)
                   test_new_shortcut = (g_strcmp0 (shortcut, new_shortcut) != 0);
                   if (g_strcmp0 (command, new_command) != 0 || (test_new_shortcut) || snotify != new_snotify)
                     {
-                      /* Remove the row because we add new one from the
-                       * shortcut-added signal */
-                      gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
-
                       if (test_new_shortcut)
-                        /* Remove old keyboard shortcut via xfconf */
-                        xfce_shortcuts_provider_reset_shortcut (settings->priv->provider,
-                                                                shortcut);
+                        {
+                          /* Remove the row because we add new one from the
+                           * shortcut-added signal */
+                          gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+
+                          /* Remove old keyboard shortcut via xfconf */
+                          xfce_shortcuts_provider_reset_shortcut (settings->priv->provider,
+                                                                  shortcut);
+                        }
 
                       /* Save settings */
                       xfce_shortcuts_provider_set_shortcut (settings->priv->provider,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list