listbox hotkeys

2015-05-24 Thread Mike Smithson


I use Directory hotlist a lot. Constantly, really.

It's always bugged me that I can only access the
first 10 items with the keys 0-9. After sitting on
my TODO list for about 2 years, I finally had a
scratch at the issue.

Keys a-z are very often used by the menu of the
dialog the listbox is in, but keys A-Z are not.

So I did this:

[code]
--- lib/widget/listbox.c~   2015-03-20 11:06:04.0 -0700
+++ lib/widget/listbox.c2015-05-24 09:21:52.0 -0700
@@ -328,10 +328,15 @@ listbox_key (WListbox * l, int key)
 return MSG_NOT_HANDLED;

 /* focus on listbox item N by '0'..'9' keys */
-if (key = '0'  key = '9')
+if ((key = '0'  key = '9')||(key = 'A'  key = 'Z'))
 {
 int oldpos = l-pos;
-listbox_select_entry (l, key - '0');
+if (key = 'A'  key = 'Z') {
+listbox_select_entry (l, key - 55);
+} else {
+listbox_select_entry (l, key - '0');
+}
+

 /* need scroll to item? */
 if (abs (oldpos - l-pos)  WIDGET (l)-lines)
[/code]
Diffed from 4.8.14 tarball.

It seems to work fine. Now I can access the top 36
items instead of just the top 10. But, of course, it
affects all listboxes program-wide. It seems OK to me
so far.

My question this:

Does this seem like a useful feature (ie ticket-worthy)
or am I missing some far-reaching consequence I have not
uncovered yet?



--
Peace and Cheer
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: MAN page change

2015-05-24 Thread Yury V. Zaytsev
On Fri, 2015-05-22 at 17:20 -0400, David Both wrote:
 I created a fork in my own account. Should I just create a fork in the
 main branch and then make the change there?

Hi David,

To integrate your change we need to be able to get it from you somehow:

1) One possibility is to create a Trac ticket and attach a patch which
you can make with git (either simply `git diff  change.patch` or make a
proper commit and `git format-patch HEAD~`)

2) Another possibility is to fork the repository on Github, make a new
branch, commit your change there, push it back to Github and use the web
interface to send the pull request.

Whereas the Trac method is still preferred, pull requests for small
changes, especially only affecting the documentation would be ok, at
least with me.

-- 
Sincerely yours,
Yury V. Zaytsev


___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel