bool CGUIDialogSmartPlaylistRule::EditRule(CSmartPlaylistRule &rule, const CStdString& type) { CGUIDialogSmartPlaylistRule *editor = (CGUIDialogSmartPlaylistRule *)g_windowManager.GetWindow(WINDOW_DIALOG_SMART_PLAYLIST_RULE); if (!editor) return false; editor->m_rule = rule; editor->m_type = type == "mixed" ? "songs" : type; editor->DoModal(g_windowManager.GetActiveWindow()); rule = editor->m_rule; return !editor->m_cancelled; }
bool CGUIDialogSmartPlaylistRule::EditRule(CSmartPlaylistRule &rule, const std::string& type) { CGUIDialogSmartPlaylistRule *editor = g_windowManager.GetWindow<CGUIDialogSmartPlaylistRule>(); if (!editor) return false; editor->m_rule = rule; editor->m_type = type; editor->Open(); rule = editor->m_rule; return !editor->m_cancelled; }
bool CGUIDialogSmartPlaylistRule::EditRule(CSmartPlaylistRule &rule, const std::string& type) { CGUIDialogSmartPlaylistRule *editor = (CGUIDialogSmartPlaylistRule *)g_windowManager.GetWindow(WINDOW_DIALOG_SMART_PLAYLIST_RULE); if (!editor) return false; editor->m_rule = rule; editor->m_type = type; editor->Open(); rule = editor->m_rule; return !editor->m_cancelled; }
bool CGUIDialogSmartPlaylistRule::EditRule(CSmartPlaylistRule &rule, const std::string& type) { CGUIDialogSmartPlaylistRule *editor = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSmartPlaylistRule>(WINDOW_DIALOG_SMART_PLAYLIST_RULE); if (!editor) return false; editor->m_rule = rule; editor->m_type = type; editor->Open(); rule = editor->m_rule; return !editor->m_cancelled; }