diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-07-06 11:36:05 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-07-06 11:36:05 +0200 |
commit | 9d911f6c1179cbf7b04597e954e19a1b3567a5bf (patch) | |
tree | 0650d4ed92cd58151c2995584975b2f16ece669e | |
parent | 28088484df5c0cebeb0b4c8887e12bb9c619bf33 (diff) | |
download | weechat-9d911f6c1179cbf7b04597e954e19a1b3567a5bf.zip |
Display number of lines remaining after last line displayed screen in "-MORE-" indicator
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 6 | ||||
-rw-r--r-- | po/es.po | 25 | ||||
-rw-r--r-- | po/fr.po | 8 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 29 | ||||
-rw-r--r-- | src/gui/gui-bar-item.c | 4 | ||||
-rw-r--r-- | src/gui/gui-window.c | 1 | ||||
-rw-r--r-- | src/gui/gui-window.h | 2 |
11 files changed, 73 insertions, 26 deletions
@@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-07-03 12:38+0200\n" +"POT-Creation-Date: 2008-07-06 11:26+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1758,6 +1758,10 @@ msgid "filtered" msgstr "uživatel byl zablokován" #, fuzzy, c-format +msgid "%s-MORE(%d)-" +msgstr "-VÍCE-" + +#, fuzzy, c-format msgid "%sError: a buffer with same name already exists (%s / %s)" msgstr "" "%s nemohu načíst plugin \"%s\": plugin se stejným jménem již existuje\n" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-07-03 12:38+0200\n" +"POT-Creation-Date: 2008-07-06 11:26+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1759,6 +1759,10 @@ msgid "filtered" msgstr "/users wurde deaktiviert" #, fuzzy, c-format +msgid "%s-MORE(%d)-" +msgstr "-MEHR-" + +#, fuzzy, c-format msgid "%sError: a buffer with same name already exists (%s / %s)" msgstr "" "%s kann Plugin \"%s\" nicht laden: ein gleichnamiges Plugin existiert " @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-07-03 12:38+0200\n" +"POT-Creation-Date: 2008-07-06 11:26+0200\n" "PO-Revision-Date: 2007-09-19 12:09+0200\n" "Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1103,8 +1103,8 @@ msgstr "la cadena mostrada tras la finalización de los nombres de usuario" #, fuzzy msgid "use a marker (line or char) on buffers to show first unread line" msgstr "" -"usar un marcador en los servidores/canales para mostrar la primera lÃnea sin " -"leer" +"usar un marcador en los servidores/canales para mostrar la primera lÃnea " +"sin leer" #, fuzzy msgid "save configuration file on exit" @@ -1618,8 +1618,8 @@ msgid "" "support.\n" "Be careful, private info may be in these files.\n" msgstr "" -"Por favor, envÃa %s/%s, %s/%s y los mensajes de arriba a los desarrolladores " -"de Weechat para el soporte.\n" +"Por favor, envÃa %s/%s, %s/%s y los mensajes de arriba a los " +"desarrolladores de Weechat para el soporte.\n" "Sé cuidadoso, puede que haya información privada en estos ficheros.\n" #, c-format @@ -1741,6 +1741,10 @@ msgid "filtered" msgstr "los usuarios han sido desactivados" #, fuzzy, c-format +msgid "%s-MORE(%d)-" +msgstr "-MÃS-" + +#, fuzzy, c-format msgid "%sError: a buffer with same name already exists (%s / %s)" msgstr "" "%s no ha sido posible cargar el plugin \"%s\": un plugin con el mismo nombre " @@ -5499,8 +5503,8 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ "maximum number of lines in history for one server/channel/private window " #~ "(0 = unlimited)" #~ msgstr "" -#~ "número máximo de lÃneas en el histórico para un servidor/canal/privado " -#~ "(0 = ilimitado)" +#~ "número máximo de lÃneas en el histórico para un servidor/canal/" +#~ "privado (0 = ilimitado)" #, fuzzy #~ msgid "log messages from plugins" @@ -5694,8 +5698,8 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ "max size for aligning nick and other messages (should be >= to " #~ "look_align_size)" #~ msgstr "" -#~ "tamaño máximo para la alineación de nick y otros mensajes (deberÃa ser " -#~ ">= a look_align_size)" +#~ "tamaño máximo para la alineación de nick y otros mensajes (deberÃa " +#~ "ser >= a look_align_size)" #~ msgid "server name not found" #~ msgstr "nombre de servidor no encontrado" @@ -6482,7 +6486,8 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ msgid "color for chan owner symbol (specific to unrealircd)" #~ msgstr "" -#~ "color para el sÃmbolo de propietario de canal (especificado en unrealircd)" +#~ "color para el sÃmbolo de propietario de canal (especificado en " +#~ "unrealircd)" #~ msgid "color for chan admin symbol" #~ msgstr "color para el sÃmbolo de administrador de canal" @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-07-03 12:38+0200\n" -"PO-Revision-Date: 2008-07-03 12:39+0200\n" +"POT-Creation-Date: 2008-07-06 11:26+0200\n" +"PO-Revision-Date: 2008-07-06 11:27+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -1741,6 +1741,10 @@ msgid "filtered" msgstr "filtré" #, c-format +msgid "%s-MORE(%d)-" +msgstr "%s-PLUS(%d)-" + +#, c-format msgid "%sError: a buffer with same name already exists (%s / %s)" msgstr "%sErreur: un tampon avec le même nom existe déjà (%s / %s)" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-07-03 12:38+0200\n" +"POT-Creation-Date: 2008-07-06 11:26+0200\n" "PO-Revision-Date: 2007-10-10 18:07+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1763,6 +1763,10 @@ msgid "filtered" msgstr "a felhasználók le lettek tiltva" #, fuzzy, c-format +msgid "%s-MORE(%d)-" +msgstr "-TOVÁBB-" + +#, fuzzy, c-format msgid "%sError: a buffer with same name already exists (%s / %s)" msgstr "%s nem sikerült a \"%s\" modult betölteni: már van ilyen nevű modul\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-07-03 12:38+0200\n" +"POT-Creation-Date: 2008-07-06 11:26+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1767,6 +1767,10 @@ msgid "filtered" msgstr "команда users отключена" #, fuzzy, c-format +msgid "%s-MORE(%d)-" +msgstr "-ДАЛЬШЕ-" + +#, fuzzy, c-format msgid "%sError: a buffer with same name already exists (%s / %s)" msgstr "" "%s не могу загрузить plugin \"%s\": одноимённый plugin уже существует\n" diff --git a/po/weechat.pot b/po/weechat.pot index 7679e8903..812f7d9e0 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-07-03 12:38+0200\n" +"POT-Creation-Date: 2008-07-06 11:26+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1468,6 +1468,10 @@ msgid "filtered" msgstr "" #, c-format +msgid "%s-MORE(%d)-" +msgstr "" + +#, c-format msgid "%sError: a buffer with same name already exists (%s / %s)" msgstr "" diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index ca46d08fc..aeefc7471 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -1077,7 +1077,7 @@ gui_chat_draw (struct t_gui_buffer *buffer, int erase) struct t_gui_window *ptr_win; struct t_gui_line *ptr_line; char format_empty[32]; - int i, line_pos, count, old_scroll, y_start, y_end; + int i, line_pos, count, old_scroll, old_scroll_lines_after, y_start, y_end; if (!gui_ok) return; @@ -1147,6 +1147,7 @@ gui_chat_draw (struct t_gui_buffer *buffer, int erase) } old_scroll = ptr_win->scroll; + old_scroll_lines_after = ptr_win->scroll_lines_after; ptr_win->scroll = (ptr_win->win_chat_cursor_y > ptr_win->win_chat_height - 1); @@ -1158,12 +1159,6 @@ gui_chat_draw (struct t_gui_buffer *buffer, int erase) ptr_win->scroll = 0; } - if (ptr_win->scroll != old_scroll) - { - hook_signal_send ("window_scrolled", - WEECHAT_HOOK_SIGNAL_POINTER, ptr_win); - } - if (!ptr_win->scroll && (ptr_win->start_line == gui_chat_get_first_line_displayed (ptr_win->buffer))) { @@ -1171,6 +1166,26 @@ gui_chat_draw (struct t_gui_buffer *buffer, int erase) ptr_win->start_line_pos = 0; } + ptr_win->scroll_lines_after = 0; + if (ptr_win->scroll && ptr_line) + { + /* count number of lines after last line displayed */ + while (ptr_line) + { + ptr_line = gui_chat_get_next_line_displayed (ptr_line); + if (ptr_line) + ptr_win->scroll_lines_after++; + } + ptr_win->scroll_lines_after++; + } + + if ((ptr_win->scroll != old_scroll) + || (ptr_win->scroll_lines_after != old_scroll_lines_after)) + { + hook_signal_send ("window_scrolled", + WEECHAT_HOOK_SIGNAL_POINTER, ptr_win); + } + /* cursor is below end line of chat window? */ if (ptr_win->win_chat_cursor_y > ptr_win->win_chat_height - 1) { diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c index c91820afc..075f70734 100644 --- a/src/gui/gui-bar-item.c +++ b/src/gui/gui-bar-item.c @@ -851,9 +851,9 @@ gui_bar_item_default_scroll (void *data, struct t_gui_bar_item *item, if (!window->scroll) return NULL; - snprintf (buf, sizeof (buf), "%s%s", + snprintf (buf, sizeof (buf), _("%s-MORE(%d)-"), gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_status_more))), - _("-MORE-")); + window->scroll_lines_after); return strdup (buf); } diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 47defd485..0b5c498e2 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -250,6 +250,7 @@ gui_window_new (struct t_gui_window *parent, int x, int y, int width, int height new_window->start_line = NULL; new_window->start_line_pos = 0; new_window->scroll = 0; + new_window->scroll_lines_after = 0; new_window->ptr_tree = ptr_leaf; ptr_leaf->window = new_window; diff --git a/src/gui/gui-window.h b/src/gui/gui-window.h index 132744dae..b753b6364 100644 --- a/src/gui/gui-window.h +++ b/src/gui/gui-window.h @@ -83,6 +83,8 @@ struct t_gui_window struct t_gui_line *start_line; /* pointer to line if scrolling */ int start_line_pos; /* position in first line displayed */ int scroll; /* = 1 if "MORE" should be displayed */ + int scroll_lines_after; /* number of lines after last line */ + /* displayed (with scrolling) */ struct t_gui_window_tree *ptr_tree;/* pointer to leaf in windows tree */ struct t_gui_window *prev_window; /* link to previous window */ |