1
1

1999-08-01 David Martin <dmartina@usa.net>

* gnome/gcmd.c (gnome_about_cmd): Change strings in gmc "about" to
static as they only translated once.

* src/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.

* src/widget.c: Translate History box tittle.

* po/es.po, po/es_ES.po: added translation for history box title



1999-08-01  Norbert Warmuth  <nwarmuth@privat.circular.de>

* src/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.
Этот коммит содержится в:
Norbert Warmuth 1999-08-01 11:37:25 +00:00
родитель d8513ecd2c
Коммит fc05bf2408
10 изменённых файлов: 81 добавлений и 38 удалений

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

@ -1,3 +1,8 @@
1999-08-01 David Martin <dmartina@usa.net>
* gcmd.c (gnome_about_cmd): Change strings in gmc "about" to
static as they only translated once.
1999-08-01 <jrb@redhat.com>
* glayout.c: moved Preferences to a settings menu.

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

@ -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"),

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

@ -1,6 +1,10 @@
1999-08-01 David Martin <dmartina@usa.net>
* es.po, es_ES.po: added translation for history box title
1997-07-23 Spiros Papadimitriou <spapadim+@cs.cmu.edu>
* el.po: Added; translation still incomplete.
* el.po: Added; translation still incomplete.
1999-07-21 Vincent Renardias <vincent@ldsol.com>

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

@ -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

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

@ -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

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

@ -1,3 +1,12 @@
1999-08-01 David Martin <dmartina@usa.net>
* 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 <nwarmuth@privat.circular.de>
* popt.c, popt.h, poptconfig.c, popthelp.c, poptparse.c: updated

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

@ -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);

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

@ -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;

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

@ -1,3 +1,13 @@
1999-08-01 Norbert Warmuth <nwarmuth@privat.circular.de>
* 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 <mc@bat.ru>
* samba/include/config.h: Removed. Should be generated.

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

@ -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;