1
1

Fixes, fixes, fixes, fixes, fixes.

Thanks DrMike for the detailed listing of problems.

Miguel.
Этот коммит содержится в:
Miguel de Icaza 1998-04-07 19:08:31 +00:00
родитель 84d507f826
Коммит 30252eccf8
22 изменённых файлов: 887 добавлений и 575 удалений

Просмотреть файл

@ -397,6 +397,9 @@
/* Define if you have the strncasecmp function. */
#undef HAVE_STRNCASECMP
/* Define if you have the sysconf function. */
#undef HAVE_SYSCONF
/* Define if you have the tcgetattr function. */
#undef HAVE_TCGETATTR

Просмотреть файл

@ -9,10 +9,6 @@ VERSION=dummy
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "dummy")
if test x$ALL_LINGUAS = x; then
ALL_LINGUAS="fr es"
fi
dnl This is path where we're looking for headers in addition to /usr/include
dnl and whatever cpp defaults to.
include_additional_path="/usr/local/include /opt/gnu/include"
@ -86,6 +82,10 @@ if test x$GCC = xyes; then
cc_uses_g=no
fi
fi
dnl Debug mode is turned ON for now
CCOPTS='-g'
if test "x$CCOPTS" = x; then
if test x$GCC = xyes; then
if test x$system = xLinux; then
@ -165,6 +165,7 @@ AC_CHECK_FUNCS(strerror statfs getwd strcasecmp strncasecmp)
AC_CHECK_FUNCS(strdup memmove pwdauth truncate initgroups putenv)
AC_CHECK_FUNCS(memset memcpy tcsetattr tcgetattr cfgetospeed)
AC_CHECK_FUNCS(sigaction sigemptyset sigprocmask sigaddset)
AC_CHECK_FUNCS(sysconf)
SHADOWLIB=
if test x$system = xLinux; then

Просмотреть файл

@ -30,3 +30,5 @@
#define mi_getch() fprintf (stderr, "mi_getch is not implemented in this port\n")
#define frontend_run_dlg(x) gtkrundlg_event (x)
void port_shutdown_extra_fds(void);

Просмотреть файл

@ -65,9 +65,9 @@ General Comments
I think the thumb should follow in both cases. This is a gtk comment
I'm sure.
- some dialogs only had a single entry box (like the ftp link one),
when you hit return in the entrybox it would be nice if that mapped
to hitting 'Ok' so you wouldnt have to hit Ok manually.
DONE - some dialogs only had a single entry box (like the ftp link one),
DONE when you hit return in the entrybox it would be nice if that mapped
DONE to hitting 'Ok' so you wouldnt have to hit Ok manually.
Panel comments
@ -113,14 +113,14 @@ Panel comments
folder does the same thing, but in a long file listing its nice to
just have a button to do it.
- I got several 'sigpipes' when trying to view a ftpfs file, or
when trying to view RPM tags via the rpmfs.
DONE - I got several 'sigpipes' when trying to view a ftpfs file, or
DONE when trying to view RPM tags via the rpmfs.
DONE
DONE Open a RPM, then got into the INFO pseudo-dir, the VIEW a RPM tag. It
DONE will sigpipe.
Open a RPM, then got into the INFO pseudo-dir, the VIEW a RPM tag. It
will sigpipe.
- is there a way to click and drag and select all the files you drag
over? Sortof a interactive 'select group' option.
DONE - is there a way to click and drag and select all the files you drag
DONE over? Sortof a interactive 'select group' option.
- the internal viewer, in hex mode, seems to shove the ASCII side of the
view (the rightmost column) off the side of the window.
@ -133,8 +133,8 @@ Panel comments
guessing no association existed - if so it should tell me and let
me create an association
- I couldnt view files inside of a RPM which I was browsing via the ftpfs
is this just cause I'm nuts to try?
DONE - I couldnt view files inside of a RPM which I was browsing via the ftpfs
DONE is this just cause I'm nuts to try?
- I couldnt get the drag from one panel to another to work reliably -
I would drag and get a 'Copy Link Move' window, but I couldn't

Просмотреть файл

@ -523,6 +523,8 @@ internal_select_item (GtkWidget *file_list, WPanel *panel, int row)
static void
panel_file_list_select_row (GtkWidget *file_list, int row, int column, GdkEvent *event, WPanel *panel)
{
int current_selection = panel->selected;
if (!event) {
internal_select_item (file_list, panel, row);
return;
@ -537,6 +539,8 @@ panel_file_list_select_row (GtkWidget *file_list, int row, int column, GdkEvent
if (!(event->button.state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)))
break;
/* fallback if shift-click is pressed */
do_file_mark_range (panel, row, current_selection);
break;
case 2:
do_file_mark (panel, row, !panel->dir.list[row].f.marked);

Просмотреть файл

@ -18,8 +18,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
@ -46,6 +44,9 @@
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
#include <gnome.h>
#include <X11/Xlib.h>
#include <gdk/gdkprivate.h>
int my_system (int as_shell_command, const char *shell, const char *command)
{
@ -65,10 +66,11 @@ int my_system (int as_shell_command, const char *shell, const char *command)
return -1;
}
if (pid == 0){
const int top = max_open_files ();
sigaction (SIGINT, &save_intr, NULL);
sigaction (SIGQUIT, &save_quit, NULL);
for (i = 3; i < 4096; i++)
for (i = 3; i < top; i++)
close (i);
if (as_shell_command)
@ -127,3 +129,13 @@ exec_direct (char *path, char *argv [])
return WEXITSTATUS(status);
}
void
port_shutdown_extra_fds (void)
{
const int top = max_open_files ();
int f;
for (f = 0; f < top; f++)
close (f);
}

906
po/mc.pot

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1998-04-03 08:01+0300\n"
"POT-Creation-Date: 1998-04-06 11:48+0300\n"
"PO-Revision-Date: 1998-03-27 11:07+0200\n"
"Last-Translator: Alex Tkachenko <alex@bcs.zp.ua>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -861,11 +861,11 @@ msgid ""
msgstr ""
#: src/achown.c:72 src/boxes.c:138 src/boxes.c:273 src/boxes.c:370
#: src/boxes.c:415 src/boxes.c:557 src/boxes.c:678 src/boxes.c:720
#: src/boxes.c:457 src/boxes.c:599 src/boxes.c:720 src/boxes.c:762
#: src/chmod.c:115 src/chown.c:81 src/cmd.c:832 src/file.c:1953 src/find.c:156
#: src/hotlist.c:140 src/hotlist.c:696 src/hotlist.c:777 src/layout.c:377
#: src/learn.c:58 src/option.c:165 src/panelize.c:89 src/view.c:411
#: src/wtools.c:114 src/wtools.c:401 src/wtools.c:573 src/wtools.c:642
#: src/hotlist.c:140 src/hotlist.c:696 src/hotlist.c:777 src/layout.c:365
#: src/learn.c:58 src/option.c:143 src/panelize.c:89 src/view.c:411
#: src/wtools.c:114 src/wtools.c:401 src/wtools.c:573 src/wtools.c:653
msgid "&Cancel"
msgstr "&Ё╥┼╥╫┴╘╪"
@ -994,9 +994,9 @@ msgid "user &Mini status"
msgstr "є╘╥╧╦┴ &═╔╬╔-╙╘┴╘╒╙┴ ╫ ╞╧╥═┴╘┼ ╨╧╠╪┌╧╫┴╘┼╠╤"
#: gnome/gtools.c:129 src/boxes.c:137 src/boxes.c:272 src/boxes.c:372
#: src/boxes.c:417 src/boxes.c:559 src/boxes.c:679 src/boxes.c:722
#: src/boxes.c:831 src/file.c:1960 src/find.c:160 src/layout.c:383
#: src/option.c:173 src/wtools.c:295 src/wtools.c:575
#: src/boxes.c:459 src/boxes.c:601 src/boxes.c:721 src/boxes.c:764
#: src/boxes.c:873 src/file.c:1960 src/find.c:160 src/layout.c:364
#: src/option.c:142 src/wtools.c:295 src/wtools.c:575
msgid "&Ok"
msgstr "&ф┴╠╪█┼"
@ -1312,11 +1312,11 @@ msgstr ""
#: src/cmd.c:417
msgid " Filter "
msgstr ""
msgstr " ├е▒╝й╥ "
#: src/cmd.c:417
msgid " Set expression for filtering filenames"
msgstr ""
msgstr " ЮЙАЙ╗йК ╫Е╥Й╓К╛еК А▒╤ ╣йИ╣╥Й еаК╛ пЙ╗▒╣╫"
#: src/cmd.c:501
msgid " Select "
@ -1462,13 +1462,17 @@ msgstr ""
msgid " relative symlink: %s "
msgstr ""
#: src/cmd.c:1228
msgid " Enter machine name (F1 for details): "
msgstr " ж╫КАейК еа╤ аЙНе╛Е (АКйЙ▒е ║╣ F1): "
#: src/cmd.c:1257
msgid " Link to a remote machine "
msgstr ""
msgstr " н╣КАе╛К╛еК к вАЙ▒К╛╛╣╗ аЙНе╛╣╗ "
#: src/cmd.c:1263
msgid " FTP to machine "
msgstr ""
msgstr " FTP-к╣КАе╛К╛еК к вАЙ▒К╛╛╣╗ аЙНе╛╣╗ "
#: src/cmd.c:1273
msgid " Socket source routing setup "
@ -3666,7 +3670,7 @@ msgstr ""
msgid "Password"
msgstr ""
#: src/wtools.c:644
#: src/wtools.c:655
msgid "Ok"
msgstr ""

Просмотреть файл

@ -1,3 +1,24 @@
1998-04-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
* wtools.c (quick_callback): Process DLG_KEY events on X.
* utilunix.c (max_open_files): new routine; Used to figure out
the number of available file descriptors.
Sat Apr 4 00:16:49 1998 Alex Tkachenko <alex@bcs.zp.ua>
* src/layout.c: changes to layout dialog box i18n
* src/option.c: changes to configure box i18n
* src/cmd.c: added N_() macro for machine_str
* src/wtools.c (real_input_dialog_help): ok/cancel buttons are places
symmetrically spaced relatively to center of the box. It produces
nicer appearance with i18n (IMO :)
* src/boxes.c (confirm_box): i18n stuff added.
Mon Apr 6 07:48:22 1998 Pavel Roskin <pavel@absolute.spb.su>
* Makefile.in: "make dist" works with bash 1.x again

Просмотреть файл

@ -389,6 +389,48 @@ static QuickDialog confirmation =
void confirm_box ()
{
#ifdef ENABLE_NLS
static int i18n_flag = 0;
if (!i18n_flag)
{
register int i = sizeof(conf_widgets)/sizeof(QuickWidget) - 1;
int l1, maxlen = 0;
while (i--)
{
conf_widgets [i].text = _(conf_widgets [i].text);
l1 = strlen (conf_widgets [i].text) + 3;
if (l1 > maxlen)
maxlen = l1;
}
/*
* If buttons start on 4/6, checkboxes (with some add'l space)
* must take not more than it.
*/
confirmation.xlen = (maxlen + 5) * 6 / 4;
/*
* And this for the case when buttons with some space to the right
* do not fit within 2/6
*/
l1 = strlen (conf_widgets [0].text) + 3;
i = strlen (conf_widgets [1].text) + 5;
if (i > l1)
l1 = i;
i = (l1 + 3) * 6 / 2;
if (i > confirmation.xlen)
confirmation.xlen = i;
confirmation.title = _(confirmation.title);
i18n_flag = confirmation.i18n = 1;
}
#endif /* ENABLE_NLS */
my_delete = confirm_delete;
my_overwrite = confirm_overwrite;
my_execute = confirm_execute;

Просмотреть файл

@ -1225,7 +1225,7 @@ char *get_random_hint (void)
#ifdef USE_NETCODE
static char *machine_str = " Enter machine name (F1 for details): ";
static char *machine_str = N_(" Enter machine name (F1 for details): ");
static void nice_cd (char *text, char *xtext, char *help, char *prefix, int to_home)
{

Просмотреть файл

@ -140,7 +140,6 @@ static int height;
#define MINWIDTH 10
#define MINHEIGHT 5
#define BX 12
#define BY 12
#define B_2LEFT B_USER
@ -174,6 +173,9 @@ static struct {
{ 0, 0, 0, 0 }
};
static int first_width, second_width;
static char *layout_title, *title1, *title2, *title3, *output_lines_label;
static WButton *bleft_widget, *bright_widget;
static void _check_split (void)
@ -272,20 +274,20 @@ static int layout_callback (struct Dlg_head *h, int Id, int Msg)
old_output_lines = -1;
attrset (COLOR_NORMAL);
dlg_erase (h);
draw_box (h, 1, 1, 13, 56);
draw_box (h, 2, 4, 6, 23);
draw_box (h, 2, 29, 10, 25);
draw_box (h, 8, 4, 4, 23);
draw_box (h, 1, 2, h->lines - 2, h->cols - 4);
draw_box (h, 2, 4, 6, first_width);
draw_box (h, 8, 4, 4, first_width);
draw_box (h, 2, 5 + first_width, 10, second_width);
attrset (COLOR_HOT_NORMAL);
dlg_move (h, 1, 25);
addstr (_(" Layout "));
dlg_move (h, 1, (h->cols - strlen(layout_title))/2);
addstr (layout_title);
dlg_move (h, 2, 5);
addstr (_(" Panel split "));
addstr (title1);
dlg_move (h, 8, 5);
addstr (_(" Highlight... "));
dlg_move (h, 2, 30);
addstr (_(" Other options "));
addstr (title2);
dlg_move (h, 2, 6 + first_width);
addstr (title3);
update_split ();
dlg_move (h, 6, 13);
addch ('=');
@ -293,9 +295,9 @@ static int layout_callback (struct Dlg_head *h, int Id, int Msg)
if (old_output_lines != _output_lines){
old_output_lines = _output_lines;
attrset (COLOR_NORMAL);
dlg_move (h, 9, 40);
addstr (_("output lines"));
dlg_move (h, 9, 34);
dlg_move (h, 9, 16 + first_width);
addstr (output_lines_label);
dlg_move (h, 9, 10 + first_width);
printw ("%02d", _output_lines);
}
}
@ -342,7 +344,7 @@ static int layout_callback (struct Dlg_head *h, int Id, int Msg)
if (old_output_lines != _output_lines){
old_output_lines = _output_lines;
attrset (COLOR_NORMAL);
dlg_move (h, 9, 34);
dlg_move (h, 9, 10 + first_width);
printw ("%02d", _output_lines);
}
}
@ -356,49 +358,120 @@ static int layout_callback (struct Dlg_head *h, int Id, int Msg)
static void init_layout (void)
{
int i = sizeof (s_split_direction) / sizeof(char*) ;
static int i18n_layt_flag = 0;
static int b1, b2, b3;
int i = sizeof (s_split_direction) / sizeof(char*) ;
char* ok_button = _("&Ok");
char* cancel_button = _("&Cancel");
char* save_button = _("&Save");
if (!i18n_layt_flag)
{
while (i--)
{
s_split_direction [i] = _(s_split_direction [i]);
}
i18n_layt_flag = 1;
register int l1;
first_width = 19; /* length of line with '<' '>' buttons */
layout_title = _(" Layout ");
title1 = _(" Panel split ");
title2 = _(" Highlight... ");
title3 = _(" Other options ");
output_lines_label = _("output lines");
while (i--)
{
s_split_direction [i] = _(s_split_direction [i]);
l1 = strlen (s_split_direction [i]) + 7;
if (l1 > first_width)
first_width = l1;
}
for (i = 0; i <= 8; i++)
{
check_options[i].text = _(check_options[i].text);
l1 = strlen (check_options[i].text) + 7;
if (l1 > first_width)
first_width = l1;
}
l1 = strlen (title1) + 1;
if (l1 > first_width)
first_width = l1;
l1 = strlen (title2) + 1;
if (l1 > first_width)
first_width = l1;
second_width = strlen (title3) + 1;
for (i = 0; i < 6; i++)
{
check_options[i].text = _(check_options[i].text);
l1 = strlen (check_options[i].text) + 7;
if (l1 > second_width)
second_width = l1;
}
if (console_flag)
{
l1 = strlen (output_lines_label) + 13;
if (l1 > second_width)
second_width = l1;
}
/*
* alex@bcs.zp.ua:
* To be completely correct, one need to check if layout_title
* does not exceed dialog length and total length of 3 buttons
* allows their placement in one row. But assuming this dialog
* is wide enough, I don't include such a tests.
*
* Now the last thing to do - properly space buttons...
*/
l1 = 11 + strlen (ok_button) /* 14 - all brackets and inner space */
+ strlen (save_button) /* notice: it is 3 char less because */
+ strlen (cancel_button); /* of '&' char in button text */
i = (first_width + second_width - l1) / 4;
b1 = 5 + i;
b2 = b1 + strlen(ok_button) + i + 6;
b3 = b2 + strlen(save_button) + i + 4;
i18n_layt_flag = 1;
}
layout_dlg = create_dlg (0, 0, 15, 58, dialog_colors, layout_callback,
"[Layout]", "layout", DLG_CENTER | DLG_GRID);
layout_dlg = create_dlg (0, 0, 15, first_width + second_width + 9,
dialog_colors, layout_callback,
"[Layout]", "layout", DLG_CENTER | DLG_GRID);
x_set_dialog_title (layout_dlg, _("Layout"));
add_widgetl (layout_dlg,
button_new (BY, BX+25, B_CANCEL, NORMAL_BUTTON, _("&Cancel"), 0, 0, "c"),
button_new (BY, b3, B_CANCEL, NORMAL_BUTTON, cancel_button, 0, 0, "c"),
XV_WLAY_RIGHTOF);
add_widgetl (layout_dlg,
button_new (BY, BX+12, B_EXIT, NORMAL_BUTTON, _("&Save"), 0, 0, "s"),
button_new (BY, b2, B_EXIT, NORMAL_BUTTON, save_button, 0, 0, "s"),
XV_WLAY_RIGHTOF);
add_widgetl (layout_dlg,
button_new (BY, BX, B_ENTER, DEFPUSH_BUTTON, _("&Ok"), 0, 0, "o"),
button_new (BY, b1, B_ENTER, DEFPUSH_BUTTON, ok_button, 0, 0, "o"),
XV_WLAY_CENTERROW);
#ifndef HAVE_X
if (console_flag){
add_widget (layout_dlg,
button_new (9, 36, B_MINUS, NARROW_BUTTON, "&-", bminus_cback, 0, NULL));
button_new (9, 12 + first_width, B_MINUS, NARROW_BUTTON, "&-",
bminus_cback, 0, NULL));
add_widget (layout_dlg,
button_new (9, 31, B_PLUS, NARROW_BUTTON, "&+", bplus_cback, 0, NULL));
button_new (9, 7 + first_width, B_PLUS, NARROW_BUTTON, "&+",
bplus_cback, 0, NULL));
}
#endif
#define XTRACT(i) *check_options[i].variable, _(check_options[i].text), check_options[i].tkname
#define XTRACT(i) *check_options[i].variable, check_options[i].text, check_options[i].tkname
for (i = 0; i < 6; i++){
check_options [i].widget = check_new (8 - i, 31, XTRACT(i));
check_options [i].widget = check_new (8 - i, 7 + first_width, XTRACT(i));
add_widgetl (layout_dlg, check_options [i].widget, XV_WLAY_BELOWCLOSE);
}
#ifdef HAVE_XVIEW
add_widgetl (layout_dlg, label_new (2, 30, _("Other options"), "oo"),
add_widgetl (layout_dlg, label_new (2, 7 + first_width, _("Other options"), "oo"),
XV_WLAY_NEXTCOLUMN);
add_widgetl (layout_dlg, label_new (8, 5, _("Highlight..."), "hl"),
XV_WLAY_NEXTCOLUMN);

Просмотреть файл

@ -45,22 +45,12 @@
#define PX 4
#define PY 2
#define RX 4
#define RY 11
#define RX 4
#define RY 11
#define CX 4
#define CY 2
#define BX 14
#define BY 16
#define OX 33
#define OY 2
#define TX 35
#define TY 11
static Dlg_head *conf_dlg;
static int r_but;
@ -71,6 +61,9 @@ extern int use_internal_edit;
int dummy;
static int OX = 33, first_width = 27, second_width = 27;
static char *configure_title, *title1, *title2, *title3;
static struct {
char *text;
int *variable;
@ -117,20 +110,20 @@ static int configure_callback (struct Dlg_head *h, int Id, int Msg)
#ifndef HAVE_X
attrset (COLOR_NORMAL);
dlg_erase (h);
draw_box (h, 1, 1, 17, 62);
draw_box (h, PY, PX, 8, 27);
draw_box (h, OY, OX, 14, 27);
draw_box (h, RY, RX, 5, 27);
draw_box (h, 1, 2, h->lines - 2, h->cols - 4);
draw_box (h, PY, PX, 8, first_width);
draw_box (h, RY, RX, 5, first_width);
draw_box (h, OY, OX, 14, second_width);
attrset (COLOR_HOT_NORMAL);
dlg_move (h, 1, (62 - 20)/2);
addstr (_(" Configure options "));
dlg_move (h, 1, (h->cols - strlen(configure_title))/2);
addstr (configure_title);
dlg_move (h, OY, OX+1);
addstr (_(" Other options "));
addstr (title3);
dlg_move (h, RY, RX+1);
addstr (_(" Pause after run... "));
addstr (title2);
dlg_move (h, PY, PX+1);
addstr (_(" Panel options "));
addstr (title1);
#endif
break;
@ -145,35 +138,86 @@ static void init_configure (void)
{
int i;
static int i18n_config_flag = 0;
static int b1, b2, b3;
char* ok_button = _("&Ok");
char* cancel_button = _("&Cancel");
char* save_button = _("&Save");
if (!i18n_config_flag)
{
i = sizeof(pause_options)/sizeof(char*);
register int l1;
/* Similar code is in layout.c (init_layout()) */
configure_title = _(" Configure options ");
title1 = _(" Panel options ");
title2 = _(" Pause after run... ");
title3 = _(" Other options ");
first_width = strlen (title1) + 1;
for (i = 12; i < 18; i++)
{
check_options[i].text = _(check_options[i].text);
l1 = strlen (check_options[i].text) + 7;
if (l1 > first_width)
first_width = l1;
}
i = sizeof(pause_options)/sizeof(char*);
while (i--)
{
pause_options [i] = _(pause_options [i]);
l1 = strlen (pause_options [i]) + 7;
if (l1 > first_width)
first_width = l1;
}
l1 = strlen (title2) + 1;
if (l1 > first_width)
first_width = l1;
OX = first_width + 5;
second_width = strlen (title3) + 1;
for (i = 0; i < 12; i++)
{
check_options[i].text = _(check_options[i].text);
l1 = strlen (check_options[i].text) + 7;
if (l1 > second_width)
second_width = l1;
}
l1 = 11 + strlen (ok_button)
+ strlen (save_button)
+ strlen (cancel_button);
i = (first_width + second_width - l1) / 4;
b1 = 5 + i;
b2 = b1 + strlen(ok_button) + i + 6;
b3 = b2 + strlen(save_button) + i + 4;
i18n_config_flag = 1;
}
conf_dlg = create_dlg (0, 0, 19, 64, dialog_colors,
configure_callback, "[Options Menu]",
"option", DLG_CENTER | DLG_GRID);
conf_dlg = create_dlg (0, 0, 19, first_width + second_width + 9,
dialog_colors, configure_callback, "[Options Menu]",
"option", DLG_CENTER | DLG_GRID);
x_set_dialog_title (conf_dlg, _("Configure options"));
add_widgetl (conf_dlg,
button_new (BY, BX+26, B_CANCEL, NORMAL_BUTTON, _("&Cancel"), 0, 0, "button-cancel"),
button_new (BY, b3, B_CANCEL, NORMAL_BUTTON, cancel_button, 0, 0, "button-cancel"),
XV_WLAY_RIGHTOF);
add_widgetl (conf_dlg,
button_new (BY, BX+12, B_EXIT, NORMAL_BUTTON, _("&Save"), 0, 0, "button-save"),
button_new (BY, b2, B_EXIT, NORMAL_BUTTON, save_button, 0, 0, "button-save"),
XV_WLAY_RIGHTOF);
add_widgetl (conf_dlg,
button_new (BY, BX, B_ENTER, DEFPUSH_BUTTON, _("&Ok"), 0, 0, "button-ok"),
button_new (BY, b1, B_ENTER, DEFPUSH_BUTTON, ok_button, 0, 0, "button-ok"),
XV_WLAY_CENTERROW);
#define XTRACT(i) *check_options[i].variable, _(check_options[i].text), check_options [i].tk
#define XTRACT(i) *check_options[i].variable, check_options[i].text, check_options [i].tk
/* Add all the checkboxes */
for (i = 0; i < 12; i++){
@ -182,7 +226,7 @@ static void init_configure (void)
XV_WLAY_BELOWCLOSE);
}
pause_radio = radio_new (RY+1, RX+1, 3, pause_options, 1, "pause-radio");
pause_radio = radio_new (RY+1, RX+2, 3, pause_options, 1, "pause-radio");
pause_radio->sel = pause_after_run;
add_widgetl (conf_dlg, pause_radio, XV_WLAY_BELOWCLOSE);

Просмотреть файл

@ -120,7 +120,7 @@ typedef struct {
void *filter_w; /* A WInput* */
void *current_dir; /* A WInput* */
int estimated_total;
int estimated_total;
#endif
} WPanel;
@ -226,6 +226,7 @@ void file_mark (WPanel *panel, int index, int val);
void do_file_mark (WPanel *panel, int index, int val);
int file_compute_color (int attr, file_entry *fe);
int file_entry_color (file_entry *fe);
void do_file_mark_range (WPanel *panel, int r1, int r2);
/* NOTE: Have to be ifdefed for HAVE_X */
void x_panel_select_item (WPanel *panel, int index, int val);

Просмотреть файл

@ -967,24 +967,24 @@ panel_new (char *panel_name)
panel->dir_history = history_get (panel->hist_name);
directory_history_add (panel, panel->cwd);
panel->dir.list = (file_entry *) malloc (MIN_FILES * sizeof (file_entry));
panel->dir.size = MIN_FILES;
panel->active = 0;
panel->filter = 0;
panel->split = 0;
panel->top_file = 0;
panel->selected = 0;
panel->marked = 0;
panel->total = 0;
panel->reverse = 0;
panel->dirty = 1;
panel->searching = 0;
panel->dirs_marked = 0;
panel->is_panelized = 0;
panel->has_dir_sizes = 0;
panel->format = 0;
panel->status_format = 0;
panel->format_modified = 1;
panel->dir.list = (file_entry *) malloc (MIN_FILES * sizeof (file_entry));
panel->dir.size = MIN_FILES;
panel->active = 0;
panel->filter = 0;
panel->split = 0;
panel->top_file = 0;
panel->selected = 0;
panel->marked = 0;
panel->total = 0;
panel->reverse = 0;
panel->dirty = 1;
panel->searching = 0;
panel->dirs_marked = 0;
panel->is_panelized = 0;
panel->has_dir_sizes = 0;
panel->format = 0;
panel->status_format = 0;
panel->format_modified = 1;
panel->panel_name = strdup (panel_name);
panel->user_format = strdup (DEFAULT_USER_FORMAT);
@ -1863,6 +1863,19 @@ do_file_mark (WPanel *panel, int idx, int mark)
}
}
void
do_file_mark_range (WPanel *panel, int r1, int r2)
{
const int start = min (r1, r2);
const int end = max (r1, r2);
int i, mark;
mark = !panel->dir.list [start].f.marked;
for (i = start; i < end; i++)
do_file_mark (panel, i, mark);
}
static void
do_mark_file (WPanel *panel, int do_move)
{

Просмотреть файл

@ -348,6 +348,7 @@ char *color_terminals [] = {
"linux",
"xterm-color",
"color-xterm",
"dtterm",
"xtermc",
"ansi",
0

Просмотреть файл

@ -1,3 +1,4 @@
/* Defines what features are to be includes in the text mode edition */
#define COMPUTE_FORMAT_ALLOCATIONS
#define port_shutdown_extra_fds()

Просмотреть файл

@ -177,6 +177,7 @@ void message_2s (int flags, char *title, char *str1, char *str2);
void message_3s (int flags, char *title, char *str1, char *str2, const char *str3);
void message_1s1d (int flags, char *title, char *str, int d);
void tell_parent (int msg);
int max_open_files (void);
#ifdef OS2_NT
# define PATH_SEP '\\'

Просмотреть файл

@ -74,6 +74,26 @@ extern struct mount_entry *mount_list;
uid_t current_user_uid;
user_in_groups *current_user_gid;
int
max_open_files (void)
{
static int files;
if (files)
return files;
#ifdef HAVE_SYSCONF
files = sysconf (_SC_OPEN_MAX);
if (files != -1)
return files;
#endif
#ifdef OPEN_MAX
return files = OPEN_MAX;
#else
return files = 256;
#endif
}
void init_groups (void)
{
int i;
@ -436,7 +456,8 @@ int mc_doublepopen (int inhandle, int inlen, pid_t *the_pid, char *command, ...)
pid_t pid;
#define closepipes() close(pipe0[0]);close(pipe0[1]);close(pipe1[0]);close(pipe1[1])
#define is_a_pipe_fd(f) ((pipe0[0] == f) || (pipe0[1] == f) || (pipe1[0] == f) || (pipe1[1] == f))
pipe (pipe0); pipe (pipe1);
ignore.sa_handler = SIG_IGN;
sigemptyset (&ignore.sa_mask);
@ -447,10 +468,10 @@ int mc_doublepopen (int inhandle, int inlen, pid_t *the_pid, char *command, ...)
sigaction (SIGTSTP, &startup_handler, &save_stop);
switch (pid = fork ()) {
case -1:
case -1:
closepipes ();
return -1;
case 0:
case 0: {
sigaction (SIGINT, &save_intr, NULL);
sigaction (SIGQUIT, &save_quit, NULL);
@ -458,34 +479,35 @@ int mc_doublepopen (int inhandle, int inlen, pid_t *the_pid, char *command, ...)
case -1:
closepipes ();
exit (1);
case 0:
{
case 0: {
#define MAXARGS 16
int argno;
char *args[MAXARGS];
va_list ap;
int nulldevice;
int argno;
char *args[MAXARGS];
va_list ap;
int nulldevice;
nulldevice = open ("/dev/null", O_WRONLY);
close (0);
dup (pipe0 [0]);
close (1);
dup (pipe1 [1]);
close (2);
dup (nulldevice);
close (nulldevice);
closepipes ();
va_start (ap, command);
argno = 0;
while ((args[argno++] = va_arg(ap, char *)) != NULL)
if (argno == (MAXARGS - 1)) {
args[argno] = NULL;
break;
}
va_end (ap);
execvp (command, args);
exit (0);
}
port_shutdown_extra_fds ();
nulldevice = open ("/dev/null", O_WRONLY);
close (0);
dup (pipe0 [0]);
close (1);
dup (pipe1 [1]);
close (2);
dup (nulldevice);
close (nulldevice);
closepipes ();
va_start (ap, command);
argno = 0;
while ((args[argno++] = va_arg(ap, char *)) != NULL)
if (argno == (MAXARGS - 1)) {
args[argno] = NULL;
break;
}
va_end (ap);
execvp (command, args);
exit (0);
}
default:
{
char buffer [8192];
@ -508,12 +530,15 @@ int mc_doublepopen (int inhandle, int inlen, pid_t *the_pid, char *command, ...)
while (waitpid (pid, &i, 0) < 0)
if (errno != EINTR)
break;
port_shutdown_extra_fds ();
exit (i);
}
}
default:
*the_pid = pid;
break;
}
default:
*the_pid = pid;
break;
}
close (pipe0 [0]);
close (pipe0 [1]);

Просмотреть файл

@ -433,14 +433,13 @@ static int quick_callback (struct Dlg_head *h, int id, int Msg)
dlg_move (h, 1,((h->cols-strlen (h->data))/2));
addstr (h->data);
break;
#endif
case DLG_KEY:
if (id == '\n'){
h->ret_value = B_ENTER;
dlg_stop (h);
break;
}
#endif
}
return 0;
}
@ -604,6 +603,17 @@ char *real_input_dialog_help (char *header, char *text, char *help, char *def_te
} else {
quick_widgets [INPUT_INDEX].value = 0;
}
#ifdef ENABLE_NLS
/*
* An attempt to place buttons symmetrically, based on actual i18n
* length of the string. It looks nicer with i18n (IMO) - alex
*/
quick_widgets [0].relative_x = len/2 + 4;
quick_widgets [1].relative_x =
len/2 - (strlen (_(quick_widgets [1].text)) + 9);
quick_widgets [0].x_divisions = quick_widgets [1].x_divisions = len;
#endif /* ENABLE_NLS */
Quick_input.xlen = len;
Quick_input.xpos = -1;

Просмотреть файл

@ -14,6 +14,6 @@
#define PORT_HAS_DISPLAY_MINI_INFO 1
#define frontend_run_dlg(x) tkrundlg_event (x)
#define port_shutdown_extra_fds()
/* Other */
#define COMPUTE_FORMAT_ALLOCATIONS

Просмотреть файл

@ -4,5 +4,5 @@
#define PORT_HAS_FRONTEND_RUN_DLG 1
#define mi_getch() fprintf (stderr, "mi_getch is not implemented\n")
#define frontend_run_dlg(x) xvrundlg_event (x)
#define port_shutdown_extra_fds()
#define COMPUTE_FORMAT_ALLOCATIONS