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

core: add bare display mode (for easy text selection and click on URLs)

New key: alt+"!", to swith to bare display (same key to come back to
standard display).

New options:
- weechat.look.bare_display_exit_on_input (default: on): by default
  any changes in input will return to standard display
- weechat.look.bare_display_time_format (default: "%H:%M"): the format
  of time used in bare display.
This commit is contained in:
Sebastien Helleu
2014-02-16 11:29:03 +01:00
parent 20a70c80f8
commit 39be4e3387
46 changed files with 706 additions and 577 deletions
+30
View File
@@ -123,6 +123,12 @@ gui_input_replace_input (struct t_gui_buffer *buffer, const char *new_input)
void
gui_input_paste_pending_signal ()
{
if (CONFIG_BOOLEAN(config_look_bare_display_exit_on_input)
&& gui_window_bare_display)
{
gui_window_bare_display_toggle (NULL);
}
(void) hook_signal_send ("input_paste_pending",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
}
@@ -138,6 +144,12 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer,
{
char str_buffer[128], *new_input;
if (CONFIG_BOOLEAN(config_look_bare_display_exit_on_input)
&& gui_window_bare_display)
{
gui_window_bare_display_toggle (NULL);
}
if (!gui_cursor_mode)
{
if (save_undo)
@@ -178,6 +190,12 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer,
void
gui_input_text_cursor_moved_signal (struct t_gui_buffer *buffer)
{
if (CONFIG_BOOLEAN(config_look_bare_display_exit_on_input)
&& gui_window_bare_display)
{
gui_window_bare_display_toggle (NULL);
}
(void) hook_signal_send ("input_text_cursor_moved",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
@@ -189,6 +207,12 @@ gui_input_text_cursor_moved_signal (struct t_gui_buffer *buffer)
void
gui_input_search_signal (struct t_gui_buffer *buffer)
{
if (CONFIG_BOOLEAN(config_look_bare_display_exit_on_input)
&& gui_window_bare_display)
{
gui_window_bare_display_toggle (NULL);
}
(void) hook_signal_send ("input_search",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
@@ -385,6 +409,12 @@ gui_input_return (struct t_gui_buffer *buffer)
struct t_gui_window *window;
char *command;
if (CONFIG_BOOLEAN(config_look_bare_display_exit_on_input)
&& gui_window_bare_display)
{
gui_window_bare_display_toggle (NULL);
}
window = gui_window_search_with_buffer (buffer);
if (window && window->buffer->input
&& (window->buffer->input_buffer_size > 0))