diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-25 21:44:27 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-25 21:44:27 +0100 |
commit | 0c29d4c5b6ae3034e9a2ddf3f9fbd374e0a49f72 (patch) | |
tree | 1d00ca3e45c8f9911e5d5f8f6c63bdc941d51ba2 /src | |
parent | 2c238e08ffc798136fb8bab9633507d6c2d7a88e (diff) | |
download | weechat-0c29d4c5b6ae3034e9a2ddf3f9fbd374e0a49f72.zip |
core: move `/input` set_unread actions to commands `/allbuf` and `/buffer set`
Actions moved:
* `/input set_unread` -> `/allbuf /buffer set unread`
* `/input set_unread_current_buffer` -> `/buffer set unread`
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-command.c | 13 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-key.c | 2 | ||||
-rw-r--r-- | src/gui/gui-input.c | 27 | ||||
-rw-r--r-- | src/gui/gui-input.h | 2 |
4 files changed, 7 insertions, 37 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 784446ea1..d0d1dfd3c 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -3433,10 +3433,6 @@ COMMAND_CALLBACK(input) gui_input_grab_mouse (buffer, 0); else if (string_strcasecmp (argv[1], "grab_mouse_area") == 0) gui_input_grab_mouse (buffer, 1); - else if (string_strcasecmp (argv[1], "set_unread") == 0) - gui_input_set_unread (); - else if (string_strcasecmp (argv[1], "set_unread_current_buffer") == 0) - gui_input_set_unread_current (buffer); else if (string_strcasecmp (argv[1], "switch_active_buffer") == 0) gui_input_switch_active_buffer (buffer); else if (string_strcasecmp (argv[1], "zoom_merged_buffer") == 0) @@ -3496,6 +3492,12 @@ COMMAND_CALLBACK(input) /* since WeeChat 3.8: "/hotlist restore -all" */ else if (string_strcasecmp (argv[1], "hotlist_restore_all") == 0) gui_hotlist_restore_all_buffers (); + /* since WeeChat 3.8: "/buffer set unread" */ + else if (string_strcasecmp (argv[1], "set_unread_current_buffer") == 0) + (void) input_data (buffer, "/buffer set unread", NULL); + /* since WeeChat 3.8: "/allbuf /buffer set unread" */ + else if (string_strcasecmp (argv[1], "set_unread") == 0) + (void) input_data (buffer, "/allbuf /buffer set unread", NULL); else COMMAND_ERROR; } @@ -8193,8 +8195,6 @@ command_init () "argument: delay for end of grab, default is 500 milliseconds)\n" " grab_mouse: grab mouse event code\n" " grab_mouse_area: grab mouse event code with area\n" - " set_unread: set unread marker for all buffers\n" - " set_unread_current_buffer: set unread marker for current buffer\n" " switch_active_buffer: switch to next merged buffer\n" " switch_active_buffer_previous: switch to previous merged buffer\n" " zoom_merged_buffer: zoom on merged buffer\n" @@ -8221,7 +8221,6 @@ command_init () "history_previous || history_next || history_global_previous || " "history_global_next || " "grab_key || grab_key_command || grab_mouse || grab_mouse_area || " - "set_unread || set_unread_current_buffer || " "switch_active_buffer || switch_active_buffer_previous || " "zoom_merged_buffer || " "insert || send || " diff --git a/src/gui/curses/gui-curses-key.c b/src/gui/curses/gui-curses-key.c index 89b0c31e2..c1ff9c1c7 100644 --- a/src/gui/curses/gui-curses-key.c +++ b/src/gui/curses/gui-curses-key.c @@ -145,7 +145,7 @@ gui_key_default_bindings (int context) BIND(/* m-k */ "meta-k", "/input grab_key_command"); BIND(/* m-s */ "meta-s", "/mute spell toggle"); BIND(/* m-u */ "meta-u", "/window scroll_unread"); - BIND(/* ^S^U */ "ctrl-Sctrl-U", "/input set_unread"); + BIND(/* ^S^U */ "ctrl-Sctrl-U", "/allbuf /buffer set unread"); BIND(/* ^Cb */ "ctrl-Cb", "/input insert \\x02"); BIND(/* ^Cc */ "ctrl-Cc", "/input insert \\x03"); BIND(/* ^Ci */ "ctrl-Ci", "/input insert \\x1D"); diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index df8cdebfe..6a98e798a 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -1485,33 +1485,6 @@ gui_input_grab_mouse (struct t_gui_buffer *buffer, int area) } /* - * Sets unread marker for all buffers (default key: ctrl-S, ctrl-U). - */ - -void -gui_input_set_unread () -{ - struct t_gui_buffer *ptr_buffer; - - /* set read marker for all standard buffers */ - for (ptr_buffer = gui_buffers; ptr_buffer; - ptr_buffer = ptr_buffer->next_buffer) - { - gui_buffer_set_unread (ptr_buffer); - } -} - -/* - * Sets unread marker for a buffer. - */ - -void -gui_input_set_unread_current (struct t_gui_buffer *buffer) -{ - gui_buffer_set_unread (buffer); -} - -/* * Switches active buffer to next buffer (when many buffers are merged) (default * key: ctrl-X). */ diff --git a/src/gui/gui-input.h b/src/gui/gui-input.h index 035e6f8dd..b6732d061 100644 --- a/src/gui/gui-input.h +++ b/src/gui/gui-input.h @@ -75,8 +75,6 @@ extern void gui_input_history_global_next (struct t_gui_buffer *buffer); extern void gui_input_grab_key (struct t_gui_buffer *buffer, int command, const char *delay); extern void gui_input_grab_mouse (struct t_gui_buffer *buffer, int area); -extern void gui_input_set_unread (); -extern void gui_input_set_unread_current (struct t_gui_buffer *buffer); extern void gui_input_switch_active_buffer (struct t_gui_buffer *buffer); extern void gui_input_switch_active_buffer_previous (struct t_gui_buffer *buffer); extern void gui_input_zoom_merged_buffer (struct t_gui_buffer *buffer); |