void CWinampSettingsDlg::OnOK() { UpdateData(TRUE); m_nThreadPriority = GetThreadPriorityFromSlider(); SaveSettings(); CDialog::OnOK(); }
ThemeManager::~ThemeManager() { FENTRY; SaveSettings(); if (CountThemes()) UnloadThemes(); if (CountAddons()) UnloadAddons(); }
void GeneralWidget::ConnectWidgets() { // Video Backend connect(m_backend_combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [this](int) { SaveSettings(); }); // Enable Fullscreen for (QCheckBox* checkbox : {m_enable_fullscreen, m_hide_cursor, m_render_main_window}) connect(checkbox, &QCheckBox::toggled, this, &GeneralWidget::SaveSettings); }
PlaylistView::PlaylistView(QWidget *parent) : QTreeView(parent), style_(new PlaylistProxyStyle(style())), playlist_(NULL), header_(new PlaylistHeader(Qt::Horizontal, this)), setting_initial_header_layout_(false), upgrading_from_qheaderview_(false), read_only_settings_(true), glow_enabled_(true), currently_glowing_(false), glow_intensity_step_(0), rating_delegate_(NULL), inhibit_autoscroll_timer_(new QTimer(this)), inhibit_autoscroll_(false), currently_autoscrolling_(false), row_height_(-1), currenttrack_play_(":currenttrack_play.png"), currenttrack_pause_(":currenttrack_pause.png"), cached_current_row_row_(-1), drop_indicator_row_(-1), drag_over_(false), dynamic_controls_(new DynamicPlaylistControls(this)) { setHeader(header_); header_->setMovable(true); setStyle(style_); setMouseTracking(true); connect(header_, SIGNAL(sectionResized(int,int,int)), SLOT(SaveGeometry())); connect(header_, SIGNAL(sectionMoved(int,int,int)), SLOT(SaveGeometry())); connect(header_, SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), SLOT(SaveGeometry())); connect(header_, SIGNAL(SectionVisibilityChanged(int,bool)), SLOT(SaveGeometry())); connect(header_, SIGNAL(sectionResized(int,int,int)), SLOT(InvalidateCachedCurrentPixmap())); connect(header_, SIGNAL(sectionMoved(int,int,int)), SLOT(InvalidateCachedCurrentPixmap())); connect(header_, SIGNAL(SectionVisibilityChanged(int,bool)), SLOT(InvalidateCachedCurrentPixmap())); connect(header_, SIGNAL(StretchEnabledChanged(bool)), SLOT(SaveSettings())); connect(header_, SIGNAL(ColumnAlignmentChanged()), SLOT(SaveSettings())); connect(header_, SIGNAL(StretchEnabledChanged(bool)), SLOT(StretchChanged(bool))); connect(header_, SIGNAL(MouseEntered()), SLOT(RatingHoverOut())); inhibit_autoscroll_timer_->setInterval(kAutoscrollGraceTimeout * 1000); inhibit_autoscroll_timer_->setSingleShot(true); connect(inhibit_autoscroll_timer_, SIGNAL(timeout()), SLOT(InhibitAutoscrollTimeout())); horizontalScrollBar()->installEventFilter(this); verticalScrollBar()->installEventFilter(this); setAlternatingRowColors(true); setAttribute(Qt::WA_MacShowFocusRect, false); dynamic_controls_->hide(); #ifdef Q_OS_DARWIN setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); #endif }
void SIM_PLOT_FRAME::onClose( wxCloseEvent& aEvent ) { SaveSettings( config() ); if( IsSimulationRunning() ) m_simulator->Stop(); Destroy(); }
static void SaveSettings(HANDLE hItem, HWND hwndList, CMsnProto* proto) { if (hItem == NULL) hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0); while (hItem) { if (IsHContactGroup(hItem)) { HANDLE hItemT = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem); if (hItemT) SaveSettings(hItemT, hwndList, proto); } else { char szEmail[MSN_MAX_EMAIL_LEN]; if (IsHContactContact(hItem)) { if (proto->getStaticString(hItem, "e-mail", szEmail, sizeof(szEmail))) continue; } else if (IsHContactInfo(hItem)) { TCHAR buf[MSN_MAX_EMAIL_LEN]; SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf); WideCharToMultiByte(CP_ACP, 0, buf, -1, szEmail, sizeof(szEmail), 0, 0); } int dwMask = proto->Lists_GetMask(szEmail); SaveListItem(hItem, szEmail, LIST_LL, (dwMask & LIST_LL)?1:0, SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(0,0)), proto); SaveListItem(hItem, szEmail, LIST_FL, (dwMask & LIST_FL)?2:0, SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(1,0)), proto); SaveListItem(hItem, szEmail, LIST_AL, (dwMask & LIST_AL)?3:0, SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(2,0)), proto); SaveListItem(hItem, szEmail, LIST_BL, (dwMask & LIST_BL)?4:0, SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(3,0)), proto); int newMask = proto->Lists_GetMask(szEmail); int xorMask = newMask ^ dwMask; if (xorMask && newMask & (LIST_FL | LIST_LL)) { HANDLE hContact = IsHContactInfo(hItem) ? proto->MSN_HContactFromEmail(szEmail, szEmail, true, false) : hItem; proto->MSN_SetContactDb(hContact, szEmail); } if (xorMask & (LIST_FL | LIST_LL) && !(newMask & (LIST_FL | LIST_LL))) { if (!IsHContactInfo(hItem)) { CallService(MS_DB_CONTACT_DELETE, (WPARAM)hItem, 0); MsnContact* msc = proto->Lists_Get(szEmail); if (msc) msc->hContact = NULL; } } } hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem); } }
bool InspectorWindow::QuitRequested() { BMessage settings(MSG_INSPECTOR_WINDOW_CLOSED); SaveSettings(settings); BMessenger(fTarget).SendMessage(&settings); return true; }
void RadioCustomStreams::Add (const QUrl& url, const QString& name) { if (GetAllUrls ().contains (url)) return; CreateItem (url, name); SaveSettings (); }
void DoCleanup() { pKillVentHook(); SaveSettings(); RemoveTrayIcon(); DestroyMenu(hMenu); FreeLibrary(hinstDLL); CloseHandle(hThreadVent); }
void dc_term() { sh4_cpu.Term(); plugins_Term(); _vmem_release(); SaveSettings(); SaveRomFiles(GetPath("/data/")); }
void AddressesModelManager::addRequested (const QString&, const QVariantList& data) { const auto port = data.value (1).toInt (); if (port < 1024 || port > 65535) return; AppendRow ({ data.value (0).toString (), QString::number (port) }); SaveSettings (); }
void MainWindow::closeEvent(QCloseEvent* event) { if(m_page_record->ShouldBlockClose()) { event->ignore(); return; } SaveSettings(); event->accept(); QApplication::quit(); }
LRESULT Cwinproc::OnTaskbarNotify(WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(wParam); switch (lParam) { case WM_MOUSEMOVE: { CString s, sRecvBPS, sRecvAVE; FormatBytes(RecvStats[0].Bps, sRecvBPS, true); FormatBytes(RecvStats[0].ave, sRecvAVE, true); s.Format("Current: %s Average: %s", sRecvBPS, sRecvAVE); m_SystemTray.cbSize = sizeof(NOTIFYICONDATA); m_SystemTray.hWnd = GetSafeHwnd(); m_SystemTray.uID = 1; m_SystemTray.uFlags = NIF_TIP; strcpy_s(m_SystemTray.szTip, s); Shell_NotifyIcon(NIM_MODIFY, &m_SystemTray); } break; case WM_LBUTTONDBLCLK: ShowPropertiesDlg(); break; case WM_RBUTTONUP: { CMenu menu; POINT pt; GetCursorPos(&pt); menu.LoadMenu(IDR_MENU1); menu.SetDefaultItem(0, TRUE); CMenu &pMenu = *menu.GetSubMenu(0); pMenu.SetDefaultItem(0, TRUE); // See Q135788 "PRB: Menus for Notification Icons Do Not Work Correctly" SetForegroundWindow(); int cmd = pMenu.TrackPopupMenu(TPM_RETURNCMD | TPM_LEFTALIGN | TPM_NONOTIFY, pt.x, pt.y, this); PostMessage(WM_NULL, 0, 0); if (cmd == IDCLOSE) { // Save any settings if the user closes the tray icon while the dialog is open if (m_pPropertiesDlg != NULL) { SaveSettings(); m_pPropertiesDlg->SendMessage(WM_CLOSE); } theApp.m_wnd.PostMessage(WM_CLOSE); } else if (cmd == ID_PROPERTIES) ShowPropertiesDlg(); } break; } return 0; }
CFortEdit::~CFortEdit() { delete DUi; if (DScene) { delete DScene; } SaveSettings(); }
void RadioCustomStreams::Remove (const QModelIndex& index) { for (auto i = 0; i < Root_->rowCount (); ++i) if (Root_->child (i)->index () == index) { Root_->removeRow (i); SaveSettings (); break; } }
void MatryoshkaScene::showGameOver() { LastScore = game->score; Director::getInstance()->replaceScene(TransitionFade::create(1.0f, ExtraGameOverScene::createScene(Games::Matryoshka))); TotalScore += LastScore; HighScore = max(LastScore, HighScore); SaveSettings(); }
void AutoConfig::done(int result) { QWizard::done(result); if (result == QDialog::Accepted) { if (type == Type::Streaming) SaveStreamSettings(); SaveSettings(); } }
void EXPORT_CALL handle_DSP(u32 id,void* w,void* p) { if (settings.DSPEnabled) settings.DSPEnabled=0; else settings.DSPEnabled=1; eminf.SetMenuItemStyle(id,settings.DSPEnabled?MIS_Checked:0,MIS_Checked); SaveSettings(); }
//------------------------------------------------------------------------------------------------- void tNdp2kTableDataSources::OnMyTableChanged() { //TODO: most rows probably don't change, so may want to track which ones do and only process them { tQMutexLocker locker( &m_Lock ); SaveSettings(); } if (m_ShareChanges) SaveToGlobalSettings(); }
void EXPORT_CALL handle_GS(u32 id,void* w,void* p) { if (settings.GlobalMute) settings.GlobalMute=0; else settings.GlobalMute=1; eminf.SetMenuItemStyle(id,settings.GlobalMute?MIS_Checked:0,MIS_Checked); SaveSettings(); }
void CLogWindow::OnFontChange(wxCommandEvent& event) { // Update selected font LogFont[LogFont.size() - 1] = DebuggerFont; m_Log->SetStyle(0, m_Log->GetLastPosition(), wxTextAttr(wxNullColour, wxNullColour, LogFont[event.GetSelection()])); m_Log->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, LogFont[event.GetSelection()])); SaveSettings(); }
bool ConfigWindow::QuitRequested() { SaveSettings(); Accounts::Delete(); be_app->PostMessage(B_QUIT_REQUESTED); return true; }
QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::ControlGroup* group) { QGroupBox* group_box = new QGroupBox(name); QFormLayout* form_layout = new QFormLayout(); group_box->setLayout(form_layout); bool need_indicator = group->type == ControllerEmu::GroupType::Cursor || group->type == ControllerEmu::GroupType::Stick || group->type == ControllerEmu::GroupType::Tilt || group->type == ControllerEmu::GroupType::MixedTriggers; for (auto& control : group->controls) { auto* button = new MappingButton(this, control->control_ref.get(), !need_indicator); button->setMinimumWidth(100); button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); form_layout->addRow(QString::fromStdString(control->name), button); auto* control_ref = control->control_ref.get(); connect(button, &MappingButton::AdvancedPressed, [this, button, control_ref] { if (m_parent->GetDevice() == nullptr) return; IOWindow io(this, m_parent->GetController(), control_ref, control_ref->IsInput() ? IOWindow::Type::Input : IOWindow::Type::Output); io.exec(); SaveSettings(); button->Update(); }); m_buttons.push_back(button); } for (auto& numeric : group->numeric_settings) { auto* spinbox = new MappingNumeric(this, numeric.get()); form_layout->addRow(QString::fromStdString(numeric->m_name), spinbox); m_numerics.push_back(spinbox); } for (auto& boolean : group->boolean_settings) { auto* checkbox = new MappingBool(this, boolean.get()); form_layout->addRow(checkbox); m_bools.push_back(checkbox); } if (need_indicator) form_layout->addRow(new MappingIndicator(group)); return group_box; }
void WINAPI showCfgDlg() { lpWndProcOld = (void *) SetWindowLong(hMainWindow,DWL_DLGPROC,(long)ParentWndProc); // Tell NSIS to remove old inner dialog and pass handle of the new inner dialog mySendMessage(hMainWindow, WM_NOTIFY_CUSTOM_READY, (WPARAM)hConfigWindow, 0); ShowWindow(hConfigWindow, SW_SHOWNA); g_done = g_NotifyField = 0; while (!g_done) { MSG msg; GetMessage(&msg, NULL, 0, 0); if (!IsDialogMessage(hConfigWindow,&msg) && !IsDialogMessage(hMainWindow,&msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } // we don't save settings on cancel since that means your installer will likely // quit soon, which means the ini might get flushed late and cause crap. :) anwyay. if (!g_is_cancel) SaveSettings(); SetWindowLong(hMainWindow,DWL_DLGPROC,(long)lpWndProcOld); DestroyWindow(hConfigWindow); // by ORTIM: 13-August-2002 if (bCancelShow!=-1) ShowWindow(hCancelButton,old_cancel_visible?SW_SHOWNA:SW_HIDE); FREE(pFilenameStackEntry); FREE(pszTitle); FREE(pszCancelButtonText); FREE(pszNextButtonText); FREE(pszBackButtonText); int i = nNumFields; while (i--) { FieldType *pField = pFields + i; int j = FIELD_BUFFERS; while (j--) FREE(((char **) pField)[j]); if (pField->nType == FIELD_BITMAP) { DeleteObject(pField->hImage); } if (pField->nType == FIELD_ICON) { DestroyIcon((HICON)pField->hImage); } } FREE(pFields); pushstring(g_is_cancel?"cancel":g_is_back?"back":"success"); }
BOOL CT42App::InitInstance() { if (!AfxSocketInit()) { AfxMessageBox(IDP_SOCKETS_INIT_FAILED); return FALSE; } // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif SetRegistryKey(IDS_REGISTRYKEY); m_HelpFile = m_pszHelpFilePath; m_HelpFile+=">Standard"; m_pszHelpFilePath=(LPCTSTR)m_HelpFile; m_pTemplate = new CMultiDocTemplate(IDR_T42FRAME, RUNTIME_CLASS(T42Document), RUNTIME_CLASS(T42Frame), RUNTIME_CLASS(T42View) ); AddDocTemplate(m_pTemplate); Initialize(); LoadSettings(); if(!OpenT42CallsLog()){ AfxMessageBox(IDS_CALLOG_OPEN_FAILED,MB_OK|MB_ICONSTOP); return FALSE; } CT42Dlg dlg; m_pMainWnd = &dlg; m_pT42Dlg = &dlg; dlg.DoModal(); m_pT42Dlg = NULL; SaveSettings(); if(!CloseT42CallsLog()) AfxMessageBox(IDS_CALLOG_CLOSE_FAILED,MB_OK|MB_ICONSTOP); // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
// 終了処理 bool CEqualizer::Finalize() { // ウィンドウの破棄 if (m_hwnd!=NULL) ::DestroyWindow(m_hwnd); if (m_fExecuted) SaveSettings(); return true; }
void CASettingsStorage::SetCFTypeValue(CFStringRef inKey, CFTypeRef inValue) { // make sure our cache is up to date RefreshSettings(); // add the new key/value to the dictionary CFDictionarySetValue(mSettingsCache, inKey, inValue); // write the settings to the file SaveSettings(); }
void CASettingsStorage::RemoveValue(CFStringRef inKey) { // make sure our cache is up to date RefreshSettings(); // remove the given key CFDictionaryRemoveValue(mSettingsCache, inKey); // write the settings to the file SaveSettings(); }
void CASettingsStorage::RemoveAllValues() { // make sure our cache is up to date RefreshSettings(); // remove the given key CFDictionaryRemoveAllValues(mSettingsCache); // write the settings to the file SaveSettings(); }
void EXPORT_CALL handle_SA2(u32 id,void* w,void* p) { if (settings.LimitFPS==2) settings.LimitFPS=0; else settings.LimitFPS=2; eminf.SetMenuItemStyle(config_stami,settings.LimitFPS==1?MIS_Checked:0,MIS_Checked); eminf.SetMenuItemStyle(config_stami2,settings.LimitFPS==2?MIS_Checked:0,MIS_Checked); SaveSettings(); }