my other mc patches
- From: Max Schedriviy <max tavrida net>
- To: <mc-devel gnome org>
- Subject: my other mc patches
- Date: Fri, 6 Jul 2001 05:36:54 +0300
they are:
- assign filename to symlink
- F-keys on numbers
- copy filename with full path to command line - CTRL-'f'
- quick ftp dialog - ALT-'f' (works strange?)
- Show/Hide hidden files - CTRL-'h'
- change panels height - CTRL-Up/CTRL-Down
- changed help colors (I like it :))
--
C U L8er!
Max Schedriviy mailto:max tavrida net
diff -Naur mc/src/cmd.c mc-new/src/cmd.c
--- mc/src/cmd.c Wed Jun 27 16:29:14 2001
+++ mc-new/src/cmd.c Mon Jul 2 16:00:52 2001
@@ -1065,6 +1065,7 @@
if ( ! ((d[0] == '/') && (d[1] == 0)))
strcat(d, "/");
+ strcat(d, fname); /* it's better to assign filename to symlink - mAX */
symlink_dialog (s, d, &dest, &src);
#endif /* !OLD_SYMLINK_VERSION */
if (!dest || !*dest) {
diff -Naur mc/src/key.c mc-new/src/key.c
--- mc/src/key.c Wed Jun 27 16:29:14 2001
+++ mc-new/src/key.c Mon Jul 2 15:44:18 2001
@@ -584,6 +584,18 @@
c = KEY_F (c-'0');
else if (c == ' ')
c = ESC_CHAR;
+ else switch (c){ /* patch for some broken terminals */
+ case '!': c = KEY_F(11);break;
+ case '@': c = KEY_F(12);break;
+ case '#': c = KEY_F(13);break;
+ case '$': c = KEY_F(14);break;
+ case '%': c = KEY_F(15);break;
+ case '^': c = KEY_F(16);break;
+ case '&': c = KEY_F(17);break;
+ case '*': c = KEY_F(18);break;
+ case '(': c = KEY_F(19);break;
+ case ')': c = KEY_F(20);break;
+ }
pending_keys = seq_append = NULL;
this = NULL;
return correct_key_code (c);
diff -Naur mc/src/main.c mc-new/src/main.c
--- mc/src/main.c Wed Jun 27 16:29:16 2001
+++ mc-new/src/main.c Mon Jul 2 15:36:56 2001
@@ -1574,6 +1574,13 @@
}
#endif
+/* copy filename with full path to command line - mAX */
+void copy_full_prog_name (void)
+{
+ copy_current_pathname ();
+ copy_prog_name ();
+}
+
#ifndef HAVE_GNOME
static void copy_current_pathname (void)
{
@@ -1790,6 +1797,9 @@
{ ALT('c'), quick_cd_cmd },
+ /* quick ftp dialog - mAX */
+ { ALT('f'), ftplink_cmd },
+
/* To access the directory hotlist */
{ XCTRL('\\'), quick_chdir_cmd },
@@ -1805,6 +1815,12 @@
/* Panel refresh */
{ XCTRL('r'), reread_cmd },
+ /* Show/Hide hidden files - mAX */
+ { XCTRL('h'), toggle_show_hidden },
+
+ /* copy current filename with full path to command line - mAX */
+ { XCTRL('f'), copy_full_prog_name },
+
{ ALT('t'), toggle_listing_cmd },
#ifndef HAVE_X
@@ -2014,6 +2030,33 @@
return MSG_HANDLED;
}
+ /* show/hide hidden files - mAX */
+ if (id == XCTRL('h')){
+ toggle_show_hidden ();
+ return MSG_HANDLED;
+ }
+
+ /* copy filename with path to command line - mAX */
+ if (id == XCTRL('f')){
+ copy_full_prog_name ();
+ return MSG_HANDLED;
+ }
+
+ /* CTRL+'PgUp' and CTRL+'PgDn' change panels height - mAX */
+ if (id == KEY_UP && ctrl_pressed()) {
+ if (output_lines<15) output_lines++;
+ setup_panels();
+ do_refresh();
+ return MSG_HANDLED;
+ }
+
+ if (id == KEY_DOWN && ctrl_pressed()) {
+ if (output_lines>0) output_lines--;
+ setup_panels();
+ do_refresh();
+ return MSG_HANDLED;
+ }
+
if ((!alternate_plus_minus || !(console_flag || xterm_flag)) &&
!quote && !cpanel->searching) {
if(!only_leading_plus_minus) {
diff -Naur mc/src/text.c mc-new/src/text.c
--- mc/src/text.c Thu Jun 14 18:59:52 2001
+++ mc-new/src/text.c Mon Jul 2 15:18:07 2001
@@ -32,11 +32,11 @@
"menuhot=yellow,cyan:"
"menusel=white,black:"
"menuhotsel=yellow,black:"
-"helpnormal=black,lightgray:"
-"helpitalic=red,lightgray:"
-"helpbold=blue,lightgray:"
-"helplink=black,cyan:"
-"helpslink=yellow,blue:"
+"helpnormal=black,brightcyan:" /* changed help colors - mAX */
+"helpitalic=red,brightcyan:"
+"helpbold=blue,brightcyan:"
+"helplink=yellow,brightcyan:"
+"helpslink=white,black:"
"gauge=white,black:"
"input=black,cyan:"
"directory=white,blue:"
diff -Naur mc/src/widget.c mc-new/src/widget.c
--- mc/src/widget.c Wed Jun 27 16:29:24 2001
+++ mc-new/src/widget.c Mon Jul 2 15:15:58 2001
@@ -1508,7 +1508,7 @@
{ ALT('b'), backward_word },
{ KEY_RIGHT, key_right },
{ XCTRL('f'), forward_char },
- { ALT('f'), forward_word },
+/* { ALT('f'), forward_word },*/ /* ALT('f') used for quick ftp dialog - mAX */
/* Editing */
{ 0177, backward_delete },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]