From b657ef8b3c01e39a6397a85410249e4a7cc2f9b3 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Tue, 15 Nov 2016 21:30:12 +0100 Subject: [PATCH 01/13] - timermanager: disable autoAdjustToEPG for repeating timers --- src/timerd/timermanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 6e17a1c01..12800323c 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -1143,7 +1143,7 @@ CTimerEvent_Record::CTimerEvent_Record(time_t announce_Time, time_t alarm_Time, eventInfo.apids = apids; recordingDir = recDir; epgTitle=""; - autoAdjustToEPG = _autoAdjustToEPG; + autoAdjustToEPG = (evrepeat == CTimerd::TIMERREPEAT_ONCE) ? _autoAdjustToEPG : false; recordingSafety = _recordingSafety; CShortEPGData epgdata; if (CEitManager::getInstance()->getEPGidShort(epgID, &epgdata)) From f957bbaa374bc2922e561c66edb33d9e260371f2 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 16 Nov 2016 19:29:19 +0100 Subject: [PATCH 02/13] src/gui/channellist.cpp cancel paint_events thread on hide --- src/gui/channellist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index d3653cd80..7c44d5bf4 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -960,14 +960,15 @@ int CChannelList::show() void CChannelList::hide() { + paint_events(-2); // cancel paint_events thread if ((g_settings.channellist_additional == 2) || (previous_channellist_additional == 2)) // with miniTV { if (cc_minitv) delete cc_minitv; cc_minitv = NULL; } - - header->kill(); + if(header) + header->kill(); if (CChannelLogo){ CChannelLogo->kill(); delete CChannelLogo; From 5e1efd222f51b8a676fcba259c8be0a9b1e8b9c6 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 16 Feb 2014 13:14:41 +0100 Subject: [PATCH 03/13] disable private copy of the linux dvb headers Move them into subdir private so that they are no longer used by default. They still can be used by extending the include path. --- src/zapit/include/{ => private}/linux/dvb/audio.h | 0 src/zapit/include/{ => private}/linux/dvb/ca.h | 0 src/zapit/include/{ => private}/linux/dvb/dmx.h | 0 src/zapit/include/{ => private}/linux/dvb/frontend.h | 0 src/zapit/include/{ => private}/linux/dvb/net.h | 0 src/zapit/include/{ => private}/linux/dvb/osd.h | 0 src/zapit/include/{ => private}/linux/dvb/version.h | 0 src/zapit/include/{ => private}/linux/dvb/video.h | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename src/zapit/include/{ => private}/linux/dvb/audio.h (100%) rename src/zapit/include/{ => private}/linux/dvb/ca.h (100%) rename src/zapit/include/{ => private}/linux/dvb/dmx.h (100%) rename src/zapit/include/{ => private}/linux/dvb/frontend.h (100%) rename src/zapit/include/{ => private}/linux/dvb/net.h (100%) rename src/zapit/include/{ => private}/linux/dvb/osd.h (100%) rename src/zapit/include/{ => private}/linux/dvb/version.h (100%) rename src/zapit/include/{ => private}/linux/dvb/video.h (100%) diff --git a/src/zapit/include/linux/dvb/audio.h b/src/zapit/include/private/linux/dvb/audio.h similarity index 100% rename from src/zapit/include/linux/dvb/audio.h rename to src/zapit/include/private/linux/dvb/audio.h diff --git a/src/zapit/include/linux/dvb/ca.h b/src/zapit/include/private/linux/dvb/ca.h similarity index 100% rename from src/zapit/include/linux/dvb/ca.h rename to src/zapit/include/private/linux/dvb/ca.h diff --git a/src/zapit/include/linux/dvb/dmx.h b/src/zapit/include/private/linux/dvb/dmx.h similarity index 100% rename from src/zapit/include/linux/dvb/dmx.h rename to src/zapit/include/private/linux/dvb/dmx.h diff --git a/src/zapit/include/linux/dvb/frontend.h b/src/zapit/include/private/linux/dvb/frontend.h similarity index 100% rename from src/zapit/include/linux/dvb/frontend.h rename to src/zapit/include/private/linux/dvb/frontend.h diff --git a/src/zapit/include/linux/dvb/net.h b/src/zapit/include/private/linux/dvb/net.h similarity index 100% rename from src/zapit/include/linux/dvb/net.h rename to src/zapit/include/private/linux/dvb/net.h diff --git a/src/zapit/include/linux/dvb/osd.h b/src/zapit/include/private/linux/dvb/osd.h similarity index 100% rename from src/zapit/include/linux/dvb/osd.h rename to src/zapit/include/private/linux/dvb/osd.h diff --git a/src/zapit/include/linux/dvb/version.h b/src/zapit/include/private/linux/dvb/version.h similarity index 100% rename from src/zapit/include/linux/dvb/version.h rename to src/zapit/include/private/linux/dvb/version.h diff --git a/src/zapit/include/linux/dvb/video.h b/src/zapit/include/private/linux/dvb/video.h similarity index 100% rename from src/zapit/include/linux/dvb/video.h rename to src/zapit/include/private/linux/dvb/video.h From 8cb0bef8e156a6398101dacce1b5acb586bb70bd Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 16 Nov 2016 20:09:17 +0100 Subject: [PATCH 04/13] timermanager: try fix autoAdjustToEPG for (repeating) timers --- src/timerd/timermanager.cpp | 85 +++++++++++++++++++++++++------------ src/timerd/timermanager.h | 1 + 2 files changed, 59 insertions(+), 27 deletions(-) diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 12800323c..a7fecdb5c 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -427,6 +427,38 @@ int CTimerManager::rescheduleEvent(int peventID, time_t announceTime, time_t ala pthread_mutex_unlock(&tm_eventsMutex); return res; } + +int CTimerManager::adjustEvent(int peventID, time_t announceTime, time_t alarmTime, time_t stopTime) +{ + int res = 0; + pthread_mutex_lock(&tm_eventsMutex); + + if(events.find(peventID)!=events.end()) + { + CTimerEvent *event = events[peventID]; + printf("before: EventID: %d - State %d\n",peventID,(int) event->eventState); + time_t now = time(NULL); + if(event->announceTime > 0) + event->announceTime = announceTime; + if (event->announceTime > now) + event->eventState = CTimerd::TIMERSTATE_SCHEDULED; + if(event->alarmTime > 0) + event->alarmTime = alarmTime; + if ((event->alarmTime > now) && (event->announceTime < now)) + event->eventState = CTimerd::TIMERSTATE_PREANNOUNCE; + if(event->stopTime > 0) + event->stopTime = stopTime; + if ((event->stopTime > now) && (event->alarmTime < now)) + event->eventState = CTimerd::TIMERSTATE_ISRUNNING; + m_saveEvents=true; + res = peventID; + printf("after: EventID: %d - State %d\n",peventID,(int) event->eventState); + } + else + res = 0; + pthread_mutex_unlock(&tm_eventsMutex); + return res; +} // --------------------------------------------------------------------------------- void CTimerManager::loadEventsFromConfig() { @@ -1143,7 +1175,7 @@ CTimerEvent_Record::CTimerEvent_Record(time_t announce_Time, time_t alarm_Time, eventInfo.apids = apids; recordingDir = recDir; epgTitle=""; - autoAdjustToEPG = (evrepeat == CTimerd::TIMERREPEAT_ONCE) ? _autoAdjustToEPG : false; + autoAdjustToEPG = _autoAdjustToEPG; recordingSafety = _recordingSafety; CShortEPGData epgdata; if (CEitManager::getInstance()->getEPGidShort(epgID, &epgdata)) @@ -1214,6 +1246,8 @@ void CTimerEvent_Record::announceEvent() //------------------------------------------------------------ void CTimerEvent_Record::stopEvent() { + if (adjustToCurrentEPG()) + return; CTimerd::RecordingStopInfo stopinfo; // Set EPG-ID if not set stopinfo.eventID = eventID; @@ -1306,44 +1340,41 @@ bool CTimerEvent_Record::adjustToCurrentEPG() CChannelEventList evtlist; CEitManager::getInstance()->getEventsServiceKey(eventInfo.channel_id, evtlist); - time_t now = time(NULL); - time_t compare; - int pre, post; CTimerManager::getInstance()->getRecordingSafety(pre, post); - CChannelEventList::iterator first = evtlist.end(); - for (CChannelEventList::iterator e = evtlist.begin(); e != evtlist.end(); ++e) - { - compare = e->startTime; - if (!pre) - compare += e->duration; + time_t _announceTime = announceTime; + time_t _alarmTime = alarmTime; + time_t _stopTime = stopTime; - if (compare <= now) - continue; - if (first == evtlist.end() || first->startTime > e->startTime) - first = e; - if (alarmTime <= e->startTime && e->startTime + (int)e->duration <= stopTime) - return false; + if (recordingSafety) { + _alarmTime += pre; + _stopTime -= post; + } + + // we check for a time in the middle of the recording without considering pre and post + time_t check_time=_alarmTime/2 + _stopTime/2; + for ( CChannelEventList::iterator e= evtlist.begin(); e != evtlist.end(); ++e ) + { + if ( e->startTime <= check_time && (e->startTime + (int)e->duration) >= check_time) + { + _announceTime = e->startTime - (alarmTime - announceTime); + _alarmTime = e->startTime; + _stopTime = e->startTime + e->duration; + break; + } } - if (first == evtlist.end()) - return false; - time_t _announceTime = first->startTime - (alarmTime - announceTime); - time_t _alarmTime = first->startTime; - time_t _stopTime = first->startTime + first->duration; if (recordingSafety) { _alarmTime -= pre; _stopTime += post; } - CTimerEvent_Record *event= new CTimerEvent_Record(_announceTime, _alarmTime, _stopTime, - eventInfo.channel_id, eventInfo.epgID, first->startTime, eventInfo.apids, - CTimerd::TIMERREPEAT_ONCE, 1, recordingDir, recordingSafety, autoAdjustToEPG); - CTimerManager::getInstance()->addEvent(event,false); - setState(CTimerd::TIMERSTATE_HASFINISHED); + if ((_alarmTime != alarmTime) || (_announceTime != announceTime) || (_stopTime != stopTime)) + if (CTimerManager::getInstance()->adjustEvent(eventID, _announceTime, _alarmTime, _stopTime)) + return true; - return true; + return false; } //============================================================= // Zapto Event diff --git a/src/timerd/timermanager.h b/src/timerd/timermanager.h index 188751e45..414ebf28e 100644 --- a/src/timerd/timermanager.h +++ b/src/timerd/timermanager.h @@ -249,6 +249,7 @@ public: int modifyEvent(int eventID, time_t announceTime, time_t alarmTime, time_t stopTime, uint32_t repeatcount, CTimerd::CTimerEventRepeat evrepeat, CTimerd::responseGetTimer& data); int modifyEvent(int eventID, unsigned char apids); int rescheduleEvent(int eventID, time_t announceTime, time_t alarmTime, time_t stopTime); + int adjustEvent(int eventID, time_t announceTime, time_t alarmTime, time_t stopTime); void saveEventsToConfig(); void loadEventsFromConfig(); bool shutdown(); From 045587f6eca8b9e67814dfa97f14f1c07e86b3f9 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 16 Nov 2016 20:30:14 +0100 Subject: [PATCH 05/13] make sure the private dvb headers are used on coolstream --- configure.ac | 4 ++-- lib/sectionsdclient/Makefile.am | 1 + lib/timerdclient/Makefile.am | 1 + src/nhttpd/Makefile.am | 3 ++- src/nhttpd/yhttpd_mods/Makefile.am | 1 + src/timerd/Makefile.am | 1 + src/zapit/lib/Makefile.am | 1 + 7 files changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 1f553e6e0..7fd8adc65 100644 --- a/configure.ac +++ b/configure.ac @@ -220,7 +220,7 @@ if test "$BOXTYPE" = "coolstream"; then if test -e ${srcdir}/lib/libcoolstream/nevis_ir.h; then AC_DEFINE(HAVE_COOLSTREAM_NEVIS_IR_H,1,[Define to 1 if you have the header file.]) fi -HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream' +HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream -I$(top_srcdir)/src/zapit/include/private' if test "$BOXMODEL" = "apollo"; then if test -e ${srcdir}/lib/libcoolstream2/cs_ir_generic.h; then @@ -229,7 +229,7 @@ fi if test -e ${srcdir}/lib/libcoolstream2/cs_frontpanel.h; then AC_DEFINE(HAVE_COOLSTREAM_CS_FRONTPANEL_H,1,[Define to 1 if you have the header file.]) fi -HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2' +HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2 -I$(top_srcdir)/src/zapit/include/private' fi fi diff --git a/lib/sectionsdclient/Makefile.am b/lib/sectionsdclient/Makefile.am index 016fb6603..8a322cd07 100644 --- a/lib/sectionsdclient/Makefile.am +++ b/lib/sectionsdclient/Makefile.am @@ -1,4 +1,5 @@ AM_CPPFLAGS = \ + @HWLIB_CFLAGS@ \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src/zapit/include \ -I$(top_srcdir)/lib/connection \ diff --git a/lib/timerdclient/Makefile.am b/lib/timerdclient/Makefile.am index ce2f0f72d..96b51f53b 100644 --- a/lib/timerdclient/Makefile.am +++ b/lib/timerdclient/Makefile.am @@ -1,4 +1,5 @@ AM_CPPFLAGS = \ + @HWLIB_CFLAGS@ \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src/zapit/include \ -I$(top_srcdir)/lib/connection \ diff --git a/src/nhttpd/Makefile.am b/src/nhttpd/Makefile.am index d1aae8bc4..1ea01bff6 100644 --- a/src/nhttpd/Makefile.am +++ b/src/nhttpd/Makefile.am @@ -3,6 +3,7 @@ SUBDIRS = yhttpd_core yhttpd_mods tuxboxapi web AM_CPPFLAGS = -fno-rtti -fno-exceptions -D_FILE_OFFSET_BITS=64 AM_CPPFLAGS += \ + @HWLIB_CFLAGS@ \ -I$(srcdir) \ -I$(top_builddir) \ -I$(top_srcdir) \ @@ -23,4 +24,4 @@ libnhttpd_a_SOURCES = yhttpd.cpp libnhttpd_adir = @CONFIGDIR@ libnhttpd_a_DATA = nhttpd.conf -EXTRA_DIST = nhttpd.conf nhttpd.conf.in \ No newline at end of file +EXTRA_DIST = nhttpd.conf nhttpd.conf.in diff --git a/src/nhttpd/yhttpd_mods/Makefile.am b/src/nhttpd/yhttpd_mods/Makefile.am index 2e748d983..a08445dbd 100644 --- a/src/nhttpd/yhttpd_mods/Makefile.am +++ b/src/nhttpd/yhttpd_mods/Makefile.am @@ -1,4 +1,5 @@ AM_CPPFLAGS = \ + @HWLIB_CFLAGS@ \ -I$(top_builddir) \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src/zapit/include \ diff --git a/src/timerd/Makefile.am b/src/timerd/Makefile.am index 4bbe89fa6..b3c68456f 100644 --- a/src/timerd/Makefile.am +++ b/src/timerd/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = -fno-rtti -fno-exceptions -D__STDC_FORMAT_MACROS AM_CPPFLAGS += \ + @HWLIB_CFLAGS@ \ -I$(top_builddir) \ -I$(top_srcdir) \ -I$(top_srcdir)/src \ diff --git a/src/zapit/lib/Makefile.am b/src/zapit/lib/Makefile.am index 2d884b259..e62c50637 100644 --- a/src/zapit/lib/Makefile.am +++ b/src/zapit/lib/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = -fno-rtti -fno-exceptions AM_CPPFLAGS += \ + @HWLIB_CFLAGS@ \ -I$(top_builddir) \ -I$(top_srcdir) \ -I$(top_srcdir)/src/zapit/include \ From 86c3655e967d9adbdfcd6b0d34c9c1a47e9e6f95 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 17 Nov 2016 01:48:32 +0100 Subject: [PATCH 06/13] - moviebrowser: fix input for end mark and lastplay mark --- src/gui/moviebrowser/mb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 0a59121f2..fc5810c15 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3159,8 +3159,8 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, true, NULL, this, "book_clear_all",CRCInput::RC_blue)); bookmarkMenu.addItem(GenericMenuSeparatorLine); bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, true, bookStartIntInput.getValue(), &bookStartIntInput)); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIEEND, true, bookEndIntInput.getValue(), &bookLastIntInput)); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, bookLastIntInput.getValue(), &bookEndIntInput)); + bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIEEND, true, bookEndIntInput.getValue(), &bookEndIntInput)); + bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, bookLastIntInput.getValue(), &bookLastIntInput)); bookmarkMenu.addItem(GenericMenuSeparatorLine); for (int li =0 ; li < MI_MOVIE_BOOK_USER_MAX && li < MAX_NUMBER_OF_BOOKMARK_ITEMS; li++) From 7a3839c7f596a326c5a0bac9cbb49e219bcef3ae Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 17 Nov 2016 01:48:32 +0100 Subject: [PATCH 07/13] - locale: small changes in moviebrowser's bookmark locales --- data/locale/deutsch.locale | 8 ++++---- data/locale/english.locale | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 60122e160..f68a06067 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1632,7 +1632,7 @@ moviebrowser.book_name Name: moviebrowser.book_new Neue Markierung moviebrowser.book_no_end Keine Endmarkierung gefunden moviebrowser.book_position Position: -moviebrowser.book_type Sprung (<0 zurück, >0 vor): +moviebrowser.book_type Sprung (<0: zurück, >0: vor): moviebrowser.book_type_backward Wiederholung moviebrowser.book_type_forward Überspringen moviebrowser.browser_additional Zusätzliche Informationen @@ -1655,13 +1655,13 @@ moviebrowser.delete_screenshot Lösche Screenshot? moviebrowser.dir Pfad moviebrowser.directories Verzeichnisse moviebrowser.directories_additional Zusätzliche Verzeichnisse -moviebrowser.edit_book Bookmark Ändern +moviebrowser.edit_book Markierung ändern moviebrowser.edit_book_name_info1 Neuer Markierungsname -moviebrowser.edit_book_name_info2 Markierungsname info2 +moviebrowser.edit_book_name_info2 moviebrowser.edit_book_pos_info1 Neue Position (s) moviebrowser.edit_book_pos_info2 moviebrowser.edit_book_type_info1 Neue Sprunglänge (s) -moviebrowser.edit_book_type_info2 <0 zurück , >0 vor, 0: kein +moviebrowser.edit_book_type_info2 <0: zurück, >0: vor, 0: kein moviebrowser.edit_serie Name der Serie moviebrowser.error_no_movies Keine Filme gefunden moviebrowser.filter_off Filter aus diff --git a/data/locale/english.locale b/data/locale/english.locale index 5650de51b..499b67789 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1627,14 +1627,14 @@ moviebrowser.book_clear_all Clear all moviebrowser.book_head Bookmarks moviebrowser.book_lastmoviestop Last play stop: moviebrowser.book_movieend Movie end: -moviebrowser.book_moviestart User Movie start: +moviebrowser.book_moviestart Movie start: moviebrowser.book_name Name: -moviebrowser.book_new New Bookmark -moviebrowser.book_no_end No end bookmark defined +moviebrowser.book_new New bookmark +moviebrowser.book_no_end No end mark defined moviebrowser.book_position Position: -moviebrowser.book_type Jump (<0 back , >0 for): +moviebrowser.book_type Jump (<0: backward, >0: forward): moviebrowser.book_type_backward Repeat -moviebrowser.book_type_forward jump over +moviebrowser.book_type_forward Jump over moviebrowser.browser_additional Additional informations moviebrowser.browser_frame_high Browser height [%] moviebrowser.browser_row_head Row settings @@ -1655,13 +1655,13 @@ moviebrowser.delete_screenshot Delete screenshot? moviebrowser.dir Path moviebrowser.directories Directories moviebrowser.directories_additional Additional directories -moviebrowser.edit_book Bookmark change -moviebrowser.edit_book_name_info1 Enter new Bookmark name -moviebrowser.edit_book_name_info2 book name info2 -moviebrowser.edit_book_pos_info1 Enter new Position (s) +moviebrowser.edit_book Change bookmark +moviebrowser.edit_book_name_info1 Enter new bookmark name +moviebrowser.edit_book_name_info2 +moviebrowser.edit_book_pos_info1 Enter new position (s) moviebrowser.edit_book_pos_info2 moviebrowser.edit_book_type_info1 Enter new jump length (s) -moviebrowser.edit_book_type_info2 <0 back , >0 for, 0: none +moviebrowser.edit_book_type_info2 <0: backward, >0: forward, 0: none moviebrowser.edit_serie Enter name of serie moviebrowser.error_no_movies No movies found moviebrowser.filter_off Filter off From d171038a6e603ffd0dac89681a8f7e7a9dda0554 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 17 Nov 2016 01:48:32 +0100 Subject: [PATCH 08/13] - moviebrowser: use red key to remove all user bookmarks --- src/gui/moviebrowser/mb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index fc5810c15..2bb550ec3 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3156,7 +3156,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) CMenuWidget bookmarkMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER); bookmarkMenu.addIntroItems(LOCALE_MOVIEBROWSER_BOOK_HEAD); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, true, NULL, this, "book_clear_all",CRCInput::RC_blue)); + bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, true, NULL, this, "book_clear_all", CRCInput::RC_red)); bookmarkMenu.addItem(GenericMenuSeparatorLine); bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, true, bookStartIntInput.getValue(), &bookStartIntInput)); bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIEEND, true, bookEndIntInput.getValue(), &bookEndIntInput)); From 365f36df92153790f355e1c9b1452f7dfec3b999 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 17 Nov 2016 01:48:32 +0100 Subject: [PATCH 09/13] - moviebrowser: more clarity in bookmark menu --- src/gui/moviebrowser/mb.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 2bb550ec3..449173685 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3165,17 +3165,21 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) for (int li =0 ; li < MI_MOVIE_BOOK_USER_MAX && li < MAX_NUMBER_OF_BOOKMARK_ITEMS; li++) { - CKeyboardInput * pBookNameInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, &movie_info->bookmarks.user[li].name, 20); - CIntInput *pBookPosIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].pos, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); - CIntInput *pBookTypeIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].length, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO2); + std::string bookmark_user_name = g_Locale->getText(LOCALE_MOVIEBROWSER_BOOK_NEW); + if (!movie_info->bookmarks.user[li].name.empty()) + bookmark_user_name = movie_info->bookmarks.user[li].name; + + CKeyboardInput *pBookNameInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, &movie_info->bookmarks.user[li].name, 20, NULL, NULL, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO2); + CIntInput *pBookPosIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].pos, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); + CIntInput *pBookTypeIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].length, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO2); CMenuWidget* pBookItemMenu = new CMenuWidget(LOCALE_MOVIEBROWSER_BOOK_HEAD, NEUTRINO_ICON_MOVIEPLAYER); pBookItemMenu->addItem(GenericMenuSeparator); - pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, movie_info->bookmarks.user[li].name, pBookNameInput)); + pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, bookmark_user_name.c_str(), pBookNameInput)); pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_POSITION, true, pBookPosIntInput->getValue(), pBookPosIntInput)); pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE, true, pBookTypeIntInput->getValue(), pBookTypeIntInput)); - bookmarkMenu.addItem(new CMenuDForwarder(movie_info->bookmarks.user[li].name.c_str(), true, pBookPosIntInput->getValue(), pBookItemMenu)); + bookmarkMenu.addItem(new CMenuDForwarder(bookmark_user_name.c_str(), true, pBookPosIntInput->getValue(), pBookItemMenu)); } /********************************************************************/ From b43145af7c37407b2acb3ac02ed1e70a021a5441 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 17 Nov 2016 10:19:53 +0100 Subject: [PATCH 10/13] - moviebrowser: resort movie info menu --- src/gui/moviebrowser/mb.cpp | 47 +++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 449173685..522a92eb4 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3225,15 +3225,15 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) strncpy(dirItNr, m_dirNames[movie_info->dirItNr].c_str(),BUFFER_SIZE-1); snprintf(size,BUFFER_SIZE,"%5" PRIu64 "",movie_info->file.Size>>20); - CKeyboardInput titelUserInput(LOCALE_MOVIEBROWSER_INFO_TITLE, &movie_info->epgTitle, (movie_info->epgTitle.empty() || (movie_info->epgTitle.size() < MAX_STRING)) ? MAX_STRING:movie_info->epgTitle.size()); + CKeyboardInput titelUserInput(LOCALE_MOVIEBROWSER_INFO_TITLE, &movie_info->epgTitle, (movie_info->epgTitle.empty() || (movie_info->epgTitle.size() < MAX_STRING)) ? MAX_STRING:movie_info->epgTitle.size()); CKeyboardInput channelUserInput(LOCALE_MOVIEBROWSER_INFO_CHANNEL, &movie_info->channelName, MAX_STRING); CKeyboardInput epgUserInput(LOCALE_MOVIEBROWSER_INFO_INFO1, &movie_info->epgInfo1, 20); CKeyboardInput countryUserInput(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, &movie_info->productionCountry, 11); - CDateInput dateUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->dateOfLastPlay, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); - CDateInput recUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->file.Time, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); - CIntInput lengthUserIntInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, (int *)&movie_info->length, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); - CIntInput yearUserIntInput(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, (int *)&movie_info->productionDate, 4, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); + CDateInput dateUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->dateOfLastPlay); + CDateInput recUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->file.Time); + CIntInput lengthUserIntInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, (int *)&movie_info->length, 3); + CIntInput yearUserIntInput(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, (int *)&movie_info->productionDate, 4); CMenuOptionNumberChooser *rate = new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_RATING, &movie_info->rating, true, 0, 100, NULL); rate->setNumberFormat(rateFormat); @@ -3241,27 +3241,28 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) CMenuWidget movieInfoMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER); movieInfoMenu.addIntroItems(LOCALE_MOVIEBROWSER_INFO_HEAD); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_SAVE, true, NULL, this, "save_movie_info", CRCInput::RC_red)); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_HEAD_UPDATE, true, NULL, &movieInfoMenuUpdate, NULL, CRCInput::RC_green)); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_HEAD, true, NULL, &bookmarkMenu, NULL, CRCInput::RC_blue)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_SAVE, true, NULL, this, "save_movie_info", CRCInput::RC_red)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_HEAD_UPDATE, true, NULL, &movieInfoMenuUpdate, NULL, CRCInput::RC_green)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_HEAD, true, NULL, &bookmarkMenu, NULL, CRCInput::RC_blue)); movieInfoMenu.addItem(GenericMenuSeparatorLine); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_TITLE, true, movie_info->epgTitle, &titelUserInput,NULL, CRCInput::RC_1)); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_SERIE, true, movie_info->serieName, &serieMenu,NULL, CRCInput::RC_2)); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_INFO1, (movie_info->epgInfo1.size() <= MAX_STRING) /*true*/, movie_info->epgInfo1, &epgUserInput,NULL, CRCInput::RC_3)); - movieInfoMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movie_info->genreMajor, GENRE_ALL, GENRE_ALL_COUNT, true,NULL, CRCInput::RC_4, "", true)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_TITLE, true, movie_info->epgTitle, &titelUserInput, NULL, CRCInput::RC_1)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_SERIE, true, movie_info->serieName, &serieMenu, NULL, CRCInput::RC_2)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_INFO1, (movie_info->epgInfo1.size() <= MAX_STRING), movie_info->epgInfo1, &epgUserInput, NULL, CRCInput::RC_3)); + movieInfoMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movie_info->genreMajor, GENRE_ALL, GENRE_ALL_COUNT, true, NULL, CRCInput::RC_4, "", true)); + movieInfoMenu.addItem(GenericMenuSeparatorLine); + movieInfoMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movie_info->parentalLockAge, MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true, NULL, CRCInput::RC_5)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, true, yearUserIntInput.getValue(), &yearUserIntInput, NULL, CRCInput::RC_6)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, true, movie_info->productionCountry, &countryUserInput, NULL, CRCInput::RC_7)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_LENGTH, true, lengthUserIntInput.getValue(), &lengthUserIntInput, NULL, CRCInput::RC_8)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_CHANNEL, true, movie_info->channelName, &channelUserInput, NULL, CRCInput::RC_9)); + movieInfoMenu.addItem(GenericMenuSeparatorLine); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PATH, false, dirItNr)); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE, false, dateUserDateInput.getValue())); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_RECORDDATE, false, recUserDateInput.getValue())); + movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_SIZE, false, size)); movieInfoMenu.addItem(GenericMenuSeparatorLine); movieInfoMenu.addItem(rate); - movieInfoMenu.addItem(new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY,&movie_info->quality,true,0,3, NULL)); - movieInfoMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movie_info->parentalLockAge, MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true,NULL, CRCInput::RC_6)); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, true, yearUserIntInput.getValue(), &yearUserIntInput,NULL, CRCInput::RC_7)); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, true, movie_info->productionCountry, &countryUserInput,NULL, CRCInput::RC_8)); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_LENGTH, true, lengthUserIntInput.getValue(), &lengthUserIntInput,NULL, CRCInput::RC_9)); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_CHANNEL, true, movie_info->channelName, &channelUserInput,NULL, CRCInput::RC_0));//LOCALE_TIMERLIST_CHANNEL - movieInfoMenu.addItem(GenericMenuSeparatorLine); - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PATH, false, dirItNr)); //LOCALE_TIMERLIST_RECORDING_DIR - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE, false, dateUserDateInput.getValue()));//LOCALE_FLASHUPDATE_CURRENTVERSIONDATE - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_RECORDDATE, false, recUserDateInput.getValue()));//LOCALE_FLASHUPDATE_CURRENTVERSIONDATE - movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_SIZE, false, size, NULL)); + movieInfoMenu.addItem(new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY, &movie_info->quality, true, 0, 3, NULL)); int res = movieInfoMenu.exec(NULL,""); From de27a8a36c5d418abc51da8c5ca6641bb8d7292d Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 17 Nov 2016 10:19:53 +0100 Subject: [PATCH 11/13] - moviebrowser: resort movie info update menu --- src/gui/moviebrowser/mb.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 522a92eb4..b0a5b7d74 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3201,20 +3201,20 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) CMenuWidget movieInfoMenuUpdate(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER); movieInfoMenuUpdate.addIntroItems(LOCALE_MOVIEBROWSER_INFO_HEAD_UPDATE); - movieInfoMenuUpdate.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_SAVE_ALL, true, NULL, this, "save_movie_info_all",CRCInput::RC_red)); + movieInfoMenuUpdate.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_SAVE_ALL, true, NULL, this, "save_movie_info_all", CRCInput::RC_red)); movieInfoMenuUpdate.addItem(GenericMenuSeparatorLine); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_UPDATE_IF_DEST_EMPTY_ONLY, (&movieInfoUpdateAllIfDestEmptyOnly), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL,CRCInput::RC_blue)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_UPDATE_IF_DEST_EMPTY_ONLY, (&movieInfoUpdateAllIfDestEmptyOnly), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_blue)); movieInfoMenuUpdate.addItem(GenericMenuSeparatorLine); movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_TITLE, &movieInfoUpdateAll[MB_INFO_TITLE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_1)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_INFO1, &movieInfoUpdateAll[MB_INFO_INFO1], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_2)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_SERIE, &movieInfoUpdateAll[MB_INFO_SERIE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_3)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_RATING, &movieInfoUpdateAll[MB_INFO_RATING], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_4)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY, &movieInfoUpdateAll[MB_INFO_QUALITY], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_5)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movieInfoUpdateAll[MB_INFO_PARENTAL_LOCKAGE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_6)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movieInfoUpdateAll[MB_INFO_MAJOR_GENRE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_7)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, &movieInfoUpdateAll[MB_INFO_PRODDATE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_8)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, &movieInfoUpdateAll[MB_INFO_COUNTRY], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_9)); - movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movieInfoUpdateAll[MB_INFO_LENGTH], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_0)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_SERIE, &movieInfoUpdateAll[MB_INFO_SERIE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_2)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_INFO1, &movieInfoUpdateAll[MB_INFO_INFO1], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_3)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movieInfoUpdateAll[MB_INFO_MAJOR_GENRE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_4)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movieInfoUpdateAll[MB_INFO_PARENTAL_LOCKAGE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_5)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, &movieInfoUpdateAll[MB_INFO_PRODDATE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_6)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, &movieInfoUpdateAll[MB_INFO_COUNTRY], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_7)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movieInfoUpdateAll[MB_INFO_LENGTH], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_8)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_RATING, &movieInfoUpdateAll[MB_INFO_RATING], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_9)); + movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY, &movieInfoUpdateAll[MB_INFO_QUALITY], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_0)); /********************************************************************/ /** movieInfo ******************************************************/ From 531ab8f8188d6b82400742b2f19293d224216635 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 17 Nov 2016 18:45:59 +0100 Subject: [PATCH 12/13] src/gui/moviebrowser/mb.cpp fix bookmark Menu --- src/gui/moviebrowser/mb.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index b0a5b7d74..37b3d9dbe 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3165,9 +3165,8 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) for (int li =0 ; li < MI_MOVIE_BOOK_USER_MAX && li < MAX_NUMBER_OF_BOOKMARK_ITEMS; li++) { - std::string bookmark_user_name = g_Locale->getText(LOCALE_MOVIEBROWSER_BOOK_NEW); - if (!movie_info->bookmarks.user[li].name.empty()) - bookmark_user_name = movie_info->bookmarks.user[li].name; + if (movie_info->bookmarks.user[li].name.empty()) + movie_info->bookmarks.user[li].name = g_Locale->getText(LOCALE_MOVIEBROWSER_BOOK_NEW); CKeyboardInput *pBookNameInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, &movie_info->bookmarks.user[li].name, 20, NULL, NULL, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO2); CIntInput *pBookPosIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].pos, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); @@ -3175,11 +3174,11 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) CMenuWidget* pBookItemMenu = new CMenuWidget(LOCALE_MOVIEBROWSER_BOOK_HEAD, NEUTRINO_ICON_MOVIEPLAYER); pBookItemMenu->addItem(GenericMenuSeparator); - pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, bookmark_user_name.c_str(), pBookNameInput)); + pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, movie_info->bookmarks.user[li].name, pBookNameInput)); pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_POSITION, true, pBookPosIntInput->getValue(), pBookPosIntInput)); pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE, true, pBookTypeIntInput->getValue(), pBookTypeIntInput)); - bookmarkMenu.addItem(new CMenuDForwarder(bookmark_user_name.c_str(), true, pBookPosIntInput->getValue(), pBookItemMenu)); + bookmarkMenu.addItem(new CMenuDForwarder("", true, pBookNameInput->getValue(), pBookItemMenu)); } /********************************************************************/ From d3fe4f5e0a73d1a831c15e7aa33e2eab8c641e28 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Thu, 17 Nov 2016 21:02:28 +0100 Subject: [PATCH 13/13] fix moviebrowser detailsline --- src/gui/moviebrowser/mb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 37b3d9dbe..a1e3e722b 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -2516,6 +2516,8 @@ void CMovieBrowser::onSetGUIWindow(MB_GUI gui) TRACE("[mb]->onSetGUIWindow: gui %d -> %d\n", m_settings.gui, gui); m_settings.gui = gui; + hideDetailsLine(); + m_showMovieInfo = true; if (gui == MB_GUI_MOVIE_INFO) { m_showBrowserFiles = true; @@ -2572,7 +2574,6 @@ void CMovieBrowser::onSetGUIWindow(MB_GUI gui) hideMovieCover(); m_pcInfo2->clear(); } - hideDetailsLine(); m_pcFilter->paint(); onSetFocus(MB_FOCUS_FILTER);