summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-05-11 12:39:08 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-05-11 12:39:08 +0200
commita804fb1936ee46a86c83053f9c5647371fea64fd (patch)
tree31efdbf101a7506fc4966e16b6f3e668d1a1fc1e
parentbaeea17773f4c4123d006969eeaf71ae61a7acff (diff)
parent2b1dec16795f9782a0c0e7644b19ef17d4feed98 (diff)
downloadweechat-a804fb1936ee46a86c83053f9c5647371fea64fd.zip
Merge branch 'protocols' of ssh://git.sv.gnu.org/srv/git/weechat into protocols
-rw-r--r--ChangeLog4
-rw-r--r--src/core/wee-command.c6
-rw-r--r--src/gui/gui-input.c15
-rw-r--r--src/gui/gui-input.h1
4 files changed, 25 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b7449db2e..710c38351 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,12 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2008-05-07
+ChangeLog - 2008-05-11
Version 0.2.7 (under dev!):
+ * new input action "set_unread_current_buffer" to set unread marker for
+ current buffer only (task #7286)
* new option "xfer.file.use_nick_in_filename" for Xfer files (task #7140)
* removed key functions, replaced by /input command
* fixed bug with alias, use current buffer to run commands (bug #22876)
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index e16ac024b..3ca29a587 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -1201,6 +1201,8 @@ command_input (void *data, struct t_gui_buffer *buffer,
gui_input_scroll_unread ();
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], "insert") == 0)
{
if (argc > 2)
@@ -2161,6 +2163,10 @@ command_upgrade (void *data, struct t_gui_buffer *buffer,
(void) argc;
(void) argv;
(void) argv_eol;
+
+ /* TODO: enable again /upgrade command */
+ gui_chat_printf (NULL, "/upgrade command is temporarirly disabled.");
+ return WEECHAT_RC_OK;
/*ptr_binary = (argc > 1) ? argv_eol[1] : weechat_argv0;
diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c
index a0544e601..dc4bd2887 100644
--- a/src/gui/gui-input.c
+++ b/src/gui/gui-input.c
@@ -1324,6 +1324,21 @@ gui_input_set_unread ()
}
/*
+ * gui_input_set_unread_current_buffer: set unread marker for current buffer
+ */
+
+void
+gui_input_set_unread_current_buffer ()
+{
+ if (gui_current_window
+ && (gui_current_window->buffer->type == GUI_BUFFER_TYPE_FORMATED))
+ gui_current_window->buffer->last_read_line = gui_current_window->buffer->last_line;
+
+ /* refresh all windows */
+ gui_window_redraw_buffer (gui_current_window->buffer);
+}
+
+/*
* gui_input_insert: insert a string in command line
* (many default keys are bound to this function)
*/
diff --git a/src/gui/gui-input.h b/src/gui/gui-input.h
index 17fd6a573..0182e8651 100644
--- a/src/gui/gui-input.h
+++ b/src/gui/gui-input.h
@@ -66,6 +66,7 @@ extern void gui_input_infobar_clear ();
extern void gui_input_grab_key ();
extern void gui_input_scroll_unread ();
extern void gui_input_set_unread ();
+extern void gui_input_set_unread_current_buffer ();
extern void gui_input_insert ();
/* input functions (GUI dependent) */