mirror of
https://github.com/irssi/irssi.git
synced 2026-08-23 10:32:31 +02:00
enum name change and early exit if no server_tag
This commit is contained in:
parent
7d07e22a11
commit
7a9d9bd40b
3 changed files with 47 additions and 47 deletions
|
|
@ -140,19 +140,19 @@ void window_item_set_active(WINDOW_REC *window, WI_ITEM_REC *item)
|
|||
|
||||
WindowType window_item_get_type(WI_ITEM_REC *item)
|
||||
{
|
||||
g_return_val_if_fail(item != NULL, WITEM_TYPE_OTHER);
|
||||
g_return_val_if_fail(item != NULL, WI_TYPE_OTHER);
|
||||
|
||||
const char *type = module_find_id_str("WINDOW ITEM TYPE", item->type);
|
||||
if (g_ascii_strcasecmp(type, "CHANNEL") == 0)
|
||||
return WITEM_TYPE_CHANNEL;
|
||||
return WI_TYPE_CHANNEL;
|
||||
else if (g_ascii_strcasecmp(type, "QUERY") == 0) {
|
||||
if (g_str_has_prefix("=", item->name))
|
||||
return WITEM_TYPE_QUERY | WITEM_TYPE_DCCCHAT;
|
||||
return WI_TYPE_QUERY | WI_TYPE_DCCCHAT;
|
||||
else
|
||||
return WITEM_TYPE_QUERY | WITEM_TYPE_PRIVMSG;
|
||||
return WI_TYPE_QUERY | WI_TYPE_PRIVMSG;
|
||||
}
|
||||
else
|
||||
return WITEM_TYPE_OTHER;
|
||||
return WI_TYPE_OTHER;
|
||||
}
|
||||
|
||||
/* Return TRUE if `item' is the active window item in the window.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue