mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
gui/movieplayer.cpp: fix subtitles menu:
stop button for stop item only; current pid disabled, current item is 'back' if no selected pid, else stop
This commit is contained in:
@@ -1389,8 +1389,8 @@ void CMoviePlayerGui::selectSubtitle()
|
|||||||
char cnt[5];
|
char cnt[5];
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
for (count = 0; count < numsubs; count++) {
|
for (count = 0; count < numsubs; count++) {
|
||||||
bool enabled = sub_supported[count];
|
bool enabled = sub_supported[count] && (currentspid != spids[count]);
|
||||||
bool defpid = currentspid >= 0 ? (currentspid == spids[count]) : (count == 0);
|
|
||||||
std::string title = slanguage[count];
|
std::string title = slanguage[count];
|
||||||
if (title.empty()) {
|
if (title.empty()) {
|
||||||
char pidnumber[20];
|
char pidnumber[20];
|
||||||
@@ -1399,11 +1399,10 @@ void CMoviePlayerGui::selectSubtitle()
|
|||||||
}
|
}
|
||||||
sprintf(cnt, "%d", count);
|
sprintf(cnt, "%d", count);
|
||||||
CMenuForwarder * item = new CMenuForwarder(title.c_str(), enabled, NULL, selector, cnt, CRCInput::convertDigitToKey(count + 1));
|
CMenuForwarder * item = new CMenuForwarder(title.c_str(), enabled, NULL, selector, cnt, CRCInput::convertDigitToKey(count + 1));
|
||||||
item->setItemButton(NEUTRINO_ICON_BUTTON_STOP, false);
|
APIDSelector.addItem(item);
|
||||||
APIDSelector.addItem(item, defpid);
|
|
||||||
}
|
}
|
||||||
sprintf(cnt, "%d", count);
|
sprintf(cnt, "%d", count);
|
||||||
APIDSelector.addItem(new CMenuForwarder(LOCALE_SUBTITLES_STOP, true, NULL, selector, cnt, CRCInput::RC_stop), currentspid < 0);
|
APIDSelector.addItem(new CMenuForwarder(LOCALE_SUBTITLES_STOP, true, NULL, selector, cnt, CRCInput::RC_stop, NEUTRINO_ICON_BUTTON_STOP), currentspid > 0);
|
||||||
|
|
||||||
APIDSelector.exec(NULL, "");
|
APIDSelector.exec(NULL, "");
|
||||||
delete selector;
|
delete selector;
|
||||||
|
Reference in New Issue
Block a user