diff --git a/VERSION b/VERSION index 5c563848d..57e5a9c2c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -#define VERSION "4.1.32" +#define VERSION "4.1.33" diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 54137d5f9..e0041dd54 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,5 +1,8 @@ 1998-05-04 Miguel de Icaza + * gmain.c (dialog_panel_callback): Call midnight_callback to get + the main bindings working. + * gdesktop.c (perform_drop_manually): Use p to walk the dropped data. This is an important bug fix. diff --git a/gnome/gmain.c b/gnome/gmain.c index b54f9d698..e4ecc9742 100644 --- a/gnome/gmain.c +++ b/gnome/gmain.c @@ -392,6 +392,10 @@ dialog_panel_callback (struct Dlg_head *h, int id, int msg) dh = dh->next; } while (dh != h->current); } + + if (msg == DLG_UNHANDLED_KEY || msg == DLG_HOTKEY_HANDLED) + return midnight_callback (h, id, msg); + return default_dlg_callback (h, id, msg); } diff --git a/po/mc.pot b/po/mc.pot index c8feb3f29..ac344ec64 100644 --- a/po/mc.pot +++ b/po/mc.pot @@ -1,6 +1,6 @@ msgid "" msgstr "" -"Date: 1998-05-04 02:53:24-0500\n" +"Date: 1998-05-04 12:45:28-0500\n" "From: Miguel de Icaza,computo,622-4680 \n" "Content-Type: text/plain; charset=\n" "Xgettext-Options: --default-domain=mc --directory=.. --add-comments --keyword=_ --keyword=N_ --files-from=./POTFILES.in\n" @@ -2782,145 +2782,145 @@ msgstr "" msgid "Menu" msgstr "" -#: src/main.c:1887 +#: src/main.c:1884 msgid "Thank you for using GNU Midnight Commander" msgstr "" -#: src/main.c:2233 +#: src/main.c:2246 msgid "with mouse support on xterm%s.\n" msgstr "" -#: src/main.c:2234 +#: src/main.c:2247 msgid " and the Linux console" msgstr "" -#: src/main.c:2325 +#: src/main.c:2338 msgid "The TERM environment variable is unset!\n" msgstr "" -#: src/main.c:2577 +#: src/main.c:2590 msgid "Library directory for the Midnight Commander: %s\n" msgstr "" -#: src/main.c:2582 +#: src/main.c:2595 msgid "Option -m is obsolete. Please look at Display Bits... in the Option's menu\n" msgstr "" -#: src/main.c:2645 +#: src/main.c:2658 msgid "[DEVEL-ONLY: Debug the background code]" msgstr "" -#: src/main.c:2648 +#: src/main.c:2661 msgid "Create command file to set default directory upon exit." msgstr "" -#: src/main.c:2650 +#: src/main.c:2663 msgid "Force color mode." msgstr "" -#: src/main.c:2651 +#: src/main.c:2664 msgid "Specify colors (use --help-colors to get a list)." msgstr "" -#: src/main.c:2653 +#: src/main.c:2666 msgid "[DEVEL-ONLY: Debug the subshell." msgstr "" -#: src/main.c:2655 +#: src/main.c:2668 msgid "Startup the internal editor." msgstr "" -#: src/main.c:2656 +#: src/main.c:2669 msgid "Shows this help message." msgstr "" -#: src/main.c:2657 +#: src/main.c:2670 msgid "Help on how to specify colors." msgstr "" -#: src/main.c:2659 +#: src/main.c:2672 msgid "Log ftpfs commands to the file." msgstr "" -#: src/main.c:2661 +#: src/main.c:2674 msgid "Prints out the configured paths." msgstr "" -#: src/main.c:2663 +#: src/main.c:2676 msgid "Force black and white display." msgstr "" -#: src/main.c:2664 +#: src/main.c:2677 msgid "Disable mouse support." msgstr "" -#: src/main.c:2666 +#: src/main.c:2679 msgid "Force the concurrent subshell mode" msgstr "" -#: src/main.c:2667 +#: src/main.c:2680 msgid "Disable the concurrent subshell mode." msgstr "" -#: src/main.c:2668 +#: src/main.c:2681 msgid "Force subshell execution." msgstr "" -#: src/main.c:2670 +#: src/main.c:2683 msgid "At exit, print the last working directory." msgstr "" -#: src/main.c:2671 +#: src/main.c:2684 msgid "Reset softkeys (HP terminals only) to their terminfo/termcap default." msgstr "" -#: src/main.c:2672 +#: src/main.c:2685 msgid "Disables verbose operation (for slow terminals)." msgstr "" -#: src/main.c:2674 +#: src/main.c:2687 msgid "Use simple symbols for line drawing." msgstr "" -#: src/main.c:2679 +#: src/main.c:2692 msgid "Activate support for the TERMCAP variable." msgstr "" -#: src/main.c:2681 +#: src/main.c:2694 msgid "Report versionand configuration options." msgstr "" -#: src/main.c:2682 +#: src/main.c:2695 msgid "Start up into the viewer mode." msgstr "" -#: src/main.c:2683 +#: src/main.c:2696 msgid "Force xterm mouse support and screen save/restore" msgstr "" -#: src/main.c:2684 +#: src/main.c:2697 msgid "Geometry for the window" msgstr "" -#: src/main.c:2685 +#: src/main.c:2698 msgid "No windows opened at startup" msgstr "" -#: src/main.c:2762 +#: src/main.c:2775 msgid "[this dir] [other dir]" msgstr "" -#: src/main.c:3004 +#: src/main.c:3017 msgid "" "Couldn't open tty line. You have to run mc without the -P flag.\n" "On some systems you may want to run # `which mc`\n" msgstr "" -#: src/main.c:3092 +#: src/main.c:3105 msgid " Notice " msgstr "" -#: src/main.c:3093 +#: src/main.c:3106 msgid "" " The Midnight Commander configuration files \n" " are now stored in the ~/.mc directory, the \n" diff --git a/src/ChangeLog b/src/ChangeLog index 5b025bcfc..e63ce79d2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +1998-05-04 Miguel de Icaza + + * main.c (ctl_x_cmd): Implement ctl-x handling as a state of the + key press events. Drop the usage of mi_getch to acomplish this + task. + (midnight_callback): Deal with the current map depending on the + c-x state. + Mon May 4 10:21:31 1998 Norbert Warmuth * background.c (message_1s1d): the unprocessed string with %d was diff --git a/src/main.c b/src/main.c index e3e3ad660..a2d47dfdb 100644 --- a/src/main.c +++ b/src/main.c @@ -1682,10 +1682,12 @@ static key_map ctl_x_map [] = { { 'a', reselect_vfs }, #endif { 'd', compare_dirs_cmd }, +#ifndef HAVE_GNOME { 'p', copy_current_pathname }, { XCTRL('p'), copy_other_pathname }, { 't', copy_current_tagged }, { XCTRL('t'), copy_other_tagged }, +#endif { 'c', chmod_cmd }, #ifndef OS2_NT { 'o', chown_cmd }, @@ -1711,17 +1713,11 @@ static key_map ctl_x_map [] = { { 0, 0 } }; +static int ctl_x_map_enabled = 0; + static void ctl_x_cmd (int ignore) { - int i; - int key = mi_getch (); - - for (i = 0; ctl_x_map [i].key_code; i++){ - if (key == ctl_x_map [i].key_code){ - (*ctl_x_map [i].fn)(key); - break; - } - } + ctl_x_map_enabled = 1; } static void nothing () @@ -1729,6 +1725,7 @@ static void nothing () } static key_map default_map [] = { +#ifndef HAVE_GNOME { KEY_F(19), menu_last_selected_cmd }, { KEY_F(20), (key_callback) quiet_quit_cmd }, @@ -1743,15 +1740,15 @@ static key_map default_map [] = { /* To access the directory hotlist */ { XCTRL('\\'), quick_chdir_cmd }, + /* Suspend */ + { XCTRL('z'), suspend_cmd }, +#endif /* The filtered view command */ { ALT('!'), filtered_view_cmd_cpanel }, /* Find file */ { ALT('?'), find_cmd }, - /* Suspend */ - { XCTRL('z'), suspend_cmd }, - /* Panel refresh */ { XCTRL('r'), reread_cmd }, @@ -1932,6 +1929,15 @@ int midnight_callback (struct Dlg_head *h, int id, int msg) return MSG_HANDLED; case DLG_KEY: + if (ctl_x_map_enabled){ + ctl_x_map_enabled = 0; + for (i = 0; ctl_x_map [i].key_code; i++) + if (id == ctl_x_map [i].key_code){ + (*ctl_x_map [i].fn)(id); + return MSG_HANDLED; + } + } + if (id == KEY_F(10) && !the_menubar->active){ quit_cmd (); return MSG_HANDLED; @@ -2005,16 +2011,23 @@ int midnight_callback (struct Dlg_head *h, int id, int msg) if (v) return v; } - for (i = 0; default_map [i].key_code; i++){ - if (id == default_map [i].key_code){ - (*default_map [i].fn)(id); - break; - } + if (ctl_x_map_enabled){ + ctl_x_map_enabled = 0; + for (i = 0; ctl_x_map [i].key_code; i++) + if (id == ctl_x_map [i].key_code){ + (*ctl_x_map [i].fn)(id); + return MSG_HANDLED; + } + } else { + for (i = 0; default_map [i].key_code; i++){ + if (id == default_map [i].key_code){ + (*default_map [i].fn)(id); + return MSG_HANDLED; + } + } } - if (default_map [i].key_code) - return MSG_HANDLED; - else - return MSG_NOT_HANDLED; + return MSG_NOT_HANDLED; + #endif #ifndef HAVE_X /* We handle the special case of the output lines */