Ejemplo n.º 1
0
void JabberPlugin::registerMessages()
{
    Command cmd;
    cmd->id			 = MessageJabber;
    cmd->text		 = "Jabber";
    cmd->icon		 = "message";
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defJabber;
    Event eMsg(EventCreateMessageType, cmd);
    eMsg.process();

    cmd->id			 = MessageJabberOnline;
    cmd->text		 = I18N_NOOP("Log On");
    cmd->icon		 = "Jabber_online";
    cmd->accel		 = "Ctrl+L";
    cmd->menu_grp	 = 0x3020;
    cmd->param		 = &defJabberOnline;
    eMsg.process();

    cmd->id			 = MessageJabberOffline;
    cmd->text		 = I18N_NOOP("Log Off");
    cmd->icon		 = "Jabber_offline";
    cmd->param		 = &defJabberOffline;
    eMsg.process();

    cmd->id			 = MessageJabberError;
    cmd->text		 = I18N_NOOP("Error");
    cmd->icon		 = "error";
    cmd->param		 = &defJabberError;
    eMsg.process();
}
Ejemplo n.º 2
0
void JabberPlugin::unregisterMessages()
{
    Event eMsg(EventRemoveMessageType, (void*)MessageJabber);
    eMsg.process();
    Event eMsgOnline(EventRemoveMessageType, (void*)MessageJabberOnline);
    eMsgOnline.process();
    Event eMsgOffline(EventRemoveMessageType, (void*)MessageJabberOffline);
    eMsgOffline.process();
    Event eMsgError(EventRemoveMessageType, (void*)MessageJabberError);
    eMsgError.process();
}
Ejemplo n.º 3
0
void JabberPlugin::registerMessages()
{
    Command cmd;
    cmd->id			 = MessageJabber;
    cmd->text		 = "Jabber";
    cmd->icon		 = "message";
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defJabber;
    Event eMsg(EventCreateMessageType, cmd);
    eMsg.process();
}
Ejemplo n.º 4
0
LiveJournalPlugin::~LiveJournalPlugin()
{
    Event eMenu(EventMenuRemove, (void*)MenuWeb);
    eMenu.process();
    Event eMsg(EventRemoveMessageType, (void*)MessageJournal);
    eMsg.process();
    Event eMsgWWW(EventRemoveMessageType, (void*)CmdMenuWeb);
    eMsgWWW.process();
    Event eMsgUpd(EventRemoveMessageType, (void*)MessageUpdated);
    eMsgUpd.process();
    delete m_protocol;
}
Ejemplo n.º 5
0
LiveJournalPlugin::LiveJournalPlugin(unsigned base)
    : Plugin(base)
{
    m_protocol = new LiveJournalProtocol(this);

    Event eMenu(EventMenuCreate, (void*)MenuWeb);
    eMenu.process();

    Command cmd;
    cmd->id			 = CmdMenuWeb;
    cmd->text		 = "_";
    cmd->menu_id	 = MenuWeb;
    cmd->menu_grp	 = 0x1000;
    cmd->flags		 = COMMAND_CHECK_STATE;
    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();

    cmd->id			 = MessageJournal;
    cmd->text		 = I18N_NOOP("LiveJournal &post");
    cmd->icon		 = "LiveJournal";
    cmd->accel		 = "Ctrl+P";
    cmd->menu_grp	 = 0x3080;
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defJournalMessage;
    Event eMsg(EventCreateMessageType, cmd);
    eMsg.process();

    cmd->id			 = CmdMenuWeb;
    cmd->text		 = I18N_NOOP("LiveJournal &WWW");
    cmd->icon		 = NULL;
    cmd->accel		 = NULL;
    cmd->menu_grp	 = 0x3090;
    cmd->popup_id	 = MenuWeb;
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defWWWJournalMessage;
    eMsg.process();

    cmd->id			 = MessageUpdated;
    cmd->text		 = I18N_NOOP("Friends updated");
    cmd->icon		 = "LiveJournal_upd";
    cmd->accel		 = NULL;
    cmd->menu_grp	 = 0;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defUpdatedMessage;
    eMsg.process();

    Event ePlugin(EventGetPluginInfo, (void*)"_core");
    pluginInfo *info = (pluginInfo*)(ePlugin.process());
    core = static_cast<CorePlugin*>(info->plugin);
}
Ejemplo n.º 6
0
SMSPlugin::SMSPlugin(unsigned base)
        : Plugin(base)
{
    SerialPacket = registerType();
    getContacts()->addPacketType(SerialPacket, "Serial port", true);

    Command cmd;
    cmd->id			 = MessagePhoneCall;
    cmd->text		 = I18N_NOOP("Phone call");
    cmd->icon		 = "phone";
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defPhoneCall;

    Event eMsg(EventCreateMessageType, cmd);
    eMsg.process();

    m_protocol = new SMSProtocol(this);

    qApp->installEventFilter(this);
    setPhoneCol();
}
Ejemplo n.º 7
0
void JabberPlugin::unregisterMessages()
{
    Event eMsg(EventRemoveMessageType, (void*)MessageJabber);
    eMsg.process();
}