strLabel.Format("%i %s",iLeft,strLabel1.c_str());
// PopUp OK and Display: MasterLock mode has changed but no no Mastercode has been set!
- CGUIDialogOK *dlg = (CGUIDialogOK *)g_windowManager.GetWindow(WINDOW_DIALOG_OK);
- if (!dlg)
- return false;
-
- dlg->SetHeading( g_localizeStrings.Get(20076) );
- dlg->SetLine( 0, g_localizeStrings.Get(12367) );
- dlg->SetLine( 1, g_localizeStrings.Get(12368) );
- dlg->SetLine( 2, strLabel);
- dlg->DoModal();
+ CGUIDialogOK::ShowAndGetInput(20076, 12367, 12368, strLabel);
}
else
i=g_passwordManager.iMasterLockRetriesLeft;
CStdString dlgLine1 = "";
if (0 < g_passwordManager.iMasterLockRetriesLeft)
dlgLine1.Format("%d %s", g_passwordManager.iMasterLockRetriesLeft, g_localizeStrings.Get(12343));
- CGUIDialogOK *dialog = (CGUIDialogOK *)g_windowManager.GetWindow(WINDOW_DIALOG_OK); // Tell user they entered a bad password
- if (dialog)
- {
- dialog->SetHeading(20075);
- dialog->SetLine(0, 12345);
- dialog->SetLine(1, dlgLine1);
- dialog->SetLine(2, 0);
- dialog->DoModal();
- }
+ CGUIDialogOK::ShowAndGetInput(20075, 12345, dlgLine1, 0);
}
else
g_passwordManager.iMasterLockRetriesLeft = g_guiSettings.GetInt("masterlock.maxretries"); // user entered correct mastercode, reset retries to max allowed
#endif
}
else
- {
- CGUIDialogOK* pDlgOK = (CGUIDialogOK*)g_windowManager.GetWindow(WINDOW_DIALOG_OK);
- pDlgOK->SetHeading(257); // Error
- pDlgOK->SetLine(0, g_localizeStrings.Get(20099)); //
- pDlgOK->SetLine(1, ""); //
- pDlgOK->SetLine(2, "");
- pDlgOK->DoModal();
- }
+ CGUIDialogOK::ShowAndGetInput(257, 20099, 0, 0);
}
}
#endif
}
else
- {
- CGUIDialogOK* pDlgOK = (CGUIDialogOK*)g_windowManager.GetWindow(WINDOW_DIALOG_OK);
- pDlgOK->SetHeading(257); // Error
- pDlgOK->SetLine(0, g_localizeStrings.Get(20099)); //
- pDlgOK->SetLine(1, ""); //
- pDlgOK->SetLine(2, "");
- pDlgOK->DoModal();
- }
+ CGUIDialogOK::ShowAndGetInput(257, 20099, 0, 0);
}
}
m_database.Close();
return listNeedsUpdating; // user cancelled
}
- OutputDebugString("failed to get details\n");
- // show dialog...
- CGUIDialogOK *pDlgOK = (CGUIDialogOK*)g_windowManager.GetWindow(WINDOW_DIALOG_OK);
- if (pDlgOK)
- {
- pDlgOK->SetHeading(195);
- pDlgOK->SetLine(0, movieName);
- pDlgOK->SetLine(1, "");
- pDlgOK->SetLine(2, "");
- pDlgOK->SetLine(3, "");
- pDlgOK->DoModal();
- }
+ CGUIDialogOK::ShowAndGetInput(195, movieName, 0, 0);
m_database.Close();
return listNeedsUpdating;
}
m_database.Close();
// done...
- CGUIDialogOK *pDialog = (CGUIDialogOK*)g_windowManager.GetWindow(WINDOW_DIALOG_OK);
- if (pDialog)
- {
- pDialog->SetHeading(20177); // Done
- pDialog->SetLine(0, movie.m_strTitle);
- pDialog->SetLine(1, movie.m_strGenre);
- pDialog->SetLine(2, movie.m_strIMDBNumber);
- pDialog->SetLine(3, "");
- pDialog->DoModal();
- }
+ CGUIDialogOK::ShowAndGetInput(20177, movie.m_strTitle, movie.m_strGenre, movie.m_strIMDBNumber);
// library view cache needs to be cleared
CUtil::DeleteVideoDatabaseDirectoryCache();
pCdInfo->SetNoCDDBInfo();
pDialogProgress->Close();
// ..no, an error occured, display it to the user
- CGUIDialogOK *pDialogOK = (CGUIDialogOK *)g_windowManager.GetWindow(WINDOW_DIALOG_OK);
- if (pDialogOK)
- {
- CStdString strErrorText;
- strErrorText.Format("[%d] %s", cddb.getLastError(), cddb.getLastErrorText());
-
- pDialogOK->SetHeading(255);
- pDialogOK->SetLine(0, 257); //ERROR
- pDialogOK->SetLine(1, strErrorText.c_str() );
- pDialogOK->SetLine(2, "");
- pDialogOK->DoModal();
- }
+ CStdString strErrorText;
+ strErrorText.Format("[%d] %s", cddb.getLastError(), cddb.getLastErrorText());
+ CGUIDialogOK::ShowAndGetInput(255, 257, strErrorText, 0);
}
} // if ( !cddb.queryCDinfo( pCdInfo ) )
pDialogProgress->Close();
CLog::Log(LOGDEBUG, "%s ---------------------------------------------------------", __FUNCTION__);
CLog::Log(LOGDEBUG, "%s - WARNING: Zaping Failed no Zap Point found!", __FUNCTION__);
CLog::Log(LOGDEBUG, "%s ---------------------------------------------------------", __FUNCTION__);
- CGUIDialogOK *dialog = (CGUIDialogOK *)g_windowManager.GetWindow(WINDOW_DIALOG_OK);
- if (dialog)
- {
- CStdString strText;
- strText.Format(g_localizeStrings.Get(21334).c_str(), item.GetLabel());
- dialog->SetHeading( 21331 );
- dialog->SetLine( 0, strText);
- dialog->SetLine( 1, 21333 );
- dialog->SetLine( 2, "" );
- dialog->DoModal();
- }
+ CStdString strText;
+ strText.Format(g_localizeStrings.Get(21334).c_str(), item.GetLabel());
+ CGUIDialogOK::ShowAndGetInput(21331, strText, 21333, 0);
}
}
return false;