From: <sa...@us...> - 2006-11-20 04:05:34
|
Revision: 17789 http://svn.sourceforge.net/gaim/?rev=17789&view=rev Author: sadrul Date: 2006-11-19 20:05:33 -0800 (Sun, 19 Nov 2006) Log Message: ----------- 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. Modified Paths: -------------- trunk/console/libgnt/gntstyle.c trunk/console/libgnt/gntwidget.c trunk/console/libgnt/gntwindow.c Modified: trunk/console/libgnt/gntstyle.c =================================================================== --- trunk/console/libgnt/gntstyle.c 2006-11-20 03:57:47 UTC (rev 17788) +++ trunk/console/libgnt/gntstyle.c 2006-11-20 04:05:33 UTC (rev 17789) @@ -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) Modified: trunk/console/libgnt/gntwidget.c =================================================================== --- trunk/console/libgnt/gntwidget.c 2006-11-20 03:57:47 UTC (rev 17788) +++ trunk/console/libgnt/gntwidget.c 2006-11-20 04:05:33 UTC (rev 17789) @@ -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; Modified: trunk/console/libgnt/gntwindow.c =================================================================== --- trunk/console/libgnt/gntwindow.c 2006-11-20 03:57:47 UTC (rev 17788) +++ trunk/console/libgnt/gntwindow.c 2006-11-20 04:05:33 UTC (rev 17789) @@ -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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |