Mercurial > octave-nkf
comparison gui/src/octave-gui.cc @ 14709:f50591409306 gui
Started to rename class names and methods from camel case to underscore-
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Thu, 31 May 2012 22:59:47 +0200 |
parents | 674740c44c09 |
children | 5cb54cca8a06 |
comparison
equal
deleted
inserted
replaced
14708:b44ae6c1484a | 14709:f50591409306 |
---|---|
26 main (int argc, char *argv[]) | 26 main (int argc, char *argv[]) |
27 { | 27 { |
28 QApplication application (argc, argv); | 28 QApplication application (argc, argv); |
29 while (true) | 29 while (true) |
30 { | 30 { |
31 if (ResourceManager::instance ()->isFirstRun ()) | 31 if (resource_manager::instance ()->isFirstRun ()) |
32 { | 32 { |
33 WelcomeWizard welcomeWizard; | 33 welcome_wizard welcomeWizard; |
34 int returnCode = welcomeWizard.exec (); | 34 int returnCode = welcomeWizard.exec (); |
35 | 35 |
36 QSettings *settings = ResourceManager::instance ()->settings (); | 36 QSettings *settings = resource_manager::instance ()->settings (); |
37 settings->setValue ("connectOnStartup", true); | 37 settings->setValue ("connectOnStartup", true); |
38 settings->setValue ("showMessageOfTheDay", true); | 38 settings->setValue ("showMessageOfTheDay", true); |
39 settings->setValue ("showTopic", true); | 39 settings->setValue ("showTopic", true); |
40 settings->setValue ("autoIdentification", false); | 40 settings->setValue ("autoIdentification", false); |
41 settings->setValue ("nickServPassword", ""); | 41 settings->setValue ("nickServPassword", ""); |
58 settings->setValue ("proxyHostName", "none"); | 58 settings->setValue ("proxyHostName", "none"); |
59 settings->setValue ("proxyPort", 8080); | 59 settings->setValue ("proxyPort", 8080); |
60 settings->setValue ("proxyUserName", ""); | 60 settings->setValue ("proxyUserName", ""); |
61 settings->setValue ("proxyPassword", ""); | 61 settings->setValue ("proxyPassword", ""); |
62 settings->sync (); | 62 settings->sync (); |
63 ResourceManager::instance ()->reloadSettings (); | 63 resource_manager::instance ()->reloadSettings (); |
64 | 64 |
65 application.quit (); | 65 application.quit (); |
66 // We are in an infinite loop, so everything else than a return | 66 // We are in an infinite loop, so everything else than a return |
67 // will cause the application to restart from the very beginning. | 67 // will cause the application to restart from the very beginning. |
68 if (returnCode == QDialog::Rejected) | 68 if (returnCode == QDialog::Rejected) |
69 return 0; | 69 return 0; |
70 } | 70 } |
71 else | 71 else |
72 { | 72 { |
73 QSettings *settings = ResourceManager::instance ()->settings (); | 73 QSettings *settings = resource_manager::instance ()->settings (); |
74 QString language = settings->value ("language").toString (); | 74 QString language = settings->value ("language").toString (); |
75 | 75 |
76 QString translatorFile = ResourceManager::instance ()->findTranslatorFile (language); | 76 QString translatorFile = resource_manager::instance ()->findTranslatorFile (language); |
77 QTranslator translator; | 77 QTranslator translator; |
78 translator.load (translatorFile); | 78 translator.load (translatorFile); |
79 application.installTranslator (&translator); | 79 application.installTranslator (&translator); |
80 | 80 |
81 ResourceManager::instance ()->updateNetworkSettings (); | 81 resource_manager::instance ()->updateNetworkSettings (); |
82 ResourceManager::instance ()->loadIcons (); | 82 resource_manager::instance ()->loadIcons (); |
83 | 83 |
84 MainWindow w; | 84 main_window w; |
85 w.show (); | 85 w.show (); |
86 //w.activateWindow(); | 86 //w.activateWindow(); |
87 return application.exec (); | 87 return application.exec (); |
88 } | 88 } |
89 } | 89 } |