예제 #1
0
void CommandHandler::handleCommand(const std::string &command, ChatTab *tab)
{
    std::string::size_type pos = command.find(' ');
    std::string type(command, 0, pos);
    std::string args(command, pos == std::string::npos ? command.size() : pos + 1);

    if (type == "help") // Do help before tabs so they can't override it
    {
        handleHelp(args, tab);
    }
    else if (tab->handleCommand(type, args))
    {
        // Nothing to do
    }
    else if (type == "announce")
    {
        handleAnnounce(args, tab);
    }
    else if (type == "where")
    {
        handleWhere(args, tab);
    }
    else if (type == "who")
    {
        handleWho(args, tab);
    }
    else if (type == "msg" || type == "whisper" || type == "w")
    {
        handleMsg(args, tab);
    }
    else if (type == "query" || type == "q")
    {
        handleQuery(args, tab);
    }
    else if (type == "ignore")
    {
        handleIgnore(args, tab);
    }
    else if (type == "unignore")
    {
        handleUnignore(args, tab);
    }
    else if (type == "join")
    {
        handleJoin(args, tab);
    }
    else if (type == "list")
    {
        handleListChannels(args, tab);
    }
    else if (type == "clear")
    {
        handleClear(args, tab);
    }
    else if (type == "party")
    {
        handleParty(args, tab);
    }
    else if (type == "me")
    {
        handleMe(args, tab);
    }
    else if (type == "record")
    {
        handleRecord(args, tab);
    }
    else if (type == "toggle")
    {
        handleToggle(args, tab);
    }
    else if (type == "present")
    {
        handlePresent(args, tab);
    }
    else
    {
        tab->chatLog(_("Unknown command."));
    }
}
예제 #2
0
extern "C" G_MODULE_EXPORT void on_AddClassFuncBodyUserRadiobutton_toggled(
    GtkWidget *widget, gpointer /*data*/)
    {
    handleToggle(widget, ClassGraph::AN_FuncBodyUsers);
    }
예제 #3
0
extern "C" G_MODULE_EXPORT void on_AddClassMemberRadiobutton_toggled(
    GtkWidget *widget, gpointer /*data*/)
    {
    handleToggle(widget, ClassGraph::AN_MemberChildren);
    }
예제 #4
0
extern "C" G_MODULE_EXPORT void on_AddClassTemplateRadioButton_toggled(
        GtkWidget *widget, gpointer /*data*/)
    {
    handleToggle(widget, ClassGraph::AN_Templates);
    }
예제 #5
0
extern "C" G_MODULE_EXPORT void on_AddClassSubclassRadiobutton_toggled(
    GtkWidget *widget, gpointer /*data*/)
    {
    handleToggle(widget, ClassGraph::AN_Subclass);
    }