LRESULT WaitingUsersFrame::onGrantSlot(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { User::Ptr user = getSelectedUser(); if (user) { UploadManager::getInstance()->reserveSlot(user); } return 0; }
LRESULT WaitingUsersFrame::onAddToFavorites(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { User::Ptr user = getSelectedUser(); if (user) { FavoriteManager::getInstance()->addFavoriteUser(user); } return 0; }
LRESULT WaitingUsersFrame::onRemove(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { if (getSelectedUser()) { const UserPtr User = getCurrentdUser(); if (User) { UploadManager::LockInstanceQueue lockedInstance; // [+] IRainman opt. lockedInstance->clearUserFilesL(User); } } else { if (m_ctrlList.getSelectedCount()) { int j = -1; UserList RemoveUsers; while ((j = m_ctrlList.GetNextItem(j, LVNI_SELECTED)) != -1) { // Ok let's cheat here, if you try to remove more users here is not working :( RemoveUsers.push_back((m_ctrlList.getItemData(j))->getUser()); } UploadManager::LockInstanceQueue lockedInstance; // [+] IRainman opt. for (auto i = RemoveUsers.cbegin(); i != RemoveUsers.cend(); ++i) { lockedInstance->clearUserFilesL(*i); } } } m_needsUpdateStatus = true; // [!] IRainman opt. return 0; }
LRESULT WaitingUsersFrame::onPrivateMessage(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { User::Ptr user = getSelectedUser(); if (user) { PrivateFrame::openWindow(user); } return 0; }
void UploadQueueFrame::removeSelectedUser() { UserPtr User = getSelectedUser(); if(User) { UploadManager::getInstance()->clearUserFiles(User, true); } updateStatus(); }
// Remove queued item LRESULT WaitingUsersFrame::onRemove(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { User::Ptr user = getSelectedUser(); if (user) { UploadManager::getInstance()->clearUserFiles(user); } return 0; }
LRESULT WaitingUsersFrame::onGetList(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { User::Ptr user = getSelectedUser(); if (user) { QueueManager::getInstance()->addList(user, QueueItem::FLAG_CLIENT_VIEW); } return 0; }
void IRCChannelPage::onSendMessage(wxCommandEvent &e) { e.Skip(); shared_ptr<IRCUser> user = getSelectedUser(); if(user == nullptr || user->isLocal()) return; getIRCWindow()->openChat(user->getID()); }
void IRCChannelPage::onUserBan(wxCommandEvent &e) { e.Skip(); shared_ptr<IRCUser> user = getSelectedUser(); if(user != nullptr) { toggleUserMode(user, ircModeTypeBan); kickUser(user); } }
LRESULT UploadQueueFrame::onRemove(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { if(usingUserMenu) { UserPtr User = getSelectedUser(); if(User) { UploadManager::getInstance()->clearUserFiles(User); } } else { int i = -1; UserList RemoveUsers; while((i = ctrlList.GetNextItem(i, LVNI_SELECTED)) != -1) { RemoveUsers.push_back(((UploadQueueItem*)ctrlList.getItemData(i))->getUser()); } for(UserList::const_iterator i = RemoveUsers.begin(); i != RemoveUsers.end(); ++i) { UploadManager::getInstance()->clearUserFiles(*i); } } updateStatus(); return 0; }
void KaduExtInfo::onPopupMenuCreate() { kdebugf(); if (menuBirthday) { UserBox::userboxmenu->removeItem(UserBox::userboxmenu->getItem(tr("I know about birthday :)"))); menuBirthday = false; } if (menuNameDay) { UserBox::userboxmenu->removeItem(UserBox::userboxmenu->getItem(tr("I know about name day :)"))); menuNameDay = false; } if (getSelectedUser(currentUser)) { if (extlist.contains(currentUser)) { int name_day = extlist[currentUser].daysToNameDay(); int birthday = extlist[currentUser].daysToBirthday(); if (name_day <= beforeRemind && name_day >= 0 && remindNameday) { UserBox::userboxmenu->addItem("knowNameDay", tr("I know about name day :)"), this, SLOT(knowNameDay())); menuNameDay = true; } if (birthday <= beforeRemind && birthday >= 0 && birthday) { UserBox::userboxmenu->addItem("knowBirthday", tr("I know about birthday :)"), this, SLOT(knowBirthday())); menuBirthday = true; } } } else { UserBox::userboxmenu->setItemEnabled(UserBox::userboxmenu->getItem(tr("Display extended information")), false); } kdebugf2(); }
void IRCChannelPage::kickSelectedUser() { kickUser(getSelectedUser()); }
void IRCChannelPage::toggleSelectedUserMode(IRCModeType mode) { toggleUserMode(getSelectedUser(), mode); }