cosmetics: save a few lines of code
authorvdrfan <vdrfan-nospam-@xbmc.org>
Sun, 25 Mar 2012 11:00:49 +0000 (13:00 +0200)
committervdrfan <vdrfan-nospam-@xbmc.org>
Sun, 25 Mar 2012 11:00:49 +0000 (13:00 +0200)
xbmc/settings/GUIWindowSettingsCategory.cpp

index c6492f2..fee009a 100644 (file)
@@ -1574,15 +1574,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(CBaseSettingControl *pSettingC
     /* okey we really don't need to restarat, only deinit samba, but that could be damn hard if something is playing*/
     //TODO - General way of handling setting changes that require restart
 
-    CGUIDialogOK *dlg = (CGUIDialogOK *)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
-    if (!dlg) return ;
-    dlg->SetHeading( g_localizeStrings.Get(14038) );
-    dlg->SetLine( 0, g_localizeStrings.Get(14039) );
-    dlg->SetLine( 1, g_localizeStrings.Get(14040));
-    dlg->SetLine( 2, "");
-    dlg->DoModal();
-
-    if (dlg->IsConfirmed())
+    if (CGUIDialogYesNo::ShowAndGetInput(14038, 14039, 14040, -1, -1))
     {
       g_settings.Save();
       g_application.getApplicationMessenger().RestartApp();