diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/main.cpp | 11 | ||||
| -rw-r--r-- | src/citra_qt/main.h | 2 | ||||
| -rw-r--r-- | src/citra_qt/main.ui | 11 |
3 files changed, 23 insertions, 1 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index ff2d60996..c5e338c91 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -167,6 +167,7 @@ GMainWindow::GMainWindow() : emu_thread(nullptr) | |||
| 167 | connect(game_list, SIGNAL(GameChosen(QString)), this, SLOT(OnGameListLoadFile(QString))); | 167 | connect(game_list, SIGNAL(GameChosen(QString)), this, SLOT(OnGameListLoadFile(QString))); |
| 168 | connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile())); | 168 | connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile())); |
| 169 | connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap())); | 169 | connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap())); |
| 170 | connect(ui.action_Select_Game_List_Root, SIGNAL(triggered()), this, SLOT(OnMenuSelectGameListRoot())); | ||
| 170 | connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); | 171 | connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); |
| 171 | connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); | 172 | connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); |
| 172 | connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); | 173 | connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); |
| @@ -380,6 +381,16 @@ void GMainWindow::OnMenuLoadSymbolMap() { | |||
| 380 | } | 381 | } |
| 381 | } | 382 | } |
| 382 | 383 | ||
| 384 | void GMainWindow::OnMenuSelectGameListRoot() { | ||
| 385 | QSettings settings; | ||
| 386 | |||
| 387 | QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory")); | ||
| 388 | if (!dir_path.isEmpty()) { | ||
| 389 | settings.setValue("gameListRootDir", dir_path); | ||
| 390 | game_list->PopulateAsync(dir_path, settings.value("gameListDeepScan").toBool()); | ||
| 391 | } | ||
| 392 | } | ||
| 393 | |||
| 383 | void GMainWindow::OnMenuRecentFile() { | 394 | void GMainWindow::OnMenuRecentFile() { |
| 384 | QAction* action = qobject_cast<QAction*>(sender()); | 395 | QAction* action = qobject_cast<QAction*>(sender()); |
| 385 | assert(action); | 396 | assert(action); |
diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 48a1032bd..6d27ce6a9 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h | |||
| @@ -92,6 +92,8 @@ private slots: | |||
| 92 | void OnGameListLoadFile(QString game_path); | 92 | void OnGameListLoadFile(QString game_path); |
| 93 | void OnMenuLoadFile(); | 93 | void OnMenuLoadFile(); |
| 94 | void OnMenuLoadSymbolMap(); | 94 | void OnMenuLoadSymbolMap(); |
| 95 | /// Called whenever a user selects the "File->Select Game List Root" menu item | ||
| 96 | void OnMenuSelectGameListRoot(); | ||
| 95 | void OnMenuRecentFile(); | 97 | void OnMenuRecentFile(); |
| 96 | void OnOpenHotkeysDialog(); | 98 | void OnOpenHotkeysDialog(); |
| 97 | void OnConfigure(); | 99 | void OnConfigure(); |
diff --git a/src/citra_qt/main.ui b/src/citra_qt/main.ui index 1ba700a3a..997597642 100644 --- a/src/citra_qt/main.ui +++ b/src/citra_qt/main.ui | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | <x>0</x> | 45 | <x>0</x> |
| 46 | <y>0</y> | 46 | <y>0</y> |
| 47 | <width>1081</width> | 47 | <width>1081</width> |
| 48 | <height>21</height> | 48 | <height>22</height> |
| 49 | </rect> | 49 | </rect> |
| 50 | </property> | 50 | </property> |
| 51 | <widget class="QMenu" name="menu_File"> | 51 | <widget class="QMenu" name="menu_File"> |
| @@ -60,6 +60,7 @@ | |||
| 60 | <addaction name="action_Load_File"/> | 60 | <addaction name="action_Load_File"/> |
| 61 | <addaction name="action_Load_Symbol_Map"/> | 61 | <addaction name="action_Load_Symbol_Map"/> |
| 62 | <addaction name="separator"/> | 62 | <addaction name="separator"/> |
| 63 | <addaction name="action_Select_Game_List_Root"/> | ||
| 63 | <addaction name="menu_recent_files"/> | 64 | <addaction name="menu_recent_files"/> |
| 64 | <addaction name="separator"/> | 65 | <addaction name="separator"/> |
| 65 | <addaction name="action_Exit"/> | 66 | <addaction name="action_Exit"/> |
| @@ -182,6 +183,14 @@ | |||
| 182 | <string>Display Dock Widget Headers</string> | 183 | <string>Display Dock Widget Headers</string> |
| 183 | </property> | 184 | </property> |
| 184 | </action> | 185 | </action> |
| 186 | <action name="action_Select_Game_List_Root"> | ||
| 187 | <property name="text"> | ||
| 188 | <string>Select Game Directory...</string> | ||
| 189 | </property> | ||
| 190 | <property name="toolTip"> | ||
| 191 | <string>Selects a folder to display in the game list</string> | ||
| 192 | </property> | ||
| 193 | </action> | ||
| 185 | </widget> | 194 | </widget> |
| 186 | <resources/> | 195 | <resources/> |
| 187 | <connections> | 196 | <connections> |