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

git pushed a commit to branch v-0.27
in repository enlightenment.

View the commit online.

commit ec11d18c7e87d82476e4833e774f4604b46c31d5
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Thu Feb 13 10:24:14 2025 +0000

    client menu - fix - dont show add kbd shortcut if no desktop is there
    
    if the client has no desktop file associated, then don't show the
    "Create Keyboard Shortcut" as there isn't anything sensible for it to
    run anyway. this avoids a crash when you use it on an app that has
    none. also protect if called and desktop vanished in between.
    
    @fix
    
    Signed-off-by: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
---
 src/bin/e_int_client_menu.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_int_client_menu.c b/src/bin/e_int_client_menu.c
index 0309dc267..568e3cfcd 100644
--- a/src/bin/e_int_client_menu.c
+++ b/src/bin/e_int_client_menu.c
@@ -702,7 +702,8 @@ _e_client_menu_cb_application_pre(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item
                                         _e_client_menu_cb_ibar_add_pre, ec);
    e_util_menu_item_theme_icon_set(submi, "preferences-applications-ibar");
 
-   if (e_configure_registry_exists("keyboard_and_mouse/key_bindings"))
+   if (e_configure_registry_exists("keyboard_and_mouse/key_bindings") &&
+       (ec->desktop))
      {
         submi = e_menu_item_new(subm);
         e_menu_item_label_set(submi, _("Create Keyboard Shortcut"));
@@ -1688,8 +1689,9 @@ _e_client_menu_cb_kbdshrtct_add(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *
    if (!(ec = data)) return;
    zone = e_zone_current_get();
    if (!zone) return;
-   e_configure_registry_call("keyboard_and_mouse/key_bindings",
-                             NULL, ec->desktop->exec);
+   if ((ec->desktop) && (ec->desktop->exec))
+     e_configure_registry_call("keyboard_and_mouse/key_bindings",
+                               NULL, ec->desktop->exec);
 }
 
 static void

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

Reply via email to