mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 21:36:37 +02:00
Add new option scroll_page_percent to choose percent of height to scroll with page_up and page_down keys (task #8702)
This commit is contained in:
@@ -5,6 +5,8 @@ ChangeLog - 2008-10-02
|
||||
|
||||
|
||||
Version 0.2.7 (under dev!):
|
||||
* add new option scroll_page_percent to choose percent of height to scroll
|
||||
with page_up and page_down keys (task #8702)
|
||||
* add new /layout command and save_layout_on_exit config option, to
|
||||
save/restore windows and buffers order (task #5453)
|
||||
* fix network connection for hostnames resolving to several IPs: try all
|
||||
|
||||
@@ -1782,6 +1782,22 @@
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<command>weechat.look.scroll_page_percent</command>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>description: percent of screen to scroll when scrolling one page up or down (for example 100 means one page, 50 half-page)</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>type: integer</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>values: 1 .. 100</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>default value: 100</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<command>weechat.look.set_title</command>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
||||
@@ -1782,6 +1782,22 @@
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<command>weechat.look.scroll_page_percent</command>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>description: percent of screen to scroll when scrolling one page up or down (for example 100 means one page, 50 half-page)</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>type: integer</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>values: 1 .. 100</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>default value: 100</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<command>weechat.look.set_title</command>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
||||
@@ -1782,6 +1782,22 @@
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<command>weechat.look.scroll_page_percent</command>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>description: pourcentage de l'écran à faire défiler lors du défilement avec page précédente ou suivante (par exemple 100 signifie une page, 50 une demi-page)</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>type: entier</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>valeurs: 1 .. 100</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>valeur par défaut: 100</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<command>weechat.look.set_title</command>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
||||
@@ -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-10-02 17:51+0200\n"
|
||||
"POT-Creation-Date: 2008-10-02 18:44+0200\n"
|
||||
"PO-Revision-Date: 2008-09-17 16:19+0200\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1280,6 +1280,11 @@ msgstr ""
|
||||
msgid "how many lines to scroll by with scroll_up and scroll_down"
|
||||
msgstr "o kolik řádů posunou pomocí scroll_up a scroll_down"
|
||||
|
||||
msgid ""
|
||||
"percent of screen to scroll when scrolling one page up or down (for example "
|
||||
"100 means one page, 50 half-page)"
|
||||
msgstr ""
|
||||
|
||||
msgid "set title for window (terminal for Curses GUI) with name and version"
|
||||
msgstr "nastaví titulek okna (terminálu pro Cruses GUI) s jménem a verzí"
|
||||
|
||||
|
||||
@@ -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-10-02 17:51+0200\n"
|
||||
"POT-Creation-Date: 2008-10-02 18:44+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"
|
||||
@@ -1238,6 +1238,11 @@ msgstr ""
|
||||
msgid "how many lines to scroll by with scroll_up and scroll_down"
|
||||
msgstr "Anzahl der zu scrollenden Zeilen bei Bild-Hoch- und Bild-Runter-Taste"
|
||||
|
||||
msgid ""
|
||||
"percent of screen to scroll when scrolling one page up or down (for example "
|
||||
"100 means one page, 50 half-page)"
|
||||
msgstr ""
|
||||
|
||||
msgid "set title for window (terminal for Curses GUI) with name and version"
|
||||
msgstr ""
|
||||
"Fenstertitel setzen (oder Terminaltitel im Curses-GUI) mit Name und Version"
|
||||
|
||||
@@ -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-10-02 17:51+0200\n"
|
||||
"POT-Creation-Date: 2008-10-02 18:44+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"
|
||||
@@ -1221,6 +1221,11 @@ msgstr ""
|
||||
msgid "how many lines to scroll by with scroll_up and scroll_down"
|
||||
msgstr "cuántas lÃneas a desplazar con scroll_up and scroll_down"
|
||||
|
||||
msgid ""
|
||||
"percent of screen to scroll when scrolling one page up or down (for example "
|
||||
"100 means one page, 50 half-page)"
|
||||
msgstr ""
|
||||
|
||||
msgid "set title for window (terminal for Curses GUI) with name and version"
|
||||
msgstr ""
|
||||
"define el tÃtulo de la ventana (el terminal para la interfaz Curses) con el "
|
||||
|
||||
@@ -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-10-02 17:51+0200\n"
|
||||
"PO-Revision-Date: 2008-10-02 17:58+0200\n"
|
||||
"POT-Creation-Date: 2008-10-02 18:44+0200\n"
|
||||
"PO-Revision-Date: 2008-10-02 18:45+0200\n"
|
||||
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -1288,6 +1288,13 @@ msgstr "sauve la disposition en quittant (tampons, fenêtres, ou les deux)"
|
||||
msgid "how many lines to scroll by with scroll_up and scroll_down"
|
||||
msgstr "nombre de lignes pour le défilement avec scroll_up et scroll_down"
|
||||
|
||||
msgid ""
|
||||
"percent of screen to scroll when scrolling one page up or down (for example "
|
||||
"100 means one page, 50 half-page)"
|
||||
msgstr ""
|
||||
"pourcentage de l'écran à faire défiler lors du défilement avec page "
|
||||
"précédente ou suivante (par exemple 100 signifie une page, 50 une demi-page)"
|
||||
|
||||
msgid "set title for window (terminal for Curses GUI) with name and version"
|
||||
msgstr ""
|
||||
"définit le titre de la fenêtre (terminal pour l'interface Curses) avec le "
|
||||
|
||||
@@ -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-10-02 17:51+0200\n"
|
||||
"POT-Creation-Date: 2008-10-02 18:44+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"
|
||||
@@ -1247,6 +1247,11 @@ msgstr ""
|
||||
msgid "how many lines to scroll by with scroll_up and scroll_down"
|
||||
msgstr "a scroll_up és scroll_down hány sort görgessen"
|
||||
|
||||
msgid ""
|
||||
"percent of screen to scroll when scrolling one page up or down (for example "
|
||||
"100 means one page, 50 half-page)"
|
||||
msgstr ""
|
||||
|
||||
msgid "set title for window (terminal for Curses GUI) with name and version"
|
||||
msgstr ""
|
||||
"ablak címsorának beállítása (Curses GUI esetén a terminálé) a program nevére "
|
||||
|
||||
@@ -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-10-02 17:51+0200\n"
|
||||
"POT-Creation-Date: 2008-10-02 18:44+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"
|
||||
@@ -1250,6 +1250,11 @@ msgstr ""
|
||||
msgid "how many lines to scroll by with scroll_up and scroll_down"
|
||||
msgstr "количество проматываемых кнопками PageUp и PageDown строк"
|
||||
|
||||
msgid ""
|
||||
"percent of screen to scroll when scrolling one page up or down (for example "
|
||||
"100 means one page, 50 half-page)"
|
||||
msgstr ""
|
||||
|
||||
msgid "set title for window (terminal for Curses GUI) with name and version"
|
||||
msgstr ""
|
||||
"устанавливать заголовок окна (терминала при интерфейсе Curses) с именем и "
|
||||
|
||||
+6
-1
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2008-10-02 17:51+0200\n"
|
||||
"POT-Creation-Date: 2008-10-02 18:44+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"
|
||||
@@ -1039,6 +1039,11 @@ msgstr ""
|
||||
msgid "how many lines to scroll by with scroll_up and scroll_down"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"percent of screen to scroll when scrolling one page up or down (for example "
|
||||
"100 means one page, 50 half-page)"
|
||||
msgstr ""
|
||||
|
||||
msgid "set title for window (terminal for Curses GUI) with name and version"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ struct t_config_option *config_look_read_marker;
|
||||
struct t_config_option *config_look_save_config_on_exit;
|
||||
struct t_config_option *config_look_save_layout_on_exit;
|
||||
struct t_config_option *config_look_scroll_amount;
|
||||
struct t_config_option *config_look_scroll_page_percent;
|
||||
struct t_config_option *config_look_set_title;
|
||||
|
||||
/* config, colors section */
|
||||
@@ -1061,6 +1062,12 @@ config_weechat_init ()
|
||||
N_("how many lines to scroll by with scroll_up and "
|
||||
"scroll_down"),
|
||||
NULL, 1, INT_MAX, "3", NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL);
|
||||
config_look_scroll_page_percent = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"scroll_page_percent", "integer",
|
||||
N_("percent of screen to scroll when scrolling one page up or down "
|
||||
"(for example 100 means one page, 50 half-page)"),
|
||||
NULL, 1, 100, "100", NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_set_title = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"set_title", "boolean",
|
||||
|
||||
@@ -104,6 +104,7 @@ extern struct t_config_option *config_look_read_marker;
|
||||
extern struct t_config_option *config_look_save_config_on_exit;
|
||||
extern struct t_config_option *config_look_save_layout_on_exit;
|
||||
extern struct t_config_option *config_look_scroll_amount;
|
||||
extern struct t_config_option *config_look_scroll_page_percent;
|
||||
extern struct t_config_option *config_look_set_title;
|
||||
|
||||
extern struct t_config_option *config_color_separator;
|
||||
|
||||
@@ -762,10 +762,18 @@ void
|
||||
gui_window_page_up (struct t_gui_window *window)
|
||||
{
|
||||
char scroll[32];
|
||||
int num_lines;
|
||||
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
num_lines = ((window->win_chat_height - 1) *
|
||||
CONFIG_INTEGER(config_look_scroll_page_percent)) / 100;
|
||||
if (num_lines < 1)
|
||||
num_lines = 1;
|
||||
else if (num_lines > window->win_chat_height - 1)
|
||||
num_lines = window->win_chat_height - 1;
|
||||
|
||||
switch (window->buffer->type)
|
||||
{
|
||||
case GUI_BUFFER_TYPE_FORMATED:
|
||||
@@ -774,8 +782,8 @@ gui_window_page_up (struct t_gui_window *window)
|
||||
gui_chat_calculate_line_diff (window, &window->start_line,
|
||||
&window->start_line_pos,
|
||||
(window->start_line) ?
|
||||
(-1) * (window->win_chat_height - 1) :
|
||||
(-1) * ((window->win_chat_height - 1) * 2));
|
||||
(-1) * (num_lines) :
|
||||
(-1) * (num_lines + window->win_chat_height - 1));
|
||||
gui_chat_draw (window->buffer, 0);
|
||||
if (!window->scroll)
|
||||
{
|
||||
@@ -789,7 +797,7 @@ gui_window_page_up (struct t_gui_window *window)
|
||||
if (window->start_line)
|
||||
{
|
||||
snprintf (scroll, sizeof (scroll), "-%d",
|
||||
window->win_chat_height);
|
||||
num_lines + 1);
|
||||
gui_window_scroll (window, scroll);
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
@@ -808,12 +816,19 @@ void
|
||||
gui_window_page_down (struct t_gui_window *window)
|
||||
{
|
||||
struct t_gui_line *ptr_line;
|
||||
int line_pos;
|
||||
int line_pos, num_lines;
|
||||
char scroll[32];
|
||||
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
num_lines = ((window->win_chat_height - 1) *
|
||||
CONFIG_INTEGER(config_look_scroll_page_percent)) / 100;
|
||||
if (num_lines < 1)
|
||||
num_lines = 1;
|
||||
else if (num_lines > window->win_chat_height - 1)
|
||||
num_lines = window->win_chat_height - 1;
|
||||
|
||||
switch (window->buffer->type)
|
||||
{
|
||||
case GUI_BUFFER_TYPE_FORMATED:
|
||||
@@ -821,14 +836,14 @@ gui_window_page_down (struct t_gui_window *window)
|
||||
{
|
||||
gui_chat_calculate_line_diff (window, &window->start_line,
|
||||
&window->start_line_pos,
|
||||
window->win_chat_height - 1);
|
||||
num_lines);
|
||||
|
||||
/* check if we can display all */
|
||||
ptr_line = window->start_line;
|
||||
line_pos = window->start_line_pos;
|
||||
gui_chat_calculate_line_diff (window, &ptr_line,
|
||||
&line_pos,
|
||||
window->win_chat_height - 1);
|
||||
num_lines);
|
||||
if (!ptr_line)
|
||||
{
|
||||
window->start_line = NULL;
|
||||
@@ -847,7 +862,7 @@ gui_window_page_down (struct t_gui_window *window)
|
||||
break;
|
||||
case GUI_BUFFER_TYPE_FREE:
|
||||
snprintf (scroll, sizeof (scroll), "+%d",
|
||||
window->win_chat_height);
|
||||
num_lines + 1);
|
||||
gui_window_scroll (window, scroll);
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
|
||||
Reference in New Issue
Block a user