mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
"NONE" works now with combine_levels(). /WINDOW LEVEL NONE works and if
window doesn't have level it prints "NONE" instead of empty string. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@674 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
64e0b8d96b
commit
5f752567f6
@ -158,7 +158,9 @@ int combine_level(int dest, const char *src)
|
||||
g_strup(itemname);
|
||||
itemlevel = level_get(itemname);
|
||||
|
||||
if (**item == '-')
|
||||
if (strcmp(itemname, "NONE") == 0)
|
||||
dest = 0;
|
||||
else if (**item == '-')
|
||||
dest &= ~(itemlevel);
|
||||
else
|
||||
dest |= itemlevel;
|
||||
|
@ -165,8 +165,10 @@ static void cmd_window_level(const char *data)
|
||||
|
||||
window_set_level(active_win, combine_level(active_win->level, data));
|
||||
|
||||
level = bits2level(active_win->level);
|
||||
printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, "Window level is now %s", level);
|
||||
level = active_win->level == 0 ? g_strdup("NONE") :
|
||||
bits2level(active_win->level);
|
||||
printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
"Window level is now %s", level);
|
||||
g_free(level);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user