added a refresh game directory option to the file menu
This commit is contained in:
		| @@ -230,6 +230,8 @@ void GMainWindow::ConnectWidgetEvents() { | ||||
|     connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap())); | ||||
|     connect(ui.action_Select_Game_List_Root, SIGNAL(triggered()), this, | ||||
|             SLOT(OnMenuSelectGameListRoot())); | ||||
|     connect(ui.action_Refresh_Game_Directory, SIGNAL(triggered()), this, | ||||
|             SLOT(OnMenuRefreshGameDirectory())); | ||||
|     connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); | ||||
|     connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); | ||||
|     connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); | ||||
| @@ -493,6 +495,11 @@ void GMainWindow::OnMenuSelectGameListRoot() { | ||||
|         game_list->PopulateAsync(dir_path, UISettings::values.gamedir_deepscan); | ||||
|     } | ||||
| } | ||||
| void GMainWindow::OnMenuRefreshGameDirectory() { | ||||
|     if (!UISettings::values.gamedir.isEmpty()) { | ||||
|         game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); | ||||
|     } | ||||
| } | ||||
|  | ||||
| void GMainWindow::OnMenuRecentFile() { | ||||
|     QAction* action = qobject_cast<QAction*>(sender()); | ||||
|   | ||||
| @@ -123,6 +123,7 @@ private slots: | ||||
|     void OnMenuLoadSymbolMap(); | ||||
|     /// Called whenever a user selects the "File->Select Game List Root" menu item | ||||
|     void OnMenuSelectGameListRoot(); | ||||
|     void OnMenuRefreshGameDirectory(); | ||||
|     void OnMenuRecentFile(); | ||||
|     void OnSwapScreens(); | ||||
|     void OnConfigure(); | ||||
|   | ||||
| @@ -61,6 +61,7 @@ | ||||
|     <addaction name="action_Load_Symbol_Map"/> | ||||
|     <addaction name="separator"/> | ||||
|     <addaction name="action_Select_Game_List_Root"/> | ||||
|     <addaction name="action_Refresh_Game_Directory"/> | ||||
|     <addaction name="menu_recent_files"/> | ||||
|     <addaction name="separator"/> | ||||
|     <addaction name="action_Exit"/> | ||||
| @@ -167,6 +168,11 @@ | ||||
|     <string>Selects a folder to display in the game list</string> | ||||
|    </property> | ||||
|   </action> | ||||
|   <action name="action_Refresh_Game_Directory"> | ||||
|    <property name="text"> | ||||
|     <string>Refresh Game Directory</string> | ||||
|    </property> | ||||
|   </action> | ||||
|  </widget> | ||||
|  <resources/> | ||||
|  <connections> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 noah the goodra
					noah the goodra