diff --git a/gnome/ChangeLog b/gnome/ChangeLog index c8bb4f9e6..2c6c36a30 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,8 @@ +1999-08-01 David Martin + + * gcmd.c (gnome_about_cmd): Change strings in gmc "about" to + static as they only translated once. + 1999-08-01 * glayout.c: moved Preferences to a settings menu. diff --git a/gnome/gcmd.c b/gnome/gcmd.c index 14fbad560..9a8dff69e 100644 --- a/gnome/gcmd.c +++ b/gnome/gcmd.c @@ -105,7 +105,7 @@ gnome_about_cmd (void) { GtkWidget *about; static int translated; - const gchar *authors[] = { + static const gchar *authors[] = { N_("The Midnight Commander Team"), "http://www.gnome.org/mc/", N_("bug reports: http://bugs.gnome.org, or use gnome-bug"), diff --git a/po/ChangeLog b/po/ChangeLog index 941f69cbd..b3bbd1243 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,6 +1,10 @@ +1999-08-01 David Martin + + * es.po, es_ES.po: added translation for history box title + 1997-07-23 Spiros Papadimitriou - * el.po: Added; translation still incomplete. + * el.po: Added; translation still incomplete. 1999-07-21 Vincent Renardias diff --git a/po/es.po b/po/es.po index a173fe412..47db76bbd 100644 --- a/po/es.po +++ b/po/es.po @@ -5655,6 +5655,10 @@ msgstr "SinForm" msgid "Format" msgstr "Formato" +#: src/widget.c:998 +msgid " History " +msgstr " Histórico " + #. KEY_F(0) is not here, since we are mapping it to f10, so there is no reason #. to define f0 as well. Also, it makes Learn keys a bunch of problems :( #: src/win.c:224 diff --git a/po/es_ES.po b/po/es_ES.po index b397242a4..6288b0a23 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -5655,6 +5655,10 @@ msgstr "SinForm" msgid "Format" msgstr "Formato" +#: src/widget.c:998 +msgid " History " +msgstr " Histórico " + #. KEY_F(0) is not here, since we are mapping it to f10, so there is no reason #. to define f0 as well. Also, it makes Learn keys a bunch of problems :( #: src/win.c:224 diff --git a/src/ChangeLog b/src/ChangeLog index 5b465dfc3..f447e667c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +1999-08-01 David Martin + + * menu.c (create_menu, menubar_drop_compute, menubar_paint_idx): + Discount '&' for hotkeys when checking menu widths to avoid the + extra blank space. + Moved this accounting from the drawing to the creating function. + + * widget.c: Translate History box tittle. + 1999-07-21 Norbert Warmuth * popt.c, popt.h, poptconfig.c, popthelp.c, poptparse.c: updated diff --git a/src/menu.c b/src/menu.c index de3b2a4d4..33cdf6087 100644 --- a/src/menu.c +++ b/src/menu.c @@ -50,6 +50,7 @@ static void menu_scan_hotkey(Menu menu) Menu create_menu (char *name, menu_entry *entries, int count) { Menu menu; + char *cp; menu = (Menu) g_malloc (sizeof (*menu)); menu->count = count; @@ -57,17 +58,24 @@ Menu create_menu (char *name, menu_entry *entries, int count) menu->entries = entries; #ifdef ENABLE_NLS - if (entries != (menu_entry*) NULL) - { - register menu_entry* mp; - for (mp = entries; count--; mp++) - { - if (mp->text[0] == '\0') - continue; + if (entries != (menu_entry*) NULL) { + register menu_entry* mp; + for (mp = entries; count--; mp++) { + if (mp->text[0] != '\0') { + mp->text = _(mp->text); + cp = strchr (mp->text,'&'); - mp->text = _(mp->text); + if (cp != NULL && *(cp+1) != '\0') { + mp->hot_key = tolower (*(cp+1)); + menu->max_entry_len = max (strlen (mp->text) - 1, + menu->max_entry_len); + } else { + menu->max_entry_len = max (strlen (mp->text), + menu->max_entry_len); } + } } + } #endif /* ENABLE_NLS */ menu->name = g_strdup ( _(name) ); @@ -78,13 +86,7 @@ Menu create_menu (char *name, menu_entry *entries, int count) static void menubar_drop_compute (WMenu *menubar) { - const Menu menu = menubar->menu [menubar->selected]; - int max_entry_len = 0; - int i; - - for (i = 0; i < menu->count; i++) - max_entry_len = max (max_entry_len, strlen (menu->entries [i].text)); - menubar->max_entry_len = max_entry_len = max (max_entry_len, 20); + menubar->max_entry_len = menubar->menu [menubar->selected]->max_entry_len; } static void menubar_paint_idx (WMenu *menubar, int idx, int color) @@ -99,27 +101,24 @@ static void menubar_paint_idx (WMenu *menubar, int idx, int color) widget_move (&menubar->widget, y, x); attrset (color); hline (' ', menubar->max_entry_len+2); - if (!*menu->entries [idx].text){ + if (!*menu->entries [idx].text) { attrset (SELECTED_COLOR); widget_move (&menubar->widget, y, x + 1); hline (slow_terminal ? ' ' : ACS_HLINE, menubar->max_entry_len); } else { - unsigned char *text = menu->entries [idx].text; + unsigned char *text; addch((unsigned char)menu->entries [idx].first_letter); for (text = menu->entries [idx].text; *text; text++) { - if (*text == '&') - { - ++text; - menu->entries [idx].hot_key = tolower(*text); - attrset (color == MENU_SELECTED_COLOR ? - MENU_HOTSEL_COLOR : MENU_HOT_COLOR); - addch(*text); - attrset(color); - continue; + if (*text != '&') + addch(*text); + else { + attrset (color == MENU_SELECTED_COLOR ? + MENU_HOTSEL_COLOR : MENU_HOT_COLOR); + addch(*(++text)); + attrset(color); } - addch(*text); } } widget_move (&menubar->widget, y, x + 1); diff --git a/src/widget.c b/src/widget.c index bb709b3d7..ea22ff88b 100644 --- a/src/widget.c +++ b/src/widget.c @@ -990,7 +990,15 @@ void history_put (char *input_name, Hist *h) /* {{{ history display */ -static const char history_title[] = " History "; +static char * +i18n_htitle (void) +{ + static char *history_title = NULL; + + if (history_title == NULL) + history_title = _(" History "); + return history_title; +} static int history_callback (Dlg_head * h, int Par, int Msg) @@ -1002,8 +1010,8 @@ history_callback (Dlg_head * h, int Par, int Msg) dlg_erase (h); draw_box (h, 0, 0, h->lines, h->cols); attrset (COLOR_HOT_NORMAL); - dlg_move (h, 0, (h->cols - strlen (history_title)) / 2); - printw ((char *) history_title); + dlg_move (h, 0, (h->cols - strlen (i18n_htitle())) / 2); + printw (i18n_htitle()); break; } #endif @@ -1015,7 +1023,7 @@ static inline int listbox_fwd (WListbox *l); char *show_hist (Hist *history, int widget_x, int widget_y) { Hist *hi, *z; - int maxlen = strlen(history_title), i, count = 0; + size_t maxlen = strlen (i18n_htitle()), i, count = 0; int x, y, w, h; char *q, *r = 0; Dlg_head *query_dlg; diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 85d4f9020..cb20677e0 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,13 @@ +1999-08-01 Norbert Warmuth + + * vfs.c: Don't close a function definition with "};". SunCC from + 2.5.1 chokes on the extra semicolon + + (mc_munmap): Don't dereference function pointer when checking for + NULL (this check is supposed to prevent a segfault instead of + causing one). This haven't got noticed up to now becaue there's no + file system with mmap but without munmap. + Tue Jul 6 11:22:40 1999 Timur I. Bakeyev * samba/include/config.h: Removed. Should be generated. diff --git a/vfs/vfs.c b/vfs/vfs.c index 2a1431de9..dbe950733 100644 --- a/vfs/vfs.c +++ b/vfs/vfs.c @@ -451,7 +451,7 @@ mc_open (char *file, int flags, ...) #define MC_HANDLEOP(name, inarg, callarg) \ MC_OP (name, inarg, callarg, if (handle == -1) return -1; vfs = vfs_op (handle);, ) -MC_HANDLEOP(read, (int handle, char *buffer, int count), (vfs_info (handle), buffer, count) ); +MC_HANDLEOP(read, (int handle, char *buffer, int count), (vfs_info (handle), buffer, count) ) int mc_ctl (int handle, int ctlop, int arg) @@ -665,10 +665,10 @@ int mc_##name (char *name1, char *name2) \ return result; \ } -MC_RENAMEOP (link); -MC_RENAMEOP (rename); +MC_RENAMEOP (link) +MC_RENAMEOP (rename) -MC_HANDLEOP (write, (int handle, char *buf, int nbyte), (vfs_info (handle), buf, nbyte)); +MC_HANDLEOP (write, (int handle, char *buf, int nbyte), (vfs_info (handle), buf, nbyte)) off_t mc_lseek (int fd, off_t offset, int whence) { @@ -1055,7 +1055,7 @@ mc_munmap (caddr_t addr, size_t len) mc_mmaparray = mcm->next; else mcm2->next = mcm->next; - if (*mcm->vfs->munmap) + if (mcm->vfs->munmap) (*mcm->vfs->munmap)(mcm->vfs, addr, len, mcm->vfs_info); g_free (mcm); return 0;