[geany/geany] 625c7b: fix unexisting keys assigned to "Send selection to -> ..."

Dimitar Zhekov git-noreply at xxxxx
Thu Jan 9 14:27:51 UTC 2014


Branch:      refs/heads/master
Author:      Dimitar Zhekov <dimitar.zhekov at gmail.com>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Thu, 09 Jan 2014 14:27:51 UTC
Commit:      625c7b829d45a72951fe75b8fe6cf7aab4189fb6
             https://github.com/geany/geany/commit/625c7b829d45a72951fe75b8fe6cf7aab4189fb6

Log Message:
-----------
fix unexisting keys assigned to "Send selection to -> ..."


Modified Paths:
--------------
    src/tools.c

Modified: src/tools.c
7 files changed, 5 insertions(+), 2 deletions(-)
===================================================================
@@ -732,8 +732,11 @@ static void cc_insert_custom_command_items(GtkMenu *me, const gchar *label, cons
 	if (key_idx != -1)
 	{
 		kb = keybindings_lookup_item(GEANY_KEY_GROUP_FORMAT, key_idx);
-		gtk_widget_add_accelerator(item, "activate", gtk_accel_group_new(),
-			kb->key, kb->mods, GTK_ACCEL_VISIBLE);
+		if (kb->key > 0)
+		{
+			gtk_widget_add_accelerator(item, "activate", gtk_accel_group_new(),
+				kb->key, kb->mods, GTK_ACCEL_VISIBLE);
+		}
 	}
 	gtk_container_add(GTK_CONTAINER(me), item);
 	gtk_widget_show(item);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list