BOOL APIENTRY DllMain(HANDLE hModule, DWORD reasonForCall, LPVOID /*lpReserved*/) { g_hModule = hModule; switch (reasonForCall) { case DLL_PROCESS_ATTACH: { funcItem[CMD_COMPARE]._pFunc = compare; lstrcpy(funcItem[CMD_COMPARE]._itemName, TEXT("Compare")); funcItem[CMD_COMPARE]._pShKey = new ShortcutKey; funcItem[CMD_COMPARE]._pShKey->_isAlt = true; funcItem[CMD_COMPARE]._pShKey->_isCtrl = false; funcItem[CMD_COMPARE]._pShKey->_isShift = false; funcItem[CMD_COMPARE]._pShKey->_key = 'D'; funcItem[CMD_COMPARE]._init2Check = false; funcItem[CMD_CLEAR_RESULTS]._pFunc = reset; lstrcpy(funcItem[CMD_CLEAR_RESULTS]._itemName, TEXT("Clear Results")); funcItem[CMD_CLEAR_RESULTS]._pShKey = new ShortcutKey; funcItem[CMD_CLEAR_RESULTS]._pShKey->_isAlt = true; funcItem[CMD_CLEAR_RESULTS]._pShKey->_isCtrl = true; funcItem[CMD_CLEAR_RESULTS]._pShKey->_isShift = false; funcItem[CMD_CLEAR_RESULTS]._pShKey->_key = 'D'; funcItem[CMD_CLEAR_RESULTS]._init2Check = false; funcItem[CMD_SEPARATOR_1]._pFunc = NULL; lstrcpy(funcItem[CMD_SEPARATOR_1]._itemName, TEXT("-----------")); funcItem[CMD_SEPARATOR_1]._pShKey = NULL; funcItem[CMD_COMPARE_LAST_SAVE]._pFunc = compareLocal; lstrcpy(funcItem[CMD_COMPARE_LAST_SAVE]._itemName, TEXT("Compare to last save")); funcItem[CMD_COMPARE_LAST_SAVE]._pShKey = new ShortcutKey; funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isAlt = true; funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isCtrl = false; funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isShift = false; funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_key = 'S'; funcItem[CMD_COMPARE_LAST_SAVE]._init2Check = false; funcItem[CMD_COMAPRE_SVN_BASE]._pFunc = compareBase; lstrcpy(funcItem[CMD_COMAPRE_SVN_BASE]._itemName, TEXT("Compare against SVN base")); funcItem[CMD_COMAPRE_SVN_BASE]._pShKey = new ShortcutKey; funcItem[CMD_COMAPRE_SVN_BASE]._pShKey->_isAlt = true; funcItem[CMD_COMAPRE_SVN_BASE]._pShKey->_isCtrl = false; funcItem[CMD_COMAPRE_SVN_BASE]._pShKey->_isShift = false; funcItem[CMD_COMAPRE_SVN_BASE]._pShKey->_key = 'B'; funcItem[CMD_COMAPRE_SVN_BASE]._init2Check = false; funcItem[CMD_SEPARATOR_2]._pFunc = NULL; lstrcpy(funcItem[CMD_SEPARATOR_2]._itemName, TEXT("------------")); funcItem[CMD_SEPARATOR_2]._pShKey = NULL; funcItem[CMD_ALIGN_MATCHES]._pFunc = alignMatches; lstrcpy(funcItem[CMD_ALIGN_MATCHES]._itemName, TEXT("Align Matches")); funcItem[CMD_ALIGN_MATCHES]._pShKey = NULL; funcItem[CMD_ALIGN_MATCHES]._init2Check = false; funcItem[CMD_IGNORE_SPACING]._pFunc = includeSpacing; lstrcpy(funcItem[CMD_IGNORE_SPACING]._itemName, TEXT("Ignore Spacing")); funcItem[CMD_IGNORE_SPACING]._pShKey = NULL; funcItem[CMD_IGNORE_SPACING]._init2Check = false; funcItem[CMD_DETECT_MOVES]._pFunc = detectMoves; lstrcpy(funcItem[CMD_DETECT_MOVES]._itemName, TEXT("Detect Moves")); funcItem[CMD_DETECT_MOVES]._pShKey = NULL; funcItem[CMD_DETECT_MOVES]._init2Check = false; funcItem[CMD_USE_NAV_BAR]._pFunc = ViewNavigationBar; lstrcpy(funcItem[CMD_USE_NAV_BAR]._itemName, TEXT("Navigation bar")); funcItem[CMD_USE_NAV_BAR]._pShKey = NULL; funcItem[CMD_USE_NAV_BAR]._init2Check = false; funcItem[CMD_SEPARATOR_3]._pFunc = NULL; lstrcpy(funcItem[CMD_SEPARATOR_3]._itemName, TEXT("-----------")); funcItem[CMD_SEPARATOR_3]._pShKey = NULL; funcItem[CMD_PREV]._pFunc = Prev; lstrcpy(funcItem[CMD_PREV]._itemName, TEXT("Previous")); funcItem[CMD_PREV]._pShKey = new ShortcutKey; funcItem[CMD_PREV]._pShKey->_isAlt = false; funcItem[CMD_PREV]._pShKey->_isCtrl = true; funcItem[CMD_PREV]._pShKey->_isShift = false; funcItem[CMD_PREV]._pShKey->_key = VK_PRIOR; funcItem[CMD_PREV]._init2Check = false; funcItem[CMD_NEXT]._pFunc = Next; lstrcpy(funcItem[CMD_NEXT]._itemName, TEXT("Next")); funcItem[CMD_NEXT]._pShKey = new ShortcutKey; funcItem[CMD_NEXT]._pShKey->_isAlt = false; funcItem[CMD_NEXT]._pShKey->_isCtrl = true; funcItem[CMD_NEXT]._pShKey->_isShift = false; funcItem[CMD_NEXT]._pShKey->_key = VK_NEXT; funcItem[CMD_NEXT]._init2Check = false; funcItem[CMD_FIRST]._pFunc = First; lstrcpy(funcItem[CMD_FIRST]._itemName, TEXT("First")); funcItem[CMD_FIRST]._pShKey = new ShortcutKey; funcItem[CMD_FIRST]._pShKey->_isAlt = false; funcItem[CMD_FIRST]._pShKey->_isCtrl = true; funcItem[CMD_FIRST]._pShKey->_isShift = true; funcItem[CMD_FIRST]._pShKey->_key = VK_PRIOR; funcItem[CMD_FIRST]._init2Check = false; funcItem[CMD_LAST]._pFunc = Last; lstrcpy(funcItem[CMD_LAST]._itemName, TEXT("Last")); funcItem[CMD_LAST]._pShKey = new ShortcutKey; funcItem[CMD_LAST]._pShKey->_isAlt = false; funcItem[CMD_LAST]._pShKey->_isCtrl = true; funcItem[CMD_LAST]._pShKey->_isShift = true; funcItem[CMD_LAST]._pShKey->_key = VK_NEXT; funcItem[CMD_LAST]._init2Check = false; funcItem[CMD_SEPARATOR_4]._pFunc = NULL; lstrcpy(funcItem[CMD_SEPARATOR_4]._itemName, TEXT("-----------")); funcItem[CMD_SEPARATOR_4]._pShKey = NULL; funcItem[CMD_OPTION]._pFunc = openOptionDlg; lstrcpy(funcItem[CMD_OPTION]._itemName, TEXT("Option")); funcItem[CMD_OPTION]._pShKey = NULL; funcItem[CMD_OPTION]._init2Check = false; funcItem[CMD_ABOUT]._pFunc = openAboutDlg; lstrcpy(funcItem[CMD_ABOUT]._itemName, TEXT("About")); funcItem[CMD_ABOUT]._pShKey = NULL; funcItem[CMD_ABOUT]._init2Check = false; for(int i = 0; i < MAXCOMPARE; i++) { compareDocs[i]=-1; } TCHAR nppPath[MAX_PATH]; GetModuleFileName((HMODULE)hModule, nppPath, sizeof(nppPath)); // remove the module name : get plugins directory path PathRemoveFileSpec(nppPath); // cd .. : get npp executable path PathRemoveFileSpec(nppPath); // Make localConf.xml path TCHAR localConfPath[MAX_PATH]; lstrcpy(localConfPath, nppPath); PathAppend(localConfPath, localConfFile); // Test if localConf.xml exist bool isLocal = (PathFileExists(localConfPath) == TRUE); if (isLocal) { lstrcpy(iniFilePath, nppPath); lstrcpy(compareFilePath, nppPath); PathAppend(iniFilePath, TEXT("plugins\\config\\Compare.ini")); } else { ITEMIDLIST *pidl; SHGetSpecialFolderLocation(NULL, CSIDL_APPDATA, &pidl); SHGetPathFromIDList(pidl, iniFilePath); SHGetPathFromIDList(pidl, compareFilePath); PathAppend(iniFilePath, TEXT("Notepad++\\Compare.ini")); } loadSettings(); } break; case DLL_PROCESS_DETACH: if (tbNext.hToolbarBmp) ::DeleteObject(tbNext.hToolbarBmp); if (tbPrev.hToolbarBmp) ::DeleteObject(tbPrev.hToolbarBmp); if (tbFirst.hToolbarBmp) ::DeleteObject(tbFirst.hToolbarBmp); if (tbLast.hToolbarBmp) ::DeleteObject(tbLast.hToolbarBmp); saveSettings(); OptionDlg.destroy(); AboutDlg.destroy(); NavDlg.destroy(); // Don't forget to deallocate your shortcut here delete funcItem[CMD_COMPARE]._pShKey; delete funcItem[CMD_CLEAR_RESULTS]._pShKey; delete funcItem[CMD_COMPARE_LAST_SAVE]._pShKey; delete funcItem[CMD_COMAPRE_SVN_BASE]._pShKey; delete funcItem[CMD_PREV]._pShKey; delete funcItem[CMD_NEXT]._pShKey; delete funcItem[CMD_FIRST]._pShKey; delete funcItem[CMD_LAST]._pShKey; break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; } return TRUE; }
void MainWindow::on_actionAbout_triggered() { AboutDialog dialog ( this ); dialog.exec(); }
void MainWindow::on_actionABout_triggered() { AboutDialog *about = new AboutDialog(); about->show(); }
void InformApp::OnAppAbout() { AboutDialog about; about.DoModal(); }
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { AboutDialog dlg; dlg.ShowModal(); }
void MainWindow::showAboutDlg() { AboutDialog* aboutDlg = new AboutDialog(this); aboutDlg->exec(); }
void CryptographicanomalyGUI::aboutClicked() { AboutDialog dlg; dlg.setModel(clientModel); dlg.exec(); }
void MainWindow::on_actionAbout_triggered() { AboutDialog *dialog = new AboutDialog(this); dialog->show(); }
void BaseWindow::showAbout() { AboutDialog *ad = new AboutDialog(this); ad->setModal(true); ad->show(); }
void NewWorld::on_button_dialog_clicked() { AboutDialog *dg = new AboutDialog(); dg->exec(); delete dg; }
void MainWindow::onAboutPressed() { AboutDialog* about = new AboutDialog(this); about->exec(); }
void WelcomeBox::showAbout() { AboutDialog *dialog = new AboutDialog(m_parentWidget); dialog->show(); }
void MainWindow::showAboutDialog() { AboutDialog *aboutDialog = new AboutDialog(); aboutDialog->exec(); delete aboutDialog; }
void DesktopMainWindow::showAbout() { AboutDialog ad; ad.exec(); }
void AboutDialogExtension::showAboutDialog() { AboutDialog dialog; dialog.exec(); }
void gamertipGUI::aboutClicked() { AboutDialog dlg; dlg.setModel(clientModel); dlg.exec(); }
void MainWindow::ShowAboutDialog() { AboutDialog* about = new AboutDialog(this); about->show(); }
void MainWindow::on_actionAbout_triggered() { AboutDialog dlg; dlg.exec(); }
void SimMainWindow::showAbout() { AboutDialog dialog; dialog.exec(); }
void MainWindow::on_actHelp_triggered() { AboutDialog *dlg = new AboutDialog(this); dlg->exec(); }
void GameunitsGUI::aboutClicked() { AboutDialog dlg; dlg.setModel(clientModel); dlg.exec(); }
int konMain( int argc, char *argv[] ) { int filesArgStart = 1; //Where the files start on the command line char fullPath[MAXPATH+1]; // Store startup time time( &KonSystem::startupTime ); // See if an instance is running: If so, send files Window::popupWindow( ControllerWindow::getTitle() ); // This is only necessary on Win if( NamedMessagePipe::supportsPipes() ) { NamedMessagePipe *pipe = new NamedMessagePipe(); if( !pipe->connect( PIPENAME ) ) { if( argc == 1 ) pipe->sendMessage( "***" ); else { for( int i = 1; i < argc; i++ ) { if( strchr( argv[i], '*' ) != NULL || strchr( argv[i], '?' ) != NULL ) { Dir dir( argv[i], DirEntry::ARCHIVED, 0 ); for( int d = 0; d < dir.getEntries(); d++ ) { fixFilename( argv[i], dir.getEntryAt(d)->getName(), fullPath ); pipe->sendMessage( fullPath ); } } else { System::getFullPath( argv[i], fullPath, MAXPATH ); pipe->sendMessage( fullPath ); } } delete pipe; } Window::popupWindow( ControllerWindow::getTitle() ); // This is only necessary on Win return 0; } delete pipe; } else { Window *wnd = new Window( Desktop::getInstance(), 0, 0, 10, 10 ); BOOL res = TRUE; if( argc == 1 ) res = wnd->sendDataToWindow( ControllerWindow::getTitle(), "***" ); else for( int i = 1; i < argc; i++ ) { if( strchr( argv[i], '*' ) != NULL || strchr( argv[i], '?' ) != NULL ) { Dir dir( argv[i], DirEntry::ARCHIVED, 0 ); for( int d = 0; d < dir.getEntries(); d++ ) { fixFilename( argv[i], dir.getEntryAt(d)->getName(), fullPath ); res = wnd->sendDataToWindow( ControllerWindow::getTitle(), fullPath ); if( !res ) break; } } else { System::getFullPath( argv[i], fullPath, MAXPATH ); res = wnd->sendDataToWindow( ControllerWindow::getTitle(), fullPath ); } if( !res ) break; } if( res ) return 0; // Exit, everything worked OK delete wnd; // Didn't find a previous instance, continue } // Set up Kon base directory KonSystem::baseDir = argv[0]; char *slashPos = strrchr( argv[0], '\\' ); if( slashPos != NULL ) *(slashPos+1) = 0; KonSystem::bmpDir = new char[strlen( argv[0] ) + 10]; sprintf( KonSystem::bmpDir, "%s\\bmp\\", argv[0] ); KonSystem::kDir = new char[strlen( argv[0] ) + 10]; sprintf( KonSystem::kDir, "%s\\k\\", argv[0] ); char filename[MAXPATH+1]; sprintf( filename, "%s%s", KonSystem::baseDir, "english.prp" ); if( Strings::loadStrings( filename ) ) { PopupMessage *message = new PopupMessage( Desktop::getInstance(), "Startup error", "Couldn't load english.prp", PopupMessage::error ); message->getResult(); return 1; } Settings::initSettings(); sprintf( filename, "%s%s", System::getSettingsDir(), WINPRPFILENAME ); WinProperties::loadProperties( filename ); sprintf( filename, "%s%s", System::getSettingsDir(), KONPRPFILENAME ); ClassProperties::restoreProperties( filename ); sprintf( filename, "%s%s", KonSystem::baseDir, "kon.syn" ); SyntaxContainer::loadSyntaxes( filename ); KeyBindings::createInstance(); // Create common commands instance KCommonCommands::createInstance(); // Create the errorCollector instance KErrorCollector::createInstance( Strings::get(54) ); // Execute the startup script if( Settings::errorCollectorVisible ) KErrorCollector::getInstance()->show(); Kstartup *kStartup = new Kstartup(); delete kStartup; ControllerWindow::createInstance(); MainWindow *mainWin = new MainWindow( Desktop::getInstance(), "Kon", 10, 10, 600, 450 ); mainWin->setVisible( TRUE ); // Load files on commandline if( argc > 1 ) { for( int i = 1; i < argc; i++ ) { if( strchr( argv[i], '*' ) != NULL || strchr( argv[i], '?' ) != NULL ) { Dir dir( argv[i], DirEntry::ARCHIVED, 0 ); for( int d = 0; d < dir.getEntries(); d++ ) { fixFilename( argv[i], dir.getEntryAt(d)->getName(), fullPath ); ControllerWindow::getInstance()->loadFile( mainWin, fullPath, TRUE, TRUE, Settings::reuseExistingBuffer ); // mainWin->addFile( fullPath, TRUE, TRUE ); } } else ControllerWindow::getInstance()->loadFile( mainWin, argv[i], TRUE, TRUE, Settings::reuseExistingBuffer ); // mainWin->addFile( argv[i], TRUE, TRUE ); } } else { char filename[MAXPATH]; BufferAdmin::getNextScratchName( filename ); ControllerWindow::getInstance()->loadFile( mainWin, filename, TRUE, TRUE, Settings::reuseExistingBuffer ); // mainWin->addFile( filename, TRUE, TRUE ); } if( NamedMessagePipe::supportsPipes() ) { // Start pipe server PipeServer *pipeServer = new PipeServer(); pipeServer->start( 4096 ); } AutosaveThread::createInstance(); // Check license KonSystem::registered = FALSE; char regFile[MAXPATH]; sprintf( regFile, "%s%s", KonSystem::baseDir, "kon.reg" ); FILE *f = fopen( regFile, "rb"); if( f != NULL ) { fread( KonSystem::regName, sizeof(KonSystem::regName), 1, f ); fread( KonSystem::regKey, sizeof(KonSystem::regKey), 1, f ); int i; for( i = 0; i < strlen(KonSystem::regName); i++ ) KonSystem::regName[i] ^= 0xef; for( i = 0; i < strlen(KonSystem::regKey); i++ ) KonSystem::regKey[i] ^= 0xef; // Check if license key is correct char result[MAXREGCODELEN*2]; result[0] = 0; int ok = scramble( KonSystem::regName, result ); if( !ok || strcmp( KonSystem::regKey, result ) ) { // Failed registration PopupMessage *message = new PopupMessage( mainWin, Strings::get(221), Strings::get(222), PopupMessage::error ); message->getResult(); } else KonSystem::registered = TRUE; fclose( f ); } if( !KonSystem::registered ) { AboutDialog *aboutDialog = new AboutDialog( mainWin ); aboutDialog->setVisible( TRUE ); delete aboutDialog; } Application::run(); KErrorCollector::killInstance(); sprintf( filename, "%s%s", System::getSettingsDir(), WINPRPFILENAME ); WinProperties::saveProperties( filename ); sprintf( filename, "%s%s", System::getSettingsDir(), KONPRPFILENAME ); ClassProperties::saveProperties( filename ); KModules::saveModulesList(); if( !KonSystem::registered ) { AboutDialog *aboutDialog = new AboutDialog( Desktop::getInstance() ); aboutDialog->setVisible( TRUE ); delete aboutDialog; } return 0; }
void ShadowGUI::aboutClicked() { AboutDialog dlg; dlg.setModel(clientModel); dlg.exec(); }
void doAbout() { aboutDlg.doDialog(); }
void MainWindow::alAcercade() { AboutDialog acercaDe; acercaDe.exec(); }
/*! \internal \brief Shows the about dialog. */ void Ui::MainWindow::showAboutDialog() { AboutDialog *ad = new AboutDialog(this); ad->exec(); }
void MainForm::action_help_about() { AboutDialog *dialog = new AboutDialog( NULL ); dialog->exec(); }
void Application::about() { AboutDialog dialog; dialog.exec(); }
void BitcoinGUI::aboutClicked() { AboutDialog dlg; dlg.setModel(clientModel); dlg.exec(); }
void openAboutDlg(void) { AboutDlg.doDialog(); }