Various changes:

- Fix for the gmc crashes when no window is open and you
	  start a program.

	- Bad attempts at fixing the sigwinch propagation.

	- Internationalization fixes from Alex (ru.po and
	  bunch of updates to the text mode edition to deal
	  wiht this).

Miguel.
This commit is contained in:
Miguel de Icaza 1998-05-06 20:04:08 +00:00
parent aa95c74fd2
commit e82bcc2bfc
7 changed files with 850 additions and 659 deletions

View File

@ -1020,7 +1020,10 @@ void edit_adjust_size (Dlg_head * h)
widget_set_size (&edit->widget, 0, 0, LINES - 1, COLS);
widget_set_size (&edit_bar->widget, LINES - 1, 0, 1, COLS);
widget_set_size (&edit_menubar->widget, 0, 0, 1, COLS);
menubar_arrange(edit_menubar);
#ifdef RESIZABLE_MENUBAR
menubar_arrange(edit_menubar);
#endif
}
void edit_update_screen (WEdit * e)

View File

@ -473,6 +473,10 @@ update_panels (int force_update, char *current_file)
{
int reload_others = !(force_update & UP_ONLY_CURRENT);
GList *p;
/* Test if there are panels open */
if (!cpanel)
return;
update_one_panel_widget (cpanel, force_update, current_file);

View File

@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Date: 1998-05-04 13:16:20-0500\n"
"Date: 1998-05-04 14:51:13-0500\n"
"From: Miguel de Icaza,computo,622-4680 <miguel@metropolis.nuclecu.unam.mx>\n"
"Content-Type: text/plain; charset=\n"
"Xgettext-Options: --default-domain=mc --directory=.. --add-comments --keyword=_ --keyword=N_ --files-from=./POTFILES.in\n"

1375
po/ru.po

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,13 @@
1998-05-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
* layout.c (flag_winch): Propagate the window change to the slave
pty even when not running our event loop. The resize_subshell
routine is thread safe.
* dlg.c (update_cursor, dlg_broadcast_msg_to): Do not send
messages if no widgets are on the Dlg_head, this happens now with
the gmc code, as we can have all of the windows shut down.
Wed May 6 13:46:37 1998 Paul Sheer <psheer@obsidian.co.za>
* syntax.c: more bug fixes.
@ -47,6 +57,23 @@ Fri May 1 11:24:21 1998 Paul Sheer <psheer@obsidian.co.za>
* syntax.c: syntax highlighting segfaults when editing a binary
file - now fixed.
Thu Apr 30 12:23:50 1998 Alex Tkachenko <alex@bcs.zp.ua>
* src/file.c: lot of i18n of file Copy/Move/Delete operations. Maintainers
of message catalogs please notice introduced op_names1 and formats for
file operations.
* src/boxes.c: i18n of background jobs control and quick cd
dialog boxes.
* src/menu.c (menubar_arrange): resizing of menubar upon changes of
window size is now controlled by preprocessor symbol RESIZABLE_MENUBAR
(now it's off by default, as requested in mailing list). If it is off,
menubar items are separated with fixed number of spaces (3).
* src/layout.c, edit/editwidget.c: calls to menubar_arrange ifdef'ed
1998-04-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* main.c (parse_an_arg): GNOME edition keeps track of various

View File

@ -760,23 +760,34 @@ char *cd_dialog (void)
#else
#define INPUT_INDEX 0
#endif
{ quick_input, 8, 80, 5, 0, "", 50, 0, 0, 0, XV_WLAY_RIGHTOF, "input" },
{ quick_label, 3, 80, 2, 0, "", 0, 0, 0, 0, XV_WLAY_DONTCARE, "label" },
{ quick_input, 6, 57, 5, 0, "", 50, 0, 0, 0, XV_WLAY_RIGHTOF, "input" },
{ quick_label, 3, 57, 2, 0, "", 0, 0, 0, 0, XV_WLAY_DONTCARE, "label" },
{ 0 } };
char *my_str;
int len;
Quick_input.xlen = 57;
Quick_input.title = "Quick cd";
Quick_input.title = _("Quick cd");
Quick_input.help = "[Quick cd]";
Quick_input.class = "quick_input";
Quick_input.i18n = 0;
quick_widgets [INPUT_INDEX].text = "";
quick_widgets [INPUT_INDEX].value = 2; /* want cd like completion */
quick_widgets [INPUT_INDEX+1].text = "cd";
quick_widgets [INPUT_INDEX+1].text = _("cd");
quick_widgets [INPUT_INDEX+1].y_divisions =
quick_widgets [INPUT_INDEX].y_divisions =
Quick_input.ylen = 5;
quick_widgets [INPUT_INDEX].y_divisions = Quick_input.ylen = 5;
len = strlen (quick_widgets [INPUT_INDEX+1].text);
quick_widgets [INPUT_INDEX+1].relative_x = 3;
quick_widgets [INPUT_INDEX].relative_x =
quick_widgets [INPUT_INDEX+1].relative_x + len + 1;
Quick_input.xlen = len + quick_widgets [INPUT_INDEX].hotkey_pos + 7;
quick_widgets [INPUT_INDEX].x_divisions =
quick_widgets [INPUT_INDEX+1].x_divisions = Quick_input.xlen;
Quick_input.i18n = 1;
Quick_input.xpos = 2;
Quick_input.ypos = LINES - 2 - Quick_input.ylen;
quick_widgets [INPUT_INDEX].relative_y = 2;
@ -836,7 +847,7 @@ void symlink_dialog (char *existing, char *new, char **ret_existing,
#define B_RESUME B_USER+2
#define B_KILL B_USER+3
#define JOBS_X 60
static int JOBS_X = 60;
#define JOBS_Y 15
static WListbox *bg_list;
static Dlg_head *jobs_dlg;
@ -897,9 +908,54 @@ task_cb (int action, void *ignored)
return 0;
}
static struct
{
char* name;
int xpos;
int value;
int (*callback)();
char* tkname;
}
job_buttons [] =
{
{N_("&Stop"), 3, B_STOP, task_cb, "button-stop"},
{N_("&Resume"), 12, B_RESUME, task_cb, "button-cont"},
{N_("&Kill"), 23, B_KILL, task_cb, "button-kill"},
{N_("&Ok"), 35, B_CANCEL, NULL, "button-ok"},
};
void
jobs_cmd (void)
{
register int i;
int n_buttons = sizeof (job_buttons) / sizeof (job_buttons[0]);
#ifdef ENABLE_NLS
static int i18n_flag = 0;
if (!i18n_flag)
{
int startx = job_buttons [0].xpos;
int len;
for (i = 0; i < n_buttons; i++)
{
job_buttons [i].name = _(job_buttons [i].name);
len = strlen (job_buttons [i].name) + 4;
JOBS_X = max (JOBS_X, startx + len + 3);
job_buttons [i].xpos = startx;
startx += len;
}
/* Last button - Ok a.k.a. Cancel :) */
job_buttons [n_buttons - 1].xpos =
JOBS_X - strlen (job_buttons [n_buttons - 1].name) - 7;
i18n_flag = 1;
}
#endif /* ENABLE_NLS */
jobs_dlg = create_dlg (0, 0, JOBS_Y, JOBS_X, dialog_colors,
common_dialog_callback, "[Background jobs]", "jobs",
DLG_CENTER | DLG_GRID);
@ -907,16 +963,17 @@ jobs_cmd (void)
bg_list = listbox_new (2, 3, JOBS_X-7, JOBS_Y-9, listbox_nothing, 0, "listbox");
add_widget (jobs_dlg, bg_list);
add_widget (jobs_dlg,
button_new (JOBS_Y-4, 35, B_CANCEL, NORMAL_BUTTON, _("&Ok"), 0, 0, "button-ok"));
add_widget (jobs_dlg,
button_new (JOBS_Y-4, 23, B_KILL, NORMAL_BUTTON, _("&Kill"), task_cb, 0, "button-kill"));
add_widget (jobs_dlg,
button_new (JOBS_Y-4, 12, B_RESUME, NORMAL_BUTTON, _("&Resume"), task_cb, 0, "button-cont"));
add_widget (jobs_dlg,
button_new (JOBS_Y-4, 3, B_STOP, NORMAL_BUTTON, _("&Stop"), task_cb, 0, "button-stop"));
i = n_buttons;
while (i--)
{
add_widget (jobs_dlg, button_new (JOBS_Y-4,
job_buttons [i].xpos, job_buttons [i].value,
NORMAL_BUTTON, job_buttons [i].name,
job_buttons [i].callback, 0,
job_buttons [i].tkname));
}
/* Insert all of task information in the list */
jobs_fill_listbox ();
run_dlg (jobs_dlg);

View File

@ -379,6 +379,9 @@ void dlg_broadcast_msg_to (Dlg_head *h, int message, int reverse, int flags)
{
Widget_Item *p, *first;
if (!h->current)
return;
if (reverse)
first = p = h->current->prev;
else
@ -538,6 +541,8 @@ int send_message_to (Dlg_head *h, Widget *w, int msg, int par)
void update_cursor (Dlg_head *h)
{
if (!h->current)
return;
if (h->current->widget->options & W_WANT_CURSOR)
send_message (h, h->current->widget, WIDGET_CURSOR, 0);
else {