Пример #1
0
ICQPlugin::~ICQPlugin()
{
    unregisterMessages();

    delete m_icq;
    delete m_aim;

    getContacts()->removePacketType(ICQPacket);
    getContacts()->removePacketType(ICQDirectPacket);
    getContacts()->removePacketType(AIMPacket);

    Event eVisible(EventCommandRemove, (void*)CmdVisibleList);
    eVisible.process();

    Event eInvisible(EventCommandRemove, (void*)CmdInvisibleList);
    eInvisible.process();

    Event eEncoding(EventCommandRemove, (void*)CmdChangeEncoding);
    eEncoding.process();

    Event eAllEncodings(EventCommandRemove, (void*)CmdAllEncodings);
    eAllEncodings.process();

    Event eCheckInvisible(EventCommandRemove, (void*)CmdCheckInvisible);
    eCheckInvisible.process();

    Event eMenuEncoding(EventMenuRemove, (void*)MenuEncoding);
    eMenuEncoding.process();

    Event eMenuSearch(EventMenuRemove, (void*)MenuSearchResult);
    eMenuSearch.process();

    Event eMenuGroups(EventMenuRemove, (void*)MenuGroups);
    eMenuGroups.process();
}
Пример #2
0
ICQPlugin::~ICQPlugin()
{
    unregisterMessages();

    delete m_icq;
    delete m_aim;

    getContacts()->removePacketType(OscarPacket);
    getContacts()->removePacketType(ICQDirectPacket);
    getContacts()->removePacketType(AIMDirectPacket);

    Event eVisible(EventCommandRemove, (void*)CmdVisibleList);
    eVisible.process();

    Event eInvisible(EventCommandRemove, (void*)CmdInvisibleList);
    eInvisible.process();

    Event eCheckInvisible(EventCommandRemove, (void*)CmdCheckInvisible);
    eCheckInvisible.process();

    Event eCheckInvisibleAll(EventCommandRemove, (void*)CmdCheckInvisibleAll);
    eCheckInvisibleAll.process();

    Event eMenuSearch(EventMenuRemove, (void*)MenuSearchResult);
    eMenuSearch.process();

    Event eMenuGroups(EventMenuRemove, (void*)MenuIcqGroups);
    eMenuGroups.process();

    Event eMenuCheckInvisible(EventMenuRemove, (void*)MenuCheckInvisible);
    eMenuCheckInvisible.process();
}
Пример #3
0
JabberPlugin::~JabberPlugin()
{
    unregisterMessages();

    Event eMenuSearch(EventMenuRemove, (void*)MenuSearchResult);
    eMenuSearch.process();

    Event eMenuGroups(EventMenuRemove, (void*)MenuGroups);
    eMenuGroups.process();

    Event eCmdBrowser(EventCommandRemove, (void*)CmdBrowser);
    eMenuGroups.process();

    Event eToolbar(EventToolbarRemove, (void*)BarBrowser);
    eToolbar.process();

    delete m_protocol;
    getContacts()->removePacketType(JabberPacket);
}
Пример #4
0
ICQPlugin::ICQPlugin(unsigned base)
        : Plugin(base)
{
    Event ePlugin(EventGetPluginInfo, (void*)"_core");
    pluginInfo *info = (pluginInfo*)(ePlugin.process());
    core = static_cast<CorePlugin*>(info->plugin);

#if defined(WIN32) && (COMPAT_QT_VERSION < 0x030000)
    qInitJpeg();
#endif
    icq_plugin = this;

    OscarPacket = registerType();
    getContacts()->addPacketType(OscarPacket, "Oscar");
    ICQDirectPacket = registerType();
    getContacts()->addPacketType(ICQDirectPacket, "ICQ.Direct");
    AIMDirectPacket = registerType();
    getContacts()->addPacketType(AIMDirectPacket, "AIM.Direct");

    m_icq = new ICQProtocol(this);
    m_aim = new AIMProtocol(this);

    Event eMenuSearch(EventMenuCreate, (void*)MenuSearchResult);
    eMenuSearch.process();
    Event eMenuGroups(EventMenuCreate, (void*)MenuIcqGroups);
    eMenuGroups.process();
    Event eMenuCheckInvisible(EventMenuCreate, (void*)MenuCheckInvisible);
    eMenuCheckInvisible.process();

    Command cmd;
    cmd->id          = CmdVisibleList;
    cmd->text        = I18N_NOOP("Visible list");
    cmd->menu_id     = MenuContactGroup;
    cmd->menu_grp    = 0x8010;
    cmd->flags		 = COMMAND_CHECK_STATE;

    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();

    cmd->id			 = CmdInvisibleList;
    cmd->text		 = I18N_NOOP("Invisible list");
    cmd->menu_grp	 = 0x8011;
    eCmd.process();

    cmd->id			 = CmdIcqSendMessage;
    cmd->text		 = I18N_NOOP("&Message");
    cmd->icon		 = "message";
    cmd->menu_id	 = MenuSearchResult;
    cmd->menu_grp	 = 0x1000;
    cmd->bar_id		 = 0;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_DEFAULT;
    eCmd.process();

    cmd->id			 = CmdInfo;
    cmd->text		 = I18N_NOOP("User &info");
    cmd->icon		 = "info";
    cmd->menu_grp	 = 0x1001;
    eCmd.process();

    cmd->id			 = CmdGroups;
    cmd->text		 = I18N_NOOP("&Add to group");
    cmd->icon		 = NULL;
    cmd->menu_grp	 = 0x1002;
    cmd->popup_id	 = MenuIcqGroups;
    eCmd.process();

    cmd->id			 = CmdGroups;
    cmd->text		 = "_";
    cmd->menu_id	 = MenuIcqGroups;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdCheckInvisibleAll;
    cmd->text		 = I18N_NOOP("Check &invisible");
    cmd->icon		 = "ICQ_invisible";
    cmd->menu_id	 = MenuMain;
    cmd->menu_grp	 = 0x2090;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdCheckInvisibleAll;
    cmd->text		 = I18N_NOOP("&All");
    cmd->icon		 = NULL;
    cmd->menu_id	 = MenuCheckInvisible;
    cmd->menu_grp	 = 0x2000;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_DEFAULT;
    eCmd.process();

    cmd->id			 = CmdCheckInvisible;
    cmd->text		 = I18N_NOOP("&Only invisible");
    cmd->icon		 = NULL;
    cmd->menu_id	 = MenuCheckInvisible;
    cmd->menu_grp	 = 0x2001;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_DEFAULT;
    eCmd.process();

    registerMessages();

    RetrySendDND = registerType();
    RetrySendOccupied = registerType();
}
Пример #5
0
JabberPlugin::JabberPlugin(unsigned base)
        : Plugin(base)
{
#ifdef WIN32
    qInitJpeg();
#endif

    JabberPacket = registerType();
    getContacts()->addPacketType(JabberPacket, jabber_descr.text, true);

    EventAgentFound = registerType();
    EventAgentInfo	= registerType();
    EventAgentRegister = registerType();
    EventSearch		= registerType();
    EventSearchDone	= registerType();

    MenuSearchResult = registerType();
    MenuGroups		 = registerType();
    CmdSendMessage	 = registerType();
    CmdGroups		 = registerType();
    CmdBrowser		 = registerType();
    BarBrowser		 = registerType();
    CmdBack			 = registerType();
    CmdForward		 = registerType();
    CmdUrl			 = registerType();
    EventDiscoItem	 = registerType();
    CmdInfo			 = registerType();
    CmdRegister		 = registerType();
    CmdSearch		 = registerType();
	CmdNode			 = registerType();

    IconDef icon;
    icon.name = "Jabber_online";
    icon.xpm = jabber_online;
    icon.isSystem = false;

    Event eIcon(EventAddIcon, &icon);
    eIcon.process();

    icon.name = "Jabber_offline";
    icon.xpm = jabber_offline;
    eIcon.process();

    icon.name = "Jabber_away";
    icon.xpm = jabber_away;
    eIcon.process();

    icon.name = "Jabber_na";
    icon.xpm = jabber_na;
    eIcon.process();

    icon.name = "Jabber_dnd";
    icon.xpm = jabber_dnd;
    eIcon.process();

    icon.name = "Jabber_ffc";
    icon.xpm = jabber_ffc;
    eIcon.process();

    icon.name = "Jabber_invisible";
    icon.xpm = jabber_invisible;
    eIcon.process();

    icon.name = "ICQ_offline";
    icon.xpm = icq_offline;
    eIcon.process();

    icon.name = "ICQ_online";
    icon.xpm = icq_online;
    eIcon.process();

    icon.name = "ICQ_away";
    icon.xpm = icq_away;
    eIcon.process();

    icon.name = "ICQ_na";
    icon.xpm = icq_na;
    eIcon.process();

    icon.name = "ICQ_dnd";
    icon.xpm = icq_dnd;
    eIcon.process();

    icon.name = "ICQ_ffc";
    icon.xpm = icq_ffc;
    eIcon.process();

    icon.name = "ICQ_invisible";
    icon.xpm = icq_invisible;
    eIcon.process();

    icon.name = "MSN_offline";
    icon.xpm = msn_offline;
    eIcon.process();

    icon.name = "MSN_online";
    icon.xpm = msn_online;
    eIcon.process();

    icon.name = "MSN_away";
    icon.xpm = msn_away;
    eIcon.process();

    icon.name = "MSN_na";
    icon.xpm = msn_na;
    eIcon.process();

    icon.name = "MSN_dnd";
    icon.xpm = msn_dnd;
    eIcon.process();

    icon.name = "MSN_invisible";
    icon.xpm = msn_invisible;
    eIcon.process();

    icon.name = "AIM_offline";
    icon.xpm = aim_offline;
    eIcon.process();

    icon.name = "AIM_online";
    icon.xpm = aim_online;
    eIcon.process();

    icon.name = "AIM_away";
    icon.xpm = aim_away;
    eIcon.process();

    icon.name = "Yahoo_offline";
    icon.xpm = yahoo_offline;
    eIcon.process();

    icon.name = "Yahoo_away";
    icon.xpm = yahoo_away;
    eIcon.process();

    icon.name = "Yahoo_na";
    icon.xpm = yahoo_na;
    eIcon.process();

    icon.name = "Yahoo_dnd";
    icon.xpm = yahoo_dnd;
    eIcon.process();

    icon.name = "Yahoo_ffc";
    icon.xpm = yahoo_ffc;
    eIcon.process();

    icon.name = "reg";
    icon.xpm = reg;
    eIcon.process();

    Event eMenuSearch(EventMenuCreate, (void*)MenuSearchResult);
    eMenuSearch.process();
    Event eMenuGroups(EventMenuCreate, (void*)MenuGroups);
    eMenuGroups.process();
    Event eToolbar(EventToolbarCreate, (void*)BarBrowser);
    eToolbar.process();

    Command	cmd;
    cmd->id			 = CmdSendMessage;
    cmd->text		 = I18N_NOOP("&Message");
    cmd->icon		 = "message";
    cmd->menu_id	 = MenuSearchResult;
    cmd->menu_grp	 = 0x1000;
    cmd->flags		 = COMMAND_DEFAULT;
    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();

    cmd->id			 = CmdInfo;
    cmd->text		 = I18N_NOOP("User &info");
    cmd->icon		 = "info";
    cmd->menu_grp	 = 0x1001;
    eCmd.process();

    cmd->id			 = CmdGroups;
    cmd->text		 = I18N_NOOP("&Add to group");
    cmd->icon		 = NULL;
    cmd->menu_grp	 = 0x1002;
    cmd->popup_id	 = MenuGroups;
    eCmd.process();

    cmd->id			 = CmdGroups;
    cmd->text		 = "_";
    cmd->menu_id	 = MenuGroups;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdBrowser;
    cmd->text		 = I18N_NOOP("Jabber browser");
    cmd->icon		 = "Jabber_online";
    cmd->menu_grp	 = 0x20F0;
    cmd->menu_id	 = MenuMain;
    cmd->popup_id	 = NULL;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdBrowser;
    cmd->text		 = I18N_NOOP("Jabber browser");
    cmd->icon		 = "Jabber_online";
    cmd->menu_grp	 = 0x20F0;
    cmd->menu_id	 = MenuContact;
    cmd->popup_id	 = NULL;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdBack;
    cmd->text		 = I18N_NOOP("&Back");
    cmd->icon		 = "1leftarrow";
    cmd->bar_grp	 = 0x1000;
    cmd->bar_id		 = BarBrowser;
    cmd->menu_id	 = 0;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdForward;
    cmd->text		 = I18N_NOOP("&Next");
    cmd->icon		 = "1rightarrow";
    cmd->bar_grp	 = 0x1001;
    eCmd.process();

    cmd->id			 = CmdUrl;
    cmd->text		 = I18N_NOOP("JID");
    cmd->icon		 = "run";
    cmd->bar_grp	 = 0x2000;
    cmd->flags		 = BTN_COMBO_CHECK;
    eCmd.process();

    cmd->id			 = CmdNode;
    cmd->text		 = I18N_NOOP("Node");
    cmd->bar_grp	 = 0x2001;
    cmd->flags		 = BTN_COMBO | BTN_NO_BUTTON;
    eCmd.process();

    cmd->id			 = CmdSearch;
    cmd->text		 = I18N_NOOP("&Search");
    cmd->icon		 = "find";
    cmd->bar_grp	 = 0x3000;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdRegister;
    cmd->text		 = I18N_NOOP("&Register");
    cmd->icon		 = "reg";
    cmd->bar_grp	 = 0x3001;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdInfo;
    cmd->text		 = I18N_NOOP("Info");
    cmd->icon		 = "info";
    cmd->bar_grp	 = 0x3010;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdConfigure;
    cmd->text		 = I18N_NOOP("Configure");
    cmd->icon		 = "configure";
    cmd->bar_grp	 = 0x3020;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    m_protocol = new JabberProtocol(this);
    registerMessages();
}
Пример #6
0
ICQPlugin::ICQPlugin(unsigned base, const char *cfg)
        : Plugin(base)
{
#ifdef WIN32
    qInitJpeg();
#endif

    load_data(icqData, &data, cfg);

    ICQPacket = registerType();
    getContacts()->addPacketType(ICQPacket, icq_descr.text);
    ICQDirectPacket = registerType();
    getContacts()->addPacketType(ICQDirectPacket, "ICQ.Direct");
    AIMPacket = registerType();
    getContacts()->addPacketType(AIMPacket, aim_descr.text);

    IconDef icon;
    icon.name = "ICQ_online";
    icon.xpm = online;
    icon.isSystem = false;

    Event eIcon(EventAddIcon, &icon);
    eIcon.process();

    icon.name = "ICQ_offline";
    icon.xpm = offline;
    eIcon.process();

    icon.name = "ICQ_away";
    icon.xpm = away;
    eIcon.process();

    icon.name = "ICQ_na";
    icon.xpm = na;
    eIcon.process();

    icon.name = "ICQ_occupied";
    icon.xpm = occupied;
    eIcon.process();

    icon.name = "ICQ_dnd";
    icon.xpm = dnd;
    eIcon.process();

    icon.name = "ICQ_ffc";
    icon.xpm = ffc;
    eIcon.process();

    icon.name = "ICQ_invisible";
    icon.xpm = invisible;
    eIcon.process();

    icon.name = "birthday";
    icon.xpm = birthday;
    eIcon.process();

    icon.name = "more";
    icon.xpm = more;
    eIcon.process();

    icon.name = "interest";
    icon.xpm = interest;
    eIcon.process();

    icon.name = "past";
    icon.xpm = past;
    eIcon.process();

    icon.name = "useronline";
    icon.xpm = useronline;
    eIcon.process();

    icon.name = "useroffline";
    icon.xpm = useroffline;
    eIcon.process();

    icon.name = "userunknown";
    icon.xpm = userunknown;
    eIcon.process();

    icon.name = "encoding";
    icon.xpm = encoding;
    eIcon.process();

    icon.name = "url";
    icon.xpm = url;
    eIcon.process();

    icon.name = "contacts";
    icon.xpm = contacts;
    eIcon.process();

    icon.name = "web";
    icon.xpm = web;
    eIcon.process();

    icon.name = "mailpager";
    icon.xpm = mailpager;
    eIcon.process();

    icon.name = "icqphone";
    icon.xpm = icqphone;
    eIcon.process();

    icon.name = "icqphonebusy";
    icon.xpm = icqphonebusy;
    eIcon.process();

    icon.name = "sharedfiles";
    icon.xpm = sharedfiles;
    eIcon.process();

    icon.name = "pict";
    icon.xpm = pict;
    eIcon.process();

    icon.name = "AIM_offline";
    icon.xpm = aim_offline;
    eIcon.process();

    icon.name = "AIM_online";
    icon.xpm = aim_online;
    eIcon.process();

    icon.name = "AIM_away";
    icon.xpm = aim_away;
    eIcon.process();

    EventSearch = EventUser + registerType();
    EventSearchDone = EventUser + registerType();
    EventAutoReplyFail = EventUser + registerType();
    EventRandomChat = EventUser + registerType();
    EventRandomChatInfo = EventUser + registerType();
    MenuEncoding = registerType();
    MenuSearchResult = registerType();
    MenuGroups = registerType();

    CmdVisibleList = registerType();
    CmdInvisibleList = registerType();
    CmdChangeEncoding = registerType();
    CmdAllEncodings = registerType();
    CmdSendMessage = registerType();
    CmdGroups = registerType();
    CmdCheckInvisible = registerType();

    m_icq = new ICQProtocol(this);
    m_aim = new AIMProtocol(this);

    Event eMenuEncoding(EventMenuCreate, (void*)MenuEncoding);
    eMenuEncoding.process();
    Event eMenuSearch(EventMenuCreate, (void*)MenuSearchResult);
    eMenuSearch.process();
    Event eMenuGroups(EventMenuCreate, (void*)MenuGroups);
    eMenuGroups.process();

    Command cmd;
    cmd->id          = CmdVisibleList;
    cmd->text        = I18N_NOOP("Visible list");
    cmd->menu_id     = MenuContactGroup;
    cmd->menu_grp    = 0x8010;
    cmd->flags		 = COMMAND_CHECK_STATE;

    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();

    cmd->id			 = CmdInvisibleList;
    cmd->text		 = I18N_NOOP("Invisible list");
    cmd->menu_grp	 = 0x8011;
    eCmd.process();

    cmd->id			 = CmdChangeEncoding;
    cmd->text		 = "_";
    cmd->menu_id	 = MenuEncoding;
    cmd->menu_grp	 = 0x1000;
    eCmd.process();

    cmd->id			 = CmdAllEncodings;
    cmd->text		 = I18N_NOOP("&Show all encodings");
    cmd->menu_id	 = MenuEncoding;
    cmd->menu_grp	 = 0x8000;
    eCmd.process();

    cmd->id			 = CmdChangeEncoding;
    cmd->text		 = I18N_NOOP("Change &encoding");
    cmd->icon		 = "encoding";
    cmd->menu_id	 = 0;
    cmd->menu_grp	 = 0;
    cmd->bar_id		 = ToolBarContainer;
    cmd->bar_grp	 = 0x8080;
    cmd->popup_id	 = MenuEncoding;
    eCmd.process();

    cmd->id			 = CmdChangeEncoding;
    cmd->text		 = I18N_NOOP("Change &encoding");
    cmd->icon		 = "encoding";
    cmd->menu_id	 = 0;
    cmd->menu_grp	 = 0;
    cmd->bar_id		 = BarHistory;
    cmd->bar_grp	 = 0x8080;
    cmd->popup_id	 = MenuEncoding;
    eCmd.process();

    cmd->id			 = CmdSendMessage;
    cmd->text		 = I18N_NOOP("&Message");
    cmd->icon		 = "message";
    cmd->menu_id	 = MenuSearchResult;
    cmd->menu_grp	 = 0x1000;
    cmd->bar_id		 = 0;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_DEFAULT;
    eCmd.process();

    cmd->id			 = CmdInfo;
    cmd->text		 = I18N_NOOP("User &info");
    cmd->icon		 = "info";
    cmd->menu_grp	 = 0x1001;
    eCmd.process();

    cmd->id			 = CmdGroups;
    cmd->text		 = I18N_NOOP("&Add to group");
    cmd->icon		 = NULL;
    cmd->menu_grp	 = 0x1002;
    cmd->popup_id	 = MenuGroups;
    eCmd.process();

    cmd->id			 = CmdGroups;
    cmd->text		 = "_";
    cmd->menu_id	 = MenuGroups;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdCheckInvisible;
    cmd->text		 = I18N_NOOP("Check &invisible");
    cmd->icon		 = "ICQ_invisible";
    cmd->menu_id	 = MenuMain;
    cmd->menu_grp	 = 0x2090;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    registerMessages();

    RetrySendDND = registerType();
    RetrySendOccupied = registerType();
}
Пример #7
0
JabberPlugin::JabberPlugin(unsigned base, Buffer *cfg)
        : Plugin(base)
{
#if defined(WIN32) && (COMPAT_QT_VERSION < 0x030000)
    qInitJpeg();
#endif
    plugin = this;
    load_data(jabberData, &data, cfg);
    JabberPacket = registerType();
    getContacts()->addPacketType(JabberPacket, jabber_descr.text, true);

    IconDef icon;
    icon.name = "Jabber";
    icon.xpm  = jabber;
    Event eIcon(EventAddIcon, &icon);
    eIcon.process();

    icon.name = "reg";
    icon.xpm  = reg;
    eIcon.process();

    icon.name = "connect";
    icon.xpm  = connect_xpm;
	icon.system = "connect_established";
    eIcon.process();

    Event eMenuSearch(EventMenuCreate, (void*)MenuSearchResult);
    eMenuSearch.process();
    Event eMenuGroups(EventMenuCreate, (void*)MenuJabberGroups);
    eMenuGroups.process();
    Event eMenuBrowser(EventMenuCreate, (void*)MenuBrowser);
    eMenuBrowser.process();
    Event eToolbar(EventToolbarCreate, (void*)BarBrowser);
    eToolbar.process();

    Command	cmd;
    cmd->id			 = CmdJabberMessage;
    cmd->text		 = I18N_NOOP("&Message");
    cmd->icon		 = "message";
    cmd->menu_id	 = MenuSearchResult;
    cmd->menu_grp	 = 0x1000;
    cmd->flags		 = COMMAND_DEFAULT;
    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();

    cmd->id			 = CmdBrowseInfo;
    cmd->text		 = I18N_NOOP("User &info");
    cmd->icon		 = "info";
    cmd->menu_grp	 = 0x1001;
    eCmd.process();

    cmd->id			 = CmdGroups;
    cmd->text		 = I18N_NOOP("&Add to group");
    cmd->icon		 = NULL;
    cmd->menu_grp	 = 0x1002;
    cmd->popup_id	 = MenuJabberGroups;
    eCmd.process();

    cmd->id			 = CmdGroups;
    cmd->text		 = "_";
    cmd->menu_id	 = MenuJabberGroups;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdBack;
    cmd->text		 = I18N_NOOP("&Back");
    cmd->icon		 = "1leftarrow";
    cmd->bar_grp	 = 0x1000;
    cmd->bar_id		 = BarBrowser;
    cmd->menu_id	 = 0;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdForward;
    cmd->text		 = I18N_NOOP("&Next");
    cmd->icon		 = "1rightarrow";
    cmd->bar_grp	 = 0x1001;
    eCmd.process();

    cmd->id			 = CmdUrl;
    cmd->text		 = I18N_NOOP("JID");
    cmd->icon		 = "run";
    cmd->bar_grp	 = 0x2000;
    cmd->flags		 = BTN_COMBO_CHECK;
    eCmd.process();

    cmd->id			 = CmdNode;
    cmd->text		 = I18N_NOOP("Node");
    cmd->bar_grp	 = 0x2001;
    cmd->flags		 = BTN_COMBO | BTN_NO_BUTTON;
    eCmd.process();

    cmd->id			 = CmdBrowseSearch;
    cmd->text		 = I18N_NOOP("&Search");
    cmd->icon		 = "find";
    cmd->bar_grp	 = 0x3000;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdRegister;
    cmd->text		 = I18N_NOOP("&Register");
    cmd->icon		 = "reg";
    cmd->bar_grp	 = 0x3001;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdBrowseInfo;
    cmd->text		 = I18N_NOOP("Info");
    cmd->icon		 = "info";
    cmd->bar_grp	 = 0x3010;
    eCmd.process();

    cmd->id			 = CmdBrowseConfigure;
    cmd->text		 = I18N_NOOP("Configure");
    cmd->icon		 = "configure";
    cmd->bar_grp	 = 0x3020;
    eCmd.process();

    cmd->id			 = CmdBrowseMode;
    cmd->text		 = I18N_NOOP("Browser mode");
    cmd->icon		 = "configure";
    cmd->bar_grp	 = 0x5000;
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->popup_id	 = MenuBrowser;
    eCmd.process();

    cmd->id			 = CmdOneLevel;
    cmd->text		 = I18N_NOOP("Load one level");
    cmd->icon		 = NULL;
    cmd->bar_id		 = 0;
    cmd->bar_grp	 = 0;
    cmd->menu_id	 = MenuBrowser;
    cmd->menu_grp	 = 0x1000;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_CHECK_STATE;
    eCmd.process();

    cmd->id			 = CmdAllLevels;
    cmd->text		 = I18N_NOOP("Load all levels");
    cmd->menu_grp	 = 0x1001;
    eCmd.process();

    cmd->id			 = CmdModeDisco;
    cmd->text		 = "Discovery";
    cmd->menu_grp	 = 0x2000;
    eCmd.process();

    cmd->id			 = CmdModeBrowse;
    cmd->text		 = "Browse";
    cmd->menu_grp	 = 0x2001;
    eCmd.process();

    cmd->id			 = CmdModeAgents;
    cmd->text		 = "Agents";
    cmd->menu_grp	 = 0x2002;
    eCmd.process();

    m_protocol = new JabberProtocol(this);
    registerMessages();
}