changeset 15009:7589733ba1aa

[gaim-migrate @ 17789] F10 to show the menu of a window. F11 to show the context-menu. I would've used shift+F10 if terminfo permitted. Fix a bug where F10 etc. could not be used for rebinding. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 20 Nov 2006 04:05:33 +0000
parents a259abeeee27
children c6fd017c4121
files console/libgnt/gntstyle.c console/libgnt/gntwidget.c console/libgnt/gntwindow.c
diffstat 3 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gntstyle.c	Mon Nov 20 03:57:47 2006 +0000
+++ b/console/libgnt/gntstyle.c	Mon Nov 20 04:05:33 2006 +0000
@@ -91,7 +91,7 @@
 	/* XXX: Need to do something about ctrl/alt+home, end etc. */
 
 #define SPECIAL_KEY(k, code) do { \
-		if (strncasecmp(key, k, sizeof(k) - 1) == 0) \
+		if (strcasecmp(key, k) == 0) \
 			return g_strdup(code); \
 	} while (0)
 
--- a/console/libgnt/gntwidget.c	Mon Nov 20 03:57:47 2006 +0000
+++ b/console/libgnt/gntwidget.c	Mon Nov 20 04:05:33 2006 +0000
@@ -239,6 +239,7 @@
 	/* This is relevant for all widgets */
 	gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "context-menu", context_menu,
 				GNT_KEY_POPUP, NULL);
+	gnt_bindable_register_binding(GNT_BINDABLE_CLASS(klass), "context-menu", GNT_KEY_F11, NULL);
 
 	gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass));
 	GNTDEBUG;
--- a/console/libgnt/gntwindow.c	Mon Nov 20 03:57:47 2006 +0000
+++ b/console/libgnt/gntwindow.c	Mon Nov 20 04:05:33 2006 +0000
@@ -43,6 +43,7 @@
 
 	gnt_bindable_class_register_action(bindable, "show-menu", show_menu,
 				GNT_KEY_CTRL_O, NULL);
+	gnt_bindable_register_binding(bindable, "show-menu", GNT_KEY_F10, NULL);
 	gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), bindable);
 
 	GNTDEBUG;