]> jfr.im git - irc/irssi/irssi.git/commitdiff
store type of window binds
authorAilin Nemui <redacted>
Wed, 30 Jan 2019 10:17:36 +0000 (11:17 +0100)
committerailin-nemui <redacted>
Mon, 11 Feb 2019 16:27:33 +0000 (17:27 +0100)
src/common.h
src/fe-common/core/fe-windows.h
src/fe-common/core/windows-layout.c

index 14bfe42b80dc620bed18dffe9aee0e9ac0c0a0cc..192e087d242e5f6ac673b6e983851bf9a848aa08 100644 (file)
@@ -6,7 +6,7 @@
 #define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */
 #define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */
 
-#define IRSSI_ABI_VERSION 19
+#define IRSSI_ABI_VERSION 20
 
 #define DEFAULT_SERVER_ADD_PORT 6667
 #define DEFAULT_SERVER_ADD_TLS_PORT 6697
index aaa773c846f9c7fcda10f2bea1f44dee49f1401a..061a999afea12817b06b09cb195cde28acb09e8b 100644 (file)
@@ -22,6 +22,7 @@ enum {
 typedef struct {
        char *servertag;
         char *name;
+       int type;
        unsigned int sticky:1;
 } WINDOW_BIND_REC;
 
index 77eb26f176004783756308d861877ada1c14034b..5aa60916c0174f923acc704b1d158ef35895d91a 100644 (file)
@@ -70,11 +70,12 @@ static void sig_layout_restore_item(WINDOW_REC *window, const char *type,
                 restore_win = window;
 
                protocol = chat_protocol_find(chat_type);
-               if (protocol == NULL || protocol->not_initialized)
-                       window_bind_add(window, tag, name);
-               else if (protocol->query_create != NULL)
+               if (protocol == NULL || protocol->not_initialized) {
+                       WINDOW_BIND_REC *rec = window_bind_add(window, tag, name);
+                       rec->type = module_get_uniq_id_str("WINDOW ITEM TYPE", "QUERY");
+               } else if (protocol->query_create != NULL) {
                        protocol->query_create(tag, name, TRUE);
-               else {
+               else {
                        QUERY_REC *query;
 
                        query = g_new0(QUERY_REC, 1);