New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gui] smartplaylisteditor: convert spinners etc to regular buttons #10594
Conversation
@phil65, thank you for improving Kodi! According to the last 5 commits, we found the potential reviewers: @Montellese, @mkortstiege and @notspiff. Final approval needs to be given by the component maintainer. |
3b33eae
to
77ea84a
Compare
Added another commit which converts two more buttons. |
Merge them (10593 and 10594) and I'll include them both in test builds - keeping them separate makes that a bit trickier (as they're both patching the same code). |
@MilhouseVH done. |
Thanks, will include in the next build. |
...aaand another commit. |
7393ad2
to
d7a93f4
Compare
d7a93f4
to
1489216
Compare
ca4dde2
to
89e07d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good apart from the minors. This will require all skins to adjust the dialog right?
{ | ||
if (item == static_cast<int>(m_playlist.m_ruleCombination.m_rules.size())) | ||
OnRuleAdd(); | ||
else if (item < 0 || item > static_cast<int>(m_playlist.m_ruleCombination.m_rules.size())) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
else | ||
{ | ||
CSmartPlaylistRule rule = *std::static_pointer_cast<CSmartPlaylistRule>(m_playlist.m_ruleCombination.m_rules[item]); | ||
if (CGUIDialogSmartPlaylistRule::EditRule(rule,m_playlist.GetType())) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
CGUIMessage msg(GUI_MSG_ITEM_SELECTED, GetID(), CONTROL_LIMIT); | ||
OnMessage(msg); | ||
m_playlist.m_limit = msg.GetParam1(); | ||
const int limits[] = {0, 10, 25, 50, 100, 250, 500, 1000, -1 }; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
void CGUIDialogSmartPlaylistEditor::OnName() | ||
{ | ||
std::string name = m_playlist.m_playlistName; | ||
if (CGUIKeyboardFactory::ShowAndGetInput(name, CVariant{g_localizeStrings.Get(16012)}, false)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -546,6 +548,37 @@ void CGUIDialogSmartPlaylistEditor::HighlightItem(int item) | |||
OnMessage(msg); | |||
} | |||
|
|||
std::vector<CGUIDialogSmartPlaylistEditor::PLAYLIST_TYPE> CGUIDialogSmartPlaylistEditor::GetAllowedTypes(std::string mode) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
dialog->Reset(); | ||
dialog->SetHeading(CVariant{20427}); | ||
int selected = -1; | ||
for (unsigned int i = 0; i < fields.size(); i++) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
if (!isValid) | ||
m_rule.m_operator = (CDatabaseQueryRule::SEARCH_OPERATOR)std::get<1>(validOperators[0]); | ||
m_rule.SetParameter(""); | ||
UpdateButtons(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
void CGUIDialogSmartPlaylistRule::OnOperator() | ||
{ | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
{ | ||
|
||
std::vector< std::pair<std::string, int> > labels = GetValidOperators(m_rule); | ||
CGUIDialogSelect* dialog = (CGUIDialogSelect*)g_windowManager.GetWindow(WINDOW_DIALOG_SELECT); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
void CGUIDialogSmartPlaylistRule::OnOperator() | ||
{ | ||
|
||
std::vector< std::pair<std::string, int> > labels = GetValidOperators(m_rule); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@Montellese |
@@ -546,6 +549,37 @@ void CGUIDialogSmartPlaylistEditor::HighlightItem(int item) | |||
OnMessage(msg); | |||
} | |||
|
|||
std::vector<CGUIDialogSmartPlaylistEditor::PLAYLIST_TYPE> CGUIDialogSmartPlaylistEditor::GetAllowedTypes(const std::string& mode) | |||
{ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
3b1196e
to
03c1348
Compare
@Montellese switched to using iterators. Anything else? |
03c1348
to
03dbc20
Compare
jenkins build this please |
@Montellese general skinner´s sentiment was to merge this, even though we´re already in a later beta, since needed skin changes are very trivial and our skinners are quite good in keeping up with these changes. Are you fine with this? |
Fine with me but don't forget to squash the cleanup commit(s). |
03dbc20
to
46ff271
Compare
All follow-up stuff squashed into one commit. |
Why was the Order button (id=19 in SmartPlaylistEditor.xml) changed from togglebutton to button? It only toggles between two values. |
Next one...this time the order-by button in Smartplaylisteditor.
this PR adds the same header file to GUIDialogSmartPlaylistEditor.cpp as #10593, so remind me to update the PR which gets pulled last. :)
Could have put all commits into one big PR, so sorry for the additional pinging.
EDIT: all PRs merged into this one.
EDIT: FInished!