core: fix click in item "buffer_nicklist" when nicklist is a root bar (bug #38080)
Argument "*" is now silently ignored in command /window. When item "buffer_nicklist" is in a root bar, we use current window/buffer to find which nick has been clicked (same behaviour as callback used to display bar item "buffer_nicklist").
This commit is contained in:
parent
f14f34e9af
commit
e0deceb366
@ -1,12 +1,14 @@
|
||||
WeeChat ChangeLog
|
||||
=================
|
||||
Sébastien Helleu <flashcode@flashtux.org>
|
||||
v0.4.0-rc2, 2013-01-12
|
||||
v0.4.0-rc2, 2013-01-14
|
||||
|
||||
|
||||
Version 0.4.0 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: fix click in item "buffer_nicklist" when nicklist is a root bar
|
||||
(bug #38080)
|
||||
* core: fix line returned when clicking on a bar (according to position and
|
||||
filling) (bug #38069)
|
||||
* core: fix refresh of bars when applying layout (bug #37944, bug #37952)
|
||||
|
@ -5376,6 +5376,10 @@ COMMAND_CALLBACK(window)
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* silently ignore argument "*" (can heppen when clicking in a root bar) */
|
||||
if (strcmp (argv_eol[1], "*") == 0)
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
/* refresh screen */
|
||||
if (string_strcasecmp (argv[1], "refresh") == 0)
|
||||
{
|
||||
|
@ -1539,18 +1539,23 @@ gui_bar_item_focus_buffer_nicklist (void *data,
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
|
||||
str_window = hashtable_get (info, "_window");
|
||||
str_bar_item_line = hashtable_get (info, "_bar_item_line");
|
||||
|
||||
if (!str_window || !str_window[0]
|
||||
|| !str_bar_item_line || !str_bar_item_line[0])
|
||||
if (!str_bar_item_line || !str_bar_item_line[0])
|
||||
return NULL;
|
||||
|
||||
rc = sscanf (str_window, "%lx", &value);
|
||||
if ((rc == EOF) || (rc == 0))
|
||||
return NULL;
|
||||
|
||||
window = (struct t_gui_window *)value;
|
||||
str_window = hashtable_get (info, "_window");
|
||||
if (str_window && str_window[0])
|
||||
{
|
||||
rc = sscanf (str_window, "%lx", &value);
|
||||
if ((rc == EOF) || (rc == 0))
|
||||
return NULL;
|
||||
window = (struct t_gui_window *)value;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no window, is it a root bar? then use current window */
|
||||
window = gui_current_window;
|
||||
}
|
||||
if (!window)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user