1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 10:43:13 +02:00

Add new option weechat.look.align_end_of_lines

This commit is contained in:
Sebastien Helleu
2010-07-12 09:43:16 +02:00
parent d2d4cc97ec
commit 7e6088570b
21 changed files with 141 additions and 29 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.3-dev, 2010-07-07
v0.3.3-dev, 2010-07-12
Version 0.3.3 (under dev!)
@@ -9,6 +9,7 @@ Version 0.3.3 (under dev!)
* core: add keys for undo/redo changes on command line
(default: ctrl/alt + underscore) (task #9483)
* core: add new option weechat.look.align_end_of_lines
* core: add new option weechat.look.confirm_quit
* core: add new option weechat.color.status_name_ssl (task #10339)
* core: fix bug with scroll_unread: do not scroll to a filtered line
+2 -2
View File
@@ -12,9 +12,9 @@
| irc | irc_nick | Aktuellen Nicknamen für den Server erhalten | Servername
| irc | irc_nick_color | get nick color code | Nickname
| irc | irc_nick_color | Hole Farbe-Code des Nick | Nickname
| irc | irc_nick_color_name | get nick color name | Nickname
| irc | irc_nick_color_name | Hole Namen der Farbe des Nick | Nickname
| irc | irc_nick_from_host | Nicknamen des IRC-Hosts erhalten | IRC host (in der Form `:nick!name@server.com`)
+5 -5
View File
@@ -14,12 +14,12 @@
** Werte: ein Farbname (Standardwert: default)
* *irc.color.item_lag_counting*
** Beschreibung: color for lag indicator, when counting (pong not received from server, lag is increasing)
** Beschreibung: Farbe in der der Lag-Indikator dargestellt werden soll wenn auf Antwort gewartet wird ("pong" wurde vom Server nicht empfangen und die Verzögerungszeit wird erhöht)
** Typ: Farbe
** Werte: ein Farbname (Standardwert: default)
* *irc.color.item_lag_finished*
** Beschreibung: color for lag indicator, when pong has been received from server
** Beschreibung: Farbe in der der Lag-Indikator dargestellt werden soll, falls ein "pong" vom Server empfangen wurde
** Typ: Farbe
** Werte: ein Farbname (Standardwert: yellow)
@@ -119,7 +119,7 @@
** Werte: on, off (Standardwert: on)
* *irc.look.display_pv_back*
** Beschreibung: Es wird bei einer privaten Unterhaltung eine Mitteilung ausgegeben falls der User wieder zurück ist (falls der User sich beim Server abgemeldet hat)
** Beschreibung: Es wird bei einer privaten Unterhaltung eine Mitteilung ausgegeben falls der User wieder zurück ist (falls der User sich beim Server abgemeldet hat)
** Typ: boolesch
** Werte: on, off (Standardwert: on)
@@ -299,12 +299,12 @@
** Werte: 0 .. 10080 (Standardwert: 0)
* *irc.network.lag_min_show*
** Beschreibung: minimum lag to show (in milliseconds)
** Beschreibung: geringste Verzögerungszeit (Lag) die angezeigt werden soll (in Millisekunden)
** Typ: integer
** Werte: 0 .. 86400000 (Standardwert: 500)
* *irc.network.lag_refresh_interval*
** Beschreibung: interval between two refreshs of lag item, when lag is increasing (in seconds)
** Beschreibung: Intervall zwischen zwei Aktualisierungen des Lag-Items, wenn die Verzögerungszeit sich erhöht (in Sekunden)
** Typ: integer
** Werte: 1 .. 3600 (Standardwert: 1)
+6 -1
View File
@@ -338,8 +338,13 @@
** Typ: integer
** Werte: 0 .. 1000 (Standardwert: 50)
* *weechat.look.align_end_of_lines*
** Beschreibung: alignment for end of lines (all lines after the first): they are starting under this data (time, buffer, prefix, suffix, message (default))
** Typ: integer
** Werte: time, buffer, prefix, suffix, message (Standardwert: message)
* *weechat.look.buffer_notify_default*
** Beschreibung: Standardeinstellung der Benachrichtigungsstufe für Buffer (dies wird genutzt um WeeChat mitzuteilen ob der Buffer in der Hotlist angezeigt werden soll oder nicht, entsprechend der Wichtigkeit der Nachricht)
** Beschreibung: Standardeinstellung der Benachrichtigungsstufe für Buffer (dies wird genutzt um WeeChat mitzuteilen ob der Buffer in der Hotlist angezeigt werden soll oder nicht, entsprechend der Wichtigkeit der Nachricht)
** Typ: integer
** Werte: none, highlight, message, all (Standardwert: all)
+5
View File
@@ -338,6 +338,11 @@
** type: integer
** values: 0 .. 1000 (default value: 50)
* *weechat.look.align_end_of_lines*
** description: alignment for end of lines (all lines after the first): they are starting under this data (time, buffer, prefix, suffix, message (default))
** type: integer
** values: time, buffer, prefix, suffix, message (default value: message)
* *weechat.look.buffer_notify_default*
** description: default notify level for buffers (used to tell WeeChat if buffer must be displayed in hotlist or not, according to importance of message)
** type: integer
+5
View File
@@ -338,6 +338,11 @@
** type: entier
** valeurs: 0 .. 1000 (valeur par défaut: 50)
* *weechat.look.align_end_of_lines*
** description: alignement pour la fin des lignes (toutes les lignes après la première): elles démarrent sous cette donnée (time, buffer, prefix, suffix, message (par défaut))
** type: entier
** valeurs: time, buffer, prefix, suffix, message (valeur par défaut: message)
* *weechat.look.buffer_notify_default*
** description: niveau de notification par défaut pour les tampons (utilisé pour dire à WeeChat si le tampon doit être affiché dans la hotlist ou non, selon l'importance du message)
** type: entier
+5
View File
@@ -338,6 +338,11 @@
** tipo: intero
** valori: 0 .. 1000 (valore predefinito: 50)
* *weechat.look.align_end_of_lines*
** descrizione: alignment for end of lines (all lines after the first): they are starting under this data (time, buffer, prefix, suffix, message (default))
** tipo: intero
** valori: time, buffer, prefix, suffix, message (valore predefinito: message)
* *weechat.look.buffer_notify_default*
** descrizione: livello predefinito di notifica per i buffer (utilizzato per comunicare a WeeChat se il buffer deve essere visualizzato nella hotlist oppure no, a seconda dell'importanza del messaggio)
** tipo: intero
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 11:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+0200\n"
"PO-Revision-Date: 2010-06-20 21:24+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1677,6 +1677,11 @@ msgstr "zobrazí WeeChat logo při spuštění"
msgid "display WeeChat version at startup"
msgstr "zobrazí verzi WeeChat při spuštění"
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+6 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 17:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+0200\n"
"PO-Revision-Date: 2010-07-06 18:18+0200\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1734,6 +1734,11 @@ msgstr "WeeChat-Logo beim Start anzeigen"
msgid "display WeeChat version at startup"
msgstr "WeeChat-Version beim Start anzeigen"
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 11:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+0200\n"
"PO-Revision-Date: 2010-06-20 21:24+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1693,6 +1693,11 @@ msgstr "mostrar el logotipo de WeeChat en el arranque"
msgid "display WeeChat version at startup"
msgstr "mostrar la versión de WeeChat en el arranque"
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+10 -2
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 11:58+0200\n"
"PO-Revision-Date: 2010-07-06 11:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+0200\n"
"PO-Revision-Date: 2010-07-10 09:31+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -1701,6 +1701,14 @@ msgstr "afficher le logo WeeChat au démarrage"
msgid "display WeeChat version at startup"
msgstr "afficher la version de WeeChat au démarrage"
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
"alignement pour la fin des lignes (toutes les lignes après la première): "
"elles démarrent sous cette donnée (time, buffer, prefix, suffix, message "
"(par défaut))"
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 11:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+0200\n"
"PO-Revision-Date: 2010-06-20 21:24+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1491,6 +1491,11 @@ msgstr "WeeChat logo mutatása induláskor"
msgid "display WeeChat version at startup"
msgstr "WeeChat verziójának mutatása induláskor"
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Weechat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 11:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+0200\n"
"PO-Revision-Date: 2010-06-20 21:24+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1690,6 +1690,11 @@ msgstr "visualizza il logo di WeeChat all'avvio"
msgid "display WeeChat version at startup"
msgstr "visualizza la versione di WeeChat all'avvio"
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 11:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+0200\n"
"PO-Revision-Date: 2010-06-20 21:25+0200\n"
"Last-Translator: B.J. Stobiecki <bartek@stobiecki.eu>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1700,6 +1700,11 @@ msgstr "wyświetl logo WeeChat podczas uruchamiania"
msgid "display WeeChat version at startup"
msgstr "wyświetl wersję WeeChat podczas uruchamiania"
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 11:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+0200\n"
"PO-Revision-Date: 2010-06-20 21:25+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1500,6 +1500,11 @@ msgstr "отображать логотип WeeChat при запуске"
msgid "display WeeChat version at startup"
msgstr "отображать версию WeeChat при запуске"
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+6 -1
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-07-06 11:58+0200\n"
"POT-Creation-Date: 2010-07-11 12:14+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"
@@ -1282,6 +1282,11 @@ msgstr ""
msgid "display WeeChat version at startup"
msgstr ""
msgid ""
"alignment for end of lines (all lines after the first): they are starting "
"under this data (time, buffer, prefix, suffix, message (default))"
msgstr ""
msgid ""
"default notify level for buffers (used to tell WeeChat if buffer must be "
"displayed in hotlist or not, according to importance of message)"
+8
View File
@@ -72,6 +72,7 @@ struct t_config_option *config_startup_display_version;
/* config, look & feel section */
struct t_config_option *config_look_align_end_of_lines;
struct t_config_option *config_look_buffer_notify_default;
struct t_config_option *config_look_buffer_time_format;
struct t_config_option *config_look_color_nicks_number;
@@ -1233,6 +1234,13 @@ config_weechat_init_options ()
return 0;
}
config_look_align_end_of_lines = config_file_new_option (
weechat_config_file, ptr_section,
"align_end_of_lines", "integer",
N_("alignment for end of lines (all lines after the first): they "
"are starting under this data (time, buffer, prefix, suffix, "
"message (default))"),
"time|buffer|prefix|suffix|message", 0, 0, "message", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_buffer_notify_default = config_file_new_option (
weechat_config_file, ptr_section,
"buffer_notify_default", "integer",
+10
View File
@@ -35,6 +35,15 @@ enum t_config_look_nicklist
CONFIG_LOOK_NICKLIST_BOTTOM,
};
enum t_config_look_align_end_of_lines
{
CONFIG_LOOK_ALIGN_END_OF_LINES_TIME = 0,
CONFIG_LOOK_ALIGN_END_OF_LINES_BUFFER,
CONFIG_LOOK_ALIGN_END_OF_LINES_PREFIX,
CONFIG_LOOK_ALIGN_END_OF_LINES_SUFFIX,
CONFIG_LOOK_ALIGN_END_OF_LINES_MESSAGE,
};
enum t_config_look_prefix_align
{
CONFIG_LOOK_PREFIX_ALIGN_NONE = 0,
@@ -85,6 +94,7 @@ extern struct t_config_option *config_startup_command_before_plugins;
extern struct t_config_option *config_startup_display_logo;
extern struct t_config_option *config_startup_display_version;
extern struct t_config_option *config_look_align_end_of_lines;
extern struct t_config_option *config_look_buffer_notify_default;
extern struct t_config_option *config_look_buffer_time_format;
extern struct t_config_option *config_look_command_chars;
+10 -8
View File
@@ -449,13 +449,13 @@ gui_chat_display_word (struct t_gui_window *window,
while (data && data[0])
{
/* insert spaces for align text under time/nick */
length_align = gui_line_get_align (window->buffer, line, 0);
if ((length_align > 0) &&
(window->win_chat_cursor_x == 0) &&
(*lines_displayed > 0) &&
/* insert spaces for aligning text under time/nick */
length_align = gui_line_get_align (window->buffer, line, 0, 0);
if ((length_align > 0)
&& (window->win_chat_cursor_x == 0)
&& (*lines_displayed > 0)
/* TODO: modify arbitraty value for non aligning messages on time/nick? */
(length_align < (window->win_chat_width - 5)))
&& (length_align < (window->win_chat_width - 5)))
{
if (!simulate)
{
@@ -465,7 +465,8 @@ gui_chat_display_word (struct t_gui_window *window,
wclrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat);
}
window->win_chat_cursor_x += length_align;
if ((CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE)
if ((CONFIG_INTEGER(config_look_align_end_of_lines) == CONFIG_LOOK_ALIGN_END_OF_LINES_MESSAGE)
&& (CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE)
&& (CONFIG_STRING(config_look_prefix_suffix)
&& CONFIG_STRING(config_look_prefix_suffix)[0]))
{
@@ -869,7 +870,8 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
if (word_length > 0)
{
/* spaces + word too long for current line but ok for next line */
line_align = gui_line_get_align (window->buffer, line, 1);
line_align = gui_line_get_align (window->buffer, line, 1,
(lines_displayed == 0) ? 1 : 0);
if ((window->win_chat_cursor_x + word_length_with_spaces > gui_chat_get_real_width (window))
&& (word_length <= gui_chat_get_real_width (window) - line_align))
{
+24 -1
View File
@@ -85,10 +85,17 @@ gui_lines_free (struct t_gui_lines *lines)
int
gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line,
int with_suffix)
int with_suffix, int first_line)
{
int length_time, length_buffer, length_suffix;
/* return immediately if alignment for end of lines is "time" */
if (!first_line
&& (CONFIG_INTEGER(config_look_align_end_of_lines) == CONFIG_LOOK_ALIGN_END_OF_LINES_TIME))
{
return 0;
}
/* length of time */
if (buffer->time_for_each_line)
{
@@ -97,6 +104,13 @@ gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line,
else
length_time = 0;
/* return immediately if alignment for end of lines is "buffer" */
if (!first_line
&& (CONFIG_INTEGER(config_look_align_end_of_lines) == CONFIG_LOOK_ALIGN_END_OF_LINES_BUFFER))
{
return length_time;
}
/* length of buffer name (when many buffers are merged) */
if (buffer->mixed_lines)
{
@@ -116,9 +130,18 @@ gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line,
else
length_buffer = 0;
/* return immediately if alignment for end of lines is "prefix" */
if (!first_line
&& (CONFIG_INTEGER(config_look_align_end_of_lines) == CONFIG_LOOK_ALIGN_END_OF_LINES_PREFIX))
{
return length_time + length_buffer;
}
if (CONFIG_INTEGER(config_look_prefix_align) == CONFIG_LOOK_PREFIX_ALIGN_NONE)
{
return length_time + length_buffer + line->data->prefix_length
+ ((line->data->prefix_length > 0) ? 1 : 0);
}
length_suffix = 0;
if (with_suffix)
+1 -1
View File
@@ -69,7 +69,7 @@ extern struct t_gui_lines *gui_lines_alloc ();
extern void gui_lines_free (struct t_gui_lines *lines);
extern int gui_line_get_align (struct t_gui_buffer *buffer,
struct t_gui_line *line,
int with_suffix);
int with_suffix, int first_line);
extern int gui_line_is_displayed (struct t_gui_line *line);
extern struct t_gui_line *gui_line_get_first_displayed (struct t_gui_buffer *buffer);
extern struct t_gui_line *gui_line_get_last_displayed (struct t_gui_buffer *buffer);