ALT ('-') and ALT('+')



Hello.

A few questions:

Is it reasonable to make ALT('=') do
Select All as well?
I use it all the time and that triple bucky
gets a bit... bothersome.

What about ALT('_') for invert selection?
It uses the same keys as the rest of the
select functions and it's a bit easier of
a stretch than ALT-SHIFT-8 :)

Attached is a meager patch if that seems like
a good idea.

*

I see that those functions avoid the directories.
It's a paltry matter to comment out the lines in
cmd.c that check for dirs, but there must be a
reason someone did that to begin with.

It is a good idea when you are fixing file
permissions and stuff, because you almost always
want to treat the files separate from the dirs,
so what if we just comment out the lines in
cmd.c:reverse_selection_cmd_panel(),
that way you can select all, then reverse the
selection to get the directories all selected?
Two keystrokes.  Actually three because you have
to hit ENTER after the select all. I like it,
but I could see why someone else wouldn't.
Usually the subdirs are a minor component of a
directory structure, and it's the files you want
to work on, usually.

Also, the unselect-all SHOULD do directories,
shouldn't it.  That's what it's for, to unselect
everything, isn't it?  Right now it won't touch
selected directories.  Isn't that wrong? If it's
not wrong, could someone please explain why?

Maybe it's because this is a FILE manager, not
a DIRECTORY manager? :) :) LOL...

Anyway, attached are a couple minor patches for those
things if they seem like the right thing to do.



Cheers,
Mr.Picky :)



--- mc-cvs-4.6.0-pre1-021003/mc/src/main.c	Thu Sep 26 16:13:47 2002
+++ mc-draft-4.6.0-pre1-021003/src/main.c	Tue Oct  8 21:29:10 2002
@@ -1716,7 +1716,7 @@
              !quote && !cpanel->searching) {
 	    if(!only_leading_plus_minus) {
 		/* Special treatement, since the input line will eat them */
-		if (id == '+' ) {
+		if (id == '+' || id == '=' ) {
 		    select_cmd ();
 		    return MSG_HANDLED;
 		}
@@ -1726,7 +1726,7 @@
 		    return MSG_HANDLED;
 		}
 
-		if (id == '*') {
+		if (id == '*' || id == '_') {
 		    reverse_selection_cmd ();
 		    return MSG_HANDLED;
 		}
@@ -1735,7 +1735,7 @@
 		 * first char on input line
 		 */
 		
-		if (id == '+') {
+		if (id == '+' || id == '=') {
 		    select_cmd ();
 		    return MSG_HANDLED;
 		}
@@ -1745,7 +1745,7 @@
 		    return MSG_HANDLED;
 		}
 		
-		if (id == '*') {
+		if (id == '*' || id == '_') {
 		    reverse_selection_cmd ();
 		    return MSG_HANDLED;
 		}


--- mc-cvs-4.6.0-pre1-021003/mc/src/cmd.c	Sun Sep 29 12:26:15 2002
+++ mc-draft-4.6.0-pre1-021003/src/cmd.c	Tue Oct  8 22:39:22 2002
@@ -487,8 +487,10 @@
 
     for (i = 0; i < panel->count; i++){
 	file = &panel->dir.list [i];
+/*
 	if (S_ISDIR (file->buf.st_mode))
 	    continue;
+*/
 	do_file_mark (panel, i, !file->f.marked);
     }
     paint_panel (panel);


--- mc-cvs-4.6.0-pre1-021003/mc/src/cmd.c	Sun Sep 29 12:26:15 2002
+++ mc-draft-4.6.0-pre1-021003/src/cmd.c	Tue Oct  8 22:39:22 2002
@@ -576,6 +578,7 @@
     for (i = 0; i < panel->count; i++){
         if (!strcmp (panel->dir.list [i].fname, "..")) 
             continue;
+/*
 	if (S_ISDIR (panel->dir.list [i].buf.st_mode)){
 	    if (!dirflag)
 	        continue;
@@ -583,6 +586,7 @@
             if (dirflag)
                 continue;
         }
+*/
 	c = regexp_match (reg_exp_t, panel->dir.list [i].fname, match_file);
 	if (c == -1){
 	    message (1, MSG_ERROR, _("  Malformed regular expression  "));




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]