BOOL TFileOpen::setupDialog() { SendDlgItemMessage(hWindow, id_FName, CB_LIMITTEXT, fsPathName, 0); strncpy(pathName, filePath, fsPathName); strncpy(extension, getExtension(pathName), fsExtension); if (hasWildCards(extension)) extension[0] = '\0'; if (!updateListBoxes()) { strcpy(pathName, "*.*"); updateListBoxes(); } selectFileName(); return TRUE; }
void YahooInviteListImpl::fillFriendList( const QStringList &buddies ) { kDebug(14180) << "Adding friends: " << buddies; m_buddyList = buddies; updateListBoxes(); }
void ToolsConfigWidget::readConfig() { readGroup("Tool Menu", &m_toolsmenuEntries); readGroup("File Context", &m_filecontextEntries); readGroup("Dir Context", &m_dircontextEntries); updateListBoxes(); }
int TFileOpen::canClose() { WORD pathLen; GetDlgItemText(hWindow, id_FName, fileSpec, fsPathName + 1); fnmerge(pathName,"","",fileSpec,""); pathLen = strlen(pathName); if (hasWildCards(pathName) || (GetFocus() == GetDlgItem( hWindow, id_DList) || ( pathLen && (pathName[pathLen - 1] == '\\') ) )) { if (pathName[pathLen - 1] == '\\') strncat(pathName, fileSpec, fsPathName); if (!updateListBoxes()) { MessageBeep(0); selectFileName(); } return 0; } strncat(strncat(pathName, "\\", fsPathName), fileSpec, fsPathName); if (updateListBoxes()) return 0; pathName[pathLen] = '\0'; if (getExtension(pathName)[0] == '\0') strncat(pathName, extension, fsPathName); AnsiLower((LPSTR) strcpy(filePath, pathName)); updateButtons(); if (IsDlgButtonChecked(hWindow, id_Text) == 1) *fileType = FileWindow; else if (IsDlgButtonChecked(hWindow, id_Scribble) == 1) *fileType = ScribbleWindow; else if (IsDlgButtonChecked(hWindow, id_Graph) == 1) *fileType = GraphWindow; else return 0; return 1; }
void DialogResample::show(bool b/* = true*/) { if (b) { currentSelectedListBox = 0; updateListBoxes(); listBoxEnterEditState(MESSAGEBOX_LISTBOX_VALUE_ONE); PPButton* button = static_cast<PPButton*>(messageBoxContainerGeneric->getControlByID(MESSAGEBOX_CONTROL_USER1)); button->setText(resamplerHelper->getResamplerName(interpolationType, true)); } PPDialogBase::show(b); }
void YahooInviteListImpl::removeInvitees( const QStringList &invitees ) { kDebug(14180) << "Removing invitees: " << invitees; for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); ++it ) { if( !m_buddyList.contains( *it ) ) m_buddyList.push_back( *it ); if( m_inviteeList.contains( *it ) ) m_inviteeList.removeAll( *it ); } updateListBoxes(); }
bool ToolsConfigWidget::addEntry(ToolsConfigEntry *entry, QDict<ToolsConfigEntry> *entryDict) { QString menutext = entry->menutext; if (entryDict->find(menutext)) { delete entry; KMessageBox::sorry(this, i18n("An entry with this title exists already.")); return false; } entryDict->insert(menutext, entry); updateListBoxes(); return true; }
pp_int32 DialogResample::handleEvent(PPObject* sender, PPEvent* event) { if (event->getID() == eKeyDown) { pp_uint16 keyCode = *((pp_uint16*)event->getDataPtr()); if (keyCode == VK_TAB) { switchListBox(); event->cancel(); } } else if (event->getID() == eCommand || event->getID() == eCommandRepeat) { switch (reinterpret_cast<PPControl*>(sender)->getID()) { case PP_MESSAGEBOX_BUTTON_YES: { commitChanges(); break; } case MESSAGEBOX_BUTTON_INCREASE_VALUEONE: { relnote++; toC4Speed(); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_BUTTON_DECREASE_VALUEONE: { relnote--; toC4Speed(); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_BUTTON_INCREASE_VALUETWO: { finetune++; toC4Speed(); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_BUTTON_DECREASE_VALUETWO: { finetune--; toC4Speed(); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_BUTTON_INCREASE_VALUETHREE: { c4spd++; fromC4Speed(); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_BUTTON_DECREASE_VALUETHREE: { c4spd--; fromC4Speed(); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_CONTROL_USER1: { if (event->getID() != eCommand) break; interpolationType = (interpolationType + 1) % resamplerHelper->getNumResamplers(); PPButton* button = static_cast<PPButton*>(messageBoxContainerGeneric->getControlByID(MESSAGEBOX_CONTROL_USER1)); button->setText(resamplerHelper->getResamplerName(interpolationType, true)); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_CONTROL_USER2: { if (event->getID() != eCommand) break; this->adjustFtAndRelnote = reinterpret_cast<PPCheckBox*>(sender)->isChecked(); break; } } } else if (event->getID() == eValueChanged) { switch (reinterpret_cast<PPControl*>(sender)->getID()) { case MESSAGEBOX_LISTBOX_VALUE_ONE: { const PPString* str = *(reinterpret_cast<PPString* const*>(event->getDataPtr())); setRelNote((pp_int32)atoi(*str)); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_LISTBOX_VALUE_TWO: { const PPString* str = *(reinterpret_cast<PPString* const*>(event->getDataPtr())); setFineTune((pp_int32)atoi(*str)); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } case MESSAGEBOX_LISTBOX_VALUE_THREE: { const PPString* str = *(reinterpret_cast<PPString* const*>(event->getDataPtr())); setC4Speed((float)atof(*str)); calcSize(); updateListBoxes(); parentScreen->paintControl(messageBoxContainerGeneric); break; } } } return PPDialogBase::handleEvent(sender, event); }
int TFileOpen::doCommands(int Command, HWND hWndSource, UINT Notification) { switch(Command) { case id_FName: if (Notification == EN_CHANGE) EnableWindow(GetDlgItem(hWindow, IDOK), (WORD) SendMessage(hWndSource, WM_GETTEXTLENGTH, 0, 0)); return TRUE; case id_FList: switch(Notification) { case LBN_DBLCLK: PostMessage(hWindow, WM_COMMAND, IDOK, 0); return TRUE; case LBN_SELCHANGE: DlgDirSelect(hWindow, pathName, id_FList); updateFileName(); return TRUE; case LBN_KILLFOCUS: SendMessage(hWndSource, LB_SETCURSEL, -1, 0); return TRUE; } case id_DList: switch(Notification) { case LBN_DBLCLK: updateListBoxes(); return TRUE; case LBN_SELCHANGE: DlgDirSelect(hWindow, pathName, id_DList); strcat(pathName, fileSpec); updateFileName(); return TRUE; case LBN_KILLFOCUS: SendMessage(hWndSource, LB_SETCURSEL, -1, 0); return TRUE; } case id_Scribble: strcat(strcpy(pathName,getFileFirst(pathName)), ScribbleExtension); updateFileName(); return TRUE; case id_Graph: strcat(strcpy(pathName,getFileFirst(pathName)), GraphExtension); updateFileName(); return TRUE; case id_Text: if (strcmp(getExtension(pathName),".")) { strcat(strcpy(pathName,getFileFirst(pathName)), ".TXT"); updateFileName(); } return TRUE; default: return TDialog::doCommands(Command, hWndSource, Notification); } }
void ToolsConfigWidget::dircontextremoveClicked() { QString menutext = dircontextBox->currentText(); m_dircontextEntries.remove(menutext); updateListBoxes(); }
void ToolsConfigWidget::toolsmenuremoveClicked() { QString menutext = toolsmenuBox->currentText(); m_toolsmenuEntries.remove(menutext); updateListBoxes(); }