mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 13:26:38 +02:00
Add new option weechat.look.input_share (task #9228)
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
WeeChat ChangeLog
|
||||
=================
|
||||
Sébastien Helleu <flashcode@flashtux.org>
|
||||
v0.3.4-dev, 2010-09-23
|
||||
v0.3.4-dev, 2010-09-27
|
||||
|
||||
|
||||
Version 0.3.4 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: add new option weechat.look.input_share (task #9228)
|
||||
* core: use similar behaviour for keys bound to local or global history
|
||||
(bug #30759)
|
||||
* api: add priority for hooks (task #10550)
|
||||
|
||||
@@ -423,6 +423,11 @@
|
||||
** Typ: integer
|
||||
** Werte: group_time_asc, group_time_desc, group_number_asc, group_number_desc, number_asc, number_desc (Standardwert: `group_time_asc`)
|
||||
|
||||
* *weechat.look.input_share*
|
||||
** Beschreibung: `if set, there is only one input shared on all buffers (but still local history for each buffer)`
|
||||
** Typ: boolesch
|
||||
** Werte: on, off (Standardwert: `off`)
|
||||
|
||||
* *weechat.look.input_undo_max*
|
||||
** Beschreibung: `maximale Anzahl für "Zurücknahme" von Befehlen im Verlauf, pro Buffer (0: Rückgängig machen deaktiviert)`
|
||||
** Typ: integer
|
||||
|
||||
@@ -423,6 +423,11 @@
|
||||
** type: integer
|
||||
** values: group_time_asc, group_time_desc, group_number_asc, group_number_desc, number_asc, number_desc (default value: `group_time_asc`)
|
||||
|
||||
* *weechat.look.input_share*
|
||||
** description: `if set, there is only one input shared on all buffers (but still local history for each buffer)`
|
||||
** type: boolean
|
||||
** values: on, off (default value: `off`)
|
||||
|
||||
* *weechat.look.input_undo_max*
|
||||
** description: `max number of "undo" for command line, by buffer (0 = undo disabled)`
|
||||
** type: integer
|
||||
|
||||
@@ -423,6 +423,11 @@
|
||||
** type: entier
|
||||
** valeurs: group_time_asc, group_time_desc, group_number_asc, group_number_desc, number_asc, number_desc (valeur par défaut: `group_time_asc`)
|
||||
|
||||
* *weechat.look.input_share*
|
||||
** description: `si défini, il y a une seule entrée commune à tous les tampons (mais toujours un historique local sur chaque tampon)`
|
||||
** type: booléen
|
||||
** valeurs: on, off (valeur par défaut: `off`)
|
||||
|
||||
* *weechat.look.input_undo_max*
|
||||
** description: `nombre maximum de "undo" pour la ligne de commande, par tampon (0 = undo désactivé)`
|
||||
** type: entier
|
||||
|
||||
@@ -423,6 +423,11 @@
|
||||
** tipo: intero
|
||||
** valori: group_time_asc, group_time_desc, group_number_asc, group_number_desc, number_asc, number_desc (valore predefinito: `group_time_asc`)
|
||||
|
||||
* *weechat.look.input_share*
|
||||
** descrizione: `if set, there is only one input shared on all buffers (but still local history for each buffer)`
|
||||
** tipo: bool
|
||||
** valori: on, off (valore predefinito: `off`)
|
||||
|
||||
* *weechat.look.input_undo_max*
|
||||
** descrizione: `numero massimo di righe nella cronologia per buffer (0 = nessun limite)`
|
||||
** tipo: intero
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-20 22:26+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1809,6 +1809,11 @@ msgstr ""
|
||||
"[skupina_číslo_vzestupně], group_number_desc [skupina_číslo_sestupně], "
|
||||
"number_asc [číslo_vzestupně], number_desc [číslo_sestupně] ) "
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr ""
|
||||
"maximální počet \"undo\" pro příkazovou řádku pro bufferu (0 = vypnuto)"
|
||||
|
||||
@@ -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-09-20 22:26+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+0200\n"
|
||||
"PO-Revision-Date: 2010-09-08 22:15+0200\n"
|
||||
"Last-Translator: Nils G.\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1885,6 +1885,11 @@ msgstr ""
|
||||
"Sortierung der Hotlist (group_time_asc (Standardwert), group_time_desc, "
|
||||
"group_number_asc, group_number_desc, number_asc, number_desc)"
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr ""
|
||||
"maximale Anzahl für \"Zurücknahme\" von Befehlen im Verlauf, pro Buffer (0: "
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-20 22:26+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1827,6 +1827,11 @@ msgstr ""
|
||||
"group_time_desc, group_number_asc, group_number_desc, number_asc, "
|
||||
"number_desc)"
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr ""
|
||||
"número máximo de niveles de deshaces en la línea de comando, por buffer (0 = "
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-20 22:26+0200\n"
|
||||
"PO-Revision-Date: 2010-09-20 22:26+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+0200\n"
|
||||
"PO-Revision-Date: 2010-09-27 16:02+0200\n"
|
||||
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: French\n"
|
||||
@@ -1844,6 +1844,13 @@ msgstr ""
|
||||
"group_time_desc, group_number_asc, group_number_desc, number_asc, "
|
||||
"number_desc)"
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
"si défini, il y a une seule entrée commune à tous les tampons (mais toujours "
|
||||
"un historique local sur chaque tampon)"
|
||||
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr ""
|
||||
"nombre maximum de \"undo\" pour la ligne de commande, par tampon (0 = undo "
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-20 22:26+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1593,6 +1593,11 @@ msgid ""
|
||||
"group_number_asc, group_number_desc, number_asc, number_desc)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr ""
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-21 17:29+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+0200\n"
|
||||
"PO-Revision-Date: 2010-09-22 15:27+0200\n"
|
||||
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1833,6 +1833,11 @@ msgstr ""
|
||||
"group_time_desc, group_number_asc, group_number_desc, number_asc, "
|
||||
"number_desc)"
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr ""
|
||||
"numero massimo di righe nella cronologia per buffer (0 = nessun limite)"
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-20 22:26+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1834,6 +1834,11 @@ msgstr ""
|
||||
"typ sortowania hotlisty (group_time_asc (domyślny), group_time_desc, "
|
||||
"group_number_asc, group_number_desc, number_asc, number_desc)"
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr ""
|
||||
"maksymalna ilość \"cofnięć\" dla lini poleceń dla bufora (0 = wyłączone)"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-20 22:26+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1608,6 +1608,11 @@ msgstr ""
|
||||
"тип сортировки хотлиста (group_time_asc (по-умолчанию), group_time_desc, "
|
||||
"group_number_asc, group_number_desc, number_asc, number_desc)"
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr "максимальное количество команд в истории (0 = не ограничено)"
|
||||
|
||||
+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: 2010-09-20 22:26+0200\n"
|
||||
"POT-Creation-Date: 2010-09-27 16:01+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"
|
||||
@@ -1375,6 +1375,11 @@ msgid ""
|
||||
"group_number_asc, group_number_desc, number_asc, number_desc)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"if set, there is only one input shared on all buffers (but still local "
|
||||
"history for each buffer)"
|
||||
msgstr ""
|
||||
|
||||
msgid "max number of \"undo\" for command line, by buffer (0 = undo disabled)"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ struct t_config_option *config_look_hotlist_names_level;
|
||||
struct t_config_option *config_look_hotlist_names_merged_buffers;
|
||||
struct t_config_option *config_look_hotlist_short_names;
|
||||
struct t_config_option *config_look_hotlist_sort;
|
||||
struct t_config_option *config_look_input_share;
|
||||
struct t_config_option *config_look_input_undo_max;
|
||||
struct t_config_option *config_look_item_time_format;
|
||||
struct t_config_option *config_look_jump_current_to_previous_buffer;
|
||||
@@ -1344,6 +1345,12 @@ config_weechat_init_options ()
|
||||
"group_time_asc|group_time_desc|group_number_asc|"
|
||||
"group_number_desc|number_asc|number_desc",
|
||||
0, 0, "group_time_asc", NULL, 0, NULL, NULL, &config_change_hotlist, NULL, NULL, NULL);
|
||||
config_look_input_share = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input_share", "boolean",
|
||||
N_("if set, there is only one input shared on all buffers (but still "
|
||||
"local history for each buffer)"),
|
||||
NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_input_undo_max = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input_undo_max", "integer",
|
||||
|
||||
@@ -111,6 +111,7 @@ extern struct t_config_option *config_look_hotlist_names_level;
|
||||
extern struct t_config_option *config_look_hotlist_names_merged_buffers;
|
||||
extern struct t_config_option *config_look_hotlist_short_names;
|
||||
extern struct t_config_option *config_look_hotlist_sort;
|
||||
extern struct t_config_option *config_look_input_share;
|
||||
extern struct t_config_option *config_look_input_undo_max;
|
||||
extern struct t_config_option *config_look_item_time_format;
|
||||
extern struct t_config_option *config_look_jump_current_to_previous_buffer;
|
||||
|
||||
@@ -576,6 +576,12 @@ gui_window_switch_to_buffer (struct t_gui_window *window,
|
||||
window->buffer->lines->last_read_line = window->buffer->lines->last_line;
|
||||
}
|
||||
|
||||
if (CONFIG_BOOLEAN(config_look_input_share)
|
||||
&& (old_buffer != window->buffer))
|
||||
{
|
||||
gui_input_move_to_buffer (old_buffer, window->buffer);
|
||||
}
|
||||
|
||||
hook_signal_send ("buffer_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
@@ -608,6 +614,12 @@ gui_window_switch (struct t_gui_window *window)
|
||||
|
||||
gui_window_switch_to_buffer (gui_current_window,
|
||||
gui_current_window->buffer, 1);
|
||||
|
||||
if (CONFIG_BOOLEAN(config_look_input_share)
|
||||
&& (old_window->buffer != window->buffer))
|
||||
{
|
||||
gui_input_move_to_buffer (old_window->buffer, window->buffer);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+18
-7
@@ -323,6 +323,23 @@ gui_buffer_insert (struct t_gui_buffer *buffer)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_buffer_input_buffer_init: initialize input_buffer_* variables
|
||||
* in a buffer
|
||||
*/
|
||||
|
||||
void
|
||||
gui_buffer_input_buffer_init (struct t_gui_buffer *buffer)
|
||||
{
|
||||
buffer->input_buffer_alloc = GUI_BUFFER_INPUT_BLOCK_SIZE;
|
||||
buffer->input_buffer = malloc (GUI_BUFFER_INPUT_BLOCK_SIZE);
|
||||
buffer->input_buffer[0] = '\0';
|
||||
buffer->input_buffer_size = 0;
|
||||
buffer->input_buffer_length = 0;
|
||||
buffer->input_buffer_pos = 0;
|
||||
buffer->input_buffer_1st_display = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_buffer_new: create a new buffer in current window
|
||||
*/
|
||||
@@ -405,13 +422,7 @@ gui_buffer_new (struct t_weechat_plugin *plugin,
|
||||
new_buffer->input_callback = input_callback;
|
||||
new_buffer->input_callback_data = input_callback_data;
|
||||
new_buffer->input_get_unknown_commands = 0;
|
||||
new_buffer->input_buffer_alloc = GUI_BUFFER_INPUT_BLOCK_SIZE;
|
||||
new_buffer->input_buffer = malloc (GUI_BUFFER_INPUT_BLOCK_SIZE);
|
||||
new_buffer->input_buffer[0] = '\0';
|
||||
new_buffer->input_buffer_size = 0;
|
||||
new_buffer->input_buffer_length = 0;
|
||||
new_buffer->input_buffer_pos = 0;
|
||||
new_buffer->input_buffer_1st_display = 0;
|
||||
gui_buffer_input_buffer_init (new_buffer);
|
||||
|
||||
/* undo for input */
|
||||
(new_buffer->input_undo_snap).data = NULL;
|
||||
|
||||
@@ -201,6 +201,7 @@ extern char *gui_buffer_properties_set[];
|
||||
/* buffer functions */
|
||||
|
||||
extern void gui_buffer_notify_set_all ();
|
||||
extern void gui_buffer_input_buffer_init (struct t_gui_buffer *buffer);
|
||||
extern struct t_gui_buffer *gui_buffer_new (struct t_weechat_plugin *plugin,
|
||||
const char *name,
|
||||
int (*input_callback)(void *data,
|
||||
|
||||
@@ -239,6 +239,46 @@ gui_input_insert_string (struct t_gui_buffer *buffer, const char *string,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_input_move_to_buffer: move input content and undo data from
|
||||
* a buffer to another buffer
|
||||
*/
|
||||
|
||||
void
|
||||
gui_input_move_to_buffer (struct t_gui_buffer *from_buffer,
|
||||
struct t_gui_buffer *to_buffer)
|
||||
{
|
||||
/* only possible for two different buffers */
|
||||
if (!from_buffer || !to_buffer || (from_buffer == to_buffer))
|
||||
return;
|
||||
|
||||
/* move input_buffer */
|
||||
if (to_buffer->input_buffer)
|
||||
free (to_buffer->input_buffer);
|
||||
to_buffer->input_buffer = from_buffer->input_buffer;
|
||||
to_buffer->input_buffer_alloc = from_buffer->input_buffer_alloc;
|
||||
to_buffer->input_buffer_size = from_buffer->input_buffer_size;
|
||||
to_buffer->input_buffer_length = from_buffer->input_buffer_length;
|
||||
to_buffer->input_buffer_pos = from_buffer->input_buffer_pos;
|
||||
to_buffer->input_buffer_1st_display = from_buffer->input_buffer_1st_display;
|
||||
gui_buffer_input_buffer_init (from_buffer);
|
||||
|
||||
/* move undo data */
|
||||
gui_buffer_undo_free_all (to_buffer);
|
||||
(to_buffer->input_undo_snap).data = (from_buffer->input_undo_snap).data;
|
||||
(to_buffer->input_undo_snap).pos = (from_buffer->input_undo_snap).pos;
|
||||
to_buffer->input_undo = from_buffer->input_undo;
|
||||
to_buffer->last_input_undo = from_buffer->last_input_undo;
|
||||
to_buffer->ptr_input_undo = from_buffer->ptr_input_undo;
|
||||
to_buffer->input_undo_count = from_buffer->input_undo_count;
|
||||
(from_buffer->input_undo_snap).data = NULL;
|
||||
(from_buffer->input_undo_snap).pos = 0;
|
||||
from_buffer->input_undo = NULL;
|
||||
from_buffer->last_input_undo = NULL;
|
||||
from_buffer->ptr_input_undo = NULL;
|
||||
from_buffer->input_undo_count = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_input_clipboard_copy: copy string into clipboard
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,8 @@ extern void gui_input_move (struct t_gui_buffer *buffer, char *target,
|
||||
extern void gui_input_set_pos (struct t_gui_buffer *buffer, int pos);
|
||||
extern int gui_input_insert_string (struct t_gui_buffer *buffer,
|
||||
const char *string, int pos);
|
||||
extern void gui_input_move_to_buffer (struct t_gui_buffer *from_buffer,
|
||||
struct t_gui_buffer *to_buffer);
|
||||
extern void gui_input_clipboard_paste (struct t_gui_window *window);
|
||||
extern void gui_input_return (struct t_gui_window *window);
|
||||
extern void gui_input_complete_next (struct t_gui_window *window);
|
||||
|
||||
Reference in New Issue
Block a user