# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # bviktor, 2012 # bviktor, 2013 # bviktor, 2012 # Gabor Hosszu , 2015 # Horvath Szabolcs , 1999-2000, 2005 # Kata Konkoly , 2005 msgid "" msgstr "" "Project-Id-Version: HexChat\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-09-15 19:25-0400\n" "PO-Revision-Date: 2017-08-03 18:35+0000\n" "Last-Translator: TingPing \n" "Language-Team: Hungarian (http://www.transifex.com/hexchat/hexchat/language/" "hu/)\n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/misc/hexchat.appdata.xml.in:4 data/misc/hexchat.appdata.xml.in:5 #: data/misc/hexchat.desktop.in.in:3 msgid "HexChat" msgstr "" #: data/misc/hexchat.appdata.xml.in:9 data/misc/hexchat.desktop.in.in:4 msgid "IRC Client" msgstr "IRC kliens" #: data/misc/hexchat.appdata.xml.in:11 msgid "" "HexChat is an easy to use yet extensible IRC Client. It allows you to " "securely join multiple networks and talk to users privately or in channels " "using a customizable interface. You can even transfer files." msgstr "" #: data/misc/hexchat.appdata.xml.in:12 msgid "" "HexChat supports features such as: DCC, SASL, proxies, spellcheck, alerts, " "logging, custom themes, and Python/Perl scripts." msgstr "" #: data/misc/hexchat.appdata.xml.in:22 msgid "Main Chat Window" msgstr "" #: data/misc/hexchat.desktop.in.in:5 msgid "Chat with other people online" msgstr "" #: data/misc/hexchat.desktop.in.in:6 msgid "IM;Chat;" msgstr "" #: data/misc/hexchat.desktop.in.in:8 data/misc/htm.desktop.in:5 msgid "hexchat" msgstr "" #: data/misc/hexchat.desktop.in.in:18 msgid "Open Safe Mode" msgstr "" #: data/misc/htm.desktop.in:3 msgid "HexChat Theme Manager" msgstr "" #. 0 means unlimited #. STRINGS #: src/common/cfgfiles.c:841 msgid "I'm busy" msgstr "Elfoglalt vagyok" #: src/common/cfgfiles.c:878 msgid "Leaving" msgstr "Távozom" #: src/common/chanopt.c:79 msgid "OFF" msgstr "" #: src/common/chanopt.c:81 msgid "ON" msgstr "" #: src/common/chanopt.c:83 msgid "{unset}" msgstr "" #: src/common/chanopt.c:128 src/common/text.c:1314 src/fe-gtk/notifygui.c:125 #: src/fe-gtk/setup.c:1886 msgid "Network" msgstr "Hálózat" #: src/common/chanopt.c:129 src/common/chanopt.c:131 src/fe-gtk/maingui.c:1539 #: src/fe-gtk/maingui.c:1659 src/fe-gtk/maingui.c:3353 msgid "" msgstr "" #: src/common/chanopt.c:130 src/common/text.c:1014 src/common/text.c:1018 #: src/common/text.c:1487 src/fe-gtk/chanlist.c:777 src/fe-gtk/ignoregui.c:159 #: src/fe-gtk/servlistgui.c:1791 msgid "Channel" msgstr "Csatorna" #: src/common/dcc.c:72 msgid "Waiting" msgstr "Várakozás" #. black #: src/common/dcc.c:73 msgid "Active" msgstr "Aktív" #. cyan #: src/common/dcc.c:74 msgid "Failed" msgstr "Sikertelen" #. red #: src/common/dcc.c:75 msgid "Done" msgstr "Kész" #. green #: src/common/dcc.c:76 src/fe-gtk/menu.c:970 msgid "Connect" msgstr "Kapcsolódás" #. black #: src/common/dcc.c:77 msgid "Aborted" msgstr "Megszakítva" #: src/common/dcc.c:1790 src/common/dcc.c:1801 src/common/dcc.c:1817 #: src/common/outbound.c:2601 #, c-format msgid "Cannot access %s\n" msgstr "%s nem érhető el\n" #. ! if (osvi.dwMajorVersion >= 5) #. fallback to error number #: src/common/dcc.c:1791 src/common/dcc.c:1802 src/common/dcc.c:1818 #: src/common/text.c:1298 src/common/text.c:1341 src/common/text.c:1352 #: src/common/text.c:1359 src/common/text.c:1372 src/common/text.c:1389 #: src/common/text.c:1494 src/common/util.c:175 msgid "Error" msgstr "Hiba" #: src/common/dcc.c:2487 #, c-format msgid "%s is offering \"%s\". Do you want to accept?" msgstr "%s felajánlja a következőt: \"%s\". El kívánja fogadni?" #: src/common/dcc.c:2704 msgid "No active DCCs\n" msgstr "Nincs aktív DCC\n" #: src/common/hexchat.c:885 msgid "_Open Dialog Window" msgstr "Párbeszédablak _nyitása" #: src/common/hexchat.c:886 msgid "_Send a File" msgstr "_Fájl küldése" #: src/common/hexchat.c:887 msgid "_User Info (WhoIs)" msgstr "Felhasz_nálóinformációk (WHOIS)" #: src/common/hexchat.c:888 msgid "_Add to Friends List" msgstr "Hozzá_adás a barátok listájához" #: src/common/hexchat.c:889 msgid "_Ignore" msgstr "_Mellőzés" #: src/common/hexchat.c:890 msgid "O_perator Actions" msgstr "O_perátori műveletek" #: src/common/hexchat.c:892 msgid "Give Ops" msgstr "Op-jog adása" #: src/common/hexchat.c:893 msgid "Take Ops" msgstr "Op-jog elvétele" #: src/common/hexchat.c:894 msgid "Give Voice" msgstr "Voice jog adása" #: src/common/hexchat.c:895 msgid "Take Voice" msgstr "Voice jog elvétele" #: src/common/hexchat.c:897 msgid "Kick/Ban" msgstr "Kirúgás/kitiltás" #: src/common/hexchat.c:898 src/common/hexchat.c:935 msgid "Kick" msgstr "Kirúgás" #: src/common/hexchat.c:899 src/common/hexchat.c:900 src/common/hexchat.c:901 #: src/common/hexchat.c:902 src/common/hexchat.c:903 src/common/hexchat.c:934 #: src/fe-gtk/banlist.c:50 msgid "Ban" msgstr "Kitiltás" #: src/common/hexchat.c:904 src/common/hexchat.c:905 src/common/hexchat.c:906 #: src/common/hexchat.c:907 msgid "KickBan" msgstr "Kirúgás és kitiltás" #: src/common/hexchat.c:917 msgid "Leave Channel" msgstr "Csatorna elhagyása" #: src/common/hexchat.c:918 msgid "Join Channel..." msgstr "Csatlakozás csatornához..." #: src/common/hexchat.c:919 src/fe-gtk/menu.c:1411 msgid "Enter Channel to Join:" msgstr "Írja be a csatorna nevét, amelyhez csatlakozni akar:" #: src/common/hexchat.c:920 msgid "Server Links" msgstr "Kiszolgáló hivatkozások" #: src/common/hexchat.c:921 msgid "Ping Server" msgstr "Kiszolgáló pingelése" #: src/common/hexchat.c:922 msgid "Hide Version" msgstr "Verzió elrejtése" #: src/common/hexchat.c:932 msgid "Op" msgstr "Op" #: src/common/hexchat.c:933 msgid "DeOp" msgstr "DeOp" #: src/common/hexchat.c:936 msgid "bye" msgstr "viszlát" #: src/common/hexchat.c:937 #, c-format msgid "Enter reason to kick %s:" msgstr "Adja meg %s kirúgásának okát:" #: src/common/hexchat.c:938 #, fuzzy msgid "Send File" msgstr "_Fájl küldése" #: src/common/hexchat.c:939 msgid "Dialog" msgstr "Párbeszéd" #: src/common/hexchat.c:948 msgid "WhoIs" msgstr "WhoIs" #: src/common/hexchat.c:949 msgid "Send" msgstr "Küldés" #: src/common/hexchat.c:950 msgid "Chat" msgstr "Csevegés" #: src/common/hexchat.c:951 src/fe-gtk/banlist.c:847 src/fe-gtk/dccgui.c:889 #: src/fe-gtk/ignoregui.c:387 src/fe-gtk/urlgrab.c:214 msgid "Clear" msgstr "Összes törlése" #: src/common/hexchat.c:952 msgid "Ping" msgstr "Ping" #: src/common/hexchat.c:1125 #, c-format msgid "" "You do not have write access to %s. Nothing from this session can be saved." msgstr "" #: src/common/hexchat.c:1134 msgid "" "* Running IRC as root is stupid! You should\n" " create a User Account and use that to login.\n" msgstr "" "* Rootként IRC-zni nem okos dolog! Hozzon létre\n" " egy felhasználót és úgy lépjen be.\n" #: src/common/ignore.c:127 src/common/ignore.c:131 src/common/ignore.c:135 #: src/common/ignore.c:139 src/common/ignore.c:143 src/common/ignore.c:147 #: src/common/ignore.c:151 msgid "YES " msgstr "IGEN" #: src/common/ignore.c:129 src/common/ignore.c:133 src/common/ignore.c:137 #: src/common/ignore.c:141 src/common/ignore.c:145 src/common/ignore.c:149 #: src/common/ignore.c:153 msgid "NO " msgstr "NEM" #: src/common/ignore.c:378 #, c-format msgid "You are being CTCP flooded from %s, ignoring %s\n" msgstr "%s CTCP floodol, %s figyelmen kívül lesz hagyva\n" #: src/common/ignore.c:403 #, c-format msgid "You are being MSG flooded from %s, setting gui_autoopen_dialog OFF.\n" msgstr "%s MSG floodol, automatikus ablakmegnyitás kikapcsolva.\n" #: src/common/inbound.c:1279 #, c-format msgid "Resolved to %s" msgstr "" #: src/common/inbound.c:1281 src/common/inbound.c:1309 msgid "Not found" msgstr "" #: src/common/inbound.c:1298 msgid "Resolved to:" msgstr "" #: src/common/inbound.c:1328 #, c-format msgid "Looking up %s..." msgstr "" #: src/common/notify.c:559 #, c-format msgid " %-20s online\n" msgstr " %-20s online\n" #: src/common/notify.c:561 #, c-format msgid " %-20s offline\n" msgstr " %-20s offline\n" #: src/common/outbound.c:69 msgid "No channel joined. Try /join #\n" msgstr "" "Nincs benn egy csatornán sem. Próbálja meg a /join # parancsot.\n" #: src/common/outbound.c:75 msgid "Not connected. Try /server []\n" msgstr "Nincs kapcsolat. Próbálja ezt: /server []\n" #: src/common/outbound.c:277 #, c-format msgid "Server %s already exists on network %s.\n" msgstr "A %s szerver már létezik a %s hálózaton.\n" #: src/common/outbound.c:283 #, c-format msgid "Added server %s to network %s.\n" msgstr "A %s szerver a %s hálózathoz hozzáadva.\n" #: src/common/outbound.c:368 #, c-format msgid "Already marked away: %s\n" msgstr "Már megjelölve távollévőként: %s\n" #: src/common/outbound.c:405 msgid "Already marked back.\n" msgstr "Már megjelölve visszatértként.\n" #: src/common/outbound.c:1839 msgid "I need /bin/sh to run!\n" msgstr "A /bin/sh-ra szükség van a futáshoz!\n" #: src/common/outbound.c:2262 msgid "Commands Available:" msgstr "Elérhető parancsok:" #: src/common/outbound.c:2276 msgid "User defined commands:" msgstr "Felhasználó által megadott parancsok:" #: src/common/outbound.c:2292 msgid "Plugin defined commands:" msgstr "Bővítmény által megadott parancsok:" #: src/common/outbound.c:2303 msgid "Type /HELP for more information, or /HELP -l" msgstr "" "További információkért adja ki a /HELP vagy /HELP -l parancsot" #: src/common/outbound.c:2387 #, c-format msgid "Unknown arg '%s' ignored." msgstr "\"%s\" ismeretlen argumentum, mellőzve." #: src/common/outbound.c:3145 src/common/outbound.c:3175 msgid "Quiet is not supported by this server." msgstr "" #. error #: src/common/outbound.c:3622 src/common/outbound.c:3647 msgid "No such plugin found.\n" msgstr "Nem található ilyen bővítmény.\n" #: src/common/outbound.c:3627 src/fe-gtk/plugingui.c:191 msgid "That plugin is refusing to unload.\n" msgstr "Ezt a bővítményt nem lehet kikapcsolni.\n" #: src/common/outbound.c:3929 msgid "ADDBUTTON , adds a button under the user-list" msgstr "ADDBUTTON , a felhasználólista alá helyez el egy gombot" #: src/common/outbound.c:3930 msgid "" "ADDSERVER , adds a new network with a new " "server to the network list" msgstr "" "ADDSERVER <ÚjHálózat> <újszerver/6667>, létrehoz egy új hálózatot egy új " "szerverrel a hálózatlistában" #: src/common/outbound.c:3932 msgid "ALLCHAN , sends a command to all channels you're in" msgstr "ALLCHAN , parancs küldése minden csatornára, ahol benn van" #: src/common/outbound.c:3934 msgid "ALLCHANL , sends a command to all channels on the current server" msgstr "" "ALLCHANL , parancs küldése minden csatornára az aktuális kiszolgálón" #: src/common/outbound.c:3936 msgid "ALLSERV , sends a command to all servers you're in" msgstr "ALLSERV , parancs küldése minden kiszolgálóra, ahol benn van" #: src/common/outbound.c:3937 msgid "AWAY [], sets you away (use /BACK to unset)" msgstr "" #: src/common/outbound.c:3938 msgid "BACK, sets you back (not away)" msgstr "BACK, visszatértnek (nem távollévőnek) jelöli" #: src/common/outbound.c:3940 msgid "" "BAN [], bans everyone matching the mask from the current " "channel. If they are already on the channel this doesn't kick them (needs " "chanop)" msgstr "" "BAN [], kitilt mindenkit, akire illik a maszk az " "adott csatornán. Ha már benn vannak a csatornán, nem rúgja ki őket (ehhez " "chanop-jog kell)" #: src/common/outbound.c:3941 msgid "CHANOPT [-quiet] []" msgstr "CHANOPT [-quiet] [<érték>]" #: src/common/outbound.c:3942 msgid "" "CHARSET [], get or set the encoding used for the current connection" msgstr "" "CHARSET [], a jelenlegi kapcsolat karakterkódolásának lekérdezése " "vagy beállítása" #: src/common/outbound.c:3943 msgid "" "CLEAR [ALL|HISTORY|[-]], Clears the current text window or command " "history" msgstr "" #: src/common/outbound.c:3944 msgid "" "CLOSE [-m], Closes the current tab, closing the window if this is the only " "open tab, or with the \"-m\" flag, closes all queries." msgstr "" #: src/common/outbound.c:3947 msgid "COUNTRY [-s] , finds a country code, eg: au = australia" msgstr "" "COUNTRY [-s] , országkód keresése, például au = " "Ausztrália" #: src/common/outbound.c:3949 msgid "" "CTCP , send the CTCP message to nick, common messages are " "VERSION and USERINFO" msgstr "" "CTCP <üzenet>, CTCP üzenet küldése a becenévnek, gyakori üzenetek: " "VERSION és USERINFO" #: src/common/outbound.c:3951 msgid "" "CYCLE [], parts the current or given channel and immediately rejoins" msgstr "" "CYCLE [], kilép és azonnal visszalép az aktuális vagy a megadott " "csatornára" #: src/common/outbound.c:3953 msgid "" "\n" "DCC GET - accept an offered file\n" "DCC SEND [-maxcps=#] [file] - send a file to someone\n" "DCC PSEND [-maxcps=#] [file] - send a file using passive mode\n" "DCC LIST - show DCC list\n" "DCC CHAT - offer DCC CHAT to someone\n" "DCC PCHAT - offer DCC CHAT using passive mode\n" "DCC CLOSE example:\n" " /dcc close send johnsmith file.tar.gz" msgstr "" "\n" "DCC GET - küldött fájl elfogadása\n" "DCC SEND [-maxcps=#] [fájl] - fájlküldés\n" "DCC PSEND [-maxcps=#] [fájl] - fájlküldés passzív módban\n" "DCC LIST - DCC lista mutatása\n" "DCC CHAT - DCC CHAT meghívás\n" "DCC PCHAT - DCC CHAT meghívás passzív módban\n" "DCC CLOSE DCC átvitel bezárása; példa:\n" " /dcc close send johnsmith file.tar.gz" #: src/common/outbound.c:3965 msgid "" "DEHOP , removes chanhalf-op status from the nick on the current " "channel (needs chanop)" msgstr "" "DEHOP , elveszi a fél-op státuszt az adott csatornán a becenévtől " "(op-jog szükséges)" #: src/common/outbound.c:3967 msgid "DELBUTTON , deletes a button from under the user-list" msgstr "DELBUTTON , gomb törlése a felhasználólista alól" #: src/common/outbound.c:3969 msgid "" "DEOP , removes chanop status from the nick on the current channel " "(needs chanop)" msgstr "" "DEOP , op-jog megvonása a becenévtől az adott csatornán (op-jog " "szükséges)" #: src/common/outbound.c:3971 msgid "" "DEVOICE , removes voice status from the nick on the current channel " "(needs chanop)" msgstr "" "DEVOICE , megvonja a voice státuszt a becenévtől az adott csatornán " "(op-jog szükséges)" #: src/common/outbound.c:3972 msgid "DISCON, Disconnects from server" msgstr "DISCON, bontja a kapcsolatot a kiszolgálóval" #: src/common/outbound.c:3973 msgid "DNS , Resolves an IP or hostname" msgstr "" #: src/common/outbound.c:3974 msgid "DOAT " msgstr "" #: src/common/outbound.c:3975 msgid "ECHO , Prints text locally" msgstr "ECHO , szöveg helyi megjelenítése" #: src/common/outbound.c:3978 msgid "" "EXEC [-o] , runs the command. If -o flag is used then output is " "sent to current channel, else is printed to current text box" msgstr "" "EXEC [-o] , parancs futtatása. Ha -o -val használja, a kimenet az " "aktuális csatornára megy, egyébként az aktuális szövegdobozba" #: src/common/outbound.c:3980 msgid "EXECCONT, sends the process SIGCONT" msgstr "EXECCONT, SIGCONT küldése a folyamatnak" #: src/common/outbound.c:3983 msgid "" "EXECKILL [-9], kills a running exec in the current session. If -9 is given " "the process is SIGKILL'ed" msgstr "" "EXECKILL [-9], futó exec kilövése az aktuális munkafolyamatban. Ha a -9 " "kapcsolóval használja, a folyamat SIGKILL szignált kap" #: src/common/outbound.c:3985 msgid "EXECSTOP, sends the process SIGSTOP" msgstr "EXECSTOP, SIGSTOP küldése a folyamatnak" #: src/common/outbound.c:3986 msgid "EXECWRITE, sends data to the processes stdin" msgstr "EXECWRITE, adatok küldése a folyamat szabványos bemenetére" #: src/common/outbound.c:3990 msgid "EXPORTCONF, exports HexChat settings" msgstr "EXPORTCONF, HexChat beállítások exportálása" #: src/common/outbound.c:3993 msgid "FLUSHQ, flushes the current server's send queue" msgstr "FLUSHQ, törli az aktuális kiszolgáló küldési várakozási sorát" #: src/common/outbound.c:3995 msgid "GATE [], proxies through a host, port defaults to 23" msgstr "" "GATE [], a kiszolgáló beállítása proxyként, az " "alapértelmezett portszám a 23" #: src/common/outbound.c:4000 msgid "GHOST [password], Kills a ghosted nickname" msgstr "GHOST , Egy ghost-olt becenév kilövése" #: src/common/outbound.c:4005 msgid "HOP , gives chanhalf-op status to the nick (needs chanop)" msgstr "HOP , fél-op státuszt ad a becenévnek (op-jog szükséges)" #: src/common/outbound.c:4006 msgid "ID , identifies yourself to nickserv" msgstr "ID , azonosítja a becenév-kiszolgáló felé" #: src/common/outbound.c:4008 msgid "" "IGNORE \n" " mask - host mask to ignore, eg: *!*@*.aol.com\n" " types - types of data to ignore, one or all of:\n" " PRIV, CHAN, NOTI, CTCP, DCC, INVI, ALL\n" " options - NOSAVE, QUIET" msgstr "" "IGNORE \n" " maszk - a mellőzendő gépek maszkja, például *!*@*.aol.com\n" " típusok - a mellőzendő adatok típusa, a következők legalább egyike:\n" " PRIV, CHAN, NOTI, CTCP, DCC, INVI, ALL\n" " opciók - NOSAVE, QUIET" #: src/common/outbound.c:4015 msgid "" "INVITE [], invites someone to a channel, by default the " "current channel (needs chanop)" msgstr "" "INVITE [], meghívja a becenevet egy csatornára, " "alapértelmezésben az aktuálisra (op-jog szükséges)" #: src/common/outbound.c:4016 msgid "JOIN , joins the channel" msgstr "JOIN , belépés a csatornára" #: src/common/outbound.c:4018 msgid "" "KICK [reason], kicks the nick from the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:4020 msgid "" "KICKBAN [reason], bans then kicks the nick from the current channel " "(needs chanop)" msgstr "" #: src/common/outbound.c:4023 msgid "LAGCHECK, forces a new lag check" msgstr "LAGCHECK, új lag ellenőrzés kikényszerítése" #: src/common/outbound.c:4025 msgid "" "LASTLOG [-h] [-m] [-r] [--] , searches for a string in the buffer\n" " Use -h to highlight the found string(s)\n" " Use -m to match case\n" " Use -r when string is a Regular Expression\n" " Use -- (double hyphen) to end options when searching for, say, the " "string '-r'" msgstr "" "LASTLOG [-h] [-m] [-r] [--] , szöveg keresése a pufferben\n" " Használd a -h kapcsolót a találat(ok) kiemeléséhez\n" " Használd az -m kapcsolót a kis/nagybetű érzékenységhez\n" " Használd az -r kapcsolót reguláris kifejezés használatához\n" " Használd a -- (dupla kötőjel) kapcsolót az opciók lezárásához, például " "ha az '-r' szövegre keresel" #: src/common/outbound.c:4031 msgid "LOAD [-e] , loads a plugin or script" msgstr "LOAD [-e] , bővítmény vagy parancsfájl betöltése" #: src/common/outbound.c:4034 msgid "" "MDEHOP, Mass deop's all chanhalf-ops in the current channel (needs chanop)" msgstr "" "MDEHOP, minden fél-op-tól elveszi a fél-op jogot az adott csatornán (op-jog " "szükséges)" #: src/common/outbound.c:4036 msgid "MDEOP, Mass deop's all chanops in the current channel (needs chanop)" msgstr "" "MDEOP, minden op-tól elveszi az op-jogot az adott csatornán (op-jog " "szükséges)" #: src/common/outbound.c:4038 msgid "" "ME , sends the action to the current channel (actions are written in " "the 3rd person, like /me jumps)" msgstr "" "ME , az adott tevékenységet az aktuális csatornára küldi (az igék 3. " "személyben írandók, például: /me ugrál)" #: src/common/outbound.c:4042 #, fuzzy msgid "MHOP, Mass hop's all users in the current channel (needs chanop)" msgstr "" "MOP, tömeges op-jog adása mindenkinek az adott csatornán (op-jog szükséges)" #: src/common/outbound.c:4044 msgid "" "MKICK, Mass kicks everyone except you in the current channel (needs chanop)" msgstr "" "MKICK, tömegesen kirúg mindenkit az adott csatornáról, kivéve Önt (op-jog " "szükséges)" #: src/common/outbound.c:4047 msgid "MOP, Mass op's all users in the current channel (needs chanop)" msgstr "" "MOP, tömeges op-jog adása mindenkinek az adott csatornán (op-jog szükséges)" #: src/common/outbound.c:4048 msgid "" "MSG , sends a private message, message \".\" to send to last " "nick or prefix with \"=\" for dcc chat" msgstr "" #: src/common/outbound.c:4051 msgid "NAMES [channel], Lists the nicks on the channel" msgstr "" #: src/common/outbound.c:4053 msgid "NCTCP , Sends a CTCP notice" msgstr "NCTCP <üzenet>, CTCP figyelmeztetés küldése" #: src/common/outbound.c:4054 msgid "NEWSERVER [-noconnect] []" msgstr "NEWSERVER [-noconnect] []" #: src/common/outbound.c:4055 msgid "NICK , sets your nick" msgstr "NICK , beállítja a becenevét" #: src/common/outbound.c:4058 msgid "NOTICE , sends a notice" msgstr "" #: src/common/outbound.c:4060 msgid "" "NOTIFY [-n network1[,network2,...]] [], displays your notify list or " "adds someone to it" msgstr "" "NOTIFY [-n hálózat1[,hálózat2,...]] [], megjeleníti az értesítési " "listát vagy hozzáad valakit" #: src/common/outbound.c:4062 msgid "OP , gives chanop status to the nick (needs chanop)" msgstr "OP , op-jogot ad a becenévnek (op-jog szükséges)" #: src/common/outbound.c:4064 msgid "" "PART [] [], leaves the channel, by default the current one" msgstr "" "PART [] [], kilép a csatornáról, alapértelmezésben az " "aktuálisról" #: src/common/outbound.c:4066 msgid "PING , CTCP pings nick or channel" msgstr "PING , CTCP-pingeli a becenevet vagy a csatornát" #: src/common/outbound.c:4068 msgid "" "QUERY [-nofocus] [message], opens up a new privmsg window to someone " "and optionally sends a message" msgstr "" #: src/common/outbound.c:4070 msgid "" "QUIET [], quiet everyone matching the mask in the current " "channel if supported by the server." msgstr "" #: src/common/outbound.c:4072 msgid "QUIT [], disconnects from the current server" msgstr "QUIT [], bontja a kapcsolatot az aktuális kiszolgálóval" #: src/common/outbound.c:4074 msgid "QUOTE , sends the text in raw form to the server" msgstr "QUOTE , nyers formában küldi a szöveget a kiszolgálóra" #: src/common/outbound.c:4077 msgid "" "RECONNECT [-ssl] [] [] [], Can be called just as /" "RECONNECT to reconnect to the current server or with /RECONNECT ALL to " "reconnect to all the open servers" msgstr "" "RECONNECT [-ssl] [] [] [], Ugyanúgy használható, " "mint a /RECONNECT (újracsatlakozás az aktuális kiszolgálóhoz) vagy /" "RECONNECT ALL (minden nyitott kiszolgálóhoz csatlakozik)" #: src/common/outbound.c:4080 msgid "" "RECONNECT [] [] [], Can be called just as /RECONNECT " "to reconnect to the current server or with /RECONNECT ALL to reconnect to " "all the open servers" msgstr "" "RECONNECT [] [] [], Ugyanúgy használható, mint a /" "RECONNECT (újracsatlakozás az aktuális kiszolgálóhoz) vagy /RECONNECT ALL " "(minden nyitott kiszolgálóhoz csatlakozik)" #: src/common/outbound.c:4082 msgid "" "RECV , send raw data to HexChat, as if it was received from the IRC " "server" msgstr "" "RECV , nyers adatok küldése a HexChat-nek, mintha az IRC " "kiszolgálótól érkezett volna" #: src/common/outbound.c:4083 msgid "RELOAD , reloads a plugin or script" msgstr "" #: src/common/outbound.c:4085 msgid "SAY , sends the text to the object in the current window" msgstr "SAY , szöveget küld az aktuális ablakban lévő objektumba" #: src/common/outbound.c:4086 msgid "SEND []" msgstr "SEND []" #: src/common/outbound.c:4089 msgid "SERVCHAN [-ssl] , connects and joins a channel" msgstr "" "SERVCHAN [-ssl] , csatlakozik és belép egy adott " "csatornára" #: src/common/outbound.c:4092 msgid "SERVCHAN , connects and joins a channel" msgstr "" "SERVCHAN , csatlakozik és belép az adott csatornára" #: src/common/outbound.c:4096 msgid "" "SERVER [-ssl] [] [], connects to a server, the " "default port is 6667 for normal connections, and 6697 for ssl connections" msgstr "" "SERVER [-ssl] [] [], csatlakozik a kiszolgálóhoz, az " "alapértelmezett port 6667 normál kapcsolathoz, és 6697 SSL kapcsolathoz" #: src/common/outbound.c:4099 msgid "" "SERVER [] [], connects to a server, the default port " "is 6667" msgstr "" "SERVER [] [], csatlakozik az adott kiszolgálóhoz, az " "alapértelmezett port a 6667" #: src/common/outbound.c:4101 msgid "SET [-e] [-off|-on] [-quiet] []" msgstr "SET [-e] [-off|-on] [-quiet] [<érték>]" #: src/common/outbound.c:4102 msgid "SETCURSOR [-|+], reposition the cursor in the inputbox" msgstr "SETCURSOR [-|+], a kurzor átmozgatása a beviteli mezőben" #: src/common/outbound.c:4103 msgid "SETTAB , change a tab's name, tab_trunc limit still applies" msgstr "" "SETTAB <új név>, egy fül nevének megváltoztatása, a tab_trunc korlát " "továbbra is érvényes" #: src/common/outbound.c:4104 msgid "SETTEXT , replace the text in the input box" msgstr "SETTEXT <új szöveg>, a beviteli mező szövegének cseréje" #: src/common/outbound.c:4107 msgid "" "TOPIC [], sets the topic if one is given, else shows the current topic" msgstr "" "TOPIC [], beállítja a témát, ha megadja, vagy megmutatja az aktuális " "témát" #: src/common/outbound.c:4109 msgid "" "\n" "TRAY -f [] Blink tray between two icons.\n" "TRAY -f Set tray to a fixed icon.\n" "TRAY -i Blink tray with an internal icon.\n" "TRAY -t Set the tray tooltip.\n" "TRAY -b <text> Set the tray balloon." msgstr "" "\n" "TRAY -f <időkorlát> <fájl1> [<fájl2>] Villogjon a tálcán a két ikon között.\n" "TRAY -f <fájlnév> A tálca beállítása rögzített ikonra.\n" "TRAY -i <szám> Tálca villogtatása belső ikonnal.\n" "TRAY -t <szöveg> A tálca gyorstippjének beállítása.\n" "TRAY -b <cím> <szöveg> A tálca feliratának beállítása." #: src/common/outbound.c:4116 msgid "UNBAN <mask> [<mask>...], unbans the specified masks." msgstr "UNBAN <maszk> [<maszk>...], kitiltás feloldása az adott maszkokra." #: src/common/outbound.c:4117 msgid "UNIGNORE <mask> [QUIET]" msgstr "UNIGNORE <maszk> [QUIET] az adott maszk mellőzésének megszüntetése" #: src/common/outbound.c:4118 msgid "UNLOAD <name>, unloads a plugin or script" msgstr "UNLOAD <név>, kikapcsol egy bővítményt vagy parancsfájlt" #: src/common/outbound.c:4120 msgid "" "UNQUIET <mask> [<mask>...], unquiets the specified masks if supported by the " "server." msgstr "" #: src/common/outbound.c:4121 msgid "URL <url>, opens a URL in your browser" msgstr "URL <url>, megnyitja az adott URL-t a böngészőben" #: src/common/outbound.c:4123 msgid "" "USELECT [-a] [-s] <nick1> <nick2> etc, highlights nick(s) in channel userlist" msgstr "" "USELECT [-a] [-s] <nick1> <nick2> stb, kiemeli a beceneve(ke)t a csatorna " "felhasználólistájában" #: src/common/outbound.c:4126 msgid "VOICE <nick>, gives voice status to someone (needs chanop)" msgstr "VOICE <becenév>, voice státuszt ad valakinek (op-jog szükséges)" #: src/common/outbound.c:4128 msgid "WALLCHAN <message>, writes the message to all channels" msgstr "WALLCHAN <üzenet>, kiírja az üzenetet az összes csatornára" #: src/common/outbound.c:4130 msgid "" "WALLCHOP <message>, sends the message to all chanops on the current channel" msgstr "" "WALLCHOP <üzenet>, elküldi az üzenetet az aktuális csatorna összes opjának" #: src/common/outbound.c:4163 #, c-format msgid "User Command for: %s\n" msgstr "" #: src/common/outbound.c:4190 #, c-format msgid "Usage: %s\n" msgstr "Használat: %s\n" #: src/common/outbound.c:4195 msgid "" "\n" "No help available on that command.\n" msgstr "" "\n" "Ehhez a parancshoz nincs súgó.\n" #: src/common/outbound.c:4201 msgid "No such command.\n" msgstr "Nincs ilyen parancs.\n" #: src/common/outbound.c:4534 msgid "Bad arguments for user command.\n" msgstr "Hibás argumentum a felhasználói parancs mellett.\n" #: src/common/outbound.c:4740 msgid "Too many recursive usercommands, aborting." msgstr "Túl sok rekurzív felhasználói parancs, kilépek." #: src/common/outbound.c:4829 #, c-format msgid "Unknown Command %s. Try /help\n" msgstr "" #: src/common/plugin.c:401 msgid "No hexchat_plugin_init symbol; is this really a HexChat plugin?" msgstr "" "Nem találom a hexchat_plugin_init szimbólumot; biztos, hogy ez egy HexChat " "plugin?" #: src/common/plugin-identd.c:175 #, c-format msgid "*\tServicing ident request from %s as %s" msgstr "" #: src/common/plugin-identd.c:238 #, c-format msgid "*\tError starting identd server: %s" msgstr "" #: src/common/plugin-identd.c:262 msgid "IDENTD <port> <username>" msgstr "" #: src/common/plugin-timer.c:75 #, c-format msgid "Timer %d deleted.\n" msgstr "" #: src/common/plugin-timer.c:81 msgid "No such ref number found.\n" msgstr "" #: src/common/plugin-timer.c:145 msgid "No timers installed.\n" msgstr "" #. 00000 00000000 0000000 abc #: src/common/plugin-timer.c:150 msgid " Ref# Seconds Repeat Command \n" msgstr "" #: src/common/plugin-timer.c:155 #, c-format msgid "%5d %8.1f %7d %s\n" msgstr "" #: src/common/server.c:511 msgid "Are you sure this is a SSL capable server and port?\n" msgstr "Biztos, hogy ez SSL-re képes kiszolgáló és port?\n" #: src/common/server.c:870 #, c-format msgid "" "Cannot resolve hostname %s\n" "Check your IP Settings!\n" msgstr "" "Nem lehet feloldani a(z) %s gépnevet\n" "Ellenőrizze az IP-beállításait!\n" #: src/common/server.c:875 msgid "Proxy traversal failed.\n" msgstr "Nem sikerült átjutni a proxyn.\n" #: src/common/servlist.c:546 #, c-format msgid "Cycling to next server in %s...\n" msgstr "Ugrás a következő kiszolgálóra %s múlva...\n" #: src/common/servlist.c:1184 #, c-format msgid "" "Warning: \"%s\" character set is unknown. No conversion will be applied for " "network %s." msgstr "" "Figyelem: a \"%s\" karakterkészlet ismeretlen. Nem lesz konverzió a(z) %s " "hálózaton." #: src/common/textevents.h:7 msgid "%C18*%O$t%C18$1%O added to notify list." msgstr "%C18*%O$t%C18$1%O az értesítési listához adva." #: src/common/textevents.h:10 msgid "%C22*%O$t%C22$1%O: %C18$2%O on %C24$4%O by %C26$3%O" msgstr "" #: src/common/textevents.h:13 msgid "%C22*%O$tCannot join %C22$1 %O(%C20You are banned%O)." msgstr "%C22*%O$tNem tudok csatlakozni ide: %C22$1 %O(%C20Ki vagy tiltva%O)." #: src/common/textevents.h:19 msgid "%C29*%O$tCapabilities acknowledged: %C29$2%O" msgstr "%C29*%O$tJóváhagyott képességek: %C29$2%O" #: src/common/textevents.h:22 msgid "%C29*%O$tCapabilities removed: %C29$2%O" msgstr "" #: src/common/textevents.h:25 msgid "%C23*%O$tCapabilities supported: %C29$2%O" msgstr "%C23*%O$tTámogatott képességek: %C29$2%O" #: src/common/textevents.h:28 msgid "%C23*%O$tCapabilities requested: %C29$1%O" msgstr "%C23*%O$tIgényelt képességek: %C29$1%O" #: src/common/textevents.h:31 msgid "%C24*%O$t%C28$1%O is now known as %C18$2%O" msgstr "%C24*%O$t%C28$1%O mostantól a %C18$2%O néven ismert" #: src/common/textevents.h:40 msgid "%C22*%O$t%C26$1%O sets ban on %C18$2%O" msgstr "%C22*%O$t%C26$1%O beállítja %C18$2%O tiltását" #: src/common/textevents.h:43 msgid "%C22*%O$tChannel %C22$1%O created on %C24$2%O" msgstr "%C22*%O$tA(z) %C22$1%O csatorna létrehozva ekkor: %C24$2%O" #: src/common/textevents.h:46 msgid "%C22*%O$t%C26$1%O removes channel half-operator status from %C18$2%O" msgstr "%C22*%O$t%C26$1%O elveszi %C18$2%O féloperátor jogát" #: src/common/textevents.h:49 msgid "%C22*%O$t%C26$1%O removes channel operator status from %C18$2%O" msgstr "%C22*%O$t%C26$1%O elveszi %C18$2%O operátor jogát" #: src/common/textevents.h:52 msgid "%C22*%O$t%C26$1%O removes voice from %C18$2%O" msgstr "%C22*%O$t%C26$1%O elveszi %C18$2%O hangját" #: src/common/textevents.h:55 msgid "%C22*%O$t%C26$1%C sets exempt on %C18$2%O" msgstr "%C22*%O$t%C26$1%C felmenti %C18$2%O-t" #: src/common/textevents.h:58 msgid "%C22*%O$t%C26$1%O gives channel half-operator status to %C18$2%O" msgstr "%C22*%O$t%C26$1%O féloperátor jogot ad %C18$2%O részére" #: src/common/texteven<style>pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */</style><div class="highlight"><pre><span></span><span class="cm">/* X-Chat</span> <span class="cm"> * Copyright (C) 2006-2007 Peter Zelezny.</span> <span class="cm"> *</span> <span class="cm"> * This program is free software; you can redistribute it and/or modify</span> <span class="cm"> * it under the terms of the GNU General Public License as published by</span> <span class="cm"> * the Free Software Foundation; either version 2 of the License, or</span> <span class="cm"> * (at your option) any later version.</span> <span class="cm"> *</span> <span class="cm"> * This program is distributed in the hope that it will be useful,</span> <span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <span class="cm"> * GNU General Public License for more details.</span> <span class="cm"> *</span> <span class="cm"> * You should have received a copy of the GNU General Public License</span> <span class="cm"> * along with this program; if not, write to the Free Software</span> <span class="cm"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA</span> <span class="cm"> */</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"../common/hexchat-plugin.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"../common/hexchat.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"../common/hexchatc.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"../common/inbound.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"../common/server.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"../common/fe.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"../common/util.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"../common/outbound.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"fe-gtk.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"pixmaps.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"maingui.h"</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">"menu.h"</span> <span class="cp">#ifndef WIN32</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf"><unistd.h></span> <span class="cp">#endif</span> <span class="cp">#ifdef USE_LIBNOTIFY</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf"><libnotify/notify.h></span> <span class="cp">#ifndef NOTIFY_CHECK_VERSION</span> <span class="cp">#define NOTIFY_CHECK_VERSION(x,y,z) 0</span> <span class="cp">#endif</span> <span class="cp">#if NOTIFY_CHECK_VERSION(0,7,0)</span> <span class="cp">#define XC_NOTIFY_NEW(a,b,c,d) notify_notification_new(a,b,c)</span> <span class="cp">#else</span> <span class="cp">#define XC_NOTIFY_NEW(a,b,c,d) notify_notification_new(a,b,c,d)</span> <span class="cp">#endif</span> <span class="cp">#endif</span> <span class="k">typedef</span><span class="w"> </span><span class="k">enum</span><span class="w"> </span><span class="cm">/* current icon status */</span> <span class="p">{</span> <span class="w"> </span><span class="n">TS_NONE</span><span class="p">,</span> <span class="w"> </span><span class="n">TS_MESSAGE</span><span class="p">,</span> <span class="w"> </span><span class="n">TS_HIGHLIGHT</span><span class="p">,</span> <span class="w"> </span><span class="n">TS_FILEOFFER</span><span class="p">,</span> <span class="w"> </span><span class="n">TS_CUSTOM</span><span class="w"> </span><span class="cm">/* plugin */</span> <span class="p">}</span><span class="w"> </span><span class="n">TrayStatus</span><span class="p">;</span> <span class="k">typedef</span><span class="w"> </span><span class="k">enum</span> <span class="p">{</span> <span class="w"> </span><span class="n">WS_FOCUSED</span><span class="p">,</span> <span class="w"> </span><span class="n">WS_NORMAL</span><span class="p">,</span> <span class="w"> </span><span class="n">WS_HIDDEN</span> <span class="p">}</span><span class="w"> </span><span class="n">WinStatus</span><span class="p">;</span> <span class="k">typedef</span><span class="w"> </span><span class="n">GdkPixbuf</span><span class="o">*</span><span class="w"> </span><span class="n">TrayIcon</span><span class="p">;</span> <span class="cp">#define tray_icon_from_file(f) gdk_pixbuf_new_from_file(f,NULL)</span> <span class="cp">#define tray_icon_free(i) g_object_unref(i)</span> <span class="cp">#define ICON_NORMAL pix_hexchat</span> <span class="cp">#define ICON_MSG pix_tray_message</span> <span class="cp">#define ICON_HILIGHT pix_tray_highlight</span> <span class="cp">#define ICON_FILE pix_tray_fileoffer</span> <span class="cp">#define TIMEOUT 500</span> <span class="k">static</span><span class="w"> </span><span class="n">GtkStatusIcon</span><span class="w"> </span><span class="o">*</span><span class="n">sticon</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">flash_tag</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="n">TrayStatus</span><span class="w"> </span><span class="n">tray_status</span><span class="p">;</span> <span class="cp">#ifdef WIN32</span> <span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">tray_menu_timer</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="n">gint64</span><span class="w"> </span><span class="n">tray_menu_inactivetime</span><span class="p">;</span> <span class="cp">#endif</span> <span class="k">static</span><span class="w"> </span><span class="n">hexchat_plugin</span><span class="w"> </span><span class="o">*</span><span class="n">ph</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="n">TrayIcon</span><span class="w"> </span><span class="n">custom_icon1</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="n">TrayIcon</span><span class="w"> </span><span class="n">custom_icon2</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">tray_priv_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">tray_pub_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">tray_hilight_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">tray_file_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">tray_restore_timer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="kt">void</span><span class="w"> </span><span class="nf">tray_apply_setup</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">tray_menu_try_restore</span><span class="w"> </span><span class="p">();</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">tray_cleanup</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">tray_init</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="k">static</span><span class="w"> </span><span class="n">WinStatus</span> <span class="nf">tray_get_window_status</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">st</span><span class="p">;</span> <span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"win_status"</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">st</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">WS_HIDDEN</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">st</span><span class="p">,</span><span class="w"> </span><span class="s">"active"</span><span class="p">))</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">WS_FOCUSED</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">st</span><span class="p">,</span><span class="w"> </span><span class="s">"hidden"</span><span class="p">))</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">WS_HIDDEN</span><span class="p">;</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">WS_NORMAL</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_count_channels</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">cons</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="p">;</span> <span class="w"> </span><span class="n">session</span><span class="w"> </span><span class="o">*</span><span class="n">sess</span><span class="p">;</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sess_list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">sess</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sess</span><span class="o">-></span><span class="n">server</span><span class="o">-></span><span class="n">connected</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">sess</span><span class="o">-></span><span class="n">channel</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">&&</span> <span class="w"> </span><span class="n">sess</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SESS_CHANNEL</span><span class="p">)</span> <span class="w"> </span><span class="n">cons</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">cons</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_count_networks</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">cons</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="p">;</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">serv_list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(((</span><span class="n">server</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">connected</span><span class="p">)</span> <span class="w"> </span><span class="n">cons</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">cons</span><span class="p">;</span> <span class="p">}</span> <span class="kt">void</span> <span class="nf">fe_tray_set_tooltip</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="n">gtk_status_icon_set_tooltip</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">);</span> <span class="p">}</span> <span class="kt">void</span> <span class="nf">fe_tray_set_balloon</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> <span class="p">{</span> <span class="cp">#ifndef WIN32</span> <span class="cp">#if 0</span> <span class="c"> const char *argv[8];</span> <span class="c"> const char *path;</span> <span class="c"> char time[16];</span> <span class="cp">#endif</span> <span class="w"> </span><span class="n">WinStatus</span><span class="w"> </span><span class="n">ws</span><span class="p">;</span> <span class="w"> </span><span class="cm">/* no balloons if the window is focused */</span> <span class="w"> </span><span class="n">ws</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_get_window_status</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ws</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">WS_FOCUSED</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="cm">/* bit 1 of flags means "no balloons unless hidden/iconified" */</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ws</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">WS_HIDDEN</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_gui_tray_quiet</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="cm">/* FIXME: this should close the current balloon */</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">text</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="cp">#ifdef USE_LIBNOTIFY</span> <span class="w"> </span><span class="n">NotifyNotification</span><span class="w"> </span><span class="o">*</span><span class="n">notification</span><span class="p">;</span> <span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">notify_text</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">notify_title</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">notify_is_initted</span><span class="p">())</span> <span class="w"> </span><span class="n">notify_init</span><span class="p">(</span><span class="n">PACKAGE_NAME</span><span class="p">);</span> <span class="w"> </span><span class="n">notify_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strip_color</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">STRIP_ALL</span><span class="o">|</span><span class="n">STRIP_ESCMARKUP</span><span class="p">);</span> <span class="w"> </span><span class="n">notify_title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strip_color</span><span class="w"> </span><span class="p">(</span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">STRIP_ALL</span><span class="p">);</span> <span class="w"> </span><span class="n">notification</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XC_NOTIFY_NEW</span><span class="w"> </span><span class="p">(</span><span class="n">notify_title</span><span class="p">,</span><span class="w"> </span><span class="n">notify_text</span><span class="p">,</span><span class="w"> </span><span class="n">HEXCHATSHAREDIR</span><span class="w"> </span><span class="s">"/icons/hicolor/scalable/apps/hexchat.svg"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="cp">#if NOTIFY_CHECK_VERSION(0,7,0)</span> <span class="w"> </span><span class="n">notify_notification_set_hint</span><span class="w"> </span><span class="p">(</span><span class="n">notification</span><span class="p">,</span><span class="w"> </span><span class="s">"desktop-entry"</span><span class="p">,</span><span class="w"> </span><span class="n">g_variant_new_string</span><span class="w"> </span><span class="p">(</span><span class="s">"hexchat"</span><span class="p">));</span> <span class="cp">#endif</span> <span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">((</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">notify_title</span><span class="p">);</span> <span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">((</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">notify_text</span><span class="p">);</span> <span class="w"> </span><span class="n">notify_notification_set_timeout</span><span class="w"> </span><span class="p">(</span><span class="n">notification</span><span class="p">,</span><span class="w"> </span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_balloon_time</span><span class="o">*</span><span class="mi">1000</span><span class="p">);</span> <span class="w"> </span><span class="n">notify_notification_show</span><span class="w"> </span><span class="p">(</span><span class="n">notification</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">notification</span><span class="p">);</span> <span class="cp">#endif</span> <span class="cp">#endif</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_set_balloonf</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="p">...)</span> <span class="p">{</span> <span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">args</span><span class="p">;</span> <span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">buf</span><span class="p">;</span> <span class="w"> </span><span class="n">va_start</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">format</span><span class="p">);</span> <span class="w"> </span><span class="n">buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_vprintf</span><span class="w"> </span><span class="p">(</span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="n">args</span><span class="p">);</span> <span class="w"> </span><span class="n">va_end</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">);</span> <span class="w"> </span><span class="n">fe_tray_set_balloon</span><span class="w"> </span><span class="p">(</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">);</span> <span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">buf</span><span class="p">);</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="p">...)</span> <span class="p">{</span> <span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">args</span><span class="p">;</span> <span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">buf</span><span class="p">;</span> <span class="w"> </span><span class="n">va_start</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">format</span><span class="p">);</span> <span class="w"> </span><span class="n">buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_vprintf</span><span class="w"> </span><span class="p">(</span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="n">args</span><span class="p">);</span> <span class="w"> </span><span class="n">va_end</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">);</span> <span class="w"> </span><span class="n">fe_tray_set_tooltip</span><span class="w"> </span><span class="p">(</span><span class="n">buf</span><span class="p">);</span> <span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">buf</span><span class="p">);</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_stop_flash</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">nets</span><span class="p">,</span><span class="w"> </span><span class="n">chans</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">flash_tag</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">flash_tag</span><span class="p">);</span> <span class="w"> </span><span class="n">flash_tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">ICON_NORMAL</span><span class="p">);</span> <span class="w"> </span><span class="n">nets</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_count_networks</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="n">chans</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_count_channels</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">nets</span><span class="p">)</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": Connected to %u networks and %u channels"</span><span class="p">),</span> <span class="w"> </span><span class="n">nets</span><span class="p">,</span><span class="w"> </span><span class="n">chans</span><span class="p">);</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": %s"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Not connected."</span><span class="p">));</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">custom_icon1</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">tray_icon_free</span><span class="w"> </span><span class="p">(</span><span class="n">custom_icon1</span><span class="p">);</span> <span class="w"> </span><span class="n">custom_icon1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">custom_icon2</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">tray_icon_free</span><span class="w"> </span><span class="p">(</span><span class="n">custom_icon2</span><span class="p">);</span> <span class="w"> </span><span class="n">custom_icon2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="n">tray_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TS_NONE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_reset_counts</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_priv_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_pub_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_hilight_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_file_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_timeout_cb</span><span class="w"> </span><span class="p">(</span><span class="n">TrayIcon</span><span class="w"> </span><span class="n">icon</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">custom_icon1</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_status_icon_get_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">custom_icon1</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">custom_icon2</span><span class="p">)</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">custom_icon2</span><span class="p">);</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">ICON_NORMAL</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">custom_icon1</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_status_icon_get_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">ICON_NORMAL</span><span class="p">)</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">icon</span><span class="p">);</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">ICON_NORMAL</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="n">TrayIcon</span><span class="w"> </span><span class="n">icon</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="cm">/* already flashing the same icon */</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">flash_tag</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_status_icon_get_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">icon</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="cm">/* no flashing if window is focused */</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tray_get_window_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">WS_FOCUSED</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_stop_flash</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">icon</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_gui_tray_blink</span><span class="p">)</span> <span class="w"> </span><span class="n">flash_tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add</span><span class="w"> </span><span class="p">(</span><span class="n">TIMEOUT</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GSourceFunc</span><span class="p">)</span><span class="w"> </span><span class="n">tray_timeout_cb</span><span class="p">,</span><span class="w"> </span><span class="n">icon</span><span class="p">);</span> <span class="p">}</span> <span class="kt">void</span> <span class="nf">fe_tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">filename1</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">filename2</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">tout</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_apply_setup</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_stop_flash</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tout</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> <span class="w"> </span><span class="n">tout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TIMEOUT</span><span class="p">;</span> <span class="w"> </span><span class="n">custom_icon1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_icon_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">filename1</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">filename2</span><span class="p">)</span> <span class="w"> </span><span class="n">custom_icon2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_icon_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">filename2</span><span class="p">);</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">custom_icon1</span><span class="p">);</span> <span class="w"> </span><span class="n">flash_tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add</span><span class="w"> </span><span class="p">(</span><span class="n">tout</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GSourceFunc</span><span class="p">)</span><span class="w"> </span><span class="n">tray_timeout_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">tray_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TS_CUSTOM</span><span class="p">;</span> <span class="p">}</span> <span class="kt">void</span> <span class="nf">fe_tray_set_icon</span><span class="w"> </span><span class="p">(</span><span class="n">feicon</span><span class="w"> </span><span class="n">icon</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_apply_setup</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_stop_flash</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">icon</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">FE_ICON_NORMAL</span><span class="p">:</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">FE_ICON_MESSAGE</span><span class="p">:</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">FE_ICON_PRIVMSG</span><span class="p">:</span> <span class="w"> </span><span class="n">tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="n">ICON_MSG</span><span class="p">);</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">FE_ICON_HIGHLIGHT</span><span class="p">:</span> <span class="w"> </span><span class="n">tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="n">ICON_HILIGHT</span><span class="p">);</span> <span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">FE_ICON_FILEOFFER</span><span class="p">:</span> <span class="w"> </span><span class="n">tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="n">ICON_FILE</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="p">}</span> <span class="kt">void</span> <span class="nf">fe_tray_set_file</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_apply_setup</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_stop_flash</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">custom_icon1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_icon_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> <span class="w"> </span><span class="n">gtk_status_icon_set_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">,</span><span class="w"> </span><span class="n">custom_icon1</span><span class="p">);</span> <span class="w"> </span><span class="n">tray_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TS_CUSTOM</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="p">}</span> <span class="n">gboolean</span> <span class="nf">tray_toggle_visibility</span><span class="w"> </span><span class="p">(</span><span class="n">gboolean</span><span class="w"> </span><span class="n">force_hide</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">;</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="n">screen</span><span class="p">;</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">maximized</span><span class="p">;</span> <span class="w"> </span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">win</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> <span class="w"> </span><span class="cm">/* ph may have an invalid context now */</span> <span class="w"> </span><span class="n">hexchat_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="n">hexchat_find_context</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> <span class="w"> </span><span class="n">win</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"gtkwin_ptr"</span><span class="p">));</span> <span class="w"> </span><span class="n">tray_stop_flash</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="n">tray_reset_counts</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">win</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> <span class="cp">#if GTK_CHECK_VERSION(2,20,0)</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">force_hide</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">)))</span> <span class="cp">#else</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">force_hide</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">GTK_WIDGET_VISIBLE</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">))</span> <span class="cp">#endif</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_gui_tray_away</span><span class="p">)</span> <span class="w"> </span><span class="n">hexchat_command</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"ALLSERV AWAY"</span><span class="p">);</span> <span class="w"> </span><span class="n">gtk_window_get_position</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">y</span><span class="p">);</span> <span class="w"> </span><span class="n">screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_window_get_screen</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">);</span> <span class="w"> </span><span class="n">maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_gui_win_state</span><span class="p">;</span> <span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">));</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_gui_tray_away</span><span class="p">)</span> <span class="w"> </span><span class="n">hexchat_command</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"ALLSERV BACK"</span><span class="p">);</span> <span class="w"> </span><span class="n">gtk_window_set_screen</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">,</span><span class="w"> </span><span class="n">screen</span><span class="p">);</span> <span class="w"> </span><span class="n">gtk_window_move</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">maximized</span><span class="p">)</span> <span class="w"> </span><span class="n">gtk_window_maximize</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">);</span> <span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">));</span> <span class="w"> </span><span class="n">gtk_window_present</span><span class="w"> </span><span class="p">(</span><span class="n">win</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_menu_restore_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_toggle_visibility</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_menu_notify_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">tray</span><span class="p">,</span><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_status_icon_is_embedded</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">))</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">tray_restore_timer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add</span><span class="p">(</span><span class="mi">500</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GSourceFunc</span><span class="p">)</span><span class="n">tray_menu_try_restore</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tray_restore_timer</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">tray_restore_timer</span><span class="p">);</span> <span class="w"> </span><span class="n">tray_restore_timer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">}</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> <span class="nf">tray_menu_try_restore</span><span class="w"> </span><span class="p">()</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_cleanup</span><span class="p">();</span> <span class="w"> </span><span class="n">tray_init</span><span class="p">();</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_menu_quit_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">mg_open_quit_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> <span class="p">}</span> <span class="cm">/* returns 0-mixed 1-away 2-back */</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_find_away_status</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="p">;</span> <span class="w"> </span><span class="n">server</span><span class="w"> </span><span class="o">*</span><span class="n">serv</span><span class="p">;</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">away</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">back</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">serv_list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">serv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">serv</span><span class="o">-></span><span class="n">is_away</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">serv</span><span class="o">-></span><span class="n">reconnect_away</span><span class="p">)</span> <span class="w"> </span><span class="n">away</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">back</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">away</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">back</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">away</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_foreach_server</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="p">;</span> <span class="w"> </span><span class="n">server</span><span class="w"> </span><span class="o">*</span><span class="n">serv</span><span class="p">;</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">serv_list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">serv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">serv</span><span class="o">-></span><span class="n">connected</span><span class="p">)</span> <span class="w"> </span><span class="n">handle_command</span><span class="w"> </span><span class="p">(</span><span class="n">serv</span><span class="o">-></span><span class="n">server_session</span><span class="p">,</span><span class="w"> </span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> <span class="nf">tray_make_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">callback</span><span class="p">,</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">)</span> <span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_item_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_item_new</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="n">gtk_menu_shell_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">),</span><span class="w"> </span><span class="n">item</span><span class="p">);</span> <span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">),</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> <span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">callback</span><span class="p">),</span><span class="w"> </span><span class="n">userdata</span><span class="p">);</span> <span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">);</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">item</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_toggle_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkCheckMenuItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">setting</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="o">*</span><span class="n">setting</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">active</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">blink_item</span><span class="w"> </span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">setting</span><span class="p">,</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">menu_toggle_item</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="n">tray_toggle_cb</span><span class="p">,</span><span class="w"> </span><span class="n">setting</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">setting</span><span class="p">);</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_menu_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">);</span> <span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">);</span> <span class="cp">#ifdef WIN32</span> <span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">tray_menu_timer</span><span class="p">);</span> <span class="cp">#endif</span> <span class="p">}</span> <span class="cp">#ifdef WIN32</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_menu_enter_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_menu_inactivetime</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_menu_left_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_menu_inactivetime</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_get_real_time</span><span class="w"> </span><span class="p">();</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_check_hide</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tray_menu_inactivetime</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">g_get_real_time</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">tray_menu_inactivetime</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">2000000</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">tray_menu_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_menu_settings</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">wid</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">none</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">extern</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">setup_open</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="w"> </span><span class="n">setup_open</span><span class="w"> </span><span class="p">();</span> <span class="p">}</span> <span class="cp">#endif</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_menu_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">time</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="p">;</span> <span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">submenu</span><span class="p">;</span> <span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">away_status</span><span class="p">;</span> <span class="w"> </span><span class="cm">/* ph may have an invalid context now */</span> <span class="w"> </span><span class="n">hexchat_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="n">hexchat_find_context</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> <span class="w"> </span><span class="cm">/* close any old menu */</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">G_IS_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">))</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">tray_menu_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="n">menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_new</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="cm">/*gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));*/</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tray_get_window_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">WS_HIDDEN</span><span class="p">)</span> <span class="w"> </span><span class="n">tray_make_item</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Restore Window"</span><span class="p">),</span><span class="w"> </span><span class="n">tray_menu_restore_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">tray_make_item</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Hide Window"</span><span class="p">),</span><span class="w"> </span><span class="n">tray_menu_restore_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">tray_make_item</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">tray_menu_quit_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="cp">#ifndef WIN32 </span><span class="cm">/* submenus are buggy on win32 */</span> <span class="w"> </span><span class="n">submenu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mg_submenu</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Blink on"</span><span class="p">));</span> <span class="w"> </span><span class="n">blink_item</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_tray_chans</span><span class="p">,</span><span class="w"> </span><span class="n">submenu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Channel Message"</span><span class="p">));</span> <span class="w"> </span><span class="n">blink_item</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_tray_priv</span><span class="p">,</span><span class="w"> </span><span class="n">submenu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Private Message"</span><span class="p">));</span> <span class="w"> </span><span class="n">blink_item</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_tray_hilight</span><span class="p">,</span><span class="w"> </span><span class="n">submenu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Highlighted Message"</span><span class="p">));</span> <span class="w"> </span><span class="cm">/*blink_item (BIT_FILEOFFER, submenu, _("File Offer"));*/</span> <span class="w"> </span><span class="n">submenu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mg_submenu</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Change status"</span><span class="p">));</span> <span class="cp">#else </span><span class="cm">/* so show away/back in main tray menu */</span> <span class="w"> </span><span class="n">submenu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">menu</span><span class="p">;</span> <span class="cp">#endif</span> <span class="w"> </span><span class="n">away_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_make_item</span><span class="w"> </span><span class="p">(</span><span class="n">submenu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Away"</span><span class="p">),</span><span class="w"> </span><span class="n">tray_foreach_server</span><span class="p">,</span><span class="w"> </span><span class="s">"away"</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">away_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span> <span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> <span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tray_make_item</span><span class="w"> </span><span class="p">(</span><span class="n">submenu</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Back"</span><span class="p">),</span><span class="w"> </span><span class="n">tray_foreach_server</span><span class="p">,</span><span class="w"> </span><span class="s">"back"</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">away_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span> <span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> <span class="w"> </span><span class="n">menu_add_plugin_items</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="s">"\x5$TRAY"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="cp">#ifdef WIN32</span> <span class="w"> </span><span class="n">tray_make_item</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">tray_menu_quit_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">mg_create_icon_item</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Preferences"</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_STOCK_PREFERENCES</span><span class="p">,</span><span class="w"> </span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="n">tray_menu_settings</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="cp">#endif</span> <span class="w"> </span><span class="n">tray_make_item</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">tray_menu_quit_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">mg_create_icon_item</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Quit"</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_STOCK_QUIT</span><span class="p">,</span><span class="w"> </span><span class="n">menu</span><span class="p">,</span><span class="w"> </span><span class="n">tray_menu_quit_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">);</span> <span class="w"> </span><span class="n">g_object_ref_sink</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">);</span> <span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">);</span> <span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">),</span><span class="w"> </span><span class="s">"selection-done"</span><span class="p">,</span> <span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">tray_menu_destroy</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="cp">#ifdef WIN32</span> <span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">),</span><span class="w"> </span><span class="s">"leave-notify-event"</span><span class="p">,</span> <span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">tray_menu_left_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">),</span><span class="w"> </span><span class="s">"enter-notify-event"</span><span class="p">,</span> <span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">tray_menu_enter_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">tray_menu_timer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add</span><span class="p">(</span><span class="mi">500</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GSourceFunc</span><span class="p">)</span><span class="w"> </span><span class="n">tray_check_hide</span><span class="p">,</span><span class="w"> </span><span class="n">menu</span><span class="p">);</span> <span class="cp">#endif</span> <span class="w"> </span><span class="n">gtk_menu_popup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> <span class="w"> </span><span class="n">userdata</span><span class="p">,</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="p">);</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_init</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">flash_tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TS_NONE</span><span class="p">;</span> <span class="w"> </span><span class="n">custom_icon1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> <span class="w"> </span><span class="n">custom_icon2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> <span class="w"> </span><span class="n">sticon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_status_icon_new_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">ICON_NORMAL</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">),</span><span class="w"> </span><span class="s">"popup-menu"</span><span class="p">,</span> <span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">tray_menu_cb</span><span class="p">),</span><span class="w"> </span><span class="n">sticon</span><span class="p">);</span> <span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">),</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> <span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">tray_menu_restore_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">),</span><span class="w"> </span><span class="s">"notify::embedded"</span><span class="p">,</span> <span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">tray_menu_notify_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_hilight_cb</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">[],</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="cm">/*if (tray_status == TS_HIGHLIGHT)</span> <span class="cm"> return HEXCHAT_EAT_NONE;*/</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_tray_hilight</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="n">ICON_HILIGHT</span><span class="p">);</span> <span class="w"> </span><span class="cm">/* FIXME: hides any previous private messages */</span> <span class="w"> </span><span class="n">tray_hilight_count</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tray_hilight_count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": Highlighted message from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"channel"</span><span class="p">));</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": %u highlighted messages, latest from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">tray_hilight_count</span><span class="p">,</span><span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"channel"</span><span class="p">));</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_balloon_hilight</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="n">tray_set_balloonf</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": Highlighted message from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"channel"</span><span class="p">));</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">HEXCHAT_EAT_NONE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_message_cb</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">[],</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="cm">/*tray_status == TS_MESSAGE ||*/</span><span class="w"> </span><span class="n">tray_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TS_HIGHLIGHT</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">HEXCHAT_EAT_NONE</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_tray_chans</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="n">ICON_MSG</span><span class="p">);</span> <span class="w"> </span><span class="n">tray_pub_count</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tray_pub_count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": New public message from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"channel"</span><span class="p">));</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": %u new public messages."</span><span class="p">),</span><span class="w"> </span><span class="n">tray_pub_count</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_balloon_chans</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="n">tray_set_balloonf</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": New public message from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"channel"</span><span class="p">));</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">HEXCHAT_EAT_NONE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_priv</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">from</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">network</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">alert_match_word</span><span class="w"> </span><span class="p">(</span><span class="n">from</span><span class="p">,</span><span class="w"> </span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_irc_no_hilight</span><span class="p">))</span> <span class="w"> </span><span class="k">return</span><span class="p">;</span> <span class="w"> </span><span class="n">tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="n">ICON_MSG</span><span class="p">);</span> <span class="w"> </span><span class="n">network</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"network"</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">network</span><span class="p">)</span> <span class="w"> </span><span class="n">network</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"server"</span><span class="p">);</span> <span class="w"> </span><span class="n">tray_priv_count</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tray_priv_count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": Private message from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">from</span><span class="p">,</span><span class="w"> </span><span class="n">network</span><span class="p">);</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": %u private messages, latest from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">tray_priv_count</span><span class="p">,</span><span class="w"> </span><span class="n">from</span><span class="p">,</span><span class="w"> </span><span class="n">network</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_balloon_priv</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="n">tray_set_balloonf</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": Private message from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">from</span><span class="p">,</span><span class="w"> </span><span class="n">network</span><span class="p">);</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_priv_cb</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">[],</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="cm">/*if (tray_status == TS_HIGHLIGHT)</span> <span class="cm"> return HEXCHAT_EAT_NONE;*/</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_tray_priv</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="n">tray_priv</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">2</span><span class="p">]);</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">HEXCHAT_EAT_NONE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_invited_cb</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">[],</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="cm">/*if (tray_status == TS_HIGHLIGHT)</span> <span class="cm"> return HEXCHAT_EAT_NONE;*/</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_tray_priv</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="n">tray_priv</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span><span class="w"> </span><span class="s">"Invited"</span><span class="p">);</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">HEXCHAT_EAT_NONE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_dcc_cb</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">[],</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">network</span><span class="p">;</span> <span class="cm">/* if (tray_status == TS_FILEOFFER)</span> <span class="cm"> return HEXCHAT_EAT_NONE;*/</span> <span class="w"> </span><span class="n">network</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"network"</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">network</span><span class="p">)</span> <span class="w"> </span><span class="n">network</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hexchat_get_info</span><span class="w"> </span><span class="p">(</span><span class="n">ph</span><span class="p">,</span><span class="w"> </span><span class="s">"server"</span><span class="p">);</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_tray_priv</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">tray_set_flash</span><span class="w"> </span><span class="p">(</span><span class="n">ICON_FILE</span><span class="p">);</span> <span class="w"> </span><span class="n">tray_file_count</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tray_file_count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": File offer from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">network</span><span class="p">);</span> <span class="w"> </span><span class="k">else</span> <span class="w"> </span><span class="n">tray_set_tipf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": %u file offers, latest from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">tray_file_count</span><span class="p">,</span><span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">network</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_input_balloon_priv</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_away_omit_alerts</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">tray_find_away_status</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> <span class="w"> </span><span class="n">tray_set_balloonf</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">DISPLAY_NAME</span><span class="s">": File offer from: %s (%s)"</span><span class="p">),</span> <span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">network</span><span class="p">);</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">HEXCHAT_EAT_NONE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">int</span> <span class="nf">tray_focus_cb</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">[],</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">userdata</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_stop_flash</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="n">tray_reset_counts</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">HEXCHAT_EAT_NONE</span><span class="p">;</span> <span class="p">}</span> <span class="k">static</span><span class="w"> </span><span class="kt">void</span> <span class="nf">tray_cleanup</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">tray_stop_flash</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">((</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">sticon</span><span class="p">);</span> <span class="w"> </span><span class="n">sticon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="p">}</span> <span class="kt">void</span> <span class="nf">tray_apply_setup</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sticon</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefs</span><span class="p">.</span><span class="n">hex_gui_tray</span><span class="p">)</span> <span class="w"> </span><span class="n">tray_cleanup</span><span class="w"> </span><span class="p">();</span> <span class="w"> </span><span