diff --git a/cross-configure.cool b/cross-configure.cool index b35b48763..60daab140 100755 --- a/cross-configure.cool +++ b/cross-configure.cool @@ -27,5 +27,5 @@ export FREETYPE_CONFIG=$PREFIX/bin/freetype-config export CURL_CONFIG=$PREFIX/bin/curl-config ./autogen.sh -./configure --prefix=${PREFIX} --build=i386-pc-linux-gnu --host=$HOST --without-driver --with-target=cdk --with-targetprefix="" "$*" +./configure --prefix=${PREFIX} --build=i386-pc-linux-gnu --host=$HOST --enable-flac --with-target=cdk --with-targetprefix="" "$*" diff --git a/cross-configure.cool.debug b/cross-configure.cool.debug index 6ce9ebed1..10f42ba3b 100755 --- a/cross-configure.cool.debug +++ b/cross-configure.cool.debug @@ -1,6 +1,6 @@ #!/bin/sh -PREFIX=/opt/newcross/arm-cx2450x-linux-gnueabi/arm-cx2450x-linux-gnueabi/sys-root/usr +PREFIX=/opt/arm/arm-cx2450x-linux-gnueabi/arm-cx2450x-linux-gnueabi/sys-root/usr CCPATH= HOST=arm-cx2450x-linux-gnueabi @@ -27,5 +27,5 @@ export FREETYPE_CONFIG=$PREFIX/bin/freetype-config export CURL_CONFIG=$PREFIX/bin/curl-config ./autogen.sh -./configure --prefix=${PREFIX} --build=i386-pc-linux-gnu --host=$HOST --without-driver --with-target=cdk --with-targetprefix="" "$*" +./configure --prefix=${PREFIX} --build=i386-pc-linux-gnu --host=$HOST --enable-flac --with-target=cdk --with-targetprefix="" "$*" diff --git a/data/cables.xml b/data/cables.xml index 3ef2d5188..9bfecff6e 100644 --- a/data/cables.xml +++ b/data/cables.xml @@ -35,6 +35,7 @@ + @@ -259,6 +260,12 @@ + + + + + + @@ -1336,5 +1343,25 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/data/icons/0.png b/data/icons/0.png index aa4949c7e..8490ecb6e 100644 Binary files a/data/icons/0.png and b/data/icons/0.png differ diff --git a/data/icons/1.png b/data/icons/1.png index 65c367603..47e031617 100644 Binary files a/data/icons/1.png and b/data/icons/1.png differ diff --git a/data/icons/16_9.png b/data/icons/16_9.png index 88a69d13f..024bfc455 100644 Binary files a/data/icons/16_9.png and b/data/icons/16_9.png differ diff --git a/data/icons/16_9_gray.png b/data/icons/16_9_gray.png index 4798861bf..b7a9bc16c 100644 Binary files a/data/icons/16_9_gray.png and b/data/icons/16_9_gray.png differ diff --git a/data/icons/2.png b/data/icons/2.png index 604c347be..c6cc719fd 100644 Binary files a/data/icons/2.png and b/data/icons/2.png differ diff --git a/data/icons/3.png b/data/icons/3.png index 72ba927f2..822081187 100644 Binary files a/data/icons/3.png and b/data/icons/3.png differ diff --git a/data/icons/4.png b/data/icons/4.png index 1ba6041a5..a51841f3b 100644 Binary files a/data/icons/4.png and b/data/icons/4.png differ diff --git a/data/icons/5.png b/data/icons/5.png index 10e39c214..8bdf034e1 100644 Binary files a/data/icons/5.png and b/data/icons/5.png differ diff --git a/data/icons/6.png b/data/icons/6.png index d9e571973..3acb8fe3a 100644 Binary files a/data/icons/6.png and b/data/icons/6.png differ diff --git a/data/icons/7.png b/data/icons/7.png index 4cac8b0b9..1f0c4c834 100644 Binary files a/data/icons/7.png and b/data/icons/7.png differ diff --git a/data/icons/8.png b/data/icons/8.png index a1a5336dd..733a71ccd 100644 Binary files a/data/icons/8.png and b/data/icons/8.png differ diff --git a/data/icons/9.png b/data/icons/9.png index 50a5f5c9b..aa720fb5c 100644 Binary files a/data/icons/9.png and b/data/icons/9.png differ diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 5cdd35240..66dc9a37d 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -65,6 +65,48 @@ install_DATA = \ help.png \ help_small.png \ hidden.png \ + hint_aplay.png \ + hint_audio.png \ + hint_back.png \ + hint_bedit.png \ + hint_ci.png \ + hint_dboxinfo.png \ + hint_delete.png \ + hint_extended.png \ + hint_fileplay.png \ + hint_games.png \ + hint_hdd.png \ + hint_imageinfo.png \ + hint_inetradio.png \ + hint_info.png \ + hint_keys.png \ + hint_language.png \ + hint_manage.png \ + hint_media.png \ + hint_movie.png \ + hint_network.png \ + hint_osd.png \ + hint_personalize.png \ + hint_picview.png \ + hint_protection.png \ + hint_radiomode.png \ + hint_reboot.png \ + hint_recording.png \ + hint_reload.png \ + hint_save.png \ + hint_scan.png \ + hint_scripts.png \ + hint_service.png \ + hint_settings.png \ + hint_shutdown.png \ + hint_sleeptimer.png \ + hint_streaminfo.png \ + hint_swupdate.png \ + hint_timers.png \ + hint_tvmode.png \ + hint_tvradio_switch.png \ + hint_vfd.png \ + hint_video.png \ home.png \ hungarian.png \ icon_green.png \ diff --git a/data/icons/bayrisch.png b/data/icons/bayrisch.png index e3c1b08ac..f51b90332 100644 Binary files a/data/icons/bayrisch.png and b/data/icons/bayrisch.png differ diff --git a/data/icons/biss_green.png b/data/icons/biss_green.png index 1bfcacbad..c2a638b11 100644 Binary files a/data/icons/biss_green.png and b/data/icons/biss_green.png differ diff --git a/data/icons/biss_white.png b/data/icons/biss_white.png index 1da778c21..5aa76092e 100644 Binary files a/data/icons/biss_white.png and b/data/icons/biss_white.png differ diff --git a/data/icons/biss_yellow.png b/data/icons/biss_yellow.png index 492697dda..5da432e9d 100644 Binary files a/data/icons/biss_yellow.png and b/data/icons/biss_yellow.png differ diff --git a/data/icons/blau.png b/data/icons/blau.png index 23a2c17fc..247d5d542 100644 Binary files a/data/icons/blau.png and b/data/icons/blau.png differ diff --git a/data/icons/bosanski.png b/data/icons/bosanski.png index 65da04a03..a2566a8f3 100644 Binary files a/data/icons/bosanski.png and b/data/icons/bosanski.png differ diff --git a/data/icons/btn_record_active.png b/data/icons/btn_record_active.png index d0702a94a..68abcabfe 100644 Binary files a/data/icons/btn_record_active.png and b/data/icons/btn_record_active.png differ diff --git a/data/icons/btn_record_inactive.png b/data/icons/btn_record_inactive.png index 1c89e9eaa..bcb79cb8f 100644 Binary files a/data/icons/btn_record_inactive.png and b/data/icons/btn_record_inactive.png differ diff --git a/data/icons/btn_stop.png b/data/icons/btn_stop.png index 86a874de9..fa8ceeb6a 100644 Binary files a/data/icons/btn_stop.png and b/data/icons/btn_stop.png differ diff --git a/data/icons/ca2.png b/data/icons/ca2.png index d253c6e0d..eb6b3ab86 100644 Binary files a/data/icons/ca2.png and b/data/icons/ca2.png differ diff --git a/data/icons/ca2_gray.png b/data/icons/ca2_gray.png index d4c1a5f85..32ee51233 100644 Binary files a/data/icons/ca2_gray.png and b/data/icons/ca2_gray.png differ diff --git a/data/icons/ch-baslerdeutsch.png b/data/icons/ch-baslerdeutsch.png index 43b6af0b0..72cd3ab24 100644 Binary files a/data/icons/ch-baslerdeutsch.png and b/data/icons/ch-baslerdeutsch.png differ diff --git a/data/icons/ch-berndeutsch.png b/data/icons/ch-berndeutsch.png index 28062c3f3..20a6de8c7 100644 Binary files a/data/icons/ch-berndeutsch.png and b/data/icons/ch-berndeutsch.png differ diff --git a/data/icons/conax_green.png b/data/icons/conax_green.png index 9734b837f..174d39f76 100644 Binary files a/data/icons/conax_green.png and b/data/icons/conax_green.png differ diff --git a/data/icons/conax_white.png b/data/icons/conax_white.png index 020126d10..cb0d2f5b5 100644 Binary files a/data/icons/conax_white.png and b/data/icons/conax_white.png differ diff --git a/data/icons/conax_yellow.png b/data/icons/conax_yellow.png index 3a3c3c655..96c438bde 100644 Binary files a/data/icons/conax_yellow.png and b/data/icons/conax_yellow.png differ diff --git a/data/icons/cw_green.png b/data/icons/cw_green.png index 1d00a9e89..fa51f0b54 100644 Binary files a/data/icons/cw_green.png and b/data/icons/cw_green.png differ diff --git a/data/icons/cw_white.png b/data/icons/cw_white.png index 1b2305fb0..8fdaf67ec 100644 Binary files a/data/icons/cw_white.png and b/data/icons/cw_white.png differ diff --git a/data/icons/cw_yellow.png b/data/icons/cw_yellow.png index 290aba8ef..b994a058c 100644 Binary files a/data/icons/cw_yellow.png and b/data/icons/cw_yellow.png differ diff --git a/data/icons/d_green.png b/data/icons/d_green.png index e3f13b22e..65a22d430 100644 Binary files a/data/icons/d_green.png and b/data/icons/d_green.png differ diff --git a/data/icons/d_white.png b/data/icons/d_white.png index e24c4a270..c08707692 100644 Binary files a/data/icons/d_white.png and b/data/icons/d_white.png differ diff --git a/data/icons/d_yellow.png b/data/icons/d_yellow.png index e5bcc4f24..a2ff6a70e 100644 Binary files a/data/icons/d_yellow.png and b/data/icons/d_yellow.png differ diff --git a/data/icons/dd.png b/data/icons/dd.png index c7e9dfc39..fdbe8a184 100644 Binary files a/data/icons/dd.png and b/data/icons/dd.png differ diff --git a/data/icons/dd_avail.png b/data/icons/dd_avail.png index 5be78870f..ccef9ab69 100644 Binary files a/data/icons/dd_avail.png and b/data/icons/dd_avail.png differ diff --git a/data/icons/dd_gray.png b/data/icons/dd_gray.png index bf84d0999..57453ccc5 100644 Binary files a/data/icons/dd_gray.png and b/data/icons/dd_gray.png differ diff --git a/data/icons/ddfill.png b/data/icons/ddfill.png index 03fff6c4a..88e3fc272 100644 Binary files a/data/icons/ddfill.png and b/data/icons/ddfill.png differ diff --git a/data/icons/down.png b/data/icons/down.png index e718e29ee..db4ce2538 100644 Binary files a/data/icons/down.png and b/data/icons/down.png differ diff --git a/data/icons/dutch.png b/data/icons/dutch.png index 7dba570c5..4b317aaab 100644 Binary files a/data/icons/dutch.png and b/data/icons/dutch.png differ diff --git a/data/icons/ellinika.png b/data/icons/ellinika.png index b35e40669..9ab7b0c72 100644 Binary files a/data/icons/ellinika.png and b/data/icons/ellinika.png differ diff --git a/data/icons/english.png b/data/icons/english.png index 109a10816..c0d599e88 100644 Binary files a/data/icons/english.png and b/data/icons/english.png differ diff --git a/data/icons/features.png b/data/icons/features.png index aa4e7f961..a9f3056ed 100644 Binary files a/data/icons/features.png and b/data/icons/features.png differ diff --git a/data/icons/francais.png b/data/icons/francais.png index b7529f3ae..d918b6524 100644 Binary files a/data/icons/francais.png and b/data/icons/francais.png differ diff --git a/data/icons/french.png b/data/icons/french.png index b7529f3ae..d918b6524 100644 Binary files a/data/icons/french.png and b/data/icons/french.png differ diff --git a/data/icons/gelb.png b/data/icons/gelb.png index bdb580c2b..60d18c031 100644 Binary files a/data/icons/gelb.png and b/data/icons/gelb.png differ diff --git a/data/icons/gruen.png b/data/icons/gruen.png index 29747163d..70806cdd0 100644 Binary files a/data/icons/gruen.png and b/data/icons/gruen.png differ diff --git a/data/icons/help_small.png b/data/icons/help_small.png index 59be1d994..5610f6941 100644 Binary files a/data/icons/help_small.png and b/data/icons/help_small.png differ diff --git a/data/icons/hint_aplay.png b/data/icons/hint_aplay.png new file mode 100644 index 000000000..f49692a12 Binary files /dev/null and b/data/icons/hint_aplay.png differ diff --git a/data/icons/hint_audio.png b/data/icons/hint_audio.png new file mode 100644 index 000000000..011e3f033 Binary files /dev/null and b/data/icons/hint_audio.png differ diff --git a/data/icons/hint_back.png b/data/icons/hint_back.png new file mode 100644 index 000000000..42fecf16f Binary files /dev/null and b/data/icons/hint_back.png differ diff --git a/data/icons/hint_bedit.png b/data/icons/hint_bedit.png new file mode 100644 index 000000000..43c1eab7a Binary files /dev/null and b/data/icons/hint_bedit.png differ diff --git a/data/icons/hint_ci.png b/data/icons/hint_ci.png new file mode 100644 index 000000000..28512a0ce Binary files /dev/null and b/data/icons/hint_ci.png differ diff --git a/data/icons/hint_dboxinfo.png b/data/icons/hint_dboxinfo.png new file mode 100644 index 000000000..ca657788a Binary files /dev/null and b/data/icons/hint_dboxinfo.png differ diff --git a/data/icons/hint_delete.png b/data/icons/hint_delete.png new file mode 100644 index 000000000..aee392425 Binary files /dev/null and b/data/icons/hint_delete.png differ diff --git a/data/icons/hint_extended.png b/data/icons/hint_extended.png new file mode 100644 index 000000000..fc3e685ac Binary files /dev/null and b/data/icons/hint_extended.png differ diff --git a/data/icons/hint_fileplay.png b/data/icons/hint_fileplay.png new file mode 100644 index 000000000..3e5714bda Binary files /dev/null and b/data/icons/hint_fileplay.png differ diff --git a/data/icons/hint_games.png b/data/icons/hint_games.png new file mode 100644 index 000000000..21964b579 Binary files /dev/null and b/data/icons/hint_games.png differ diff --git a/data/icons/hint_hdd.png b/data/icons/hint_hdd.png new file mode 100644 index 000000000..de51810b2 Binary files /dev/null and b/data/icons/hint_hdd.png differ diff --git a/data/icons/hint_imageinfo.png b/data/icons/hint_imageinfo.png new file mode 100644 index 000000000..1c0e1ada2 Binary files /dev/null and b/data/icons/hint_imageinfo.png differ diff --git a/data/icons/hint_inetradio.png b/data/icons/hint_inetradio.png new file mode 100644 index 000000000..8d1d8561e Binary files /dev/null and b/data/icons/hint_inetradio.png differ diff --git a/data/icons/hint_info.png b/data/icons/hint_info.png new file mode 100644 index 000000000..3e1777aab Binary files /dev/null and b/data/icons/hint_info.png differ diff --git a/data/icons/hint_keys.png b/data/icons/hint_keys.png new file mode 100644 index 000000000..fd7b14fc8 Binary files /dev/null and b/data/icons/hint_keys.png differ diff --git a/data/icons/hint_language.png b/data/icons/hint_language.png new file mode 100644 index 000000000..1585e8237 Binary files /dev/null and b/data/icons/hint_language.png differ diff --git a/data/icons/hint_manage.png b/data/icons/hint_manage.png new file mode 100644 index 000000000..f40a4d3c5 Binary files /dev/null and b/data/icons/hint_manage.png differ diff --git a/data/icons/hint_media.png b/data/icons/hint_media.png new file mode 100644 index 000000000..8216861a7 Binary files /dev/null and b/data/icons/hint_media.png differ diff --git a/data/icons/hint_movie.png b/data/icons/hint_movie.png new file mode 100644 index 000000000..7c075a0b5 Binary files /dev/null and b/data/icons/hint_movie.png differ diff --git a/data/icons/hint_network.png b/data/icons/hint_network.png new file mode 100644 index 000000000..e45cbceb2 Binary files /dev/null and b/data/icons/hint_network.png differ diff --git a/data/icons/hint_osd.png b/data/icons/hint_osd.png new file mode 100644 index 000000000..cc22a0ebc Binary files /dev/null and b/data/icons/hint_osd.png differ diff --git a/data/icons/hint_personalize.png b/data/icons/hint_personalize.png new file mode 100644 index 000000000..10a6da125 Binary files /dev/null and b/data/icons/hint_personalize.png differ diff --git a/data/icons/hint_picview.png b/data/icons/hint_picview.png new file mode 100644 index 000000000..c397432e7 Binary files /dev/null and b/data/icons/hint_picview.png differ diff --git a/data/icons/hint_protection.png b/data/icons/hint_protection.png new file mode 100644 index 000000000..45b14fe1f Binary files /dev/null and b/data/icons/hint_protection.png differ diff --git a/data/icons/hint_radiomode.png b/data/icons/hint_radiomode.png new file mode 100644 index 000000000..e69d52330 Binary files /dev/null and b/data/icons/hint_radiomode.png differ diff --git a/data/icons/hint_reboot.png b/data/icons/hint_reboot.png new file mode 100644 index 000000000..530d6b2ed Binary files /dev/null and b/data/icons/hint_reboot.png differ diff --git a/data/icons/hint_recording.png b/data/icons/hint_recording.png new file mode 100644 index 000000000..06caf3dda Binary files /dev/null and b/data/icons/hint_recording.png differ diff --git a/data/icons/hint_reload.png b/data/icons/hint_reload.png new file mode 100644 index 000000000..28c4be4b7 Binary files /dev/null and b/data/icons/hint_reload.png differ diff --git a/data/icons/hint_save.png b/data/icons/hint_save.png new file mode 100644 index 000000000..a87f1bd3d Binary files /dev/null and b/data/icons/hint_save.png differ diff --git a/data/icons/hint_scan.png b/data/icons/hint_scan.png new file mode 100644 index 000000000..36f158538 Binary files /dev/null and b/data/icons/hint_scan.png differ diff --git a/data/icons/hint_scripts.png b/data/icons/hint_scripts.png new file mode 100644 index 000000000..73f9d07ff Binary files /dev/null and b/data/icons/hint_scripts.png differ diff --git a/data/icons/hint_service.png b/data/icons/hint_service.png new file mode 100644 index 000000000..019e0c622 Binary files /dev/null and b/data/icons/hint_service.png differ diff --git a/data/icons/hint_settings.png b/data/icons/hint_settings.png new file mode 100644 index 000000000..08c127fd0 Binary files /dev/null and b/data/icons/hint_settings.png differ diff --git a/data/icons/hint_shutdown.png b/data/icons/hint_shutdown.png new file mode 100644 index 000000000..85beb4d9a Binary files /dev/null and b/data/icons/hint_shutdown.png differ diff --git a/data/icons/hint_sleeptimer.png b/data/icons/hint_sleeptimer.png new file mode 100644 index 000000000..fa8827d9b Binary files /dev/null and b/data/icons/hint_sleeptimer.png differ diff --git a/data/icons/hint_streaminfo.png b/data/icons/hint_streaminfo.png new file mode 100644 index 000000000..7176488ed Binary files /dev/null and b/data/icons/hint_streaminfo.png differ diff --git a/data/icons/hint_swupdate.png b/data/icons/hint_swupdate.png new file mode 100644 index 000000000..0a44a44ec Binary files /dev/null and b/data/icons/hint_swupdate.png differ diff --git a/data/icons/hint_timers.png b/data/icons/hint_timers.png new file mode 100644 index 000000000..83263547b Binary files /dev/null and b/data/icons/hint_timers.png differ diff --git a/data/icons/hint_tvmode.png b/data/icons/hint_tvmode.png new file mode 100644 index 000000000..1af243c4e Binary files /dev/null and b/data/icons/hint_tvmode.png differ diff --git a/data/icons/hint_tvradio_switch.png b/data/icons/hint_tvradio_switch.png new file mode 100644 index 000000000..df84f62e2 Binary files /dev/null and b/data/icons/hint_tvradio_switch.png differ diff --git a/data/icons/hint_vfd.png b/data/icons/hint_vfd.png new file mode 100644 index 000000000..36d251fe7 Binary files /dev/null and b/data/icons/hint_vfd.png differ diff --git a/data/icons/hint_video.png b/data/icons/hint_video.png new file mode 100644 index 000000000..2bf44c01b Binary files /dev/null and b/data/icons/hint_video.png differ diff --git a/data/icons/hungarian.png b/data/icons/hungarian.png index b41feb509..683bc5a5f 100644 Binary files a/data/icons/hungarian.png and b/data/icons/hungarian.png differ diff --git a/data/icons/icon_blue.png b/data/icons/icon_blue.png index 472362c51..4c84e0bb3 100644 Binary files a/data/icons/icon_blue.png and b/data/icons/icon_blue.png differ diff --git a/data/icons/icon_green.png b/data/icons/icon_green.png index b1f073f65..5a0048fc7 100644 Binary files a/data/icons/icon_green.png and b/data/icons/icon_green.png differ diff --git a/data/icons/icon_movieplayer.png b/data/icons/icon_movieplayer.png index fa955d6b7..d116ff154 100644 Binary files a/data/icons/icon_movieplayer.png and b/data/icons/icon_movieplayer.png differ diff --git a/data/icons/icon_red.png b/data/icons/icon_red.png index 99319698e..5b473d464 100644 Binary files a/data/icons/icon_red.png and b/data/icons/icon_red.png differ diff --git a/data/icons/icon_yellow.png b/data/icons/icon_yellow.png index 237796a4b..7dee1f3b0 100644 Binary files a/data/icons/icon_yellow.png and b/data/icons/icon_yellow.png differ diff --git a/data/icons/info.png b/data/icons/info.png index 01acdecd8..712126aa2 100644 Binary files a/data/icons/info.png and b/data/icons/info.png differ diff --git a/data/icons/info_small.png b/data/icons/info_small.png index 91058600d..e7f76c991 100644 Binary files a/data/icons/info_small.png and b/data/icons/info_small.png differ diff --git a/data/icons/ird_green.png b/data/icons/ird_green.png index 7290baf97..27840a614 100644 Binary files a/data/icons/ird_green.png and b/data/icons/ird_green.png differ diff --git a/data/icons/ird_white.png b/data/icons/ird_white.png index 9b299caa6..ff5e521ae 100644 Binary files a/data/icons/ird_white.png and b/data/icons/ird_white.png differ diff --git a/data/icons/ird_yellow.png b/data/icons/ird_yellow.png index 1b21a5078..cc81a215a 100644 Binary files a/data/icons/ird_yellow.png and b/data/icons/ird_yellow.png differ diff --git a/data/icons/italiano.png b/data/icons/italiano.png index 965fca98f..e442d581e 100644 Binary files a/data/icons/italiano.png and b/data/icons/italiano.png differ diff --git a/data/icons/language.png b/data/icons/language.png index 41b0247b9..bbef95490 100644 Binary files a/data/icons/language.png and b/data/icons/language.png differ diff --git a/data/icons/left.png b/data/icons/left.png index 521c8be4e..504a1519b 100644 Binary files a/data/icons/left.png and b/data/icons/left.png differ diff --git a/data/icons/local.png b/data/icons/local.png index 76bb86970..19027c10e 100644 Binary files a/data/icons/local.png and b/data/icons/local.png differ diff --git a/data/icons/lock.png b/data/icons/lock.png index 868786dfd..318dd599d 100644 Binary files a/data/icons/lock.png and b/data/icons/lock.png differ diff --git a/data/icons/lock_passive.png b/data/icons/lock_passive.png index 4ec3bdc5f..7622dd82e 100644 Binary files a/data/icons/lock_passive.png and b/data/icons/lock_passive.png differ diff --git a/data/icons/mounted.png b/data/icons/mounted.png index 2274336f8..7be710bc9 100644 Binary files a/data/icons/mounted.png and b/data/icons/mounted.png differ diff --git a/data/icons/mp3-0.jpg b/data/icons/mp3-0.jpg index 73364958a..0bb50cb38 100644 Binary files a/data/icons/mp3-0.jpg and b/data/icons/mp3-0.jpg differ diff --git a/data/icons/mp3-1.jpg b/data/icons/mp3-1.jpg index e4826fde1..6c0294f90 100644 Binary files a/data/icons/mp3-1.jpg and b/data/icons/mp3-1.jpg differ diff --git a/data/icons/mp3-2.jpg b/data/icons/mp3-2.jpg index 079fb16df..ab1594883 100644 Binary files a/data/icons/mp3-2.jpg and b/data/icons/mp3-2.jpg differ diff --git a/data/icons/mp3-3.jpg b/data/icons/mp3-3.jpg index 420aa2324..eed32fede 100644 Binary files a/data/icons/mp3-3.jpg and b/data/icons/mp3-3.jpg differ diff --git a/data/icons/mp3-4.jpg b/data/icons/mp3-4.jpg index 5de37cf74..86ad3a372 100644 Binary files a/data/icons/mp3-4.jpg and b/data/icons/mp3-4.jpg differ diff --git a/data/icons/mp3-5.jpg b/data/icons/mp3-5.jpg index 1abefd2c2..3fa627a06 100644 Binary files a/data/icons/mp3-5.jpg and b/data/icons/mp3-5.jpg differ diff --git a/data/icons/mp3-6.jpg b/data/icons/mp3-6.jpg index 711ed9539..150aa866d 100644 Binary files a/data/icons/mp3-6.jpg and b/data/icons/mp3-6.jpg differ diff --git a/data/icons/mp3-7.jpg b/data/icons/mp3-7.jpg index 396af3556..c2bd4b5ed 100644 Binary files a/data/icons/mp3-7.jpg and b/data/icons/mp3-7.jpg differ diff --git a/data/icons/mp3.jpg b/data/icons/mp3.jpg index cb7979027..e7457c980 100644 Binary files a/data/icons/mp3.jpg and b/data/icons/mp3.jpg differ diff --git a/data/icons/mute_zap_gray.png b/data/icons/mute_zap_gray.png index 01325a527..9ba42bdcb 100644 Binary files a/data/icons/mute_zap_gray.png and b/data/icons/mute_zap_gray.png differ diff --git a/data/icons/mute_zap_green.png b/data/icons/mute_zap_green.png index df4575829..746ff165f 100644 Binary files a/data/icons/mute_zap_green.png and b/data/icons/mute_zap_green.png differ diff --git a/data/icons/nagra_green.png b/data/icons/nagra_green.png index 69b368374..7682759cb 100644 Binary files a/data/icons/nagra_green.png and b/data/icons/nagra_green.png differ diff --git a/data/icons/nagra_white.png b/data/icons/nagra_white.png index 1e7ffb135..917896a75 100644 Binary files a/data/icons/nagra_white.png and b/data/icons/nagra_white.png differ diff --git a/data/icons/nagra_yellow.png b/data/icons/nagra_yellow.png index 42500ec74..4fc908a32 100644 Binary files a/data/icons/nagra_yellow.png and b/data/icons/nagra_yellow.png differ diff --git a/data/icons/nederlands.png b/data/icons/nederlands.png index 109da2313..248996c3e 100644 Binary files a/data/icons/nederlands.png and b/data/icons/nederlands.png differ diff --git a/data/icons/norsk.png b/data/icons/norsk.png index a04427019..cfb143e7b 100644 Binary files a/data/icons/norsk.png and b/data/icons/norsk.png differ diff --git a/data/icons/not_mounted.png b/data/icons/not_mounted.png index abb294e0f..b394ba62b 100644 Binary files a/data/icons/not_mounted.png and b/data/icons/not_mounted.png differ diff --git a/data/icons/notyet.png b/data/icons/notyet.png index 314e33e28..c22f319c3 100644 Binary files a/data/icons/notyet.png and b/data/icons/notyet.png differ diff --git a/data/icons/numericpad.png b/data/icons/numericpad.png index 94b61c2b1..101b57842 100644 Binary files a/data/icons/numericpad.png and b/data/icons/numericpad.png differ diff --git a/data/icons/personalize.png b/data/icons/personalize.png index b067dbc06..4f9333ccc 100644 Binary files a/data/icons/personalize.png and b/data/icons/personalize.png differ diff --git a/data/icons/polski.png b/data/icons/polski.png index 2afcc3a2d..6e728b8c5 100644 Binary files a/data/icons/polski.png and b/data/icons/polski.png differ diff --git a/data/icons/portugues.png b/data/icons/portugues.png index 36b621e82..02065e92a 100644 Binary files a/data/icons/portugues.png and b/data/icons/portugues.png differ diff --git a/data/icons/power.png b/data/icons/power.png index 9520a99d5..2f7da6ae8 100644 Binary files a/data/icons/power.png and b/data/icons/power.png differ diff --git a/data/icons/powervu_green.png b/data/icons/powervu_green.png index 3fcfb7693..9380eea95 100644 Binary files a/data/icons/powervu_green.png and b/data/icons/powervu_green.png differ diff --git a/data/icons/powervu_white.png b/data/icons/powervu_white.png index 1d7eced5f..07c4c8d5a 100644 Binary files a/data/icons/powervu_white.png and b/data/icons/powervu_white.png differ diff --git a/data/icons/powervu_yellow.png b/data/icons/powervu_yellow.png index bda2b3f01..6e95a8d9c 100644 Binary files a/data/icons/powervu_yellow.png and b/data/icons/powervu_yellow.png differ diff --git a/data/icons/radio.jpg b/data/icons/radio.jpg index 0113c51ea..4a9072c53 100644 Binary files a/data/icons/radio.jpg and b/data/icons/radio.jpg differ diff --git a/data/icons/radiomode.jpg b/data/icons/radiomode.jpg index e09002e45..7dff6838e 100644 Binary files a/data/icons/radiomode.jpg and b/data/icons/radiomode.jpg differ diff --git a/data/icons/radiotextget.png b/data/icons/radiotextget.png index dae4678c8..7948c469d 100644 Binary files a/data/icons/radiotextget.png and b/data/icons/radiotextget.png differ diff --git a/data/icons/radiotextoff.png b/data/icons/radiotextoff.png index 22ceffa4e..e59953da0 100644 Binary files a/data/icons/radiotextoff.png and b/data/icons/radiotextoff.png differ diff --git a/data/icons/radiotextwait.png b/data/icons/radiotextwait.png index 6f05d463b..5bf8d6076 100644 Binary files a/data/icons/radiotextwait.png and b/data/icons/radiotextwait.png differ diff --git a/data/icons/rec_event_marker.png b/data/icons/rec_event_marker.png index 73eee96f8..b2d10d404 100644 Binary files a/data/icons/rec_event_marker.png and b/data/icons/rec_event_marker.png differ diff --git a/data/icons/res_000.png b/data/icons/res_000.png index e291a796c..0c69fd74a 100644 Binary files a/data/icons/res_000.png and b/data/icons/res_000.png differ diff --git a/data/icons/res_1080.png b/data/icons/res_1080.png index 08ff896c8..072c55929 100644 Binary files a/data/icons/res_1080.png and b/data/icons/res_1080.png differ diff --git a/data/icons/res_1280.png b/data/icons/res_1280.png index 3361714af..c75519a8d 100644 Binary files a/data/icons/res_1280.png and b/data/icons/res_1280.png differ diff --git a/data/icons/res_1440.png b/data/icons/res_1440.png index 1aca51873..cbddf2ea0 100644 Binary files a/data/icons/res_1440.png and b/data/icons/res_1440.png differ diff --git a/data/icons/res_1920.png b/data/icons/res_1920.png index d7dcf931a..34c4f819a 100644 Binary files a/data/icons/res_1920.png and b/data/icons/res_1920.png differ diff --git a/data/icons/res_288.png b/data/icons/res_288.png index aed89243a..48adf4762 100644 Binary files a/data/icons/res_288.png and b/data/icons/res_288.png differ diff --git a/data/icons/res_352.png b/data/icons/res_352.png index 8268baa2f..e4950b81e 100644 Binary files a/data/icons/res_352.png and b/data/icons/res_352.png differ diff --git a/data/icons/res_382.png b/data/icons/res_382.png index af33cb39e..4e546e7ca 100644 Binary files a/data/icons/res_382.png and b/data/icons/res_382.png differ diff --git a/data/icons/res_480.png b/data/icons/res_480.png index d256eb04b..7cb2c1bbc 100644 Binary files a/data/icons/res_480.png and b/data/icons/res_480.png differ diff --git a/data/icons/res_528.png b/data/icons/res_528.png index ef9575b3b..2efc99547 100644 Binary files a/data/icons/res_528.png and b/data/icons/res_528.png differ diff --git a/data/icons/res_544.png b/data/icons/res_544.png index 8159aac74..75c5338c0 100644 Binary files a/data/icons/res_544.png and b/data/icons/res_544.png differ diff --git a/data/icons/res_576.png b/data/icons/res_576.png index 5201da738..4e68aa9fd 100644 Binary files a/data/icons/res_576.png and b/data/icons/res_576.png differ diff --git a/data/icons/res_704.png b/data/icons/res_704.png index f13b1a52f..8d0069e86 100644 Binary files a/data/icons/res_704.png and b/data/icons/res_704.png differ diff --git a/data/icons/res_720.png b/data/icons/res_720.png index 329716fb9..e806d1d74 100644 Binary files a/data/icons/res_720.png and b/data/icons/res_720.png differ diff --git a/data/icons/right.png b/data/icons/right.png index 354fb8f1a..8b06d6bb1 100644 Binary files a/data/icons/right.png and b/data/icons/right.png differ diff --git a/data/icons/romania.png b/data/icons/romania.png index a079ca74b..99f0db0e6 100644 Binary files a/data/icons/romania.png and b/data/icons/romania.png differ diff --git a/data/icons/rot.png b/data/icons/rot.png index a835f4586..6b5acc916 100644 Binary files a/data/icons/rot.png and b/data/icons/rot.png differ diff --git a/data/icons/russkij.png b/data/icons/russkij.png index fffac38b7..caacac067 100644 Binary files a/data/icons/russkij.png and b/data/icons/russkij.png differ diff --git a/data/icons/scan.jpg b/data/icons/scan.jpg index c0309d561..e0c8faa95 100644 Binary files a/data/icons/scan.jpg and b/data/icons/scan.jpg differ diff --git a/data/icons/seca_green.png b/data/icons/seca_green.png index ae253b633..b71a9254b 100644 Binary files a/data/icons/seca_green.png and b/data/icons/seca_green.png differ diff --git a/data/icons/seca_white.png b/data/icons/seca_white.png index 416b65ce9..2ba599d03 100644 Binary files a/data/icons/seca_white.png and b/data/icons/seca_white.png differ diff --git a/data/icons/seca_yellow.png b/data/icons/seca_yellow.png index de6a2fc46..365111aa9 100644 Binary files a/data/icons/seca_yellow.png and b/data/icons/seca_yellow.png differ diff --git a/data/icons/softupdate.png b/data/icons/softupdate.png index e469f3494..83e0ed36e 100644 Binary files a/data/icons/softupdate.png and b/data/icons/softupdate.png differ diff --git a/data/icons/subt.png b/data/icons/subt.png index 33b0b0f2d..cf2cec1ab 100644 Binary files a/data/icons/subt.png and b/data/icons/subt.png differ diff --git a/data/icons/subt_gray.png b/data/icons/subt_gray.png index 581a52c08..71edc56c3 100644 Binary files a/data/icons/subt_gray.png and b/data/icons/subt_gray.png differ diff --git a/data/icons/suomi.png b/data/icons/suomi.png index 1a48e4dc3..98f064eb7 100644 Binary files a/data/icons/suomi.png and b/data/icons/suomi.png differ diff --git a/data/icons/svenska.png b/data/icons/svenska.png index b7c5f77ad..2711ed979 100644 Binary files a/data/icons/svenska.png and b/data/icons/svenska.png differ diff --git a/data/icons/tuner_1.png b/data/icons/tuner_1.png index 41cc06b5f..27f599886 100644 Binary files a/data/icons/tuner_1.png and b/data/icons/tuner_1.png differ diff --git a/data/icons/tuner_2.png b/data/icons/tuner_2.png index 7749a9993..af38d4ad8 100644 Binary files a/data/icons/tuner_2.png and b/data/icons/tuner_2.png differ diff --git a/data/icons/up.png b/data/icons/up.png index 7f92806ff..d18f6fa30 100644 Binary files a/data/icons/up.png and b/data/icons/up.png differ diff --git a/data/icons/upnp.png b/data/icons/upnp.png index 94ee9d5bd..872694601 100644 Binary files a/data/icons/upnp.png and b/data/icons/upnp.png differ diff --git a/data/icons/via_green.png b/data/icons/via_green.png index 5a3117f65..96423c79b 100644 Binary files a/data/icons/via_green.png and b/data/icons/via_green.png differ diff --git a/data/icons/via_white.png b/data/icons/via_white.png index ed2529236..c0b0a7d2b 100644 Binary files a/data/icons/via_white.png and b/data/icons/via_white.png differ diff --git a/data/icons/via_yellow.png b/data/icons/via_yellow.png index 72674b085..7234c6ee6 100644 Binary files a/data/icons/via_yellow.png and b/data/icons/via_yellow.png differ diff --git a/data/icons/volume.png b/data/icons/volume.png index c03406665..985a013ea 100644 Binary files a/data/icons/volume.png and b/data/icons/volume.png differ diff --git a/data/icons/volumebody.png b/data/icons/volumebody.png index c921998b3..3ba8dd13e 100644 Binary files a/data/icons/volumebody.png and b/data/icons/volumebody.png differ diff --git a/data/icons/volumeslider2.png b/data/icons/volumeslider2.png index 4e88bd0e9..051915adb 100644 Binary files a/data/icons/volumeslider2.png and b/data/icons/volumeslider2.png differ diff --git a/data/icons/volumeslider2alpha.png b/data/icons/volumeslider2alpha.png index 09db880eb..5916c9084 100644 Binary files a/data/icons/volumeslider2alpha.png and b/data/icons/volumeslider2alpha.png differ diff --git a/data/icons/volumeslider2blue.png b/data/icons/volumeslider2blue.png index 624922582..a8ac4394a 100644 Binary files a/data/icons/volumeslider2blue.png and b/data/icons/volumeslider2blue.png differ diff --git a/data/icons/volumeslider2green.png b/data/icons/volumeslider2green.png index 45cc36f84..5c53fc879 100644 Binary files a/data/icons/volumeslider2green.png and b/data/icons/volumeslider2green.png differ diff --git a/data/icons/volumeslider2red.png b/data/icons/volumeslider2red.png index 7055d87be..3a929c202 100644 Binary files a/data/icons/volumeslider2red.png and b/data/icons/volumeslider2red.png differ diff --git a/data/icons/vtxt.png b/data/icons/vtxt.png index 23c84645c..30902f56a 100644 Binary files a/data/icons/vtxt.png and b/data/icons/vtxt.png differ diff --git a/data/icons/vtxt_gray.png b/data/icons/vtxt_gray.png index 128c14c24..11e12e1e6 100644 Binary files a/data/icons/vtxt_gray.png and b/data/icons/vtxt_gray.png differ diff --git a/data/icons/x_green.png b/data/icons/x_green.png index babb51ee0..6eff02b8c 100644 Binary files a/data/icons/x_green.png and b/data/icons/x_green.png differ diff --git a/data/icons/x_white.png b/data/icons/x_white.png index 827901bfb..ab3bbdd74 100644 Binary files a/data/icons/x_white.png and b/data/icons/x_white.png differ diff --git a/data/icons/x_yellow.png b/data/icons/x_yellow.png index 5ef02b578..39843e345 100644 Binary files a/data/icons/x_yellow.png and b/data/icons/x_yellow.png differ diff --git a/data/lcd/icons/lcd2.png b/data/lcd/icons/lcd2.png index 27c8a4ee7..47baf5153 100644 Binary files a/data/lcd/icons/lcd2.png and b/data/lcd/icons/lcd2.png differ diff --git a/data/lcd/icons/power.png b/data/lcd/icons/power.png index a3667e75c..7f331916a 100644 Binary files a/data/lcd/icons/power.png and b/data/lcd/icons/power.png differ diff --git a/data/locale/Makefile.am b/data/locale/Makefile.am index dde025d60..50d9e1356 100644 --- a/data/locale/Makefile.am +++ b/data/locale/Makefile.am @@ -21,28 +21,35 @@ install_DATA = \ if MAINTAINER_MODE -locals: locals.h locals_intern.h +locals: sort-locals locals.h locals_intern.h install-locals -ordercheck: deutsch.locale - cut -d' ' -f1 deutsch.locale | LC_ALL=C sort | uniq > /tmp/log - cut -d' ' -f1 deutsch.locale | uniq | diff - /tmp/log || \ +sort-locals: $(top_srcdir)/data/locale/deutsch.locale $(top_srcdir)/data/locale/english.locale + cat $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq > deutsch.locale + cat $(top_srcdir)/data/locale/english.locale | LC_ALL=C sort | uniq > english.locale + cp -f deutsch.locale english.locale $(top_srcdir)/data/locale + +ordercheck: $(top_srcdir)/data/locale/deutsch.locale + cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq > /tmp/log + cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | uniq | diff - /tmp/log || \ (echo "ERROR: deutsch.locale not ordered or contains empty lines" && false) -locals.h: ordercheck deutsch.locale - cut -d' ' -f1 deutsch.locale | LC_ALL=C sort | uniq | tr [:lower:] [:upper:] | tr \. \_ | tr \- \_ | tr -d \? | ./create.locals.h +locals.h: ordercheck $(top_srcdir)/data/locale/deutsch.locale + cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq | tr [:lower:] [:upper:] | tr \. \_ | tr \- \_ | tr -d \? | $(top_srcdir)/data/locale/create.locals.h -locals_intern.h: ordercheck deutsch.locale - cut -d' ' -f1 deutsch.locale | LC_ALL=C sort | uniq | ./create.locals_intern.h +locals_intern.h: ordercheck $(top_srcdir)/data/locale/deutsch.locale + cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq | $(top_srcdir)/data/locale/create.locals_intern.h check: locals.h locals_intern.h - diff locals.h ../../src/system - diff locals_intern.h ../../src/system + diff locals.h $(top_srcdir)/src/system + diff locals_intern.h $(top_srcdir)/src/system install-locals: locals.h locals_intern.h - cp locals.h locals_intern.h ../../src/system - @echo "Consider committing .../neutrino/src/system/[locals.h,locals_intern.h]" + cp locals.h locals_intern.h $(top_srcdir)/src/system + @echo "Consider committing src/system/[locals.h,locals_intern.h]" + cp -f deutsch.locale english.locale $(top_srcdir)/data/locale + @echo "Consider committing data/locale/[deutsch.locale,english.locale]" locals-clean: - rm -f locals.h locals_intern.h + rm -f locals.h locals_intern.h deutsch.locale english.locale endif diff --git a/data/locale/_readme.txt b/data/locale/_readme.txt index 97044e9d4..cd4366866 100644 --- a/data/locale/_readme.txt +++ b/data/locale/_readme.txt @@ -28,36 +28,35 @@ How do I add a new locale string? --------------------------------- 1.) First of all, add the new string to deutsch.locale while preserving -the ordering. Do not add any empty lines. Use `make ordercheck' to for -verification. +the ordering. Do not add any empty lines. 2.) -Enter the directory apps/tuxbox/neutrino/data/locale. +Enter the directory build_tmp/neutrino-hd/data/locale. 3.) -Create new versions of the files apps/tuxbox/neutrino/src/system/locals.h -and apps/tuxbox/neutrino/src/system/locals_intern.h -using the command `make locals.h locals_intern.h'. +Use for sorting (deutsch.locale,english.locale) 'make sort-locals', use 'make ordercheck' to for +verification. 4.) -Check the modifications with `make check', or with -diff locals.h ../../src/system/locals.h -diff locals_intern.h ../../src/system/locals_intern.h +Create new versions of the files src/system/locals.h and src/system/locals_intern.h +using the command 'make locals.h locals_intern.h'. 5.) -Copy the replacement file to their destination with `make install-locals', -or with -cp -p locals.h ../../src/system/locals.h -cp -p locals_intern.h ../../src/system/locals_intern.h +Check the modifications with 'make check' 6.) +Copy the replacement file to their destination with 'make install-locals' + +7.) +Or use for item 3-6 'make locals' + +8.) To the extent possible, update other locale file. For this, the Perl-script create-locals-update.pl may be useful. -7.) -If committing the changes to CVS, commit both the involved -locale-files, apps/tuxbox/neutrino/src/system/locals.h, and -as apps/tuxbox/neutrino/src/system/locals_intern.h. +9.) +If committing the changes to Git, commit both the involved +locale-files, src/system/locals.h, and src/system/locals_intern.h. Useful tools: ------------- diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index ecf5dde3f..d3ab0e772 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -113,7 +113,7 @@ audiomenu.avsync A/V sync audiomenu.avsync_am Audio master audiomenu.clockrec audiomenu.dolbydigital DD-Unterkanal automatisch -audiomenu.hdmi_dd DolbyDigital über HDMI +audiomenu.hdmi_dd Dolby Digital über HDMI audiomenu.hdmi_dd_auto automatisch audiomenu.hdmi_dd_force erzwingen audiomenu.monoleft mono links @@ -123,8 +123,9 @@ audiomenu.pref_lang_head Tonwahl audiomenu.pref_languages Bevorzugte Sprachen audiomenu.pref_subs Sprache audiomenu.pref_subs_head Untertitelwahl -audiomenu.spdif_dd DolbyDigital über S/PDIF +audiomenu.spdif_dd Dolby Digital über S/PDIF audiomenu.stereo stereo +audiomenu.volume_adjust Lautstärke ändern, in % audiomenu.volume_step Lautstärke Schrittweite audioplayer.add Hinzufügen audioplayer.add_ic Icecast @@ -259,7 +260,7 @@ colormenusetup.menucontent Fensterinhalt colormenusetup.menucontent_inactive Fensterinhalt deaktiviert colormenusetup.menucontent_selected Fensterinhalt selektiert colormenusetup.menuhead Titelleiste -colorstatusbar.text Statusbalken +colorstatusbar.text Infobar colorthememenu.head Theme auswählen colorthememenu.head2 Themes laden colorthememenu.name Themename @@ -291,6 +292,7 @@ date.Sun So date.Thu Do date.Tue Di date.Wed Mi +epg.saving Speichere EPG epgextended.actors Darsteller epgextended.director Regie epgextended.guests Gäste @@ -299,6 +301,7 @@ epgextended.presenter Moderator epgextended.year_of_production Produktionsjahr epglist.noevents Keine EPG-Information verfügbar. epgviewer.More_Screenings Weitere Termine auf diesem Kanal +epgviewer.More_Screenings_short Weitere Termine epgviewer.nodetailed Keine ausführlichen Informationen verfügbar epgviewer.notfound Keine Programminformationen (EPG) gefunden eventfinder.head EPG-Suche @@ -391,6 +394,7 @@ extra.tp_pol_r R extra.tp_rate Symbolrate extra.update_dir Lokales Update-Verzeichnis extra.use_gotoxx Benutze gotoXX +extra.volume_digits Lautstärkeanzeige Ziffern extra.volume_pos Lautstärkeanzeige extra.west Westen extra.zap_cycle Zap nur in Bouquet @@ -434,7 +438,8 @@ filesystem.is.utf8.option.utf8 UTF-8 flashupdate.actionreadflash lese Flash flashupdate.cantopenfile kann Datei nicht öffnen flashupdate.cantopenmtd kann das MTD-Device nicht öffnen -flashupdate.checkupdate Nach Updates suchen +flashupdate.checkupdate_internet Online nach Updates suchen +flashupdate.checkupdate_local Lokales Update flashupdate.currentversion_sep Installierte Version flashupdate.currentversiondate Datum flashupdate.currentversiontime Uhrzeit @@ -521,6 +526,7 @@ fontsize.infobar_info Info fontsize.infobar_number Nummer fontsize.infobar_small Klein fontsize.menu Menütext +fontsize.menu_hint Menü-Hilfe fontsize.menu_info Menüinfo fontsize.menu_title Menütitel hdd_10min 10 min. @@ -605,7 +611,7 @@ keybindingmenu.poweroff Standby EIN/AUS keybindingmenu.quickzap Schnellumschaltung keybindingmenu.remotecontrol_hardware Hardware keybindingmenu.remotecontrol_hardware_coolstream Coolstream -keybindingmenu.remotecontrol_hardware_dbox d-box Nokia (alt) +keybindingmenu.remotecontrol_hardware_dbox DBox Nokia (alt) keybindingmenu.remotecontrol_hardware_msg_part1 Die Fernbedienung wurde von ' keybindingmenu.remotecontrol_hardware_msg_part2 ' auf ' keybindingmenu.remotecontrol_hardware_msg_part3 ' geändert.\nIst dies korrekt?\nBitte die Auswahl innerhalb 15 Sekunden mit der neuen Fernbedienung\nbestätigen. Ansonsten wird die Auswahl zurückgesetzt. @@ -687,6 +693,377 @@ mainsettings.timezone Zeitzone mainsettings.video Video menu.back Zurück menu.cancel Abbrechen +menu.hint_a_pic Konfigurieren Sie den Audioplayer und Bildbetrachter +menu.hint_aplay Audioplayer +menu.hint_audio Audio-Ausgang, Dolby Digital\nund SRS True Volume Optionen +menu.hint_audio_analog_mode Hier wird festgelegt, ob auf dem analogen Ausgang ein Stereo-,\nMono-Links- oder Mono-Rechts-Signal ausgegeben werden soll +menu.hint_audio_avsync Diese Funktion synchronisiert Bild und Ton +menu.hint_audio_dd Ist diese Option auf ein, wird automatisch auf Dolby Digital Ton\numgeschaltet, sobald dieser bei einem Sender verfügbar ist +menu.hint_audio_hdmi_dd Bei aktiver Option wird über den HDMI-Ausgang\nDolby Digital Ton ausgegeben +menu.hint_audio_spdif_dd Bei aktiver Option wird über den optischen Ausgang\n(S/PDIF) Dolby Digital Ton ausgegeben +menu.hint_audio_srs Hier wird SRS TruVolume an oder abgeschaltet\nbei inhaltlichen Änderungen +menu.hint_audio_srs_algo Mögliche Betriebsarten, einfach oder normal +menu.hint_audio_srs_nmgr Schaltet diese Option an oder aus +menu.hint_audio_srs_volume Hier kann die Referenzlautstärke festgelegt werden +menu.hint_audio_volstep Beim Betätigen der Lautstärketasten wird die Lautstärke\nimmer schrittweise nach diesen Wert geändert +menu.hint_audioplayer_defdir Hier wählen Sie das Startverzeichnis für den Audioplayer +menu.hint_audioplayer_follow Das Selektieren eines aktuellen Titel in der Playliste zulassen +menu.hint_audioplayer_highprio Erhöhen Sie die Priorität der Wiedergabe +menu.hint_audioplayer_order Ändern der Playlist-Sortierreihenfolge +menu.hint_audioplayer_playlist Aktiviert die Anzeige der Titel in der Playliste +menu.hint_audioplayer_repeat Aktiviert die Wiederholung der Playliste,\nwenn das Ende der Liste erreicht ist +menu.hint_audioplayer_sc_metadata Aktiviert das Anzeigen der Audio-Metadaten +menu.hint_audioplayer_screensaver Aktiviert den Bildschirmschoner in Minuten +menu.hint_audioplayer_title Aktivieren Sie die Titelsuche (SMS-Stil) in der Playliste +menu.hint_auto_lang Hier können Sie wählen, ob automatisch Ihre bevorzugte Tonspur gewählt wird,\nwenn vorhanden +menu.hint_auto_subs Automatische Anzeige der Untertitel in Ihrer bevorzugten Sprache +menu.hint_back Zurück zum vorherigen Menü,\ndrücken der Menütaste schließt alle Menüs +menu.hint_backup Sichern von Konfigurationen und Kanallisten +menu.hint_bedit Bearbeiten der Favoriten und der Bouquets +menu.hint_bigwindows EPG Informationen werden immer im großen Fenster angezeigt,\ndies erreichen Sie auch mit der 'Info' Taste +menu.hint_cache_txt Startet das Zwischenspeichern des Teletext nach\nKanalwechsel +menu.hint_cec_mode CEC-Modus +menu.hint_cec_standby CEC-Standby +menu.hint_cec_view_on CEC view ON +menu.hint_channellist_colored Definiert ob die aktuelle oder nächste Sendung in einer anderen Farbe dargestellt werden soll +menu.hint_channellist_epg_align Hier kann man festlegen, wie der Text für das EPG in der Liste\nrechts vom Programmnamen ausgerichtet wird +menu.hint_channellist_extended Bei aktivierter Funktion wird vor dem Sendernamen ein Balken eingeblendet,\nder den Sendungsfortschritt anzeigt +menu.hint_channellist_fonts Ändern Sie in der Kanalliste die Schriftgrößen +menu.hint_channellist_foot Definiert welche Informationen im unteren Sendungsfenster angezeigt werden sollen +menu.hint_channellist_setup Hier können Sie Anzeigeoptionen für die Kanalliste auswählen +menu.hint_ci Conditional-Access-Menü zum Einrichten\nIhres CI-Moduls oder der eingebetteten Conax-Karte +menu.hint_colors Konfigurieren Sie die Menü-Farben +menu.hint_content_back Ändern Sie die Hintergrundfarbe für den Fensterinhalt +menu.hint_content_textcolor Ändern Sie die Textfarbe für den Fensterinhalt +menu.hint_contrast_fonts Wählen Sie mehr Schriftkontrast (absetzen vom Hintergrund) +menu.hint_dboxinfo Informationen über CPU und Arbeitsspeicher der Box +menu.hint_delete_channels Löschen aller Kanäle +menu.hint_epg_cache Maximum in Tagen zukünftiger EPG-Daten +menu.hint_epg_dir Speicherverzeichnis auf der Festplatte oder einen USB-Stick\nzum speichern von EPG-Daten +menu.hint_epg_extendedcache Maximum in Stunden, die die EPG-Daten zwischengespeichert\nwerden bzw. der Event-Beschreibungen +menu.hint_epg_fonts Ändern Sie für die EPG-Details die Schriftgrößen +menu.hint_epg_max_events Maximum an Events im Zwischenspeicher. Nach Erreichen der\nGrenze werden EPG-Daten für zukünftige gelöscht +menu.hint_epg_old_events EPG im Speicher behalten in Stunden,\nauch wenn es veraltet ist +menu.hint_epg_save Speichert die EPG-Daten auf einer Harddisk oder USB-Stick\nund läd es nach einen Neustart +menu.hint_event_textcolor Ändern Sie die Event-Farbe für farbige Event-Optionen in Kanalliste und Infobar +menu.hint_eventlist_fonts Ändern Sie in der Event-Liste die Schriftgrößen +menu.hint_extended Energiespar-, EPG-Speicher- / Lade-Optionen,\nHDMI-CEC, Startkanal, Zap-Optionen +menu.hint_factory Zurücksetzen der Box auf Werkseinstellungen\nBox wird nach einem Reset neu gestartet +menu.hint_fade Bei aktivierter Funktion werden die Menüfenster\n'weich' ein- bzw. ausgeblendet +menu.hint_fan_speed Steuerung der Lüftergeschwindigkeit für die CPU +menu.hint_filebrowser_denydirectoryleave Verhindert das Verlassen des Startverzeichnisses +menu.hint_filebrowser_showrights Anzeige der Dateirechte der Dateien im Filebrowser +menu.hint_fileplay Spielen Sie verschiedene Video-Dateien +menu.hint_filesystem_is_utf8 Kodierung für Unicode-Zeichen im Filebrowser +menu.hint_font_gui Wählen Sie die Schriftart aus Schriftart-Dateien, um diese für die Menüs zu verwenden +menu.hint_font_scaling Legen Sie global die vertikale und horizontale Skalierung der Menüschrift fest +menu.hint_font_ttx Wählen Sie Schriftart aus Schriftart-Dateien, um diese für den Teletext zu verwenden +menu.hint_fonts Konfigurieren Sie die Menü-Schriftart und Schriftgrößen +menu.hint_gamelist_fonts Ändern Sie für die Spiele- und Script-Liste die Schriftgrößen +menu.hint_games Zeige Liste der installierten Spiele +menu.hint_hdd Formatierung und Prüfung der Festplatte +menu.hint_hdd_apply Die veränderten Einstellungen zum Sleep- und Akustik-Modus werden übernommen +menu.hint_hdd_check Überprüft das Dateisystem und führt gegebenfalls eine Reparatur durch (fsck) +menu.hint_hdd_format Erstellt eine HDD-Partition und formatiert diese +menu.hint_hdd_noise Hier können Parameter für Automatic Acoustic Management gesetzt werden,\nnicht alle Laufwerke unterstützen diese Funktion +menu.hint_hdd_sleep Dieser Wert definiert nach wie viel Minuten die Festplatte bei Inaktivität in den Sleep-Modus geschaltet wird +menu.hint_hdd_tools Hier können Sie die gefundenen Festplatten formatieren bzw. das Dateisystem überprüfen +menu.hint_head_back Ändern Sie die Titel-Hintergrundfarbe +menu.hint_head_textcolor Ändern Sie die Titel-Textfarbe +menu.hint_imageinfo Informationen über die installierte Software +menu.hint_inact_timer Ausschalten der Box nach Inaktivität in Minuten,\ndie Box geht automatisch in den Deep-Standby +menu.hint_inactive_back Ändern Sie die Hintergrundfarbe für deaktivierte Fensterinhalte +menu.hint_inactive_textcolor Ändern Sie die Textfarbe für deaktivierte Fensterinhalte +menu.hint_inet_radio Internetradio +menu.hint_info Informationen über Image, CPU und Arbeitsspeicher,\nStream-Information +menu.hint_infobar_back Ändern Sie die Hintergrundfarbe für die Infobar +menu.hint_infobar_casys ein: zeigt alle Aktiven farbig, Mini: einzelnes Symbol ob gespeert, Diskret: alle Aktiven CA-Systeme +menu.hint_infobar_colored_event Verwenden Sie unterschiedliche Farben für die aktuelle oder nächste Sendung in der Infobar +menu.hint_infobar_dd Zeigt ein Dolby Digital Icon bei Verfügbarkeit +menu.hint_infobar_filesys Zeigen den vom Flash- und einer HDD verwendeten Speicherplatz +menu.hint_infobar_fonts Ändern Sie in der Infobar die Schriftgrößen +menu.hint_infobar_logo Logo- und Signal-Optionen +menu.hint_infobar_logo_dir Hier wählen Sie das Verzeichnis für die Senderlogos +menu.hint_infobar_on_epg Zeigt einen Hinweis bei EPG-Änderungen +menu.hint_infobar_radiotext Zeigt Radiotext in einen Fenster, wenn verfügbar +menu.hint_infobar_res Zeige die gesendete Auflösung in Symbolen +menu.hint_infobar_sat Zeigt die aktuellen Satelliten- oder Kabel-Provider +menu.hint_infobar_setup Hier können Sie die Anzeigeoptionen für die Infobar auswählen +menu.hint_infobar_textcolor Ändern Sie die Textfarbe für die Infobar +menu.hint_infobar_tuner Zeigt den aktiven Tuner als Nummernicon +menu.hint_keep_numbers Mit der Aktivierung werden den Sendern feste/dauerhafte\nKanalnummern zugewiesen +menu.hint_key_addrecord Weisen Sie eine Taste für das starten und makieren von Aufnahmen im EPG zu +menu.hint_key_addremind Weisen Sie eine Taste für das Umschalten im EPG über den Timer zu +menu.hint_key_audio ein: 'Audio' Taste startet das Audioplayer-Menü\naus: 'Audio' Taste startet die Auswahl der Tonspuren +menu.hint_key_binding In diesem Menü können Einstellungen für die Tasten der Fernbedienung angepasst werden +menu.hint_key_bouquetdown Weisen Sie eine Taste für das zurückblättern in den Bouquet zu +menu.hint_key_bouquetup Weisen Sie eine Taste für das vorblättern in den Bouquet zu +menu.hint_key_cancel Weisen Sie eine Taste für das schließen der Menüe zu +menu.hint_key_channel_sms Wenn es aktiviert ist, können Sie die Nummern-Tasten in der Kanalliste nutzen,\num im SMS-Style zu suchen +menu.hint_key_channeldown Weisen Sie eine Taste für das runterschalten in der Kanalliste zu +menu.hint_key_channellist Konfigurieren Sie die Tastenbelegung für die Kanalliste +menu.hint_key_channelup Weisen Sie eine Taste für das hochschalten in der Kanalliste zu +menu.hint_key_hardware Hier wird definiert welchen Fernbedienungstyp Sie verwenden möchten,\ndie Bestätigung erfolgt mit der Ausgewählten +menu.hint_key_history Hier können Sie eine Taste für das Anzeigen der letzten Programme,\ndie Sie schauten definieren (History-Liste) +menu.hint_key_lastchannel Hier können Sie eine Taste definieren, der in den letzten Kanal zurückschaltet aus der History-Liste +menu.hint_key_left_exit Weisen Sie der 'links' Taste für das wechseln in den Menüe zu +menu.hint_key_list_end Weisen Sie eine Taste für den Wechsel zum 'Listenende' zu +menu.hint_key_list_start Weisen Sie eine Taste für den Wechsel zum 'Listenanfang' zu +menu.hint_key_load Laden Sie definierte Tastenbelegungen aus einer Datei +menu.hint_key_modechange Wählen Sie eine Taste für den wechseln in den TV/Radio Modus und für den Standby +menu.hint_key_movieplayer Konfigurieren Sie die Tastenbelegung für den Movieplayer +menu.hint_key_mpaudio Weisen Sie eine Taste zu um die Tonspuren in ihren Aufnahmen zu wechseln +menu.hint_key_mpbookmark Weisen Sie eine Taste um 'Merker' in ihren Aufnahmen für den Neustart zu setzen +menu.hint_key_mpforward Weisen Sie eine Taste zum vorspulen in ihren Aufnahmen zu +menu.hint_key_mppause Weisen Sie eine Taste zum pausieren der Wiedergabe zu +menu.hint_key_mpplay Weisen Sie eine Taste zu, um die Wiedergabe zu starten +menu.hint_key_mpplugin Weisen Sie eine Taste zu um ein Plugin zu starten,\nwenn ihre Wiedergabe läuft +menu.hint_key_mprewind Weisen Sie eine Taste zum zurückspulen in ihren Aufnahmen zu +menu.hint_key_mpstop Weisen Sie eine Taste zum beenden der Wiedergabe zu +menu.hint_key_mptime Weisen Sie eine Taste für die Zeitanzeige in ihren Aufnahmen zu,\nSpielzeit und verbleibene Zeit +menu.hint_key_mptimeshift Weisen Sie eine Taste für das starten von Timeshift zu +menu.hint_key_pagedown Weisen Sie eine Taste für 'Seite weiter' zu +menu.hint_key_pageup Weisen Sie eine Taste für 'Seite zurück' zu +menu.hint_key_poweroff Wählen Sie eine Taste für den Standby\nund für das Verhalten für Standby und Deep-Standby +menu.hint_key_quickzap Konfigurieren Sie die Tastenbelegung für die Schnellumschaltung +menu.hint_key_repeatblock Die Verzögerung nach Tastendruck,\nauf den die Box reagieren soll +menu.hint_key_repeatblockgeneric Die Verzögerung zwischen Tastewiederholungen,\nauf die die Box reagieren soll +menu.hint_key_right Wählen Sie die Funktion für die 'links/rechts' Tasten aus im TV/Radio Modus +menu.hint_key_save Speichern Sie Tastenbelegungen als Datei in einer Config +menu.hint_key_screenshot Weisen Sie eine Taste zu, um Menü- und/oder TV-Screenshots zu speichern +menu.hint_key_sort Weisen Sie eine Taste für das sortieren in der Kanalliste zu +menu.hint_key_subchanneldown Weisen Sie eine Taste für das zurückschalten in den Unterkanälen zu +menu.hint_key_subchannelup Weisen Sie eine Taste für das weiterschalten in den Unterkanälen zu +menu.hint_key_transponder Weisen Sie eine Taste für das Anzeigen der Transponder in der Kanalliste zu +menu.hint_key_tvradiomode Wählen Sie eine Taste für das umschalten zwischen TV <> Radio Modus +menu.hint_key_unlock Weisen Sie eine Taste zum entriegeln zu,\nbetätigen Sie die 'rote' Taste und diese für 5 Sekunden +menu.hint_keys Fernbedienungs-Wiederholrate\nund Tastenbelegungen bearbeiten +menu.hint_lang_pref Wählen Sie ihre bevorzugten Audio-Sprachen, EPG\nund Untertitel-Sprachen +menu.hint_language OSD Sprache, Zeitzone\nbevorzugte Audio und Untertitel Sprachen +menu.hint_last_radio In dieser Menüzeile kann der gewünschte\nStart-Radio-Sender eingestellt werden +menu.hint_last_tv In dieser Menüzeile kann der gewünschte\nStart-TV-Sender eingestellt werden +menu.hint_last_use Speichert den aktuellen Kanal beim Herunterfahren der Box +menu.hint_leds_blink Die Power-LEDs blinken, wenn sich der Receiver\nim Deep-Standby befindet und ein Timer aktiv ist +menu.hint_leds_deepstandby Definiert den Status der Power-LEDs im Deep-Standby +menu.hint_leds_record Definiert ob die Power-LEDs blinken,\nwenn eine Aufnahme aktiv ist +menu.hint_leds_standby Definiert den Status der Power-LEDs im Standby +menu.hint_leds_tv Definiert den Status der Power-LEDs im TV-Betrieb +menu.hint_load Laden der Neutrino-HD-Einstellungen aus einer Datei +menu.hint_make_hdlist Bei aktiver Option wird ein Bouquet namens 'HD' erzeugt\nin dem alle HD Sender zusammengefasst sind +menu.hint_make_newlist Nach einer Kanalsuche wird ein Bouquet namens\n'neue Kanäle' erzeugt +menu.hint_make_removedlist Nach einer Kanalsuche wird ein Bouquet namens\n'gelöschte Kanäle' erzeugt +menu.hint_manage_settings Sichern, Wiederherstellen, zurück auf\nStandardwerte, Auslieferungszustand herstellen +menu.hint_mb Ihre Aufnahmen +menu.hint_media Abspielen von Filmen, Audiodateien\nbetrachten Sie Bilder +menu.hint_menu_fonts Ändern Sie im Menü die Schriftgrößen +menu.hint_menu_hints Zeigt Ihnen Hinweise zu den Menüpunkten an,\nbei Deaktivierung erreichen Sie es jederzeit auch mit der Taste 'Hilfe' +menu.hint_menu_pos Hier können Sie die Anzeigeposition der OSD-Menüs festlegen +menu.hint_misc_cec HDMI-CEC Optionen +menu.hint_misc_channellist Erweiterte Einstellungen für die Kanallisten\nZappingeinstellungen +menu.hint_misc_energy Energie- und Softstandby-Optionen, verzögertes Ausschalten\nsetzen bzw. ändern des Inaktivitätstimers +menu.hint_misc_epg EPG Sicherrungs- und Ladenoptionen, EPG-Einstellungen\nSicherungsverzeichnis für EPG-Daten +menu.hint_misc_filebrowser Dateisystem, Dateirechte anzeigen im Dateibrowser\nStartverzeichnisoptionen +menu.hint_misc_general Standby-, Teletext-, Rotor-Einstellungen\nPluginverzeichnis auf der HDD +menu.hint_misc_zapit Behandlung der Start-TV/Start-Radio Kanäle +menu.hint_movie Wiedergabe von Filmen +menu.hint_net_broadcast Hier können Sie die Broadcast-Adresse ändern,\nwenn Sie unsicher sind, verwenden Sie zuletzt .255 +menu.hint_net_dhcp Verwenden Sie einen DHCP-Server für die automatische\nKonfiguration können Sie es hier einstellen +menu.hint_net_djmount Mountet UPnP-Geräte als Dateisystem\nunter /media/00upnp +menu.hint_net_ftpd Aktivieren Sie die Dateiübertragung über FTP +menu.hint_net_gateway Hier können Sie die Gateway-Adresse des Routers eingeben +menu.hint_net_hostname Hier kann man den Hostnamen der Box ändern +menu.hint_net_if Wählen Sie die Schnittstelle zur Konfiguration +menu.hint_net_ipaddress Hier können Sie die IP-Adresse für die Box eingeben +menu.hint_net_mount Hier werden Netzwerkfreigaben bearbeitet\nNFS und CIFS werden supported +menu.hint_net_nameserver Hier können Sie die IP-Adresse des Routers\nbzw. eines DNS-Server eingeben +menu.hint_net_netmask Hier können Sie eine Netzwerkmaske eingeben\nStandart ist 255.255.255.0 +menu.hint_net_nfs_mount Hier können Sie die Netzwerkfreigaben und Mounts bearbeiten +menu.hint_net_nfs_umount Hier können Sie gemountete Verzeichnis wieder aushängen +menu.hint_net_ntp Hier kann man den Zeitserver ändern,\ndies dient der Zeitsynchronisation +menu.hint_net_ntpenable Aktiviert die Zeitsynchronisierung über das NTP-Protokoll\nwenn NTP-Sync nicht erfolgreich, verwenden Sie DVB +menu.hint_net_ntprefresh Hier können Sie den Interval zur Zeitsynchronisation einstellen +menu.hint_net_ntpserver Hier können Sie den NTP-Server eingeben +menu.hint_net_pass Hier können Sie das Passwort eingeben (WPA-PSK) +menu.hint_net_proxy Wenn Sie Proxy für den Zugriff auf das Internet benutzen\nkonfigurieren Sie es hier für den Online-Software-Update +menu.hint_net_proxypass Hier können Sie den Proxy-Passwort eingeben,\nwenn es erforderlich ist +menu.hint_net_proxyserver Hier können Sie den Proxyserver-Namen eingeben +menu.hint_net_proxyuser Hier können Sie den Proxy-Benutzernamen eingeben,\nwenn es erforderlich ist +menu.hint_net_services Konfigurieren Sie Netzwerkservices:\nTelnet, FTP, UPnP +menu.hint_net_setupnow Hier werden die aktuellen Einstellungen zugewiesen\nbzw. geänderte übernommen +menu.hint_net_setuponstartup Startet das Netzwerk automatisch beim Booten +menu.hint_net_show Zeigen Ihnen die aktuellen Netzwerkeinstellungen +menu.hint_net_ssid Hier können Sie die Wireless-Netzwerk-SSID eingeben\nmit der Sie eine Verbindung herstellen möchten +menu.hint_net_telnet Aktivieren Sie den Telnet-Login auf Ihrer Box,\nNutzer: root Passwort: coolstream +menu.hint_net_test Testet die Netzwerkverbindung:\nPing auf Gateway, Name-Server und externe IP-Adressen +menu.hint_net_ushare Freigabe verbundener HDD über UPnP +menu.hint_network IP-Adresse, Gateway, DNS-, Time-Sync\nNetzwerk-Freigaben und Dienste +menu.hint_new_zap_mode Aktiviert Quickzap in der Kanalliste. Nach Betätigen der Mute-\nTaste wird mit den Hoch/Runter Tasten der Sender umgeschaltet +menu.hint_osd Farben, Schriftarten, Anzeigegröße\nGUI Ansichtsoptionen +menu.hint_osd_language Wählen Sie ihre OSD Sprache +menu.hint_osd_preset Hier können Sie zwischen Röhren-TV (CRT) oder Flachbildschirm (LCD) vorwählen +menu.hint_parentallock_changepin Hier wird der 4 stellige PIN Code eingegeben,\nder dann ggf. abgefragt wird +menu.hint_parentallock_lockage Hier wird festgelegt, bei welcher Altersklasse\ndie PIN Abfrage kommt +menu.hint_parentallock_prompt Hier wird definiert, wann eine PIN Eingabe erfolgen soll +menu.hint_personalize aktivieren, deaktivieren, schützen von Menüpunkten\nkonfigurieren der Farb-Tasten in den Benutzermenüs +menu.hint_pictureviewer_defdir Hier wählen Sie das Startverzeichnis für den Bildbetrachter +menu.hint_pictureviewer_scaling Hier kann die Bildauflösung eingestellt werden +menu.hint_pictureviewer_slide_time Hier kann der Slideshow-Intervall geändert werden,\nStandardmässig ist ein Intervall von 10 Sekunden eingstellt +menu.hint_picview Bilder anzeigen +menu.hint_plugins_hdd_dir Auswahl des Verzeichnisses zum laden von Plugins\n auf der HDD +menu.hint_power_leds Konfiguriert das Verhalten der LEDs an der Power-Taste +menu.hint_pref_lang Wählen Sie ihre bevorzugte Audio- und EPG-Sprache,\ndie Einstellung 'none' deaktiviert diese Option +menu.hint_pref_subs Wählen Sie ihre bevorzugte Untertitel-Sprache,\ndie Einstellung 'none' deaktiviert diese Option +menu.hint_progressbar_color Bei aktivierter Option werden alle Fortschrittsbalken in Farbe\nund nicht im klassischen Weiß angezeigt +menu.hint_protection Schützen Sie Inhalte per PIN-Code\nStandard-PIN ist 0000 +menu.hint_radiomode Schaltet zum Radio-Modus +menu.hint_reboot Startet die Box neu.\nOhne Bestätigung +menu.hint_record_apid_ac3 Schließt bei einer Aufnahme die durch den Sender definierte 'Dolby Digital Tonspur'\nin die Aufnahme ein, sofern diese vorhanden ist +menu.hint_record_apid_alt Sind weitere Tonspuren verfügbar, dann können diese hiermit bei einer\nAufnahme entsprechend ein- bzw. ausgeschlossen werden +menu.hint_record_apid_std Schließt bei einer Aufnahme die durch den Sender definierte 'Standard Tonspur'\nin die Aufnahme ein, bzw. schließt diese aus +menu.hint_record_apids Konfigurieren Sie die Tonspuren für die Aufnahme +menu.hint_record_apply Hiermit werden die Aufnahmeoptionen übernommen +menu.hint_record_chandir Diese Option speichert Aufnahmen mit dem Namen des Kanals\nin ein eigenes Verzeichnis +menu.hint_record_dir Hier wählen Sie das Aufnahmeverzeichnis +menu.hint_record_end Hier können Sie wählen zwischen max. Aufnahmezeit\noder anhand der EPG-Daten +menu.hint_record_tdir Wählen Sie eine Verzeichnis für Ihre Timeshift-Aufnahmen\nim temporären Timeshiftmodus +menu.hint_record_time Hier wird die maximale Zeit in Stunden eingetragen außer\nSie stoppen die Aufnahme vorzeitig +menu.hint_record_timeafter Hier kann die Endzeit für den Aufnahmetimer eingestellt werden,\nein Wert von 2, beendet die Aufnahme 2 Minuten nach dem Sendungsende +menu.hint_record_timebefore Hier kann die Startzeit für den Aufnahmetimer eingestellt werden,\nein Wert von 2, startet die Aufnahme 2 Minuten vor dem Sendungsbeginn +menu.hint_record_timer Konfigurieren Sie Timeroptionen für Aufnahmen +menu.hint_record_timeshift Konfigurieren Sie ihre Timeshift-Optionen +menu.hint_record_timeshift_auto Hier können Sie die Zeit einstellen nachdem Timeshift aktiv ist\nund Sie umschalten, in Sekunden +menu.hint_record_timeshift_delete Hier können Sie wählen ob nach beenden von Timeshift\ndie Aufnahmen gelöscht werden +menu.hint_record_timeshift_pause Wenn die Funktion aktiviert ist, lässt sich Timeshift\ndurch die Pause-Taste auf der Fernbedienung aktivieren +menu.hint_record_timeshift_temp Ist dies Option deaktiviert wird Timeshift direkt als Aufnahme gestartet +menu.hint_record_zap Bei aktiver Option wird bereits mit der Ankündigung\nder Aufnahme auf den aufzunehmenden Sender umgeschaltet +menu.hint_record_zap_pre_time Hier kann für den Umschalttimer ein Vorlaufzeit in Minuten eingestellt werden +menu.hint_recording Aufnahme- und Timeshift-Optionen\nTimer Optionen, Audio-PIDs Optionen +menu.hint_reload_channels Kanallisten neu laden\nKanallisten aktualisieren +menu.hint_reload_plugins Plugins neu laden\nPlugin-Liste aktualisieren +menu.hint_reset Zurücksetzen von Neutrino-HD-Einstellungen auf Standardwerte\nTuner Einstellungen und Kanäle bleiben erhalten +menu.hint_restore Wiederherstellen von vorher erstellten Sicherungen +menu.hint_rotor_swap Tauschen der Rotordrehrichtung Ost/West\nim Motorsetup +menu.hint_rounded_corners Aktiviert die Darstellung abgerundeter Ecken für die OSD-Menüs +menu.hint_save_settings Speichern Sie alle Einstellungen im Image +menu.hint_saveas Speichern der Neutrino-HD-Einstellungen in eine Datei +menu.hint_scan_auto Auto-Scan ausgewählter Anbieter +menu.hint_scan_autoall Scannen Sie ihre ausgewählten Anbieter auf einmal +menu.hint_scan_autoall_select Nur in ausgewählten Satelliten scannen +menu.hint_scan_bouquet erneuern: hinzufügen zu den Bouquets, löschen: entfernt alte Bouquets, nicht ändern: Neue werden in 'Andere' angefügt +menu.hint_scan_cable Wählen Sie ihr Kabelnetz zum scannen +menu.hint_scan_cable_simple Kabel-Scan mit optionaler Anbieter- und Kanal-Nummerierung +menu.hint_scan_commited Wählen Sie ihre Einstellungen für diesen Satelliten +menu.hint_scan_diseqc Wählen Sie DiSEqC-Schalter-Eingangssignal für diesen Satelliten +menu.hint_scan_diseqcrepeat Diseqc Wiederholungen für kaskadierte Schaltungen,\nnutzen Sie die links/rechs Tasten +menu.hint_scan_diseqctype Wählen Sie ihr DiSEqC-Protokoll\nmit 'Erweitert' können Sie ihre Anlage einbinden +menu.hint_scan_fast Schnell-Scan eines ausgewählten Anbieters\nWARNUNG: DiSEqC-Config wird überschrieben +menu.hint_scan_fastprov Wählen Sie einen Anbieter (Provider) zum scannen +menu.hint_scan_fasttype Wählen Sie das Sendeformat +menu.hint_scan_fec Wählen Sie eine Transponder-FEC +menu.hint_scan_femode Wählen Sie den Verbindungstyp für den zweiten Tuner +menu.hint_scan_fesetup Konfigurieren des oder der Tuner +menu.hint_scan_fetimeout Zeit bis zum warten des Signal, in 1/10 Sekunden,\nbenutzen Sie die links/rechts Tasten +menu.hint_scan_freq Geben Sie eine Transponder-Frequenz ein +menu.hint_scan_fta Lassen Sie nur frei empfangbare (nicht-verschlüsselte) Programme suchen +menu.hint_scan_ladirection Wählen Sie ihre Breitengrad-Ausrichtung +menu.hint_scan_latitude Geben Sie ihren Breitengrad ein +menu.hint_scan_lnbconfig Konfigurieren Sie LNB-Parameter für diesen Satelliten +menu.hint_scan_lodirection Wählen Sie ihre Längengrad-Ausrichtung +menu.hint_scan_lofh High-Banb LNB-Frequenz +menu.hint_scan_lofl Low-Band LNB-Frequenz +menu.hint_scan_lofs LNB-Band-Umschalter Frequenz +menu.hint_scan_logical Verwenden Sie die Kanal-Nummerierung des Anbieters +menu.hint_scan_logical_hd Wenn der Kanal in SD und in HD verfügbar ist,\nwird HD nach oben in der Liste gesetzt +menu.hint_scan_longitude Geben Sie ihren Längengrad ein +menu.hint_scan_manual Manueller Transponder-Scan mit ausgewählten Parametern +menu.hint_scan_mod Wählen Sie eine Transponder-Modulation +menu.hint_scan_motor_18v Benutze 18V für Motorbewegung +menu.hint_scan_motor_speed Rotor-Bewegungsgeschwindigkeit in 1/10 Grad pro Sekunde +menu.hint_scan_motorpos Wählen Sie eine gespeicherten Positions-Nummer für diesen Satelliten +menu.hint_scan_nid Hier können Sie ihre Kabelnetzwerk-Id in dezimal eingeben +menu.hint_scan_nit Hier kann man Transponder über gesendete NIT-Daten (Network Information Table) hinzufügen lassen +menu.hint_scan_pids Scant und speichert auch nur Audio / Video / PMT PIDs +menu.hint_scan_pol Wählen Sie eine Transponder-Polarisation +menu.hint_scan_rate Geben Sie eine Transponder-Symbolrate ein +menu.hint_scan_reset_numbers Zurücksetzen der existierender Kanalnummern und Umnummerierung nach einen Scan +menu.hint_scan_satadd Wählen Sie ihre verfügbaren Satelliten hier aus, für Ihren Anschluß +menu.hint_scan_satellite Wählen Sie die Satelliten zum scannen +menu.hint_scan_satenable Aktivieren Sie diesen Satelliten für ihre Anlage zum scannen +menu.hint_scan_satfind Sat-Finder: fahren Sie manuell Ihre Rotor-Positionen durch +menu.hint_scan_satfind_start Startet den Satellitenfinder für die Signalstärke +menu.hint_scan_satscan Scant den ausgewählten Satelliten +menu.hint_scan_satselect Ausgewählter Satellit +menu.hint_scan_satsetup Hier können Sie ihre gewählten Satelitten sehen und das LNB konfigurieren +menu.hint_scan_savesettings Speichert die Tuner-Config und Scan-Einstellungen,\ndiese bleiben dann erhalten für einen neuen Service-Scan +menu.hint_scan_scantype Wählen Sie, welche Kanal-Typen Sie scannen möchten +menu.hint_scan_setup_fe Konfigurieren Sie ihre ausgewählten Tuner +menu.hint_scan_start Startet die Kanalsuche mit den angegebenen Parametern.\nMit der 'EXIT' Taste kann man abbrechen +menu.hint_scan_test Testen Sie das Signal für diesen Transponder +menu.hint_scan_tpselect Wählen Sie einen einzelnen Transponder zum scannen +menu.hint_scan_uncommited Wählen Sie nicht festgeschriebene Angaben für diesen Satelliten +menu.hint_scan_usals_repeat Hier können Sie die USALS-Wiederholungen eingeben für den Rotor +menu.hint_scan_usalsall Setzen oder entfernen Sie USALS-Merker für alle Satelliten +menu.hint_scan_useusals Verwenden Sie USALS für diesen Satelitten +menu.hint_scrambled_message Bei aktivierter Option erscheint eine Meldung,\nwenn ein verschlüsselter Sender nicht entschlüsselt werden kann +menu.hint_screen_setup Konfigurieren Sie den Bildschirmbereich für die Menüanzeige +menu.hint_screenshot_count Hier können Sie wählen, wie viele Screenshots (1-5) erstellt werden sollen +menu.hint_screenshot_cover ein: Bei der Wiedergabe von Aufnahmen ein Video-Screenshot erstellen\nfür die Vorschau im Moviebrowser +menu.hint_screenshot_dir Hier wählen Sie das Verzeichnis zum speichern der Screenshots +menu.hint_screenshot_format Wählen Sie das Dateiformat zum speichern der Screenshots +menu.hint_screenshot_res Screenshot Größe: aktuelle TV-Auflösung oder OSD-Größe (1280x720) +menu.hint_screenshot_scale Für Video + OSD Screenshots, Skalierung auf Video-Größe +menu.hint_screenshot_setup Hier können Sie die Optionen zum erstellen von Screenshots einrichten +menu.hint_screenshot_video Diese Funktion übernimmt das Live-Bild in den Screenshot als Hintergrund +menu.hint_scripts Skripts ausführen +menu.hint_selected_back Ändern Sie die Hintergrundfarbe für selektierte Fensterinhalte +menu.hint_selected_text Ändern Sie die Textfarbe für selektierte Fensterinhalte +menu.hint_service Kanalsuche, Senderscan,\nBouquet-Verwaltung, Software-Aktualisierung +menu.hint_service_scan Tuner-Einstellungen, Service-Scan +menu.hint_settings Konfigurieren von Neutrino-HD.\nNetzwerk, Video, Audio, OSD und mehr +menu.hint_show_mute_icon Definiert ob beim Lautstärkewert 0 das Mute-Icon eingeblendet werden soll +menu.hint_shutdown Setzen Sie Ihre Box in den Standby-Modus\noder schalten Sie die Box komplett aus +menu.hint_shutdown_count Die Zeit zum Deep-Standby,\nwenn die Box im Soft-Standby-Mode ist +menu.hint_shutdown_rcdelay Aktiviert den Deep-Standby, wenn der Powerknopf\nlänger als 1 Sekunde betätigt wird +menu.hint_shutdown_real Aktivieren des Soft-Standby-Modus, wenn diese Option\ndeaktiviert ist, geht die Box in den Deep-Standby +menu.hint_sleeptimer Zeitschaltuhr auf Ihrer Box aktivieren.\nDie Box geht dann in den Standby-Modus +menu.hint_soft_restart Neustarten von Neutrino-HD ohne zu Rebooten +menu.hint_softupdate_check Im Internet oder lokal nach verfügbaren Updates suchen +menu.hint_softupdate_expert Einzelne Partitionen aus dem Flash lesen / in den Flash schreiben +menu.hint_softupdate_expert_read Einzelne Partitionen (U-Boot, Splash, Kernel, SystemFS) aus dem Flash lesen +menu.hint_softupdate_expert_write Einzelne Partitionen (Splash, Kernel, SystemFS) in den Flash schreiben +menu.hint_softupdate_settings Den Updatemodus, das lokale Verzeichnis und die Konfigurationsdatei festlegen +menu.hint_start_tostandby Aktiviert den Standby-Modus nach dem starten der Box +menu.hint_streaminfo Aktuelle Sender-Informationen: PIDs, SNR-Verhältnis\nBitrate grafisch +menu.hint_subchannel_pos Hier können Sie die Anzeigeposition der Untertitel auswählen +menu.hint_sw_update Neutrino-HD auf Software-Update überprüfen\nImage sichern und wiederherstellen +menu.hint_theme Wählen Sie vordefiniertes Farbschema, Speichern oder Laden Sie Theme aus Filen +menu.hint_timeouts Gibt an, nach welcher Zeit in Sekunden die Menüs oder\nInfofenster sich automatisch schließen (0 deaktiviert) +menu.hint_timers Hinzufügen / Entfernen / Bearbeiten geplanter\nAufnahme, Meldungen etc. +menu.hint_timezone Wählen Sie ihre Zeitzone aus +menu.hint_tvmode Schaltet zum TV-Modus +menu.hint_tvradio_switch Schaltet zwischen TV- und Radio-Modus um +menu.hint_vfd Frontpanel Power-LEDs und VFD Optionen +menu.hint_vfd_brightness Definiert die Helligkeit im TV-Betrieb +menu.hint_vfd_brightness_setup Konfiguriert die Displayhelligkeit des Frontpanels für verschiedene Modi +menu.hint_vfd_brightnessdeepstandby Definiert die Helligkeit, wenn sich der Receiver im Deep-Standby befindet +menu.hint_vfd_brightnessdim Definiert den Wert für das dimmen des Display nach Ablauf der eingestellten Zeit +menu.hint_vfd_brightnessstandby Definiert die Helligkeit, wenn sich der Receiver im Standby befindet +menu.hint_vfd_defaults Setzt die Standardeinstellungen für die Helligkeitswerte +menu.hint_vfd_dimtime Hier kann in Sekunden eingegeben werden,\nwann sich das Display automatisch auf den gewünschten Wert dimmt +menu.hint_vfd_infoline Wählen Sie, was in der Infozeile angezeigt werden soll +menu.hint_vfd_statusline Wählen Sie, was in der Statuszeile angezeigt werden soll +menu.hint_video Video-Ausgang, Auflösung, Format,\nSeitenverhältnise, Modus-Schalter Optionen +menu.hint_video_43mode Anzeigemodus für 4:3-Inhalte auf 16:9 TVs +menu.hint_video_analog_mode Wählen Sie den Analogausgang Modus\nfür den SCART und CINCH Anschluss +menu.hint_video_cinch_mode Wählen Sie den Analogausgang Modus\nfür den Composite Video Ausgang +menu.hint_video_dbdr Verwendeter MPEG2 Filter +menu.hint_video_format Diese Option aktiviert das 'Bildschirmformat'\nauf das Format Ihres Fernsehgerätes +menu.hint_video_mode Definiert in welchen Videoformat das Bild über den\nHDMI-Ausgang ausgegeben wird +menu.hint_video_modes Definiert welche Videosysteme mit der VF-Taste\nder Fernbedienung ausgewählt werden können +menu.hint_video_scart_mode Wählen Sie den Analogausgang Modus\nfür den SCART Ausgang +menu.hint_volume_digits Zifferndarstellung der Lautstärkeanzeige ein/ausschalten +menu.hint_volume_pos Hier können Sie die Anzeigeposition der Lautstärkeanzeige auswählen +menu.hint_zap_cycle Dadurch wird nur innerhalb des aktiven Bouquets gezappt menu.next Weiter (Menü zum Beenden) messagebox.back Zurück messagebox.cancel Abbruch @@ -784,6 +1161,7 @@ motorcontrol.store Speichere Motorposition (a) motorcontrol.timed_mode Zeitgesteuerter Schrittweitenmodus motorcontrol.user_menu Benutzermenü motorcontrol.west_limit Setze westliches (soft) Limit +moviebrowser.book_add Lesezeichen setzen moviebrowser.book_clear_all Lösche alle moviebrowser.book_head Markierungen moviebrowser.book_lastmoviestop letzter Wiedergabestopp: @@ -945,17 +1323,18 @@ networkmenu.ntpenable Zeit per INet synchronisieren networkmenu.ntprefresh NTP/DVB-Aktualisierung networkmenu.ntprefresh_hint1 NTP/DVB-Time-Sync [min] networkmenu.ntprefresh_hint2 braucht Reboot oder EPG-Reset -networkmenu.ntpserver NTP-URL (Zeitserver) -networkmenu.ntpserver_hint1 NTP-URL Beispiel: ntp1.ptb.de +networkmenu.ntpserver NTP-Server +networkmenu.ntpserver_hint1 NTP-Server Beispiel: ntp1.ptb.de networkmenu.ntpserver_hint2 braucht Reboot oder EPG-Reset networkmenu.ntptitle Zeitsynchronisation -networkmenu.password Passwort +networkmenu.password Passwort (PSK) networkmenu.reset_settings_now Sollen die vorherigen Einstellungen \nwieder hergestellt werden? networkmenu.select_if Schnittstelle +networkmenu.services Netzwerkservice networkmenu.setupnow Einstellungen jetzt zuweisen networkmenu.setuponstartup Beim Start Netzwerk setzen networkmenu.show Aktive Einstellungen zeigen -networkmenu.ssid Netzwerkname +networkmenu.ssid Netzwerkname (SSID) networkmenu.test Netzwerk testen neutrino_starting Neutrino wird gestartet... nfs.alreadymounted Verzeichnis bereits gemountet. @@ -1042,7 +1421,7 @@ personalize.pinprotect ja personalize.pinstatus mit PIN personalize.plugins Plugins personalize.usermenu_preferred_buttons Bevorzugte Tasten zuweisen -personalize.usermenu_show_cancel Zeige Schalter "Abbrechen" +personalize.usermenu_show_cancel Zeige Schalter "Abbrechen" personalize.visible sichtbar pictureviewer.defdir Start-Verz. pictureviewer.head Bildbetrachter @@ -1090,9 +1469,9 @@ rclock.lockmsg Die Fernbedienung wird gesperrt.\n Um die Sperre aufzuheben, bitt rclock.menueadd FB sperren rclock.title Fernbedienung sperren rclock.unlockmsg Fernbedienung reaktiviert... -recording.is_running Aufzeichung auf diesem Kanal läuft bereits! -recording.start Starte Aufzeichnung, bitte warten...! -recording.stop Beende Aufzeichnung, bitte warten...! +recording.is_running Folgende Aufnahme läuft bereits! Neue Aufnahme starten? +recording.start Starte Aufnahme, bitte warten...! +recording.stop Beende Aufnahme, bitte warten...! recordingmenu.apids Tonspuren recordingmenu.apids_ac3 AC3 Tonspuren aufnehmen recordingmenu.apids_alt Alternative Tonspuren aufn. @@ -1113,7 +1492,7 @@ recordingmenu.record_is_not_running Keine laufende Aufnahme verfügbar! recordingmenu.record_is_running Aufnahme läuft! recordingmenu.save_in_channeldir Speichere im Kanalverzeichnis recordingmenu.server Server -recordingmenu.server_mac Mac Adresse +recordingmenu.server_mac MAC-Adresse recordingmenu.setupnow Einstellungen jetzt übernehmen recordingmenu.timeshift Timeshift recordingmenu.tsdir Timeshift Aufnahmeverzeichnis @@ -1128,6 +1507,7 @@ reset_confirm Sind Sie sich sicher? reset_settings Einstellungen auf Standardwerte satsetup.auto_scan Automatisch einen gewählten %s satsetup.auto_scan_all Automatisch alle Satelliten +satsetup.cable Kabel-Scan satsetup.cable_nid Netzwerk ID satsetup.comm_input Committed Input satsetup.diseqc DiSEqC @@ -1155,10 +1535,11 @@ satsetup.fe_mode_alone independent satsetup.fe_mode_loop loop satsetup.fe_mode_single single satsetup.fe_mode_twin twin -satsetup.fe_setup Setup tuner +satsetup.fe_setup Setup Tuner satsetup.lofh LNB High Offset satsetup.lofl LNB Low Offset satsetup.lofs LNB Switch Offset +satsetup.logical_hd HD-Kanäle bevorzugen satsetup.logical_numbers Nutze logische Nummern satsetup.manual_scan Manueller Frequenzscan satsetup.minidiseqc Mini-DiSEqC @@ -1238,6 +1619,7 @@ servicemenu.update Software-Aktualisierung settings.backup Image-Einstellungen: Sichern settings.backup_failed Sicherung fehlgeschlagen! settings.help Hilfe +settings.menu_hints Menühinweise anzeigen settings.menu_pos Menüposition settings.missingoptionsconffile Die Neutrino Einstellungen wurden erweitert.\nDie neuen Werte werden auf Standard gesetzt. settings.noconffile Die Neutrino Einstellungen wurden nicht\ngefunden. Es werden Standardwerte benutzt. @@ -1270,6 +1652,8 @@ streaminfo.resolution Auflösung streaminfo.signal Empfangssignal streaming.busy Ein oder mehrere Aufnahmeprozesse sind aktiv.\nSollte die Aufnahme eigentlich beendet sein,\nschafft ein Neustart von Neutrino Abhilfe. streaming.dir_not_writable Das Aufnahmeverzeichnis ist nicht beschreibbar.\nAufnahmen sind daher nicht möglich. +streaming.overflow Aufnahme-Puffer Überlauf! Bitte ggf. einige Aufnahmen beenden. +streaming.slow System oder Datenträger zu langsam! Bitte ggf. einige Aufnahmen beenden. streaming.write_error Die Aufnahme wurde leider abgebrochen,\nda ein Fehler beim Schreiben der Daten auftrat. stringinput.caps Groß-/Kleinbuchstaben stringinput.clear Alles löschen @@ -1423,8 +1807,10 @@ videomenu.videoformat_149 14:9 videomenu.videoformat_169 16:9 videomenu.videoformat_43 4:3 videomenu.videomode Videosystem +wizard.initial_settings Grundeinstellungen gefunden +wizard.install_settings Kanalliste für Astra 19.2°E installieren? wizard.welcome_head Willkommen zur Ersteinrichtung Ihres Receivers! -wizard.welcome_text Wir gratulieren Ihnen zum Kauf Ihrer Coolstream. In den nun folgenden\nSchritten begleiten wir Sie durch die Erstinstallation des Gerätes.\nWir wünschen Ihnen viel Freude mit dem wohl einzigartigsten Receiver!\nBeachten Sie: Ihre Coolstream Set-Top-Box lässt sich bequem per Webinterface\nsteuern, um zum Beispiel die Timer-Verwaltung zu nutzen oder Live-TV im Web-Browser zu schauen.\nZugriff erhalten Sie mit dem Benutzernamen: root und dem Passwort: coolstream\nAchten Sie darauf, dass Ihre Gerät nicht von aussen zugänglich ist, da sonst ein Zugriff über das Internet nicht ausgeschlossen werden kann!\nNächster Schritt? +wizard.welcome_text Wir gratulieren Ihnen zum Kauf Ihrer Coolstream. In den nun folgenden\nSchritten begleiten wir Sie durch die Erstinstallation des Gerätes.\nWir wünschen Ihnen viel Freude mit dem wohl einzigartigsten Receiver!\nBeachten Sie: Ihre Coolstream Set-Top-Box lässt sich bequem per Webinterface\nsteuern, um zum Beispiel die Timer-Verwaltung zu nutzen oder Live-TV im Web-Browser zu schauen.\nZugriff erhalten Sie mit dem Benutzernamen: root und dem Passwort: coolstream\nAchten Sie darauf, dass Ihre Gerät nicht von aussen zugänglich ist,\nda sonst ein Zugriff über das Internet nicht ausgeschlossen werden kann!\nNächster Schritt? word.from ab zapit.scantype Service-Auswahl zapit.scantype.all Alle Services diff --git a/data/locale/english.locale b/data/locale/english.locale index 226e52712..901a98019 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -125,6 +125,7 @@ audiomenu.pref_subs Prefered subtitle language audiomenu.pref_subs_head Subtitle language preferences audiomenu.spdif_dd Encoded DD on SPDIF audiomenu.stereo stereo +audiomenu.volume_adjust Volume adjustment, in % audiomenu.volume_step Volume step audioplayer.add Add audioplayer.add_ic Icecast @@ -291,6 +292,7 @@ date.Sun Sun date.Thu Thu date.Tue Tue date.Wed Wed +epg.saving Saving EPG epgextended.actors Actors epgextended.director Director epgextended.guests Guests @@ -299,6 +301,7 @@ epgextended.presenter Presenter epgextended.year_of_production Year of Production epglist.noevents EPG is not available... epgviewer.More_Screenings More Screenings on this Channel +epgviewer.More_Screenings_short More Screenings epgviewer.nodetailed No detailed informations available epgviewer.notfound no epg found eventfinder.head Search in EPG @@ -391,6 +394,7 @@ extra.tp_pol_r R extra.tp_rate Symbol rate extra.update_dir Local update directory extra.use_gotoxx Use gotoXX +extra.volume_digits Volumebar digits extra.volume_pos Volumebar extra.west West extra.zap_cycle Zap cycle @@ -434,7 +438,8 @@ filesystem.is.utf8.option.utf8 UTF-8 flashupdate.actionreadflash reading flashupdate.cantopenfile can't open file flashupdate.cantopenmtd can't open mtd-device -flashupdate.checkupdate Check for updates +flashupdate.checkupdate_internet Check for online updates +flashupdate.checkupdate_local Local update flashupdate.currentversion_sep Current version flashupdate.currentversiondate Date flashupdate.currentversiontime Time @@ -521,6 +526,7 @@ fontsize.infobar_info info fontsize.infobar_number Number fontsize.infobar_small Small fontsize.menu Menutext +fontsize.menu_hint Menu hints fontsize.menu_info Menu Info fontsize.menu_title Menu Title hdd_10min 10 min. @@ -576,7 +582,7 @@ infoviewer.subchan_infobar Full infobar infoviewer.subservice Subservices infoviewer.waittime Waiting for time... ipsetup.hint_1 Use 0..9, or use Up/Down, -ipsetup.hint_2 OK saves, LAME! aborts +ipsetup.hint_2 OK saves, Exit aborts keybindingmenu.RC Tune Remote-Control keybindingmenu.addrecord add record timer keybindingmenu.addremind add zapto timer @@ -642,7 +648,7 @@ lcdmenu.statusline.both volume / playtime lcdmenu.statusline.playtime playtime lcdmenu.statusline.volume volume ledcontroler.blink Blink in deep standby, if timer set -ledcontroler.menu Power Button LED�s +ledcontroler.menu Power Button LEDs ledcontroler.mode.deepstandby Deep Standby ledcontroler.mode.record Blinke in Record ledcontroler.mode.standby Standby @@ -687,6 +693,377 @@ mainsettings.timezone Timezone mainsettings.video Video menu.back Back menu.cancel Cancel +menu.hint_a_pic Configure audio player and picture viewer +menu.hint_aplay Audio player +menu.hint_audio Audio output, DD\nSRS True volume options +menu.hint_audio_analog_mode Select audio channel to use\nstereo, mono-left, mono-right +menu.hint_audio_avsync A/V sync +menu.hint_audio_dd Auto-switch to DolbyDigital audio pid,\nif available +menu.hint_audio_hdmi_dd DolbyDigital over HDMI: off - decoded\nauto if supported by device, force +menu.hint_audio_spdif_dd DolbyDigital over optical output +menu.hint_audio_srs SRS TruVolume control volume jumps\nat content changes +menu.hint_audio_srs_algo Amount of control, light or normal +menu.hint_audio_srs_nmgr Noise manager +menu.hint_audio_srs_volume Reference level to maintain +menu.hint_audio_volstep Volume +/- keys increase/decrease step +menu.hint_audioplayer_defdir Default audioplayer directory +menu.hint_audioplayer_follow Move playlist selected pointer\nto current playing song +menu.hint_audioplayer_highprio Increase playback priority +menu.hint_audioplayer_order Change playlist sort order +menu.hint_audioplayer_playlist Show playlist items +menu.hint_audioplayer_repeat Enable playlist repeat when end of list reached +menu.hint_audioplayer_sc_metadata Enable streaming audio metadata parsing +menu.hint_audioplayer_screensaver Set screensaver timeout, in minutes +menu.hint_audioplayer_title Enable SMS-style title search in playlist +menu.hint_auto_lang Auto-switch audio to preferred language +menu.hint_auto_subs Auto-start subtitles for preferred language +menu.hint_back Return to previous menu\nPress menu key to close all menus +menu.hint_backup Backup configs and channels to selected dir +menu.hint_bedit Edit favorites and bouquets +menu.hint_bigwindows Always show big epg detail window\nelse 'info' button switch big font + window size +menu.hint_cache_txt Start teletext caching after channel switch +menu.hint_cec_mode CEC mode +menu.hint_cec_standby CEC standby +menu.hint_cec_view_on CEC view ON +menu.hint_channellist_colored Use different color for current or next event +menu.hint_channellist_epg_align EPG event align +menu.hint_channellist_extended Show current event progress bar +menu.hint_channellist_fonts Change channel list font sizes +menu.hint_channellist_foot Show additional information\nin bottom box +menu.hint_channellist_setup Configure channe list GUI options +menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card +menu.hint_colors Configure GUI colors +menu.hint_content_back Change GUI window background color +menu.hint_content_textcolor Change GUI window text color +menu.hint_contrast_fonts Make fonts contrast (do not blend with background) +menu.hint_dboxinfo Information about box cpu and storage +menu.hint_delete_channels Remove all channels +menu.hint_epg_cache Maximum days to cache for future events +menu.hint_epg_dir Select directory on harddisk or usb flash\nto save EPG. +menu.hint_epg_extendedcache Maximum hours to cache extended\nevents descriptions +menu.hint_epg_fonts Change EPG details window font sizes +menu.hint_epg_max_events Maximum events to cache. After reaching limit\nEPG cache will remove future events +menu.hint_epg_old_events Hours after event end time to consider\nevent old and remove it from cache +menu.hint_epg_save Save cached EPG to harddisk or usb flash\nand load it after boot +menu.hint_event_textcolor Change event color for colored-event options\nin channel list and infobar +menu.hint_eventlist_fonts Change event list font sizes +menu.hint_extended Power saving, EPG save/load options\nHDMI-CEC, Start channel, zap options +menu.hint_factory Reset box to factory state\nBox will reboot after reset +menu.hint_fade Fade GUI windows +menu.hint_fan_speed Control fan speed +menu.hint_filebrowser_denydirectoryleave Deny filebrowser to leave initial directory +menu.hint_filebrowser_showrights Show file permissions in file browser +menu.hint_fileplay Play various video files +menu.hint_filesystem_is_utf8 Filebrowser filesystem encoding +menu.hint_font_gui Select font file to use for GUI +menu.hint_font_scaling Set global vertical and horizontal\nGUI font scaling +menu.hint_font_ttx Select font file to use for teletext +menu.hint_fonts Configure GUI fonts and font sizes +menu.hint_gamelist_fonts Change games and scripts list font sizes +menu.hint_games Show list of installed games +menu.hint_hdd Format / check hard disk drive +menu.hint_hdd_apply Apply sleep/noise parameters +menu.hint_hdd_check Check filesystem (fsck) +menu.hint_hdd_format Create HDD partition and format it +menu.hint_hdd_noise Set Automatic Acoustic Management\nnot all drives support this +menu.hint_hdd_sleep Select time to stop hdd on inactivity +menu.hint_hdd_tools Initialize HDD, check filesystem +menu.hint_head_back Change GUI title background color +menu.hint_head_textcolor Change GUI window title text color +menu.hint_imageinfo Information about installed software +menu.hint_inact_timer Shutdown box after inactivity +menu.hint_inactive_back Change inactive item background color +menu.hint_inactive_textcolor Change inactive item text color +menu.hint_inet_radio Internet radio +menu.hint_info Information about image, box cpu and storage,\nstream information +menu.hint_infobar_back Change infobar background color +menu.hint_infobar_casys On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-sys +menu.hint_infobar_colored_event Use different color for current or next event +menu.hint_infobar_dd Show DD icon +menu.hint_infobar_filesys Show flash and HDD used space levels +menu.hint_infobar_fonts Change infobar font sizes +menu.hint_infobar_logo Logo / signal options +menu.hint_infobar_logo_dir Select directory to search for channels logo +menu.hint_infobar_on_epg Show infobar on current EPG event change +menu.hint_infobar_radiotext Show radiotext window +menu.hint_infobar_res Show channel resolution icons +menu.hint_infobar_sat Show current satellite or cable provider +menu.hint_infobar_setup Configure infobar options +menu.hint_infobar_textcolor Change infobar text color +menu.hint_infobar_tuner Show active tuner number icon +menu.hint_keep_numbers Keep channel numbers over next scans\nand bouquets editing +menu.hint_key_addrecord Assign button to add record timer\nfrom event list +menu.hint_key_addremind Assign button to add zap timer\nfrom event list +menu.hint_key_audio On: 'audio' button start show audio-play menu\nOff: 'audio' button show Audio selection +menu.hint_key_binding Re-define keys used for common operations +menu.hint_key_bouquetdown Assign button to switch channel list\nto previous bouquet +menu.hint_key_bouquetup Assign button to switch channel list\nto next bouquet +menu.hint_key_cancel Assign button to close GUI window +menu.hint_key_channel_sms If enabled, numeric buttons in channel list\nused to search channel in SMS style +menu.hint_key_channeldown Assign button for fast switch to previous\nchannel in channel list +menu.hint_key_channellist Configure keybingdings for channel list +menu.hint_key_channelup Assign button for fast switch to next\nchannel in channel list +menu.hint_key_hardware Change remote control type +menu.hint_key_history Assign button to show channel\nchannel switch history +menu.hint_key_lastchannel Assign button for fast zap to\nprevious channel in history +menu.hint_key_left_exit Allow return to previous menu with 'left' key +menu.hint_key_list_end Assign button to go do list end +menu.hint_key_list_start Assign button to go to list start +menu.hint_key_load Load keybindings from file +menu.hint_key_modechange Change TV/Radio mode and standby keys +menu.hint_key_movieplayer Configure keybingdings for movie player +menu.hint_key_mpaudio Assign button to show audio selection\nin record/file playback mode +menu.hint_key_mpbookmark Assign button to create bookmark\nwhile playing record +menu.hint_key_mpforward Assign button to fast forward record playback +menu.hint_key_mppause Assign button to pause record/file playback +menu.hint_key_mpplay Assign button to resume record/file playback +menu.hint_key_mpplugin Assign button to start selected plugin\nwhile playing record/file +menu.hint_key_mprewind Assign button to rewind record playback +menu.hint_key_mpstop Assign button to stop record/file playback +menu.hint_key_mptime Assign button to show play time\nleft time +menu.hint_key_mptimeshift Assign button to start timeshift +menu.hint_key_pagedown Assign button to show next items page +menu.hint_key_pageup Assign button to show previous items page +menu.hint_key_poweroff Assign button to switch power state\n (standby/deepstandby <-> running) +menu.hint_key_quickzap Configure keybingdings for quick\nchannel switch +menu.hint_key_repeatblock Delay after button press and before\nfirst key repeat +menu.hint_key_repeatblockgeneric Delay between key repeats\nwhile button pressed +menu.hint_key_right Select 'right' function in live TV/Radio mode +menu.hint_key_save Save keybindings to file +menu.hint_key_screenshot Assign button to save GUI and/or TV screenshot +menu.hint_key_sort Assign button to change channel list sort order +menu.hint_key_subchanneldown Assign button for fast switch\n to previous subchannel +menu.hint_key_subchannelup Assign button for fast switch\n to next subchannel +menu.hint_key_transponder Assign button to show channel list\nfor current transponder +menu.hint_key_tvradiomode Assign button to switch TV <> Radio mode +menu.hint_key_unlock Assign button to unlock box if locked\nTo unlock press 'red', then in next 5 seconds this key +menu.hint_keys Remote control repeat rate\nEdit key bindings +menu.hint_lang_pref Configure preferred audio, EPG\nand subtitle languages +menu.hint_language OSD language, timezone\nPreffered audio and subtitles languages +menu.hint_last_radio Start box on selected channel\nif last mode is Radio +menu.hint_last_tv Start box on selected channel\nif last mode is TV +menu.hint_last_use Start box on last used channel +menu.hint_leds_blink Blink LEDS in deep-standby +menu.hint_leds_deepstandby LEDs state in deeps-standby mode +menu.hint_leds_record LEDs state when box recording +menu.hint_leds_standby LEDs state in soft-standby mode +menu.hint_leds_tv Working LEDs state +menu.hint_load Load Neutrino-HD GUI settings from file +menu.hint_make_hdlist Auto-create HD channel list based on\nchannel type and name +menu.hint_make_newlist Create list of recently added channels +menu.hint_make_removedlist Create list of recently removed channels +menu.hint_manage_settings Backup, restore, revert to defaults\nFactory box reset +menu.hint_mb Your recordings +menu.hint_media Play movies, audio files\nWatch pictures +menu.hint_menu_fonts Change menu font sizes +menu.hint_menu_hints Show this hints. Also you can switch\nit any time using 'help' button +menu.hint_menu_pos Select menu position +menu.hint_misc_cec HDMI-CEC Options +menu.hint_misc_channellist HD/New/Removed channel lists\nZap cycle +menu.hint_misc_energy Enable soft-standby, delayed shutdown\ninactivity timers +menu.hint_misc_epg Save/load EPG options, EPG cache options\nEPG save directory +menu.hint_misc_filebrowser Filesystem encoding, file rights\ndeny directory leave +menu.hint_misc_general Start to standby, cache teletext, swp rotor\nplugin hdd dir +menu.hint_misc_zapit Initial TV/Radio channels +menu.hint_movie Play movies +menu.hint_net_broadcast Enter broadcast address\nif unsure, use IP address with last .255 +menu.hint_net_dhcp Use DHCP server to auto-configure +menu.hint_net_djmount Mount UPnP devices as filesystem\nunder /media/00upnp +menu.hint_net_ftpd Enable file transfer using FTP +menu.hint_net_gateway Enter gateway/router IP address +menu.hint_net_hostname Change your box hostname +menu.hint_net_if Select interface to config +menu.hint_net_ipaddress Enter your box IP address +menu.hint_net_mount Configure, mount and un-mount network shares\nNFS and CIFS supported +menu.hint_net_nameserver Enter name server (DNS) IP address +menu.hint_net_netmask Enter network mask\nif unsure, use 255.255.255.0 +menu.hint_net_nfs_mount Configure and mount network shares +menu.hint_net_nfs_umount Un-mount mounted shares +menu.hint_net_ntp Configure time sync +menu.hint_net_ntpenable Enable time sync using NTP protocol\nIf NTP sync not successfull, DVB will be used +menu.hint_net_ntprefresh Time sync interval +menu.hint_net_ntpserver Enter NTP server name +menu.hint_net_pass Enter passkey (WPA-PSK) +menu.hint_net_proxy If you use proxy to access internet\nconfigure it here for online software update +menu.hint_net_proxypass Proxy user password\nif authorization required +menu.hint_net_proxyserver Proxy server name +menu.hint_net_proxyuser Proxy user name\nif authorization required +menu.hint_net_services Configure network services:\nTelnet, ftp, uPnp +menu.hint_net_setupnow Apply current settings +menu.hint_net_setuponstartup Start network at boot time +menu.hint_net_show Show current network settings +menu.hint_net_ssid Enter SSID of wireless network\nyou want to connect to +menu.hint_net_telnet Enable telnet login to your box +menu.hint_net_test Test network connection: ping gateway,\n name server and external IP +menu.hint_net_ushare Share connected HDD over uPnp +menu.hint_network IP address, gateway, DNS, Time sync\nNetwork shares and services +menu.hint_new_zap_mode Allow channel switch while browsing\n(toggle mode with 'mute' in channel list) +menu.hint_osd Colors, fonts, screen size\nGUI look and feel options +menu.hint_osd_language Select OSD language +menu.hint_osd_preset Pre-configured screen margins for CRT and LCD TV +menu.hint_parentallock_changepin Change PIN code +menu.hint_parentallock_lockage Select age allowed to watch +menu.hint_parentallock_prompt Configure when Neutrino-HD will ask you\nfor PIN code +menu.hint_personalize Enable, disable or Protect menu items\nConfigure color-buttons user menus +menu.hint_pictureviewer_defdir Default picture viewer directory +menu.hint_pictureviewer_scaling Picture scaling algorithm +menu.hint_pictureviewer_slide_time Slideshow interval, in seconds +menu.hint_picview View pictures +menu.hint_plugins_hdd_dir Select directory to load\nplugins from +menu.hint_power_leds Configure power-button LEDs behavior +menu.hint_pref_lang Select preferred audio and EPG language\nselect 'none' to disable +menu.hint_pref_subs Select preferred subtitle language\nselect 'none' to disable +menu.hint_progressbar_color Show colored progress bars +menu.hint_protection Protect content by PIN code\nDefault PIN 0000 +menu.hint_radiomode Switch box to radio mode +menu.hint_reboot Reboot box\nNo confirmation +menu.hint_record_apid_ac3 Record AC3 audio pids +menu.hint_record_apid_alt Record alternative non-AC3 audio pids +menu.hint_record_apid_std Record first audio pid +menu.hint_record_apids Configure audio pids to record +menu.hint_record_apply Apply record options +menu.hint_record_chandir Create directory with name of channel\nto store recording +menu.hint_record_dir Select directory to store recordings +menu.hint_record_end Stop direct record after max. time\nor after current event end time +menu.hint_record_tdir Select directory to save timeshift recordings\nin temporary timeshift mode +menu.hint_record_time Record time before stop when\nusing direct record with record button +menu.hint_record_timeafter Stop record after event end\nin minutes +menu.hint_record_timebefore Start record before event start\nin minutes +menu.hint_record_timer Configure record by timer options +menu.hint_record_timeshift Configure timeshift options +menu.hint_record_timeshift_auto Auto start timeshift after channel switch, in seconds +menu.hint_record_timeshift_delete Delete timeshift files after timeshift stop +menu.hint_record_timeshift_pause Start timeshift playback in paused mode +menu.hint_record_timeshift_temp If off, timeshift started as\nany direct record +menu.hint_record_zap Switch to channel to be recorded\nat record announce +menu.hint_record_zap_pre_time For ZapTo timers, switch channel\nbefore event start, in minutes +menu.hint_recording Recording and timeshift options\nTimers safety, audio pids options +menu.hint_reload_channels Reload channels from flash +menu.hint_reload_plugins Reload plugins from flash +menu.hint_reset Reset Neutrino-HD GUI settings to defaults\nTuner config and channels not affected +menu.hint_restore Restore files from selected backup +menu.hint_rotor_swap Swap rotor east/west directions\nin motor control +menu.hint_rounded_corners Draw round or rectangular windows corners +menu.hint_save_settings Save all settings to flash +menu.hint_saveas Save Neutrino-HD GUI settings to file +menu.hint_scan_auto Auto-scan selected provider +menu.hint_scan_autoall Scan several selected providers at once +menu.hint_scan_autoall_select Add selected satellites to scan +menu.hint_scan_bouquet Update: add to current bouquets, erase:\nremove old bouquets, leave: dont add or change +menu.hint_scan_cable Select cable network to scan +menu.hint_scan_cable_simple Cable scan with optional\nprovider channel numbering +menu.hint_scan_commited Select commited input for\nthis satellite +menu.hint_scan_diseqc Select diseqc switch input for\nthis satellite +menu.hint_scan_diseqcrepeat Diseqc repeat for cascaded switches +menu.hint_scan_diseqctype Select your diseqc switch protocol\nwith 'advanced' you can use uncommited switches +menu.hint_scan_fast CanalDigitaal/TéléSAT/TV Vlaanderen provider scan\nWARNING: diseqc config will be overwritten +menu.hint_scan_fastprov Select provider to scan +menu.hint_scan_fasttype Select fast scan type +menu.hint_scan_fec Select transponder FEC +menu.hint_scan_femode Select second tuner connection type +menu.hint_scan_fesetup Configure tuner(s) +menu.hint_scan_fetimeout Time to wait for signal, in 1/10 of second +menu.hint_scan_freq Enter transponder frequency +menu.hint_scan_fta Add only free-to-air (not-scrambled) channels +menu.hint_scan_ladirection Select latitude direction +menu.hint_scan_latitude Enter your latitude +menu.hint_scan_lnbconfig Configure LNB parameters for this satellite +menu.hint_scan_lodirection Select longtitude direction +menu.hint_scan_lofh High banb LNB frequency +menu.hint_scan_lofl Low band LNB frequency +menu.hint_scan_lofs Band switch LNB frequency +menu.hint_scan_logical Use provider's channel numbering +menu.hint_scan_logical_hd If both SD and HD channel versions present\nput HD to the top of list +menu.hint_scan_longitude Enter your longtitude +menu.hint_scan_manual Manual transponder scan using\nselected parameters +menu.hint_scan_mod Select transponder modulation +menu.hint_scan_motor_18v Use 18V when moving rotor +menu.hint_scan_motor_speed Rotor moving speed in 1/10 degree\nper second +menu.hint_scan_motorpos Select stored position number for\nthis satellite +menu.hint_scan_nid Enter decimal network ID +menu.hint_scan_nit Add transpoders from network information +menu.hint_scan_pids Scan and save audio/video/PMT PIDs +menu.hint_scan_pol Select transponder polarization +menu.hint_scan_rate Enter transponder symbol rate +menu.hint_scan_reset_numbers Reset exising channel numbers\nand re-number channels after scan +menu.hint_scan_satadd Add satellites for this frontend +menu.hint_scan_satellite Select satellite to scan +menu.hint_scan_satenable Enable satellite for this frontend +menu.hint_scan_satfind Satellite finder: manually drive your rotor\nto setup stored positions +menu.hint_scan_satfind_start Start Satellite finder +menu.hint_scan_satscan Scan selected satellite +menu.hint_scan_satselect Select satellite +menu.hint_scan_satsetup Configure satellites options +menu.hint_scan_savesettings Save tuner config and scan settings\nAlso saved, if you start service scan +menu.hint_scan_scantype Select, which channel types to scan +menu.hint_scan_setup_fe Configure selected frontend options +menu.hint_scan_start Start scan. You can use 'exit' button to stop +menu.hint_scan_test Test signal for this transponder +menu.hint_scan_tpselect Select transponder to scan +menu.hint_scan_uncommited Select uncommited input for\nthis satellite +menu.hint_scan_usals_repeat Repeat usals move rotor commands\nif you expirience unstable rotor move +menu.hint_scan_usalsall Set/unset usals flag for all satellites +menu.hint_scan_useusals Use USALS for\nthis satellite +menu.hint_scrambled_message Show scrambled message, when channel cannot be decoded +menu.hint_screen_setup Configure screen margins +menu.hint_screenshot_count When no GUI on screen, you can save 1-5\nscreenshot serie +menu.hint_screenshot_cover ON: When playing record, overwrite single\nscreenshot to show inside MovieBrowser +menu.hint_screenshot_dir Select directory to save screenshots +menu.hint_screenshot_format File format to save screenshot +menu.hint_screenshot_res Screenshot size: current channel's video size\nor OSD size (1280x720) +menu.hint_screenshot_scale For video+OSD screenshots, scale to video size +menu.hint_screenshot_setup Configure screenshots options +menu.hint_screenshot_video Include live video in screenshot +menu.hint_scripts Run scripts +menu.hint_selected_back Change selected item background color +menu.hint_selected_text Change selected item text color +menu.hint_service Tuner setup, service scan,\nbouquet editor, software upgrade +menu.hint_service_scan Tuner setup, service scan +menu.hint_settings Configure Neutrino-HD\nNetwork, audio, video, OSD and more +menu.hint_show_mute_icon Show mute icon, when volume set to 0 +menu.hint_shutdown Put your box in deep standby mode\nNo confirmation +menu.hint_shutdown_count Time to put box in deep-standby\nfrom soft-standby mode +menu.hint_shutdown_rcdelay Enable deep-standby, if power button\npressed more than 1 second +menu.hint_shutdown_real Enable soft-standby mode\nIf disabled, power button put box to deep-standby +menu.hint_sleeptimer Set timer to put your box\nin sleep mode +menu.hint_soft_restart Restart Neutrino-HD without reboot +menu.hint_softupdate_check In the Internet or local check for available updates +menu.hint_softupdate_expert Separate partitions from the flash read / write to the flash +menu.hint_softupdate_expert_read Separate partitions (U-Boot, Splash, Kernel, SystemFS) from the flash read +menu.hint_softupdate_expert_write Separate partitions (Splash, Kernel, SystemFS) write to the flash +menu.hint_softupdate_settings Update mode, the local directory and the configuration file to set +menu.hint_start_tostandby Enter standby mode after boot +menu.hint_streaminfo Current channel info: pids, signal and noise ratio\nBitrate graphs +menu.hint_subchannel_pos Select subchannels menu position +menu.hint_sw_update Update software +menu.hint_theme Select pre-defined color theme\nSave or load theme from files +menu.hint_timeouts Configure time to hide GUI windows\nin seconds +menu.hint_timers Add/Remove/Edit scheduled\nrecording, reminders etc. +menu.hint_timezone Select your timezone +menu.hint_tvmode Switch box to TV mode +menu.hint_tvradio_switch Switches between TV and Radio mode +menu.hint_vfd Frontpanel LEDS, VFD options +menu.hint_vfd_brightness Working brightness +menu.hint_vfd_brightness_setup Configure frontpanel display brightness\nfor different modes +menu.hint_vfd_brightnessdeepstandby Brightness in deep-standby mode +menu.hint_vfd_brightnessdim Auto-dim brightness +menu.hint_vfd_brightnessstandby Brightness in soft-standby mode +menu.hint_vfd_defaults Restore default brightness values +menu.hint_vfd_dimtime Auto-dim time, in seconds +menu.hint_vfd_infoline Choose what to display in main VFD line +menu.hint_vfd_statusline Choose what to display in short\nVFD status line +menu.hint_video Video output, resolution, format\nAspect ratio, fast mode switch options +menu.hint_video_43mode Display mode for 4:3 content\non 16:9 TV +menu.hint_video_analog_mode Select analog output mode\nfor SCART and CINCH connectors +menu.hint_video_cinch_mode Select analog output mode for\ncomposite video out +menu.hint_video_dbdr MPEG2 enhancement filters +menu.hint_video_format TV aspect ratio +menu.hint_video_mode HDMI output video mode +menu.hint_video_modes VF key will cycle between enabled modes +menu.hint_video_scart_mode Select analog output mode for SCART connectors +menu.hint_volume_digits Numeric display of the volumebar on/off +menu.hint_volume_pos Select volume indicator position +menu.hint_zap_cycle When swithing channels, stay in current bouquet menu.next Next (press Menu to quit) messagebox.back Back messagebox.cancel Cancel @@ -726,12 +1103,12 @@ miscsettings.infobar_casystem_mini mini miscsettings.infobar_casystem_mode discreet miscsettings.infobar_colored_events Program colored miscsettings.infobar_disp_0 without Logo -miscsettings.infobar_disp_1 Logo 1 -miscsettings.infobar_disp_2 Logo 2 -miscsettings.infobar_disp_3 Logo 3 -miscsettings.infobar_disp_4 Logo 4 -miscsettings.infobar_disp_5 Logo 5 -miscsettings.infobar_disp_6 Logo 6 +miscsettings.infobar_disp_1 Logo in number box +miscsettings.infobar_disp_2 Logo+channel number +miscsettings.infobar_disp_3 Logo+channel name+signal +miscsettings.infobar_disp_4 Logo+channel name/number +miscsettings.infobar_disp_5 Logo+signal +miscsettings.infobar_disp_6 Logo+channel number+signal miscsettings.infobar_disp_log Logo miscsettings.infobar_logo_hdd_dir Logo dir miscsettings.infobar_sat_display Satellite display on infobar @@ -784,6 +1161,7 @@ motorcontrol.store Store Motor Position (a) motorcontrol.timed_mode Timed Step Mode motorcontrol.user_menu User menu motorcontrol.west_limit Set West (soft) Limit +moviebrowser.book_add Add bookmark moviebrowser.book_clear_all Clear all moviebrowser.book_head Bookmarks moviebrowser.book_lastmoviestop Last play stop: @@ -949,14 +1327,14 @@ networkmenu.ntpserver NTP-Server networkmenu.ntpserver_hint1 NTP-Server example: ntp1.ptb.de networkmenu.ntpserver_hint2 need reboot or epg-reset networkmenu.ntptitle Time-Syncronisation -networkmenu.password Key +networkmenu.password Pre-Shared Key (PSK) networkmenu.reset_settings_now Do you want restore the previous settings? networkmenu.select_if Interface networkmenu.services Network services networkmenu.setupnow Apply network settings now networkmenu.setuponstartup Setup network on startup networkmenu.show Show active Network settings -networkmenu.ssid Network name +networkmenu.ssid Network name (SSID) networkmenu.test Test network now neutrino_starting Neutrino starting... nfs.alreadymounted directory already mounted @@ -1091,7 +1469,7 @@ rclock.lockmsg Your box remote control will be locked.\n To unlock it, press - + - + - - + + - + @@ -1425,7 +1425,7 @@ - + @@ -1433,13 +1433,13 @@ - + - + @@ -1452,8 +1452,8 @@ - - + + @@ -1465,7 +1465,7 @@ - + @@ -1557,8 +1557,10 @@ + + @@ -1569,16 +1571,23 @@ + + + + + + - + + @@ -1591,7 +1600,7 @@ - + @@ -1620,7 +1629,7 @@ - + diff --git a/data/scripts/backup.sh b/data/scripts/backup.sh index d9998007e..2ab6bcf7e 100755 --- a/data/scripts/backup.sh +++ b/data/scripts/backup.sh @@ -24,4 +24,4 @@ TOBACKUP=$(echo $RES) echo Backup to $1/settings_$DATE.tar -tar -cf $1/settings_$DATE.tar $TOBACKUP +tar -cf $1/settings_$DATE.tar $TOBACKUP 2>&1 >/dev/null diff --git a/lib/libcoolstream/record_cs.h b/lib/libcoolstream/record_cs.h index 51b28bfe6..4ef6f3df0 100644 --- a/lib/libcoolstream/record_cs.h +++ b/lib/libcoolstream/record_cs.h @@ -5,6 +5,7 @@ /* */ /* (C) 2008 CoolStream International */ /* */ +/* $Id:: $ */ /*******************************************************************************/ #ifndef __RECORD_CS_H_ #define __RECORD_CS_H_ @@ -13,13 +14,15 @@ class cRecordData; +#define REC_STATUS_OK 0 +#define REC_STATUS_SLOW 1 +#define REC_STATUS_OVERFLOW 2 + class cRecord { private: cRecordData * rd; bool enabled; - int num_apids; int unit; - int nRecordFD; public: cRecord(int num = 0); @@ -27,11 +30,11 @@ public: bool Open(); void Close(void); - bool Start(int fd, unsigned short vpid, unsigned short * apids, int numapids); + bool Start(int fd, unsigned short vpid, unsigned short * apids, int numapids, uint64_t chid); bool Stop(void); bool AddPid(unsigned short pid); - /* not tested */ - bool ChangePids(unsigned short vpid, unsigned short * apids, int numapids); + int GetStatus(); + void ResetStatus(); }; #endif // __RECORD_CS_H_ diff --git a/lib/libdvbsub/dvbsub.cpp b/lib/libdvbsub/dvbsub.cpp index 2bf1ccbee..66eeb386d 100644 --- a/lib/libdvbsub/dvbsub.cpp +++ b/lib/libdvbsub/dvbsub.cpp @@ -16,7 +16,6 @@ #include "Debug.hpp" #include "PacketQueue.hpp" -#include "semaphore.h" #include "helpers.hpp" #include "dvbsubtitle.h" diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index e86971ac0..c0ee5f75c 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -22,7 +22,7 @@ extern "C" { #include #include } -#include "driver/framebuffer.h" +#include #include "Debug.hpp" // Set these to 'true' for debug output: diff --git a/lib/libnet/libnet.c b/lib/libnet/libnet.c index 9eb1cb679..87a0ef294 100644 --- a/lib/libnet/libnet.c +++ b/lib/libnet/libnet.c @@ -9,6 +9,8 @@ #include #include +#if 0 +//never used static void scanip( char *str, unsigned char *to ) { int val; @@ -80,7 +82,7 @@ abbruch: return rc; } - +#endif void netGetIP( char *dev, char *ip, char *mask, char *brdcast ) { int fd; @@ -114,7 +116,8 @@ void netGetIP( char *dev, char *ip, char *mask, char *brdcast ) close(fd); return; } - +#if 0 +//never used void netSetDefaultRoute( char *gw ) { struct rtentry re; @@ -149,7 +152,7 @@ void netSetDefaultRoute( char *gw ) close(fd); return; } - +#endif void netGetDefaultRoute( char *ip ) { FILE *fp; @@ -175,11 +178,12 @@ void netGetDefaultRoute( char *ip ) fclose(fp); } -static char dombuf[256]; static char hostbuf[256]; -static char domis=0; static char hostis=0; - +#if 0 +static char dombuf[256]; +static char domis=0; +//never used char *netGetDomainname( void ) { if (!domis) @@ -194,7 +198,7 @@ void netSetDomainname( char *dom ) domis=1; setdomainname(dombuf,strlen(dombuf)+1); } - +#endif char *netGetHostname( void ) { if (!hostis) diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index bfc54c9ed..5ab9e8440 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -17,9 +17,10 @@ #include "teletext.h" #include "tuxtxt.h" -#include "driver/framebuffer.h" +#include #include #include +#include /* same as in rcinput.h... */ #define KEY_TTTV KEY_FN_1 @@ -104,7 +105,7 @@ void gethotlist() hotlistchanged = 0; maxhotlist = -1; - sprintf(line, CONFIGDIR "/tuxtxt/hotlist%d.conf", tuxtxt_cache.vtxtpid); + sprintf(line, TUXTXTDIR "/hotlist%d.conf", tuxtxt_cache.vtxtpid); #if TUXTXT_DEBUG printf("TuxTxt paintBackground(); } - +#if 0 +//never used void ClearB(int color) { FillRect(0, 0, var_screeninfo.xres, var_screeninfo.yres, color); /* framebuffer */ FillRect(0, var_screeninfo.yres, var_screeninfo.xres, var_screeninfo.yres, color); /* backbuffer */ CFrameBuffer::getInstance()->blit(); } - +#endif int GetCurFontWidth() { int mx = (displaywidth)%(40-nofirst); // # of unused pixels @@ -1956,6 +1958,10 @@ int Init(int source) /* init lcd */ UpdateLCD(); + /* create TUXTXTDIR if necessary */ + if (!access(TUXTXTDIR, F_OK) == 0) + mkdir(TUXTXTDIR, 0755); + /* config defaults */ screenmode = 0; screen_mode1 = 0; diff --git a/lib/libtuxtxt/tuxtxt.h b/lib/libtuxtxt/tuxtxt.h index 218232de2..f29a44e69 100644 --- a/lib/libtuxtxt/tuxtxt.h +++ b/lib/libtuxtxt/tuxtxt.h @@ -34,10 +34,6 @@ #include -#ifndef NEW_CST_KERNEL -//#include -#endif - #include #include @@ -70,7 +66,8 @@ extern int tuxtxt_get_zipsize(int p, int sp); #endif -#define TUXTXTCONF CONFIGDIR "/tuxtxt/tuxtxt2.conf" +#define TUXTXTDIR CONFIGDIR "/tuxtxt" +#define TUXTXTCONF TUXTXTDIR "/tuxtxt2.conf" /* fonts */ #define TUXTXTTTF FONTDIR "/tuxtxt.ttf" diff --git a/lib/sectionsdclient/sectionsdMsg.h b/lib/sectionsdclient/sectionsdMsg.h index 527b45cce..4595a80ca 100644 --- a/lib/sectionsdclient/sectionsdMsg.h +++ b/lib/sectionsdclient/sectionsdMsg.h @@ -54,28 +54,12 @@ struct sectionsd enum commands { dumpStatusinformation, // commandDumpStatusInformation - allEventsChannelIDSearch, // commandAllEventsChannelIDSearch pauseScanning, // commandPauseScanning // for the grabbers ;) getIsScanningActive, // commandGetIsScanningActive - actualEPGchannelID, // commandActualEPGchannelID - actualEventListTVshortIDs, // commandEventListTVids - actualEventListRadioShortIDs, // commandEventListRadioIDs - currentNextInformationID, // commandCurrentNextInfoChannelID - epgEPGid, // commandEPGepgID - epgEPGidShort, // commandEPGepgIDshort - ComponentTagsUniqueKey, // commandComponentTagsUniqueKey - allEventsChannelID_, // commandAllEventsChannelID - timesNVODservice, // commandTimesNVODservice getIsTimeSet, // commandGetIsTimeSet serviceChanged, // commandserviceChanged - LinkageDescriptorsUniqueKey, // commandLinkageDescriptorsUniqueKey CMD_registerEvents, // commandRegisterEventClient CMD_unregisterEvents, // commandUnRegisterEventClient -#ifdef ENABLE_PPT - setPrivatePid, // commandSetPrivatePid -#else - dummy11_setPrivatePid, -#endif freeMemory, // commandFreeMemory readSIfromXML, // commandReadSIfromXML writeSI2XML, // commandWriteSI2XML @@ -85,11 +69,13 @@ struct sectionsd numberOfCommands // <- no actual command, end of command marker }; +#if 0 struct commandGetEPGid { uint64_t eventid; time_t starttime; } __attribute__ ((packed)) ; +#endif struct commandSetServiceChanged { diff --git a/lib/sectionsdclient/sectionsdclient.cpp b/lib/sectionsdclient/sectionsdclient.cpp index 97eadb83d..4c6e16c0c 100644 --- a/lib/sectionsdclient/sectionsdclient.cpp +++ b/lib/sectionsdclient/sectionsdclient.cpp @@ -56,7 +56,6 @@ int CSectionsdClient::readResponse(char* data,unsigned int size) return responseHeader.dataLength; } - bool CSectionsdClient::send(const unsigned char command, const char* data, const unsigned int size) { sectionsd::msgRequestHeader msgHead; @@ -161,7 +160,61 @@ void CSectionsdClient::setServiceChanged(const t_channel_id channel_id, const bo close_connection(); } +void CSectionsdClient::freeMemory() +{ + send(sectionsd::freeMemory); + readResponse(); + close_connection(); +} + +void CSectionsdClient::readSIfromXML(const char * epgxmlname) +{ + send(sectionsd::readSIfromXML, (char*) epgxmlname, strlen(epgxmlname)); + + readResponse(); + close_connection(); +} + +void CSectionsdClient::writeSI2XML(const char * epgxmlname) +{ + send(sectionsd::writeSI2XML, (char*) epgxmlname, strlen(epgxmlname)); + + readResponse(); + close_connection(); +} + +void CSectionsdClient::setConfig(const epg_config config) +{ + sectionsd::commandSetConfig *msg; + char* pData = new char[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1]; + msg = (sectionsd::commandSetConfig *)pData; + + msg->scanMode = config.scanMode; + msg->epg_cache = config.epg_cache; + msg->epg_old_events = config.epg_old_events; + msg->epg_max_events = config.epg_max_events; + msg->network_ntprefresh = config.network_ntprefresh; + msg->network_ntpenable = config.network_ntpenable; + msg->epg_extendedcache = config.epg_extendedcache; +// config.network_ntpserver: + strcpy(&pData[sizeof(sectionsd::commandSetConfig)], config.network_ntpserver.c_str()); +// config.epg_dir: + strcpy(&pData[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1], config.epg_dir.c_str()); + + send(sectionsd::setConfig, (char*)pData, sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1); + readResponse(); + close_connection(); + delete[] pData; +} + +void CSectionsdClient::dumpStatus() +{ + send(sectionsd::dumpStatusinformation); + close_connection(); +} + +#if 0 bool CSectionsdClient::getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags) { if (send(sectionsd::ComponentTagsUniqueKey, (char*)&uniqueKey, sizeof(uniqueKey))) @@ -277,7 +330,6 @@ bool CSectionsdClient::getNVODTimesServiceKey(const t_channel_id channel_id, CSe } } - bool CSectionsdClient::getCurrentNextServiceKey(const t_channel_id channel_id, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next) { if (send(sectionsd::currentNextInformationID, (char*)&channel_id, sizeof(channel_id))) @@ -321,8 +373,6 @@ bool CSectionsdClient::getCurrentNextServiceKey(const t_channel_id channel_id, C } } - - CChannelEventList CSectionsdClient::getChannelEvents(const bool tv_mode, t_channel_id *p_requested_channels, int size_requested_channels) { CChannelEventList eList; @@ -479,6 +529,8 @@ CChannelEventList CSectionsdClient::getEventsServiceKey(const t_channel_id chann close_connection(); return eList; } + +//never used void showhexdumpa (char *label, unsigned char * from, int len) { int i, j, k; @@ -613,7 +665,6 @@ bool CSectionsdClient::getActualEPGServiceKey(const t_channel_id channel_id, CEP return false; } - bool CSectionsdClient::getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata) { sectionsd::commandGetEPGid msg; @@ -669,7 +720,6 @@ bool CSectionsdClient::getEPGid(const event_id_t eventid, const time_t starttime return false; } - bool CSectionsdClient::getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata) { if (send(sectionsd::epgEPGidShort, (char*)&eventid, sizeof(eventid))) @@ -717,57 +767,5 @@ void CSectionsdClient::setPrivatePid(const unsigned short pid) close_connection(); } #endif +#endif -void CSectionsdClient::freeMemory() -{ - send(sectionsd::freeMemory); - - readResponse(); - close_connection(); -} - -void CSectionsdClient::readSIfromXML(const char * epgxmlname) -{ - send(sectionsd::readSIfromXML, (char*) epgxmlname, strlen(epgxmlname)); - - readResponse(); - close_connection(); -} - -void CSectionsdClient::writeSI2XML(const char * epgxmlname) -{ - send(sectionsd::writeSI2XML, (char*) epgxmlname, strlen(epgxmlname)); - - readResponse(); - close_connection(); -} - -void CSectionsdClient::setConfig(const epg_config config) -{ - sectionsd::commandSetConfig *msg; - char* pData = new char[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1]; - msg = (sectionsd::commandSetConfig *)pData; - - msg->scanMode = config.scanMode; - msg->epg_cache = config.epg_cache; - msg->epg_old_events = config.epg_old_events; - msg->epg_max_events = config.epg_max_events; - msg->network_ntprefresh = config.network_ntprefresh; - msg->network_ntpenable = config.network_ntpenable; - msg->epg_extendedcache = config.epg_extendedcache; -// config.network_ntpserver: - strcpy(&pData[sizeof(sectionsd::commandSetConfig)], config.network_ntpserver.c_str()); -// config.epg_dir: - strcpy(&pData[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1], config.epg_dir.c_str()); - - send(sectionsd::setConfig, (char*)pData, sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1); - readResponse(); - close_connection(); - delete[] pData; -} - -void CSectionsdClient::dumpStatus() -{ - send(sectionsd::dumpStatusinformation); - close_connection(); -} diff --git a/lib/sectionsdclient/sectionsdclient.h b/lib/sectionsdclient/sectionsdclient.h index d42e99237..3d2d0d438 100644 --- a/lib/sectionsdclient/sectionsdclient.h +++ b/lib/sectionsdclient/sectionsdclient.h @@ -36,13 +36,6 @@ class CShortEPGData std::string title; std::string info1; std::string info2; - - CShortEPGData() - { - title = ""; - info1 = ""; - info2 = ""; - }; }; class CEPGData; @@ -69,9 +62,10 @@ class CSectionsdClient : private CBasicClient int readResponse(char* data = NULL, unsigned int size = 0); bool send(const unsigned char command, const char* data = NULL, const unsigned int size = 0); - char * parseExtendedEvents(char * dp, CEPGData * epgdata); + //char * parseExtendedEvents(char * dp, CEPGData * epgdata); public: + virtual ~CSectionsdClient() {}; enum SIlanguageMode_t { ALL, FIRST_FIRST, @@ -85,8 +79,10 @@ class CSectionsdClient : private CBasicClient { EVT_TIMESET, EVT_GOT_CN_EPG, +#if 0 EVT_SERVICES_UPDATE, EVT_BOUQUETS_UPDATE, +#endif EVT_WRITE_SI_FINISHED }; @@ -125,6 +121,10 @@ class CSectionsdClient : private CBasicClient { time_t startzeit; unsigned dauer; + sectionsdTime() { + startzeit = 0; + dauer = 0; + } } __attribute__ ((packed)) ; struct responseGetNVODTimes @@ -164,35 +164,25 @@ class CSectionsdClient : private CBasicClient std::string epg_dir; } epg_config; +#if 0 bool getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); - bool getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); - bool getNVODTimesServiceKey(const t_channel_id channel_id, CSectionsdClient::NVODTimesList& nvod_list); - bool getCurrentNextServiceKey(const t_channel_id channel_id, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next); + CChannelEventList getChannelEvents(const bool tv_mode = true, t_channel_id* = NULL, int size = 0); + CChannelEventList getEventsServiceKey(const t_channel_id channel_id); + bool getEventsServiceKeySearchAdd(CChannelEventList& evtlist,const t_channel_id channel_id,char m_search_typ,std::string& m_search_text); + bool getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata); + bool getActualEPGServiceKey(const t_channel_id channel_id, CEPGData * epgdata); + bool getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata); + void setPrivatePid(const unsigned short pid); +#endif bool getIsTimeSet(); - void setPauseScanning(const bool doPause); - - bool getIsScanningActive(); - void setServiceChanged(const t_channel_id channel_id, const bool requestEvent); - CChannelEventList getChannelEvents(const bool tv_mode = true, t_channel_id* = NULL, int size = 0); - - CChannelEventList getEventsServiceKey(const t_channel_id channel_id); - - bool getEventsServiceKeySearchAdd(CChannelEventList& evtlist,const t_channel_id channel_id,char m_search_typ,std::string& m_search_text); - - bool getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata); - - bool getActualEPGServiceKey(const t_channel_id channel_id, CEPGData * epgdata); - - bool getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata); - - void setPrivatePid(const unsigned short pid); + bool getIsScanningActive(); void freeMemory(); @@ -234,15 +224,9 @@ class CEPGData CEPGData() { eventID = 0; - title = ""; - info1 = ""; - info2 = ""; fsk = 0; table_id = 0xff; - contentClassification = ""; - userClassification = ""; }; - }; #endif diff --git a/lib/timerdclient/timerdclient.h b/lib/timerdclient/timerdclient.h index 6b763c7c5..f9e66625b 100644 --- a/lib/timerdclient/timerdclient.h +++ b/lib/timerdclient/timerdclient.h @@ -41,6 +41,7 @@ class CTimerdClient:private CBasicClient virtual const char * getSocketName() const; public: + virtual ~CTimerdClient() {}; enum events { EVT_SHUTDOWN = 1, diff --git a/lib/xmltree/xmlparse.cpp b/lib/xmltree/xmlparse.cpp index d0a531824..f2c2c5fd2 100644 --- a/lib/xmltree/xmlparse.cpp +++ b/lib/xmltree/xmlparse.cpp @@ -43,7 +43,7 @@ ChangeLog: #include #include -#include "xmldef.h" +#include "xmltok/xmldef.h" #ifdef XML_UNICODE #define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX diff --git a/lib/xmltree/xmlrole.c b/lib/xmltree/xmlrole.c index 27d5c41ce..23b3a62c4 100644 --- a/lib/xmltree/xmlrole.c +++ b/lib/xmltree/xmlrole.c @@ -18,7 +18,7 @@ James Clark. All Rights Reserved. Contributor(s): */ -#include "xmldef.h" +#include "xmltok/xmldef.h" #include "xmlrole.h" /* Doesn't check: diff --git a/lib/xmltree/xmltok.c b/lib/xmltree/xmltok.c index 4634a0356..989ea638b 100644 --- a/lib/xmltree/xmltok.c +++ b/lib/xmltree/xmltok.c @@ -18,9 +18,9 @@ James Clark. All Rights Reserved. Contributor(s): */ -#include "xmldef.h" +#include "xmltok/xmldef.h" #include "xmltok.h" -#include "nametab.h" +#include "xmltok/nametab.h" #define VTABLE1 \ { PREFIX(prologTok), PREFIX(contentTok), PREFIX(cdataSectionTok) }, \ @@ -265,7 +265,7 @@ static const struct normal_encoding utf8_encoding = { { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, { #include "asciitab.h" -#include "utf8tab.h" +#include "xmltok/utf8tab.h" }, NORMAL_VTABLE(utf8_) }; @@ -274,7 +274,7 @@ static const struct normal_encoding internal_utf8_encoding = { { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, { #include "iasctab.h" -#include "utf8tab.h" +#include "xmltok/utf8tab.h" }, NORMAL_VTABLE(utf8_) }; @@ -319,7 +319,7 @@ static const struct normal_encoding latin1_encoding = { { VTABLE1, latin1_toUtf8, latin1_toUtf16, 1, 0, 0 }, { #include "asciitab.h" -#include "latin1tab.h" +#include "xmltok/latin1tab.h" }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; @@ -490,7 +490,7 @@ static const struct normal_encoding little2_encoding = { }, { #include "asciitab.h" -#include "latin1tab.h" +#include "xmltok/latin1tab.h" }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; @@ -501,7 +501,7 @@ static const struct normal_encoding internal_little2_encoding = { { VTABLE, 2, 0, 1 }, { #include "iasctab.h" -#include "latin1tab.h" +#include "xmltok/latin1tab.h" }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; @@ -559,7 +559,7 @@ static const struct normal_encoding big2_encoding = { }, { #include "asciitab.h" -#include "latin1tab.h" +#include "xmltok/latin1tab.h" }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp index 17dbb8928..d5626740e 100644 --- a/src/daemonc/remotecontrol.cpp +++ b/src/daemonc/remotecontrol.cpp @@ -43,13 +43,14 @@ #include #include -#include "libdvbsub/dvbsub.h" -#include "libtuxtxt/teletext.h" +#include +#include #include #include #include #include +#include #define ZAP_GUARD_TIME 2000 // ms @@ -57,11 +58,6 @@ extern CBouquetManager *g_bouquetManager; extern uint32_t scrambled_timer; -bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); -bool sectionsd_getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); -bool sectionsd_getNVODTimesServiceKey(const t_channel_id uniqueServiceKey, CSectionsdClient::NVODTimesList& nvod_list); -void sectionsd_setPrivatePid(unsigned short pid); - CSubService::CSubService(const t_original_network_id anoriginal_network_id, const t_service_id aservice_id, const t_transport_stream_id atransport_stream_id, const std::string &asubservice_name) { service.original_network_id = anoriginal_network_id; @@ -279,8 +275,6 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data { CVFD::getInstance()->showServicename(current_channel_name); // UTF-8 g_Zapit->getPIDS( current_PIDs ); - //g_Sectionsd->setPrivatePid( current_PIDs.PIDs.privatepid ); - sectionsd_setPrivatePid( current_PIDs.PIDs.privatepid ); //tuxtxt #if 1 tuxtxt_stop(); @@ -355,8 +349,7 @@ void CRemoteControl::getSubChannels() if ( subChannels.empty() ) { CSectionsdClient::LinkageDescriptorList linkedServices; - //if ( g_Sectionsd->getLinkageDescriptorsUniqueKey( current_EPGid, linkedServices ) ) - if ( sectionsd_getLinkageDescriptorsUniqueKey( current_EPGid, linkedServices ) ) + if (CEitManager::getInstance()->getLinkageDescriptorsUniqueKey( current_EPGid, linkedServices)) { if ( linkedServices.size()> 1 ) { @@ -389,8 +382,7 @@ void CRemoteControl::getNVODs() if ( subChannels.empty() ) { CSectionsdClient::NVODTimesList NVODs; - //if ( g_Sectionsd->getNVODTimesServiceKey( current_channel_id & 0xFFFFFFFFFFFFULL, NVODs ) ) - if ( sectionsd_getNVODTimesServiceKey( current_channel_id & 0xFFFFFFFFFFFFULL, NVODs ) ) + if (CEitManager::getInstance()->getNVODTimesServiceKey( current_channel_id, NVODs)) { are_subchannels = false; //printf("CRemoteControl::getNVODs NVODs.size %d\n", NVODs.size()); @@ -506,13 +498,13 @@ void CRemoteControl::processAPIDnames() if ( current_PIDs.APIDs[count].is_ac3 ) { if(!strstr(current_PIDs.APIDs[count].desc, " (AC3)")) - strncat(current_PIDs.APIDs[count].desc, " (AC3)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[count].desc)); + strncat(current_PIDs.APIDs[count].desc, " (AC3)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[count].desc)-1); has_ac3 = true; if(g_settings.audio_DolbyDigital && (ac3_found < 0)) ac3_found = count; } else if (current_PIDs.APIDs[count].is_aac && !strstr(current_PIDs.APIDs[count].desc, " (AAC)")) - strncat(current_PIDs.APIDs[count].desc, " (AAC)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[count].desc)); + strncat(current_PIDs.APIDs[count].desc, " (AAC)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[count].desc)-1); } if ( has_unresolved_ctags ) @@ -520,8 +512,7 @@ void CRemoteControl::processAPIDnames() if ( current_EPGid != 0 ) { CSectionsdClient::ComponentTagList tags; - //if ( g_Sectionsd->getComponentTagsUniqueKey( current_EPGid, tags ) ) - if ( sectionsd_getComponentTagsUniqueKey( current_EPGid, tags ) ) + if (CEitManager::getInstance()->getComponentTagsUniqueKey(current_EPGid, tags)) { has_unresolved_ctags = false; @@ -534,11 +525,11 @@ void CRemoteControl::processAPIDnames() // workaround for buggy ZDF ctags / or buggy sectionsd/drivers , who knows... if(!tags[i].component.empty()) { - strncpy(current_PIDs.APIDs[j].desc, tags[i].component.c_str(), DESC_MAX_LEN); + strncpy(current_PIDs.APIDs[j].desc, tags[i].component.c_str(), DESC_MAX_LEN-1); if (current_PIDs.APIDs[j].is_ac3 && !strstr(current_PIDs.APIDs[j].desc, " (AC3)")) - strncat(current_PIDs.APIDs[j].desc, " (AC3)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[j].desc)); + strncat(current_PIDs.APIDs[j].desc, " (AC3)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[j].desc)-1); else if (current_PIDs.APIDs[j].is_aac && !strstr(current_PIDs.APIDs[j].desc, " (AAC)")) - strncat(current_PIDs.APIDs[j].desc, " (AAC)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[j].desc)); + strncat(current_PIDs.APIDs[j].desc, " (AAC)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[j].desc)-1); } current_PIDs.APIDs[j].component_tag = -1; break; diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 7e8c40075..65db01cc5 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -18,23 +18,24 @@ noinst_LIBRARIES = libneutrino_driver.a libneutrino_driver_netfile.a libneutrino_driver_a_SOURCES = \ abstime.c \ - fontrenderer.cpp \ + audiofile.cpp \ + audiometadata.cpp \ + audioplay.cpp \ + fader.cpp \ fb_window.cpp \ + file.cpp \ + fontrenderer.cpp \ + genpsi.c \ + radiotext.cpp \ + radiotools.cpp \ rcinput.cpp \ record.cpp \ - audioplay.cpp \ - screen_max.cpp \ - file.cpp \ - audiometadata.cpp \ - audiofile.cpp \ - shutdown_count.cpp \ - genpsi.c \ - streamts.cpp \ - radiotools.cpp \ - radiotext.cpp \ - fader.cpp \ ringbuffer.c \ + screen_max.cpp \ + shutdown_count.cpp \ + streamts.cpp \ volume.cpp +# screenshot.cpp if BOXTYPE_GENERIC libneutrino_driver_a_SOURCES += \ diff --git a/src/driver/audiodec/Makefile.am b/src/driver/audiodec/Makefile.am index 4250e31c8..d2208b51b 100644 --- a/src/driver/audiodec/Makefile.am +++ b/src/driver/audiodec/Makefile.am @@ -31,10 +31,10 @@ endif libneutrino_driver_audiodec_a_SOURCES = \ basedec.cpp \ cdrdec.cpp \ + crc.c \ + $(FLACdec) \ mp3dec.cpp \ oggdec.cpp \ - wavdec.cpp \ - $(FLACdec) \ tag.c \ - crc.c + wavdec.cpp # vis.cpp diff --git a/src/driver/audiodec/flacdec.cpp b/src/driver/audiodec/flacdec.cpp index f988940f8..1ed0fd0d0 100644 --- a/src/driver/audiodec/flacdec.cpp +++ b/src/driver/audiodec/flacdec.cpp @@ -81,12 +81,13 @@ FLAC__StreamDecoderSeekStatus flac_seek(const FLAC__StreamDecoder *, FLAC__uint6 else return FLAC__STREAM_DECODER_SEEK_STATUS_OK; } - +#if 0 +//never used int flac_close(void *) { return 0; } - +#endif FLAC__StreamDecoderTellStatus flac_tell(const FLAC__StreamDecoder *, FLAC__uint64 *absolute_byte_offset, void *client_data) { CFlacDec * flacdec = (CFlacDec *)client_data; diff --git a/src/driver/audiodec/int_fft.c b/src/driver/audiodec/int_fft.c index 5f8a7f62d..d44aa66fe 100644 --- a/src/driver/audiodec/int_fft.c +++ b/src/driver/audiodec/int_fft.c @@ -84,6 +84,8 @@ fixed fix_mpy(fixed a, fixed b); size of data = 2**m set inverse to 0=dft, 1=idft */ +#if 0 +//never used int fix_fft(fixed fr[], fixed fi[], int m, int inverse) { int mr,nn,i,j,l,k,istep, n, scale, shift; @@ -180,7 +182,7 @@ fix_mpy(wi,fr[j]); return scale; } - +#endif /* window() - apply a Hanning window */ void window(fixed fr[], int n) @@ -203,6 +205,8 @@ void window(fixed fr[], int n) was obtained from an inverse FFT, 0 otherwise. loud[] is the loudness, in dB wrt 32767; will be +10 to -N_LOUD. */ +#if 0 +//never used void fix_loud(fixed loud[], fixed fr[], fixed fi[], int n, int scale_shift) { int i, max; @@ -218,7 +222,7 @@ void fix_loud(fixed loud[], fixed fr[], fixed fi[], int n, int scale_shift) loud[i] = max; } } - +#endif /* db_from_ampl() - find loudness (in dB) from the complex amplitude. */ @@ -258,6 +262,8 @@ fixed fix_mpy(fixed a, fixed b) /* iscale() - scale an integer value by (numer/denom) */ +#if 0 +//never used int iscale(int value, int numer, int denom) { #ifdef DOS @@ -338,7 +344,7 @@ overflow: #endif } - +#endif #if N_WAVE != 1024 ERROR: N_WAVE != 1024 diff --git a/src/driver/audioplay.cpp b/src/driver/audioplay.cpp index 3358043df..3ea3fd4d4 100644 --- a/src/driver/audioplay.cpp +++ b/src/driver/audioplay.cpp @@ -34,7 +34,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include "global.h" +#include #include #include #include diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index 711803c4a..d5c35f56f 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -39,7 +39,7 @@ #include -#include +//#include #ifdef USE_OPENGL #include @@ -612,10 +612,12 @@ int CFrameBuffer::setMode(unsigned int /*nxRes*/, unsigned int /*nyRes*/, unsign #endif return 0; } - +#if 0 +//never used void CFrameBuffer::setTransparency( int /*tr*/ ) { } +#endif #if !HAVE_TRIPLEDRAGON void CFrameBuffer::setBlendMode(uint8_t mode) @@ -671,13 +673,15 @@ void CFrameBuffer::setBlendLevel(int level) } #endif +#if 0 +//never used void CFrameBuffer::setAlphaFade(int in, int num, int tr) { for (int i=0; iShowPicture((iconBasePath + filename).c_str()); } - +#endif bool CFrameBuffer::Lock() { if(locked) diff --git a/src/driver/netfile.cpp b/src/driver/netfile.cpp index 71d61d2f2..3a235e3fa 100644 --- a/src/driver/netfile.cpp +++ b/src/driver/netfile.cpp @@ -101,12 +101,10 @@ #endif #include "netfile.h" -#include "global.h" +#include #include #include #include -#include -#include #include /* TODO: @@ -1059,6 +1057,7 @@ FILE *f_open(const char *filename, const char *acctype) for(int i=0; ((ptr != NULL) && (i<25)); ptr = strstr(ptr, "http://") ) { strncpy(servers[i], ptr, 1023); + servers[i][1023] = '\0'; ptr2 = strchr(servers[i], '\n'); if(ptr2) *ptr2 = 0; // change ptr so that next strstr searches in buf and not in servers[i] @@ -1101,7 +1100,7 @@ FILE *f_open(const char *filename, const char *acctype) /* magic, if there is any */ for (int i = 0; i < known_magic_count; i++) { - if (((*(uint32_t *)&(magic[0])) & *(uint32_t *)&(known_magic[i].mask[0])) == *(uint32_t *)&(known_magic[i].mode[0])) + if (((*(unsigned char *)&(magic[0])) & *(unsigned char *)&(known_magic[i].mask[0])) == *(unsigned char *)&(known_magic[i].mode[0])) { f_type(fd, known_magic[i].type); goto magic_found; @@ -1300,6 +1299,7 @@ const char *f_type(FILE *stream, const char *type) { stream_type[i].stream = stream; strncpy(stream_type[i].type, type, 64); + stream_type[i].type[64] = '\0'; dprintf(stderr, "added entry (%s) for %p\n", type, stream); } return type; @@ -1720,7 +1720,8 @@ void ShoutCAST_ParseMetaData(char *md, CSTATE *state) if(!ptr) { ptr = strchr(md, '='); - strncpy(state->title, ptr + 2, 4096); + strncpy(state->title, ptr + 2, 4095); + state->title[4095] = '\0'; ptr = strchr(state->title, ';'); if(ptr) *(ptr - 1) = 0; @@ -1736,7 +1737,8 @@ void ShoutCAST_ParseMetaData(char *md, CSTATE *state) ptr = strstr(md, "StreamTitle="); ptr = strchr(ptr, '\''); - strncpy(state->artist, ptr + 1, 4096); + strncpy(state->artist, ptr + 1, 4095); + state->artist[4095] = '\0'; ptr = strstr(state->artist, " - "); if(!ptr) ptr = strstr(state->artist, ", "); diff --git a/src/driver/pictureviewer/Makefile.am b/src/driver/pictureviewer/Makefile.am index 1e7310784..0d55aafc3 100644 --- a/src/driver/pictureviewer/Makefile.am +++ b/src/driver/pictureviewer/Makefile.am @@ -23,5 +23,8 @@ endif noinst_LIBRARIES = libneutrino_pictureviewer.a libneutrino_pictureviewer_a_SOURCES = \ - pictureviewer.cpp png.cpp bmp.cpp \ - jpeg.cpp gif.cpp crw.cpp + crw.cpp \ + gif.cpp \ + jpeg.cpp \ + pictureviewer.cpp \ + png.cpp bmp.cpp diff --git a/src/driver/pictureviewer/fb_display.cpp b/src/driver/pictureviewer/fb_display.cpp index 469b07815..95b2a9b0e 100644 --- a/src/driver/pictureviewer/fb_display.cpp +++ b/src/driver/pictureviewer/fb_display.cpp @@ -18,7 +18,7 @@ #include #include "fb_display.h" #include "pictureviewer.h" -#include "driver/framebuffer.h" +#include static unsigned char *lfb = 0; diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index d6983b472..6660e2069 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -3,7 +3,6 @@ #include #include "pictureviewer.h" #include "pv_config.h" -#include "driver/framebuffer.h" #include #include diff --git a/src/driver/pictureviewer/pictureviewer.h b/src/driver/pictureviewer/pictureviewer.h index 094a11217..011fa8bee 100644 --- a/src/driver/pictureviewer/pictureviewer.h +++ b/src/driver/pictureviewer/pictureviewer.h @@ -30,7 +30,7 @@ #include #include /* printf */ #include /* gettimeofday */ -#include "driver/framebuffer.h" +#include class CPictureViewer { struct cformathandler diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index bbc86c756..1e7e8b595 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -300,7 +300,8 @@ void CRCInput::restartInput() open(); input_stopped = false; } - +#if 0 +//never used int CRCInput::messageLoop( bool anyKeyCancels, int timeout ) { neutrino_msg_t msg; @@ -351,6 +352,7 @@ int CRCInput::messageLoop( bool anyKeyCancels, int timeout ) } return res; } +#endif int CRCInput::addTimer(uint64_t Interval, bool oneshot, bool correct_time ) { @@ -1599,7 +1601,8 @@ void CRCInput::close_click() void CRCInput::open_click() { } - +#if 0 +//never used void CRCInput::reset_dsp(int /*rate*/) { } @@ -1607,7 +1610,7 @@ void CRCInput::reset_dsp(int /*rate*/) void CRCInput::set_dsp() { } - +#endif void CRCInput::play_click() { } diff --git a/src/driver/record.cpp b/src/driver/record.cpp index bcde1f378..fa0836111 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -5,12 +5,11 @@ Copyright (C) 2011 CoolStream International Ltd Copyright (C) 2011 Stefan Seyfried - License: GPL + License: GPLv2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + the Free Software Foundation; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -41,22 +40,23 @@ #include #include #include +#include #include #include #include #include #include #include -#include -#include +#include + #include -#include #include #include #include #include #include +#include /* TODO: * nextRecording / pending recordings - needs testing @@ -65,12 +65,6 @@ */ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ -t_channel_id rec_channel_id; - -bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); -bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); -bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); -bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); extern "C" { #include @@ -135,7 +129,14 @@ void CRecordInstance::WaitRecMsg(time_t StartTime, time_t WaitTime) usleep(100000); } -record_error_msg_t CRecordInstance::Start(CZapitChannel * channel /*, APIDList &apid_list*/) +int CRecordInstance::GetStatus() +{ + if (record) + return record->GetStatus(); + return 0; +} + +record_error_msg_t CRecordInstance::Start(CZapitChannel * channel) { int fd; std::string tsfile; @@ -143,7 +144,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel /*, APIDList & time_t msg_start_time = time(0); CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_RECORDING_START)); hintBox.paint(); - + tsfile = std::string(filename) + ".ts"; printf("%s: file %s vpid %x apid %x\n", __FUNCTION__, tsfile.c_str(), allpids.PIDs.vpid, apids[0]); @@ -176,11 +177,11 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel /*, APIDList & record->Open(); - if(!record->Start(fd, (unsigned short ) allpids.PIDs.vpid, (unsigned short *) apids, numpids)) { - /* Stop do close fd */ + if(!record->Start(fd, (unsigned short ) allpids.PIDs.vpid, (unsigned short *) apids, numpids, channel_id)) { record->Stop(); delete record; record = NULL; + close(fd); unlink(tsfile.c_str()); hintBox.hide(); return RECORD_FAILURE; @@ -194,11 +195,6 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel /*, APIDList & CCamManager::getInstance()->Start(channel->getChannelID(), CCamManager::RECORD); - int len; - unsigned char * pmt = channel->getRawPmt(len); - cCA * ca = cCA::GetInstance(); - ca->SendPMT(channel->getRecordDemux() /*DEMUX_SOURCE_2*/, pmt, len); - //CVFD::getInstance()->ShowIcon(VFD_ICON_CAM1, true); WaitRecMsg(msg_start_time, 2); hintBox.hide(); @@ -220,12 +216,13 @@ bool CRecordInstance::Stop(bool remove_event) time_t end_time = time(0); recMovieInfo->length = (int) round((double) (end_time - start_time) / (double) 60); - + CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, rec_stop_msg.c_str()); hintBox.paint(); printf("%s: channel %llx recording_id %d\n", __FUNCTION__, channel_id, recording_id); SaveXml(); + /* Stop do close fd - if started */ record->Stop(); if(!autoshift) @@ -234,8 +231,8 @@ bool CRecordInstance::Stop(bool remove_event) CCamManager::getInstance()->Stop(channel_id, CCamManager::RECORD); if((autoshift && g_settings.auto_delete) /* || autoshift_delete*/) { - snprintf(buf,sizeof(buf), "nice -n 20 rm -f %s.ts &", filename); - system(buf); + snprintf(buf,sizeof(buf), "\"%s.ts\"", filename); + my_system("nice", "-n20", "rm", "-f", buf); snprintf(buf,sizeof(buf), "%s.xml", filename); //autoshift_delete = false; unlink(buf); @@ -296,7 +293,7 @@ bool CRecordInstance::Update() EPG_AUDIO_PIDS audio_pids; audio_pids.epgAudioPid = allpids.APIDs[i].pid; - audio_pids.epgAudioPidName = g_RemoteControl->current_PIDs.APIDs[i].desc; + audio_pids.epgAudioPidName = allpids.APIDs[i].desc; audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : 0; audio_pids.selected = 0; recMovieInfo->audioPids.push_back(audio_pids); @@ -329,7 +326,7 @@ void CRecordInstance::GetPids(CZapitChannel * channel) for (uint32_t i = 0; i < channel->getAudioChannelCount(); i++) { CZapitClient::responseGetAPIDs response; response.pid = channel->getAudioPid(i); - strncpy(response.desc, channel->getAudioChannel(i)->description.c_str(), DESC_MAX_LEN); + strncpy(response.desc, channel->getAudioChannel(i)->description.c_str(), DESC_MAX_LEN - 1); response.is_ac3 = response.is_aac = 0; if (channel->getAudioChannel(i)->audioChannelType == CZapitAudioChannel::AC3) { response.is_ac3 = 1; @@ -352,26 +349,26 @@ void CRecordInstance::ProcessAPIDnames() has_unresolved_ctags= true; if ( strlen( allpids.APIDs[count].desc ) == 3 ) - strncpy( allpids.APIDs[count].desc, getISO639Description( allpids.APIDs[count].desc ),DESC_MAX_LEN ); + strncpy( allpids.APIDs[count].desc, getISO639Description( allpids.APIDs[count].desc ),DESC_MAX_LEN -1 ); if ( allpids.APIDs[count].is_ac3 && !strstr(allpids.APIDs[count].desc, " (AC3)")) - strncat(allpids.APIDs[count].desc, " (AC3)", DESC_MAX_LEN - strlen(allpids.APIDs[count].desc)); + strncat(allpids.APIDs[count].desc, " (AC3)", DESC_MAX_LEN - strlen(allpids.APIDs[count].desc) -1); else if (allpids.APIDs[count].is_aac && !strstr(allpids.APIDs[count].desc, " (AAC)")) - strncat(allpids.APIDs[count].desc, " (AAC)", DESC_MAX_LEN - strlen(allpids.APIDs[count].desc)); + strncat(allpids.APIDs[count].desc, " (AAC)", DESC_MAX_LEN - strlen(allpids.APIDs[count].desc) -1); } if(has_unresolved_ctags && (epgid != 0)) { CSectionsdClient::ComponentTagList tags; - if(sectionsd_getComponentTagsUniqueKey(epgid, tags)) { + if(CEitManager::getInstance()->getComponentTagsUniqueKey(epgid, tags)) { for(unsigned int i=0; i< tags.size(); i++) { for(unsigned int j=0; j< allpids.APIDs.size(); j++) { if(allpids.APIDs[j].component_tag == tags[i].componentTag) { if(!tags[i].component.empty()) { - strncpy(allpids.APIDs[j].desc, tags[i].component.c_str(), DESC_MAX_LEN); + strncpy(allpids.APIDs[j].desc, tags[i].component.c_str(), DESC_MAX_LEN -1); if (allpids.APIDs[j].is_ac3 && !strstr(allpids.APIDs[j].desc, " (AC3)")) - strncat(allpids.APIDs[j].desc, " (AC3)", DESC_MAX_LEN - strlen(allpids.APIDs[j].desc)); + strncat(allpids.APIDs[j].desc, " (AC3)", DESC_MAX_LEN - strlen(allpids.APIDs[j].desc)-1); else if (allpids.APIDs[j].is_aac && !strstr(allpids.APIDs[j].desc, " (AAC)")) - strncat(allpids.APIDs[j].desc, " (AAC)", DESC_MAX_LEN - strlen(allpids.APIDs[j].desc)); + strncat(allpids.APIDs[j].desc, " (AAC)", DESC_MAX_LEN - strlen(allpids.APIDs[j].desc)-1); } allpids.APIDs[j].component_tag = -1; break; @@ -410,9 +407,7 @@ record_error_msg_t CRecordInstance::Record() { int pre=0, post=0; CEPGData epgData; - epgData.epg_times.startzeit = 0; - epgData.epg_times.dauer = 0; - if (sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData )) { + if (CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgData )) { g_Timerd->getRecordingSafety(pre, post); if (epgData.epg_times.startzeit > 0) record_end = epgData.epg_times.startzeit + epgData.epg_times.dauer + post; @@ -517,7 +512,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis tmpstring = "not available"; if (epgid != 0) { CEPGData epgdata; - if (sectionsd_getEPGid(epgid, epg_time, &epgdata)) { + if (CEitManager::getInstance()->getEPGid(epgid, epg_time, &epgdata)) { tmpstring = epgdata.title; info1 = epgdata.info1; info2 = epgdata.info2; @@ -548,7 +543,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis for(it = apid_list.begin(); it != apid_list.end(); ++it) { if(allpids.APIDs[i].pid == it->apid) { audio_pids.epgAudioPid = allpids.APIDs[i].pid; - audio_pids.epgAudioPidName = g_RemoteControl->current_PIDs.APIDs[i].desc; + audio_pids.epgAudioPidName = allpids.APIDs[i].desc; audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : 0; audio_pids.selected = (audio_pids.epgAudioPid == channel->getAudioPid()) ? 1 : 0; recMovieInfo->audioPids.push_back(audio_pids); @@ -559,7 +554,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis if(recMovieInfo->audioPids.empty() && !allpids.APIDs.empty()) { int i = 0; audio_pids.epgAudioPid = allpids.APIDs[i].pid; - audio_pids.epgAudioPidName = g_RemoteControl->current_PIDs.APIDs[i].desc; + audio_pids.epgAudioPidName = allpids.APIDs[i].desc; audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : 0; audio_pids.selected = 1; recMovieInfo->audioPids.push_back(audio_pids); @@ -580,6 +575,8 @@ record_error_msg_t CRecordInstance::MakeFileName(CZapitChannel * channel) return RECORD_INVALID_DIRECTORY; /* fallback to g_settings.network_nfs_recordingdir */ Directory = std::string(g_settings.network_nfs_recordingdir); + }else{ + return RECORD_INVALID_DIRECTORY; } } @@ -607,23 +604,23 @@ record_error_msg_t CRecordInstance::MakeFileName(CZapitChannel * channel) if (errno == ENOENT) { res = safe_mkdir(filename); if (res == 0) - strncat(filename,"/",FILENAMEBUFFERSIZE - strlen(filename)); + strncat(filename,"/",FILENAMEBUFFERSIZE - strlen(filename) -1); else perror("[vcrcontrol] mkdir"); - } else + } else perror("[vcrcontrol] stat"); } else // directory exists - strncat(filename,"/",FILENAMEBUFFERSIZE - strlen(filename)); + strncat(filename,"/",FILENAMEBUFFERSIZE - strlen(filename)-1); } else - strncat(filename, "_",FILENAMEBUFFERSIZE - strlen(filename)); + strncat(filename, "_",FILENAMEBUFFERSIZE - strlen(filename)-1); } pos = strlen(filename); if (g_settings.recording_epg_for_filename) { if(epgid != 0) { CShortEPGData epgdata; - if(sectionsd_getEPGidShort(epgid, &epgdata)) { + if(CEitManager::getInstance()->getEPGidShort(epgid, &epgdata)) { if (!(epgdata.title.empty())) { strcpy(&(filename[pos]), epgdata.title.c_str()); ZapitTools::replace_char(&filename[pos]); @@ -640,7 +637,7 @@ record_error_msg_t CRecordInstance::MakeFileName(CZapitChannel * channel) pos += strftime(&(filename[pos]), sizeof(filename) - pos - 1, "%Y%m%d_%H%M%S", localtime(&t)); if(autoshift) - strncat(filename, "_temp",FILENAMEBUFFERSIZE - strlen(filename)); + strncat(filename, "_temp",FILENAMEBUFFERSIZE - strlen(filename)-1); return RECORD_OK; } @@ -653,7 +650,10 @@ void CRecordInstance::GetRecordString(std::string &str) str = "Unknown channel : " + GetEpgTitle(); return; } - str = channel->getName() + ": " + GetEpgTitle(); + char stime[15]; + int err = GetStatus(); + strftime(stime, sizeof(stime), "%H:%M:%S ", localtime(&start_time)); + str = stime + channel->getName() + ": " + GetEpgTitle() + ((err & REC_STATUS_OVERFLOW) ? " [!]" : ""); } //------------------------------------------------------------------------- @@ -665,11 +665,14 @@ CRecordManager::CRecordManager() StreamVTxtPid = false; StreamPmtPid = false; StopSectionsd = false; - recordingstatus = 0; + //recordingstatus = 0; recmap.clear(); nextmap.clear(); autoshift = false; shift_timer = 0; + check_timer = 0; + error_display = true; + warn_display = true; } CRecordManager::~CRecordManager() @@ -700,36 +703,66 @@ CRecordManager * CRecordManager::getInstance() CRecordInstance * CRecordManager::FindInstance(t_channel_id channel_id) { - recmap_iterator_t it = recmap.find(channel_id); - if(it != recmap.end()) - return it->second; + for (recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { + if (it->second->GetChannelId() == channel_id) + return it->second; + } return NULL; } -MI_MOVIE_INFO * CRecordManager::GetMovieInfo(t_channel_id channel_id) +CRecordInstance * CRecordManager::FindInstanceID(int recid) +{ + for (recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { + if (it->second->GetRecordingId() == recid) + return it->second; + } + return NULL; +} + +CRecordInstance * CRecordManager::FindTimeshift() +{ + for (recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { + if (it->second->Timeshift()) + return it->second; + } + return NULL; +} + +MI_MOVIE_INFO * CRecordManager::GetMovieInfo(t_channel_id channel_id, bool timeshift) { //FIXME copy MI_MOVIE_INFO ? MI_MOVIE_INFO * mi = NULL; mutex.lock(); - CRecordInstance * inst = FindInstance(channel_id); - if(inst) + CRecordInstance * inst = NULL; + if (timeshift) + inst = FindTimeshift(); + if (inst == NULL) + inst = FindInstance(channel_id); + if (inst) mi = inst->GetMovieInfo(); mutex.unlock(); return mi; } -const std::string CRecordManager::GetFileName(t_channel_id channel_id) +const std::string CRecordManager::GetFileName(t_channel_id channel_id, bool timeshift) { std::string filename; - CRecordInstance * inst = FindInstance(channel_id); + CRecordInstance * inst = NULL; + if (timeshift) + inst = FindTimeshift(); + if (inst == NULL) + inst = FindInstance(channel_id); + if(inst) filename = inst->GetFileName(); return filename; } +/* return record mode mask, for channel_id not 0, or global */ int CRecordManager::GetRecordMode(const t_channel_id channel_id) { +#if 0 if (RecordingStatus(channel_id) || IsTimeshift(channel_id)) { if (RecordingStatus(channel_id) && !IsTimeshift(channel_id)) @@ -743,13 +776,34 @@ int CRecordManager::GetRecordMode(const t_channel_id channel_id) return RECMODE_REC_TSHIFT; else return RECMODE_OFF; - }else + } else { if (IsTimeshift(channel_id)) return RECMODE_TSHIFT; } } return RECMODE_OFF; +#endif + int recmode = RECMODE_OFF; + mutex.lock(); + if (channel_id == 0) { + /* we can have only one timeshift instance, if there are more - some is record */ + if ((!autoshift && !recmap.empty()) || recmap.size() > 1) + recmode |= RECMODE_REC; + if (autoshift) + recmode |= RECMODE_TSHIFT; + } else { + for (recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { + if (it->second->GetChannelId() == channel_id) { + if (it->second->Timeshift()) + recmode |= RECMODE_TSHIFT; + else + recmode |= RECMODE_REC; + } + } + } + mutex.unlock(); + return recmode; } bool CRecordManager::Record(const t_channel_id channel_id, const char * dir, bool timeshift) @@ -759,7 +813,7 @@ bool CRecordManager::Record(const t_channel_id channel_id, const char * dir, boo eventinfo.eventID = 0; eventinfo.channel_id = channel_id; - if (sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData )) { + if (CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgData )) { eventinfo.epgID = epgData.eventID; eventinfo.epg_starttime = epgData.epg_times.startzeit; strncpy(eventinfo.epgTitle, epgData.title.c_str(), EPG_TITLE_MAXLEN-1); @@ -772,7 +826,7 @@ bool CRecordManager::Record(const t_channel_id channel_id, const char * dir, boo } eventinfo.apids = TIMERD_APIDS_CONF; eventinfo.recordingDir[0] = 0; - + return Record(&eventinfo, dir, timeshift); } @@ -787,8 +841,10 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons printf("%s channel_id %llx epg: %llx, apidmode 0x%X\n", __FUNCTION__, eventinfo->channel_id, eventinfo->epgID, eventinfo->apids); +#if 0 if(!CheckRecording(eventinfo)) return false; +#endif #if 1 // FIXME test StopSectionsd = false; @@ -798,25 +854,21 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons RunStartScript(); mutex.lock(); - recmap_iterator_t it = recmap.find(eventinfo->channel_id); - if(it != recmap.end()) { - //inst = it->second; +#if 0 + inst = FindInstance(eventinfo->channel_id); + if(inst) { if(direct_record) { error_msg = RECORD_BUSY; } else { - //nextmap.push_back((CTimerd::RecordingInfo *)eventinfo); CTimerd::RecordingInfo * evt = new CTimerd::RecordingInfo(*eventinfo); printf("%s add %llx : %s to pending\n", __FUNCTION__, evt->channel_id, evt->epgTitle); nextmap.push_back((CTimerd::RecordingInfo *)evt); } - } else if(recmap.size() < RECORD_MAX_COUNT) { -#if 1//FIXME test - CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(eventinfo->channel_id); - CFrontend * frontend = CFEManager::getInstance()->allocateFE(channel); - int mode = channel->getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE ? - NeutrinoMessages::mode_tv : NeutrinoMessages::mode_radio; + } else #endif - if(frontend && CutBackNeutrino(eventinfo->channel_id, mode)) { + if(recmap.size() < RECORD_MAX_COUNT) { + CFrontend * frontend = NULL; + if(CutBackNeutrino(eventinfo->channel_id, frontend)) { std::string newdir; if(dir && strlen(dir)) newdir = std::string(dir); @@ -825,21 +877,20 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons else newdir = Directory; - if (inst == NULL) - inst = new CRecordInstance(eventinfo, newdir, timeshift, StreamVTxtPid, StreamPmtPid); + inst = new CRecordInstance(eventinfo, newdir, timeshift, StreamVTxtPid, StreamPmtPid); inst->frontend = frontend; error_msg = inst->Record(); if(error_msg == RECORD_OK) { - recmap.insert(std::pair(eventinfo->channel_id, inst)); + recmap.insert(recmap_pair_t(inst->GetRecordingId(), inst)); if(timeshift) autoshift = true; +#if 0 // mimic old behavior for start/stop menu option chooser, still actual ? t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); - if(eventinfo->channel_id == live_channel_id) { + if(eventinfo->channel_id == live_channel_id) recordingstatus = 1; - rec_channel_id = live_channel_id;//FIXME - } +#endif } else { delete inst; } @@ -854,22 +905,31 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons mutex.unlock(); if (error_msg == RECORD_OK) { + if (check_timer == 0) + check_timer = g_RCInput->addTimer(5*1000*1000, false); + + /* set flag to show record error if any */ + error_display = true; + warn_display = true; return true; } - else /*if(!timeshift)*/ { - RunStopScript(); - RestoreNeutrino(); - printf("[recordmanager] %s: error code: %d\n", __FUNCTION__, error_msg); + printf("[recordmanager] %s: error code: %d\n", __FUNCTION__, error_msg); + /* RestoreNeutrino must be called always if record start failed */ + RunStopScript(); + RestoreNeutrino(); + + /* FIXME show timeshift start error or not ? */ + //if(!timeshift) + { //FIXME: Use better error message DisplayErrorMessage(g_Locale->getText( error_msg == RECORD_BUSY ? LOCALE_STREAMING_BUSY : error_msg == RECORD_INVALID_DIRECTORY ? LOCALE_STREAMING_DIR_NOT_WRITABLE : LOCALE_STREAMING_WRITE_ERROR )); // UTF-8 - return false; } - - return true; + + return false; } bool CRecordManager::StartAutoRecord() @@ -880,10 +940,8 @@ bool CRecordManager::StartAutoRecord() return Record(live_channel_id, TimeshiftDirectory.c_str(), true); } -bool CRecordManager::StopAutoRecord() +bool CRecordManager::StopAutoRecord(bool lock) { - bool found = false; - printf("%s: autoshift %d\n", __FUNCTION__, autoshift); g_RCInput->killTimer (shift_timer); @@ -891,29 +949,30 @@ bool CRecordManager::StopAutoRecord() if(!autoshift) return false; - mutex.lock(); - t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); - CRecordInstance * inst = FindInstance(live_channel_id); - if(inst && inst->Timeshift()) - found = true; - mutex.unlock(); + if (lock) + mutex.lock(); - if(found) { - Stop(live_channel_id); - autoshift = false; - } + CRecordInstance * inst = FindTimeshift(); + if (inst) + StopInstance(inst); - return found; + if (lock) + mutex.unlock(); + + return (inst != NULL); } +#if 0 bool CRecordManager::CheckRecording(const CTimerd::RecordingInfo * const eventinfo) { t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); - if((eventinfo->channel_id == live_channel_id) || !SAME_TRANSPONDER(eventinfo->channel_id, live_channel_id)) + /* FIXME check if frontend used for timeshift the same and will zap ?? */ + if(/*(eventinfo->channel_id == live_channel_id) ||*/ !SAME_TRANSPONDER(eventinfo->channel_id, live_channel_id)) StopAutoRecord(); return true; } +#endif void CRecordManager::StartNextRecording() { @@ -921,8 +980,9 @@ void CRecordManager::StartNextRecording() printf("%s: pending count %d\n", __FUNCTION__, nextmap.size()); for(nextmap_iterator_t it = nextmap.begin(); it != nextmap.end(); it++) { - bool tested = true; eventinfo = *it; +#if 0 + bool tested = true; if( !recmap.empty() ) { CRecordInstance * inst = FindInstance(eventinfo->channel_id); /* same channel recording and not auto - skip */ @@ -934,21 +994,28 @@ void CRecordManager::StartNextRecording() else { /* there are some recordings, test any (first) for now */ recmap_iterator_t fit = recmap.begin(); - t_channel_id channel_id = fit->first; + t_channel_id channel_id = fit->second->GetChannelId(); tested = (SAME_TRANSPONDER(channel_id, eventinfo->channel_id)); } } - if(tested) { + if(tested) +#endif + CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(eventinfo->channel_id); + if (channel && CFEManager::getInstance()->canTune(channel)) + { //MountDirectory(eventinfo->recordingDir);//FIXME in old neutrino startNextRecording commented bool ret = Record(eventinfo); if(ret) { - it = nextmap.erase(it); delete[] (unsigned char *) eventinfo; + it = nextmap.erase(it++); + if (it == nextmap.end()) + break; } } } } +/* return true, if there are any recording running for this channel id, or global if id is 0 */ bool CRecordManager::RecordingStatus(const t_channel_id channel_id) { bool ret = false; @@ -973,17 +1040,18 @@ bool CRecordManager::TimeshiftOnly() return (autoshift && (count == 1)); } +/* FIXME no check for multi-tuner */ bool CRecordManager::SameTransponder(const t_channel_id channel_id) { bool same = true; mutex.lock(); int count = recmap.size(); if(count) { - if(autoshift && count == 1) + if(autoshift && count == 1) same = true; else { recmap_iterator_t fit = recmap.begin(); - t_channel_id id = fit->first; + t_channel_id id = fit->second->GetChannelId(); same = (SAME_TRANSPONDER(channel_id, id)); } } @@ -991,52 +1059,55 @@ bool CRecordManager::SameTransponder(const t_channel_id channel_id) return same; } +void CRecordManager::StopInstance(CRecordInstance * inst, bool remove_event) +{ + /* first erase - then stop, because Stop() reset recording_id to 0 */ + recmap.erase(inst->GetRecordingId()); + inst->Stop(remove_event); + + if(inst->Timeshift()) + autoshift = false; + +#if 0 + t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); + if(inst->GetChannelId() == live_channel_id) + recordingstatus = 0; +#endif + delete inst; +} bool CRecordManager::Stop(const t_channel_id channel_id) { printf("%s: %llx\n", __FUNCTION__, channel_id); mutex.lock(); + + /* FIXME stop all ? show list ? */ CRecordInstance * inst = FindInstance(channel_id); - if(inst != NULL) { - inst->Stop(); - recmap.erase(channel_id); - if(inst->Timeshift()) - autoshift = false; - delete inst; - t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); - if(channel_id == live_channel_id) { - recordingstatus = 0; - rec_channel_id = 0;//FIXME - } - } else + if(inst != NULL) + StopInstance(inst); + else printf("%s: channel %llx not recording\n", __FUNCTION__, channel_id); + mutex.unlock(); StopPostProcess(); - + return (inst != NULL); } bool CRecordManager::Stop(const CTimerd::RecordingStopInfo * recinfo) { bool ret = false; - + printf("%s: eventID %d channel_id %llx\n", __FUNCTION__, recinfo->eventID, recinfo->channel_id); mutex.lock(); - CRecordInstance * inst = FindInstance(recinfo->channel_id); + CRecordInstance * inst = FindInstanceID(recinfo->eventID); if(inst != NULL && recinfo->eventID == inst->GetRecordingId()) { - inst->Stop(false); - recmap.erase(recinfo->channel_id); - if(inst->Timeshift()) - autoshift = false; - delete inst; + StopInstance(inst, false); ret = true; - t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); - if(recinfo->channel_id == live_channel_id) - recordingstatus = 0; } else { for(nextmap_iterator_t it = nextmap.begin(); it != nextmap.end(); it++) { if((*it)->eventID == recinfo->eventID) { @@ -1055,7 +1126,7 @@ bool CRecordManager::Stop(const CTimerd::RecordingStopInfo * recinfo) mutex.unlock(); StopPostProcess(); - + return ret; } @@ -1064,6 +1135,8 @@ void CRecordManager::StopPostProcess() RestoreNeutrino(); StartNextRecording(); RunStopScript(); + if(!RecordingStatus()) + g_RCInput->killTimer(check_timer); } bool CRecordManager::Update(const t_channel_id channel_id) @@ -1096,10 +1169,32 @@ int CRecordManager::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data StartAutoRecord(); return messages_return::handled; } + else if(data == check_timer) { + if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby) { + mutex.lock(); + int have_err = 0; + for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) + have_err |= it->second->GetStatus(); + mutex.unlock(); + //printf("%s: check status: show err %d warn %d have_err %d\n", __FUNCTION__, error_display, warn_display, have_err); //FIXME + if (have_err) { + if ((have_err & REC_STATUS_OVERFLOW) && error_display) { + error_display = false; + warn_display = false; + DisplayErrorMessage(g_Locale->getText(LOCALE_STREAMING_OVERFLOW)); + } else if (warn_display) { + warn_display = false; + DisplayErrorMessage(g_Locale->getText(LOCALE_STREAMING_SLOW)); + } + } + return messages_return::handled; + } + } } return messages_return::unhandled; } +#if 0 bool CRecordManager::IsTimeshift(t_channel_id channel_id) { bool ret = false; @@ -1112,12 +1207,11 @@ bool CRecordManager::IsTimeshift(t_channel_id channel_id) ret = true; else ret = false; - }else + } else { for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { - inst = it->second; - if(inst && inst->tshift_mode) + if(it->second->tshift_mode) { mutex.unlock(); return true; @@ -1130,44 +1224,56 @@ bool CRecordManager::IsTimeshift(t_channel_id channel_id) void CRecordManager::SetTimeshiftMode(CRecordInstance * inst, int mode) { - CRecordInstance * tmp_inst; mutex.lock(); + /* reset all instances mode ? */ for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) - { - tmp_inst = it->second; - if (tmp_inst) - tmp_inst->tshift_mode = TSHIFT_MODE_OFF; - } + it->second->tshift_mode = TSHIFT_MODE_OFF; + mutex.unlock(); if (inst) inst->tshift_mode = mode; } +#endif void CRecordManager::StartTimeshift() { if(g_RemoteControl->is_video_started) { - std::string tmode; + std::string tmode = "ptimeshift"; // already recording, pause bool res = true; t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); +#if 0 if(RecordingStatus(live_channel_id)) { tmode = "ptimeshift"; // already recording, pause if(GetRecordMode(live_channel_id) == RECMODE_TSHIFT) SetTimeshiftMode(FindInstance(live_channel_id), TSHIFT_MODE_PAUSE); - }else + } else { if(g_settings.temp_timeshift) { res = StartAutoRecord(); SetTimeshiftMode(FindInstance(live_channel_id), TSHIFT_MODE_TEMPORAER); - }else + } else { res = Record(live_channel_id); SetTimeshiftMode(FindInstance(live_channel_id), TSHIFT_MODE_PERMANET); } tmode = "timeshift"; // record just started } +#endif + /* start temporary timeshift if enabled and not running, but dont start second record */ + if (g_settings.temp_timeshift) { + if (!FindTimeshift()) { + res = StartAutoRecord(); + tmode = "timeshift"; // record just started + } + } + else if (!RecordingStatus(live_channel_id)) { + res = Record(live_channel_id); + tmode = "timeshift"; // record just started + } + if(res) { CMoviePlayerGui::getInstance().exec(NULL, tmode); @@ -1187,76 +1293,24 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey ) char rec_msg[256]; char rec_msg1[256]; int records = recmap.size(); - + snprintf(rec_msg1, sizeof(rec_msg1)-1, "%s", g_Locale->getText(LOCALE_RECORDINGMENU_MULTIMENU_ASK_STOP_ALL)); snprintf(rec_msg, sizeof(rec_msg)-1, rec_msg1, records); if(ShowMsgUTF(LOCALE_SHUTDOWN_RECODING_QUERY, rec_msg, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes) { snprintf(rec_msg1, sizeof(rec_msg1)-1, "%s", g_Locale->getText(LOCALE_RECORDINGMENU_MULTIMENU_INFO_STOP_ALL)); -// focus: i think no sense for 2 loops, because this code run in the same thread as neutrino, -// so neutrino dont have a chance to handle RECORD_STOP before this function returns -#if 0 - int i = 0; - int recording_ids[RECORD_MAX_COUNT]; - t_channel_id channel_ids[RECORD_MAX_COUNT]; - t_channel_id channel_id; - recmap_iterator_t it; - mutex.lock(); - for(it = recmap.begin(); it != recmap.end(); it++) - { - recording_ids[i] = 0; - channel_id = it->first; - CRecordInstance * inst = it->second; - - snprintf(rec_msg, sizeof(rec_msg)-1, rec_msg1, records-i, records); - inst-> SetStopMessage(rec_msg); - - if(inst) - { - channel_ids[i] = channel_id; - recording_ids[i] = inst->GetRecordingId(); - printf("CRecordManager::exec(ExitAll line %d) found channel %llx recording_id %d\n", __LINE__, channel_ids[i], recording_ids[i]); - i++; - } - if (i >= RECORD_MAX_COUNT) - break; - } - mutex.unlock(); - if (i > 0 && i < RECORD_MAX_COUNT) - { - for(int i2 = 0; i2 < i; i2++) - { - mutex.lock(); - CRecordInstance * inst = FindInstance(channel_ids[i2]); - - snprintf(rec_msg, sizeof(rec_msg)-1, rec_msg1, records-i2, records); - inst-> SetStopMessage(rec_msg); - - if(inst == NULL || recording_ids[i2] != inst->GetRecordingId()) - { - printf("CRecordManager::exec(ExitAll line %d) channel %llx event id %d not found\n", __LINE__, channel_ids[i2], recording_ids[i2]); - }else - { - usleep(500000); - printf("CRecordManager::exec(ExitAll line %d) stop channel %llx recording_id %d\n", __LINE__, channel_ids[i2], recording_ids[i2]); - g_Timerd->stopTimerEvent(recording_ids[i2]); - } - mutex.unlock(); - } - } -#endif int i = 0; mutex.lock(); for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { - t_channel_id channel_id = it->first; CRecordInstance * inst = it->second; - + t_channel_id channel_id = inst->GetChannelId(); + snprintf(rec_msg, sizeof(rec_msg)-1, rec_msg1, records-i, records); inst->SetStopMessage(rec_msg); - + printf("CRecordManager::exec(ExitAll line %d) found channel %llx recording_id %d\n", __LINE__, channel_id, inst->GetRecordingId()); g_Timerd->stopTimerEvent(inst->GetRecordingId()); i++; @@ -1264,34 +1318,42 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey ) mutex.unlock(); } return menu_return::RETURN_EXIT_ALL; - }else if(actionKey == "Record") + } else if(actionKey == "Record") { printf("[neutrino] direct record\n"); t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); - - if(!CRecordManager::getInstance()->RecordingStatus(live_channel_id)) - { + + bool tostart = true; + CRecordInstance * inst = FindInstance(live_channel_id); + if (inst) { + std::string title; + inst->GetRecordString(title); + tostart = (ShowMsgUTF(LOCALE_RECORDING_IS_RUNNING, title.c_str(), + CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes); + } + if (tostart) { CRecordManager::getInstance()->Record(live_channel_id); - + if(!g_InfoViewer->is_visible) // show Infoviewer CNeutrinoApp::getInstance()->showInfo(); - - return menu_return::RETURN_EXIT_ALL; + + return menu_return::RETURN_EXIT_ALL; } +#if 0 else DisplayInfoMessage(g_Locale->getText(LOCALE_RECORDING_IS_RUNNING)); - }else if(actionKey == "Timeshift") +#endif + } else if(actionKey == "Timeshift") { StartTimeshift(); return menu_return::RETURN_EXIT_ALL; - }else if(actionKey == "Stop_record") + } else if(actionKey == "Stop_record") { if(!CRecordManager::getInstance()->RecordingStatus()) { ShowHintUTF(LOCALE_MAINMENU_RECORDING_STOP, g_Locale->getText(LOCALE_RECORDINGMENU_RECORD_IS_NOT_RUNNING), 450, 2); return menu_return::RETURN_EXIT_ALL; - } + } } - ShowMenu(); return menu_return::RETURN_REPAINT; @@ -1313,38 +1375,40 @@ bool CRecordManager::ShowMenu(void) // Record / Timeshift t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); - bool status_ts = IsTimeshift(live_channel_id); - bool status_rec = RecordingStatus(live_channel_id) && !status_ts; - + + int rec_mode = GetRecordMode(live_channel_id); + bool status_ts = rec_mode & RECMODE_TSHIFT; + //bool status_rec = rec_mode & RECMODE_REC; + //record item - iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_REC_AKT, (!status_rec && !status_ts), NULL, + iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_REC_AKT, true /*!status_rec*/, NULL, this, "Record", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); //if no recordings are running, set the focus to the record menu item menu.addItem(iteml, rec_count == 0 ? true: false); - + //timeshift item - iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT, !status_ts, NULL, + iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT, !status_ts, NULL, this, "Timeshift", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); menu.addItem(iteml, false); - - if(rec_count > 0) + + if(rec_count > 0) { menu.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_RECORDING_STOP)); mutex.lock(); - + int i = 0 , shortcut = 1; for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { - t_channel_id channel_id = it->first; CRecordInstance * inst = it->second; - channel_ids[i] = channel_id; + channel_ids[i] = inst->GetChannelId(); recording_ids[i] = inst->GetRecordingId(); - + std::string title; inst->GetRecordString(title); - + const char* mode_icon = NULL; - if (inst->tshift_mode) + //if (inst->tshift_mode) + if (inst->Timeshift()) mode_icon = NEUTRINO_ICON_AUTO_SHIFT; sprintf(cnt, "%d", i); @@ -1354,10 +1418,10 @@ bool CRecordManager::ShowMenu(void) if (rec_count == 1){ rc_key = CRCInput::RC_stop; btn_icon = NEUTRINO_ICON_BUTTON_STOP; - } + } item = new CMenuForwarderNonLocalized(title.c_str(), true, NULL, selector, cnt, rc_key, NULL, mode_icon); item->setItemButton(btn_icon, true); - + //if only one recording is running, set the focus to this menu item menu.addItem(item, rec_count == 1 ? true: false); i++; @@ -1367,10 +1431,10 @@ bool CRecordManager::ShowMenu(void) if(i > 1) //menu item "stopp all records" { menu.addItem(GenericMenuSeparatorLine); - iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_STOP_ALL, true, NULL, + iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_STOP_ALL, true, NULL, this, "StopAll", CRCInput::RC_stop); iteml->setItemButton(NEUTRINO_ICON_BUTTON_STOP, true); - + //if more than one recording is running, set the focus to menu item 'stopp all records' menu.addItem(iteml, rec_count > 1 ? true: false); } @@ -1383,28 +1447,32 @@ bool CRecordManager::ShowMenu(void) if (select >= 0 && select < RECORD_MAX_COUNT) { /* in theory, timer event can expire while we in menu ? lock and check again */ mutex.lock(); - CRecordInstance * inst = FindInstance(channel_ids[select]); + CRecordInstance * inst = FindInstanceID(recording_ids[select]); if(inst == NULL || recording_ids[select] != inst->GetRecordingId()) { printf("%s: channel %llx event id %d not found\n", __FUNCTION__, channel_ids[select], recording_ids[select]); mutex.unlock(); return false; } mutex.unlock(); - //return Stop(channel_ids[select]); - return AskToStop(channel_ids[select]); + return AskToStop(channel_ids[select], recording_ids[select]); } return false; } -bool CRecordManager::AskToStop(const t_channel_id channel_id) +bool CRecordManager::AskToStop(const t_channel_id channel_id, const int recid) { - int recording_id = 0; + //int recording_id = 0; std::string title; + CRecordInstance * inst; mutex.lock(); - CRecordInstance * inst = FindInstance(channel_id); + if (recid) + inst = FindInstanceID(recid); + else + inst = FindInstance(channel_id); + if(inst) { - recording_id = inst->GetRecordingId(); + //recording_id = inst->GetRecordingId(); inst->GetRecordString(title); } mutex.unlock(); @@ -1413,7 +1481,17 @@ bool CRecordManager::AskToStop(const t_channel_id channel_id) if(ShowMsgUTF(LOCALE_SHUTDOWN_RECODING_QUERY, title.c_str(), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes) { +#if 0 g_Timerd->stopTimerEvent(recording_id); +#endif + mutex.lock(); + if (recid) + inst = FindInstanceID(recid); + else + inst = FindInstance(channel_id); + if (inst) + StopInstance(inst); + mutex.unlock(); return true; } return false; @@ -1426,7 +1504,7 @@ bool CRecordManager::RunStartScript(void) return false; puts("[neutrino.cpp] executing " NEUTRINO_RECORDING_START_SCRIPT "."); - if (safe_system(NEUTRINO_RECORDING_START_SCRIPT) != 0) { + if (my_system(NEUTRINO_RECORDING_START_SCRIPT) != 0) { perror(NEUTRINO_RECORDING_START_SCRIPT " failed"); return false; } @@ -1440,7 +1518,7 @@ bool CRecordManager::RunStopScript(void) return false; puts("[neutrino.cpp] executing " NEUTRINO_RECORDING_ENDED_SCRIPT "."); - if (safe_system(NEUTRINO_RECORDING_ENDED_SCRIPT) != 0) { + if (my_system(NEUTRINO_RECORDING_ENDED_SCRIPT) != 0) { perror(NEUTRINO_RECORDING_ENDED_SCRIPT " failed"); return false; } @@ -1458,63 +1536,54 @@ bool CRecordManager::RunStopScript(void) * if zap ok * set record mode */ -bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mode) +bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, CFrontend * &frontend) { bool ret = true; + CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id); + if (!channel) + return false; + + int mode = channel->getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE ? + NeutrinoMessages::mode_tv : NeutrinoMessages::mode_radio; + printf("%s channel_id %llx mode %d\n", __FUNCTION__, channel_id, mode); last_mode = CNeutrinoApp::getInstance()->getMode(); - - if(last_mode == NeutrinoMessages::mode_standby && recmap.empty()) + if(last_mode == NeutrinoMessages::mode_standby && recmap.empty()) { g_Zapit->setStandby(false); // this zap to live_channel_id + /* wait for zapit wakeup */ + g_Zapit->getMode(); + } t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); -#if 0 - if(live_channel_id != channel_id) { - if(SAME_TRANSPONDER(live_channel_id, channel_id)) { - printf("%s zapTo_record channel_id %llx\n", __FUNCTION__, channel_id); - ret = g_Zapit->zapTo_record(channel_id) > 0; - } else if(!recmap.empty()) { - ret = false; - } else { - if (mode != last_mode && (last_mode != NeutrinoMessages::mode_standby || mode != CNeutrinoApp::getInstance()->getLastMode())) { - CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap ); - // When we were on standby, then we need not wake up for streaming - if(last_mode == NeutrinoMessages::mode_standby) - CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_standby); - } - ret = g_Zapit->zapTo_serviceID(channel_id) > 0; - printf("%s zapTo_serviceID channel_id %llx result %d\n", __FUNCTION__, channel_id, ret); - - if(!ret) - CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , last_mode); - else if(last_mode == NeutrinoMessages::mode_standby) - g_Zapit->stopPlayBack(); - } - if(!ret) - printf("%s: failed to change channel\n", __FUNCTION__); - } -#endif bool mode_changed = false; + CFrontend *live_fe = CZapit::getInstance()->GetLiveFrontend(); + frontend = live_fe; if(live_channel_id != channel_id) { - bool found = false; - if(SAME_TRANSPONDER(live_channel_id, channel_id)) { - found = true; - } else { - for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { - if(SAME_TRANSPONDER(it->first, channel_id)) { - found = true; - break; - } - } + /* first try to get frontend for record with locked live */ + bool unlock = true; + CFEManager::getInstance()->lockFrontend(live_fe); + frontend = CFEManager::getInstance()->allocateFE(channel); + if (frontend == NULL) { + /* no frontend, try again with unlocked live */ + unlock = false; + CFEManager::getInstance()->unlockFrontend(live_fe); + frontend = CFEManager::getInstance()->allocateFE(channel); } + if (frontend == NULL) + return false; + + /* if allocateFE was successful, full zapTo_serviceID + * needed, if record frontend same as live, and its on different TP */ + bool found = (live_fe != frontend) || SAME_TRANSPONDER(live_channel_id, channel_id); if(found) { ret = g_Zapit->zapTo_record(channel_id) > 0; printf("%s found same tp, zapTo_record channel_id %llx result %d\n", __FUNCTION__, channel_id, ret); } else { printf("%s mode %d last_mode %d getLastMode %d\n", __FUNCTION__, mode, last_mode, CNeutrinoApp::getInstance()->getLastMode()); + StopAutoRecord(false); if (mode != last_mode && (last_mode != NeutrinoMessages::mode_standby || mode != CNeutrinoApp::getInstance()->getLastMode())) { CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap ); mode_changed = true; @@ -1523,6 +1592,8 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mo ret = g_Zapit->zapTo_serviceID(channel_id) > 0; printf("%s zapTo_serviceID channel_id %llx result %d\n", __FUNCTION__, channel_id, ret); } + if (unlock) + CFEManager::getInstance()->unlockFrontend(live_fe); } if(ret) { if(StopSectionsd) { @@ -1553,21 +1624,25 @@ void CRecordManager::RestoreNeutrino(void) /* after this zapit send EVT_RECORDMODE_DEACTIVATED, so neutrino getting NeutrinoMessages::EVT_RECORDMODE */ g_Zapit->setRecordMode( false ); -#if 0 - /* if current mode not standby and current mode not mode saved at record start - * and mode saved not standby - switch to saved mode. - * Sounds wrong, because user can switch between radio and tv while record in progress ? */ - - if(CNeutrinoApp::getInstance()->getMode() != last_mode && - CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby && - last_mode != NeutrinoMessages::mode_standby) - if(!autoshift) - g_RCInput->postMsg( NeutrinoMessages::CHANGEMODE , last_mode); -#endif if((CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby) && StopSectionsd) g_Sectionsd->setPauseScanning(false); } +bool CRecordManager::IsFileRecord(std::string file) +{ + mutex.lock(); + for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { + CRecordInstance * inst = it->second; + if ((((std::string)inst->GetFileName()) + ".ts") == file) { + mutex.unlock(); + return true; + } + } + mutex.unlock(); + return false; +} + +#if 0 /* should return true, if recordingstatus changed in this function ? */ bool CRecordManager::doGuiRecord() { @@ -1617,7 +1692,8 @@ bool CRecordManager::changeNotify(const neutrino_locale_t OptionName, void * /*d } return ret; } - +#endif +#if 0 /* this is saved copy of neutrino code which seems was not used for some time */ bool CRecordManager::ChooseRecDir(std::string &dir) { @@ -1641,7 +1717,7 @@ bool CRecordManager::ChooseRecDir(std::string &dir) dir = g_settings.network_nfs_local_dir[userDecision]; doRecord = MountDirectory(dir.c_str()); } - } else + } else printf("%s: no network devices available\n", __FUNCTION__); } return doRecord; @@ -1682,20 +1758,7 @@ bool CRecordManager::MountDirectory(const char *recordingDir) return ret; } - -bool CRecordManager::IsFileRecord(std::string file) -{ - mutex.lock(); - for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { - CRecordInstance * inst = it->second; - if ((((std::string)inst->GetFileName()) + ".ts") == file) { - mutex.unlock(); - return true; - } - } - mutex.unlock(); - return false; -} +#endif #if 0 // not used, saved in case we needed it extern bool autoshift_delete; diff --git a/src/driver/record.h b/src/driver/record.h index 777889f8f..f55f15bb8 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -4,12 +4,11 @@ Copyright (C) 2001 Steffen Hehn 'McClean' Copyright (C) 2011 CoolStream International Ltd - License: GPL + License: GPLv2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + the Free Software Foundation; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -76,7 +75,7 @@ class CRecordInstance { private: typedef struct { - unsigned short apid; + uint32_t apid; unsigned int index;//FIXME not used ? bool ac3; } APIDDesc; @@ -110,7 +109,7 @@ class CRecordInstance void FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis); record_error_msg_t MakeFileName(CZapitChannel * channel); bool SaveXml(); - record_error_msg_t Start(CZapitChannel * channel /*, APIDList &apid_list*/); + record_error_msg_t Start(CZapitChannel * channel); void WaitRecMsg(time_t StartTime, time_t WaitTime); public: CRecordInstance(const CTimerd::RecordingInfo * const eventinfo, std::string &dir, bool timeshift = false, bool stream_vtxt_pid = false, bool stream_pmt_pid = false); @@ -122,6 +121,7 @@ class CRecordInstance void SetRecordingId(int id) { recording_id = id; }; int GetRecordingId(void) { return recording_id; }; + t_channel_id GetChannelId(void) { return channel_id; }; std::string GetEpgTitle(void) { return epgTitle; }; MI_MOVIE_INFO * GetMovieInfo(void) { return recMovieInfo; }; void GetRecordString(std::string& str); @@ -129,17 +129,19 @@ class CRecordInstance bool Timeshift() { return autoshift; }; int tshift_mode; void SetStopMessage(const char* text) {rec_stop_msg = text;} ; + int GetStatus(); CFrontend * frontend; }; -typedef std::map recmap_t; +typedef std::pair recmap_pair_t; +typedef std::map recmap_t; typedef recmap_t::iterator recmap_iterator_t; typedef std::list nextmap_t; typedef nextmap_t::iterator nextmap_iterator_t; -class CRecordManager : public CMenuTarget, public CChangeObserver +class CRecordManager : public CMenuTarget /*, public CChangeObserver*/ { private: static CRecordManager * manager; @@ -154,17 +156,23 @@ class CRecordManager : public CMenuTarget, public CChangeObserver int last_mode; bool autoshift; uint32_t shift_timer; + uint32_t check_timer; + bool error_display; + bool warn_display; OpenThreads::Mutex mutex; static OpenThreads::Mutex sm; - bool CutBackNeutrino(const t_channel_id channel_id, const int mode); + bool CutBackNeutrino(const t_channel_id channel_id, CFrontend * &frontend); void RestoreNeutrino(void); bool CheckRecording(const CTimerd::RecordingInfo * const eventinfo); void StartNextRecording(); void StopPostProcess(); + void StopInstance(CRecordInstance * inst, bool remove_event = true); CRecordInstance * FindInstance(t_channel_id); - void SetTimeshiftMode(CRecordInstance * inst=NULL, int mode=TSHIFT_MODE_OFF); + CRecordInstance * FindInstanceID(int recid); + CRecordInstance * FindTimeshift(); + //void SetTimeshiftMode(CRecordInstance * inst=NULL, int mode=TSHIFT_MODE_OFF); public: enum record_modes_t @@ -186,13 +194,13 @@ class CRecordManager : public CMenuTarget, public CChangeObserver bool Stop(const CTimerd::RecordingStopInfo * recinfo); bool Update(const t_channel_id channel_id); bool ShowMenu(void); - bool AskToStop(const t_channel_id channel_id); + bool AskToStop(const t_channel_id channel_id, const int recid = 0); int exec(CMenuTarget* parent, const std::string & actionKey); bool StartAutoRecord(); - bool StopAutoRecord(); + bool StopAutoRecord(bool lock = true); - MI_MOVIE_INFO * GetMovieInfo(const t_channel_id channel_id); - const std::string GetFileName(const t_channel_id channel_id); + MI_MOVIE_INFO * GetMovieInfo(const t_channel_id channel_id, bool timeshift = true); + const std::string GetFileName(const t_channel_id channel_id, bool timeshift = true); bool RunStartScript(void); bool RunStopScript(void); @@ -210,17 +218,19 @@ class CRecordManager : public CMenuTarget, public CChangeObserver bool Timeshift() { return (autoshift || shift_timer); }; bool SameTransponder(const t_channel_id channel_id); int handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data); - // old code - bool ChooseRecDir(std::string &dir); - bool MountDirectory(const char *recordingDir); // mimic old behavior for start/stop menu option chooser, still actual ? - int recordingstatus; - bool doGuiRecord(); - bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/); int GetRecordCount() { return recmap.size(); }; - bool IsTimeshift(t_channel_id channel_id=0); void StartTimeshift(); int GetRecordMode(const t_channel_id channel_id=0); bool IsFileRecord(std::string file); + // old code +#if 0 + bool IsTimeshift(t_channel_id channel_id=0); + bool MountDirectory(const char *recordingDir); + bool ChooseRecDir(std::string &dir); + int recordingstatus; + bool doGuiRecord(); + bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/); +#endif }; #endif diff --git a/src/driver/screen_max.cpp b/src/driver/screen_max.cpp index 404fbb50a..601d46206 100644 --- a/src/driver/screen_max.cpp +++ b/src/driver/screen_max.cpp @@ -12,8 +12,8 @@ -#include "global.h" -#include "driver/screen_max.h" +#include +#include // -- this is a simple odd class provided for 'static' usage diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index 6ae11889f..95a146daf 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -126,6 +127,8 @@ void CScreenShot::run() } /* save file in sync mode, return true if save ok, or false */ +#if 0 +//never used bool CScreenShot::StartSync() { bool ret = false; @@ -136,7 +139,7 @@ bool CScreenShot::StartSync() printf("CScreenShot::StartSync: %s finished: %d\n", filename.c_str(), ret); return ret; } - +#endif /* save file in selected format, free data received from video decoder */ bool CScreenShot::SaveFile() { @@ -343,8 +346,6 @@ bool CScreenShot::SaveBmp() return true; } -bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); -bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); /* * create filename member from channel name and its current EPG data, @@ -368,9 +369,9 @@ void CScreenShot::MakeFileName(const t_channel_id channel_id) } pos = strlen(fname); - if(sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData)) { + if(CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgData)) { CShortEPGData epgdata; - if(sectionsd_getEPGidShort(epgData.eventID, &epgdata)) { + if(CEitManager::getInstance()->getEPGidShort(epgData.eventID, &epgdata)) { if (!(epgdata.title.empty())) { strcpy(&(fname[pos]), epgdata.title.c_str()); ZapitTools::replace_char(&fname[pos]); diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index 876c19aa2..34c8e4328 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -358,7 +358,8 @@ void * streamts_live_thread(void *data) close(fd); return 0; } - +#if 0 +//never used void streamts_file_thread(void *data) { int dvrfd; @@ -459,3 +460,4 @@ void streamts_file_thread(void *data) return; } +#endif diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index f39896ecb..161a71320 100644 --- a/src/driver/vfd.cpp +++ b/src/driver/vfd.cpp @@ -68,6 +68,7 @@ CVFD::CVFD() text[0] = 0; clearClock = 0; mode = MODE_TVRADIO; + switch_name_time_cnt = 0; } CVFD::~CVFD() @@ -88,7 +89,7 @@ CVFD* CVFD::getInstance() void CVFD::count_down() { if (timeout_cnt > 0) { timeout_cnt--; - if (timeout_cnt == 0) { + if (timeout_cnt == 0 ) { if (g_settings.lcd_setting_dim_brightness > -1) { // save lcd brightness, setBrightness() changes global setting int b = g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS]; @@ -99,6 +100,14 @@ void CVFD::count_down() { } } } + if (g_settings.lcd_info_line && switch_name_time_cnt > 0) { + switch_name_time_cnt--; + if (switch_name_time_cnt == 0) { + if (g_settings.lcd_setting_dim_brightness > -1) { + CVFD::getInstance()->showTime(true); + } + } + } } void CVFD::wake_up() { @@ -110,6 +119,9 @@ void CVFD::wake_up() { } else setPower(1); + if(g_settings.lcd_info_line){ + switch_name_time_cnt = g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] + 10; + } } void* CVFD::TimeThread(void *) @@ -288,7 +300,7 @@ void CVFD::showTime(bool force) ftime(&tm); t = localtime(&tm.time); - if(force || ((hour != t->tm_hour) || (minute != t->tm_min))) { + if(force || ( switch_name_time_cnt == 0 && ((hour != t->tm_hour) || (minute != t->tm_min))) ) { hour = t->tm_hour; minute = t->tm_min; strftime(timestr, 20, "%H:%M", t); @@ -495,7 +507,7 @@ void CVFD::setMode(const MODES m, const char * const title) showServicename(servicename); showclock = true; if(g_settings.lcd_info_line) - showTime(); /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */ + switch_name_time_cnt = g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] + 10; break; case MODE_AUDIO: { diff --git a/src/driver/vfd.h b/src/driver/vfd.h index 2fb7b6ad8..59e74363b 100644 --- a/src/driver/vfd.h +++ b/src/driver/vfd.h @@ -86,6 +86,7 @@ class CVFD int last_toggle_state_power; bool clearClock; unsigned int timeout_cnt; + unsigned int switch_name_time_cnt; int fd; int brightness; char text[256]; diff --git a/src/driver/volume.cpp b/src/driver/volume.cpp index b66fe1b2f..89b420553 100644 --- a/src/driver/volume.cpp +++ b/src/driver/volume.cpp @@ -13,7 +13,7 @@ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -38,51 +38,50 @@ #include #include #include -#include #include +#include #if HAVE_COOL_HARDWARE #include #endif -CFrameBuffer * frameBuffer; extern CRemoteControl * g_RemoteControl; extern cAudio * audioDecoder; -static CProgressBar *g_volscale = NULL; CVolume::CVolume() { frameBuffer = CFrameBuffer::getInstance(); + volscale = NULL; #if 0 g_Zapit = new CZapitClient; g_RCInput = new CRCInput; v_RemoteControl = new CRemoteControl; #endif VolumeFont = SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO; - paintDigits = true; // For future On/Off digits paintShadow = false; // For future On/Off switch shadow MuteIconFrame = false; // For future On/Off switch IconFrame ShadowOffset = 4; mute_ay = 0; - m_mode = CNeutrinoApp::getInstance()->getMode(); + m_mode = CNeutrinoApp::getInstance()->getMode(); + channel_id = 0; + apid = 0; Init(); } CVolume::~CVolume() { - if (g_volscale) - delete g_volscale; - g_volscale = NULL; + delete volscale; } void CVolume::Init() { + paintDigits = g_settings.volume_digits; mute_ay_old = mute_ay; int faktor_h = 18; // scale * 10 int clock_height= 0; int clock_width = 0; - int x_corr = 0; + pB = 2; // progress border spacer = 8; @@ -108,10 +107,9 @@ void CVolume::Init() progress_h = std::max(icon_h, digit_h) - 2*pB; vbar_w += digit_w; } - - if (g_volscale) - delete g_volscale; - g_volscale = new CProgressBar(true, progress_w, progress_h, 50, 100, 80, true); + if (volscale) + delete volscale; + volscale = new CProgressBar(true, progress_w, progress_h, 50, 100, 80, true); // mute icon mute_icon_dx = 0; @@ -145,7 +143,8 @@ void CVolume::Init() //printf("\n##### [volume.cpp Zeile %d] mute_ax %d, mute_dx %d\n \n", __LINE__, mute_ax, mute_dx); switch (g_settings.volume_pos) { - case 0:// upper right + case 0:{// upper right + int x_corr = 0; if (( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_audio) && ( neutrino->getMode() != CNeutrinoApp::mode_pic)) { if ((neutrino->isMuted()) && (!g_settings.mode_clock)) x_corr = mute_dx + spacer; @@ -154,6 +153,7 @@ void CVolume::Init() } x = sw - vbar_w - x_corr; break; + } case 1:// upper left break; case 2:// bottom left @@ -219,7 +219,8 @@ void CVolume::AudioMute(int newValue, bool isEvent) void CVolume::setvol(int vol) { - audioDecoder->setVolume(vol, vol); + //audioDecoder->setVolume(vol, vol); + CZapit::getInstance()->SetVolume(vol); } void CVolume::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool nowait) @@ -248,15 +249,15 @@ void CVolume::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool nowa // volumebar shadow if (paintShadow) - frameBuffer->paintBoxRel(x+ShadowOffset , y+ShadowOffset , (paintDigits) ? vbar_w - vbar_h : vbar_w, vbar_h, colShadow, ROUNDED, CORNER_TOP_LEFT | CORNER_BOTTOM_LEFT); + frameBuffer->paintBoxRel(x+ShadowOffset , y+ShadowOffset , (paintDigits) ? vbar_w - vbar_h : vbar_w + 1, vbar_h, colShadow, ROUNDED, (paintDigits) ? CORNER_TOP_LEFT | CORNER_BOTTOM_LEFT : CORNER_ALL); // volumebar - frameBuffer->paintBoxRel(x , y , (paintDigits) ? vbar_w - vbar_h : vbar_w, vbar_h, colBar, ROUNDED, CORNER_TOP_LEFT | CORNER_BOTTOM_LEFT); + frameBuffer->paintBoxRel(x , y , (paintDigits) ? vbar_w - vbar_h : vbar_w + 1, vbar_h, colBar, ROUNDED, (paintDigits) ? CORNER_TOP_LEFT | CORNER_BOTTOM_LEFT : CORNER_ALL); // frame for progress frameBuffer->paintBoxRel(progress_x-pB, progress_y-pB, progress_w+pB*1, progress_h+pB*2, colFrame); // volume icon frameBuffer->paintIcon(NEUTRINO_ICON_VOLUME, icon_x, icon_y, 0, colBar); - g_volscale->reset(); + volscale->reset(); refreshVolumebar(vol); frameBuffer->blit(); } @@ -368,7 +369,7 @@ void CVolume::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool nowa void CVolume::refreshVolumebar(int current_volume) { // progressbar - g_volscale->paintProgressBar2(progress_x, progress_y, current_volume); + volscale->paintProgressBar2(progress_x, progress_y, current_volume); if (paintDigits) { // shadow for erase digits if (paintShadow) @@ -381,3 +382,21 @@ void CVolume::refreshVolumebar(int current_volume) g_Font[VolumeFont]->RenderString(digit_x, digit_y, digit_w, buff, colContent); } } + +bool CVolume::changeNotify(const neutrino_locale_t OptionName, void * data) +{ + bool ret = false; + if (ARE_LOCALES_EQUAL(OptionName, NONEXISTANT_LOCALE)) { + int percent = *(int *) data; + int vol = CZapit::getInstance()->GetVolume(); + /* keep resulting volume = (vol * percent)/100 not more than 115 */ + if (vol * percent > 11500) + percent = 11500 / vol; + + printf("CVolume::changeNotify: percent %d\n", percent); + CZapit::getInstance()->SetPidVolume(channel_id, apid, percent); + CZapit::getInstance()->SetVolumePercent(percent); + *(int *) data = percent; + } + return ret; +} diff --git a/src/driver/volume.h b/src/driver/volume.h index 797d9ccb1..1acb333b1 100644 --- a/src/driver/volume.h +++ b/src/driver/volume.h @@ -28,11 +28,15 @@ #ifndef __CVOLUME__ #define __CVOLUME__ +#include + #define ROUNDED g_settings.rounded_corners ? vbar_h/2 : 0 -class CVolume +class CVolume : public CChangeObserver { private: + CFrameBuffer * frameBuffer; + CProgressBar *volscale; void refreshVolumebar(int current_volume); int x, y, sy, sw, sh; @@ -47,12 +51,15 @@ class CVolume int rounded; int m_mode; bool paintShadow, paintDigits, MuteIconFrame; + /* volume adjustment variables */ + t_channel_id channel_id; + int apid; public: CVolume(); ~CVolume(); static CVolume* getInstance(); - + int spacer, mute_dx; void Init(); void AudioMute(int newValue, bool isEvent= false); @@ -60,7 +67,10 @@ class CVolume void setVolume(const neutrino_msg_t key, const bool bDoPaint = true, bool nowait = false); int getStartPosTop(){ return sy; } int getEndPosRight(){ return sw; } + + void SetCurrentPid(int pid) { apid = pid; } + void SetCurrentChannel(t_channel_id id) { channel_id = id; } + bool changeNotify(const neutrino_locale_t OptionName, void *); }; - #endif // __CVOLUME__ diff --git a/src/eitd/Makefile.am b/src/eitd/Makefile.am index 8b2afccc5..069f70709 100644 --- a/src/eitd/Makefile.am +++ b/src/eitd/Makefile.am @@ -24,5 +24,13 @@ endif AM_CPPFLAGS = -fno-rtti -fno-exceptions noinst_LIBRARIES = libsectionsd.a -libsectionsd_a_SOURCES = sectionsd.cpp debug.cpp dmx.cpp xmlutil.cpp \ - SIsections.cpp SIevents.cpp SIutils.cpp SIlanguage.cpp edvbstring.cpp +libsectionsd_a_SOURCES = \ + debug.cpp \ + dmx.cpp \ + edvbstring.cpp \ + sectionsd.cpp \ + SIevents.cpp \ + SIlanguage.cpp \ + SIsections.cpp \ + SIutils.cpp \ + xmlutil.cpp diff --git a/src/eitd/SIevents.cpp b/src/eitd/SIevents.cpp index 3e89ed875..78e60f5b6 100644 --- a/src/eitd/SIevents.cpp +++ b/src/eitd/SIevents.cpp @@ -561,7 +561,8 @@ void SIevent::dump(void) const for_each(ratings.begin(), ratings.end(), printSIparentalRating()); for_each(linkage_descs.begin(), linkage_descs.end(), printSIlinkage()); } - +#if 0 +//never used void SIevent::dumpSmall(void) const { for (std::map::const_iterator it = langName.begin() ; @@ -578,3 +579,4 @@ void SIevent::dumpSmall(void) const for_each(ratings.begin(), ratings.end(), printSIparentalRating()); for_each(linkage_descs.begin(), linkage_descs.end(), printSIlinkage()); } +#endif diff --git a/src/eitd/eitd.h b/src/eitd/eitd.h index 364d2f6c4..31858afe2 100644 --- a/src/eitd/eitd.h +++ b/src/eitd/eitd.h @@ -251,6 +251,7 @@ class CCNThread : public CEventsThread void cleanup(); /* CN-specific */ + OpenThreads::Mutex update_mutex; bool updating; cDemux * eitDmx; diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 70c8a19eb..412c860cd 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -60,7 +60,6 @@ #define DEBUG_SECTION_THREADS #define DEBUG_CN_THREAD -static bool sectionsd_ready = false; /*static*/ bool reader_ready = true; static unsigned int max_events; static bool notify_complete = false; @@ -142,7 +141,7 @@ static CFreeSatThread threadFSEIT; CSdtThread threadSDT; #endif -int sectionsd_stop = 0; +static int sectionsd_stop = 0; static bool slow_addevent = true; @@ -150,12 +149,12 @@ inline void readLockServices(void) { pthread_rwlock_rdlock(&servicesLock); } - +#ifdef ENABLE_SDT inline void writeLockServices(void) { pthread_rwlock_wrlock(&servicesLock); } - +#endif inline void unlockServices(void) { pthread_rwlock_unlock(&servicesLock); @@ -1164,7 +1163,7 @@ static void commandReadSIfromXML(int connfd, char *data, const unsigned dataLeng static void commandWriteSI2XML(int connfd, char *data, const unsigned dataLength) { sendEmptyResponse(connfd, NULL, 0); - if ((!reader_ready) || (dataLength > 100)){ + if (mySIeventsOrderUniqueKey.empty() || (!reader_ready) || (dataLength > 100)){ eventServer->sendEvent(CSectionsdClient::EVT_WRITE_SI_FINISHED, CEventServer::INITID_SECTIONSD); return; } @@ -1184,24 +1183,12 @@ struct s_cmd_table static s_cmd_table connectionCommands[sectionsd::numberOfCommands] = { { commandDumpStatusInformation, "commandDumpStatusInformation" }, - { sendEmptyResponse, "commandAllEventsChannelIDSearch" }, { commandPauseScanning, "commandPauseScanning" }, { commandGetIsScanningActive, "commandGetIsScanningActive" }, - { sendEmptyResponse, "commandActualEPGchannelID" }, - { sendEmptyResponse, "commandEventListTVids" }, - { sendEmptyResponse, "commandEventListRadioIDs" }, - { sendEmptyResponse, "commandCurrentNextInfoChannelID" }, - { sendEmptyResponse, "commandEPGepgID" }, - { sendEmptyResponse, "commandEPGepgIDshort" }, - { sendEmptyResponse, "commandComponentTagsUniqueKey" }, - { sendEmptyResponse, "commandAllEventsChannelID" }, - { sendEmptyResponse, "commandTimesNVODservice" }, { commandGetIsTimeSet, "commandGetIsTimeSet" }, { commandserviceChanged, "commandserviceChanged" }, - { sendEmptyResponse, "commandLinkageDescriptorsUniqueKey" }, { commandRegisterEventClient, "commandRegisterEventClient" }, { commandUnRegisterEventClient, "commandUnRegisterEventClient" }, - { sendEmptyResponse, "commandSetPrivatePid" }, { commandFreeMemory, "commandFreeMemory" }, { commandReadSIfromXML, "commandReadSIfromXML" }, { commandWriteSI2XML, "commandWriteSI2XML" }, @@ -1672,8 +1659,6 @@ void CCNThread::beforeWait() if (updating || eit_version == 0xff) return; - updating = true; - unsigned char filter[DMX_FILTER_SIZE]; unsigned char mask[DMX_FILTER_SIZE]; unsigned char mode[DMX_FILTER_SIZE]; @@ -1693,17 +1678,22 @@ void CCNThread::beforeWait() mask[3] = (0x1F << 1) | 0x01; mode[3] = 0x1F << 1; + update_mutex.lock(); eitDmx->Open(DMX_PSI_CHANNEL); eitDmx->sectionFilter(0x12, filter, mask, 4, 0 /*timeout*/, mode); + updating = true; + update_mutex.unlock(); } void CCNThread::afterWait() { xprintf("%s: stop eit update filter (%s)\n", name.c_str(), updating ? "active" : "not active"); + update_mutex.lock(); if (updating) { updating = false; eitDmx->Close(); } + update_mutex.unlock(); } void CCNThread::beforeSleep() @@ -1743,11 +1733,16 @@ void CCNThread::processSection() /* CN specific functions */ bool CCNThread::checkUpdate() { - if (!updating) - return false; - unsigned char buf[MAX_SECTION_LENGTH]; + + update_mutex.lock(); + if (!updating) { + update_mutex.unlock(); + return false; + } + int ret = eitDmx->Read(buf, MAX_SECTION_LENGTH, 10); + update_mutex.unlock(); if (ret > 0) { LongSection section(buf); @@ -2099,8 +2094,6 @@ printf("SIevent size: %d\n", sizeof(SIevent)); if (sections_debug) dump_sched_info("main"); - sectionsd_ready = true; - while (running && sectionsd_server.run(sectionsd_parse_command, sectionsd::ACTVERSION, true)) { sched_yield(); if (threadCN.checkUpdate()) { @@ -2162,65 +2155,71 @@ printf("SIevent size: %d\n", sizeof(SIevent)); } /* was: commandAllEventsChannelID sendAllEvents */ -void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "") +void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search, std::string search_text) { dprintf("sendAllEvents for " PRINTF_CHANNEL_ID_TYPE "\n", serviceUniqueKey); - if ((serviceUniqueKey& 0xFFFFFFFFFFFFULL) != 0) { //0xFFFFFFFFFFFFULL for CREATE_CHANNEL_ID64 - // service Found - readLockEvents(); - int serviceIDfound = 0; + if(!eList.empty() && search == 0)//skip on search mode + eList.clear(); - if (search_text.length()) - std::transform(search_text.begin(), search_text.end(), search_text.begin(), tolower); - for (MySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey::iterator e = mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.begin(); e != mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end(); ++e) - { - if ((*e)->get_channel_id() == (serviceUniqueKey& 0xFFFFFFFFFFFFULL)) { //0xFFFFFFFFFFFFULL for CREATE_CHANNEL_ID64 - serviceIDfound = 1; + t_channel_id serviceUniqueKey64 = serviceUniqueKey& 0xFFFFFFFFFFFFULL; //0xFFFFFFFFFFFFULL for CREATE_CHANNEL_ID64 + if(serviceUniqueKey64 == 0) + return; - bool copy = true; - if(search == 0); // nothing to do here - else if(search == 1) { - std::string eName = (*e)->getName(); - std::transform(eName.begin(), eName.end(), eName.begin(), tolower); - if(eName.find(search_text) == std::string::npos) - copy = false; - } - else if(search == 2) { - std::string eText = (*e)->getText(); - std::transform(eText.begin(), eText.end(), eText.begin(), tolower); - if(eText.find(search_text) == std::string::npos) - copy = false; - } - else if(search == 3) { - std::string eExtendedText = (*e)->getExtendedText(); - std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower); - if(eExtendedText.find(search_text) == std::string::npos) - copy = false; - } + // service Found + readLockEvents(); + int serviceIDfound = 0; - if(copy) { - for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t) - { - CChannelEvent aEvent; - aEvent.eventID = (*e)->uniqueKey(); - aEvent.startTime = t->startzeit; - aEvent.duration = t->dauer; - aEvent.description = (*e)->getName(); - if (((*e)->getText()).empty()) - aEvent.text = (*e)->getExtendedText().substr(0, 120); - else - aEvent.text = (*e)->getText(); - aEvent.channelID = serviceUniqueKey; - eList.push_back(aEvent); - } - } // if = serviceID + if (search_text.length()) + std::transform(search_text.begin(), search_text.end(), search_text.begin(), tolower); + + for (MySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey::iterator e = mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.begin(); e != mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end(); ++e) + { + if ((*e)->get_channel_id() == serviceUniqueKey64) { + serviceIDfound = 1; + + bool copy = true; + if(search == 0); // nothing to do here + else if(search == 1) { + std::string eName = (*e)->getName(); + std::transform(eName.begin(), eName.end(), eName.begin(), tolower); + if(eName.find(search_text) == std::string::npos) + copy = false; } - else if ( serviceIDfound ) - break; // sind nach serviceID und startzeit sortiert -> nicht weiter suchen + else if(search == 2) { + std::string eText = (*e)->getText(); + std::transform(eText.begin(), eText.end(), eText.begin(), tolower); + if(eText.find(search_text) == std::string::npos) + copy = false; + } + else if(search == 3) { + std::string eExtendedText = (*e)->getExtendedText(); + std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower); + if(eExtendedText.find(search_text) == std::string::npos) + copy = false; + } + + if(copy) { + for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t) + { + CChannelEvent aEvent; + aEvent.eventID = (*e)->uniqueKey(); + aEvent.startTime = t->startzeit; + aEvent.duration = t->dauer; + aEvent.description = (*e)->getName(); + if (((*e)->getText()).empty()) + aEvent.text = (*e)->getExtendedText().substr(0, 120); + else + aEvent.text = (*e)->getText(); + aEvent.channelID = serviceUniqueKey; + eList.push_back(aEvent); + } + } // if = serviceID } - unlockEvents(); + else if ( serviceIDfound ) + break; // sind nach serviceID und startzeit sortiert -> nicht weiter suchen } + unlockEvents(); } /* send back the current and next event for the channel id passed to it @@ -2234,7 +2233,7 @@ void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventL * TODO: the handling of "flag" should be vastly simplified. */ /* was: commandCurrentNextInfoChannelID */ -void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ) +void CEitManager::getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ) { dprintf("[sectionsd] Request of current/next information for " PRINTF_CHANNEL_ID_TYPE "\n", uniqueServiceKey); @@ -2244,7 +2243,7 @@ void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSections /* ugly hack: retry fetching current/next by restarting dmxCN if this is true */ //bool change = false;//TODO remove ? - //t_channel_id * uniqueServiceKey = (t_channel_id *)data; + uniqueServiceKey &= 0xFFFFFFFFFFFFULL; readLockEvents(); /* if the currently running program is requested... */ @@ -2426,7 +2425,7 @@ void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSections } /* commandEPGepgIDshort */ -bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata) +bool CEitManager::getEPGidShort(event_id_t epgID, CShortEPGData * epgdata) { bool ret = false; dprintf("Request of current EPG for 0x%llx\n", epgID); @@ -2451,7 +2450,7 @@ bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata) /*was getEPGid commandEPGepgID(int connfd, char *data, const unsigned dataLength) */ /* TODO item / itemDescription */ -bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata) +bool CEitManager::getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata) { bool ret = false; dprintf("Request of actual EPG for 0x%llx 0x%lx\n", epgID, startzeit); @@ -2495,14 +2494,15 @@ bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData return ret; } /* was commandActualEPGchannelID(int connfd, char *data, const unsigned dataLength) */ -bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata) +bool CEitManager::getActualEPGServiceKey(const t_channel_id channel_id, CEPGData * epgdata) { bool ret = false; SIevent evt; SItime zeit(0, 0); - dprintf("[commandActualEPGchannelID] Request of current EPG for " PRINTF_CHANNEL_ID_TYPE "\n", uniqueServiceKey); + dprintf("[commandActualEPGchannelID] Request of current EPG for " PRINTF_CHANNEL_ID_TYPE "\n", channel_id); + t_channel_id uniqueServiceKey = channel_id & 0xFFFFFFFFFFFFULL; readLockEvents(); if (uniqueServiceKey == messaging_current_servicekey) { if (myCurrentEvent) { @@ -2558,23 +2558,20 @@ bool channel_in_requested_list(t_channel_id * clist, t_channel_id chid, int len) { if(len == 0) return true; for(int i = 0; i < len; i++) { - if(clist[i] == chid) + if((clist[i] & 0xFFFFFFFFFFFFULL) == chid) return true; } return false; } /* was static void sendEventList(int connfd, const unsigned char serviceTyp1, const unsigned char serviceTyp2 = 0, int sendServiceName = 1, t_channel_id * chidlist = NULL, int clen = 0) */ -void sectionsd_getChannelEvents(CChannelEventList &eList, const bool tv_mode = true, t_channel_id *chidlist = NULL, int clen = 0) +void CEitManager::getChannelEvents(CChannelEventList &eList, t_channel_id *chidlist, int clen) { - clen = clen / sizeof(t_channel_id); - t_channel_id uniqueNow = 0; t_channel_id uniqueOld = 0; bool found_already = true; time_t azeit = time(NULL); - if(tv_mode) {} showProfiling("sectionsd_getChannelEvents start"); readLockEvents(); @@ -2624,7 +2621,7 @@ showProfiling("sectionsd_getChannelEvents end"); } /*was static void commandComponentTagsUniqueKey(int connfd, char *data, const unsigned dataLength) */ -bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags) +bool CEitManager::getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags) { bool ret = false; dprintf("Request of ComponentTags for 0x%llx\n", uniqueKey); @@ -2654,7 +2651,7 @@ bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdC } /* was static void commandLinkageDescriptorsUniqueKey(int connfd, char *data, const unsigned dataLength) */ -bool sectionsd_getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors) +bool CEitManager::getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors) { bool ret = false; dprintf("Request of LinkageDescriptors for 0x%llx\n", uniqueKey); @@ -2685,11 +2682,12 @@ bool sectionsd_getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSecti } /* was static void commandTimesNVODservice(int connfd, char *data, const unsigned dataLength) */ -bool sectionsd_getNVODTimesServiceKey(const t_channel_id uniqueServiceKey, CSectionsdClient::NVODTimesList& nvod_list) +bool CEitManager::getNVODTimesServiceKey(const t_channel_id channel_id, CSectionsdClient::NVODTimesList& nvod_list) { bool ret = false; - dprintf("Request of NVOD times for " PRINTF_CHANNEL_ID_TYPE "\n", uniqueServiceKey); + dprintf("Request of NVOD times for " PRINTF_CHANNEL_ID_TYPE "\n", channel_id); + t_channel_id uniqueServiceKey = channel_id & 0xFFFFFFFFFFFFULL; nvod_list.clear(); readLockServices(); @@ -2724,17 +2722,8 @@ bool sectionsd_getNVODTimesServiceKey(const t_channel_id uniqueServiceKey, CSect return ret; } -void sectionsd_setPrivatePid(unsigned short /*pid*/) -{ -} - -void sectionsd_set_languages(const std::vector& newLanguages) +void CEitManager::setLanguages(const std::vector& newLanguages) { SIlanguage::setLanguages(newLanguages); SIlanguage::saveLanguages(); } - -bool sectionsd_isReady(void) -{ - return sectionsd_ready; -} diff --git a/src/eitd/sectionsd.h b/src/eitd/sectionsd.h index b0db88026..2181502f6 100644 --- a/src/eitd/sectionsd.h +++ b/src/eitd/sectionsd.h @@ -32,13 +32,6 @@ #include #include #include -#include "dmx.h" - -//#include "SIutils.hpp" -//#include "SIservices.hpp" -//#include "SIevents.hpp" -//#include "SIsections.hpp" -//#include "SIlanguage.hpp" class CEitManager : public OpenThreads::Thread, public OpenThreads::Mutex { @@ -61,6 +54,17 @@ class CEitManager : public OpenThreads::Thread, public OpenThreads::Mutex bool Start(); bool Stop(); void SetConfig(CSectionsdClient::epg_config &cfg) { config = cfg; }; + + void getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); + void getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ); + bool getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); + bool getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); + bool getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); + void getChannelEvents(CChannelEventList &eList, t_channel_id *chidlist = NULL, int clen = 0); + bool getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); + bool getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); + bool getNVODTimesServiceKey(const t_channel_id uniqueServiceKey, CSectionsdClient::NVODTimesList& nvod_list); + void setLanguages(const std::vector& newLanguages); }; #endif diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 867d0497e..58534e620 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -68,6 +68,7 @@ libneutrino_gui_a_SOURCES = \ moviebrowser.cpp \ movieinfo.cpp \ movieplayer.cpp \ + network_service.cpp \ network_setup.cpp \ nfs.cpp \ osd_setup.cpp \ @@ -99,8 +100,7 @@ libneutrino_gui_a_SOURCES = \ user_menue_setup.cpp \ vfd_setup.cpp \ videosettings.cpp \ - zapit_setup.cpp \ - network_service.cpp + zapit_setup.cpp libneutrino_gui2_a_SOURCES = \ cam_menu.cpp \ diff --git a/src/gui/audio_select.cpp b/src/gui/audio_select.cpp index e75e74742..cabf99de6 100644 --- a/src/gui/audio_select.cpp +++ b/src/gui/audio_select.cpp @@ -40,13 +40,15 @@ #include #include #include +#include +#include extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ extern CAudioSetupNotifier * audioSetupNotifier; #include -#include "libdvbsub/dvbsub.h" -#include "libtuxtxt/teletext.h" +#include +#include // // -- AUDIO Selector Menue Handler Class @@ -83,7 +85,7 @@ int CAudioSelectMenuHandler::exec(CMenuTarget* parent, const std::string &action return menu_return::RETURN_EXIT; } - if (parent) + if (parent) parent->hide(); return doMenu (); @@ -94,7 +96,7 @@ int CAudioSelectMenuHandler::doMenu () CMenuWidget AudioSelector(LOCALE_AUDIOSELECTMENUE_HEAD, NEUTRINO_ICON_AUDIO, width); CSubtitleChangeExec SubtitleChanger; - + //show cancel button if configured in usermenu settings if (g_settings.personalize[SNeutrinoSettings::P_UMENU_SHOW_CANCEL]) AudioSelector.addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); @@ -103,34 +105,31 @@ int CAudioSelectMenuHandler::doMenu () unsigned int shortcut_num = 1; + uint p_count = g_RemoteControl->current_PIDs.APIDs.size(); // -- setup menue due to Audio PIDs - if (g_RemoteControl->current_PIDs.APIDs.size() > 1) + for( uint i=0; i < p_count; i++ ) { - uint p_count = g_RemoteControl->current_PIDs.APIDs.size(); - CMenuForwarderNonLocalized* fw[p_count]; - - for( uint i=0; i < p_count; i++ ) - { - char apid[5]; - sprintf(apid, "%d", i); - fw[i] = new CMenuForwarderNonLocalized(g_RemoteControl->current_PIDs.APIDs[i].desc, true, NULL, this, apid, CRCInput::convertDigitToKey(i + 1)); - fw[i]->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); - AudioSelector.addItem(fw[i], (i == g_RemoteControl->current_PIDs.PIDs.selected_apid)); - shortcut_num = i+1; - } - AudioSelector.addItem(GenericMenuSeparatorLine); + char apid[5]; + sprintf(apid, "%d", i); + CMenuForwarderNonLocalized *fw = new CMenuForwarderNonLocalized(g_RemoteControl->current_PIDs.APIDs[i].desc, + true, NULL, this, apid, CRCInput::convertDigitToKey(i + 1)); + fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); + AudioSelector.addItem(fw, (i == g_RemoteControl->current_PIDs.PIDs.selected_apid)); + shortcut_num = i+1; } - + if (p_count) + AudioSelector.addItem(GenericMenuSeparatorLine); + // -- setup menue for to Dual Channel Stereo CMenuOptionChooser* oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_MODE, - &g_settings.audio_AnalogMode, - AUDIOMENU_ANALOGOUT_OPTIONS, AUDIOMENU_ANALOGOUT_OPTION_COUNT, + &g_settings.audio_AnalogMode, + AUDIOMENU_ANALOGOUT_OPTIONS, AUDIOMENU_ANALOGOUT_OPTION_COUNT, true, audioSetupNotifier, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); AudioSelector.addItem( oj ); oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_OUT, &g_settings.analog_out, - OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, + OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); AudioSelector.addItem( oj ); @@ -140,15 +139,15 @@ int CAudioSelectMenuHandler::doMenu () CZapitChannel * cc = channelList->getChannel(curnum); bool sep_added = false; - if(cc) + if(cc) { - for (int i = 0 ; i < (int)cc->getSubtitleCount() ; ++i) + for (int i = 0 ; i < (int)cc->getSubtitleCount() ; ++i) { CZapitAbsSub* s = cc->getChannelSub(i); if (s->thisSubType == CZapitAbsSub::DVB) { CZapitDVBSub* sd = reinterpret_cast(s); printf("[neutrino] adding DVB subtitle %s pid %x\n", sd->ISO639_language_code.c_str(), sd->pId); - if(!sep_added) + if(!sep_added) { sep_added = true; AudioSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SUBTITLES_HEAD)); @@ -160,11 +159,11 @@ int CAudioSelectMenuHandler::doMenu () AudioSelector.addItem(new CMenuForwarderNonLocalized(item /*sd->ISO639_language_code.c_str()*/, sd->pId != dvbsub_getpid(), NULL, &SubtitleChanger, spid, CRCInput::convertDigitToKey(++shortcut_num))); } - if (s->thisSubType == CZapitAbsSub::TTX) + if (s->thisSubType == CZapitAbsSub::TTX) { CZapitTTXSub* sd = reinterpret_cast(s); printf("[neutrino] adding TTX subtitle %s pid %x mag %X page %x\n", sd->ISO639_language_code.c_str(), sd->pId, sd->teletext_magazine_number, sd->teletext_page_number); - if(!sep_added) + if(!sep_added) { sep_added = true; AudioSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SUBTITLES_HEAD)); @@ -172,17 +171,31 @@ int CAudioSelectMenuHandler::doMenu () char spid[64]; int page = ((sd->teletext_magazine_number & 0xFF) << 8) | sd->teletext_page_number; int pid = sd->pId; - snprintf(spid,sizeof(spid), "TTX:%d:%03X:%s", sd->pId, page, sd->ISO639_language_code.c_str()); + snprintf(spid,sizeof(spid), "TTX:%d:%03X:%s", sd->pId, page, sd->ISO639_language_code.c_str()); char item[64]; snprintf(item,sizeof(item), "TTX: %s (pid %x page %03X)", sd->ISO639_language_code.c_str(), sd->pId, page); AudioSelector.addItem(new CMenuForwarderNonLocalized(item /*sd->ISO639_language_code.c_str()*/, !tuxtx_subtitle_running(&pid, &page, NULL), NULL, &SubtitleChanger, spid, CRCInput::convertDigitToKey(++shortcut_num))); } } - - if(sep_added) + + if(sep_added) AudioSelector.addItem(new CMenuForwarder(LOCALE_SUBTITLES_STOP, true, NULL, &SubtitleChanger, "off", CRCInput::RC_stop)); } + AudioSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUST)); + + /* setting volume percent to zapit with channel_id/apid = 0 means current channel and pid */ + CVolume::getInstance()->SetCurrentChannel(0); + CVolume::getInstance()->SetCurrentPid(0); + int percent[p_count]; + for (uint i=0; i < p_count; i++) { + percent[i] = CZapit::getInstance()->GetPidVolume(0, g_RemoteControl->current_PIDs.APIDs[i].pid); + AudioSelector.addItem(new CMenuOptionNumberChooser(NONEXISTANT_LOCALE, &percent[i], + i == g_RemoteControl->current_PIDs.PIDs.selected_apid, + 0, 999, CVolume::getInstance(), 0, 0, NONEXISTANT_LOCALE, + g_RemoteControl->current_PIDs.APIDs[i].desc)); + } + return AudioSelector.exec(NULL, ""); } diff --git a/src/gui/audio_setup.cpp b/src/gui/audio_setup.cpp index 4e13def93..080041cf6 100644 --- a/src/gui/audio_setup.cpp +++ b/src/gui/audio_setup.cpp @@ -33,7 +33,7 @@ #endif -#include "gui/audio_setup.h" +#include "audio_setup.h" #include #include @@ -54,7 +54,7 @@ extern cAudio *audioDecoder; CAudioSetup::CAudioSetup(bool wizard_mode) { is_wizard = wizard_mode; - + width = w_max (40, 10); selected = -1; } @@ -68,18 +68,17 @@ int CAudioSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/) { dprintf(DEBUG_DEBUG, "init audio setup\n"); int res = menu_return::RETURN_REPAINT; - + if (parent) { parent->hide(); } res = showAudioSetup(); - + return res; } - #define AUDIOMENU_ANALOGOUT_OPTION_COUNT 3 const CMenuOptionChooser::keyval AUDIOMENU_ANALOGOUT_OPTIONS[AUDIOMENU_ANALOGOUT_OPTION_COUNT] = { @@ -134,23 +133,30 @@ int CAudioSetup::showAudioSetup() //analog modes (stereo, mono l/r...) CMenuOptionChooser * as_oj_analogmode = new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_MODE, &g_settings.audio_AnalogMode, AUDIOMENU_ANALOGOUT_OPTIONS, AUDIOMENU_ANALOGOUT_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_analogmode->setHint("", LOCALE_MENU_HINT_AUDIO_ANALOG_MODE); + //dd subchannel auto on/off CMenuOptionChooser * as_oj_ddsubchn = new CMenuOptionChooser(LOCALE_AUDIOMENU_DOLBYDIGITAL, &g_settings.audio_DolbyDigital, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_ddsubchn->setHint("", LOCALE_MENU_HINT_AUDIO_DD); + //dd via hdmi CMenuOptionChooser *as_oj_dd_hdmi = NULL; - if (g_info.hw_caps->has_HDMI) + if (g_info.hw_caps->has_HDMI) { as_oj_dd_hdmi = new CMenuOptionChooser(LOCALE_AUDIOMENU_HDMI_DD, &g_settings.hdmi_dd, AUDIOMENU_HDMI_DD_OPTIONS, AUDIOMENU_HDMI_DD_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_dd_hdmi->setHint("", LOCALE_MENU_HINT_AUDIO_HDMI_DD); + } + //dd via spdif CMenuOptionChooser * as_oj_dd_spdif = new CMenuOptionChooser(LOCALE_AUDIOMENU_SPDIF_DD, &g_settings.spdif_dd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_dd_spdif->setHint("", LOCALE_MENU_HINT_AUDIO_SPDIF_DD); + //av synch CMenuOptionChooser * as_oj_avsync = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVSYNC, &g_settings.avsync, AUDIOMENU_AVSYNC_OPTIONS, AUDIOMENU_AVSYNC_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_avsync->setHint("", LOCALE_MENU_HINT_AUDIO_AVSYNC); + //volume steps CMenuOptionNumberChooser * as_oj_vsteps = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_STEP, (int *)&g_settings.current_volume_step, true, 1, 25, NULL); + as_oj_vsteps->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTEP); //clock rec // CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier); @@ -160,18 +166,22 @@ int CAudioSetup::showAudioSetup() //SRS //SRS algo CMenuOptionChooser * as_oj_algo = new CMenuOptionChooser(LOCALE_AUDIO_SRS_ALGO, &g_settings.srs_algo, AUDIOMENU_SRS_OPTIONS, AUDIOMENU_SRS_OPTION_COUNT, g_settings.srs_enable, audioSetupNotifier); - + as_oj_algo->setHint("", LOCALE_MENU_HINT_AUDIO_SRS_ALGO); + //SRS noise manage CMenuOptionChooser * as_oj_noise = new CMenuOptionChooser(LOCALE_AUDIO_SRS_NMGR, &g_settings.srs_nmgr_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.srs_enable, audioSetupNotifier); - + as_oj_noise->setHint("", LOCALE_MENU_HINT_AUDIO_SRS_NMGR); + //SRS reverence volume CMenuOptionNumberChooser * as_oj_volrev = new CMenuOptionNumberChooser(LOCALE_AUDIO_SRS_VOLUME, &g_settings.srs_ref_volume, g_settings.srs_enable, 1, 100, audioSetupNotifier); - + as_oj_volrev->setHint("", LOCALE_MENU_HINT_AUDIO_SRS_VOLUME); + //SRS on/off CTruVolumeNotifier truevolSetupNotifier(as_oj_algo, as_oj_noise, as_oj_volrev); CMenuOptionChooser * as_oj_srsonoff = new CMenuOptionChooser(LOCALE_AUDIO_SRS_IQ, &g_settings.srs_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, &truevolSetupNotifier); + as_oj_srsonoff->setHint("", LOCALE_MENU_HINT_AUDIO_SRS); #endif - + #if 0 CStringInput * audio_PCMOffset = new CStringInput(LOCALE_AUDIOMENU_PCMOFFSET, g_settings.audio_PCMOffset, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 ", audioSetupNotifier); CMenuForwarder *mf = new CMenuForwarder(LOCALE_AUDIOMENU_PCMOFFSET, true, g_settings.audio_PCMOffset, audio_PCMOffset ); @@ -204,7 +214,7 @@ int CAudioSetup::showAudioSetup() #if 0 audioSettings->addItem(mf); #endif - + int res = audioSettings->exec(NULL, ""); selected = audioSettings->getSelected(); delete audioSettings; @@ -218,12 +228,11 @@ void CAudioSetup::setWizardMode(bool mode) is_wizard = mode; } - CTruVolumeNotifier::CTruVolumeNotifier(CMenuOptionChooser* o1, CMenuOptionChooser* o2, CMenuOptionNumberChooser *n1) { - toDisable_oj[0]=o1; - toDisable_oj[1]=o2; - toDisable_nj=n1; + toDisable_oj[0]=o1; + toDisable_oj[1]=o2; + toDisable_nj=n1; } bool CTruVolumeNotifier::changeNotify(const neutrino_locale_t, void * data) @@ -239,4 +248,3 @@ bool CTruVolumeNotifier::changeNotify(const neutrino_locale_t, void * data) return false; } - diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 330e4ce62..f0fa06614 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -60,15 +60,13 @@ #include #include -#include #include #include #include #include #include -#include -#include +#include #include #include @@ -146,6 +144,10 @@ void CAudiofileExt::operator=(const CAudiofileExt& src) #include #include +#if LIBCURL_VERSION_NUM < 0x071507 +#include +#endif + struct MemoryStruct { char *memory; size_t size; @@ -184,6 +186,8 @@ CAudioPlayerGui::CAudioPlayerGui(bool inetmode) m_frameBuffer = CFrameBuffer::getInstance(); m_visible = false; m_inetmode = inetmode; + dline = NULL; + ibox = NULL; Init(); } @@ -233,6 +237,8 @@ CAudioPlayerGui::~CAudioPlayerGui() m_title2Pos.clear(); // g_Zapit->setStandby (false); g_Sectionsd->setPauseScanning (false); + delete dline; + delete ibox; } //------------------------------------------------------------------------ @@ -312,7 +318,7 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) g_Sectionsd->setPauseScanning(true); puts("[audioplayer.cpp] executing " AUDIOPLAYER_START_SCRIPT "."); - if (safe_system(AUDIOPLAYER_START_SCRIPT) != 0) + if (my_system(AUDIOPLAYER_START_SCRIPT) != 0) perror("Datei " AUDIOPLAYER_START_SCRIPT " fehlt.Bitte erstellen, wenn gebraucht.\nFile " AUDIOPLAYER_START_SCRIPT " not found. Please create if needed.\n"); show(); @@ -324,7 +330,7 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) m_frameBuffer->paintBackground(); puts("[audioplayer.cpp] executing " AUDIOPLAYER_END_SCRIPT "."); - if (safe_system(AUDIOPLAYER_END_SCRIPT) != 0) + if (my_system(AUDIOPLAYER_END_SCRIPT) != 0) perror("Datei " AUDIOPLAYER_END_SCRIPT " fehlt. Bitte erstellen, wenn gebraucht.\nFile " AUDIOPLAYER_END_SCRIPT " not found. Please create if needed.\n"); g_Zapit->unlockPlayBack(); @@ -694,6 +700,9 @@ int CAudioPlayerGui::show() //InputSelector.addItem(GenericMenuSeparator); hide(); InputSelector.exec(NULL, ""); + + delete InetRadioInputChanger; + if (select >= 0) old_select = select; switch (select) { @@ -1871,46 +1880,34 @@ void CAudioPlayerGui::clearItemID3DetailsLine () void CAudioPlayerGui::paintItemID3DetailsLine (int pos) { int xpos = m_x - ConnectLineBox_Width; - int ypos1 = m_y + m_title_height + m_theight+ 0 + pos*m_fheight; - int ypos2 = m_y + (m_height - m_info_height); + int ypos1 = m_y + m_title_height + m_theight+ 0 + pos*m_fheight + INFO_BOX_Y_OFFSET; + int ypos2 = m_y + (m_height - m_info_height) + INFO_BOX_Y_OFFSET; int ypos1a = ypos1 + (m_fheight / 2) - 2; int ypos2a = ypos2 + (m_info_height / 2) - 2; - fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6; - fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1; - int c_rad_small = RADIUS_SMALL; + // clear details line + if (dline != NULL) + dline->hide(); - // Clear - m_frameBuffer->paintBackgroundBoxRel(xpos - 1, m_y + m_title_height, ConnectLineBox_Width + 1, - m_height - m_title_height); + // clear infobox + if (ibox != NULL) + ibox->hide(); - // paint Line if detail info (and not valid list pos) + // paint Line if detail info (and not valid list pos) and info box if (!m_playlist.empty() && (pos >= 0)) { - int fh = m_info_height > RADIUS_MID*2 ? m_info_height - RADIUS_MID*2 : m_info_height; - // 1. col thick line - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos1, 4, m_fheight, col2, c_rad_small, CORNER_LEFT); - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 3, ypos1, 8, m_fheight, col1, c_rad_small, CORNER_LEFT); // item marker + //details line + if (dline == NULL) + dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, m_fheight/2+1, m_fheight); + dline->setYPos(ypos1a); + dline->paint(); - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos2+RADIUS_MID, 4, fh /*m_info_height*/, col1); - - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos1a, 4, ypos2a - ypos1a, col1); - - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos1a, 12, 4, col1); - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos2a, 12, 4, col1); - - // 2. col small line - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos2+RADIUS_MID, 1, fh /*m_info_height*/, col2); - - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos1a, 1, ypos2a - ypos1a + 4, col2); - - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos1a, 12, 1, col2); - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 12, ypos2a, 8, 1, col2); - - // -- small Frame around infobox - m_frameBuffer->paintBoxFrame(m_x, ypos2, m_width, m_info_height, 2, col1, RADIUS_MID); // paint id3 infobox - m_frameBuffer->paintBoxRel(m_x + 2, ypos2 + 2 , m_width - 4, m_info_height - 4, COL_MENUCONTENTDARK_PLUS_0, RADIUS_MID); + if (ibox == NULL) + ibox = new CComponentsInfoBox(m_x, ypos2, m_width, m_info_height, false); + ibox->setYPos(ypos2); + ibox->paint(false, true); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + 10, ypos2 + 2 + 1*m_fheight, m_width- 80, m_playlist[m_selected].MetaData.title, COL_MENUCONTENTDARK, 0, true); // UTF-8 std::string tmp; @@ -1939,7 +1936,10 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) } else { - m_frameBuffer->paintBackgroundBoxRel(m_x, ypos2, m_width, m_info_height); + if (dline != NULL) + dline->hide(); + if (ibox != NULL) + ibox->hide(); } m_frameBuffer->blit(); } diff --git a/src/gui/audioplayer.h b/src/gui/audioplayer.h index 3fea78f12..92ff2a2bb 100644 --- a/src/gui/audioplayer.h +++ b/src/gui/audioplayer.h @@ -34,10 +34,11 @@ #define __audioplayergui__ -#include "driver/framebuffer.h" -#include "driver/audiofile.h" -#include "gui/filebrowser.h" -#include "gui/widget/menue.h" +#include +#include +#include +#include +#include #include @@ -140,6 +141,8 @@ class CAudioPlayerGui : public CMenuTarget bool m_screensaver; bool m_inetmode; uint32_t stimer; + CComponentsDetailLine *dline; + CComponentsInfoBox *ibox; SMSKeyInput m_SMSKeyInput; diff --git a/src/gui/audioplayer_setup.cpp b/src/gui/audioplayer_setup.cpp index b193e6237..5ebee8d9a 100644 --- a/src/gui/audioplayer_setup.cpp +++ b/src/gui/audioplayer_setup.cpp @@ -34,7 +34,7 @@ #endif -#include "gui/audioplayer_setup.h" +#include "audioplayer_setup.h" #include #include @@ -44,8 +44,8 @@ #include #include -#include "gui/audioplayer.h" -#include "gui/filebrowser.h" +#include +#include #include @@ -82,7 +82,7 @@ int CAudioPlayerSetup::exec(CMenuTarget* parent, const std::string &actionKey) } res = showAudioPlayerSetup(); - + return res; } @@ -98,26 +98,53 @@ const CMenuOptionChooser::keyval AUDIOPLAYER_DISPLAY_ORDER_OPTIONS[AUDIOPLAYER_D /*shows the audio setup menue*/ int CAudioPlayerSetup::showAudioPlayerSetup() { + CMenuOptionChooser * mc; + CMenuForwarder * mf; + CMenuWidget* audioplayerSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_AUDIOSETUP); audioplayerSetup->addIntroItems(LOCALE_AUDIOPLAYER_NAME); - audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_DISPLAY_ORDER, &g_settings.audioplayer_display , AUDIOPLAYER_DISPLAY_ORDER_OPTIONS, AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT, true )); - audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_FOLLOW , &g_settings.audioplayer_follow , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true )); - audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SELECT_TITLE_BY_NAME , &g_settings.audioplayer_select_title_by_name , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true )); - audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_REPEAT_ON , &g_settings.audioplayer_repeat_on , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true )); - audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SHOW_PLAYLIST, &g_settings.audioplayer_show_playlist, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true )); + // display order + mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_DISPLAY_ORDER, &g_settings.audioplayer_display, AUDIOPLAYER_DISPLAY_ORDER_OPTIONS, AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_ORDER); + audioplayerSetup->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_FOLLOW, &g_settings.audioplayer_follow, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_FOLLOW); + audioplayerSetup->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SELECT_TITLE_BY_NAME, &g_settings.audioplayer_select_title_by_name, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true ); + mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_TITLE); + audioplayerSetup->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_REPEAT_ON, &g_settings.audioplayer_repeat_on, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true ); + mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_REPEAT); + audioplayerSetup->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SHOW_PLAYLIST, &g_settings.audioplayer_show_playlist, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_PLAYLIST); + audioplayerSetup->addItem(mc); CStringInput audio_screensaver(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, g_settings.audioplayer_screensaver, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 "); - audioplayerSetup->addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, true, g_settings.audioplayer_screensaver, &audio_screensaver)); + mf = new CMenuForwarder(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, true, g_settings.audioplayer_screensaver, &audio_screensaver); + mf->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_SCREENSAVER); + audioplayerSetup->addItem(mf); - audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_HIGHPRIO , &g_settings.audioplayer_highprio , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true )); + mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_HIGHPRIO, &g_settings.audioplayer_highprio, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true ); + mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_HIGHPRIO); + audioplayerSetup->addItem(mc); #if 0 if (CVFD::getInstance()->has_lcd) //FIXME audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SPECTRUM , &g_settings.spectrum , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true )); #endif - audioplayerSetup->addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_DEFDIR, true, g_settings.network_nfs_audioplayerdir, this, "audioplayerdir")); - audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_ENABLE_SC_METADATA, &g_settings.audioplayer_enable_sc_metadata, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true )); + mf = new CMenuForwarder(LOCALE_AUDIOPLAYER_DEFDIR, true, g_settings.network_nfs_audioplayerdir, this, "audioplayerdir"); + mf->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_DEFDIR); + audioplayerSetup->addItem(mf); + + mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_ENABLE_SC_METADATA, &g_settings.audioplayer_enable_sc_metadata, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_SC_METADATA); + audioplayerSetup->addItem(mc); int res = audioplayerSetup->exec (NULL, ""); delete audioplayerSetup; diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index d328774e1..8b51e269a 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -35,19 +35,17 @@ #include #include +#include "bouqueteditor_channels.h" +#include "bouqueteditor_bouquets.h" #include #include #include #include -#include #include #include -#include #include -#include "bouqueteditor_channels.h" -#include "bouqueteditor_bouquets.h" extern CBouquetManager *g_bouquetManager; CBEBouquetWidget::CBEBouquetWidget() @@ -66,6 +64,11 @@ CBEBouquetWidget::CBEBouquetWidget() liststart = 0; state = beDefault; blueFunction = beRename; + Bouquets = NULL; + iheight = 0; + ButtonHeight = 0; + fheight = 0; + theight = 0; } void CBEBouquetWidget::paintItem(int pos) @@ -533,7 +536,7 @@ std::string CBEBouquetWidget::inputName(const char * const defaultName, const ne { char Name[30]; - strncpy(Name, defaultName, 30); + strncpy(Name, defaultName, sizeof(Name)-1); CStringInputSMS * nameInput = new CStringInputSMS(caption, Name, 29, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789-.,:|!?/ "); nameInput->exec(this, ""); diff --git a/src/gui/bedit/bouqueteditor_bouquets.h b/src/gui/bedit/bouqueteditor_bouquets.h index f916eae2b..8fff41f56 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.h +++ b/src/gui/bedit/bouqueteditor_bouquets.h @@ -51,7 +51,7 @@ public: virtual void onBouquetsChanged() {}; }; -class CBEBouquetWidget : public CMenuWidget +class CBEBouquetWidget : public CMenuTarget { private: diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 2381b217e..97479abdb 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -35,10 +35,7 @@ #include #endif -#include -#include #include - #include "bouqueteditor_channels.h" #include @@ -53,7 +50,6 @@ #include #include -#include extern CBouquetManager *g_bouquetManager; CBEChannelWidget::CBEChannelWidget(const std::string & Caption, unsigned int Bouquet) @@ -87,6 +83,15 @@ CBEChannelWidget::CBEChannelWidget(const std::string & Caption, unsigned int Bou caption = Caption; bouquet = Bouquet; mode = CZapitClient::MODE_TV; + dline = NULL; + ibox = NULL; + Channels = NULL; +} + +CBEChannelWidget::~CBEChannelWidget() +{ + delete dline; + delete ibox; } void CBEChannelWidget::paintItem(int pos) @@ -100,9 +105,6 @@ void CBEChannelWidget::paintItem(int pos) color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; - // clear details - frameBuffer->paintBoxRel(x+2, y + height + 2, width-4, info_height - 4, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE); - if(current < Channels->size()) { paintItem2DetailsLine (pos, current); paintDetails(current); @@ -192,8 +194,8 @@ void CBEChannelWidget::paintDetails(int index) else desc = desc + " (" + satname + ")"; - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight, width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight+INFO_BOX_Y_OFFSET, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight+INFO_BOX_Y_OFFSET, width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); } void CBEChannelWidget::paintItem2DetailsLine (int pos, int /*ch_index*/) @@ -202,41 +204,33 @@ void CBEChannelWidget::paintItem2DetailsLine (int pos, int /*ch_index*/) int xpos = x - ConnectLineBox_Width; int ypos1 = y + theight+0 + pos*fheight; - int ypos2 = y + height; + int ypos2 = y + height + INFO_BOX_Y_OFFSET; int ypos1a = ypos1 + (fheight/2)-2; int ypos2a = ypos2 + (info_height/2)-2; - fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6; - fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1; - // Clear - frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height); + clearItem2DetailsLine(); // paint Line if detail info (and not valid list pos) if (pos >= 0) { - int fh = fheight > 10 ? fheight - 10: 5; - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 4, fh, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 1, fh, col2); + if (dline == NULL) + dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2); + dline->setYPos(ypos1a); + dline->paint(); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 4,info_height-14, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 1,info_height-14, col2); - - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 4,ypos2a-ypos1a, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 1,ypos2a-ypos1a+4, col2); - - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,4, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,1, col2); - - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12,4, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-12, ypos2a, 8,1, col2); - - frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE); + //infobox + if (ibox == NULL) + ibox = new CComponentsInfoBox(x, ypos2, width, info_height, false); + ibox->paint(false); } } -void CBEChannelWidget::clearItem2DetailsLine () +void CBEChannelWidget::clearItem2DetailsLine() { - paintItem2DetailsLine (-1, 0); + if (dline != NULL) + dline->hide(); + if (ibox != NULL) + ibox->hide(); } void CBEChannelWidget::hide() diff --git a/src/gui/bedit/bouqueteditor_channels.h b/src/gui/bedit/bouqueteditor_channels.h index 5b59278c2..bcc653e74 100644 --- a/src/gui/bedit/bouqueteditor_channels.h +++ b/src/gui/bedit/bouqueteditor_channels.h @@ -35,20 +35,21 @@ #include #include - +#include #include #include #include #include -class CBEChannelWidget : public CMenuWidget +class CBEChannelWidget : public CMenuTarget { private: - CFrameBuffer *frameBuffer; - + CComponentsDetailLine *dline; + CComponentsInfoBox *ibox; + enum state_ { beDefault, @@ -100,6 +101,7 @@ class CBEChannelWidget : public CMenuWidget public: CBEChannelWidget( const std::string & Caption, unsigned int Bouquet); + ~CBEChannelWidget(); //CZapitClient::BouquetChannelList Channels; ZapitChannelList * Channels; diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 1085d2523..d7af1fa9d 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -35,17 +35,16 @@ #include #include +#include "bouqueteditor_chanselect.h" #include #include #include #include -#include #include #include -#include "bouqueteditor_chanselect.h" extern CBouquetManager *g_bouquetManager; @@ -72,6 +71,21 @@ CBEChannelSelectWidget::CBEChannelSelectWidget(const std::string & Caption, unsi ButtonHeight = std::max(footerHeight, icol_h+4); liststart = 0; + bouquetChannels = NULL; + dline = NULL; + ibox = NULL; +} + +CBEChannelSelectWidget::~CBEChannelSelectWidget() +{ + // clear details line + if (dline != NULL) + dline->hide(); + delete dline; + // clear infobox + if (ibox != NULL) + ibox->hide(); + delete ibox; } uint CBEChannelSelectWidget::getItemCount() @@ -105,7 +119,6 @@ void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool pselec color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; - frameBuffer->paintBoxRel(x+2, y + height + 2, width-4, info_height - 4, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE); if(itemNr < getItemCount()) { paintItem2DetailsLine (paintNr, itemNr); paintDetails(itemNr); @@ -210,8 +223,8 @@ void CBEChannelSelectWidget::paintDetails(int index) else desc = desc + " (" + satname + ")"; - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight, width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight+INFO_BOX_Y_OFFSET, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight+INFO_BOX_Y_OFFSET, width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); } void CBEChannelSelectWidget::paintItem2DetailsLine (int pos, int /*ch_index*/) @@ -220,34 +233,30 @@ void CBEChannelSelectWidget::paintItem2DetailsLine (int pos, int /*ch_index*/) int xpos = x - ConnectLineBox_Width; int ypos1 = y + theight+0 + pos*fheight; - int ypos2 = y + height; + int ypos2 = y + height + INFO_BOX_Y_OFFSET; int ypos1a = ypos1 + (fheight/2)-2; int ypos2a = ypos2 + (info_height/2)-2; - fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6; - fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1; - // Clear - frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height); + // clear details line + if (dline != NULL) + dline->hide(); + + // clear infobox + if (ibox != NULL) + ibox->hide(); // paint Line if detail info (and not valid list pos) if (pos >= 0) { - int fh = fheight > 10 ? fheight - 10: 5; - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 4, fh, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 1, fh, col2); + if (dline == NULL) + dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2); + dline->setYPos(ypos1a); + dline->paint(false); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 4,info_height-14, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 1,info_height-14, col2); - - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 4,ypos2a-ypos1a, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 1,ypos2a-ypos1a+4, col2); - - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,4, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,1, col2); - - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12,4, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-12, ypos2a, 8,1, col2); - - frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE); + //infobox + if (ibox == NULL) + ibox = new CComponentsInfoBox(x, ypos2, width, info_height, false); + ibox->paint(false); } } + diff --git a/src/gui/bedit/bouqueteditor_chanselect.h b/src/gui/bedit/bouqueteditor_chanselect.h index 89fc63fe5..963862550 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.h +++ b/src/gui/bedit/bouqueteditor_chanselect.h @@ -34,7 +34,7 @@ #include #include - +#include #include #include @@ -48,6 +48,8 @@ class CBEChannelSelectWidget : public CListBox unsigned int bouquet; CZapitClient::channelsMode mode; bool isChannelInBouquet( int index); + CComponentsDetailLine *dline; + CComponentsInfoBox *ibox; uint getItemCount(); void paintItem(uint32_t itemNr, int paintNr, bool selected); @@ -64,6 +66,7 @@ class CBEChannelSelectWidget : public CListBox ZapitChannelList * bouquetChannels; CBEChannelSelectWidget(const std::string & Caption, unsigned int Bouquet, CZapitClient::channelsMode Mode); + ~CBEChannelSelectWidget(); int exec(CMenuTarget* parent, const std::string & actionKey); bool hasChanged(); diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 203a33026..d9cb3a5e7 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -90,7 +89,8 @@ int CBookmarkManager::createBookmark (const std::string & url, const std::string } //------------------------------------------------------------------------ - +#if 0 +//never used void CBookmarkManager::removeBookmark (unsigned int index) { std::vector::iterator p = bookmarks.begin()+index; bookmarks.erase(p); @@ -115,7 +115,7 @@ void CBookmarkManager::renameBookmark (unsigned int index) { bookmarksmodified=true; } } - +#endif #define BOOKMARKSTRINGLENGTH (10 + 1) #define BOOKMARKSTRINGMODIFICATIONPOINT 8 const char * const BOOKMARKSTRING = "bookmark0."; @@ -195,7 +195,8 @@ CBookmarkManager::~CBookmarkManager () { } //------------------------------------------------------------------------ - +#if 0 +//never used int CBookmarkManager::getBookmarkCount(void) const { return bookmarks.size(); } @@ -205,7 +206,7 @@ int CBookmarkManager::getBookmarkCount(void) const { int CBookmarkManager::getMaxBookmarkCount(void) const { return MAXBOOKMARKS; } - +#endif //------------------------------------------------------------------------ void CBookmarkManager::flush() { @@ -215,7 +216,8 @@ void CBookmarkManager::flush() { } //------------------------------------------------------------------------ - +#if 0 +//never used const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) { if (parent) @@ -244,7 +246,7 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) listmaxshow=bookmarks.size(); height = theight+0+listmaxshow*fheight*2; // recalc height } - if (!(bookmarks.empty() && selected==bookmarks.size())) + if ((!bookmarks.empty() && selected==bookmarks.size())) { selected=bookmarks.size()-1; liststart = (selected/listmaxshow)*listmaxshow; @@ -361,7 +363,7 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) else return NULL; } - +#endif //------------------------------------------------------------------------ void CBookmarkManager::paintItem(int pos) { diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index ebb5a459c..63d46c047 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -33,7 +33,6 @@ #include #endif -#include #include #include @@ -354,7 +353,8 @@ int CBouquetList::show(bool bShowChannelList) loop = false; } else if ((msg == CRCInput::RC_timeout ) || - (msg == (neutrino_msg_t)g_settings.key_channelList_cancel)) + (msg == (neutrino_msg_t)g_settings.key_channelList_cancel) || + (msg == CRCInput::RC_favorites) ) { selected = oldselected; if(fader.StartFadeOut()) { @@ -364,21 +364,25 @@ int CBouquetList::show(bool bShowChannelList) loop=false; } else if(msg == CRCInput::RC_red || msg == CRCInput::RC_favorites) { - CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_FAV); - hide(); - return -3; + if (CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_FAV) { + CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_FAV); + hide(); + return -3; + } } else if(msg == CRCInput::RC_green) { - CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_PROV); - hide(); - return -3; + if (CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_PROV) { + CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_PROV); + hide(); + return -3; + } } else if(msg == CRCInput::RC_yellow || msg == CRCInput::RC_sat) { - if(bShowChannelList) { + if(bShowChannelList && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_SAT) { CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_SAT); hide(); return -3; } } else if(msg == CRCInput::RC_blue) { - if(bShowChannelList) { + if(bShowChannelList && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_ALL) { CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_ALL); hide(); return -3; diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index ae836ced5..6da597a76 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -22,6 +22,7 @@ #ifdef HAVE_CONFIG_H #include #endif +#include "cam_menu.h" #include #include @@ -31,25 +32,21 @@ #include #include #include -#include #include #include #include #include #include -#include -#include "gui/widget/menue.h" -#include "gui/widget/stringinput.h" -#include "gui/widget/messagebox.h" -#include "gui/widget/hintbox.h" -#include "gui/widget/progresswindow.h" +#include "widget/icons.h" +#include "widget/stringinput.h" +#include "widget/messagebox.h" +#include "widget/progresswindow.h" -#include "system/setting_helpers.h" -#include "system/settings.h" -#include "system/debug.h" +#include +#include +#include -#include #include #include diff --git a/src/gui/cec_setup.cpp b/src/gui/cec_setup.cpp index fad8a9e43..edc861b6b 100644 --- a/src/gui/cec_setup.cpp +++ b/src/gui/cec_setup.cpp @@ -31,7 +31,7 @@ #endif -#include "gui/cec_setup.h" +#include "cec_setup.h" #include #include @@ -66,9 +66,9 @@ int CCECSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/) if (parent) parent->hide(); - + res = showMenu(); - + return res; } @@ -86,26 +86,29 @@ int CCECSetup::showMenu() //menue init CMenuWidget *cec = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_CEC); cec->addIntroItems(LOCALE_VIDEOMENU_HDMI_CEC); - + //cec CMenuOptionChooser *cec_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_MODE, &g_settings.hdmi_cec_mode, VIDEOMENU_HDMI_CEC_MODE_OPTIONS, VIDEOMENU_HDMI_CEC_MODE_OPTION_COUNT, true, this); + cec_ch->setHint("", LOCALE_MENU_HINT_CEC_MODE); cec1 = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_VIEW_ON, &g_settings.hdmi_cec_view_on, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF, this); + cec1->setHint("", LOCALE_MENU_HINT_CEC_VIEW_ON); cec2 = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_STANDBY, &g_settings.hdmi_cec_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF, this); - + cec2->setHint("", LOCALE_MENU_HINT_CEC_STANDBY); + cec->addItem(cec_ch); cec->addItem(GenericMenuSeparatorLine); //------------------------------------------------------- cec->addItem(cec1); cec->addItem(cec2); - + int res = cec->exec(NULL, ""); delete cec; - + return res; } -void CCECSetup::setCECSettings() -{ +void CCECSetup::setCECSettings() +{ printf("[neutrino CEC Settings] %s init CEC settings...\n", __FUNCTION__); videoDecoder->SetCECAutoStandby(g_settings.hdmi_cec_standby == 1); videoDecoder->SetCECAutoView(g_settings.hdmi_cec_view_on == 1); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 369d9fc9f..07ce2c3b4 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -25,8 +25,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H @@ -49,15 +50,14 @@ #include #include #include +#include #include #include -#include #include #include -#include +#include #include -#include #include #include @@ -71,6 +71,8 @@ #include #include +#include + extern CBouquetList * bouquetList; /* neutrino.cpp */ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ extern CPictureViewer * g_PicViewer; @@ -86,10 +88,6 @@ extern CBouquetList * RADIOallList; extern bool autoshift; extern CBouquetManager *g_bouquetManager; -void sectionsd_getChannelEvents(CChannelEventList &eList, const bool tv_mode, t_channel_id *chidlist, int clen); -void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); -void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ); - extern int old_b_id; CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist, bool ) @@ -173,7 +171,7 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to) unsigned int count; for (count = from; count < to; count++) { events.clear(); - sectionsd_getEventsServiceKey(chanlist[count]->channel_id, events); + CEitManager::getInstance()->getEventsServiceKey(chanlist[count]->channel_id, events); chanlist[count]->nextEvent.startTime = (long)0x7fffffff; for ( CChannelEventList::iterator e= events.begin(); e != events.end(); ++e ) { if ((long)e->startTime > atime && @@ -186,17 +184,16 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to) } } else { t_channel_id *p_requested_channels; - int size_requested_channels = chanlist_size * sizeof(t_channel_id); - p_requested_channels = new t_channel_id[size_requested_channels]; + p_requested_channels = new t_channel_id[chanlist_size]; if (! p_requested_channels) { fprintf(stderr,"%s:%d allocation failed!\n", __FUNCTION__, __LINE__); return; } - for (uint32_t count = 0; count < chanlist_size; count++) { - p_requested_channels[count] = chanlist[count + from]->channel_id&0xFFFFFFFFFFFFULL; - } + for (uint32_t count = 0; count < chanlist_size; count++) + p_requested_channels[count] = chanlist[count + from]->channel_id; + CChannelEventList levents; - sectionsd_getChannelEvents(levents, (CNeutrinoApp::getInstance()->getMode()) != NeutrinoMessages::mode_radio, p_requested_channels, size_requested_channels); + CEitManager::getInstance()->getChannelEvents(levents, p_requested_channels, chanlist_size); for (uint32_t count=0; count < chanlist_size; count++) { chanlist[count + from]->currentEvent = CChannelEvent(); for (CChannelEventList::iterator e = levents.begin(); e != levents.end(); ++e) { @@ -592,6 +589,7 @@ int CChannelList::show() loop=false; } else if( msg == CRCInput::RC_record) { //start direct recording from channellist +#if 0 if(!CRecordManager::getInstance()->RecordingStatus(chanlist[selected]->channel_id)) { printf("[neutrino channellist] start direct recording...\n"); @@ -608,10 +606,20 @@ int CChannelList::show() } } +#endif + if(SameTP()) { + printf("[neutrino channellist] start direct recording...\n"); + hide(); + if (!CRecordManager::getInstance()->Record(chanlist[selected]->channel_id)) { + paintHead(); + paint(); + } else + loop=false; + } } else if( msg == CRCInput::RC_stop ) { //stopp recording - if(CRecordManager::getInstance()->RecordingStatus()) + if(CRecordManager::getInstance()->RecordingStatus(chanlist[selected]->channel_id)) { if (CRecordManager::getInstance()->AskToStop(chanlist[selected]->channel_id)) { @@ -854,10 +862,6 @@ int CChannelList::show() res = bouquetList->exec(true); printf("CChannelList:: bouquetList->exec res %d\n", res); } -#if 0 - /* FIXME call this somewhere after show */ - CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); -#endif this->new_mode_active = 0; if(NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode()) @@ -1197,6 +1201,7 @@ int CChannelList::numericZap(int key) channelList->adjustToChannelID(orgList->getActiveChannel_ChannelID(), false); this->frameBuffer->paintBackground(); res = channelList->exec(); + CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); } delete channelList; return res; @@ -1215,6 +1220,7 @@ int CChannelList::numericZap(int key) if (channelList->getSize() != 0) { this->frameBuffer->paintBackground(); res = channelList->exec(); + CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); } delete channelList; } @@ -1545,7 +1551,7 @@ void CChannelList::paintDetails(int index) char buf[128] = {0}; char cFrom[50] = {0}; // UTF-8 CSectionsdClient::CurrentNextInfo CurrentNext; - sectionsd_getCurrentNextServiceKey(chanlist[index]->channel_id & 0xFFFFFFFFFFFFULL, CurrentNext); + CEitManager::getInstance()->getCurrentNextServiceKey(chanlist[index]->channel_id, CurrentNext); if (!CurrentNext.next_name.empty()) { struct tm *pStartZeit = localtime (& CurrentNext.next_zeit.startzeit); snprintf(cFrom, sizeof(cFrom), "%s %02d:%02d",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min ); @@ -1573,39 +1579,20 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/) int ypos1a = ypos1 + (fheight/2)-2; int ypos2a = ypos2 + (info_height/2)-2; fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6; - fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1; // Clear - frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height); + frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height + 1); // paint Line if detail info (and not valid list pos) if (pos >= 0) { //pos >= 0 && chanlist[ch_index]->currentEvent.description != "") { if(1) // FIXME why -> ? (!g_settings.channellist_extended) { - int fh = fheight > 10 ? fheight - 10: 5; - /* item mark */ - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 4, fh, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 1, fh, col2); + //details line + CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2); + details_line.paint(); - /* info mark */ - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 4,info_height-14, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 1,info_height-14, col2); - - /* vertical connect line */ - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 4,ypos2a-ypos1a, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 1,ypos2a-ypos1a+4, col2); - - /* horizontal item line */ - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,4, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,1, col2); - - /* horizontal info line */ - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12,4, col1); - frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-12, ypos2a, 8,1, col2); - -// frameBuffer->paintBoxRel(x, ypos2, width, info_height, col1, RADIUS_LARGE); + //info box frame frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE); - } } } @@ -1770,6 +1757,7 @@ void CChannelList::paintItem(int pos) if (pos == 0) { + /* FIXME move to calcSize() ? */ int w_max, w_min, h; ChannelList_Rec = 0; int recmode_icon_max = CRecordManager::RECMODE_REC, recmode_icon_min = CRecordManager::RECMODE_TSHIFT; @@ -1786,11 +1774,11 @@ void CChannelList::paintItem(int pos) for (uint32_t i = 0; i < chanlist.size(); i++) { rec_mode = CRecordManager::getInstance()->GetRecordMode(chanlist[i]->channel_id); - if (rec_mode == recmode_icon_max) + if (rec_mode & recmode_icon_max) { ChannelList_Rec = w_max; break; - } else if (rec_mode == recmode_icon_min) + } else if (rec_mode & recmode_icon_min) ChannelList_Rec = w_min; } if (ChannelList_Rec > 0) @@ -1802,9 +1790,9 @@ void CChannelList::paintItem(int pos) //set recording icon const char * rec_icon = ""; - if (rec_mode == CRecordManager::RECMODE_REC) + if (rec_mode & CRecordManager::RECMODE_REC) rec_icon = NEUTRINO_ICON_REC; - else if (rec_mode == CRecordManager::RECMODE_TSHIFT) + else if (rec_mode & CRecordManager::RECMODE_TSHIFT) rec_icon = NEUTRINO_ICON_AUTO_SHIFT; //calculating icons @@ -1820,7 +1808,6 @@ void CChannelList::paintItem(int pos) r_icon_x = r_icon_x - s_icon_w; //paint recording icon - //bool do_rec = CRecordManager::getInstance()->RecordingStatus(chanlist[curr]->channel_id); if (rec_mode != CRecordManager::RECMODE_OFF) frameBuffer->paintIcon(rec_icon, r_icon_x - r_icon_w, ypos, fheight);//ypos + (fheight - 16)/2); diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 1159d6646..e3b360156 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -28,8 +28,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ #include diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 77f0ebb88..b5ac6df49 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -52,6 +52,7 @@ #include #include +#include static const int FSHIFT = 16; /* nr of bits of precision */ #define FIXED_1 (1<addTimer(5*1000*1000, false); while (doLoop) { @@ -104,6 +106,9 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &) if(fader.Fade()) doLoop = false; } + else if((msg == NeutrinoMessages::EVT_TIMER) && (data == updateTimer)) { + paint(); + } else if ( ( msg == CRCInput::RC_timeout ) || ( msg == CRCInput::RC_home ) || ( msg == CRCInput::RC_ok ) ) { @@ -145,6 +150,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &) hide(); fader.Stop(); + g_RCInput->killTimer(updateTimer); return res; } @@ -383,8 +389,12 @@ void CDBoxInfoWidget::paint() uint64_t bytes_free; if (memory_flag) { - bytes_total = info.totalram; - bytes_free = info.freeram; + //bytes_total = info.totalram; + //bytes_free = info.freeram; + unsigned long t, f; + get_mem_usage(t, f); + bytes_total = t*1024; + bytes_free = f*1024; } else { diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 9f6230952..8f781eea0 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -290,7 +291,6 @@ bool EpgPlus::ChannelEventEntry::isSelected (time_t selectedTime) const return (selectedTime >= this->channelEvent.startTime) && (selectedTime < this->channelEvent.startTime + time_t (this->channelEvent.duration)); } -bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); void EpgPlus::ChannelEventEntry::paint (bool pisSelected, bool toggleColor) { this->frameBuffer->paintBoxRel (this->x, this->y, this->width, this->font->getHeight() @@ -315,7 +315,8 @@ void EpgPlus::ChannelEventEntry::paint (bool pisSelected, bool toggleColor) CShortEPGData shortEpgData; - this->footer->paintEventDetails (this->channelEvent.description, sectionsd_getEPGidShort(this->channelEvent.eventID, &shortEpgData) ? shortEpgData.info1 : ""); + bool ret = CEitManager::getInstance()->getEPGidShort(this->channelEvent.eventID, &shortEpgData); + this->footer->paintEventDetails (this->channelEvent.description, ret ? shortEpgData.info1 : ""); this->timeLine->paintGrid(); } @@ -522,8 +523,6 @@ EpgPlus::~EpgPlus() this->free(); } -void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); - void EpgPlus::createChannelEntries (int selectedChannelEntryIndex) { for (TChannelEntries::iterator It = this->displayedChannelEntries.begin(); @@ -557,9 +556,8 @@ void EpgPlus::createChannelEntries (int selectedChannelEntryIndex) ChannelEntry *channelEntry = new ChannelEntry (channel, i, this->frameBuffer, this->footer, this->bouquetList, this->channelsTableX + 2, yPosChannelEntry, this->channelsTableWidth); //printf("Going to get getEventsServiceKey for %llx\n", (channel->channel_id & 0xFFFFFFFFFFFFULL)); - //CChannelEventList channelEventList = g_Sectionsd->getEventsServiceKey (channel->channel->channel_id & 0xFFFFFFFFFFFFULL); CChannelEventList channelEventList; - sectionsd_getEventsServiceKey(channel->channel_id, channelEventList); + CEitManager::getInstance()->getEventsServiceKey(channel->channel_id, channelEventList); //printf("channelEventList size %d\n", channelEventList.size()); int xPosEventEntry = this->eventsTableX; diff --git a/src/gui/epgplus.h b/src/gui/epgplus.h index 45adfb0ae..b03aed939 100644 --- a/src/gui/epgplus.h +++ b/src/gui/epgplus.h @@ -35,7 +35,6 @@ #include #include -#include #include #include "color.h" diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index bd8f33df9..2a30af005 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -55,6 +55,7 @@ #include #include +#include extern CPictureViewer * g_PicViewer; @@ -445,9 +446,6 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b) return a.startTime< b.startTime; } -//extern char recDir[255]; -void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); -bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_startzeit, bool doLoop ) { int res = menu_return::RETURN_REPAINT; @@ -470,9 +468,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start } bigFonts = g_settings.bigFonts; start(); - //evtlist = g_Sectionsd->getEventsServiceKey(channel_id&0xFFFFFFFFFFFFULL); - evtlist.clear(); - sectionsd_getEventsServiceKey(channel_id, evtlist); + CEitManager::getInstance()->getEventsServiceKey(channel_id, evtlist); // Houdini added for Private Premiere EPG start sorted by start date/time 2005-08-15 sort(evtlist.begin(),evtlist.end(),sortByDateTime); } @@ -548,7 +544,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start } } // Compare strings normally if not positively found to be equal before - if (false == bHide && false == (std::string::npos == epgData.info2.find(epgData.info1))) { + if (false == bHide && 0 == epgData.info2.find(epgData.info1)) { bHide = true; } } @@ -591,10 +587,12 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start // -- display more screenings on the same channel // -- 2002-05-03 rasc + has_follow_screenings = false; if (hasFollowScreenings(channel_id, epgData.title)) { processTextToArray(""); // UTF-8 processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS)) + ':'); // UTF-8 FollowScreenings(channel_id, epgData.title); + has_follow_screenings = true; } /* neat for debugging duplicate event issues etc. */ @@ -646,7 +644,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start int dummy_h,dummy_w; frameBuffer->getIconSize(NEUTRINO_ICON_16_9_GREY, &dummy_w, &dummy_h); if (dummy_h == 16 && dummy_w == 26){ // show only standard icon size - if ( sectionsd_getComponentTagsUniqueKey( epgData.eventID, tags ) ) + if (CEitManager::getInstance()->getComponentTagsUniqueKey( epgData.eventID, tags)) { for (unsigned int i=0; i< tags.size(); i++) { @@ -856,7 +854,24 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start printf("timerd not available\n"); break; } + case CRCInput::RC_blue: + { + if(!followlist.empty()){ + hide(); + CNeutrinoEventList *ee; + ee = new CNeutrinoEventList; + ee->exec(channel_id, g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT),"","",followlist); // UTF-8 + delete ee; + if (!bigFonts && g_settings.bigFonts) { + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); + } + bigFonts = g_settings.bigFonts; + show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false); + } + break; + } case CRCInput::RC_info: case CRCInput::RC_help: bigFonts = bigFonts ? false : true; @@ -933,9 +948,6 @@ void CEpgData::hide() showTimerEventBar (false); } -bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); -bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); - void CEpgData::GetEPGData(const t_channel_id channel_id, uint64_t id, time_t* startzeit, bool clear ) { if(clear) @@ -945,11 +957,9 @@ void CEpgData::GetEPGData(const t_channel_id channel_id, uint64_t id, time_t* st bool res; if ( id!= 0 ) - //res = g_Sectionsd->getEPGid( id, *startzeit, &epgData ); - res = sectionsd_getEPGid(id, *startzeit, &epgData); + res = CEitManager::getInstance()->getEPGid(id, *startzeit, &epgData); else - //res = g_Sectionsd->getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData ); - res = sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData ); + res = CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgData ); if ( res ) { @@ -1049,7 +1059,6 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st char tmpstr[256]={0}; screening_dates = screening_nodual = ""; - // alredy read: evtlist = g_Sectionsd->getEventsServiceKey( channel_id&0xFFFFFFFFFFFFULL ); for (e = followlist.begin(); e != followlist.end(); ++e) { @@ -1083,7 +1092,9 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st const struct button_label EpgButtons[] = { { NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERBAR_RECORDEVENT }, - { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH } + { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH }, + { NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT } + }; void CEpgData::showTimerEventBar (bool pshow) @@ -1112,9 +1123,9 @@ void CEpgData::showTimerEventBar (bool pshow) /* 2 * ICON_LARGE_WIDTH for potential 16:9 and DD icons */ int aw = ox - 20 - 2 * (ICON_LARGE_WIDTH + 2); if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) - ::paintButtons(x, y, 0, 2, EpgButtons, aw, h); + ::paintButtons(x, y, 0, has_follow_screenings ? 3:2, EpgButtons, aw, h); else - ::paintButtons(x, y, 0, 1, &EpgButtons[1], aw, h); + ::paintButtons(x, y, 0, has_follow_screenings ? 2:1, &EpgButtons[1], aw, h); frameBuffer->blit(); #if 0 diff --git a/src/gui/epgview.h b/src/gui/epgview.h index ddc475a86..7b051c024 100644 --- a/src/gui/epgview.h +++ b/src/gui/epgview.h @@ -62,6 +62,7 @@ class CEpgData std::string epg_end; int epg_done; bool bigFonts; + bool has_follow_screenings; time_t tmp_curent_zeit; uint64_t prev_id; diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 4b1371d86..aa268b932 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -25,8 +25,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H @@ -47,7 +48,7 @@ #include "widget/hintbox.h" #include "widget/buttons.h" -#include "gui/bouquetlist.h" +#include "bouquetlist.h" #include #include @@ -56,6 +57,7 @@ #include #include #include +#include #include @@ -64,10 +66,6 @@ extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */ extern CPictureViewer * g_PicViewer; -void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); -bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); -bool sectionsd_getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); - #if 0 // sort operators bool sortById (const CChannelEvent& a, const CChannelEvent& b) @@ -150,9 +148,7 @@ bool CNeutrinoEventList::HasTimerConflicts(time_t starttime, time_t duration, ev void CNeutrinoEventList::readEvents(const t_channel_id channel_id) { - //evtlist = g_Sectionsd->getEventsServiceKey(channel_id &0xFFFFFFFFFFFFULL); - evtlist.clear(); - sectionsd_getEventsServiceKey(channel_id , evtlist); + CEitManager::getInstance()->getEventsServiceKey(channel_id , evtlist); time_t azeit=time(NULL); CChannelEventList::iterator e; @@ -160,14 +156,12 @@ void CNeutrinoEventList::readEvents(const t_channel_id channel_id) CEPGData epgData; // todo: what if there are more than one events in the Portal - //if (g_Sectionsd->getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData )) - if (sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData )) + if (CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgData )) { // epgData.eventID; // epgData.epg_times.startzeit; CSectionsdClient::LinkageDescriptorList linkedServices; - //if ( g_Sectionsd->getLinkageDescriptorsUniqueKey( epgData.eventID, linkedServices ) ) - if ( sectionsd_getLinkageDescriptorsUniqueKey( epgData.eventID, linkedServices ) ) + if (CEitManager::getInstance()->getLinkageDescriptorsUniqueKey( epgData.eventID, linkedServices ) ) { if ( linkedServices.size()> 1 ) { @@ -192,9 +186,7 @@ void CNeutrinoEventList::readEvents(const t_channel_id channel_id) // do not add parent events if (channel_id != channel_id2) { - //evtlist2 = g_Sectionsd->getEventsServiceKey(channel_id2); - evtlist2.clear(); - sectionsd_getEventsServiceKey(channel_id2 , evtlist2); + CEitManager::getInstance()->getEventsServiceKey(channel_id2 , evtlist2); for (unsigned int loop=0 ; loop >ii(evtlist,evtlist.begin()); + copy(followlist.begin(), followlist.end(), ii); + showfollow = true; + }else{ + readEvents(channel_id); + } UpdateTimerList(); if(channelname_prev.empty(), channelname_next.empty()){ @@ -385,7 +382,7 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c showFunctionBar(paint_buttonbar, channel_id); } //sort - else if (msg == (neutrino_msg_t)g_settings.key_channelList_sort) + else if (!showfollow && (msg == (neutrino_msg_t)g_settings.key_channelList_sort)) { uint64_t selected_id = evtlist[selected].eventID; if(sort_mode==0) @@ -635,7 +632,7 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c } } } - else if ( msg==CRCInput::RC_green ) + else if (!showfollow && ( msg==CRCInput::RC_green )) { in_search = findEvents(); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); @@ -935,9 +932,11 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id) } } - buttons[btn_cnt].button = NEUTRINO_ICON_BUTTON_GREEN; - buttons[btn_cnt].locale = LOCALE_EVENTFINDER_SEARCH; // search button - btn_cnt++; + if(!showfollow){ + buttons[btn_cnt].button = NEUTRINO_ICON_BUTTON_GREEN; + buttons[btn_cnt].locale = LOCALE_EVENTFINDER_SEARCH; // search button + btn_cnt++; + } // Button: Timer Channelswitch if ((uint) g_settings.key_channelList_addremind != CRCInput::RC_nokey) { @@ -953,13 +952,15 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id) } } - // Button: Event Re-Sort - if ((uint) g_settings.key_channelList_sort != CRCInput::RC_nokey) { - // FIXME : display other icons depending on g_settings.key_channelList_sort - keyhelper.get(&dummy, &icon, g_settings.key_channelList_sort); - buttons[btn_cnt].button = icon; - buttons[btn_cnt].locale = LOCALE_EVENTLISTBAR_EVENTSORT; - btn_cnt++; + if(!showfollow){ + // Button: Event Re-Sort + if ((uint) g_settings.key_channelList_sort != CRCInput::RC_nokey) { + // FIXME : display other icons depending on g_settings.key_channelList_sort + keyhelper.get(&dummy, &icon, g_settings.key_channelList_sort); + buttons[btn_cnt].button = icon; + buttons[btn_cnt].locale = LOCALE_EVENTLISTBAR_EVENTSORT; + btn_cnt++; + } } FunctionBarHeight = std::max(::paintButtons(bx, by, bw, btn_cnt, buttons, bw), FunctionBarHeight); } @@ -1008,11 +1009,11 @@ bool CNeutrinoEventList::findEvents(void) { res = true; m_showChannel = true; // force the event list to paint the channel name - evtlist.clear(); + if(!evtlist.empty()) + evtlist.clear(); if(m_search_list == SEARCH_LIST_CHANNEL) { - //g_Sectionsd->getEventsServiceKeySearchAdd(evtlist,m_search_channel_id & 0xFFFFFFFFFFFFULL,m_search_epg_item,m_search_keyword); - sectionsd_getEventsServiceKey(m_search_channel_id, evtlist, m_search_epg_item,m_search_keyword); + CEitManager::getInstance()->getEventsServiceKey(m_search_channel_id, evtlist, m_search_epg_item,m_search_keyword); } else if(m_search_list == SEARCH_LIST_BOUQUET) { @@ -1020,8 +1021,7 @@ bool CNeutrinoEventList::findEvents(void) for(int channel = 0; channel < channel_nr; channel++) { channel_id = bouquetList->Bouquets[m_search_bouquet_id]->channelList->getChannelFromIndex(channel)->channel_id; - //g_Sectionsd->getEventsServiceKeySearchAdd(evtlist,channel_id & 0xFFFFFFFFFFFFULL,m_search_epg_item,m_search_keyword); - sectionsd_getEventsServiceKey(channel_id, evtlist, m_search_epg_item,m_search_keyword); + CEitManager::getInstance()->getEventsServiceKey(channel_id, evtlist, m_search_epg_item,m_search_keyword); } } else if(m_search_list == SEARCH_LIST_ALL) @@ -1035,8 +1035,7 @@ bool CNeutrinoEventList::findEvents(void) for(int channel = 0; channel < channel_nr; channel++) { channel_id = bouquetList->Bouquets[bouquet]->channelList->getChannelFromIndex(channel)->channel_id; - //g_Sectionsd->getEventsServiceKeySearchAdd(evtlist,channel_id & 0xFFFFFFFFFFFFULL,m_search_epg_item,m_search_keyword); - sectionsd_getEventsServiceKey(channel_id,evtlist, m_search_epg_item,m_search_keyword); + CEitManager::getInstance()->getEventsServiceKey(channel_id,evtlist, m_search_epg_item,m_search_keyword); } } box.hide(); diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index 4578b16da..c1ef8b81b 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -25,8 +25,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ @@ -117,13 +118,13 @@ class CNeutrinoEventList int timerPost; void UpdateTimerList(void); bool HasTimerConflicts(time_t starttime, time_t duration, event_id_t * epg_ID); - + bool showfollow; CTimerd::CTimerEventTypes isScheduled(t_channel_id channel_id, CChannelEvent * event, int * tID = NULL); public: CNeutrinoEventList(); ~CNeutrinoEventList(); - int exec(const t_channel_id channel_id, const std::string& channelname, const std::string& prev = "", const std::string& next = ""); // UTF-8 + int exec(const t_channel_id channel_id, const std::string& channelname, const std::string& prev = "", const std::string& next = "", const CChannelEventList &followlist = CChannelEventList ()); // UTF-8 }; class CEventListHandler : public CMenuTarget diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index b5cd62e2e..ed3f2fd1e 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -58,6 +58,10 @@ #include #include +#if LIBCURL_VERSION_NUM < 0x071507 +#include +#endif +#include #include #ifdef __USE_FILE_OFFSET64 diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 1e13488c3..36e9134cc 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -48,18 +48,18 @@ #include #include #include +#include "hdd_menu.h" #include -#include "gui/widget/stringinput.h" -#include "gui/widget/messagebox.h" -#include "gui/widget/hintbox.h" -#include "gui/widget/progresswindow.h" +#include +#include +#include +#include -#include "system/setting_helpers.h" -#include "system/settings.h" -#include "system/debug.h" +#include +#include +#include -#include #include #include @@ -145,12 +145,19 @@ int CHDDMenuHandler::doMenu () CHDDChkExec chkexec; CHDDDestExec hddexec; - hddmenu->addItem(new CMenuForwarder(LOCALE_HDD_ACTIVATE, true, "", &hddexec, NULL, CRCInput::RC_red,NEUTRINO_ICON_BUTTON_RED)); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_HDD_ACTIVATE, true, "", &hddexec, NULL, CRCInput::RC_red,NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_HDD_APPLY); + hddmenu->addItem(mf); hddmenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_HDD_EXTENDED_SETTINGS)); - hddmenu->addItem( new CMenuOptionChooser(LOCALE_HDD_SLEEP, &g_settings.hdd_sleep, HDD_SLEEP_OPTIONS, HDD_SLEEP_OPTION_COUNT, true)); - hddmenu->addItem( new CMenuOptionChooser(LOCALE_HDD_NOISE, &g_settings.hdd_noise, HDD_NOISE_OPTIONS, HDD_NOISE_OPTION_COUNT, true)); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_HDD_SLEEP, &g_settings.hdd_sleep, HDD_SLEEP_OPTIONS, HDD_SLEEP_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_HDD_SLEEP); + hddmenu->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_HDD_NOISE, &g_settings.hdd_noise, HDD_NOISE_OPTIONS, HDD_NOISE_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_HDD_NOISE); + hddmenu->addItem(mc); //if(n > 0) hddmenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_HDD_MANAGE)); @@ -233,11 +240,19 @@ int CHDDMenuHandler::doMenu () tempMenu[i] = new CMenuWidget(str, NEUTRINO_ICON_SETTINGS); tempMenu[i]->addIntroItems(); //tempMenu->addItem( new CMenuOptionChooser(LOCALE_HDD_FS, &g_settings.hdd_fs, HDD_FILESYS_OPTIONS, HDD_FILESYS_OPTION_COUNT, true)); - tempMenu[i]->addItem(new CMenuForwarder(LOCALE_HDD_FORMAT, true, "", &fmtexec, namelist[i]->d_name)); - tempMenu[i]->addItem(new CMenuForwarder(LOCALE_HDD_CHECK, true, "", &chkexec, namelist[i]->d_name)); + + mf = new CMenuForwarder(LOCALE_HDD_FORMAT, true, "", &fmtexec, namelist[i]->d_name); + mf->setHint("", LOCALE_MENU_HINT_HDD_FORMAT); + tempMenu[i]->addItem(mf); + + mf = new CMenuForwarder(LOCALE_HDD_CHECK, true, "", &chkexec, namelist[i]->d_name); + mf->setHint("", LOCALE_MENU_HINT_HDD_CHECK); + tempMenu[i]->addItem(mf); snprintf(sstr, sizeof(sstr), "%s (%s)", g_Locale->getText(LOCALE_HDD_REMOVABLE_DEVICE), namelist[i]->d_name); - hddmenu->addItem(new CMenuForwarderNonLocalized((removable ? sstr : namelist[i]->d_name), enabled /*(removable || isroot) ? false : true*/, tmp_str[i], tempMenu[i])); + mf = new CMenuForwarderNonLocalized((removable ? sstr : namelist[i]->d_name), enabled, tmp_str[i], tempMenu[i]); + mf->setHint("", LOCALE_MENU_HINT_HDD_TOOLS); + hddmenu->addItem(mf); hdd_found = 1; free(namelist[i]); @@ -261,21 +276,34 @@ int CHDDMenuHandler::doMenu () int CHDDDestExec::exec(CMenuTarget* /*parent*/, const std::string&) { - char cmd[100]; + char M_opt[50],S_opt[50]; + char opt[100]; struct dirent **namelist; int n = scandir("/sys/block", &namelist, my_filter, alphasort); if (n < 0) return 0; + const char hdparm[] = "/sbin/hdparm"; + bool hdparm_link = false; + struct stat stat_buf; + if(::lstat(hdparm, &stat_buf) == 0) + if( S_ISLNK(stat_buf.st_mode) ) + hdparm_link = true; + for (int i = 0; i < n; i++) { printf("CHDDDestExec: noise %d sleep %d /dev/%s\n", g_settings.hdd_noise, g_settings.hdd_sleep, namelist[i]->d_name); - //hdparm -M is not included in busybox hdparm! - //we need full version of hdparm or should remove -M parameter here - snprintf(cmd, sizeof(cmd), "hdparm -M%d -S%d /dev/%s >/dev/null 2>/dev/null &", - g_settings.hdd_noise, g_settings.hdd_sleep, namelist[i]->d_name); - system(cmd); + snprintf(S_opt, sizeof(S_opt),"-S%d", g_settings.hdd_sleep); + snprintf(opt, sizeof(opt),"/dev/%s",namelist[i]->d_name); + + if(hdparm_link){ + //hdparm -M is not included in busybox hdparm! + my_system(hdparm, S_opt, opt); + }else{ + snprintf(M_opt, sizeof(M_opt),"-M%d", g_settings.hdd_noise); + my_system(hdparm, M_opt, S_opt, opt); + } free(namelist[i]); } free(namelist); @@ -319,7 +347,7 @@ int CHDDFmtExec::exec(CMenuTarget* /*parent*/, const std::string& key) if(res != CMessageBox::mbrYes) return 0; - bool srun = system("killall -9 smbd"); + bool srun = my_system("killall", "-9", "smbd"); //res = check_and_umount(dst); res = check_and_umount(src, dst); @@ -454,9 +482,8 @@ int CHDDFmtExec::exec(CMenuTarget* /*parent*/, const std::string& key) progress->showGlobalStatus(100); sleep(2); - snprintf(cmd, sizeof(cmd), "/sbin/tune2fs -r 0 -c 0 -i 0 %s", src); - printf("CHDDFmtExec: executing %s\n", cmd); - system(cmd); + printf("CHDDFmtExec: executing %s %s\n","/sbin/tune2fs -r 0 -c 0 -i 0", src); + my_system("/sbin/tune2fs", "-r 0", "-c 0", "-i 0", src); _remount: progress->hide(); @@ -525,7 +552,7 @@ _remount: #endif } _return: - if(!srun) system("smbd"); + if(!srun) my_system("smbd",NULL); return menu_return::RETURN_REPAINT; } @@ -545,7 +572,7 @@ int CHDDChkExec::exec(CMenuTarget* /*parent*/, const std::string& key) printf("CHDDChkExec: key %s\n", key.c_str()); - bool srun = system("killall -9 smbd"); + bool srun = my_system("killall", "-9", "smbd"); //res = check_and_umount(dst); res = check_and_umount(src, dst); @@ -629,6 +656,6 @@ ret1: } printf("CHDDChkExec: mount res %d\n", res); - if(!srun) system("smbd"); + if(!srun) my_system("smbd",NULL); return menu_return::RETURN_REPAINT; } diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index 8e5777402..9120a7d56 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -32,6 +32,8 @@ #include #include +#include + #include #include @@ -211,8 +213,24 @@ void CImageInfo::paint() #else const char * builddate = config.getString("builddate", BUILT_DATE).c_str(); #endif + static CFlashVersionInfo versionInfo(version); const char * releaseCycle = versionInfo.getReleaseCycle(); + + struct utsname uts_info; + std::string Version_Kernel; + if( uname(&uts_info) < 0 ) { + Version_Kernel = releaseCycle; + Version_Kernel += " "; + Version_Kernel += versionInfo.getType(); + }else{ + Version_Kernel = releaseCycle; + Version_Kernel += " "; + Version_Kernel += versionInfo.getType(); + Version_Kernel += " - Kernel: "; + Version_Kernel += uts_info.release; + } + snprintf((char*) imagedate,sizeof(imagedate), "%s %s", versionInfo.getDate(), versionInfo.getTime()); ypos += iheight; @@ -225,7 +243,7 @@ void CImageInfo::paint() ypos += iheight; paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION)); - paintLine(xpos+offset, font_info, releaseCycle); + paintLine(xpos+offset, font_info, Version_Kernel.c_str()); ypos += iheight; #ifdef SVNVERSION diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp index b5af0e710..bb8470a48 100644 --- a/src/gui/info_menue.cpp +++ b/src/gui/info_menue.cpp @@ -34,9 +34,9 @@ #include #include -#include "gui/info_menue.h" -#include "gui/imageinfo.h" -#include "gui/dboxinfo.h" +#include +#include +#include #include #include @@ -48,8 +48,6 @@ CInfoMenu::CInfoMenu() CInfoMenu::~CInfoMenu() { - - } int CInfoMenu::exec(CMenuTarget* parent, const std::string &/*actionKey*/) @@ -73,12 +71,19 @@ int CInfoMenu::showMenu() CStreamInfo2 streaminfo; info->addIntroItems(); - info->addItem(new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, &imageinfo, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ), false); - info->addItem(new CMenuForwarder(LOCALE_EXTRA_DBOXINFO, true, NULL, &boxinfo, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); - info->addItem(new CMenuForwarder(LOCALE_STREAMINFO_HEAD, true, NULL, &streaminfo, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, &imageinfo, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ); + mf->setHint(NEUTRINO_ICON_HINT_IMAGEINFO, LOCALE_MENU_HINT_IMAGEINFO); + info->addItem(mf); + + mf = new CMenuForwarder(LOCALE_EXTRA_DBOXINFO, true, NULL, &boxinfo, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint(NEUTRINO_ICON_HINT_DBOXINFO, LOCALE_MENU_HINT_DBOXINFO); + info->addItem(mf); + + mf = new CMenuForwarder(LOCALE_STREAMINFO_HEAD, true, NULL, &streaminfo, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint(NEUTRINO_ICON_HINT_STREAMINFO, LOCALE_MENU_HINT_STREAMINFO); + info->addItem(mf); int res = info->exec(NULL, ""); delete info; return res; } - diff --git a/src/gui/infoclock.h b/src/gui/infoclock.h index a03abf2a6..73b4ebb93 100644 --- a/src/gui/infoclock.h +++ b/src/gui/infoclock.h @@ -6,7 +6,7 @@ #include #include -#include "gui/color.h" +#include #include diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index a56ba6f2c..aacfa3403 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -35,7 +35,8 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include "infoviewer.h" + #include #include @@ -51,7 +52,6 @@ #include #include -#include #include #include #include @@ -65,11 +65,9 @@ #include #include #include +#include #include -void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); -void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ); - extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */ extern CBouquetList * bouquetList; /* neutrino.cpp */ extern CPictureViewer * g_PicViewer; @@ -257,20 +255,26 @@ void CInfoViewer::paintTime (bool show_dot, bool firstPaint) void CInfoViewer::showRecordIcon (const bool show) { CRecordManager * crm = CRecordManager::getInstance(); - int rec_mode = crm->GetRecordMode(); - recordModeActive = rec_mode != CRecordManager::RECMODE_OFF; + recordModeActive = crm->RecordingStatus(); + /* FIXME if record or timeshift stopped while infobar visible, artifacts */ if (recordModeActive) { std::string Icon_Rec = NEUTRINO_ICON_REC_GRAY, Icon_Ts = NEUTRINO_ICON_AUTO_SHIFT_GRAY; - t_channel_id cci = g_RemoteControl->current_channel_id; - bool status_ts = crm->GetRecordMode(cci) == CRecordManager::RECMODE_TSHIFT; - bool status_rec = crm->GetRecordMode(cci) == CRecordManager::RECMODE_REC && !status_ts; - if (status_ts) + + /* global record mode */ + int rec_mode = crm->GetRecordMode(); + /* channel record mode */ + int ccrec_mode = crm->GetRecordMode(cci); + + /* set 'active' icons for current channel */ + if (ccrec_mode & CRecordManager::RECMODE_TSHIFT) Icon_Ts = NEUTRINO_ICON_AUTO_SHIFT; - if (status_rec) + + if (ccrec_mode & CRecordManager::RECMODE_REC) Icon_Rec = NEUTRINO_ICON_REC; + int records = crm->GetRecordCount(); const int radius = RADIUS_MIN; @@ -386,8 +390,7 @@ void CInfoViewer::paintBackground(int col_NumBox) void CInfoViewer::show_current_next(bool new_chan, int epgpos) { - //info_CurrentNext = getEPG (channel_id); - sectionsd_getCurrentNextServiceKey(channel_id & 0xFFFFFFFFFFFFULL, info_CurrentNext); + CEitManager::getInstance()->getCurrentNextServiceKey(channel_id, info_CurrentNext); if (!evtlist.empty()) { if (new_chan) { for ( eli=evtlist.begin(); eli!=evtlist.end(); ++eli ) { @@ -600,9 +603,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con col_NumBoxText = COL_MENUHEAD; } if ((channel_id != new_channel_id) || (evtlist.empty())) { - evtlist.clear(); - //evtlist = g_Sectionsd->getEventsServiceKey(new_channel_id & 0xFFFFFFFFFFFFULL); - sectionsd_getEventsServiceKey(new_channel_id, evtlist); + CEitManager::getInstance()->getEventsServiceKey(new_channel_id, evtlist); if (!evtlist.empty()) sort(evtlist.begin(),evtlist.end(), sortByDateTime); new_chan = true; @@ -810,14 +811,19 @@ void CInfoViewer::loop(bool show_dot) } else if (!fileplay && !CMoviePlayerGui::getInstance().timeshift) { CNeutrinoApp *neutrino = CNeutrinoApp::getInstance (); if ((msg == (neutrino_msg_t) g_settings.key_quickzap_up) || (msg == (neutrino_msg_t) g_settings.key_quickzap_down) || (msg == CRCInput::RC_0) || (msg == NeutrinoMessages::SHOW_INFOBAR)) { - if ((g_settings.radiotext_enable) && (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio)) + hideIt = false; // default + if ((g_settings.radiotext_enable) && (neutrino->getMode() == NeutrinoMessages::mode_radio)) hideIt = true; - else - hideIt = false; + int rec_mode = CRecordManager::getInstance()->GetRecordMode(); +#if 0 if ((rec_mode == CRecordManager::RECMODE_REC) || (rec_mode == CRecordManager::RECMODE_REC_TSHIFT)) hideIt = true; - //hideIt = (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0) ? true : false; +#endif + /* hide, if record (not timeshift only) is running -> neutrino will show channel list */ + if (rec_mode & CRecordManager::RECMODE_REC) + hideIt = true; + g_RCInput->postMsg (msg, data); res = messages_return::cancel_info; } else if (msg == NeutrinoMessages::EVT_TIMESET) { @@ -1161,7 +1167,8 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) infoViewerBB->showIcon_SubT(); //infoViewerBB->showIcon_CA_Status(0); infoViewerBB->showIcon_Resolution(); - infoViewerBB->showIcon_Tuner(); + if (CFEManager::getInstance()->getMode() != CFEManager::FE_MODE_SINGLE) + infoViewerBB->showIcon_Tuner(); } } return messages_return::handled; @@ -1282,8 +1289,7 @@ void CInfoViewer::getEPG(const t_channel_id for_channel_id, CSectionsdClient::Cu oldinfo.current_uniqueKey = 0; return; } - - sectionsd_getCurrentNextServiceKey(for_channel_id & 0xFFFFFFFFFFFFULL, info); + CEitManager::getInstance()->getCurrentNextServiceKey(for_channel_id, info); /* of there is no EPG, send an event so that parental lock can work */ if (info.current_uniqueKey == 0 && info.next_uniqueKey == 0) { @@ -1372,7 +1378,8 @@ void CInfoViewer::showSNR () g_SignalFont->RenderString (posx, posy + height, sw, percent, COL_INFOBAR); } } - infoViewerBB->showSysfsHdd(); + if(showButtonBar) + infoViewerBB->showSysfsHdd(); } void CInfoViewer::display_Info(const char *current, const char *next, diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 1d0f8a193..7502bad65 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -32,7 +32,8 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include "infoviewer_bb.h" + #include #include @@ -49,13 +50,12 @@ #include #include -#include #include #include #include #include #include - +#include #include #include @@ -86,13 +86,15 @@ CInfoViewerBB::CInfoViewerBB() pthread_detach(scrambledT); } #endif + hddperT = 0; + hddperTflag = false; Init(); } void CInfoViewerBB::Init() { hddscale = NULL; - varscale = NULL; + sysscale = NULL; hddwidth = 0; bbIconMaxH = 0; bbButtonMaxH = 0; @@ -117,6 +119,10 @@ CInfoViewerBB::~CInfoViewerBB() pthread_cancel(scrambledT); scrambledT = 0; } + if(hddperT) { + pthread_cancel(hddperT); + hddperT = 0; + } } CInfoViewerBB* CInfoViewerBB::getInstance() @@ -180,8 +186,10 @@ void CInfoViewerBB::getBBIconInfo() iconView = checkBBIcon(NEUTRINO_ICON_SCRAMBLED2, &w, &h); break; case CInfoViewerBB::ICON_TUNER: - if (g_settings.infobar_show_tuner == 1) { - iconView = checkBBIcon(NEUTRINO_ICON_TUNER_1, &w, &h); + if (CFEManager::getInstance()->getMode() != CFEManager::FE_MODE_SINGLE) { + if (g_settings.infobar_show_tuner == 1) { + iconView = checkBBIcon(NEUTRINO_ICON_TUNER_1, &w, &h); + } } break; default: @@ -587,28 +595,57 @@ void CInfoViewerBB::showIcon_Tuner() void CInfoViewerBB::showSysfsHdd() { - if ((g_settings.infobar_show_sysfs_hdd) && (is_visible)) { - long blocks_used; - struct statfs s; - int per = 0; - if (::statfs("/", &s) == 0 && s.f_blocks) { -// per = (s.f_blocks - s.f_bfree) / (s.f_blocks/100); - blocks_used = s.f_blocks - s.f_bfree; - per = (blocks_used * 100ULL) / s.f_blocks; + if (g_settings.infobar_show_sysfs_hdd) { + //sysFS info + int percent = 0; + long t, u; + if (get_fs_usage("/", t, u)) + percent = (u * 100ULL) / t; + showBarSys(percent); + +#if 0 + //HDD info in a seperate thread + if(!hddperTflag) { + hddperTflag=true; + pthread_create(&hddperT, NULL, hddperThread, (void*) this); + pthread_detach(hddperT); } - varscale->paintProgressBar(bbIconMinX, BBarY + InfoHeightY_Info / 2 - 2 - 6, hddwidth , 6, per, 100); - per = 0; - //HD info - if(!check_dir(g_settings.network_nfs_recordingdir)){ - if (::statfs(g_settings.network_nfs_recordingdir, &s) == 0 && s.f_blocks) { - blocks_used = s.f_blocks - s.f_bfree; - per = (blocks_used * 100ULL) / s.f_blocks; - } +#else + if (!check_dir(g_settings.network_nfs_recordingdir)) { + if (get_fs_usage(g_settings.network_nfs_recordingdir, t, u)) + percent = (u * 100ULL) / t; + showBarHdd(percent); } - hddscale->paintProgressBar(bbIconMinX, BBarY + InfoHeightY_Info / 2 + 2, hddwidth, 6, per, 100); +#endif } } +void* CInfoViewerBB::hddperThread(void *arg) +{ + CInfoViewerBB *infoViewerBB = (CInfoViewerBB*) arg; + + int percent = 0; + long t, u; + if (get_fs_usage(g_settings.network_nfs_recordingdir, t, u)) + percent = (u * 100ULL) / t; + infoViewerBB->showBarHdd(percent); + + infoViewerBB->hddperTflag=false; + pthread_exit(NULL); +} + +void CInfoViewerBB::showBarSys(int percent) +{ + if (is_visible) + sysscale->paintProgressBar(bbIconMinX, BBarY + InfoHeightY_Info / 2 - 2 - 6, hddwidth, 6, percent, 100); +} + +void CInfoViewerBB::showBarHdd(int percent) +{ + if (is_visible) + hddscale->paintProgressBar(bbIconMinX, BBarY + InfoHeightY_Info / 2 + 2 + 0, hddwidth, 6, percent, 100); +} + void CInfoViewerBB::paint_ca_icons(int caid, char * icon, int &icon_space_offset) { char buf[20]; @@ -757,16 +794,16 @@ void CInfoViewerBB::changePB() if (hddscale != NULL) delete hddscale; hddscale = new CProgressBar(true, hddwidth, 6, 50, 100, 75, true); - if (varscale != NULL) - delete varscale; - varscale = new CProgressBar(true, hddwidth, 6, 50, 100, 75, true); + if (sysscale != NULL) + delete sysscale; + sysscale = new CProgressBar(true, hddwidth, 6, 50, 100, 75, true); } void CInfoViewerBB::reset_allScala() { hddscale->reset(); - varscale->reset(); - lasthdd = lastvar = -1; + sysscale->reset(); + //lasthdd = lastsys = -1; } void CInfoViewerBB::setBBOffset() diff --git a/src/gui/infoviewer_bb.h b/src/gui/infoviewer_bb.h index b41c0afcd..41bb17cb0 100644 --- a/src/gui/infoviewer_bb.h +++ b/src/gui/infoviewer_bb.h @@ -42,7 +42,6 @@ #include #include "widget/menue.h" #include -#include #include class CInfoViewerBB @@ -99,7 +98,7 @@ class CInfoViewerBB int BBarY, BBarFontY; int hddwidth; - int lasthdd, lastvar; + //int lasthdd, lastsys; bool fta; int minX; @@ -107,7 +106,7 @@ class CInfoViewerBB bool scrambledNoSig, scrambledNoSigSave; pthread_t scrambledT; - CProgressBar *hddscale, *varscale; + CProgressBar *hddscale, *sysscale; void showBBIcons(const int modus, const std::string & icon); void getBBIconInfo(void); @@ -122,6 +121,13 @@ class CInfoViewerBB static void* scrambledThread(void *arg); void scrambledCheck(bool force=false); + void showBarSys(int percent = 0); + void showBarHdd(int percent = 0); + + pthread_t hddperT; + static void* hddperThread(void *arg); + bool hddperTflag; + public: CInfoViewerBB(); ~CInfoViewerBB(); diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 01b040773..43fd4eb0b 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -49,7 +49,7 @@ #endif #endif -#include "gui/keybind_setup.h" +#include "keybind_setup.h" #include #include @@ -60,7 +60,7 @@ #include #include -#include "gui/filebrowser.h" +#include #include #ifdef SCREENSHOT @@ -90,7 +90,7 @@ int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey) { parent->hide(); } - + if(actionKey == "loadkeys") { CFileBrowser fileBrowser; CFileFilter fileFilter; @@ -152,43 +152,44 @@ typedef struct key_settings_t { const neutrino_locale_t keydescription; int * keyvalue_p; + const neutrino_locale_t hint; } key_settings_struct_t; const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] = -{ - {LOCALE_KEYBINDINGMENU_TVRADIOMODE, &g_settings.key_tvradio_mode, }, - {LOCALE_KEYBINDINGMENU_POWEROFF, &g_settings.key_power_off, }, - {LOCALE_KEYBINDINGMENU_PAGEUP, &g_settings.key_channelList_pageup, }, - {LOCALE_KEYBINDINGMENU_PAGEDOWN, &g_settings.key_channelList_pagedown, }, - {LOCALE_EXTRA_KEY_LIST_START, &g_settings.key_list_start, }, - {LOCALE_EXTRA_KEY_LIST_END, &g_settings.key_list_end, }, - {LOCALE_KEYBINDINGMENU_CANCEL, &g_settings.key_channelList_cancel, }, - {LOCALE_KEYBINDINGMENU_SORT, &g_settings.key_channelList_sort, }, - {LOCALE_KEYBINDINGMENU_ADDRECORD, &g_settings.key_channelList_addrecord, }, - {LOCALE_KEYBINDINGMENU_ADDREMIND, &g_settings.key_channelList_addremind, }, - {LOCALE_KEYBINDINGMENU_BOUQUETUP, &g_settings.key_bouquet_up, }, - {LOCALE_KEYBINDINGMENU_BOUQUETDOWN, &g_settings.key_bouquet_down, }, - {LOCALE_EXTRA_KEY_CURRENT_TRANSPONDER, &g_settings.key_current_transponder, }, - {LOCALE_KEYBINDINGMENU_CHANNELUP, &g_settings.key_quickzap_up, }, - {LOCALE_KEYBINDINGMENU_CHANNELDOWN, &g_settings.key_quickzap_down, }, - {LOCALE_KEYBINDINGMENU_SUBCHANNELUP, &g_settings.key_subchannel_up, }, - {LOCALE_KEYBINDINGMENU_SUBCHANNELDOWN, &g_settings.key_subchannel_down, }, - {LOCALE_KEYBINDINGMENU_ZAPHISTORY, &g_settings.key_zaphistory, }, - {LOCALE_KEYBINDINGMENU_LASTCHANNEL, &g_settings.key_lastchannel, }, - {LOCALE_MPKEY_REWIND, &g_settings.mpkey_rewind, }, - {LOCALE_MPKEY_FORWARD, &g_settings.mpkey_forward, }, - {LOCALE_MPKEY_PAUSE, &g_settings.mpkey_pause, }, - {LOCALE_MPKEY_STOP, &g_settings.mpkey_stop, }, - {LOCALE_MPKEY_PLAY, &g_settings.mpkey_play, }, - {LOCALE_MPKEY_AUDIO, &g_settings.mpkey_audio, }, - {LOCALE_MPKEY_TIME, &g_settings.mpkey_time, }, - {LOCALE_MPKEY_BOOKMARK, &g_settings.mpkey_bookmark, }, - {LOCALE_EXTRA_KEY_TIMESHIFT, &g_settings.key_timeshift, }, - {LOCALE_MPKEY_PLUGIN, &g_settings.mpkey_plugin, }, +{ + {LOCALE_KEYBINDINGMENU_TVRADIOMODE, &g_settings.key_tvradio_mode, LOCALE_MENU_HINT_KEY_TVRADIOMODE }, + {LOCALE_KEYBINDINGMENU_POWEROFF, &g_settings.key_power_off, LOCALE_MENU_HINT_KEY_POWEROFF }, + {LOCALE_KEYBINDINGMENU_PAGEUP, &g_settings.key_channelList_pageup, LOCALE_MENU_HINT_KEY_PAGEUP }, + {LOCALE_KEYBINDINGMENU_PAGEDOWN, &g_settings.key_channelList_pagedown, LOCALE_MENU_HINT_KEY_PAGEDOWN }, + {LOCALE_EXTRA_KEY_LIST_START, &g_settings.key_list_start, LOCALE_MENU_HINT_KEY_LIST_START }, + {LOCALE_EXTRA_KEY_LIST_END, &g_settings.key_list_end, LOCALE_MENU_HINT_KEY_LIST_END }, + {LOCALE_KEYBINDINGMENU_CANCEL, &g_settings.key_channelList_cancel, LOCALE_MENU_HINT_KEY_CANCEL }, + {LOCALE_KEYBINDINGMENU_SORT, &g_settings.key_channelList_sort, LOCALE_MENU_HINT_KEY_SORT }, + {LOCALE_KEYBINDINGMENU_ADDRECORD, &g_settings.key_channelList_addrecord, LOCALE_MENU_HINT_KEY_ADDRECORD }, + {LOCALE_KEYBINDINGMENU_ADDREMIND, &g_settings.key_channelList_addremind, LOCALE_MENU_HINT_KEY_ADDREMIND }, + {LOCALE_KEYBINDINGMENU_BOUQUETUP, &g_settings.key_bouquet_up, LOCALE_MENU_HINT_KEY_BOUQUETUP }, + {LOCALE_KEYBINDINGMENU_BOUQUETDOWN, &g_settings.key_bouquet_down, LOCALE_MENU_HINT_KEY_BOUQUETDOWN }, + {LOCALE_EXTRA_KEY_CURRENT_TRANSPONDER, &g_settings.key_current_transponder, LOCALE_MENU_HINT_KEY_TRANSPONDER }, + {LOCALE_KEYBINDINGMENU_CHANNELUP, &g_settings.key_quickzap_up, LOCALE_MENU_HINT_KEY_CHANNELUP }, + {LOCALE_KEYBINDINGMENU_CHANNELDOWN, &g_settings.key_quickzap_down, LOCALE_MENU_HINT_KEY_CHANNELDOWN }, + {LOCALE_KEYBINDINGMENU_SUBCHANNELUP, &g_settings.key_subchannel_up, LOCALE_MENU_HINT_KEY_SUBCHANNELUP }, + {LOCALE_KEYBINDINGMENU_SUBCHANNELDOWN, &g_settings.key_subchannel_down, LOCALE_MENU_HINT_KEY_SUBCHANNELDOWN }, + {LOCALE_KEYBINDINGMENU_ZAPHISTORY, &g_settings.key_zaphistory, LOCALE_MENU_HINT_KEY_HISTORY }, + {LOCALE_KEYBINDINGMENU_LASTCHANNEL, &g_settings.key_lastchannel, LOCALE_MENU_HINT_KEY_LASTCHANNEL }, + {LOCALE_MPKEY_REWIND, &g_settings.mpkey_rewind, LOCALE_MENU_HINT_KEY_MPREWIND }, + {LOCALE_MPKEY_FORWARD, &g_settings.mpkey_forward, LOCALE_MENU_HINT_KEY_MPFORWARD }, + {LOCALE_MPKEY_PAUSE, &g_settings.mpkey_pause, LOCALE_MENU_HINT_KEY_MPPAUSE }, + {LOCALE_MPKEY_STOP, &g_settings.mpkey_stop, LOCALE_MENU_HINT_KEY_MPSTOP }, + {LOCALE_MPKEY_PLAY, &g_settings.mpkey_play, LOCALE_MENU_HINT_KEY_MPPLAY }, + {LOCALE_MPKEY_AUDIO, &g_settings.mpkey_audio, LOCALE_MENU_HINT_KEY_MPAUDIO }, + {LOCALE_MPKEY_TIME, &g_settings.mpkey_time, LOCALE_MENU_HINT_KEY_MPTIME }, + {LOCALE_MPKEY_BOOKMARK, &g_settings.mpkey_bookmark, LOCALE_MENU_HINT_KEY_MPBOOKMARK }, + {LOCALE_EXTRA_KEY_TIMESHIFT, &g_settings.key_timeshift, LOCALE_MENU_HINT_KEY_MPTIMESHIFT }, + {LOCALE_MPKEY_PLUGIN, &g_settings.mpkey_plugin, LOCALE_MENU_HINT_KEY_MPPLUGIN }, /*{LOCALE_EXTRA_KEY_PLUGIN, &g_settings.key_plugin, },*/ - {LOCALE_EXTRA_KEY_UNLOCK, &g_settings.key_unlock, }, - {LOCALE_EXTRA_KEY_SCREENSHOT, &g_settings.key_screenshot, } + {LOCALE_EXTRA_KEY_UNLOCK, &g_settings.key_unlock, LOCALE_MENU_HINT_KEY_UNLOCK}, + {LOCALE_EXTRA_KEY_SCREENSHOT, &g_settings.key_screenshot, LOCALE_MENU_HINT_KEY_SCREENSHOT } }; @@ -207,27 +208,45 @@ int CKeybindSetup::showKeySetup() //keysetup menu CMenuWidget* keySettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP); keySettings->addIntroItems(LOCALE_MAINSETTINGS_KEYBINDING); - + //keybindings menu CMenuWidget bindSettings(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING); - + //keybindings int shortcut = 1; showKeyBindSetup(&bindSettings); - keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_HEAD, true, NULL, &bindSettings, NULL, CRCInput::convertDigitToKey(shortcut++))); + CMenuForwarder * mf; + + mf = new CMenuForwarder(LOCALE_KEYBINDINGMENU_HEAD, true, NULL, &bindSettings, NULL, CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_KEY_BINDING); + keySettings->addItem(mf); keySettings->addItem(GenericMenuSeparator); - keySettings->addItem(new CMenuForwarder(LOCALE_EXTRA_LOADKEYS, true, NULL, this, "loadkeys", CRCInput::convertDigitToKey(shortcut++))); - keySettings->addItem(new CMenuForwarder(LOCALE_EXTRA_SAVEKEYS, true, NULL, this, "savekeys", CRCInput::convertDigitToKey(shortcut++))); + + mf = new CMenuForwarder(LOCALE_EXTRA_LOADKEYS, true, NULL, this, "loadkeys", CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_KEY_LOAD); + keySettings->addItem(mf); + + mf = new CMenuForwarder(LOCALE_EXTRA_SAVEKEYS, true, NULL, this, "savekeys", CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_KEY_SAVE); + keySettings->addItem(mf); //rc tuning CStringInput keySettings_repeat_genericblocker(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, g_settings.repeat_genericblocker, 3, LOCALE_REPEATBLOCKER_HINT_1, LOCALE_REPEATBLOCKER_HINT_2, "0123456789 ", this); CStringInput keySettings_repeatBlocker(LOCALE_KEYBINDINGMENU_REPEATBLOCK, g_settings.repeat_blocker, 3, LOCALE_REPEATBLOCKER_HINT_1, LOCALE_REPEATBLOCKER_HINT_2, "0123456789 ", this); keySettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_RC)); - if (RC_HW_SELECT) - keySettings->addItem(new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE, &g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true)); - keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, &keySettings_repeatBlocker)); - keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, &keySettings_repeat_genericblocker)); + if (RC_HW_SELECT) { + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE, &g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_KEY_HARDWARE); + keySettings->addItem(mc); + } + mf = new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, &keySettings_repeatBlocker); + mf->setHint("", LOCALE_MENU_HINT_KEY_REPEATBLOCK); + keySettings->addItem(mf); + + mf = new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, &keySettings_repeat_genericblocker); + mf->setHint("", LOCALE_MENU_HINT_KEY_REPEATBLOCKGENERIC); + keySettings->addItem(mf); int res = keySettings->exec(NULL, ""); @@ -242,7 +261,7 @@ int CKeybindSetup::showKeySetup() g_settings.remote_control_hardware = org_remote_control_hardware; g_RCInput->CRCInput::set_rc_hw(); } - } + } delete keySettings; return res; @@ -251,78 +270,125 @@ int CKeybindSetup::showKeySetup() void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings) { + CMenuForwarder * mf; + bindSettings->addIntroItems(LOCALE_KEYBINDINGMENU_HEAD); - + for (int i = 0; i < KEYBINDS_COUNT; i++) keychooser[i] = new CKeyChooser(key_settings[i].keyvalue_p, key_settings[i].keydescription/*as head caption*/, NEUTRINO_ICON_SETTINGS); - + //modes CMenuWidget* bindSettings_modes = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_MODES); showKeyBindModeSetup(bindSettings_modes); - bindSettings->addItem(new CMenuDForwarder(LOCALE_KEYBINDINGMENU_MODECHANGE, true, NULL, bindSettings_modes, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + mf = new CMenuDForwarder(LOCALE_KEYBINDINGMENU_MODECHANGE, true, NULL, bindSettings_modes, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_KEY_MODECHANGE); + bindSettings->addItem(mf); // channellist keybindings CMenuWidget* bindSettings_chlist = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_CHANNELLIST); showKeyBindChannellistSetup(bindSettings_chlist); - bindSettings->addItem(new CMenuDForwarder(LOCALE_KEYBINDINGMENU_CHANNELLIST, true, NULL, bindSettings_chlist, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuDForwarder(LOCALE_KEYBINDINGMENU_CHANNELLIST, true, NULL, bindSettings_chlist, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_KEY_CHANNELLIST); + bindSettings->addItem(mf); // Zapping keys quickzap CMenuWidget* bindSettings_qzap = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_QUICKZAP); showKeyBindQuickzapSetup(bindSettings_qzap); - bindSettings->addItem(new CMenuDForwarder(LOCALE_KEYBINDINGMENU_QUICKZAP, true, NULL, bindSettings_qzap, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + mf = new CMenuDForwarder(LOCALE_KEYBINDINGMENU_QUICKZAP, true, NULL, bindSettings_qzap, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_KEY_QUICKZAP); + bindSettings->addItem(mf); //movieplayer CMenuWidget* bindSettings_mplayer = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_MOVIEPLAYER); showKeyBindMovieplayerSetup(bindSettings_mplayer); - bindSettings->addItem(new CMenuDForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, bindSettings_mplayer, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + mf = new CMenuDForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, bindSettings_mplayer, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint("", LOCALE_MENU_HINT_KEY_MOVIEPLAYER); + bindSettings->addItem(mf); //misc bindSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_MISC)); //bindSettings->addItem(new CMenuDForwarder(keydescription[KEY_PLUGIN], true, NULL, keychooser[KEY_PLUGIN])); - bindSettings->addItem(new CMenuDForwarder(key_settings[KEY_UNLOCK].keydescription, true, keychooser[KEY_UNLOCK]->getKeyName(), keychooser[KEY_UNLOCK])); + // unlock + mf = new CMenuDForwarder(key_settings[KEY_UNLOCK].keydescription, true, keychooser[KEY_UNLOCK]->getKeyName(), keychooser[KEY_UNLOCK]); + mf->setHint("", key_settings[KEY_UNLOCK].hint); + bindSettings->addItem(mf); + // screenshot #ifdef SCREENSHOT - bindSettings->addItem(new CMenuDForwarder(key_settings[KEY_SCREENSHOT].keydescription, true, keychooser[KEY_SCREENSHOT]->getKeyName(), keychooser[KEY_SCREENSHOT])); + mf = new CMenuDForwarder(key_settings[KEY_SCREENSHOT].keydescription, true, keychooser[KEY_SCREENSHOT]->getKeyName(), keychooser[KEY_SCREENSHOT]); + mf->setHint("", key_settings[KEY_SCREENSHOT].hint); + bindSettings->addItem(mf); #endif + //bindSettings->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ZAP_CYCLE, &g_settings.zap_cycle, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - bindSettings->addItem(new CMenuOptionChooser(LOCALE_EXTRA_MENU_LEFT_EXIT, &g_settings.menu_left_exit, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - bindSettings->addItem(new CMenuOptionChooser(LOCALE_EXTRA_AUDIO_RUN_PLAYER, &g_settings.audio_run_player, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - bindSettings->addItem(new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_MODE_LEFT_RIGHT_KEY_TV, &g_settings.mode_left_right_key_tv, KEYBINDINGMENU_MODE_LEFT_RIGHT_KEY_TV_OPTIONS, KEYBINDINGMENU_MODE_LEFT_RIGHT_KEY_TV_COUNT, true)); + // left-exit, FIXME is this option really change anything ?? + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_EXTRA_MENU_LEFT_EXIT, &g_settings.menu_left_exit, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_KEY_LEFT_EXIT); + bindSettings->addItem(mc); + + // audio for audio player + mc = new CMenuOptionChooser(LOCALE_EXTRA_AUDIO_RUN_PLAYER, &g_settings.audio_run_player, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_KEY_AUDIO); + bindSettings->addItem(mc); + + // right key + mc = new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_MODE_LEFT_RIGHT_KEY_TV, &g_settings.mode_left_right_key_tv, KEYBINDINGMENU_MODE_LEFT_RIGHT_KEY_TV_OPTIONS, KEYBINDINGMENU_MODE_LEFT_RIGHT_KEY_TV_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_KEY_RIGHT); + bindSettings->addItem(mc); } void CKeybindSetup::showKeyBindModeSetup(CMenuWidget *bindSettings_modes) { + CMenuForwarder * mf; bindSettings_modes->addIntroItems(LOCALE_KEYBINDINGMENU_MODECHANGE); - - bindSettings_modes->addItem(new CMenuDForwarder(key_settings[KEY_TV_RADIO_MODE].keydescription, true, keychooser[KEY_TV_RADIO_MODE]->getKeyName(), keychooser[KEY_TV_RADIO_MODE], NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - bindSettings_modes->addItem(new CMenuDForwarder(key_settings[KEY_POWER_OFF].keydescription, true, keychooser[KEY_POWER_OFF]->getKeyName(), keychooser[KEY_POWER_OFF], NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + + // tv/radio + mf = new CMenuDForwarder(key_settings[KEY_TV_RADIO_MODE].keydescription, true, keychooser[KEY_TV_RADIO_MODE]->getKeyName(), keychooser[KEY_TV_RADIO_MODE], NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", key_settings[KEY_TV_RADIO_MODE].hint); + bindSettings_modes->addItem(mf); + + mf = new CMenuDForwarder(key_settings[KEY_POWER_OFF].keydescription, true, keychooser[KEY_POWER_OFF]->getKeyName(), keychooser[KEY_POWER_OFF], NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", key_settings[KEY_POWER_OFF].hint); + bindSettings_modes->addItem(mf); } void CKeybindSetup::showKeyBindChannellistSetup(CMenuWidget *bindSettings_chlist) { bindSettings_chlist->addIntroItems(LOCALE_KEYBINDINGMENU_CHANNELLIST); +#if 0 CMenuOptionChooser *oj = new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_BOUQUETHANDLING, &g_settings.bouquetlist_mode, KEYBINDINGMENU_BOUQUETHANDLING_OPTIONS, KEYBINDINGMENU_BOUQUETHANDLING_OPTION_COUNT, true ); bindSettings_chlist->addItem(oj); +#endif + for (int i = KEY_PAGE_UP; i <= KEY_CURRENT_TRANSPONDER; i++) { + CMenuForwarder * mf = new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]); + mf->setHint("", key_settings[i].hint); + bindSettings_chlist->addItem(mf); + } - for (int i = KEY_PAGE_UP; i <= KEY_CURRENT_TRANSPONDER; i++) - bindSettings_chlist->addItem(new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i])); - - bindSettings_chlist->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SMS_CHANNEL, &g_settings.sms_channel, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_EXTRA_SMS_CHANNEL, &g_settings.sms_channel, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_KEY_CHANNEL_SMS); + bindSettings_chlist->addItem(mc); } void CKeybindSetup::showKeyBindQuickzapSetup(CMenuWidget *bindSettings_qzap) { bindSettings_qzap->addIntroItems(LOCALE_KEYBINDINGMENU_QUICKZAP); - for (int i = KEY_CHANNEL_UP; i <= KEY_LASTCHANNEL; i++) - bindSettings_qzap->addItem(new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i])); + for (int i = KEY_CHANNEL_UP; i <= KEY_LASTCHANNEL; i++) { + CMenuForwarder * mf = new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]); + mf->setHint("", key_settings[i].hint); + bindSettings_qzap->addItem(mf); + } } void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplayer) { bindSettings_mplayer->addIntroItems(LOCALE_MAINMENU_MOVIEPLAYER); - - for (int i = MPKEY_REWIND; i <= MPKEY_PLUGIN; i++) - bindSettings_mplayer->addItem(new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i])); + + for (int i = MPKEY_REWIND; i < MPKEY_PLUGIN; i++) { + CMenuForwarder * mf = new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]); + mf->setHint("", key_settings[i].hint); + bindSettings_mplayer->addItem(mf); + } } bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* data */) diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index f6280805f..30172d0f5 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -31,17 +31,17 @@ #endif -#include "gui/mediaplayer.h" +#include "mediaplayer.h" #include #include #include #include -#include "gui/movieplayer.h" -#include "gui/pictureviewer.h" +#include +#include #if ENABLE_UPNP -#include "gui/upnpbrowser.h" +#include #endif #include @@ -164,11 +164,13 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) neutrino_msg_t audio_rc = usage_mode == MODE_AUDIO ? CRCInput::RC_audio:CRCInput::RC_red; const char* audio_btn = usage_mode == MODE_AUDIO ? "" : NEUTRINO_ICON_BUTTON_RED; fw_audio = new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, true, NULL, this, "audioplayer", audio_rc, audio_btn); + fw_audio->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY); //internet player neutrino_msg_t inet_rc = usage_mode == MODE_AUDIO ? CRCInput::RC_www : CRCInput::RC_green; const char* inet_btn = usage_mode == MODE_AUDIO ? "" : NEUTRINO_ICON_BUTTON_GREEN; fw_inet = new CMenuForwarder(LOCALE_INETRADIO_NAME, true, NULL, this, "inetplayer", inet_rc, inet_btn); + fw_inet->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO); } if (usage_mode == MODE_DEFAULT) @@ -177,9 +179,11 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) moviePlayer = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER); personalize->addWidget(moviePlayer); fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayer, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE); //pictureviewer fw_pviewer = new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + fw_pviewer->setHint(NEUTRINO_ICON_HINT_PICVIEW, LOCALE_MENU_HINT_PICVIEW); #if ENABLE_UPNP //upnp browser fw_upnp = new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, true, NULL, new CUpnpBrowserGui(), NULL, CRCInput::RC_0, NEUTRINO_ICON_BUTTON_0); @@ -240,7 +244,9 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) void CMediaPlayerMenu::showMoviePlayer(CMenuWidget *moviePlayer, CPersonalizeGui *p) { CMenuForwarder *fw_mbrowser = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, this, "movieplayer", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + fw_mbrowser->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MB); CMenuForwarder *fw_file = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, &CMoviePlayerGui::getInstance(), "fileplayback", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + fw_file->setHint(NEUTRINO_ICON_HINT_FILEPLAY, LOCALE_MENU_HINT_FILEPLAY); p->addIntroItems(moviePlayer); diff --git a/src/gui/mediaplayer.h b/src/gui/mediaplayer.h index d2cfe042e..a52199d8b 100644 --- a/src/gui/mediaplayer.h +++ b/src/gui/mediaplayer.h @@ -30,8 +30,8 @@ #define __MEDIAPLAYER__ #include -#include "gui/audioplayer.h" -#include "gui/personalize.h" +#include +#include #include diff --git a/src/gui/mediaplayer_setup.cpp b/src/gui/mediaplayer_setup.cpp index fe48d6646..f10df62d7 100644 --- a/src/gui/mediaplayer_setup.cpp +++ b/src/gui/mediaplayer_setup.cpp @@ -35,17 +35,17 @@ #endif -#include "gui/mediaplayer_setup.h" +#include "mediaplayer_setup.h" #include #include #include -#include "gui/widget/stringinput.h" +#include -#include "gui/audioplayer_setup.h" -#include "gui/pictureviewer_setup.h" +#include +#include #include diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index 443f6393f..7c3b3a697 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -35,13 +35,13 @@ #include #include -#include "gui/miscsettings_menu.h" -#include "gui/cec_setup.h" -#include "gui/filebrowser.h" -#include "gui/keybind_setup.h" -#include "gui/plugins.h" -#include "gui/sleeptimer.h" -#include "gui/zapit_setup.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -64,7 +64,6 @@ CMiscMenue::~CMiscMenue() } - int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey) { printf("init extended settings menu...\n"); @@ -167,32 +166,42 @@ int CMiscMenue::showMiscSettingsMenu() //general CMenuWidget misc_menue_general(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_GENERAL); showMiscSettingsMenuGeneral(&misc_menue_general); - misc_menue.addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_GENERAL, true, NULL, &misc_menue_general, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_MISCSETTINGS_GENERAL, true, NULL, &misc_menue_general, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_MISC_GENERAL); + misc_menue.addItem(mf); //energy, shutdown if (g_info.hw_caps->can_shutdown) { CMenuWidget *misc_menue_energy = new CMenuWidget(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_ENERGY); showMiscSettingsMenuEnergy(misc_menue_energy); - misc_menue.addItem(new CMenuDForwarder(LOCALE_MISCSETTINGS_ENERGY, true, NULL, misc_menue_energy, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_ENERGY, true, NULL, misc_menue_energy, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_MISC_ENERGY); + misc_menue.addItem(mf); } //epg CMenuWidget misc_menue_epg(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_EPG); showMiscSettingsMenuEpg(&misc_menue_epg); - misc_menue.addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_HEAD, true, NULL, &misc_menue_epg, NULL, CRCInput::RC_yellow,NEUTRINO_ICON_BUTTON_YELLOW)); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_HEAD, true, NULL, &misc_menue_epg, NULL, CRCInput::RC_yellow,NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_MISC_EPG); + misc_menue.addItem(mf); //filebrowser settings CMenuWidget misc_menue_fbrowser(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_FILEBROWSER); showMiscSettingsMenuFBrowser(&misc_menue_fbrowser); - misc_menue.addItem( new CMenuForwarder(LOCALE_FILEBROWSER_HEAD, true, NULL, &misc_menue_fbrowser, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + mf = new CMenuForwarder(LOCALE_FILEBROWSER_HEAD, true, NULL, &misc_menue_fbrowser, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint("", LOCALE_MENU_HINT_MISC_FILEBROWSER); + misc_menue.addItem(mf); misc_menue.addItem(GenericMenuSeparatorLine); //cec settings + CCECSetup cecsetup; if (g_info.hw_caps->can_cec) { - CCECSetup cecsetup; - misc_menue.addItem(new CMenuForwarder(LOCALE_VIDEOMENU_HDMI_CEC, true, NULL, &cecsetup, NULL, CRCInput::RC_1)); + mf = new CMenuForwarder(LOCALE_VIDEOMENU_HDMI_CEC, true, NULL, &cecsetup, NULL, CRCInput::RC_1); + mf->setHint("", LOCALE_MENU_HINT_MISC_CEC); + misc_menue.addItem(mf); } if (!g_info.hw_caps->can_shutdown) { @@ -203,11 +212,15 @@ int CMiscMenue::showMiscSettingsMenu() //channellist CMenuWidget misc_menue_chanlist(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_CHANNELLIST); showMiscSettingsMenuChanlist(&misc_menue_chanlist); - misc_menue.addItem( new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, &misc_menue_chanlist, NULL, CRCInput::RC_2)); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, &misc_menue_chanlist, NULL, CRCInput::RC_2); + mf->setHint("", LOCALE_MENU_HINT_MISC_CHANNELLIST); + misc_menue.addItem(mf); //start channels CZapitSetup zapitsetup; - misc_menue.addItem(new CMenuForwarder(LOCALE_ZAPITSETUP_HEAD, true, NULL, &zapitsetup, NULL, CRCInput::RC_3)); + mf = new CMenuForwarder(LOCALE_ZAPITSETUP_HEAD, true, NULL, &zapitsetup, NULL, CRCInput::RC_3); + mf->setHint("", LOCALE_MENU_HINT_MISC_ZAPIT); + misc_menue.addItem(mf); #ifdef CPU_FREQ //CPU @@ -229,22 +242,34 @@ void CMiscMenue::showMiscSettingsMenuGeneral(CMenuWidget *ms_general) ms_general->addIntroItems(LOCALE_MISCSETTINGS_GENERAL); //standby after boot - ms_general->addItem(new CMenuOptionChooser(LOCALE_EXTRA_START_TOSTANDBY, &g_settings.power_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - ms_general->addItem(new CMenuOptionChooser(LOCALE_EXTRA_CACHE_TXT, (int *)&g_settings.cacheTXT, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_EXTRA_START_TOSTANDBY, &g_settings.power_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_START_TOSTANDBY); + ms_general->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_EXTRA_CACHE_TXT, (int *)&g_settings.cacheTXT, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_CACHE_TXT); + ms_general->addItem(mc); //fan speed if (g_info.has_fan) { - ms_general->addItem(new CMenuOptionNumberChooser(LOCALE_FAN_SPEED, &g_settings.fan_speed, true, 1, 14, fanNotifier, 0, 0, LOCALE_OPTIONS_OFF) ); + CMenuOptionNumberChooser * mn = new CMenuOptionNumberChooser(LOCALE_FAN_SPEED, &g_settings.fan_speed, true, 1, 14, fanNotifier, 0, 0, LOCALE_OPTIONS_OFF); + mn->setHint("", LOCALE_MENU_HINT_FAN_SPEED); + ms_general->addItem(mn); fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed); } //rotor //don't show rotor settings on cable box - if (g_info.delivery_system == DVB_S) - ms_general->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ROTOR_SWAP, &g_settings.rotor_swap, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + if (g_info.delivery_system == DVB_S) { + mc = new CMenuOptionChooser(LOCALE_EXTRA_ROTOR_SWAP, &g_settings.rotor_swap, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_ROTOR_SWAP); + ms_general->addItem(mc); + } - ms_general->addItem(new CMenuForwarder(LOCALE_PLUGINS_HDD_DIR, true, g_settings.plugin_hdd_dir, this, "plugin_dir")); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_PLUGINS_HDD_DIR, true, g_settings.plugin_hdd_dir, this, "plugin_dir"); + mf->setHint("", LOCALE_MENU_HINT_PLUGINS_HDD_DIR); + ms_general->addItem(mf); #ifdef ONE_KEY_PLUGIN ms_general->addItem(new CMenuForwarder(LOCALE_EXTRA_KEY_PLUGIN, true, g_settings.onekey_plugin,this,"onekeyplugin")); #endif /*ONE_KEY_PLUGIN*/ @@ -256,16 +281,26 @@ void CMiscMenue::showMiscSettingsMenuEnergy(CMenuWidget *ms_energy) ms_energy->addIntroItems(LOCALE_MISCSETTINGS_ENERGY); CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, &g_settings.shutdown_real_rcdelay, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, !g_settings.shutdown_real); + m1->setHint("", LOCALE_MENU_HINT_SHUTDOWN_RCDELAY); CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, g_settings.shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 "); CMenuForwarder *m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, g_settings.shutdown_count, miscSettings_shutdown_count); + m2->setHint("", LOCALE_MENU_HINT_SHUTDOWN_COUNT); + + miscNotifier = new COnOffNotifier(1); + miscNotifier->addItem(m1); + miscNotifier->addItem(m2); - miscNotifier = new CMiscNotifier( m1, m2 ); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier); + mc->setHint("", LOCALE_MENU_HINT_SHUTDOWN_REAL); - ms_energy->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier)); + ms_energy->addItem(mc); ms_energy->addItem(m1); ms_energy->addItem(m2); - ms_energy->addItem(new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, g_settings.shutdown_min, new CSleepTimerWidget, "permanent")); + + m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, g_settings.shutdown_min, new CSleepTimerWidget, "permanent"); + m2->setHint("", LOCALE_MENU_HINT_INACT_TIMER); + ms_energy->addItem(m2); } //EPG settings @@ -273,21 +308,33 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg) { ms_epg->addIntroItems(LOCALE_MISCSETTINGS_EPG_HEAD); - ms_epg->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE, &g_settings.epg_save, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE, &g_settings.epg_save, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_EPG_SAVE); + ms_epg->addItem(mc); CStringInput * miscSettings_epg_cache = new CStringInput(LOCALE_MISCSETTINGS_EPG_CACHE, &g_settings.epg_cache, 2,LOCALE_MISCSETTINGS_EPG_CACHE_HINT1, LOCALE_MISCSETTINGS_EPG_CACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier); - ms_epg->addItem(new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_CACHE, true, g_settings.epg_cache, miscSettings_epg_cache)); + CMenuForwarder * mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_CACHE, true, g_settings.epg_cache, miscSettings_epg_cache); + mf->setHint("", LOCALE_MENU_HINT_EPG_CACHE); + ms_epg->addItem(mf); CStringInput * miscSettings_epg_cache_e = new CStringInput(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, &g_settings.epg_extendedcache, 3,LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT1, LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier); - ms_epg->addItem(new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, true, g_settings.epg_extendedcache, miscSettings_epg_cache_e)); + mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, true, g_settings.epg_extendedcache, miscSettings_epg_cache_e); + mf->setHint("", LOCALE_MENU_HINT_EPG_EXTENDEDCACHE); + ms_epg->addItem(mf); CStringInput * miscSettings_epg_old_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, &g_settings.epg_old_events, 3,LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier); - ms_epg->addItem(new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, true, g_settings.epg_old_events, miscSettings_epg_old_events)); + mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, true, g_settings.epg_old_events, miscSettings_epg_old_events); + mf->setHint("", LOCALE_MENU_HINT_EPG_OLD_EVENTS); + ms_epg->addItem(mf); CStringInput * miscSettings_epg_max_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, &g_settings.epg_max_events, 6,LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier); - ms_epg->addItem(new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, true, g_settings.epg_max_events, miscSettings_epg_max_events)); + mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, true, g_settings.epg_max_events, miscSettings_epg_max_events); + mf->setHint("", LOCALE_MENU_HINT_EPG_MAX_EVENTS); + ms_epg->addItem(mf); - ms_epg->addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_DIR, true, g_settings.epg_dir, this, "epgdir")); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_DIR, true, g_settings.epg_dir, this, "epgdir"); + mf->setHint("", LOCALE_MENU_HINT_EPG_DIR); + ms_epg->addItem(mf); } //filebrowser settings @@ -295,9 +342,17 @@ void CMiscMenue::showMiscSettingsMenuFBrowser(CMenuWidget *ms_fbrowser) { ms_fbrowser->addIntroItems(LOCALE_FILEBROWSER_HEAD); - ms_fbrowser->addItem(new CMenuOptionChooser(LOCALE_FILESYSTEM_IS_UTF8 , &g_settings.filesystem_is_utf8 , MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTIONS, MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTION_COUNT, true )); - ms_fbrowser->addItem(new CMenuOptionChooser(LOCALE_FILEBROWSER_SHOWRIGHTS , &g_settings.filebrowser_showrights , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true )); - ms_fbrowser->addItem(new CMenuOptionChooser(LOCALE_FILEBROWSER_DENYDIRECTORYLEAVE, &g_settings.filebrowser_denydirectoryleave, MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true )); + CMenuOptionChooser * mc; + mc = new CMenuOptionChooser(LOCALE_FILESYSTEM_IS_UTF8 , &g_settings.filesystem_is_utf8 , MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTIONS, MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTION_COUNT, true ); + mc->setHint("", LOCALE_MENU_HINT_FILESYSTEM_IS_UTF8); + ms_fbrowser->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_FILEBROWSER_SHOWRIGHTS , &g_settings.filebrowser_showrights , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ); + mc->setHint("", LOCALE_MENU_HINT_FILEBROWSER_SHOWRIGHTS); + ms_fbrowser->addItem(mc); + mc = new CMenuOptionChooser(LOCALE_FILEBROWSER_DENYDIRECTORYLEAVE, &g_settings.filebrowser_denydirectoryleave, MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ); + mc->setHint("", LOCALE_MENU_HINT_FILEBROWSER_DENYDIRECTORYLEAVE); + ms_fbrowser->addItem(mc); } //channellist @@ -305,12 +360,30 @@ void CMiscMenue::showMiscSettingsMenuChanlist(CMenuWidget *ms_chanlist) { ms_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST); - ms_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_HDLIST , &g_settings.make_hd_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - ms_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_NEWLIST, &g_settings.make_new_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - ms_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_REMOVEDLIST, &g_settings.make_removed_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - ms_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_KEEP_NUMBERS, &g_settings.keep_channel_numbers , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - ms_chanlist->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ZAP_CYCLE , &g_settings.zap_cycle , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - ms_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_NEW_ZAP_MODE, &g_settings.channellist_new_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true )); + CMenuOptionChooser * mc; + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_HDLIST , &g_settings.make_hd_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_MAKE_HDLIST); + ms_chanlist->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_NEWLIST, &g_settings.make_new_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_MAKE_NEWLIST); + ms_chanlist->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_REMOVEDLIST, &g_settings.make_removed_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_MAKE_REMOVEDLIST); + ms_chanlist->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_KEEP_NUMBERS, &g_settings.keep_channel_numbers , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_KEEP_NUMBERS); + ms_chanlist->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_EXTRA_ZAP_CYCLE , &g_settings.zap_cycle , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_ZAP_CYCLE); + ms_chanlist->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_NEW_ZAP_MODE, &g_settings.channellist_new_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ); + mc->setHint("", LOCALE_MENU_HINT_NEW_ZAP_MODE); + ms_chanlist->addItem(mc); } #ifdef CPU_FREQ diff --git a/src/gui/miscsettings_menu.h b/src/gui/miscsettings_menu.h index 888d91915..b05d0c68a 100644 --- a/src/gui/miscsettings_menu.h +++ b/src/gui/miscsettings_menu.h @@ -32,7 +32,6 @@ #include #include -#include "gui/widget/menue.h" //#define CPU_FREQ @@ -41,7 +40,7 @@ class CMiscMenue : public CMenuTarget private: CFanControlNotifier *fanNotifier; CSectionsdConfigNotifier* sectionsdConfigNotifier; - CMiscNotifier* miscNotifier; + COnOffNotifier* miscNotifier; int width; diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index ef9e76c1a..d1eebbf59 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -36,7 +36,7 @@ #include #include #include -#include "gui/scan_setup.h" +#include #include #include #include @@ -138,7 +138,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) for(sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) { if(!strcmp(sit->second.name.c_str(),scansettings.satNameNoDiseqc)) { sat.position = sit->first; - strncpy(sat.satName, scansettings.satNameNoDiseqc, 50); + strncpy(sat.satName, scansettings.satNameNoDiseqc, 49); satList.push_back(sat); if(sit->second.motor_position) motorPosition = sit->second.motor_position; @@ -148,7 +148,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) #endif /* send satellite list to zapit */ sat.position = CServiceManager::getInstance()->GetSatellitePosition(scansettings.satNameNoDiseqc); - strncpy(sat.satName, scansettings.satNameNoDiseqc, 50); + strncpy(sat.satName, scansettings.satNameNoDiseqc, 49); satList.push_back(sat); satellite_map_t & satmap = frontend->getSatellites(); diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 257b48dc4..dece8d5e1 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -47,28 +47,31 @@ #include #endif +#include + #include #include #include "moviebrowser.h" #include "filebrowser.h" -#include "widget/hintbox.h" -#include "widget/helpbox.h" -#include "widget/messagebox.h" -#include "widget/stringinput_ext.h" +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include "neutrino.h" +#include #include // for statfs #include #include #include -#include -#include #include #include -#include #include +#include extern CPictureViewer * g_PicViewer; static CProgressBar *timescale; @@ -2887,7 +2890,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) if(movie_info != NULL) { - strncpy(dirItNr, m_dirNames[movie_info->dirItNr].c_str(),BUFFER_SIZE); + strncpy(dirItNr, m_dirNames[movie_info->dirItNr].c_str(),BUFFER_SIZE-1); snprintf(size,BUFFER_SIZE,"%5llu",movie_info->file.Size>>20); } @@ -2977,7 +2980,8 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/) { dirInput[i] = new CFileChooser(&m_settings.storageDir[i]); forwarder[i] = new CMenuForwarder(LOCALE_MOVIEBROWSER_DIR, m_settings.storageDirUsed[i], m_settings.storageDir[i], dirInput[i]); - notifier[i] = new COnOffNotifier(forwarder[i]); + notifier[i] = new COnOffNotifier(); + notifier[i]->addItem(forwarder[i]); chooser[i] = new CMenuOptionChooser(LOCALE_MOVIEBROWSER_USE_DIR , &m_settings.storageDirUsed[i] , MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,notifier[i]); optionsMenuDir.addItem(chooser[i] ); optionsMenuDir.addItem(forwarder[i] ); @@ -3116,7 +3120,7 @@ int CMovieBrowser::showStartPosSelectionMenu(void) // P2 CMenuWidgetSelection startPosSelectionMenu(LOCALE_MOVIEBROWSER_HEAD , NEUTRINO_ICON_MOVIEPLAYER); startPosSelectionMenu.enableFade(false); - startPosSelectionMenu.addIntroItems(LOCALE_MOVIEBROWSER_START_HEAD); + startPosSelectionMenu.addIntroItems(LOCALE_MOVIEBROWSER_START_HEAD, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); if(m_movieSelectionHandler->bookmarks.start != 0) { @@ -3451,7 +3455,7 @@ CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , std::s height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); optionValueString = &OptionValue; optionName = OptionName; - strncpy(buffer,OptionValue.c_str(),BUFFER_MAX); + strncpy(buffer,OptionValue.c_str(),BUFFER_MAX-1); buffer[BUFFER_MAX-1] = 0;// terminate string optionValue = buffer; active = Active; @@ -3594,10 +3598,8 @@ int CDirMenu::exec(CMenuTarget* parent, const std::string & actionKey) { if(dirState[number] == DIR_STATE_SERVER_DOWN) { - std::string command = "ether-wake "; - command += g_settings.network_nfs_mac[dirNfsMountNr[number]]; - printf("try to start server: %s\n",command.c_str()); - if(system(command.c_str()) != 0) + printf("try to start server: %s %s\n","ether-wake", g_settings.network_nfs_mac[dirNfsMountNr[number]]); + if(my_system("ether-wake", g_settings.network_nfs_mac[dirNfsMountNr[number]]) != 0) perror("ether-wake failed"); dirOptionText[number]="STARTE SERVER"; @@ -3844,7 +3846,8 @@ int find_gop(unsigned char *buf, int r) } return -1; } - +#if 0 +//never used off64_t fake_read(int fd, unsigned char *buf, size_t size, off64_t fsize) { off64_t cur = lseek64 (fd, 0, SEEK_CUR); @@ -3855,7 +3858,7 @@ off64_t fake_read(int fd, unsigned char *buf, size_t size, off64_t fsize) else return size; } - +#endif #define PSI_SIZE 188*3 static int read_psi(char * spart, unsigned char * buf) { @@ -3948,7 +3951,7 @@ static off64_t cut_movie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie) char spart[255]; char dpart[255]; char npart[255]; - unsigned char * buf; + unsigned char psi[PSI_SIZE]; int r, i; off64_t sdone, spos; @@ -3965,9 +3968,9 @@ static off64_t cut_movie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie) time_t tt1; off64_t bpos, bskip; - buf = (unsigned char *) malloc(BUF_SIZE); + unsigned char * buf = new unsigned char[BUF_SIZE]; if(buf == 0) { - perror("malloc"); + perror("new"); return 0; } @@ -4019,7 +4022,10 @@ printf("cut: end bookmark %d at %lld\n", bcount, books[bcount].pos); bcount++; } printf("\n"); - if(!bcount) return 0; + if(!bcount){ + delete [] buf; + return 0; + } qsort(books, bcount, sizeof(struct mybook), compare_book); for(i = 0; i < bcount; i++) { if(books[i].ok) { @@ -4051,6 +4057,7 @@ printf("\n********* new file %s expected size %lld, start time %s", dpart, newsi dstfd = open (dpart, O_CREAT|O_WRONLY|O_TRUNC| O_LARGEFILE, 0644); if(dstfd < 0) { perror(dpart); + delete [] buf; return 0; } part = 0; @@ -4179,7 +4186,7 @@ printf("********* total written %lld tooks %ld secs end time %s", spos, tt1-tt, lseek64 (dstfd, 0, SEEK_SET); ret_err: close(dstfd); - free(buf); + delete [] buf; if(was_cancel) g_RCInput->postMsg(CRCInput::RC_home, 0); return retval; @@ -4195,7 +4202,6 @@ static off64_t copy_movie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie, bool onefi char spart[255]; char dpart[255]; char npart[255]; - unsigned char * buf; unsigned char psi[PSI_SIZE]; int r, i; off64_t sdone, spos = 0, btotal = 0; @@ -4209,9 +4215,9 @@ static off64_t copy_movie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie, bool onefi bool was_cancel = false; int retval = 0; - buf = (unsigned char *) malloc(BUF_SIZE); + unsigned char * buf = new unsigned char[BUF_SIZE]; if(buf == 0) { - perror("malloc"); + perror("new"); return 0; } @@ -4247,8 +4253,10 @@ printf("copy: jump bookmark %d at %lld len %lld\n", bcount, books[bcount].pos, b bcount++; } } - if(!bcount) return 0; - + if(!bcount){ + delete [] buf; + return 0; + } tt = time(0); printf("********* %d boormarks, to %s file(s), expected size to copy %lld, start time %s", bcount, onefile ? "one" : "many", newsize, ctime (&tt)); snprintf(npart, sizeof(npart), "%s", name); @@ -4389,7 +4397,7 @@ printf("copy: ********* %s: total written %lld took %ld secs\n", dpart, spos, tt } retval = 1; ret_err: - free(buf); + delete [] buf; if(was_cancel) g_RCInput->postMsg(CRCInput::RC_home, 0); return retval; diff --git a/src/gui/moviebrowser.h b/src/gui/moviebrowser.h index 1f1bcf637..a18f19fe3 100644 --- a/src/gui/moviebrowser.h +++ b/src/gui/moviebrowser.h @@ -73,13 +73,13 @@ #include #include -#include "gui/widget/listframe.h" -#include "gui/widget/menue.h" -#include "gui/widget/textbox.h" -#include "gui/movieinfo.h" -#include "driver/file.h" +#include +#include +#include +#include +#include #include -#include "driver/pictureviewer/pictureviewer.h" +#include #define MAX_NUMBER_OF_BOOKMARK_ITEMS MI_MOVIE_BOOK_USER_MAX // we just use the same size as used in Movie info (MAX_NUMBER_OF_BOOKMARK_ITEMS is used for the number of menu items) #define MOVIEBROWSER_SETTINGS_FILE CONFIGDIR "/moviebrowser.conf" diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp index 8fbaf4201..c6ec5188a 100644 --- a/src/gui/movieinfo.cpp +++ b/src/gui/movieinfo.cpp @@ -46,6 +46,8 @@ #include #endif +#include + #include #include #include @@ -83,7 +85,7 @@ bool CMovieInfo::convertTs2XmlName(char *char_filename, int size) bool result = false; std::string filename = char_filename; if (convertTs2XmlName(&filename) == true) { - strncpy(char_filename, filename.c_str(), size); + strncpy(char_filename, filename.c_str(), size-1); char_filename[size - 1] = 0; result = true; } @@ -321,6 +323,8 @@ bool CMovieInfo::loadMovieInfo(MI_MOVIE_INFO * movie_info, CFile * file) /************************************************************************ ************************************************************************/ +#if 0 +//never used bool CMovieInfo::parseXmlTree(char */*text*/, MI_MOVIE_INFO * /*movie_info*/) { #ifndef XMLTREE_LIB @@ -389,6 +393,7 @@ bool CMovieInfo::parseXmlTree(char */*text*/, MI_MOVIE_INFO * /*movie_info*/) XML_GET_DATA_STRING(xam1, MI_XML_TAG_PRODUCT_COUNTRY, movie_info->productionCountry); //if(!strcmp(xam1->GetType(), MI_XML_TAG_PRODUCT_COUNTRY)) if(xam1->GetData() != NULL)strncpy(movie_info->productionCountry, xam1->GetData(),4); XML_GET_DATA_INT(xam1, MI_XML_TAG_PRODUCT_DATE, movie_info->productionDate); + XML_GET_DATA_INT(xam1, MI_XML_TAG_QUALITIY, movie_info->quality); XML_GET_DATA_INT(xam1, MI_XML_TAG_QUALITY, movie_info->quality); XML_GET_DATA_INT(xam1, MI_XML_TAG_PARENTAL_LOCKAGE, movie_info->parentalLockAge); XML_GET_DATA_INT(xam1, MI_XML_TAG_DATE_OF_LAST_PLAY, movie_info->dateOfLastPlay); @@ -413,7 +418,7 @@ bool CMovieInfo::parseXmlTree(char */*text*/, MI_MOVIE_INFO * /*movie_info*/) #endif /* XMLTREE_LIB */ return (true); } - +#endif /************************************************************************ ************************************************************************/ @@ -513,6 +518,8 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) /************************************************************************ ************************************************************************/ +#if 0 +//never used void CMovieInfo::printDebugMovieInfo(MI_MOVIE_INFO & movie_info) { TRACE(" FileName: %s", movie_info.file.Name.c_str()); @@ -561,7 +568,7 @@ void CMovieInfo::printDebugMovieInfo(MI_MOVIE_INFO & movie_info) } } } - +#endif /************************************************************************ ************************************************************************/ @@ -604,7 +611,7 @@ int find_next_char(char to_find, char *text, int start_pos, int end_pos) _pos_ += sizeof(_tag_) ;\ int pos_prev = _pos_;\ while(_pos_ < bytes && _text_[_pos_] != '<' ) pos++;\ - _dest_ = atoll(&_text_[pos_prev]);\ + _dest_ = strtoull(&_text_[pos_prev], NULL, 10); /*atoll(&_text_[pos_prev]);*/\ continue;\ } @@ -667,6 +674,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info) GET_XML_DATA_STRING(text, pos, MI_XML_TAG_PRODUCT_COUNTRY, movie_info->productionCountry) GET_XML_DATA_INT(text, pos, MI_XML_TAG_PRODUCT_DATE, movie_info->productionDate) GET_XML_DATA_INT(text, pos, MI_XML_TAG_PARENTAL_LOCKAGE, movie_info->parentalLockAge) + GET_XML_DATA_INT(text, pos, MI_XML_TAG_QUALITIY, movie_info->quality) GET_XML_DATA_INT(text, pos, MI_XML_TAG_QUALITY, movie_info->quality) GET_XML_DATA_INT(text, pos, MI_XML_TAG_DATE_OF_LAST_PLAY, movie_info->dateOfLastPlay) if (strncmp(&text[pos], MI_XML_TAG_AUDIOPIDS, sizeof(MI_XML_TAG_AUDIOPIDS) - 1) == 0) diff --git a/src/gui/movieinfo.h b/src/gui/movieinfo.h index 4fb907407..d90369b63 100644 --- a/src/gui/movieinfo.h +++ b/src/gui/movieinfo.h @@ -86,7 +86,8 @@ #define MI_XML_TAG_LENGTH "length" #define MI_XML_TAG_PRODUCT_COUNTRY "productioncountry" #define MI_XML_TAG_PRODUCT_DATE "productiondate" -#define MI_XML_TAG_QUALITY "qualitiy" +#define MI_XML_TAG_QUALITY "quality" +#define MI_XML_TAG_QUALITIY "qualitiy" // just to keep compatibility to older xml-files #define MI_XML_TAG_PARENTAL_LOCKAGE "parentallockage" #define MI_XML_TAG_BOOKMARK "bookmark" #define MI_XML_TAG_BOOKMARK_START "bookmarkstart" diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index f5decee5e..8658bc770 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -31,26 +31,24 @@ #include #include -#include #include #include -#include #include -#include #include #include #include #ifdef SCREENSHOT #include #endif +#include +#include #include -#include #include #include #include -#include "libtuxtxt/teletext.h" +#include #include #include #include @@ -190,7 +188,7 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) startposition = 0; puts("[movieplayer.cpp] executing " MOVIEPLAYER_START_SCRIPT "."); - if (safe_system(MOVIEPLAYER_START_SCRIPT) != 0) + if (my_system(MOVIEPLAYER_START_SCRIPT) != 0) perror(MOVIEPLAYER_START_SCRIPT " failed"); isMovieBrowser = false; @@ -228,7 +226,7 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) bookmarkmanager->flush(); puts("[movieplayer.cpp] executing " MOVIEPLAYER_END_SCRIPT "."); - if (safe_system(MOVIEPLAYER_END_SCRIPT) != 0) + if (my_system(MOVIEPLAYER_END_SCRIPT) != 0) perror(MOVIEPLAYER_END_SCRIPT " failed"); CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); @@ -315,7 +313,7 @@ bool CMoviePlayerGui::SelectFile() printf("CMoviePlayerGui::SelectFile: isBookmark %d timeshift %d isMovieBrowser %d\n", isBookmark, timeshift, isMovieBrowser); if (has_hdd) - system("(rm /hdd/.wakeup; touch /hdd/.wakeup; sync) > /dev/null 2> /dev/null &"); + wakeup_hdd(g_settings.network_nfs_recordingdir); if (timeshift) { t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); @@ -435,8 +433,11 @@ void CMoviePlayerGui::PlayFile(void) printf("IS FILE PLAYER: %s\n", is_file_player ? "true": "false" ); - if(p_movie_info != NULL) + if(p_movie_info != NULL) { duration = p_movie_info->length * 60 * 1000; + int percent = CZapit::getInstance()->GetPidVolume(p_movie_info->epgId, currentapid, currentac3 == 1); + CZapit::getInstance()->SetVolumePercent(percent); + } file_prozent = 0; if(!playback->Start((char *) full_name.c_str(), vpid, vtype, currentapid, currentac3, duration)) { @@ -804,6 +805,21 @@ void CMoviePlayerGui::selectAudioPid(bool file_player) APIDSelector.addItem(item, defpid); } + if (p_movie_info) { + APIDSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUST)); + + CVolume::getInstance()->SetCurrentChannel(p_movie_info->epgId); + CVolume::getInstance()->SetCurrentPid(currentapid); + int percent[numpida]; + for (uint i=0; i < numpida; i++) { + percent[i] = CZapit::getInstance()->GetPidVolume(p_movie_info->epgId, apids[i], ac3flags[i]); + APIDSelector.addItem(new CMenuOptionNumberChooser(NONEXISTANT_LOCALE, &percent[i], + currentapid == apids[i], + 0, 999, CVolume::getInstance(), 0, 0, NONEXISTANT_LOCALE, + g_RemoteControl->current_PIDs.APIDs[i].desc)); + } + } + APIDSelector.exec(NULL, ""); delete selector; printf("CMoviePlayerGui::selectAudioPid: selected %d (%x) current %x\n", select, (select >= 0) ? apids[select] : -1, currentapid); @@ -996,13 +1012,13 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int position) #define BOOKMARK_START_MENU_MAX_ITEMS 6 CSelectedMenu cSelectedMenuBookStart[BOOKMARK_START_MENU_MAX_ITEMS]; - CMenuWidget bookStartMenu(LOCALE_MOVIEBROWSER_BOOK_NEW, NEUTRINO_ICON_STREAMING); + CMenuWidget bookStartMenu(LOCALE_MOVIEBROWSER_BOOK_ADD, NEUTRINO_ICON_STREAMING); bookStartMenu.addIntroItems(); #if 0 // not supported, TODO bookStartMenu.addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_HEAD, !isMovieBrowser, NULL, &cSelectedMenuBookStart[0])); bookStartMenu.addItem(GenericMenuSeparatorLine); #endif - bookStartMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, isMovieBrowser, NULL, &cSelectedMenuBookStart[1])); + bookStartMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_NEW, isMovieBrowser, NULL, &cSelectedMenuBookStart[1])); bookStartMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE_FORWARD, isMovieBrowser, NULL, &cSelectedMenuBookStart[2])); bookStartMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE_BACKWARD, isMovieBrowser, NULL, &cSelectedMenuBookStart[3])); bookStartMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, isMovieBrowser, NULL, &cSelectedMenuBookStart[4])); diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 2afd1a8b6..1ede8b215 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -34,12 +34,12 @@ #include #include -#include "driver/framebuffer.h" -#include "gui/filebrowser.h" -#include "gui/bookmarkmanager.h" -#include "gui/widget/menue.h" -#include "gui/moviebrowser.h" -#include "gui/movieinfo.h" +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/src/gui/network_service.cpp b/src/gui/network_service.cpp index fd1d68ba9..fafef83ac 100644 --- a/src/gui/network_service.cpp +++ b/src/gui/network_service.cpp @@ -29,12 +29,15 @@ #include #include -#include "gui/network_service.h" -#include "mymenu.h" +#include "network_service.h" +#include #include #include +#include + +#include #define TOUCH_BASE "/var/etc/." @@ -43,16 +46,18 @@ struct network_service std::string name; std::string cmd; std::string options; + neutrino_locale_t hint; + std::string icon; int enabled; }; #define SERVICE_COUNT 4 static struct network_service services[SERVICE_COUNT] = { - { "FTP", "vsftpd", "", 0 }, - { "Telnet", "telnetd", "-l/bin/login", 0 }, - { "DjMount", "djmount", "-o iocharset=utf8 /media/00upnp/", 0 }, - { "uShare", "ushare", "-D", 0 } + { "FTP", "vsftpd", "", LOCALE_MENU_HINT_NET_FTPD, "", 0 }, + { "Telnet", "telnetd", "-l/bin/login", LOCALE_MENU_HINT_NET_TELNET, "", 0 }, + { "DjMount", "djmount", "-o iocharset=utf8 /media/00upnp/", LOCALE_MENU_HINT_NET_DJMOUNT, "", 0 }, + { "uShare", "ushare", "-D", LOCALE_MENU_HINT_NET_USHARE, "", 0 } }; CNetworkService::CNetworkService(std::string cmd, std::string opts) @@ -68,18 +73,17 @@ CNetworkService::CNetworkService(std::string cmd, std::string opts) void CNetworkService::Start() { - std::string cmd = command + " " + options; - printf("CNetworkService::Start: %s\n", cmd.c_str()); - system(cmd.c_str()); + printf("CNetworkService::Start: %s %s\n", command.c_str(), options.c_str()); + my_system( command.c_str(), options.c_str()); enabled = true; TouchFile(); } void CNetworkService::Stop() { - std::string cmd = "killall " + command; - printf("CNetworkService::Stop: %s\n", cmd.c_str()); - system(cmd.c_str()); + const char killall []= "killall"; + printf("CNetworkService::Stop: %s %s\n", killall, command.c_str()); + my_system(killall, command.c_str()); enabled = false; TouchFile(); } @@ -140,10 +144,53 @@ int CNetworkServiceSetup::showNetworkServiceSetup() CNetworkService * items[SERVICE_COUNT]; + //telnetd used inetd + bool useinetd = false; + char *buf=NULL; + size_t len = 0; + + FILE* fd = fopen("/etc/inetd.conf", "r"); + if(fd) + { + while(!feof(fd)) + { + if(getline(&buf, &len, fd)!=-1) + { + if (strstr(buf, "telnetd") != NULL) + { + useinetd = true; + break; + } + } + } + fclose(fd); + if(buf) + free(buf); + } + + //set active when found + bool active; + for(unsigned i = 0; i < SERVICE_COUNT; i++) { items[i] = new CNetworkService(services[i].cmd, services[i].options); services[i].enabled = items[i]->Enabled(); - setup->addItem(new CMenuOptionChooser(services[i].name.c_str(), &services[i].enabled, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, items[i], CRCInput::convertDigitToKey(shortcut++), "")); + + std::string execute1 = "/bin/" + services[i].cmd; + std::string execute2 = "/sbin/" + services[i].cmd; + + active = false; + if ( !(access(execute1.c_str(), F_OK)) || !(access(execute2.c_str(), F_OK)) ) + active = true; + + if ( (services[i].name == "Telnet") && useinetd) + active = false; + + CMenuOptionChooser * mc = new CMenuOptionChooser(services[i].name.c_str(), &services[i].enabled, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, active, items[i], CRCInput::convertDigitToKey(shortcut), ""); + if (active) + shortcut++; + + mc->setHint(services[i].icon, services[i].hint); + setup->addItem(mc); } int res = setup->exec (NULL, ""); diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp index 60bfcc11d..1e77d421e 100644 --- a/src/gui/network_setup.cpp +++ b/src/gui/network_setup.cpp @@ -34,9 +34,9 @@ #include -#include "gui/network_setup.h" -#include "gui/proxyserver_setup.h" -#include "gui/nfs.h" +#include "network_setup.h" +#include +#include #include #include @@ -104,11 +104,11 @@ int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey) { printf("[network setup] doing network test...\n"); #if 0 - testNetworkSettings( networkConfig->address.c_str(), - networkConfig->netmask.c_str(), - networkConfig->broadcast.c_str(), - networkConfig->gateway.c_str(), - networkConfig->nameserver.c_str(), + testNetworkSettings( networkConfig->address.c_str(), + networkConfig->netmask.c_str(), + networkConfig->broadcast.c_str(), + networkConfig->gateway.c_str(), + networkConfig->nameserver.c_str(), networkConfig->inet_static); #endif testNetworkSettings(); @@ -122,10 +122,10 @@ int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey) } else if(actionKey=="restore") { - int result = ShowMsgUTF(LOCALE_MAINSETTINGS_NETWORK, g_Locale->getText(LOCALE_NETWORKMENU_RESET_SETTINGS_NOW), CMessageBox::mbrNo, - CMessageBox::mbYes | - CMessageBox::mbNo , - NEUTRINO_ICON_QUESTION, + int result = ShowMsgUTF(LOCALE_MAINSETTINGS_NETWORK, g_Locale->getText(LOCALE_NETWORKMENU_RESET_SETTINGS_NOW), CMessageBox::mbrNo, + CMessageBox::mbYes | + CMessageBox::mbNo , + NEUTRINO_ICON_QUESTION, width); if (result == CMessageBox::mbrYes) { @@ -136,7 +136,7 @@ int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey) printf("[neutrino] init network setup...\n"); res = showNetworkSetup(); - + return res; } @@ -144,7 +144,7 @@ void CNetworkSetup::readNetworkSettings() { network_automatic_start = networkConfig->automatic_start; network_dhcp = networkConfig->inet_static ? NETWORK_DHCP_OFF : NETWORK_DHCP_ON; - + network_address = networkConfig->address; network_netmask = networkConfig->netmask; network_broadcast = networkConfig->broadcast; @@ -198,6 +198,7 @@ int CNetworkSetup::showNetworkSetup() int ifcount = scandir("/sys/class/net", &namelist, my_filter, alphasort); CMenuOptionStringChooser * ifSelect = new CMenuOptionStringChooser(LOCALE_NETWORKMENU_SELECT_IF, g_settings.ifname, ifcount > 1, this, CRCInput::RC_nokey, "", true); + ifSelect->setHint("", LOCALE_MENU_HINT_NET_IF); bool found = false; @@ -224,6 +225,7 @@ int CNetworkSetup::showNetworkSetup() //apply button CMenuForwarder *m0 = new CMenuForwarder(LOCALE_NETWORKMENU_SETUPNOW, true, NULL, this, "networkapply", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + m0->setHint("", LOCALE_MENU_HINT_NET_SETUPNOW); //eth id CMenuForwarder *mac = new CMenuForwarderNonLocalized("MAC", false, mac_addr); @@ -234,12 +236,13 @@ int CNetworkSetup::showNetworkSetup() CIPInput networkSettings_Broadcast(LOCALE_NETWORKMENU_BROADCAST , network_broadcast , LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2); CIPInput networkSettings_Gateway (LOCALE_NETWORKMENU_GATEWAY , network_gateway , LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2); CIPInput networkSettings_NameServer(LOCALE_NETWORKMENU_NAMESERVER, network_nameserver, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2); - + //hostname CStringInputSMS networkSettings_Hostname(LOCALE_NETWORKMENU_HOSTNAME, &network_hostname, 30, LOCALE_NETWORKMENU_NTPSERVER_HINT1, LOCALE_NETWORKMENU_NTPSERVER_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789-. "); //auto start CMenuOptionChooser* o1 = new CMenuOptionChooser(LOCALE_NETWORKMENU_SETUPONSTARTUP, &network_automatic_start, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + o1->setHint("", LOCALE_MENU_HINT_NET_SETUPONSTARTUP); //dhcp network_dhcp = networkConfig->inet_static ? NETWORK_DHCP_OFF : NETWORK_DHCP_ON; @@ -251,6 +254,13 @@ int CNetworkSetup::showNetworkSetup() CMenuForwarder *m5 = new CMenuForwarder(LOCALE_NETWORKMENU_NAMESERVER, networkConfig->inet_static, network_nameserver, &networkSettings_NameServer); CMenuForwarder *m8 = new CMenuForwarder(LOCALE_NETWORKMENU_HOSTNAME , true , network_hostname , &networkSettings_Hostname ); + m1->setHint("", LOCALE_MENU_HINT_NET_IPADDRESS); + m2->setHint("", LOCALE_MENU_HINT_NET_NETMASK); + m3->setHint("", LOCALE_MENU_HINT_NET_BROADCAST); + m4->setHint("", LOCALE_MENU_HINT_NET_GATEWAY); + m5->setHint("", LOCALE_MENU_HINT_NET_NAMESERVER); + m8->setHint("", LOCALE_MENU_HINT_NET_HOSTNAME); + dhcpDisable[0] = m1; dhcpDisable[1] = m2; dhcpDisable[2] = m3; @@ -258,13 +268,20 @@ int CNetworkSetup::showNetworkSetup() dhcpDisable[4] = m5; CMenuOptionChooser* o2 = new CMenuOptionChooser(LOCALE_NETWORKMENU_DHCP, &network_dhcp, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + o2->setHint("", LOCALE_MENU_HINT_NET_DHCP); //paint menu items networkSettings->addIntroItems(LOCALE_MAINSETTINGS_NETWORK); //intros //------------------------------------------------- networkSettings->addItem( m0 ); //apply - networkSettings->addItem(new CMenuForwarder(LOCALE_NETWORKMENU_TEST, true, NULL, this, "networktest", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); //test - networkSettings->addItem(new CMenuForwarder(LOCALE_NETWORKMENU_SHOW, true, NULL, this, "networkshow", CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP)); //show settings + CMenuForwarder * mf = new CMenuForwarder(LOCALE_NETWORKMENU_TEST, true, NULL, this, "networktest", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_NET_TEST); + networkSettings->addItem(mf); //test + + mf = new CMenuForwarder(LOCALE_NETWORKMENU_SHOW, true, NULL, this, "networkshow", CRCInput::RC_info, NEUTRINO_ICON_BUTTON_INFO); + mf->setHint("", LOCALE_MENU_HINT_NET_SHOW); + networkSettings->addItem(mf); //show settings + networkSettings->addItem(GenericMenuSeparatorLine); //------------------------------------------------ if(ifcount) @@ -300,6 +317,9 @@ int CNetworkSetup::showNetworkSetup() CMenuForwarder *m9 = new CMenuDForwarder(LOCALE_NETWORKMENU_SSID , networkConfig->wireless, network_ssid , networkSettings_ssid ); CMenuForwarder *m10 = new CMenuDForwarder(LOCALE_NETWORKMENU_PASSWORD , networkConfig->wireless, network_key , networkSettings_key ); + m9->setHint("", LOCALE_MENU_HINT_NET_SSID); + m10->setHint("", LOCALE_MENU_HINT_NET_PASS); + wlanEnable[0] = m9; wlanEnable[1] = m10; @@ -311,25 +331,34 @@ int CNetworkSetup::showNetworkSetup() //ntp submenu sectionsdConfigNotifier = new CSectionsdConfigNotifier; CMenuWidget ntp(LOCALE_MAINSETTINGS_NETWORK, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_NETWORKSETUP_NTP); - networkSettings->addItem(new CMenuForwarder(LOCALE_NETWORKMENU_NTPTITLE, true, NULL, &ntp, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + mf = new CMenuForwarder(LOCALE_NETWORKMENU_NTPTITLE, true, NULL, &ntp, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_NET_NTP); + networkSettings->addItem(mf); + showNetworkNTPSetup(&ntp); - + //nfs mount submenu CMenuWidget networkmounts(LOCALE_MAINSETTINGS_NETWORK, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_NETWORKSETUP_MOUNTS); - networkSettings->addItem(new CMenuForwarder(LOCALE_NETWORKMENU_MOUNT, true, NULL, &networkmounts, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + mf = new CMenuForwarder(LOCALE_NETWORKMENU_MOUNT, true, NULL, &networkmounts, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint("", LOCALE_MENU_HINT_NET_MOUNT); + networkSettings->addItem(mf); showNetworkNFSMounts(&networkmounts); //proxyserver submenu CProxySetup proxy(LOCALE_MAINSETTINGS_NETWORK); - networkSettings->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER_SEP, true, NULL, &proxy, NULL, CRCInput::RC_0, NEUTRINO_ICON_BUTTON_0)); + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER_SEP, true, NULL, &proxy, NULL, CRCInput::RC_0, NEUTRINO_ICON_BUTTON_0); + mf->setHint("", LOCALE_MENU_HINT_NET_PROXY); + networkSettings->addItem(mf); //services CNetworkServiceSetup services; - networkSettings->addItem(new CMenuForwarder(LOCALE_NETWORKMENU_SERVICES, true, NULL, &services, NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1)); + mf = new CMenuForwarder(LOCALE_NETWORKMENU_SERVICES, true, NULL, &services, NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1); + mf->setHint("", LOCALE_MENU_HINT_NET_SERVICES); + networkSettings->addItem(mf); int ret = 0; while(true) { - int res = menu_return::RETURN_EXIT; + int res = menu_return::RETURN_EXIT; ret = networkSettings->exec(NULL, ""); if (settingsChanged()) @@ -337,7 +366,7 @@ int CNetworkSetup::showNetworkSetup() if(res == menu_return::RETURN_EXIT) break; } - + delete networkSettings; delete sectionsdConfigNotifier; return ret; @@ -353,7 +382,11 @@ void CNetworkSetup::showNetworkNTPSetup(CMenuWidget *menu_ntp) CMenuOptionChooser *ntp1 = new CMenuOptionChooser(LOCALE_NETWORKMENU_NTPENABLE, &g_settings.network_ntpenable, OPTIONS_NTPENABLE_OPTIONS, OPTIONS_NTPENABLE_OPTION_COUNT, true, sectionsdConfigNotifier); CMenuForwarder *ntp2 = new CMenuDForwarder( LOCALE_NETWORKMENU_NTPSERVER, true , g_settings.network_ntpserver, networkSettings_NtpServer ); CMenuForwarder *ntp3 = new CMenuDForwarder( LOCALE_NETWORKMENU_NTPREFRESH, true , g_settings.network_ntprefresh, networkSettings_NtpRefresh ); - + + ntp1->setHint("", LOCALE_MENU_HINT_NET_NTPENABLE); + ntp2->setHint("", LOCALE_MENU_HINT_NET_NTPSERVER); + ntp3->setHint("", LOCALE_MENU_HINT_NET_NTPREFRESH); + menu_ntp->addIntroItems(LOCALE_NETWORKMENU_NTPTITLE); menu_ntp->addItem( ntp1); menu_ntp->addItem( ntp2); @@ -363,8 +396,12 @@ void CNetworkSetup::showNetworkNTPSetup(CMenuWidget *menu_ntp) void CNetworkSetup::showNetworkNFSMounts(CMenuWidget *menu_nfs) { menu_nfs->addIntroItems(LOCALE_NETWORKMENU_MOUNT); - menu_nfs->addItem(new CMenuDForwarder(LOCALE_NFS_MOUNT , true, NULL, new CNFSMountGui(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - menu_nfs->addItem(new CMenuDForwarder(LOCALE_NFS_UMOUNT, true, NULL, new CNFSUmountGui(), NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + CMenuForwarder * mf = new CMenuDForwarder(LOCALE_NFS_MOUNT , true, NULL, new CNFSMountGui(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_NET_NFS_MOUNT); + menu_nfs->addItem(mf); + mf = new CMenuDForwarder(LOCALE_NFS_UMOUNT, true, NULL, new CNFSUmountGui(), NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_NET_NFS_UMOUNT); + menu_nfs->addItem(mf); } typedef struct n_isettings_t @@ -373,12 +410,12 @@ typedef struct n_isettings_t int network_setting; }n_isettings_struct_t; -//checks settings changes for int settings, returns true on changes +//checks settings changes for int settings, returns true on changes bool CNetworkSetup::checkIntSettings() { - n_isettings_t n_isettings[] = - { - {old_network_automatic_start, network_automatic_start}, + n_isettings_t n_isettings[] = + { + {old_network_automatic_start, network_automatic_start}, {old_network_dhcp, network_dhcp } }; for (uint i = 0; i < (sizeof(n_isettings) / sizeof(n_isettings[0])); i++) @@ -400,8 +437,8 @@ typedef struct n_ssettings_t //checks settings changes for int settings, returns true on changes bool CNetworkSetup::checkStringSettings() -{ - n_ssettings_t n_ssettings[] = +{ + n_ssettings_t n_ssettings[] = { {old_network_address, network_address }, {old_network_netmask, network_netmask }, @@ -426,12 +463,12 @@ bool CNetworkSetup::checkStringSettings() return false; } -//returns true, if any settings were changed +//returns true, if any settings were changed bool CNetworkSetup::settingsChanged() { if (networkConfig->modified_from_orig() || checkStringSettings() || checkIntSettings()) return true; - + return false; } @@ -470,26 +507,26 @@ bool CNetworkSetup::checkForIP() {LOCALE_NETWORKMENU_GATEWAY, network_gateway }, {LOCALE_NETWORKMENU_NAMESERVER, network_nameserver } }; - + if (!network_dhcp) { for (uint i = 0; i < (sizeof(n_settings) / sizeof(n_settings[0])); i++) { if (n_settings[i].network_settings.empty()) //no definied setting - { + { printf("[network setup] empty address %s\n", g_Locale->getText(n_settings[i].addr_name)); - char msg[64]; + char msg[64]; snprintf(msg, 64, g_Locale->getText(LOCALE_NETWORKMENU_ERROR_NO_ADDRESS), g_Locale->getText(n_settings[i].addr_name)); ShowMsgUTF(LOCALE_MAINSETTINGS_NETWORK, msg, CMessageBox::mbrOk, CMessageBox::mbOk, NEUTRINO_ICON_ERROR, width); return false; } } } - + return true; } -//saves settings without apply, reboot is required +//saves settings without apply, reboot is required void CNetworkSetup::saveNetworkSettings() { printf("[network setup] saving current network settings...\n"); @@ -502,13 +539,13 @@ void CNetworkSetup::saveNetworkSettings() void CNetworkSetup::applyNetworkSettings() { printf("[network setup] apply network settings...\n"); - + if (!checkForIP()) return; CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_NETWORKMENU_APPLY_SETTINGS)); // UTF-8 hintBox->paint(); - + networkConfig->stopNetwork(); saveNetworkSettings(); networkConfig->startNetwork(); @@ -523,10 +560,10 @@ void CNetworkSetup::applyNetworkSettings() int CNetworkSetup::saveChangesDialog() { // Save the settings after changes, if user wants to! - int result = ShowMsgUTF(LOCALE_MAINSETTINGS_NETWORK, g_Locale->getText(LOCALE_NETWORKMENU_APPLY_SETTINGS_NOW), CMessageBox::mbrYes, - CMessageBox::mbYes | - CMessageBox::mbNo , - NEUTRINO_ICON_QUESTION, + int result = ShowMsgUTF(LOCALE_MAINSETTINGS_NETWORK, g_Locale->getText(LOCALE_NETWORKMENU_APPLY_SETTINGS_NOW), CMessageBox::mbrYes, + CMessageBox::mbYes | + CMessageBox::mbNo , + NEUTRINO_ICON_QUESTION, width); switch(result) @@ -536,7 +573,7 @@ int CNetworkSetup::saveChangesDialog() return menu_return::RETURN_REPAINT; return exec(NULL, "networkapply"); break; - + case CMessageBox::mbrNo: //no return exec(NULL, "restore"); break; @@ -544,7 +581,7 @@ int CNetworkSetup::saveChangesDialog() return menu_return::RETURN_REPAINT; } -//restores settings +//restores settings void CNetworkSetup::restoreNetworkSettings() { snprintf(g_settings.ifname, sizeof(g_settings.ifname), "%s", old_ifname.c_str()); @@ -672,10 +709,14 @@ void CNetworkSetup::testNetworkSettings() char our_gateway[16]; char our_nameserver[16]; - std::string text, testsite; + std::string text, testsite, offset = " "; - //set default testdomain and wiki-IP - std::string defaultsite = "www.google.de", wiki_IP = "89.31.143.1"; + //set default testdomain + std::string defaultsite = "www.google.de"; + + //set wiki-URL and wiki-IP + std::string wiki_URL = "wiki.neutrino-hd.de"; + std::string wiki_IP = "89.31.143.1"; //get www-domain testsite from /.version CConfigFile config('\t'); @@ -709,7 +750,7 @@ void CNetworkSetup::testNetworkSettings() printf("testNw Broadcast: %s\n", our_broadcast); printf("testNw Gateway: %s\n", our_gateway); printf("testNw Nameserver: %s\n", our_nameserver); - printf("testNw Testsite %s\n", testsite.c_str()); + printf("testNw Testsite: %s\n", testsite.c_str()); if (our_ip[0] == 0) { @@ -717,26 +758,30 @@ void CNetworkSetup::testNetworkSettings() } else { - text = "Box: " + old_mac_addr + "\n "; - text += (std::string)our_ip + " " + (std::string)mypinghost(our_ip); - text += "\n"; - text += g_Locale->getText(LOCALE_NETWORKMENU_GATEWAY); - text += " (Router)\n "; - text += (std::string)our_gateway + " " +(std::string)mypinghost(our_gateway); - text += "\n"; - text += g_Locale->getText(LOCALE_NETWORKMENU_NAMESERVER); - text += "\n "; - text += (std::string)our_nameserver + " " + (std::string)mypinghost(our_nameserver); - text += "\n"; - text += "wiki.neutrino-hd.de:\n "; - text += "via IP (" + wiki_IP + "): " + (std::string)mypinghost(wiki_IP.c_str()); - text += ":\n "; - if (1 == pinghost(our_nameserver)) + //Box + text = "Box (" + old_mac_addr + "):\n"; + text += offset + (std::string)our_ip + " " + (std::string)mypinghost(our_ip) + "\n"; + //Gateway + text += (std::string)g_Locale->getText(LOCALE_NETWORKMENU_GATEWAY) + " (Router):\n"; + text += offset + (std::string)our_gateway + " " + (std::string)mypinghost(our_gateway) + "\n"; + //Nameserver + text += (std::string)g_Locale->getText(LOCALE_NETWORKMENU_NAMESERVER) + ":\n"; + text += offset + (std::string)our_nameserver + " " + (std::string)mypinghost(our_nameserver) + "\n"; + //NTPserver + if ( (pinghost(our_nameserver) == 1) && g_settings.network_ntpenable && (g_settings.network_ntpserver != "") ) { - text += "via DNS: " + (std::string)mypinghost("wiki.neutrino-hd.de"); - text += "\n"; - text += testsite + ":\n "; - text += "via DNS: " + (std::string)mypinghost(testsite.c_str()) + ":\n"; + text += (std::string)g_Locale->getText(LOCALE_NETWORKMENU_NTPSERVER) + ":\n"; + text += offset + g_settings.network_ntpserver + " " + (std::string)mypinghost(g_settings.network_ntpserver.c_str()) + "\n"; + } + //Wiki + text += wiki_URL + ":\n"; + text += offset + "via IP (" + wiki_IP + "): " + (std::string)mypinghost(wiki_IP.c_str()) + "\n"; + if (pinghost(our_nameserver) == 1) + { + text += offset + "via DNS: " + (std::string)mypinghost(wiki_URL.c_str()) + "\n"; + //testsite (or defaultsite) + text += testsite + ":\n"; + text += offset + "via DNS: " + (std::string)mypinghost(testsite.c_str()) + "\n"; } } diff --git a/src/gui/nfs.cpp b/src/gui/nfs.cpp index 79122a775..3117fba73 100644 --- a/src/gui/nfs.cpp +++ b/src/gui/nfs.cpp @@ -51,37 +51,9 @@ #include #include #include - +#include #include -class CNFSMountGuiNotifier : public CChangeObserver -{ -private: - CMenuForwarder *m_opt1,*m_opt2, *m_user, *m_pass; - int *m_type; -public: - CNFSMountGuiNotifier( CMenuForwarder* a3, CMenuForwarder* a4 , int* type) - { - m_user = a3; - m_pass = a4; - m_type = type; - } - bool changeNotify(const neutrino_locale_t /*OptionName*/, void *) - { - if(*m_type == (int)CFSMounter::NFS) - { - m_user->setActive (false); - m_pass->setActive (false); - } - else - { - m_user->setActive (true); - m_pass->setActive (true); - } - return true; - } -}; - CNFSMountGui::CNFSMountGui() { // FIXME #warning move probing from exec() to fsmounter @@ -149,10 +121,17 @@ int CNFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey ) else if(actionKey.substr(0,7)=="domount") { int nr=atoi(actionKey.substr(7,1).c_str()); - CFSMounter::mount(g_settings.network_nfs_ip[nr].c_str(), g_settings.network_nfs_dir[nr], + CFSMounter::MountRes mres = CFSMounter::mount( + g_settings.network_nfs_ip[nr].c_str(), g_settings.network_nfs_dir[nr], g_settings.network_nfs_local_dir[nr], (CFSMounter::FSType) g_settings.network_nfs_type[nr], g_settings.network_nfs_username[nr], g_settings.network_nfs_password[nr], g_settings.network_nfs_mount_options1[nr], g_settings.network_nfs_mount_options2[nr]); + + if (mres == CFSMounter::MRES_OK || mres == CFSMounter::MRES_FS_ALREADY_MOUNTED) + mountMenuEntry[nr]->iconName = NEUTRINO_ICON_MOUNTED; + else + mountMenuEntry[nr]->iconName = NEUTRINO_ICON_NOT_MOUNTED; + // TODO show msg in case of error returnval = menu_return::RETURN_EXIT; } @@ -176,15 +155,16 @@ int CNFSMountGui::menu() { sprintf(s2,"mountentry%d",i); sprintf(ISO_8859_1_entry[i],ZapitTools::UTF8_to_Latin1(m_entry[i]).c_str()); - CMenuForwarderNonLocalized *forwarder = new CMenuForwarderNonLocalized(ISO_8859_1_entry[i], true, NULL, this, s2); + mountMenuEntry[i] = new CMenuForwarderNonLocalized("", true, ISO_8859_1_entry[i], this, s2); + if (CFSMounter::isMounted(g_settings.network_nfs_local_dir[i])) { - forwarder->iconName = NEUTRINO_ICON_MOUNTED; + mountMenuEntry[i]->iconName = NEUTRINO_ICON_MOUNTED; } else { - forwarder->iconName = NEUTRINO_ICON_NOT_MOUNTED; + mountMenuEntry[i]->iconName = NEUTRINO_ICON_NOT_MOUNTED; } - mountMenuW.addItem(forwarder); + mountMenuW.addItem(mountMenuEntry[i]); } int ret=mountMenuW.exec(this,""); return ret; @@ -251,13 +231,16 @@ int CNFSMountGui::menuEntry(int nr) CStringInputSMS options2Input(LOCALE_NFS_MOUNT_OPTIONS, options2, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789-_=.,:|!?/ "); CMenuForwarder *options2_fwd = new CMenuForwarder(LOCALE_NFS_MOUNT_OPTIONS, true, options2, &options2Input); CStringInputSMS userInput(LOCALE_NFS_USERNAME, username, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789-_.,:|!?/ "); - CMenuForwarder *username_fwd = new CMenuForwarder(LOCALE_NFS_USERNAME, (*type==CFSMounter::CIFS || CFSMounter::LUFS), username, &userInput); + CMenuForwarder *username_fwd = new CMenuForwarder(LOCALE_NFS_USERNAME, (*type != (int)CFSMounter::NFS), username, &userInput); CStringInputSMS passInput(LOCALE_NFS_PASSWORD, password, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789-_.,:|!?/ "); - CMenuForwarder *password_fwd = new CMenuForwarder(LOCALE_NFS_PASSWORD, (*type==CFSMounter::CIFS || CFSMounter::LUFS), NULL, &passInput); + CMenuForwarder *password_fwd = new CMenuForwarder(LOCALE_NFS_PASSWORD, (*type != (int)CFSMounter::NFS), NULL, &passInput); CMACInput macInput(LOCALE_RECORDINGMENU_SERVER_MAC, g_settings.network_nfs_mac[nr], LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2); CMenuForwarder * macInput_fwd = new CMenuForwarder(LOCALE_RECORDINGMENU_SERVER_MAC, true, g_settings.network_nfs_mac[nr], &macInput); - - CNFSMountGuiNotifier notifier(username_fwd, password_fwd, type); + CMenuForwarder *mountnow_fwd = new CMenuForwarder(LOCALE_NFS_MOUNTNOW, !(CFSMounter::isMounted(g_settings.network_nfs_local_dir[nr])), NULL, this, cmd); + mountnow_fwd->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); + COnOffNotifier notifier(CFSMounter::NFS); + notifier.addItem(username_fwd); + notifier.addItem(password_fwd); mountMenuEntryW.addItem(new CMenuOptionChooser(LOCALE_NFS_TYPE, type, NFS_TYPE_OPTIONS, NFS_TYPE_OPTION_COUNT, typeEnabled, ¬ifier)); mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_IP , true, g_settings.network_nfs_ip[nr], &ipInput )); @@ -269,7 +252,7 @@ int CNFSMountGui::menuEntry(int nr) mountMenuEntryW.addItem(username_fwd); mountMenuEntryW.addItem(password_fwd); mountMenuEntryW.addItem(macInput_fwd); - mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_MOUNTNOW, true, NULL , this , cmd )); + mountMenuEntryW.addItem(mountnow_fwd); int ret = mountMenuEntryW.exec(this,""); return ret; @@ -333,8 +316,10 @@ int CNFSSmallMenu::exec( CMenuTarget* parent, const std::string & actionKey ) CMenuWidget sm_menu(LOCALE_NFSMENU_HEAD, NEUTRINO_ICON_NETWORK, width); CNFSMountGui mountGui; CNFSUmountGui umountGui; + CMenuForwarder *remount_fwd = new CMenuForwarder(LOCALE_NFS_REMOUNT, true, NULL, this, "remount"); + remount_fwd->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); sm_menu.addIntroItems(); - sm_menu.addItem(new CMenuForwarder(LOCALE_NFS_REMOUNT, true, NULL, this, "remount")); + sm_menu.addItem(remount_fwd); sm_menu.addItem(new CMenuForwarder(LOCALE_NFS_MOUNT , true, NULL, & mountGui)); sm_menu.addItem(new CMenuForwarder(LOCALE_NFS_UMOUNT, true, NULL, &umountGui)); return sm_menu.exec(parent, actionKey); diff --git a/src/gui/nfs.h b/src/gui/nfs.h index ad5e77063..46d4469ae 100644 --- a/src/gui/nfs.h +++ b/src/gui/nfs.h @@ -46,7 +46,9 @@ class CNFSMountGui : public CMenuTarget int menuEntry(int nr); char m_entry[NETWORK_NFS_NR_OF_ENTRIES][200]; - char ISO_8859_1_entry[NETWORK_NFS_NR_OF_ENTRIES][200]; + char ISO_8859_1_entry[NETWORK_NFS_NR_OF_ENTRIES][200]; + + CMenuForwarderNonLocalized* mountMenuEntry[NETWORK_NFS_NR_OF_ENTRIES]; CFSMounter::FS_Support m_nfs_sup; CFSMounter::FS_Support m_cifs_sup; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 292cef7c8..86cf29252 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -33,19 +33,17 @@ #include #endif +#include +#include +#include +#include #include "osd_setup.h" #include "themes.h" #include "screensetup.h" #include "osdlang_setup.h" -#include "themes.h" #include "filebrowser.h" -#include -#include -#include -#include - #include #include #include @@ -56,6 +54,7 @@ #endif #include +#include #include #include "cs_api.h" @@ -77,6 +76,7 @@ COsdSetup::COsdSetup(bool wizard_mode) is_wizard = wizard_mode; width = w_max (40, 10); //% + show_tuner_icon = 0; } COsdSetup::~COsdSetup() @@ -124,22 +124,23 @@ const SNeutrinoSettings::FONT_TYPES gamelist_font_sizes[2] = SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMSMALL }; -const SNeutrinoSettings::FONT_TYPES other_font_sizes[4] = +const SNeutrinoSettings::FONT_TYPES other_font_sizes[5] = { SNeutrinoSettings::FONT_TYPE_MENU_TITLE, SNeutrinoSettings::FONT_TYPE_MENU, SNeutrinoSettings::FONT_TYPE_MENU_INFO, + SNeutrinoSettings::FONT_TYPE_MENU_HINT, SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM }; font_sizes_groups font_sizes_groups[6] = { - {LOCALE_FONTMENU_MENU , 4, other_font_sizes , "fontsize.doth"}, - {LOCALE_FONTMENU_CHANNELLIST, 4, channellist_font_sizes, "fontsize.dcha"}, - {LOCALE_FONTMENU_EVENTLIST , 4, eventlist_font_sizes , "fontsize.deve"}, - {LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg"}, - {LOCALE_FONTMENU_INFOBAR , 4, infobar_font_sizes , "fontsize.dinf"}, - {LOCALE_FONTMENU_GAMELIST , 2, gamelist_font_sizes , "fontsize.dgam"} + {LOCALE_FONTMENU_MENU , 5, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS }, + {LOCALE_FONTMENU_CHANNELLIST, 4, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS }, + {LOCALE_FONTMENU_EVENTLIST , 4, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS }, + {LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS }, + {LOCALE_FONTMENU_INFOBAR , 4, infobar_font_sizes , "fontsize.dinf", LOCALE_MENU_HINT_INFOBAR_FONTS }, + {LOCALE_FONTMENU_GAMELIST , 2, gamelist_font_sizes , "fontsize.dgam", LOCALE_MENU_HINT_GAMELIST_FONTS } }; #define FONT_STYLE_REGULAR 0 @@ -169,7 +170,8 @@ font_sizes_struct neutrino_font[FONT_TYPE_COUNT] = {LOCALE_FONTSIZE_INFOBAR_CHANNAME , 30, FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_INFOBAR_INFO , 20, FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_INFOBAR_SMALL , 14, FONT_STYLE_REGULAR, 1}, - {LOCALE_FONTSIZE_FILEBROWSER_ITEM , 16, FONT_STYLE_BOLD , 1} + {LOCALE_FONTSIZE_FILEBROWSER_ITEM , 16, FONT_STYLE_BOLD , 1}, + {LOCALE_FONTSIZE_MENU_HINT , 16, FONT_STYLE_REGULAR, 0} }; int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) @@ -180,13 +182,13 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) if(parent != NULL) parent->hide(); - if(actionKey == "select_font") + if(actionKey == "select_font") { CFileBrowser fileBrowser; CFileFilter fileFilter; fileFilter.addFilter("ttf"); fileBrowser.Filter = &fileFilter; - if (fileBrowser.exec(FONTDIR) == true) + if (fileBrowser.exec(FONTDIR) == true) { strcpy(g_settings.font_file, fileBrowser.getSelectedFile()->Name.c_str()); printf("[neutrino] new font file %s\n", fileBrowser.getSelectedFile()->Name.c_str()); @@ -194,13 +196,13 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) } return menu_return::RETURN_REPAINT; } - else if(actionKey == "ttx_font") + else if(actionKey == "ttx_font") { CFileBrowser fileBrowser; CFileFilter fileFilter; fileFilter.addFilter("ttf"); fileBrowser.Filter = &fileFilter; - if (fileBrowser.exec(FONTDIR) == true) + if (fileBrowser.exec(FONTDIR) == true) { strcpy(g_settings.ttx_font_file, fileBrowser.getSelectedFile()->Name.c_str()); ttx_font_file = fileBrowser.getSelectedFile()->Name; @@ -396,58 +398,117 @@ int COsdSetup::showOsdSetup() //item menu colors showOsdMenueColorSetup(&osd_menu_colors); - osd_menu->addItem(new CMenuForwarder(LOCALE_COLORMENU_MENUCOLORS, true, NULL, &osd_menu_colors, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_COLORMENU_MENUCOLORS, true, NULL, &osd_menu_colors, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_COLORS); + osd_menu->addItem(mf); //fonts CMenuWidget osd_menu_fonts(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_FONT); showOsdFontSizeSetup(&osd_menu_fonts); - osd_menu->addItem(new CMenuForwarder(LOCALE_FONTMENU_HEAD, true, NULL, &osd_menu_fonts, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuForwarder(LOCALE_FONTMENU_HEAD, true, NULL, &osd_menu_fonts, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_FONTS); + osd_menu->addItem(mf); //timeouts CMenuWidget osd_menu_timing(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_TIMEOUT); showOsdTimeoutSetup(&osd_menu_timing); - osd_menu->addItem(new CMenuForwarder(LOCALE_COLORMENU_TIMING, true, NULL, &osd_menu_timing, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + mf = new CMenuForwarder(LOCALE_COLORMENU_TIMING, true, NULL, &osd_menu_timing, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_TIMEOUTS); + osd_menu->addItem(mf); //screen CScreenSetup screensetup; - osd_menu->addItem(new CMenuForwarder(LOCALE_VIDEOMENU_SCREENSETUP, true, NULL, &screensetup, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + mf = new CMenuForwarder(LOCALE_VIDEOMENU_SCREENSETUP, true, NULL, &screensetup, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint("", LOCALE_MENU_HINT_SCREEN_SETUP); + osd_menu->addItem(mf); //infobar CMenuWidget osd_menu_infobar(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_INFOBAR); showOsdInfobarSetup(&osd_menu_infobar); - osd_menu->addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR, true, NULL, &osd_menu_infobar, NULL, CRCInput::RC_1)); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR, true, NULL, &osd_menu_infobar, NULL, CRCInput::RC_1); + mf->setHint("", LOCALE_MENU_HINT_INFOBAR_SETUP); + osd_menu->addItem(mf); //channellist CMenuWidget osd_menu_chanlist(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_CHANNELLIST); showOsdChanlistSetup(&osd_menu_chanlist); - osd_menu->addItem( new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, &osd_menu_chanlist, NULL, CRCInput::RC_2)); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, &osd_menu_chanlist, NULL, CRCInput::RC_2); + mf->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SETUP); + osd_menu->addItem(mf); #ifdef SCREENSHOT //screenshot CMenuWidget osd_menu_screenshot(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_SCREENSHOT); - showOsdScreenshottSetup(&osd_menu_screenshot); - osd_menu->addItem( new CMenuForwarder(LOCALE_SCREENSHOT_MENU, true, NULL, &osd_menu_screenshot, NULL, CRCInput::RC_3)); + showOsdScreenShotSetup(&osd_menu_screenshot); + mf = new CMenuForwarder(LOCALE_SCREENSHOT_MENU, true, NULL, &osd_menu_screenshot, NULL, CRCInput::RC_3); + mf->setHint("", LOCALE_MENU_HINT_SCREENSHOT_SETUP); + osd_menu->addItem(mf); #endif //monitor - if (cs_get_revision() != 1) /* 1 == Tripledragon */ - osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, this)); - + CMenuOptionChooser *mc; + if (cs_get_revision() != 1) { /* 1 == Tripledragon */ + mc = new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_OSD_PRESET); + osd_menu->addItem(mc); + } osd_menu->addItem(GenericMenuSeparatorLine); - //options - osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &g_settings.rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this)); - osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - osd_menu->addItem(new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true)); - osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true, this)); - osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SHOW_MUTE_ICON, &g_settings.show_mute_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - osd_menu->addItem(new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this)); -#if HAVE_MENU_HINTS + // corners + int rounded_corners = g_settings.rounded_corners; + mc = new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_ROUNDED_CORNERS); + osd_menu->addItem(mc); + + // scrambled + mc = new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCRAMBLED_MESSAGE); + osd_menu->addItem(mc); + + // subchannel menu position + mc = new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS); + osd_menu->addItem(mc); + + // volume position + mc = new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_VOLUME_POS); + osd_menu->addItem(mc); + + // volume digits + mc = new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_DIGITS, &g_settings.volume_digits, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_VOLUME_DIGITS); + osd_menu->addItem(mc); + + // show mute at volume 0 + mc = new CMenuOptionChooser(LOCALE_EXTRA_SHOW_MUTE_ICON, &g_settings.show_mute_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SHOW_MUTE_ICON); + osd_menu->addItem(mc); + + // menu position + mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_MENU_POS); + osd_menu->addItem(mc); + + // menu hints int show_hints = g_settings.show_menu_hints; - osd_menu->addItem(new CMenuOptionChooser(LOCALE_SETTINGS_MENU_HINTS, &show_hints, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this)); -#endif - osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true )); - osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_BIGWINDOWS, &g_settings.big_windows, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - osd_menu->addItem(new CMenuOptionChooser(LOCALE_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_HINTS, &show_hints, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_MENU_HINTS); + osd_menu->addItem(mc); + + // fade windows + mc = new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ); + mc->setHint("", LOCALE_MENU_HINT_FADE); + osd_menu->addItem(mc); + + // big windows + mc = new CMenuOptionChooser(LOCALE_EXTRA_BIGWINDOWS, &g_settings.big_windows, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_BIGWINDOWS); + osd_menu->addItem(mc); + + // color progress bar + mc = new CMenuOptionChooser(LOCALE_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_COLOR); + osd_menu->addItem(mc); int res = osd_menu->exec(NULL, ""); @@ -460,7 +521,9 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors) { menu_colors->addIntroItems(LOCALE_COLORMENU_MENUCOLORS); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_THEMESELECT, true, NULL, new CThemes(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED) ); + CMenuForwarder * mf = new CMenuDForwarder(LOCALE_COLORMENU_THEMESELECT, true, NULL, new CThemes(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_THEME); + menu_colors->addItem(mf); CColorChooser* chHeadcolor = new CColorChooser(LOCALE_COLORMENU_BACKGROUND, &g_settings.menu_Head_red, &g_settings.menu_Head_green, &g_settings.menu_Head_blue, &g_settings.menu_Head_alpha, colorSetupNotifier); @@ -478,33 +541,65 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors) &g_settings.menu_Content_inactive_alpha, colorSetupNotifier); CColorChooser* chContentInactiveTextcolor = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &g_settings.menu_Content_inactive_Text_red, &g_settings.menu_Content_inactive_Text_green, &g_settings.menu_Content_inactive_Text_blue, NULL, colorSetupNotifier); - menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUHEAD)); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chHeadcolor )); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chHeadTextcolor )); - menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT)); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentcolor )); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentTextcolor )); - menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT_INACTIVE)); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentInactivecolor )); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentInactiveTextcolor)); - menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT_SELECTED)); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentSelectedcolor )); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentSelectedTextcolor )); - CColorChooser* chInfobarcolor = new CColorChooser(LOCALE_COLORMENU_BACKGROUND, &g_settings.infobar_red, + menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUHEAD)); + + mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chHeadcolor ); + mf->setHint("", LOCALE_MENU_HINT_HEAD_BACK); + menu_colors->addItem(mf); + + mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chHeadTextcolor ); + mf->setHint("", LOCALE_MENU_HINT_HEAD_TEXTCOLOR); + menu_colors->addItem(mf); + + menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT)); + mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentcolor ); + mf->setHint("", LOCALE_MENU_HINT_CONTENT_BACK); + menu_colors->addItem(mf); + + mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentTextcolor ); + mf->setHint("", LOCALE_MENU_HINT_CONTENT_TEXTCOLOR); + menu_colors->addItem(mf); + + menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT_INACTIVE)); + mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentInactivecolor ); + mf->setHint("", LOCALE_MENU_HINT_INACTIVE_BACK); + menu_colors->addItem(mf); + + mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentInactiveTextcolor); + mf->setHint("", LOCALE_MENU_HINT_INACTIVE_TEXTCOLOR); + menu_colors->addItem(mf); + + menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT_SELECTED)); + mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentSelectedcolor ); + mf->setHint("", LOCALE_MENU_HINT_SELECTED_BACK); + menu_colors->addItem(mf); + + mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentSelectedTextcolor ); + mf->setHint("", LOCALE_MENU_HINT_SELECTED_TEXT); + menu_colors->addItem(mf); + + CColorChooser* chInfobarcolor = new CColorChooser(LOCALE_COLORMENU_BACKGROUND, &g_settings.infobar_red, &g_settings.infobar_green, &g_settings.infobar_blue, &g_settings.infobar_alpha, colorSetupNotifier); - CColorChooser* chInfobarTextcolor = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &g_settings.infobar_Text_red, + CColorChooser* chInfobarTextcolor = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &g_settings.infobar_Text_red, &g_settings.infobar_Text_green, &g_settings.infobar_Text_blue, NULL, colorSetupNotifier); menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORSTATUSBAR_TEXT)); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chInfobarcolor )); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chInfobarTextcolor )); + mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chInfobarcolor ); + mf->setHint("", LOCALE_MENU_HINT_INFOBAR_BACK); + menu_colors->addItem(mf); + + mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chInfobarTextcolor ); + mf->setHint("", LOCALE_MENU_HINT_INFOBAR_TEXTCOLOR); + menu_colors->addItem(mf); CColorChooser* chColored_Events = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &g_settings.colored_events_red, &g_settings.colored_events_green, &g_settings.colored_events_blue, NULL, colorSetupNotifier); menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MISCSETTINGS_INFOBAR_COLORED_EVENTS)); - menu_colors->addItem( new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chColored_Events )); + mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chColored_Events ); + mf->setHint("", LOCALE_MENU_HINT_EVENT_TEXTCOLOR); + menu_colors->addItem(mf); } /* for font size setup */ @@ -556,19 +651,34 @@ void COsdSetup::AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSe void COsdSetup::showOsdFontSizeSetup(CMenuWidget *menu_fonts) { CMenuWidget *fontSettings = menu_fonts; + CMenuForwarder * mf; fontSettings->addIntroItems(LOCALE_FONTMENU_HEAD); - fontSettings->addItem( new CMenuForwarder(LOCALE_COLORMENU_FONT, true, NULL, this, "select_font", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - fontSettings->addItem( new CMenuForwarder(LOCALE_COLORMENU_FONT_TTX, true, NULL, this, "ttx_font", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); - fontSettings->addItem( new CMenuOptionChooser(LOCALE_COLORMENU_CONTRAST_FONTS, &g_settings.contrast_fonts, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + // select gui font file + mf = new CMenuForwarder(LOCALE_COLORMENU_FONT, true, NULL, this, "select_font", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_FONT_GUI); + fontSettings->addItem(mf); + + // select teletext font file + mf = new CMenuForwarder(LOCALE_COLORMENU_FONT_TTX, true, NULL, this, "ttx_font", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_FONT_TTX); + fontSettings->addItem(mf); + + // contrast fonts + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_COLORMENU_CONTRAST_FONTS, &g_settings.contrast_fonts, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mc->setHint("", LOCALE_MENU_HINT_CONTRAST_FONTS); + fontSettings->addItem(mc); fontSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_FONTMENU_SIZES)); //submenu font scaling - fontSettings->addItem(new CMenuForwarder(LOCALE_FONTMENU_SCALING, true, NULL, this, "font_scaling", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + mf = new CMenuForwarder(LOCALE_FONTMENU_SCALING, true, NULL, this, "font_scaling", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint("", LOCALE_MENU_HINT_FONT_SCALING); + fontSettings->addItem(mf); + //fontSettings->addItem( new CMenuForwarder(LOCALE_EPGPLUS_SELECT_FONT_NAME, true, NULL, this, "select_font")); - + mn_widget_id_t w_index = MN_WIDGET_ID_OSDSETUP_FONTSIZE_MENU; for (int i = 0; i < 6; i++) { @@ -583,7 +693,9 @@ void COsdSetup::showOsdFontSizeSetup(CMenuWidget *menu_fonts) fontSettingsSubMenu->addItem(GenericMenuSeparatorLine); fontSettingsSubMenu->addItem(new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, font_sizes_groups[i].actionkey)); - fontSettings->addItem(new CMenuDForwarder(font_sizes_groups[i].groupname, true, NULL, fontSettingsSubMenu, "", CRCInput::convertDigitToKey(i+1))); + mf = new CMenuDForwarder(font_sizes_groups[i].groupname, true, NULL, fontSettingsSubMenu, "", CRCInput::convertDigitToKey(i+1)); + mf->setHint("", font_sizes_groups[i].hint); + fontSettings->addItem(mf); w_index++; } } @@ -620,28 +732,98 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) { menu_infobar->addIntroItems(LOCALE_MISCSETTINGS_INFOBAR); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY, &g_settings.casystem_display, INFOBAR_CASYSTEM_MODE_OPTIONS, INFOBAR_CASYSTEM_MODE_OPTION_COUNT, true, this)); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG, &g_settings.infobar_show_channellogo, LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS, LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT, true)); - menu_infobar->addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR_LOGO_HDD_DIR, true, g_settings.logo_hdd_dir, this, "logo_dir")); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY, &g_settings.infobar_sat_display, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_SYSFS_HDD, &g_settings.infobar_show_sysfs_hdd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES, &g_settings.infobar_show_res, INFOBAR_SHOW_RES_MODE_OPTIONS, INFOBAR_SHOW_RES_MODE_OPTION_COUNT, true)); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_DD_AVAILABLE, &g_settings.infobar_show_dd_available, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER, &g_settings.infobar_show_tuner, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW, &g_settings.infobar_show, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_COLORED_EVENTS, &g_settings.colored_events_infobar, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true)); - menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_RADIOTEXT, &g_settings.radiotext_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this)); + CMenuOptionChooser * mc; + + // CA system + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY, &g_settings.casystem_display, INFOBAR_CASYSTEM_MODE_OPTIONS, INFOBAR_CASYSTEM_MODE_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_CASYS); + menu_infobar->addItem(mc); + + // logo + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG, &g_settings.infobar_show_channellogo, LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS, LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_LOGO); + menu_infobar->addItem(mc); + + // logo directory + CMenuForwarder * mf = new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR_LOGO_HDD_DIR, true, g_settings.logo_hdd_dir, this, "logo_dir"); + mf->setHint("", LOCALE_MENU_HINT_INFOBAR_LOGO_DIR); + menu_infobar->addItem(mf); + + // satellite + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY, &g_settings.infobar_sat_display, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_SAT); + menu_infobar->addItem(mc); + + // flash/hdd progress + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_SYSFS_HDD, &g_settings.infobar_show_sysfs_hdd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_FILESYS); + menu_infobar->addItem(mc); + + // resolution + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES, &g_settings.infobar_show_res, INFOBAR_SHOW_RES_MODE_OPTIONS, INFOBAR_SHOW_RES_MODE_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_RES); + menu_infobar->addItem(mc); + + // DD icon + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_DD_AVAILABLE, &g_settings.infobar_show_dd_available, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_DD); + menu_infobar->addItem(mc); + + // tuner icon + bool mc_active = false; + show_tuner_icon = 0; + // show possible option if we in single box mode, but don't touch the real settings + int *p_show_tuner_icon = &show_tuner_icon; + if (CFEManager::getInstance()->getMode() != CFEManager::FE_MODE_SINGLE){ + mc_active = true; + // use the real value of g_settings.infobar_show_tuner + p_show_tuner_icon = &g_settings.infobar_show_tuner; + } + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER, p_show_tuner_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, mc_active); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_TUNER); + menu_infobar->addItem(mc); + + // show on epg change + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW, &g_settings.infobar_show, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_ON_EPG); + menu_infobar->addItem(mc); + + // colored event + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_COLORED_EVENTS, &g_settings.colored_events_infobar, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_COLORED_EVENT); + menu_infobar->addItem(mc); + + // radiotext + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_RADIOTEXT, &g_settings.radiotext_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_RADIOTEXT); + menu_infobar->addItem(mc); } //channellist void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist) { - menu_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST); + CMenuOptionChooser * mc; - menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_EPGTEXT_ALIGN, &g_settings.channellist_epgtext_align_right, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS_COUNT, true)); - menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_FOOT, &g_settings.channellist_foot, CHANNELLIST_FOOT_OPTIONS, CHANNELLIST_FOOT_OPTIONS_COUNT, true)); - menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_COLORED_EVENTS, &g_settings.colored_events_channellist, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true)); + menu_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST); + // epg align + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_EPGTEXT_ALIGN, &g_settings.channellist_epgtext_align_right, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EPG_ALIGN); + menu_chanlist->addItem(mc); + + // extended channel list + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EXTENDED); + menu_chanlist->addItem(mc); + + // foot + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_FOOT, &g_settings.channellist_foot, CHANNELLIST_FOOT_OPTIONS, CHANNELLIST_FOOT_OPTIONS_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_FOOT); + menu_chanlist->addItem(mc); + + // colored event + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_COLORED_EVENTS, &g_settings.colored_events_channellist, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_COLORED); + menu_chanlist->addItem(mc); } bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) @@ -652,14 +834,12 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) osd_menu->hide(); return true; } -#if HAVE_MENU_HINTS else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_HINTS)) { /* change option after hide, to let hide clear hint */ osd_menu->hide(); g_settings.show_menu_hints = * (int*) data; return true; } -#endif else if((ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY)) || (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER))) { if (g_InfoViewer == NULL) @@ -682,7 +862,13 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) return true; } else if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_POS)) || - (ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_ROUNDED_CORNERS))) { + (ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_DIGITS))){ + CVolume::getInstance()->Init(); + return false; + } + else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_ROUNDED_CORNERS)) { + osd_menu->hide(); + g_settings.rounded_corners = * (int*) data; CVolume::getInstance()->Init(); return true; } @@ -708,24 +894,22 @@ int COsdSetup::showContextChanlistMenu() CMenuWidget * menu_chanlist = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width); menu_chanlist->enableSaveScreen(true); + menu_chanlist->enableFade(false); menu_chanlist->setSelected(cselected); - menu_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST); + menu_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_EPGTEXT_ALIGN, &g_settings.channellist_epgtext_align_right, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS_COUNT, true)); menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_FOOT, &g_settings.channellist_foot, CHANNELLIST_FOOT_OPTIONS, CHANNELLIST_FOOT_OPTIONS_COUNT, true)); menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_COLORED_EVENTS, &g_settings.colored_events_channellist, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true)); - /* TODO ? problems: - * 1. channel list not re-calc sizes after menu; - * 2. font menu smaller and make hole in channel list */ -#if 1 CMenuWidget *fontSettingsSubMenu = new CMenuWidget(LOCALE_FONTMENU_HEAD, NEUTRINO_ICON_KEYBINDING); fontSettingsSubMenu->enableSaveScreen(true); + fontSettingsSubMenu->enableFade(false); int i = 1; - fontSettingsSubMenu->addIntroItems(font_sizes_groups[i].groupname); + fontSettingsSubMenu->addIntroItems(font_sizes_groups[i].groupname, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); for (unsigned int j = 0; j < font_sizes_groups[i].count; j++) { @@ -734,7 +918,6 @@ int COsdSetup::showContextChanlistMenu() fontSettingsSubMenu->addItem(GenericMenuSeparatorLine); fontSettingsSubMenu->addItem(new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, font_sizes_groups[i].actionkey)); menu_chanlist->addItem(new CMenuDForwarder(LOCALE_FONTMENU_HEAD, true, NULL, fontSettingsSubMenu, "", CRCInput::convertDigitToKey(0))); -#endif int res = menu_chanlist->exec(NULL, ""); cselected = menu_chanlist->getSelected(); @@ -758,19 +941,38 @@ const CMenuOptionChooser::keyval SCREENSHOT_OPTIONS[SCREENSHOT_OPTION_COUNT] = { 1, LOCALE_SCREENSHOT_OSD } }; -void COsdSetup::showOsdScreenshottSetup(CMenuWidget *menu_screenshot) +void COsdSetup::showOsdScreenShotSetup(CMenuWidget *menu_screenshot) { menu_screenshot->addIntroItems(LOCALE_SCREENSHOT_MENU); if((uint)g_settings.key_screenshot == CRCInput::RC_nokey) menu_screenshot->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCREENSHOT_INFO)); - menu_screenshot->addItem(new CMenuOptionNumberChooser(LOCALE_SCREENSHOT_COUNT, &g_settings.screenshot_count, true, 1, 5, NULL)); - menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_FORMAT, &g_settings.screenshot_format, SCREENSHOT_FMT_OPTIONS, SCREENSHOT_FMT_OPTION_COUNT, true)); - menu_screenshot->addItem(new CMenuForwarder(LOCALE_SCREENSHOT_DEFDIR, true, g_settings.screenshot_dir, this, "screenshot_dir")); - menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_RES, &g_settings.screenshot_mode, SCREENSHOT_OPTIONS, SCREENSHOT_OPTION_COUNT, true)); - menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_VIDEO, &g_settings.screenshot_video, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_SCALE, &g_settings.screenshot_scale, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_COVER, &g_settings.screenshot_cover, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_SCREENSHOT_COUNT, &g_settings.screenshot_count, true, 1, 5, NULL); + nc->setHint("", LOCALE_MENU_HINT_SCREENSHOT_COUNT); + menu_screenshot->addItem(nc); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_SCREENSHOT_FORMAT, &g_settings.screenshot_format, SCREENSHOT_FMT_OPTIONS, SCREENSHOT_FMT_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCREENSHOT_FORMAT); + menu_screenshot->addItem(mc); + + CMenuForwarder * mf = new CMenuForwarder(LOCALE_SCREENSHOT_DEFDIR, true, g_settings.screenshot_dir, this, "screenshot_dir"); + mf->setHint("", LOCALE_MENU_HINT_SCREENSHOT_DIR); + menu_screenshot->addItem(mf); + + mc = new CMenuOptionChooser(LOCALE_SCREENSHOT_RES, &g_settings.screenshot_mode, SCREENSHOT_OPTIONS, SCREENSHOT_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCREENSHOT_RES); + menu_screenshot->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_SCREENSHOT_VIDEO, &g_settings.screenshot_video, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCREENSHOT_VIDEO); + menu_screenshot->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_SCREENSHOT_SCALE, &g_settings.screenshot_scale, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCREENSHOT_SCALE); + menu_screenshot->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_SCREENSHOT_COVER, &g_settings.screenshot_cover, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCREENSHOT_COVER); + menu_screenshot->addItem(mc); } #endif diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index 7690f41c9..e62f6f793 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -49,6 +49,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver int width; bool is_wizard; + int show_tuner_icon; int showOsdSetup(); void showOsdMenueColorSetup(CMenuWidget *menu_colors); @@ -56,7 +57,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver void showOsdTimeoutSetup(CMenuWidget *menu_timeout); void showOsdInfobarSetup(CMenuWidget *menu_infobar); void showOsdChanlistSetup(CMenuWidget *menu_chanlist); - void showOsdScreenshottSetup(CMenuWidget *menu_screenshot); + void showOsdScreenShotSetup(CMenuWidget *menu_screenshot); void AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSettings::FONT_TYPES number_of_fontsize_entry); @@ -89,15 +90,4 @@ class COsdSetup : public CMenuTarget, public CChangeObserver int showContextChanlistMenu(); }; - -class COsdSetupChannelLogoNotifier : public CChangeObserver -{ - private: - CMenuForwarder* toDisable1; - CMenuOptionChooser* toDisable2; - public: - COsdSetupChannelLogoNotifier( CMenuForwarder*, CMenuOptionChooser* ); - bool changeNotify(const neutrino_locale_t, void * Data); -}; - #endif diff --git a/src/gui/osdlang_setup.cpp b/src/gui/osdlang_setup.cpp index 9346eeb8a..65f01eae6 100644 --- a/src/gui/osdlang_setup.cpp +++ b/src/gui/osdlang_setup.cpp @@ -51,13 +51,14 @@ #include #include +#include COsdLangSetup::COsdLangSetup(bool wizard_mode) { is_wizard = wizard_mode; - + width = w_max (45, 10); } @@ -73,8 +74,8 @@ int COsdLangSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/) parent->hide(); int res = showLocalSetup(); - - return res; + + return res; } //show international settings menu @@ -83,28 +84,34 @@ int COsdLangSetup::showLocalSetup() //main local setup CMenuWidget *localSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP); localSettings->setWizardMode(is_wizard); - + //add subhead and back button localSettings->addIntroItems(LOCALE_LANGUAGESETUP_HEAD); - + //language setup CMenuWidget osdl_setup(LOCALE_LANGUAGESETUP_OSD, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP_LOCALE); showLanguageSetup(&osdl_setup); - localSettings->addItem(new CMenuForwarder(LOCALE_LANGUAGESETUP_OSD, true, NULL, &osdl_setup, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - + + CMenuForwarder * mf = new CMenuForwarder(LOCALE_LANGUAGESETUP_OSD, true, NULL, &osdl_setup, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_OSD_LANGUAGE); + localSettings->addItem(mf); + //timezone setup CMenuOptionStringChooser* tzSelect = getTzItems(); if (tzSelect != NULL) localSettings->addItem(tzSelect); - + //prefered audio language CLangSelectNotifier *langNotifier = new CLangSelectNotifier(); CMenuWidget prefMenu(LOCALE_AUDIOMENU_PREF_LANGUAGES, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP_PREFAUDIO_LANGUAGE); //call menue for prefered audio languages showPrefMenu(&prefMenu, langNotifier); - localSettings->addItem(new CMenuForwarder(LOCALE_AUDIOMENU_PREF_LANGUAGES, true, NULL, &prefMenu, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + + mf = new CMenuForwarder(LOCALE_AUDIOMENU_PREF_LANGUAGES, true, NULL, &prefMenu, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_LANG_PREF); + localSettings->addItem(mf); //langNotifier->changeNotify(NONEXISTANT_LOCALE, NULL); - + int res = localSettings->exec(NULL, ""); delete localSettings; delete langNotifier; @@ -118,15 +125,16 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems() xmlDocPtr parser = parseXmlFile("/etc/timezone.xml"); CMenuOptionStringChooser* tzSelect = NULL; - if (parser != NULL) + if (parser != NULL) { tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, g_settings.timezone, true, new CTZChangeNotifier(), CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true); + tzSelect->setHint("", LOCALE_MENU_HINT_TIMEZONE); xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode; bool found = false; - - while (search) + + while (search) { - if (!strcmp(xmlGetName(search), "zone")) + if (!strcmp(xmlGetName(search), "zone")) { std::string name = xmlGetAttribute(search, "name"); std::string zone = xmlGetAttribute(search, "zone"); @@ -141,16 +149,16 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems() } search = search->xmlNextNode; } - + if (!found) - { + { delete tzSelect; tzSelect = NULL; } - + xmlFreeDoc(parser); } - + return tzSelect; } @@ -162,23 +170,23 @@ void COsdLangSetup::showLanguageSetup(CMenuWidget *osdl_setup) int n; // printf("scanning locale dir now....(perhaps)\n"); char *pfad[] = {(char *) DATADIR "/neutrino/locale",(char *) "/var/tuxbox/config/locale"}; - + osdl_setup->addIntroItems(); - for (int p = 0; p < 2; p++) + for (int p = 0; p < 2; p++) { n = scandir(pfad[p], &namelist, 0, alphasort); - if (n < 0) + if (n < 0) { perror("loading locales: scandir"); - } - else + } + else { - for (int count=0; countd_name; char * pos = strstr(locale, ".locale"); - if (pos != NULL) + if (pos != NULL) { *pos = '\0'; CMenuOptionLanguageChooser* oj = new CMenuOptionLanguageChooser((char*)locale, this, locale); @@ -198,27 +206,33 @@ void COsdLangSetup::showPrefMenu(CMenuWidget *prefMenu, CLangSelectNotifier *lan prefMenu->addItem(GenericMenuBack); prefMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_PREF_LANG_HEAD)); - prefMenu->addItem(new CMenuOptionChooser(LOCALE_AUDIOMENU_AUTO_LANG, &g_settings.auto_lang, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL)); - - for(int i = 0; i < 3; i++) + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_AUDIOMENU_AUTO_LANG, &g_settings.auto_lang, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL); + mc->setHint("", LOCALE_MENU_HINT_AUTO_LANG); + prefMenu->addItem(mc); + + for(int i = 0; i < 3; i++) { CMenuOptionStringChooser * langSelect = new CMenuOptionStringChooser(LOCALE_AUDIOMENU_PREF_LANG, g_settings.pref_lang[i], true, langNotifier, CRCInput::convertDigitToKey(i+1), "", true); + langSelect->setHint("", LOCALE_MENU_HINT_PREF_LANG); langSelect->addOption("none"); std::map::const_iterator it; - for(it = iso639rev.begin(); it != iso639rev.end(); ++it) + for(it = iso639rev.begin(); it != iso639rev.end(); ++it) langSelect->addOption(it->first.c_str()); prefMenu->addItem(langSelect); } prefMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_PREF_SUBS_HEAD)); - prefMenu->addItem(new CMenuOptionChooser(LOCALE_AUDIOMENU_AUTO_SUBS, &g_settings.auto_subs, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL)); - for(int i = 0; i < 3; i++) + mc = new CMenuOptionChooser(LOCALE_AUDIOMENU_AUTO_SUBS, &g_settings.auto_subs, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL); + mc->setHint("", LOCALE_MENU_HINT_AUTO_SUBS); + prefMenu->addItem(mc); + for(int i = 0; i < 3; i++) { CMenuOptionStringChooser * langSelect = new CMenuOptionStringChooser(LOCALE_AUDIOMENU_PREF_SUBS, g_settings.pref_subs[i], true, NULL, CRCInput::convertDigitToKey(i+4), "", true); + langSelect->setHint("", LOCALE_MENU_HINT_PREF_SUBS); std::map::const_iterator it; langSelect->addOption("none"); - for(it = iso639rev.begin(); it != iso639rev.end(); ++it) + for(it = iso639rev.begin(); it != iso639rev.end(); ++it) langSelect->addOption(it->first.c_str()); prefMenu->addItem(langSelect); @@ -233,8 +247,6 @@ bool COsdLangSetup::changeNotify(const neutrino_locale_t, void *) return true; } -void sectionsd_set_languages(const std::vector& newLanguages); - bool CLangSelectNotifier::changeNotify(const neutrino_locale_t, void *) { std::vector v_languages; @@ -242,16 +254,16 @@ bool CLangSelectNotifier::changeNotify(const neutrino_locale_t, void *) std::map::const_iterator it; //prefered audio languages - for(int i = 0; i < 3; i++) + for(int i = 0; i < 3; i++) { - if(strlen(g_settings.pref_lang[i]) && strcmp(g_settings.pref_lang[i], "none")) + if(strlen(g_settings.pref_lang[i]) && strcmp(g_settings.pref_lang[i], "none")) { printf("setLanguages: %d: %s\n", i, g_settings.pref_lang[i]); - + std::string temp(g_settings.pref_lang[i]); - for(it = iso639.begin(); it != iso639.end(); ++it) + for(it = iso639.begin(); it != iso639.end(); ++it) { - if(temp == it->second) + if(temp == it->second) { v_languages.push_back(it->first); printf("setLanguages: adding %s\n", it->first.c_str()); @@ -260,8 +272,7 @@ bool CLangSelectNotifier::changeNotify(const neutrino_locale_t, void *) } } } - //if(found) - sectionsd_set_languages(v_languages); - + CEitManager::getInstance()->setLanguages(v_languages); + return false; } diff --git a/src/gui/parentallock_setup.cpp b/src/gui/parentallock_setup.cpp index e3e637714..5260fbd97 100644 --- a/src/gui/parentallock_setup.cpp +++ b/src/gui/parentallock_setup.cpp @@ -23,8 +23,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ @@ -33,7 +34,7 @@ #endif -#include "gui/parentallock_setup.h" +#include "parentallock_setup.h" #include #include @@ -56,10 +57,10 @@ int CParentalSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/) if (parent) parent->hide(); - + if (check()) showParentalSetup(); - + return res; } @@ -107,14 +108,21 @@ void CParentalSetup::showParentalSetup() // intros plock->addIntroItems(); - plock->addItem(new CMenuOptionChooser(LOCALE_PARENTALLOCK_PROMPT , &g_settings.parentallock_prompt , PARENTALLOCK_PROMPT_OPTIONS, PARENTALLOCK_PROMPT_OPTION_COUNT , !parentallocked)); + CMenuOptionChooser * mc; + mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_PROMPT , &g_settings.parentallock_prompt , PARENTALLOCK_PROMPT_OPTIONS, PARENTALLOCK_PROMPT_OPTION_COUNT , !parentallocked); + mc->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_PROMPT); + plock->addItem(mc); - plock->addItem(new CMenuOptionChooser(LOCALE_PARENTALLOCK_LOCKAGE, &g_settings.parentallock_lockage, PARENTALLOCK_LOCKAGE_OPTIONS, PARENTALLOCK_LOCKAGE_OPTION_COUNT, !parentallocked)); + mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_LOCKAGE, &g_settings.parentallock_lockage, PARENTALLOCK_LOCKAGE_OPTIONS, PARENTALLOCK_LOCKAGE_OPTION_COUNT, !parentallocked); + mc->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_LOCKAGE); + plock->addItem(mc); plock->addItem(new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked)); CPINChangeWidget pinChangeWidget(LOCALE_PARENTALLOCK_CHANGEPIN, g_settings.parentallock_pincode, 4, LOCALE_PARENTALLOCK_CHANGEPIN_HINT1); - plock->addItem( new CMenuForwarder(LOCALE_PARENTALLOCK_CHANGEPIN, true, g_settings.parentallock_pincode, &pinChangeWidget)); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_PARENTALLOCK_CHANGEPIN, true, g_settings.parentallock_pincode, &pinChangeWidget); + mf->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_CHANGEPIN); + plock->addItem(mf); plock->exec(NULL, ""); delete plock; diff --git a/src/gui/parentallock_setup.h b/src/gui/parentallock_setup.h index b2043f863..fde2310ed 100644 --- a/src/gui/parentallock_setup.h +++ b/src/gui/parentallock_setup.h @@ -23,8 +23,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index 293deda61..2b089178a 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -577,7 +577,7 @@ bool CPersonalizeGui::changeNotify(const neutrino_locale_t locale, void *data) } } } - return true; + return false; } //shows a short help message @@ -807,7 +807,8 @@ void CPersonalizeGui::addPersonalizedItems() //convert item to locked forwarder and use generated pin mode for usage as ask parameter v_item[i].menuItem = new CLockedMenuForwarder(fw->getTextLocale(), g_settings.personalize_pincode, use_pin, fw->active, NULL, fw->getTarget(), fw->getActionKey().c_str(), d_key, fw->iconName.c_str(), lock_icon); - + v_item[i].menuItem->hintIcon = fw->hintIcon; + v_item[i].menuItem->hint = fw->hint; //add item if it's set to visible or pin protected and allow to add an forwarder as next if (v_item[i].menuItem->active && (p_mode != PERSONALIZE_MODE_NOTVISIBLE || i_mode == PERSONALIZE_SHOW_AS_ACCESS_OPTION)) { @@ -911,7 +912,7 @@ bool CUserMenuNotifier::changeNotify(const neutrino_locale_t, void *) toDisable[0]->setActive(g_settings.personalize[SNeutrinoSettings::P_MAIN_RED_BUTTON]); toDisable[1]->setActive(g_settings.personalize[SNeutrinoSettings::P_MAIN_BLUE_BUTTON]); - return true; + return false; } //helper class to enable/disable pin setup diff --git a/src/gui/personalize.h b/src/gui/personalize.h index 3c9c8a242..c9c7b4c2e 100644 --- a/src/gui/personalize.h +++ b/src/gui/personalize.h @@ -52,8 +52,8 @@ #define __personalize__ #include -#include "gui/plugins.h" -#include "gui/user_menue_setup.h" +#include +#include #include "widget/stringinput.h" #include "widget/stringinput_ext.h" #include diff --git a/src/gui/pictureviewer.h b/src/gui/pictureviewer.h index dda45557e..2a72c7728 100644 --- a/src/gui/pictureviewer.h +++ b/src/gui/pictureviewer.h @@ -33,10 +33,10 @@ #define __pictureviewergui__ -#include "driver/framebuffer.h" -#include "driver/pictureviewer/pictureviewer.h" -#include "gui/widget/menue.h" -#include "gui/filebrowser.h" +#include +#include +#include +#include #include diff --git a/src/gui/pictureviewer_setup.cpp b/src/gui/pictureviewer_setup.cpp index 63c68856c..6dd9be459 100644 --- a/src/gui/pictureviewer_setup.cpp +++ b/src/gui/pictureviewer_setup.cpp @@ -33,8 +33,7 @@ #include #endif - -#include "gui/pictureviewer_setup.h" +#include "pictureviewer_setup.h" #include #include @@ -44,8 +43,8 @@ #include #include -#include "gui/pictureviewer.h" -#include "gui/filebrowser.h" +#include +#include #include @@ -82,11 +81,10 @@ int CPictureViewerSetup::exec(CMenuTarget* parent, const std::string &actionKey) } res = showPictureViewerSetup(); - + return res; } - #define PICTUREVIEWER_SCALING_OPTION_COUNT 3 const CMenuOptionChooser::keyval PICTUREVIEWER_SCALING_OPTIONS[PICTUREVIEWER_SCALING_OPTION_COUNT] = { @@ -95,21 +93,27 @@ const CMenuOptionChooser::keyval PICTUREVIEWER_SCALING_OPTIONS[PICTUREVIEWER_SCA { CPictureViewer::NONE , LOCALE_PICTUREVIEWER_RESIZE_NONE } }; - /*shows the picviewer setup menue*/ int CPictureViewerSetup::showPictureViewerSetup() { - CMenuWidget* picviewsetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_PVIEWERSETUP); // intros: back ande save picviewsetup->addIntroItems(LOCALE_PICTUREVIEWER_HEAD); - picviewsetup->addItem(new CMenuOptionChooser(LOCALE_PICTUREVIEWER_SCALING , &g_settings.picviewer_scaling , PICTUREVIEWER_SCALING_OPTIONS , PICTUREVIEWER_SCALING_OPTION_COUNT , true )); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_PICTUREVIEWER_SCALING, &g_settings.picviewer_scaling, PICTUREVIEWER_SCALING_OPTIONS, PICTUREVIEWER_SCALING_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_SCALING); + picviewsetup->addItem(mc); + CStringInput pic_timeout(LOCALE_PICTUREVIEWER_SLIDE_TIME, g_settings.picviewer_slide_time, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 "); - picviewsetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_SLIDE_TIME, true, g_settings.picviewer_slide_time, &pic_timeout)); - picviewsetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_DEFDIR, true, g_settings.network_nfs_picturedir, this, "picturedir")); - + CMenuForwarder * mf = new CMenuForwarder(LOCALE_PICTUREVIEWER_SLIDE_TIME, true, g_settings.picviewer_slide_time, &pic_timeout); + mf->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_SLIDE_TIME); + picviewsetup->addItem(mf); + + mf = new CMenuForwarder(LOCALE_PICTUREVIEWER_DEFDIR, true, g_settings.network_nfs_picturedir, this, "picturedir"); + mf->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_DEFDIR); + picviewsetup->addItem(mf); + int res = picviewsetup->exec(NULL, ""); delete picviewsetup; return res; diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index e17204137..fe7a361e8 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -47,10 +47,16 @@ #include #include #include +#include +#include +#include +#include #include #include +#include + #include #include "plugins.h" @@ -91,18 +97,6 @@ int CPlugins::find_plugin(const std::string & filename) return -1; } -bool CPlugins::pluginfile_exists(const std::string & filename) -{ - struct stat stat_buf; - if(::stat(filename.c_str(), &stat_buf) == 0) - { - return true; - } else - { - return false; - } -} - void CPlugins::scanDir(const char *dir) { struct dirent **namelist; @@ -318,13 +312,14 @@ void CPlugins::startScriptPlugin(int number) { const char *script = plugin_list[number].pluginfile.c_str(); printf("[CPlugins] executing script %s\n",script); - if (!pluginfile_exists(plugin_list[number].pluginfile)) + if (!file_exists(script)) { printf("[CPlugins] could not find %s,\nperhaps wrong plugin type in %s\n", script, plugin_list[number].cfgfile.c_str()); return; } - FILE *f = popen(script,"r"); + pid_t pid = 0; + FILE *f = my_popen(pid,script,"r"); if (f != NULL) { char *output=NULL; @@ -335,6 +330,9 @@ void CPlugins::startScriptPlugin(int number) scriptOutput += output; } pclose(f); + int s; + while (waitpid(pid,&s,WNOHANG)>0); + kill(pid,SIGTERM); if(output) free(output); } @@ -344,7 +342,6 @@ void CPlugins::startScriptPlugin(int number) } } -int mysystem(char * cmd, char * arg1, char * arg2); void CPlugins::startPlugin(int number,int /*param*/) { // always delete old output @@ -370,7 +367,7 @@ void CPlugins::startPlugin(int number,int /*param*/) startScriptPlugin(number); return; } - if (!pluginfile_exists(plugin_list[number].pluginfile)) + if (!file_exists(plugin_list[number].pluginfile.c_str())) { printf("[CPlugins] could not find %s,\nperhaps wrong plugin type in %s\n", plugin_list[number].pluginfile.c_str(), plugin_list[number].cfgfile.c_str()); @@ -593,7 +590,7 @@ void CPlugins::startPlugin(int number,int /*param*/) frameBuffer->Lock(); //frameBuffer->setMode(720, 576, 8 * sizeof(fb_pixel_t)); printf("Starting %s\n", plugin_list[number].pluginfile.c_str()); - mysystem((char *) plugin_list[number].pluginfile.c_str(), NULL, NULL); + my_system(plugin_list[number].pluginfile.c_str(), NULL, NULL); //frameBuffer->setMode(720, 576, 8 * sizeof(fb_pixel_t)); frameBuffer->Unlock(); frameBuffer->paintBackground(); diff --git a/src/gui/plugins.h b/src/gui/plugins.h index 9fab562b2..f37cc0704 100644 --- a/src/gui/plugins.h +++ b/src/gui/plugins.h @@ -97,7 +97,6 @@ class CPlugins void scanDir(const char *dir); bool plugin_exists(const std::string & filename); int find_plugin(const std::string & filename); - bool pluginfile_exists(const std::string & filename); CPlugins::p_type_t getPluginType(int type); public: CPlugins(); diff --git a/src/gui/proxyserver_setup.cpp b/src/gui/proxyserver_setup.cpp index 55b98bb70..b4600e7f0 100644 --- a/src/gui/proxyserver_setup.cpp +++ b/src/gui/proxyserver_setup.cpp @@ -32,7 +32,7 @@ #include #endif -#include "gui/proxyserver_setup.h" +#include "proxyserver_setup.h" #include #include @@ -81,13 +81,19 @@ int CProxySetup::showProxySetup() mn->addIntroItems(subtitle); CStringInputSMS softUpdate_proxy(LOCALE_FLASHUPDATE_PROXYSERVER, g_settings.softupdate_proxyserver, 23, LOCALE_FLASHUPDATE_PROXYSERVER_HINT1, LOCALE_FLASHUPDATE_PROXYSERVER_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789-.: "); - mn->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER, true, g_settings.softupdate_proxyserver, &softUpdate_proxy, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER, true, g_settings.softupdate_proxyserver, &softUpdate_proxy, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_NET_PROXYSERVER); + mn->addItem(mf); CStringInputSMS softUpdate_proxyuser(LOCALE_FLASHUPDATE_PROXYUSERNAME, g_settings.softupdate_proxyusername, 23, LOCALE_FLASHUPDATE_PROXYUSERNAME_HINT1, LOCALE_FLASHUPDATE_PROXYUSERNAME_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789!""§$%&/()=?-. "); - mn->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYUSERNAME, true, g_settings.softupdate_proxyusername, &softUpdate_proxyuser, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYUSERNAME, true, g_settings.softupdate_proxyusername, &softUpdate_proxyuser, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_NET_PROXYUSER); + mn->addItem(mf); CStringInputSMS softUpdate_proxypass(LOCALE_FLASHUPDATE_PROXYPASSWORD, g_settings.softupdate_proxypassword, 20, LOCALE_FLASHUPDATE_PROXYPASSWORD_HINT1, LOCALE_FLASHUPDATE_PROXYPASSWORD_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789!""§$%&/()=?-. "); - mn->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYPASSWORD, true, g_settings.softupdate_proxypassword, &softUpdate_proxypass, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYPASSWORD, true, g_settings.softupdate_proxypassword, &softUpdate_proxypass, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_NET_PROXYPASS); + mn->addItem(mf); int res = mn->exec(NULL, ""); delete mn; diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index c294ec122..aced80cda 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -39,8 +39,8 @@ #include #include -#include "gui/record_setup.h" -#include "gui/filebrowser.h" +#include "record_setup.h" +#include #include #include @@ -51,7 +51,7 @@ #include #include - +#include CRecordSetup::CRecordSetup() { @@ -84,13 +84,13 @@ int CRecordSetup::exec(CMenuTarget* parent, const std::string &actionKey) ShowLocalizedMessage(LOCALE_SETTINGS_HELP, LOCALE_RECORDINGMENU_HELP, CMessageBox::mbrBack, CMessageBox::mbBack); return res; } - else if(actionKey == "recordingdir") + else if(actionKey == "recordingdir") { //parent->hide(); const char *action_str = "recordingdir"; if(chooserDir(g_settings.network_nfs_recordingdir, true, action_str, sizeof(g_settings.network_nfs_recordingdir)-1)){ printf("New recordingdir: %s (timeshift %s)\n", g_settings.network_nfs_recordingdir, g_settings.timeshiftdir); - if(strlen(g_settings.timeshiftdir) == 0) + if(strlen(g_settings.timeshiftdir) == 0) { sprintf(timeshiftDir, "%s/.timeshift", g_settings.network_nfs_recordingdir); safe_mkdir(timeshiftDir); @@ -100,27 +100,27 @@ int CRecordSetup::exec(CMenuTarget* parent, const std::string &actionKey) } return res; } - else if(actionKey == "timeshiftdir") + else if(actionKey == "timeshiftdir") { //parent->hide(); CFileBrowser b; b.Dir_Mode=true; - if (b.exec(g_settings.timeshiftdir)) + if (b.exec(g_settings.timeshiftdir)) { const char * newdir = b.getSelectedFile()->Name.c_str(); printf("New timeshift: selected %s\n", newdir); if(check_dir(newdir)) printf("Wrong/unsupported recording dir %s\n", newdir); - else + else { printf("New timeshift dir: old %s (record %s)\n", g_settings.timeshiftdir, g_settings.network_nfs_recordingdir); - if(strcmp(newdir, g_settings.network_nfs_recordingdir)) + if(strcmp(newdir, g_settings.network_nfs_recordingdir)) { printf("New timeshift != rec dir\n"); strncpy(g_settings.timeshiftdir, b.getSelectedFile()->Name.c_str(), sizeof(g_settings.timeshiftdir)-1); strcpy(timeshiftDir, g_settings.timeshiftdir); - } - else + } + else { sprintf(timeshiftDir, "%s/.timeshift", g_settings.network_nfs_recordingdir); strcpy(g_settings.timeshiftdir, newdir); @@ -169,26 +169,34 @@ const CMenuOptionChooser::keyval END_OF_RECORDING[END_OF_RECORDING_COUNT] = int CRecordSetup::showRecordSetup() { + CMenuForwarder * mf; //menue init - CMenuWidget* recordingSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP); //apply settings recordingSettings->addIntroItems(LOCALE_MAINSETTINGS_RECORDING); - recordingSettings->addItem(new CMenuForwarder(LOCALE_RECORDINGMENU_SETUPNOW, true, NULL, this, "recording", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + mf = new CMenuForwarder(LOCALE_RECORDINGMENU_SETUPNOW, true, NULL, this, "recording", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_RECORD_APPLY); + recordingSettings->addItem(mf); recordingSettings->addItem(GenericMenuSeparatorLine); //record dir CMenuForwarder* fRecDir = new CMenuForwarder(LOCALE_RECORDINGMENU_DEFDIR, true, g_settings.network_nfs_recordingdir, this, "recordingdir"); + fRecDir->setHint("", LOCALE_MENU_HINT_RECORD_DIR); recordingSettings->addItem(fRecDir); + CMenuOptionChooser* channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + channel_rec_dir->setHint("", LOCALE_MENU_HINT_RECORD_CHANDIR); recordingSettings->addItem(channel_rec_dir); //rec hours - recordingSettings->addItem(new CMenuOptionNumberChooser(LOCALE_EXTRA_RECORD_TIME, &g_settings.record_hours, true, 1, 24, NULL) ); + CMenuOptionNumberChooser * mc = new CMenuOptionNumberChooser(LOCALE_EXTRA_RECORD_TIME, &g_settings.record_hours, true, 1, 24, NULL); + mc->setHint("", LOCALE_MENU_HINT_RECORD_TIME); + recordingSettings->addItem(mc); // end of recording CMenuOptionChooser* end_of_recording = new CMenuOptionChooser(LOCALE_RECORDINGMENU_END_OF_RECORDING_NAME, &g_settings.recording_epg_for_end, END_OF_RECORDING, END_OF_RECORDING_COUNT, true); + end_of_recording->setHint("", LOCALE_MENU_HINT_RECORD_END); recordingSettings->addItem(end_of_recording); //template @@ -199,17 +207,23 @@ int CRecordSetup::showRecordSetup() //timeshift CMenuWidget recordingTsSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_TIMESHIFT); showRecordTimeShiftSetup(&recordingTsSettings); - recordingSettings->addItem(new CMenuForwarder(LOCALE_RECORDINGMENU_TIMESHIFT, true, NULL, &recordingTsSettings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuForwarder(LOCALE_RECORDINGMENU_TIMESHIFT, true, NULL, &recordingTsSettings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT); + recordingSettings->addItem(mf); //timersettings CMenuWidget recordingTimerSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_TIMERSETTINGS); showRecordTimerSetup(&recordingTimerSettings); - recordingSettings->addItem(new CMenuForwarder(LOCALE_TIMERSETTINGS_SEPARATOR, true, NULL, &recordingTimerSettings, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + mf = new CMenuForwarder(LOCALE_TIMERSETTINGS_SEPARATOR, true, NULL, &recordingTimerSettings, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMER); + recordingSettings->addItem(mf); //audiosettings CMenuWidget recordingaAudioSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_AUDIOSETTINGS); showRecordAudioSetup(&recordingaAudioSettings); - recordingSettings->addItem(new CMenuForwarder(LOCALE_RECORDINGMENU_APIDS, true, NULL, &recordingaAudioSettings, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + mf = new CMenuForwarder(LOCALE_RECORDINGMENU_APIDS, true, NULL, &recordingaAudioSettings, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint("", LOCALE_MENU_HINT_RECORD_APIDS); + recordingSettings->addItem(mf); int res = recordingSettings->exec(NULL, ""); delete recordingSettings; @@ -224,17 +238,22 @@ void CRecordSetup::showRecordTimerSetup(CMenuWidget *menu_timersettings) sprintf(g_settings.record_safety_time_before, "%02d", pre/60); sprintf(g_settings.record_safety_time_after, "%02d", post/60); - //start + //start CStringInput * timerBefore = new CStringInput(LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE, g_settings.record_safety_time_before, 2, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE_HINT_1, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE_HINT_2,"0123456789 ", this); CMenuForwarder *fTimerBefore = new CMenuDForwarder(LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE, true, g_settings.record_safety_time_before, timerBefore); + fTimerBefore->setHint("", LOCALE_MENU_HINT_RECORD_TIMEBEFORE); //end CStringInput * timerAfter = new CStringInput(LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER, g_settings.record_safety_time_after, 2, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER_HINT_1, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER_HINT_2,"0123456789 ", this); CMenuForwarder *fTimerAfter = new CMenuDForwarder(LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER, true, g_settings.record_safety_time_after, timerAfter); + fTimerAfter->setHint("", LOCALE_MENU_HINT_RECORD_TIMEAFTER); //announce CMenuOptionChooser* chzapAnnounce = new CMenuOptionChooser(LOCALE_RECORDINGMENU_ZAP_ON_ANNOUNCE, &g_settings.recording_zap_on_announce, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + chzapAnnounce->setHint("", LOCALE_MENU_HINT_RECORD_ZAP); + CMenuOptionNumberChooser *chzapCorr = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_ZAPTO_PRE_TIME, &g_settings.zapto_pre_time, true, 0, 10); + chzapCorr->setHint("", LOCALE_MENU_HINT_RECORD_ZAP_PRE_TIME); menu_timersettings->addIntroItems(LOCALE_TIMERSETTINGS_SEPARATOR); menu_timersettings->addItem(fTimerBefore); @@ -258,6 +277,10 @@ void CRecordSetup::showRecordAudioSetup(CMenuWidget *menu_audiosettings) CMenuOptionChooser* aoj2 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_ALT, &g_settings.recording_audio_pids_alt, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, this); CMenuOptionChooser* aoj3 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_AC3, &g_settings.recording_audio_pids_ac3, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, this); + aoj1->setHint("", LOCALE_MENU_HINT_RECORD_APID_STD); + aoj2->setHint("", LOCALE_MENU_HINT_RECORD_APID_ALT); + aoj3->setHint("", LOCALE_MENU_HINT_RECORD_APID_AC3); + menu_audiosettings->addIntroItems(LOCALE_RECORDINGMENU_APIDS); menu_audiosettings->addItem(aoj1); menu_audiosettings->addItem(aoj2); @@ -270,14 +293,26 @@ void CRecordSetup::showRecordTimeShiftSetup(CMenuWidget *menu_ts) //timeshift dir CMenuForwarder* fTsDir = new CMenuForwarder(LOCALE_RECORDINGMENU_TSDIR, true, g_settings.timeshiftdir, this, "timeshiftdir"); + fTsDir->setHint("", LOCALE_MENU_HINT_RECORD_TDIR); menu_ts->addItem(fTsDir); if (1) //has_hdd - { - menu_ts->addItem(new CMenuOptionChooser(LOCALE_EXTRA_TIMESHIFT_PAUSE, &g_settings.timeshift_pause, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_ts->addItem(new CMenuOptionNumberChooser(LOCALE_EXTRA_AUTO_TIMESHIFT, &g_settings.auto_timeshift, true, 0, 300, NULL)); - menu_ts->addItem(new CMenuOptionChooser(LOCALE_EXTRA_AUTO_DELETE, &g_settings.auto_delete, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - menu_ts->addItem(new CMenuOptionChooser(LOCALE_EXTRA_TEMP_TIMESHIFT, &g_settings.temp_timeshift, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + { + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_EXTRA_TIMESHIFT_PAUSE, &g_settings.timeshift_pause, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT_PAUSE); + menu_ts->addItem(mc); + + CMenuOptionNumberChooser * mn = new CMenuOptionNumberChooser(LOCALE_EXTRA_AUTO_TIMESHIFT, &g_settings.auto_timeshift, true, 0, 300, NULL); + mn->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT_AUTO); + menu_ts->addItem(mn); + + mc = new CMenuOptionChooser(LOCALE_EXTRA_AUTO_DELETE, &g_settings.auto_delete, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT_DELETE); + menu_ts->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_EXTRA_TEMP_TIMESHIFT, &g_settings.temp_timeshift, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT_TEMP); + menu_ts->addItem(mc); } } diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 64a96a35f..83f9c103e 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -29,7 +29,7 @@ #include #include -#include "gui/scan_setup.h" +#include #include #include @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include @@ -167,6 +167,8 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) scan_flags |= CServiceScan::SCAN_RESET_NUMBERS; if(scansettings.scan_logical_numbers) scan_flags |= CServiceScan::SCAN_LOGICAL_NUMBERS; + if(scansettings.scan_logical_hd) + scan_flags |= CServiceScan::SCAN_LOGICAL_HD; /* channel types to scan, TV/RADIO/ALL */ scan_flags |= scansettings.scanType; @@ -253,14 +255,14 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) } else if(manual || !scan_all) { sat.position = CServiceManager::getInstance()->GetSatellitePosition(scansettings.satNameNoDiseqc); - strncpy(sat.satName, scansettings.satNameNoDiseqc, 50); + strncpy(sat.satName, scansettings.satNameNoDiseqc, 49); satList.push_back(sat); } else { satellite_map_t & satmap = CServiceManager::getInstance()->SatelliteList(); for(sit = satmap.begin(); sit != satmap.end(); ++sit) { if(sit->second.use_in_scan) { sat.position = sit->first; - strncpy(sat.satName, sit->second.name.c_str(), 50); + strncpy(sat.satName, sit->second.name.c_str(), 49); satList.push_back(sat); } } @@ -269,7 +271,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) if(!manual) { g_RCInput->close_click(); - if (safe_system(NEUTRINO_SCAN_START_SCRIPT) != 0) + if (my_system(NEUTRINO_SCAN_START_SCRIPT) != 0) perror(NEUTRINO_SCAN_START_SCRIPT " failed"); } @@ -334,7 +336,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) g_Zapit->stopScan(); if(!manual) { - if (safe_system(NEUTRINO_SCAN_STOP_SCRIPT) != 0) + if (my_system(NEUTRINO_SCAN_STOP_SCRIPT) != 0) perror(NEUTRINO_SCAN_STOP_SCRIPT " failed"); g_RCInput->open_click(); } diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index b14e73628..fd3f886e8 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -39,14 +39,13 @@ #include #include -#include "gui/scan.h" -#include "gui/scan_setup.h" -#include "gui/motorcontrol.h" -#include "gui/bedit/bouqueteditor_bouquets.h" +#include +#include +#include +#include -#include "gui/widget/hintbox.h" -#include "gui/widget/stringinput.h" -#include "gui/widget/stringinput_ext.h" +#include +#include #include #include @@ -55,7 +54,6 @@ #include #include -#include #include #include #include @@ -234,6 +232,7 @@ CScanSetup::CScanSetup(bool wizard_mode) satSelect = NULL; frontendSetup = NULL; + nid = NULL; } CScanSetup* CScanSetup::getInstance() @@ -294,6 +293,21 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey) } //starting scan + if(actionKey=="cable") { + printf("[neutrino] CScanSetup::%s: simple cable scan\n", __FUNCTION__); + saveScanSetup(); + /* for simple cable scan, force some options */ + scansettings.scan_reset_numbers = 0; + scansettings.scan_nit_manual = 1; + scansettings.scan_fta_flag = 0; + if (scansettings.scan_logical_numbers) { + g_settings.keep_channel_numbers = 1; + CServiceManager::getInstance()->KeepNumbers(g_settings.keep_channel_numbers); + } + CScanTs scanTs; + scanTs.exec(NULL, "manual"); + return res; + } std::string scants_key[] = {"all", "manual", "test", "fast", "auto"/*doesn't exists in CScanTs!*/}; for (uint i=0; i< (sizeof(scants_key)/sizeof(scants_key[0])); i++) @@ -346,6 +360,9 @@ int CScanSetup::showScanMenu() printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__); int shortcut = 1; + CMenuForwarder * mf; + CMenuOptionChooser * mc; + allow_start = !CRecordManager::getInstance()->RecordingStatus() || CRecordManager::getInstance()->TimeshiftOnly(); //main @@ -356,47 +373,56 @@ int CScanSetup::showScanMenu() settings->addIntroItems(is_wizard ? NONEXISTANT_LOCALE : LOCALE_SERVICEMENU_SCANTS); //---------------------------------------------------------------------- //save scan settings - settings->addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "save_scansettings", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "save_scansettings", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_SCAN_SAVESETTINGS); + settings->addItem(mf); //---------------------------------------------------------------------- settings->addItem(GenericMenuSeparatorLine); //---------------------------------------------------------------------- //service select mode - settings->addItem(new CMenuOptionChooser(LOCALE_ZAPIT_SCANTYPE, (int *)&scansettings.scanType, SCANTS_ZAPIT_SCANTYPE, SCANTS_ZAPIT_SCANTYPE_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true)); + mc = new CMenuOptionChooser(LOCALE_ZAPIT_SCANTYPE, (int *)&scansettings.scanType, SCANTS_ZAPIT_SCANTYPE, SCANTS_ZAPIT_SCANTYPE_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true); + mc->setHint("", LOCALE_MENU_HINT_SCAN_SCANTYPE); + settings->addItem(mc); //bouquet generate mode - settings->addItem(new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET, (int *)&scansettings.bouquetMode, SCANTS_BOUQUET_OPTIONS, SCANTS_BOUQUET_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true)); + mc = new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET, (int *)&scansettings.bouquetMode, SCANTS_BOUQUET_OPTIONS, SCANTS_BOUQUET_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true); + mc->setHint("", LOCALE_MENU_HINT_SCAN_BOUQUET); + settings->addItem(mc); //sat/provider selector - satSelect = new CMenuOptionStringChooser(satprov_locale, scansettings.satNameNoDiseqc, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true); + satSelect = new CMenuOptionStringChooser(satprov_locale, scansettings.satNameNoDiseqc, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true); satOnOff = new CMenuWidget(satprov_locale, NEUTRINO_ICON_SETTINGS, width); if (r_system == DVB_S) //sat { + satSelect->setHint("", LOCALE_MENU_HINT_SCAN_SATELLITE); //settings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCANTS_PREVERENCES_RECEIVING_SYSTEM)); CMenuWidget * setupMenu = new CMenuWidget(LOCALE_SATSETUP_FE_SETUP, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_SCAN_FE_SETUP); addScanMenuFrontendSetup(setupMenu); - CMenuForwarder * fsetupMenu = new CMenuDForwarder(LOCALE_SATSETUP_FE_SETUP, true, NULL, setupMenu, "", CRCInput::convertDigitToKey(shortcut++)); - settings->addItem(fsetupMenu); + mf = new CMenuDForwarder(LOCALE_SATSETUP_FE_SETUP, true, NULL, setupMenu, "", CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_SCAN_FESETUP); + settings->addItem(mf); /* add configured satellites to satSelect */ - fillSatSelect(); + fillSatSelect(satSelect); } else if (r_system == DVB_C || r_system == DVB_T) //cable { + satSelect->setHint("", LOCALE_MENU_HINT_SCAN_CABLE); //-------------------------------------------------------------- settings->addItem(GenericMenuSeparatorLine); //-------------------------------------------------------------- - fillCableSelect(); + fillCableSelect(satSelect); //tune timeout - settings->addItem(new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100) ); + CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100); + nc->setHint("", LOCALE_MENU_HINT_SCAN_FETIMEOUT); + settings->addItem(nc); if(CFEManager::getInstance()->getFrontendCount() > 1) { femode = CFEManager::getInstance()->getMode(); - CMenuOptionChooser * mode = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE, (int *)&femode, SATSETUP_FRONTEND_MODE, 2, true, this); - settings->addItem(mode); + mc = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE, (int *)&femode, SATSETUP_FRONTEND_MODE, 2, true, this); + mc->setHint("", LOCALE_MENU_HINT_SCAN_FEMODE); + settings->addItem(mc); } -#if 0 - CIntInput* nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int&) scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); - settings->addItem(new CMenuDForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid)); -#endif + nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int&) scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); } //-------------------------------------------------------------- settings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCANTS_PREVERENCES_SCAN)); @@ -412,48 +438,69 @@ int CScanSetup::showScanMenu() /* FIXME leak, satSelect added to both auto and manual scan, so one of them cannot be deleted */ CMenuWidget * autoScan = new CMenuWidget(LOCALE_SERVICEMENU_SCANTS, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_AUTO_SCAN); addScanMenuAutoScan(autoScan); - settings->addItem(new CMenuForwarderNonLocalized(autoscan, true, NULL, autoScan, "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuForwarderNonLocalized(autoscan, true, NULL, autoScan, "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_SCAN_AUTO); + settings->addItem(mf); //manual scan CMenuWidget manualScan(LOCALE_SATSETUP_MANUAL_SCAN, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_MANUAL_SCAN); addScanMenuManualScan(&manualScan); - settings->addItem(new CMenuForwarder(LOCALE_SATSETUP_MANUAL_SCAN, true, NULL, &manualScan, "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + mf = new CMenuForwarder(LOCALE_SATSETUP_MANUAL_SCAN, true, NULL, &manualScan, "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_SCAN_MANUAL); + settings->addItem(mf); if (r_system == DVB_S) { //auto scan all CMenuWidget * autoScanAll = new CMenuWidget(LOCALE_SATSETUP_AUTO_SCAN_ALL, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_AUTO_SCAN_ALL); addScanMenuAutoScanAll(autoScanAll); - fautoScanAll = new CMenuDForwarder(LOCALE_SATSETUP_AUTO_SCAN_ALL, true /*(dmode != NO_DISEQC)*/, NULL, autoScanAll, "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + fautoScanAll = new CMenuDForwarder(LOCALE_SATSETUP_AUTO_SCAN_ALL, true /*(dmode != NO_DISEQC)*/, NULL, autoScanAll, "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + fautoScanAll->setHint("", LOCALE_MENU_HINT_SCAN_AUTOALL); settings->addItem(fautoScanAll); #ifdef ENABLE_FASTSCAN //fast scan CMenuWidget * fastScanMenu = new CMenuWidget(LOCALE_SATSETUP_FASTSCAN_HEAD, NEUTRINO_ICON_SETTINGS, MN_WIDGET_ID_SCAN_FAST_SCAN); addScanMenuFastScan(fastScanMenu); - settings->addItem(new CMenuDForwarder(LOCALE_SATSETUP_FASTSCAN_HEAD, true, NULL, fastScanMenu, "", CRCInput::convertDigitToKey(shortcut++))); + mf = new CMenuDForwarder(LOCALE_SATSETUP_FASTSCAN_HEAD, true, NULL, fastScanMenu, "", CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_SCAN_FAST); + settings->addItem(mf); #endif /*ENABLE_FASTSCAN*/ } + else if (r_system == DVB_C) //cable + { + CMenuWidget * cableScan = new CMenuWidget(LOCALE_SATSETUP_CABLE, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_CABLE_SCAN); + addScanMenuCable(cableScan); + CMenuForwarder * fcableScan = new CMenuDForwarder(LOCALE_SATSETUP_CABLE, true, NULL, cableScan, "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + fcableScan->setHint("", LOCALE_MENU_HINT_SCAN_CABLE_SIMPLE); + settings->addItem(fcableScan); + } int res = settings->exec(NULL, ""); //delete satSelect; delete satOnOff; delete settings; + delete nid; return res; } void CScanSetup::addScanMenuFrontendSetup(CMenuWidget * setupMenu) { + CMenuForwarder * mf; int shortcut = 1; + femode = CFEManager::getInstance()->getMode(); setupMenu->addIntroItems(); int count = CFEManager::getInstance()->getFrontendCount(); - CMenuOptionChooser * mode = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE, (int *)&femode, SATSETUP_FRONTEND_MODE, SATSETUP_FRONTEND_MODE_COUNT, allow_start && (count > 1), this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true); - setupMenu->addItem(mode); - setupMenu->addItem(new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100) ); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE, (int *)&femode, SATSETUP_FRONTEND_MODE, SATSETUP_FRONTEND_MODE_COUNT, allow_start && (count > 1), this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true); + mc->setHint("", LOCALE_MENU_HINT_SCAN_FEMODE); + setupMenu->addItem(mc); + CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100); + nc->setHint("", LOCALE_MENU_HINT_SCAN_FETIMEOUT); + setupMenu->addItem(nc); for(int i = 0; i < count; i++) { CFrontend * fe = CFEManager::getInstance()->getFE(i); @@ -463,27 +510,38 @@ void CScanSetup::addScanMenuFrontendSetup(CMenuWidget * setupMenu) char name[255]; snprintf(name, sizeof(name), "%s %d: %s", g_Locale->getText(LOCALE_SATSETUP_FE_SETUP), i+1, fe->getInfo()->name); - CMenuForwarder * fSetup = new CMenuForwarderNonLocalized(name, ((i == 0) || (femode == CFEManager::FE_MODE_ALONE)), NULL, this, tmp, + mf = new CMenuForwarderNonLocalized(name, ((i == 0) || (femode == CFEManager::FE_MODE_ALONE)), NULL, this, tmp, (i == 0) ? CRCInput::RC_green : CRCInput::RC_yellow, (i == 0) ? NEUTRINO_ICON_BUTTON_GREEN : NEUTRINO_ICON_BUTTON_YELLOW); - setupMenu->addItem(fSetup); + mf->setHint("", LOCALE_MENU_HINT_SCAN_SETUP_FE); + setupMenu->addItem(mf); if(i != 0) - frontendSetup = fSetup; + frontendSetup = mf; } sprintf(zapit_lat, "%02.6f", zapitCfg.gotoXXLatitude); sprintf(zapit_long, "%02.6f", zapitCfg.gotoXXLongitude); setupMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SATSETUP_EXTENDED_MOTOR)); - setupMenu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_LADIRECTION, (int *)&zapitCfg.gotoXXLaDirection, OPTIONS_SOUTH0_NORTH1_OPTIONS, OPTIONS_SOUTH0_NORTH1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++))); + mc = new CMenuOptionChooser(LOCALE_EXTRA_LADIRECTION, (int *)&zapitCfg.gotoXXLaDirection, OPTIONS_SOUTH0_NORTH1_OPTIONS, OPTIONS_SOUTH0_NORTH1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); + mc->setHint("", LOCALE_MENU_HINT_SCAN_LADIRECTION); + setupMenu->addItem(mc); CStringInput * toff1 = new CStringInput(LOCALE_EXTRA_LATITUDE, (char *) zapit_lat, 10, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789."); - setupMenu->addItem(new CMenuDForwarder(LOCALE_EXTRA_LATITUDE, true, zapit_lat, toff1, "", CRCInput::convertDigitToKey(shortcut++))); + mf = new CMenuDForwarder(LOCALE_EXTRA_LATITUDE, true, zapit_lat, toff1, "", CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_SCAN_LATITUDE); + setupMenu->addItem(mf); - setupMenu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_LODIRECTION, (int *)&zapitCfg.gotoXXLoDirection, OPTIONS_EAST0_WEST1_OPTIONS, OPTIONS_EAST0_WEST1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++))); + mc = new CMenuOptionChooser(LOCALE_EXTRA_LODIRECTION, (int *)&zapitCfg.gotoXXLoDirection, OPTIONS_EAST0_WEST1_OPTIONS, OPTIONS_EAST0_WEST1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); + mc->setHint("", LOCALE_MENU_HINT_SCAN_LODIRECTION); + setupMenu->addItem(mc); CStringInput * toff2 = new CStringInput(LOCALE_EXTRA_LONGITUDE, (char *) zapit_long, 10, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789."); - setupMenu->addItem(new CMenuDForwarder(LOCALE_EXTRA_LONGITUDE, true, zapit_long, toff2, "", CRCInput::convertDigitToKey(shortcut++))); + mf = new CMenuDForwarder(LOCALE_EXTRA_LONGITUDE, true, zapit_long, toff2, "", CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_SCAN_LONGITUDE); + setupMenu->addItem(mf); - setupMenu->addItem(new CMenuOptionNumberChooser(LOCALE_SATSETUP_USALS_REPEAT, (int *)&zapitCfg.repeatUsals, true, 0, 10, NULL, 0, 0, LOCALE_OPTIONS_OFF) ); + nc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_USALS_REPEAT, (int *)&zapitCfg.repeatUsals, true, 0, 10, NULL, 0, 0, LOCALE_OPTIONS_OFF); + nc->setHint("", LOCALE_MENU_HINT_SCAN_USALS_REPEAT); + setupMenu->addItem(nc); } int CScanSetup::showFrontendSetup(int number) @@ -495,12 +553,6 @@ int CScanSetup::showFrontendSetup(int number) fenumber = number; -#if 0 - itemsForAnyDiseqc.Clear(); - itemsForAdvancedDiseqc.Clear(); - itemsForNonAdvancedDiseqc.Clear(); -#endif - CFrontend * fe = CFEManager::getInstance()->getFE(number); frontend_config_t & fe_config = fe->getConfig(); dmode = fe_config.diseqcType; @@ -512,12 +564,12 @@ int CScanSetup::showFrontendSetup(int number) setupMenu->setSelected(feselected); setupMenu->addIntroItems(); - CMenuOptionChooser * ojDiseqc = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC, (int *)&dmode, SATSETUP_DISEQC_OPTIONS, SATSETUP_DISEQC_OPTION_COUNT, allow_start, this, CRCInput::convertDigitToKey(shortcut++), "", true); - /*CMenuOptionNumberChooser * */ ojDiseqcRepeats = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQCREPEAT, (int *)&fe_config.diseqcRepeats, (dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED), 0, 2, NULL); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC, (int *)&dmode, SATSETUP_DISEQC_OPTIONS, SATSETUP_DISEQC_OPTION_COUNT, allow_start, this, CRCInput::convertDigitToKey(shortcut++), "", true); + mc->setHint("", LOCALE_MENU_HINT_SCAN_DISEQCTYPE); + setupMenu->addItem(mc); - //itemsForAnyDiseqc.Add(ojDiseqcRepeats); - - setupMenu->addItem(ojDiseqc); + ojDiseqcRepeats = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQCREPEAT, (int *)&fe_config.diseqcRepeats, (dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED), 0, 2, NULL); + ojDiseqcRepeats->setHint("", LOCALE_MENU_HINT_SCAN_DISEQCREPEAT); setupMenu->addItem(ojDiseqcRepeats); CMenuWidget satToSelect(LOCALE_SATSETUP_SELECT_SAT, NEUTRINO_ICON_SETTINGS, width); @@ -527,27 +579,41 @@ int CScanSetup::showFrontendSetup(int number) for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); ++sit) { std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first); - satToSelect.addItem(new CMenuOptionChooser(satname.c_str(), &sit->second.configured, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + mc = new CMenuOptionChooser(satname.c_str(), &sit->second.configured, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCAN_SATENABLE); + satToSelect.addItem(mc); } - setupMenu->addItem(new CMenuForwarder(LOCALE_SATSETUP_SELECT_SAT, true, NULL, &satToSelect, "", CRCInput::convertDigitToKey(shortcut++))); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_SATSETUP_SELECT_SAT, true, NULL, &satToSelect, "", CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_SCAN_SATADD); + setupMenu->addItem(mf); + //FIXME why fsatSetup not local variable ? fsatSetup = new CMenuForwarder(LOCALE_SATSETUP_SAT_SETUP, true, NULL, this, "satsetup", CRCInput::convertDigitToKey(shortcut++)); + fsatSetup->setHint("", LOCALE_MENU_HINT_SCAN_SATSETUP); setupMenu->addItem(fsatSetup); setupMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SATSETUP_EXTENDED_MOTOR)); - setupMenu->addItem(new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_MOTOR_SPEED, (int *)&fe_config.motorRotationSpeed, true, 0, 64, NULL) ); - setupMenu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_HVOLTAGE, (int *)&fe_config.highVoltage, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_MOTOR_SPEED, (int *)&fe_config.motorRotationSpeed, true, 0, 64, NULL); + nc->setHint("", LOCALE_MENU_HINT_SCAN_MOTOR_SPEED); + setupMenu->addItem(nc); - CMenuOptionChooser * allusals = new CMenuOptionChooser(LOCALE_SATSETUP_USE_USALS, &all_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); - setupMenu->addItem(allusals); + mc = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_HVOLTAGE, (int *)&fe_config.highVoltage, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCAN_MOTOR_18V); + setupMenu->addItem(mc); - setupMenu->addItem(new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, true, NULL, this, "satfind", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + mc = new CMenuOptionChooser(LOCALE_SATSETUP_USE_USALS, &all_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_SCAN_USALSALL); + setupMenu->addItem(mc); + + mf = new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, true, NULL, this, "satfind", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_SCAN_SATFIND); + setupMenu->addItem(mf); int res = setupMenu->exec(NULL, ""); feselected = setupMenu->getSelected(); /* add configured satellites to satSelect in case they changed */ - fillSatSelect(); + fillSatSelect(satSelect); delete setupMenu; return res; @@ -576,7 +642,6 @@ int CScanSetup::showScanMenuLnbSetup() if(!sit->second.configured) continue; - //std::string satname = it->second.name.c_str(); std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first); //sub menu for sat settings to selectable sat item @@ -589,7 +654,11 @@ int CScanSetup::showScanMenuLnbSetup() sat_setup->addItem(new CMenuForwarderNonLocalized(satname.c_str(), true, mpos, tempsat)); } else #endif - sat_setup->addItem(new CMenuForwarderNonLocalized(satname.c_str(), true, NULL, tempsat)); + { + CMenuForwarder * mf = new CMenuForwarderNonLocalized(satname.c_str(), true, NULL, tempsat); + mf->setHint("", LOCALE_MENU_HINT_SCAN_LNBCONFIG); + sat_setup->addItem(mf); + } tmp[count] = tempsat; count++; } @@ -602,12 +671,12 @@ int CScanSetup::showScanMenuLnbSetup() return res; } -void CScanSetup::fillSatSelect() +void CScanSetup::fillSatSelect(CMenuOptionStringChooser * select) { std::set satpos; std::set::iterator tmpit; - satSelect->removeOptions(); + select->removeOptions(); satOnOff->resetWidget(true); satOnOff->addIntroItems(); @@ -621,7 +690,7 @@ void CScanSetup::fillSatSelect() tmpit = satpos.find(sit->first); if(sit->second.configured && tmpit == satpos.end()) { std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first); - satSelect->addOption(satname.c_str()); + select->addOption(satname.c_str()); satpos.insert(sit->first); if (!sfound && strcmp(scansettings.satNameNoDiseqc, satname.c_str()) == 0) @@ -638,15 +707,17 @@ void CScanSetup::fillSatSelect() } satellite_map_t & satmap = CServiceManager::getInstance()->SatelliteList(); for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); sit++) { - if(satpos.find(sit->first) != satpos.end()) - satOnOff->addItem(new CMenuOptionChooser(sit->second.name.c_str(), &sit->second.use_in_scan, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - else + if(satpos.find(sit->first) != satpos.end()) { + CMenuOptionChooser * mc = new CMenuOptionChooser(sit->second.name.c_str(), &sit->second.use_in_scan, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCAN_SATSCAN); + satOnOff->addItem(mc); + } else sit->second.use_in_scan = false; } } //init cable provider menu -void CScanSetup::fillCableSelect() +void CScanSetup::fillCableSelect(CMenuOptionStringChooser * select) { printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__); //don't misunderstand the name "satSelect", in this context it's actually for cable providers @@ -655,7 +726,7 @@ void CScanSetup::fillCableSelect() for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); sit++) { printf("Adding cable menu for %s position %d\n", sit->second.name.c_str(), sit->first); - satSelect->addOption(sit->second.name.c_str()); + select->addOption(sit->second.name.c_str()); if (!sfound && strcmp(scansettings.satNameNoDiseqc, sit->second.name.c_str()) == 0) sfound = true; @@ -681,6 +752,8 @@ int CScanSetup::showScanMenuSatFind() sat_findMenu->addIntroItems(); CMenuOptionStringChooser * feSatSelect = new CMenuOptionStringChooser(satprov_locale, scansettings.satNameNoDiseqc, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true); + feSatSelect->setHint("", LOCALE_MENU_HINT_SCAN_SATSELECT); + satellite_map_t & satmap = fe->getSatellites(); bool sfound = false; std::string firstname; @@ -701,14 +774,18 @@ int CScanSetup::showScanMenuSatFind() sat_findMenu->addItem(feSatSelect); CTPSelectHandler tpSelect; - sat_findMenu->addItem(new CMenuForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, &tpSelect, "test", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, &tpSelect, "test", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_SCAN_TPSELECT); + sat_findMenu->addItem(mf); sat_findMenu->addItem(GenericMenuSeparatorLine); //-------------------------------------------------------------- addScanOptionsItems(sat_findMenu); //-------------------------------------------------------------- sat_findMenu->addItem(GenericMenuSeparatorLine); CMotorControl mcontrol(fenumber); - sat_findMenu->addItem(new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, allow_start, NULL, &mcontrol, "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + mf = new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, allow_start, NULL, &mcontrol, "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_SCAN_SATFIND_START); + sat_findMenu->addItem(mf); int res = sat_findMenu->exec(NULL, ""); delete sat_findMenu; @@ -721,26 +798,22 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon temp_sat->addIntroItems(); CMenuOptionNumberChooser *diseqc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQC_INPUT, &satconfig.diseqc, ((dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED)), -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); + diseqc->setHint("", LOCALE_MENU_HINT_SCAN_DISEQC); CMenuOptionNumberChooser *comm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_COMM_INPUT, &satconfig.commited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); + comm->setHint("", LOCALE_MENU_HINT_SCAN_COMMITED); CMenuOptionNumberChooser *uncomm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_UNCOMM_INPUT, &satconfig.uncommited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); + uncomm->setHint("", LOCALE_MENU_HINT_SCAN_UNCOMMITED); CMenuOptionNumberChooser *uniscr = new CMenuOptionNumberChooser(LOCALE_UNICABLE_SCR, &satconfig.unicable_scr, true, -1, 7, NULL, 0, -1, LOCALE_OPTIONS_OFF); CIntInput *uniqrg = new CIntInput(LOCALE_UNICABLE_QRG, (int&) satconfig.unicable_qrg, 4, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CMenuOptionNumberChooser *unilnb = new CMenuOptionNumberChooser(LOCALE_UNICABLE_LNB, &satconfig.unicable_lnb, true, 0, 1); CMenuOptionNumberChooser *motor = new CMenuOptionNumberChooser(LOCALE_SATSETUP_MOTOR_POS, &satconfig.motor_position, true /*dmode == DISEQC_ADVANCED*/, 0, 64, NULL, 0, 0, LOCALE_OPTIONS_OFF); + motor->setHint("", LOCALE_MENU_HINT_SCAN_MOTORPOS); CMenuOptionChooser *usals = new CMenuOptionChooser(LOCALE_EXTRA_USE_GOTOXX, &satconfig.use_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true /*dmode == DISEQC_ADVANCED*/); + usals->setHint("", LOCALE_MENU_HINT_SCAN_USEUSALS); if(!satconfig.use_usals) all_usals = 0; -#if 0 - itemsForAnyDiseqc.Add(diseqc); - itemsForAdvancedDiseqc.Add(comm); - itemsForAdvancedDiseqc.Add(uncomm); -#endif - //FIXME testing motor without DISEQC_ADVANCED - //itemsForAdvancedDiseqc.Add(motor); - //itemsForAdvancedDiseqc.Add(usals); - CIntInput* lofL = new CIntInput(LOCALE_SATSETUP_LOFL, (int&) satconfig.lnbOffsetLow, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CIntInput* lofH = new CIntInput(LOCALE_SATSETUP_LOFH, (int&) satconfig.lnbOffsetHigh, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CIntInput* lofS = new CIntInput(LOCALE_SATSETUP_LOFS, (int&) satconfig.lnbSwitch, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); @@ -753,9 +826,17 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon temp_sat->addItem(unilnb); temp_sat->addItem(motor); temp_sat->addItem(usals); - temp_sat->addItem(new CMenuDForwarder(LOCALE_SATSETUP_LOFL, true, lofL->getValue(), lofL)); - temp_sat->addItem(new CMenuDForwarder(LOCALE_SATSETUP_LOFH, true, lofH->getValue(), lofH)); - temp_sat->addItem(new CMenuDForwarder(LOCALE_SATSETUP_LOFS, true, lofS->getValue(), lofS)); + + CMenuForwarder * mf = new CMenuDForwarder(LOCALE_SATSETUP_LOFL, true, lofL->getValue(), lofL); + mf->setHint("", LOCALE_MENU_HINT_SCAN_LOFL); + temp_sat->addItem(mf); + mf = new CMenuDForwarder(LOCALE_SATSETUP_LOFH, true, lofH->getValue(), lofH); + mf->setHint("", LOCALE_MENU_HINT_SCAN_LOFH); + temp_sat->addItem(mf); + + mf = new CMenuDForwarder(LOCALE_SATSETUP_LOFS, true, lofS->getValue(), lofS); + mf->setHint("", LOCALE_MENU_HINT_SCAN_LOFS); + temp_sat->addItem(mf); } //init manual scan menu @@ -763,15 +844,23 @@ void CScanSetup::addScanMenuManualScan(CMenuWidget *manual_Scan) { printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__); int shortCut = 1; + CMenuForwarder * mf; manual_Scan->addIntroItems(); //---------------------------------------------------------------------- manual_Scan->addItem(satSelect); if (r_system == DVB_C) { //cable +#if 0 CIntInput* nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int&) scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); - manual_Scan->addItem(new CMenuDForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid)); + mf = new CMenuDForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid); +#endif + mf = new CMenuForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid); + mf->setHint("", LOCALE_MENU_HINT_SCAN_NID); + manual_Scan->addItem(mf); } - manual_Scan->addItem(new CMenuDForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, new CTPSelectHandler()/*tpSelect*/, "test", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuDForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, new CTPSelectHandler()/*tpSelect*/, "test", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_SCAN_TPSELECT); + manual_Scan->addItem(mf); manual_Scan->addItem(GenericMenuSeparatorLine); //---------------------------------------------------------------------- @@ -780,8 +869,13 @@ void CScanSetup::addScanMenuManualScan(CMenuWidget *manual_Scan) //---------------------------------------------------------------------- manual_Scan->addItem(GenericMenuSeparatorLine); - manual_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_TEST, allow_start, NULL, this, "test", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); - manual_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "manual", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + mf = new CMenuForwarder(LOCALE_SCANTS_TEST, allow_start, NULL, this, "test", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_SCAN_TEST); + manual_Scan->addItem(mf); + + mf = new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "manual", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint("", LOCALE_MENU_HINT_SCAN_START); + manual_Scan->addItem(mf); } //init auto scan all menu @@ -790,14 +884,18 @@ void CScanSetup::addScanMenuAutoScanAll(CMenuWidget *auto_ScanAll) printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__); auto_ScanAll->addIntroItems(); //---------------------------------------------------------------------- - auto_ScanAll->addItem(new CMenuForwarder(satprov_locale, true, NULL, satOnOff, "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + CMenuForwarder * mf = new CMenuForwarder(satprov_locale, true, NULL, satOnOff, "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_SCAN_AUTOALL_SELECT); + auto_ScanAll->addItem(mf); auto_ScanAll->addItem(GenericMenuSeparatorLine); //---------------------------------------------------------------------- addListFlagsItems(auto_ScanAll, 1); //---------------------------------------------------------------------- auto_ScanAll->addItem(GenericMenuSeparatorLine); - auto_ScanAll->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "all", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "all", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_SCAN_START); + auto_ScanAll->addItem(mf); } #ifdef ENABLE_FASTSCAN @@ -824,14 +922,18 @@ void CScanSetup::addScanMenuFastScan(CMenuWidget *fast_ScanMenu) fast_ScanMenu->addIntroItems(); CMenuOptionChooser* fastProv = new CMenuOptionChooser(LOCALE_SATSETUP_FASTSCAN_PROV, (int *)&scansettings.fast_op, FAST_SCAN_PROV_OPTIONS, FAST_SCAN_PROV_OPTIONS_COUNT, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true); + fastProv->setHint("", LOCALE_MENU_HINT_SCAN_FASTPROV); CMenuOptionChooser* fastType = new CMenuOptionChooser(LOCALE_SATSETUP_FASTSCAN_TYPE, (int *)&scansettings.fast_type, FAST_SCAN_OPTIONS, FAST_SCAN_OPTIONS_COUNT, true, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true); + fastType->setHint("", LOCALE_MENU_HINT_SCAN_FASTTYPE); //---------------------------------------------------------------------- fast_ScanMenu->addItem(fastProv); fast_ScanMenu->addItem(fastType); //---------------------------------------------------------------------- fast_ScanMenu->addItem(GenericMenuSeparatorLine); - fast_ScanMenu->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "fast", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "fast", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_SCAN_START); + fast_ScanMenu->addItem(mf); } #endif /*ENABLE_FASTSCAN*/ @@ -839,19 +941,85 @@ void CScanSetup::addScanMenuFastScan(CMenuWidget *fast_ScanMenu) void CScanSetup::addScanMenuAutoScan(CMenuWidget *auto_Scan) { printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__); + CMenuForwarder * mf; auto_Scan->addIntroItems(); auto_Scan->addItem(satSelect); if (r_system == DVB_C) { //cable +#if 0 CIntInput* nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int&) scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); - auto_Scan->addItem(new CMenuDForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid)); + mf = new CMenuDForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid); +#endif + mf = new CMenuForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid); + mf->setHint("", LOCALE_MENU_HINT_SCAN_NID); + auto_Scan->addItem(mf); } auto_Scan->addItem(GenericMenuSeparatorLine); //---------------------------------------------------------------------- addListFlagsItems(auto_Scan, 1); //---------------------------------------------------------------------- auto_Scan->addItem(GenericMenuSeparatorLine); - auto_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "auto", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "auto", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_SCAN_START); + auto_Scan->addItem(mf); +} + +//init simple cable scan menu +void CScanSetup::addScanMenuCable(CMenuWidget *menu) +{ + printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__); + int shortCut = 1; + CMenuForwarder * mf; + + menu->addIntroItems(); + //---------------------------------------------------------------------- + CMenuOptionStringChooser * select = new CMenuOptionStringChooser(satprov_locale, scansettings.satNameNoDiseqc, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true); + fillCableSelect(select); + select->setHint("", LOCALE_MENU_HINT_SCAN_CABLE); + menu->addItem(select); + + mf = new CMenuForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid); + mf->setHint("", LOCALE_MENU_HINT_SCAN_NID); + menu->addItem(mf); + + mf = new CMenuDForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, new CTPSelectHandler(), "test", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_SCAN_TPSELECT); + menu->addItem(mf); + + menu->addItem(GenericMenuSeparatorLine); + + CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.TP_freq, freq_length, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789"); + CMenuForwarder *Freq = new CMenuDForwarder(LOCALE_EXTRA_TP_FREQ, true, scansettings.TP_freq, freq, "", CRCInput::convertDigitToKey(shortCut++)); + Freq->setHint("", LOCALE_MENU_HINT_SCAN_FREQ); + + CStringInput *rate = new CStringInput(LOCALE_EXTRA_TP_RATE, (char *) scansettings.TP_rate, 8, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789"); + CMenuForwarder *Rate = new CMenuDForwarder(LOCALE_EXTRA_TP_RATE, true, scansettings.TP_rate, rate, "", CRCInput::convertDigitToKey(shortCut++)); + Rate->setHint("", LOCALE_MENU_HINT_SCAN_RATE); + + CMenuOptionChooser * mod_pol = new CMenuOptionChooser(LOCALE_EXTRA_TP_MOD, (int *)&scansettings.TP_mod, SATSETUP_SCANTP_MOD, SATSETUP_SCANTP_MOD_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); + mod_pol->setHint("", LOCALE_MENU_HINT_SCAN_MOD); + + menu->addItem(Freq); + menu->addItem(Rate); + menu->addItem(mod_pol); + + CMenuOptionChooser *lcn = new CMenuOptionChooser(LOCALE_SATSETUP_LOGICAL_NUMBERS, (int *)&scansettings.scan_logical_numbers, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::convertDigitToKey(shortCut++)); + lcn->setHint("", LOCALE_MENU_HINT_SCAN_LOGICAL); + menu->addItem(lcn); + + lcnhd = new CMenuOptionChooser(LOCALE_SATSETUP_LOGICAL_HD, (int *)&scansettings.scan_logical_hd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, scansettings.scan_logical_numbers, NULL, CRCInput::convertDigitToKey(shortCut++)); + lcnhd->setHint("", LOCALE_MENU_HINT_SCAN_LOGICAL_HD); + menu->addItem(lcnhd); + + menu->addItem(GenericMenuSeparatorLine); +#if 0 + mf = new CMenuForwarder(LOCALE_SCANTS_TEST, allow_start, NULL, this, "test", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_SCAN_TEST); + menu->addItem(mf); +#endif + mf = new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "cable", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint("", LOCALE_MENU_HINT_SCAN_START); + menu->addItem(mf); } //create scan options items @@ -867,18 +1035,23 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.TP_freq, freq_length, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789"); CMenuForwarder *Freq = new CMenuDForwarder(LOCALE_EXTRA_TP_FREQ, true, scansettings.TP_freq, freq, "", CRCInput::convertDigitToKey(shortCut++)); + Freq->setHint("", LOCALE_MENU_HINT_SCAN_FREQ); if (r_system != DVB_T) { rate = new CStringInput(LOCALE_EXTRA_TP_RATE, (char *) scansettings.TP_rate, 8, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789"); Rate = new CMenuDForwarder(LOCALE_EXTRA_TP_RATE, true, scansettings.TP_rate, rate, "", CRCInput::convertDigitToKey(shortCut++)); + Rate->setHint("", LOCALE_MENU_HINT_SCAN_RATE); } /* TODO: DVB-T scan options */ if (r_system == DVB_S) { fec = new CMenuOptionChooser(LOCALE_EXTRA_TP_FEC, (int *)&scansettings.TP_fec, SATSETUP_SCANTP_FEC, fec_count, true, NULL, CRCInput::convertDigitToKey(shortCut++), "", true); + fec->setHint("", LOCALE_MENU_HINT_SCAN_FEC); mod_pol = new CMenuOptionChooser(LOCALE_EXTRA_TP_POL, (int *)&scansettings.TP_pol, SATSETUP_SCANTP_POL, SATSETUP_SCANTP_POL_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); + mod_pol->setHint("", LOCALE_MENU_HINT_SCAN_POL); } else if (r_system == DVB_C) { mod_pol = new CMenuOptionChooser(LOCALE_EXTRA_TP_MOD, (int *)&scansettings.TP_mod, SATSETUP_SCANTP_MOD, SATSETUP_SCANTP_MOD_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); + mod_pol->setHint("", LOCALE_MENU_HINT_SCAN_MOD); } options_menu->addItem(Freq); @@ -904,14 +1077,20 @@ int CScanSetup::addListFlagsItems(CMenuWidget *listflags_menu, const int &shortc else useNit = new CMenuOptionChooser(LOCALE_SATSETUP_USE_NIT, (int *)&scansettings.scan_nit, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); + useNit->setHint("", LOCALE_MENU_HINT_SCAN_NIT); + CMenuOptionChooser *ftaFlag = new CMenuOptionChooser(LOCALE_SATSETUP_USE_FTA_FLAG, (int *)&scansettings.scan_fta_flag, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); + ftaFlag->setHint("", LOCALE_MENU_HINT_SCAN_FTA); + CMenuOptionChooser *scanPid = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_SCANPIDS, &zapitCfg.scanPids, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); + scanPid->setHint("", LOCALE_MENU_HINT_SCAN_PIDS); listflags_menu->addItem(useNit); listflags_menu->addItem(ftaFlag); listflags_menu->addItem(scanPid); CMenuOptionChooser *resetNum = new CMenuOptionChooser(LOCALE_SATSETUP_RESET_NUMBERS, (int *)&scansettings.scan_reset_numbers, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); + resetNum->setHint("", LOCALE_MENU_HINT_SCAN_RESET_NUMBERS); listflags_menu->addItem(resetNum); #if 0 // testing CMenuOptionChooser *useBat = new CMenuOptionChooser(LOCALE_SATSETUP_USE_BAT, (int *)&scansettings.scan_bat, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); @@ -946,6 +1125,8 @@ void CScanSetup::saveScanSetup() bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/) { + bool ret = false; + if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_USE_USALS)) { CFrontend * fe = CFEManager::getInstance()->getFE(fenumber); printf("[neutrino] CScanSetup::%s: all usals %d \n", __FUNCTION__, all_usals); @@ -960,27 +1141,12 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data* fautoScanAll->setActive(dmode != NO_DISEQC); if(dmode == NO_DISEQC) { ojDiseqcRepeats->setActive(false); -#if 0 - itemsForAnyDiseqc.Activate(false); - itemsForAdvancedDiseqc.Activate(false); - itemsForNonAdvancedDiseqc.Activate(false); -#endif } else if(dmode < DISEQC_ADVANCED) { ojDiseqcRepeats->setActive(true); -#if 0 - itemsForAnyDiseqc.Activate(true); - itemsForAdvancedDiseqc.Activate(false); - itemsForNonAdvancedDiseqc.Activate(true); -#endif } else if(dmode == DISEQC_ADVANCED) { ojDiseqcRepeats->setActive(true); -#if 0 - itemsForAnyDiseqc.Activate(true); - itemsForAdvancedDiseqc.Activate(true); - itemsForNonAdvancedDiseqc.Activate(false); -#endif } CFrontend * fe = CFEManager::getInstance()->getFE(fenumber); fe->setDiseqcType((diseqc_t) dmode); @@ -995,9 +1161,29 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data* if(femode != CFEManager::FE_MODE_ALONE) CFEManager::getInstance()->saveSettings(true); if (r_system == DVB_S) //sat - fillSatSelect(); + fillSatSelect(satSelect); } - return false; + else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_CABLESETUP_PROVIDER)) { + printf("[neutrino] CScanSetup::%s: new provider: [%s]\n", __FUNCTION__, scansettings.satNameNoDiseqc); + satellite_map_t & satmap = CServiceManager::getInstance()->SatelliteList(); + for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); sit++) + { + if (strcmp(scansettings.satNameNoDiseqc, sit->second.name.c_str()) == 0) { + if(sit->second.cable_nid > 0) { + scansettings.cable_nid = sit->second.cable_nid; + nid->updateValue(); + ret = true; + } + + break; + } + } + } + else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_LOGICAL_NUMBERS)) { +printf("[neutrino] CScanSetup::%s: logical numbers %d\n", __FUNCTION__, scansettings.scan_logical_numbers); + lcnhd->setActive(scansettings.scan_logical_numbers); + } + return ret; } void CScanSetup::updateManualSettings() diff --git a/src/gui/scan_setup.h b/src/gui/scan_setup.h index 77d98d2f2..56e079ab6 100644 --- a/src/gui/scan_setup.h +++ b/src/gui/scan_setup.h @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -57,13 +58,9 @@ class CScanSetup : public CMenuTarget, public CChangeObserver CMenuForwarder *frontendSetup; CMenuForwarder *fsatSetup; CMenuOptionNumberChooser * ojDiseqcRepeats; + CIntInput * nid; + CMenuOptionChooser * lcnhd; - /* dynamic frontend items to be enabled/disabled in notify */ -#if 0 - CGenericMenuActivate itemsForAdvancedDiseqc; - CGenericMenuActivate itemsForNonAdvancedDiseqc; - CGenericMenuActivate itemsForAnyDiseqc; -#endif /* variables for selected frontend */ /* diseqc mode */ int dmode; @@ -88,8 +85,8 @@ class CScanSetup : public CMenuTarget, public CChangeObserver int showFrontendSetup(int number); int showScanMenuLnbSetup(); int showScanMenuSatFind(); - void fillSatSelect(); - void fillCableSelect(); + void fillSatSelect(CMenuOptionStringChooser *select); + void fillCableSelect(CMenuOptionStringChooser *select); void addScanMenuFrontendSetup(CMenuWidget *settings); void addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t &satconfig); @@ -99,6 +96,7 @@ class CScanSetup : public CMenuTarget, public CChangeObserver void addScanMenuFastScan(CMenuWidget *fast_ScanMenu); #endif void addScanMenuAutoScan(CMenuWidget *auto_Scan); + void addScanMenuCable(CMenuWidget *menu); int addScanOptionsItems(CMenuWidget *options_menu, const int &shortcut = 1); int addListFlagsItems(CMenuWidget *listflags_menu, const int &shortcut = 1, bool manual = false); @@ -130,6 +128,4 @@ class CTPSelectHandler : public CMenuTarget //CScanSetup public: int exec(CMenuTarget* parent, const std::string &actionkey); }; - - #endif diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index d735e65d2..f506fff24 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -37,7 +37,7 @@ #include #include -#include "gui/widget/icons.h" +#include #include #include diff --git a/src/gui/settings_manager.cpp b/src/gui/settings_manager.cpp index bc30f6349..9bb4f3c60 100644 --- a/src/gui/settings_manager.cpp +++ b/src/gui/settings_manager.cpp @@ -34,15 +34,13 @@ #include #include -#include "gui/settings_manager.h" - -#include "gui/filebrowser.h" - -#include "gui/widget/messagebox.h" -#include "gui/widget/stringinput.h" +#include +#include +#include +#include #include -#include +#include #include @@ -62,18 +60,18 @@ int CSettingsManager::exec(CMenuTarget* parent, const std::string &actionKey) { printf("[neutrino] CSettingsManager %s: init...\n",__FUNCTION__); int res = menu_return::RETURN_REPAINT; - + if (parent) parent->hide(); - + CFileBrowser fileBrowser; CFileFilter fileFilter; - - if(actionKey == "loadconfig") + + if(actionKey == "loadconfig") { fileFilter.addFilter("conf"); fileBrowser.Filter = &fileFilter; - if (fileBrowser.exec("/var/tuxbox/config") == true) + if (fileBrowser.exec("/var/tuxbox/config") == true) { CNeutrinoApp::getInstance()->loadSetup(fileBrowser.getSelectedFile()->Name.c_str()); CColorSetupNotifier *colorSetupNotifier = new CColorSetupNotifier; @@ -84,10 +82,10 @@ int CSettingsManager::exec(CMenuTarget* parent, const std::string &actionKey) } return res; } - else if(actionKey == "saveconfig") + else if(actionKey == "saveconfig") { fileBrowser.Dir_Mode = true; - if (fileBrowser.exec("/var/tuxbox") == true) + if (fileBrowser.exec("/var/tuxbox") == true) { char fname[256] = "neutrino.conf", sname[256]; CStringInputSMS * sms = new CStringInputSMS(LOCALE_EXTRA_SAVECONFIG, fname, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789. "); @@ -99,43 +97,41 @@ int CSettingsManager::exec(CMenuTarget* parent, const std::string &actionKey) } return res; } - else if(actionKey == "backup") + else if(actionKey == "backup") { fileBrowser.Dir_Mode = true; - if (fileBrowser.exec("/media") == true) + if (fileBrowser.exec("/media") == true) { - char fname[256]; struct statfs s; int ret = ::statfs(fileBrowser.getSelectedFile()->Name.c_str(), &s); if(ret == 0 && s.f_type != 0x72b6L) /*jffs2*/ - { - sprintf(fname, "/bin/backup.sh %s", fileBrowser.getSelectedFile()->Name.c_str()); - printf("backup: executing [%s]\n", fname); - system(fname); - } + { + const char backup_sh[] = "/bin/backup.sh"; + printf("backup: executing [%s %s]\n",backup_sh, fileBrowser.getSelectedFile()->Name.c_str()); + my_system( backup_sh, fileBrowser.getSelectedFile()->Name.c_str() ); + } else ShowMsgUTF(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_SETTINGS_BACKUP_FAILED),CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_ERROR); } return res; } - else if(actionKey == "restore") + else if(actionKey == "restore") { fileFilter.addFilter("tar"); fileBrowser.Filter = &fileFilter; - if (fileBrowser.exec("/media") == true) + if (fileBrowser.exec("/media") == true) { int result = ShowMsgUTF(LOCALE_SETTINGS_RESTORE, g_Locale->getText(LOCALE_SETTINGS_RESTORE_WARN), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo); - if(result == CMessageBox::mbrYes) + if(result == CMessageBox::mbrYes) { - char fname[256]; - sprintf(fname, "/bin/restore.sh %s", fileBrowser.getSelectedFile()->Name.c_str()); - printf("restore: executing [%s]\n", fname); - system(fname); + const char restore_sh[] = "/bin/restore.sh"; + printf("restore: executing [%s %s]\n", restore_sh, fileBrowser.getSelectedFile()->Name.c_str()); + my_system( restore_sh, fileBrowser.getSelectedFile()->Name.c_str() ); } } return res; } - + res = showMenu(); return res; @@ -147,19 +143,39 @@ int CSettingsManager::showMenu() CDataResetNotifier * resetNotifier = new CDataResetNotifier(); - CMenuWidget * mset = new CMenuWidget(LOCALE_MAINSETTINGS_MANAGE, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_SETTINGS_MNGR); - mset->addIntroItems(); + CMenuWidget * mset = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_SETTINGS_MNGR); + mset->addIntroItems(LOCALE_MAINSETTINGS_MANAGE); + + CMenuForwarder * mf = new CMenuForwarder(LOCALE_RESET_SETTINGS, true, NULL, resetNotifier, "settings", CRCInput::RC_recall); + mf->setHint(NEUTRINO_ICON_HINT_RESET, LOCALE_MENU_HINT_RESET); // FIXME: RC-button RECALL is broken + mset->addItem(mf); - mset->addItem(new CMenuForwarder(LOCALE_RESET_SETTINGS, true, NULL, resetNotifier, "settings", CRCInput::RC_recall));// FIXME: RC-button RECALL is broken mset->addItem(GenericMenuSeparatorLine); - mset->addItem(new CMenuForwarder(LOCALE_EXTRA_SAVECONFIG, true, NULL, this, "saveconfig", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - mset->addItem(new CMenuForwarder(LOCALE_EXTRA_LOADCONFIG, true, NULL, this, "loadconfig", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + + mf = new CMenuForwarder(LOCALE_EXTRA_SAVECONFIG, true, NULL, this, "saveconfig", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint(NEUTRINO_ICON_HINT_SAVEAS, LOCALE_MENU_HINT_SAVEAS); + mset->addItem(mf); + + mf = new CMenuForwarder(LOCALE_EXTRA_LOADCONFIG, true, NULL, this, "loadconfig", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint(NEUTRINO_ICON_HINT_LOAD, LOCALE_MENU_HINT_LOAD); + mset->addItem(mf); + mset->addItem(GenericMenuSeparatorLine); - mset->addItem(new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); - mset->addItem(new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + + mf = new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint(NEUTRINO_ICON_HINT_BACKUP, LOCALE_MENU_HINT_BACKUP); + mset->addItem(mf); + + mf = new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint(NEUTRINO_ICON_HINT_RESTORE, LOCALE_MENU_HINT_RESTORE); + mset->addItem(mf); + mset->addItem(GenericMenuSeparatorLine); - mset->addItem(new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER)); - + + mf = new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER); + mf->setHint(NEUTRINO_ICON_HINT_FACTORY, LOCALE_MENU_HINT_FACTORY); + mset->addItem(mf); + int res = mset->exec(NULL, ""); delete resetNotifier; delete mset; diff --git a/src/gui/start_wizard.cpp b/src/gui/start_wizard.cpp index 17da7b729..1628734c6 100644 --- a/src/gui/start_wizard.cpp +++ b/src/gui/start_wizard.cpp @@ -46,6 +46,8 @@ #include "osd_setup.h" #include "osdlang_setup.h" #include "scan_setup.h" +#include +#include #include @@ -105,6 +107,17 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/) res = CScanSetup::getInstance()->exec(NULL, ""); CScanSetup::getInstance()->setWizardMode(CScanSetup::SCAN_SETUP_MODE_WIZARD_NO); } + bool init_settings = file_exists("/var/tuxbox/config/initial/"); + if(init_settings && (res != menu_return::RETURN_EXIT_ALL)) + { + if (ShowMsgUTF(LOCALE_WIZARD_INITIAL_SETTINGS, g_Locale->getText(LOCALE_WIZARD_INSTALL_SETTINGS), + CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes) { + system("/bin/cp /var/tuxbox/config/initial/* /var/tuxbox/config/zapit/"); + CFEManager::getInstance()->loadSettings(); + CFEManager::getInstance()->saveSettings(); + CZapit::getInstance()->PrepareChannels(); + } + } } diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 8dfd901ed..58955a310 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -94,6 +94,7 @@ CStreamInfo2::CStreamInfo2 () box_h = 0; box_h2 = 0; yypos = -1; + dmxbuf = NULL; } CStreamInfo2::~CStreamInfo2 () @@ -511,7 +512,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) sprintf (buf, "20:9"); break; default: - strncpy (buf, g_Locale->getText (LOCALE_STREAMINFO_ARATIO_UNKNOWN), sizeof (buf)); + strncpy (buf, g_Locale->getText (LOCALE_STREAMINFO_ARATIO_UNKNOWN), sizeof (buf)-1); } g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 @@ -545,7 +546,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) snprintf (buf,sizeof(buf), "60fps"); break; default: - strncpy (buf, g_Locale->getText (LOCALE_STREAMINFO_FRAMERATE_UNKNOWN), sizeof (buf)); + strncpy (buf, g_Locale->getText (LOCALE_STREAMINFO_FRAMERATE_UNKNOWN), sizeof (buf)-1); break; } g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 @@ -786,8 +787,6 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos) /* * some definition */ -#define TS_LEN 188 -#define TS_BUF_SIZE (TS_LEN * 2048) /* fix dmx buffer size */ static unsigned long timeval_to_ms (const struct timeval *tv) { @@ -799,7 +798,6 @@ long delta_time_ms (struct timeval *tv, struct timeval *last_tv) return timeval_to_ms (tv) - timeval_to_ms (last_tv); } -uint64_t b_total; static cDemux * dmx; int CStreamInfo2::ts_setup () @@ -814,11 +812,22 @@ int CStreamInfo2::ts_setup () if( !g_RemoteControl->current_PIDs.APIDs.empty() ) apid = g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid; + short ret = -1; if(vpid == 0 && apid == 0) - return -1; + return ret; - dmx = new cDemux(0);//FIXME test + dmx = new cDemux(0); + if(!dmx) + return ret; +#define TS_LEN 188 +#define TS_BUF_SIZE (TS_LEN * 2048) /* fix dmx buffer size */ + dmxbuf = new unsigned char[TS_BUF_SIZE]; + if(!dmxbuf){ + delete dmx; + dmx = NULL; + return ret; + } dmx->Open(DMX_TP_CHANNEL, NULL, 3 * 3008 * 62); if(vpid > 0) { @@ -833,8 +842,8 @@ int CStreamInfo2::ts_setup () gettimeofday (&first_tv, NULL); last_tv.tv_sec = first_tv.tv_sec; last_tv.tv_usec = first_tv.tv_usec; - b_total = 0; - return 0; + ret = b_total = 0; + return ret; } int CStreamInfo2::update_rate () @@ -842,8 +851,6 @@ int CStreamInfo2::update_rate () if(!dmx) return 0; - - unsigned char buf[TS_BUF_SIZE] = {0}; long b = 0; int ret = 0; @@ -851,7 +858,7 @@ int CStreamInfo2::update_rate () int timeout = 100; - b_len = dmx->Read(buf, sizeof (buf), timeout); + b_len = dmx->Read(dmxbuf, TS_BUF_SIZE, timeout); //printf("ts: read %d\n", b_len); b = b_len; @@ -889,6 +896,9 @@ int CStreamInfo2::ts_close () if(dmx) delete dmx; dmx = NULL; + if(dmxbuf) + delete [] dmxbuf; + dmxbuf = NULL; return 0; } diff --git a/src/gui/streaminfo2.h b/src/gui/streaminfo2.h index 4220b458c..14e36b06f 100644 --- a/src/gui/streaminfo2.h +++ b/src/gui/streaminfo2.h @@ -86,7 +86,7 @@ class CStreamInfo2 : public CMenuTarget uint64_t bit_s; uint64_t abit_s; uint64_t b_total; - + unsigned char *dmxbuf; int update_rate(); int ts_setup(); int ts_close(); diff --git a/src/gui/subchannel_select.cpp b/src/gui/subchannel_select.cpp index c059e8344..86b0a6a1c 100644 --- a/src/gui/subchannel_select.cpp +++ b/src/gui/subchannel_select.cpp @@ -38,7 +38,7 @@ #include #include -#include "gui/subchannel_select.h" +#include "subchannel_select.h" #include extern CRemoteControl * g_RemoteControl; diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index b46f22dd8..d0e3419be 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -30,7 +30,7 @@ #include #endif -#include "gui/test_menu.h" +#include "test_menu.h" #include #include @@ -40,14 +40,15 @@ #include +#include #include #include #include #include -#include "gui/widget/hintbox.h" -#include "gui/scan.h" -#include "gui/scan_setup.h" +#include +#include +#include #include #include #include diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index c79bb6484..d14459728 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -29,8 +29,7 @@ #include #include #include -#include -#include "gui/infoclock.h" +#include //static CProgressBar *timescale = 0; diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index d371d8199..eb178398d 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -51,11 +51,9 @@ #include #include - #include #include #include -#include #include #include #include @@ -68,6 +66,9 @@ #include #include +#include + +#include extern CBouquetManager *g_bouquetManager; @@ -327,7 +328,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) recinfo.recordingSafety = false; timerNew.announceTime-= 120; // 2 more mins for rec timer - strncpy(recinfo.recordingDir,timerNew.recordingDir,sizeof(recinfo.recordingDir)); + strncpy(recinfo.recordingDir,timerNew.recordingDir,sizeof(recinfo.recordingDir)-1); data = &recinfo; } else data= &eventinfo; @@ -364,7 +365,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) "%n", &timerNew.channel_id, &delta); - strncpy(timerNew_channel_name, &(key[3 + delta + 1]), 30); + strncpy(timerNew_channel_name, &(key[3 + delta + 1]), 29); g_RCInput->postMsg(CRCInput::RC_timeout, 0); // leave underlying menu also g_RCInput->postMsg(CRCInput::RC_timeout, 0); // leave underlying menu also return menu_return::RETURN_EXIT; @@ -589,6 +590,7 @@ int CTimerList::show() { update=true; } +#if 0 else if ((msg==CRCInput::RC_blue)|| (CRCInput::isNumeric(msg)) ) { @@ -596,6 +598,7 @@ int CTimerList::show() g_RCInput->postMsg( msg, data ); loop=false; } +#endif else if (msg==CRCInput::RC_setup) { res=menu_return::RETURN_EXIT_ALL; @@ -649,7 +652,6 @@ void CTimerList::hide() } } -bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); void CTimerList::paintItem(int pos) { int ypos = y+ theight+0 + pos*fheight*2; @@ -745,8 +747,7 @@ void CTimerList::paintItem(int pos) if (timer.epgID!=0) { CEPGData epgdata; - //if (g_Sectionsd->getEPGid(timer.epgID, timer.epg_starttime, &epgdata)) - if (sectionsd_getEPGid(timer.epgID, timer.epg_starttime, &epgdata)) + if (CEitManager::getInstance()->getEPGid(timer.epgID, timer.epg_starttime, &epgdata)) { zAddData += " : "; zAddData += epgdata.title; @@ -1052,7 +1053,7 @@ int CTimerList::modifyTimer() //printf("TIMER: rec dir %s len %s\n", timer->recordingDir, strlen(timer->recordingDir)); if (!strlen(timer->recordingDir)) - strncpy(timer->recordingDir,g_settings.network_nfs_recordingdir,sizeof(timer->recordingDir)); + strncpy(timer->recordingDir,g_settings.network_nfs_recordingdir,sizeof(timer->recordingDir)-1); bool recDirEnabled = (timer->eventType == CTimerd::TIMER_RECORD) && (g_settings.recording_type == RECORDING_FILE); CMenuForwarder* m6 = new CMenuForwarder(LOCALE_TIMERLIST_RECORDING_DIR, recDirEnabled, timer->recordingDir, this, "rec_dir1", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); @@ -1102,7 +1103,7 @@ int CTimerList::newTimer() timerNew.channel_id = 0; strcpy(timerNew.message, ""); timerNew_standby_on =false; - strncpy(timerNew.recordingDir,g_settings.network_nfs_recordingdir,sizeof(timerNew.recordingDir)); + strncpy(timerNew.recordingDir,g_settings.network_nfs_recordingdir,sizeof(timerNew.recordingDir)-1); CMenuWidget timerSettings(LOCALE_TIMERLIST_MENUNEW, NEUTRINO_ICON_SETTINGS); @@ -1212,52 +1213,55 @@ int CTimerList::newTimer() bool askUserOnTimerConflict(time_t announceTime, time_t stopTime) { - CTimerdClient Timer; - CTimerd::TimerList overlappingTimers = Timer.getOverlappingTimers(announceTime,stopTime); - //printf("[CTimerdClient] attention\n%d\t%d\t%d conflicts with:\n",timerNew.announceTime,timerNew.alarmTime,timerNew.stopTime); + if (CFEManager::getInstance()->getMode() == CFEManager::FE_MODE_SINGLE){ + CTimerdClient Timer; + CTimerd::TimerList overlappingTimers = Timer.getOverlappingTimers(announceTime,stopTime); + //printf("[CTimerdClient] attention\n%d\t%d\t%d conflicts with:\n",timerNew.announceTime,timerNew.alarmTime,timerNew.stopTime); - std::string timerbuf = g_Locale->getText(LOCALE_TIMERLIST_OVERLAPPING_TIMER); - timerbuf += "\n"; - for (CTimerd::TimerList::iterator it = overlappingTimers.begin(); - it != overlappingTimers.end(); ++it) - { - timerbuf += CTimerList::convertTimerType2String(it->eventType); - timerbuf += " ("; - timerbuf += CTimerList::convertChannelId2String(it->channel_id); // UTF-8 - if (it->epgID != 0) - { - CEPGData epgdata; - //if (g_Sectionsd->getEPGid(it->epgID, it->epg_starttime, &epgdata)) - if (sectionsd_getEPGid(it->epgID, it->epg_starttime, &epgdata)) - { - timerbuf += ":"; - timerbuf += epgdata.title; - } - else if (strlen(it->epgTitle)!=0) - { - timerbuf += ":"; - timerbuf += it->epgTitle; - } - } - timerbuf += ")"; - - timerbuf += ":\n"; - char at[25] = {0}; - struct tm *annTime = localtime(&(it->announceTime)); - strftime(at,20,"%d.%m. %H:%M",annTime); - timerbuf += at; - timerbuf += " - "; - - char st[25] = {0}; - struct tm *sTime = localtime(&(it->stopTime)); - strftime(st,20,"%d.%m. %H:%M",sTime); - timerbuf += st; + std::string timerbuf = g_Locale->getText(LOCALE_TIMERLIST_OVERLAPPING_TIMER); timerbuf += "\n"; - //printf("%d\t%d\t%d\n",it->announceTime,it->alarmTime,it->stopTime); - } - //printf("message:\n%s\n",timerbuf.c_str()); - // todo: localize message - //g_Locale->getText(TIMERLIST_OVERLAPPING_MESSAGE); + for (CTimerd::TimerList::iterator it = overlappingTimers.begin(); + it != overlappingTimers.end(); ++it) + { + timerbuf += CTimerList::convertTimerType2String(it->eventType); + timerbuf += " ("; + timerbuf += CTimerList::convertChannelId2String(it->channel_id); // UTF-8 + if (it->epgID != 0) + { + CEPGData epgdata; + if (CEitManager::getInstance()->getEPGid(it->epgID, it->epg_starttime, &epgdata)) + { + timerbuf += ":"; + timerbuf += epgdata.title; + } + else if (strlen(it->epgTitle)!=0) + { + timerbuf += ":"; + timerbuf += it->epgTitle; + } + } + timerbuf += ")"; - return (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO,timerbuf,CMessageBox::mbrNo,CMessageBox::mbNo|CMessageBox::mbYes) == CMessageBox::mbrYes); + timerbuf += ":\n"; + char at[25] = {0}; + struct tm *annTime = localtime(&(it->announceTime)); + strftime(at,20,"%d.%m. %H:%M",annTime); + timerbuf += at; + timerbuf += " - "; + + char st[25] = {0}; + struct tm *sTime = localtime(&(it->stopTime)); + strftime(st,20,"%d.%m. %H:%M",sTime); + timerbuf += st; + timerbuf += "\n"; + //printf("%d\t%d\t%d\n",it->announceTime,it->alarmTime,it->stopTime); + } + //printf("message:\n%s\n",timerbuf.c_str()); + // todo: localize message + //g_Locale->getText(TIMERLIST_OVERLAPPING_MESSAGE); + + return (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO,timerbuf,CMessageBox::mbrNo,CMessageBox::mbNo|CMessageBox::mbYes) == CMessageBox::mbrYes); + } + else + return true; } diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 830d0728a..d61b0f542 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -25,8 +25,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H @@ -52,12 +53,17 @@ #include #include +#include #define SQUASHFS #include #include +#if LIBCURL_VERSION_NUM < 0x071507 +#include +#endif + #include #include #include @@ -110,22 +116,6 @@ public: } }; - -class CNonLocalizedMenuSeparator : public CMenuSeparator -{ - const char * the_text; - -public: - CNonLocalizedMenuSeparator(const char * ptext, const neutrino_locale_t Text1) : CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, Text1) - { - the_text = ptext; - } - - virtual const char * getString(void) - { - return the_text; - } -}; //#define DEBUG bool CFlashUpdate::selectHttpImage(void) { @@ -482,7 +472,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &) CFSMounter::umount(); ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_FLASHREADYREBOOT)); // UTF-8 - //system("/etc/init.d/rcK"); + //my_system("/etc/init.d/rcK"); ft.reboot(); sleep(20000); } @@ -503,13 +493,12 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &) } else // not image, install { - char cmd[100]; - sprintf(cmd, "install.sh %s %s", g_settings.update_dir, filename.c_str()); + const char install_sh[] = "/bin/install.sh"; #ifdef DEBUG1 - printf("[update] calling %s\n", cmd); + printf("[update] calling %s %s %s\n",install_sh, g_settings.update_dir, filename.c_str() ); #else - printf("[update] calling %s\n", cmd); - system(cmd); + printf("[update] calling %s %s %s\n",install_sh, g_settings.update_dir, filename.c_str() ); + my_system( install_sh, g_settings.update_dir, filename.c_str() ); #endif showGlobalStatus(100); ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_READY)); // UTF-8 diff --git a/src/gui/update.h b/src/gui/update.h index f92d71bac..6f85b9342 100644 --- a/src/gui/update.h +++ b/src/gui/update.h @@ -25,8 +25,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ diff --git a/src/gui/update_menue.cpp b/src/gui/update_menue.cpp index aeb7f471c..e5f38e0e9 100644 --- a/src/gui/update_menue.cpp +++ b/src/gui/update_menue.cpp @@ -51,11 +51,13 @@ CSoftwareUpdate::CSoftwareUpdate() { width = w_max (40, 10); fe = new CFlashExpert(); + update_item = NULL; } CSoftwareUpdate::~CSoftwareUpdate() { delete fe; + delete update_item; } int CSoftwareUpdate::exec(CMenuTarget* parent, const std::string &/*actionKey*/) @@ -73,25 +75,33 @@ int CSoftwareUpdate::exec(CMenuTarget* parent, const std::string &/*actionKey*/) int CSoftwareUpdate::showSoftwareUpdate() /* shows the menue and options for software update */ { + CMenuForwarder * mf; CMenuWidget softUpdate(LOCALE_MAINMENU_SERVICE, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE); softUpdate.addIntroItems(LOCALE_SERVICEMENU_UPDATE); //flashing CFlashUpdate flash; - softUpdate.addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE, true, NULL, &flash, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - + neutrino_locale_t up_text = (g_settings.softupdate_mode == 0) ? LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL : LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET; + update_item = new CMenuForwarder(up_text, true, NULL, &flash, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK); + softUpdate.addItem(update_item); + + //settings + CUpdateSettings update_settings(update_item); + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_SETTINGS, true, NULL, &update_settings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_SETTINGS); + softUpdate.addItem(mf); + + softUpdate.addItem(GenericMenuSeparatorLine); + //expert-functions CMenuWidget mtdexpert(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_MTDEXPERT); showSoftwareUpdateExpert(&mtdexpert); - softUpdate.addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, NULL, &mtdexpert, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); - - softUpdate.addItem(GenericMenuSeparatorLine); - - //settings - CUpdateSettings update_settings; - softUpdate.addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_SETTINGS, true, NULL, &update_settings, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW )); - + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, NULL, &mtdexpert, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT); + softUpdate.addItem(mf); + int res = softUpdate.exec (NULL, ""); return res; } @@ -99,8 +109,13 @@ int CSoftwareUpdate::showSoftwareUpdate() /* shows experts-functions to read/write to the mtd */ void CSoftwareUpdate::showSoftwareUpdateExpert(CMenuWidget *w_mtd_expert) { + CMenuForwarder * mf; w_mtd_expert->addIntroItems(); - w_mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASHMTD , true, NULL, fe, "readflashmtd" , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED)); - w_mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASHMTD, true, NULL, fe, "writeflashmtd", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASHMTD , true, NULL, fe, "readflashmtd" , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT_READ); + w_mtd_expert->addItem(mf); + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASHMTD, true, NULL, fe, "writeflashmtd", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT_WRITE); + w_mtd_expert->addItem(mf); } diff --git a/src/gui/update_menue.h b/src/gui/update_menue.h index 5b86a9dc7..8948a49f6 100644 --- a/src/gui/update_menue.h +++ b/src/gui/update_menue.h @@ -33,13 +33,14 @@ #define __software_update__ #include -#include "gui/update.h" +#include #include class CSoftwareUpdate : public CMenuTarget { private: int width; + CMenuForwarder * update_item; int showSoftwareUpdate(); void showSoftwareUpdateExpert(CMenuWidget *w_mtd_expert); diff --git a/src/gui/update_settings.cpp b/src/gui/update_settings.cpp index 93ca1fd8d..07de21474 100644 --- a/src/gui/update_settings.cpp +++ b/src/gui/update_settings.cpp @@ -37,15 +37,16 @@ #include #include #include "update_settings.h" -#include "gui/filebrowser.h" +#include "filebrowser.h" #include #include #include -CUpdateSettings::CUpdateSettings() +CUpdateSettings::CUpdateSettings(CMenuForwarder * update_item) { width = w_max (40, 10); + updateItem = update_item; #ifdef USE_SMS_INPUT input_url_file = new CStringInputSMS(LOCALE_FLASHUPDATE_URL_FILE, g_settings.softupdate_url_file, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789!""$%&/()=?-. "); #endif @@ -89,7 +90,7 @@ int CUpdateSettings::exec(CMenuTarget* parent, const std::string &actionKey) fileFilter.addFilter("urls"); fileBrowser.Filter = &fileFilter; if (fileBrowser.exec("/var/etc") == true) - strncpy(g_settings.softupdate_url_file, fileBrowser.getSelectedFile()->Name.c_str(), 31); + strncpy(g_settings.softupdate_url_file, fileBrowser.getSelectedFile()->Name.c_str(), 30); return res; } @@ -113,7 +114,7 @@ int CUpdateSettings::initMenu() #endif CMenuForwarder * fw_update_dir = new CMenuForwarder(LOCALE_EXTRA_UPDATE_DIR, !g_settings.softupdate_mode, g_settings.update_dir , this, "update_dir", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); - CUrlConfigSetupNotifier url_setup_notifier(fw_url, fw_update_dir); + CUrlConfigSetupNotifier url_setup_notifier(fw_url, fw_update_dir, updateItem); CMenuOptionChooser *oj_mode = new CMenuOptionChooser(LOCALE_FLASHUPDATE_UPDATEMODE, &g_settings.softupdate_mode, FLASHUPDATE_UPDATEMODE_OPTIONS, FLASHUPDATE_UPDATEMODE_OPTION_COUNT, true, &url_setup_notifier); @@ -128,10 +129,11 @@ int CUpdateSettings::initMenu() } -CUrlConfigSetupNotifier::CUrlConfigSetupNotifier( CMenuItem* i1, CMenuItem* i2) +CUrlConfigSetupNotifier::CUrlConfigSetupNotifier( CMenuItem* i1, CMenuItem* i2, CMenuForwarder * f1) { toDisable[0] = i1; toDisable[1] = i2; + updateItem = f1; } bool CUrlConfigSetupNotifier::changeNotify(const neutrino_locale_t, void *) @@ -139,9 +141,11 @@ bool CUrlConfigSetupNotifier::changeNotify(const neutrino_locale_t, void *) if (g_settings.softupdate_mode){ toDisable[0]->setActive(true); toDisable[1]->setActive(false); + updateItem->setTextLocale(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET); }else{ toDisable[0]->setActive(false); toDisable[1]->setActive(true); + updateItem->setTextLocale(LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL); } return false; } diff --git a/src/gui/update_settings.h b/src/gui/update_settings.h index 11537b7c8..c58676774 100644 --- a/src/gui/update_settings.h +++ b/src/gui/update_settings.h @@ -34,7 +34,7 @@ #include -#include "gui/update.h" +#include "update.h" // #define USE_SMS_INPUT @@ -49,8 +49,9 @@ class CUrlConfigSetupNotifier : public CChangeObserver { private: CMenuItem* toDisable[2]; + CMenuForwarder * updateItem; public: - CUrlConfigSetupNotifier( CMenuItem*, CMenuItem*); + CUrlConfigSetupNotifier( CMenuItem*, CMenuItem*, CMenuForwarder *); bool changeNotify(const neutrino_locale_t = NONEXISTANT_LOCALE, void *data = NULL); }; @@ -58,6 +59,7 @@ class CUpdateSettings : public CMenuTarget { private: int width; + CMenuForwarder * updateItem; int initMenu(); CFlashExpert *fe; @@ -66,7 +68,7 @@ class CUpdateSettings : public CMenuTarget #endif public: - CUpdateSettings(); + CUpdateSettings(CMenuForwarder * update_item); ~CUpdateSettings(); int exec(CMenuTarget* parent, const std::string & actionKey); }; diff --git a/src/gui/upnpbrowser.h b/src/gui/upnpbrowser.h index 03b6cc7b8..c4495d5fc 100644 --- a/src/gui/upnpbrowser.h +++ b/src/gui/upnpbrowser.h @@ -32,11 +32,11 @@ #ifndef __upnpplayergui__ #define __upnpplayergui__ -#include "driver/framebuffer.h" -#include "driver/audiofile.h" -#include "driver/pictureviewer/pictureviewer.h" -#include "gui/filebrowser.h" -#include "gui/widget/menue.h" +#include +#include +#include +#include +#include #include #include diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index f36e5f40d..2aa65eed7 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -41,20 +41,20 @@ #include #endif -#include "gui/user_menue.h" -#include "gui/user_menue_setup.h" -#include "gui/subchannel_select.h" -#include "gui/favorites.h" -#include "gui/audio_select.h" -#include "gui/streaminfo2.h" -#include "gui/epgplus.h" -#include "gui/movieplayer.h" -#include "gui/timerlist.h" -#include "gui/plugins.h" -#include "gui/imageinfo.h" -#include "gui/dboxinfo.h" -#include "gui/cam_menu.h" -#include "gui/pluginlist.h" +#include "user_menue.h" +#include "user_menue_setup.h" +#include "subchannel_select.h" +#include "favorites.h" +#include "audio_select.h" +#include "streaminfo2.h" +#include "epgplus.h" +#include "movieplayer.h" +#include "timerlist.h" +#include "plugins.h" +#include "imageinfo.h" +#include "dboxinfo.h" +#include "cam_menu.h" +#include "pluginlist.h" #include #include @@ -82,12 +82,14 @@ CUserMenu::~CUserMenu() } +#if 0 #define MAINMENU_RECORDING_OPTION_COUNT 2 const CMenuOptionChooser::keyval MAINMENU_RECORDING_OPTIONS[MAINMENU_RECORDING_OPTION_COUNT] = { { 0, LOCALE_MAINMENU_RECORDING_START }, { 1, LOCALE_MAINMENU_RECORDING_STOP } }; +#endif // USERMENU bool CUserMenu::showUserMenu(int button) @@ -461,6 +463,7 @@ bool CUserMenu::showUserMenu(int button) **************************************************************************************/ bool CUserMenu::changeNotify(const neutrino_locale_t OptionName, void * Data) { +#if 0 bool res = !CRecordManager::getInstance()->RecordingStatus() ? false:true; if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_RECORDING_START)) || (ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_RECORDING))) @@ -471,9 +474,11 @@ bool CUserMenu::changeNotify(const neutrino_locale_t OptionName, void * Data) res = false; else res = true; - } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_PAUSESECTIONSD)) { + } else +#endif + if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_PAUSESECTIONSD)) { g_Sectionsd->setPauseScanning((*((int *)Data)) == 0); } - return res; + return false; } diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index 85e510544..b1991d760 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -35,7 +35,7 @@ #endif -#include "gui/user_menue_setup.h" +#include "user_menue_setup.h" #include #include diff --git a/src/gui/vfd_setup.cpp b/src/gui/vfd_setup.cpp index 2e6a43147..30f62d1ab 100644 --- a/src/gui/vfd_setup.cpp +++ b/src/gui/vfd_setup.cpp @@ -34,7 +34,7 @@ #endif -#include "gui/vfd_setup.h" +#include "vfd_setup.h" #include #include @@ -76,12 +76,12 @@ int CVfdSetup::exec(CMenuTarget* parent, const std::string &actionKey) CVFD::getInstance()->setBrightness(brightness); CVFD::getInstance()->setBrightnessStandby(brightnessstandby); CVFD::getInstance()->setBrightnessDeepStandby(brightnessdeepstandby); - return menu_return::RETURN_REPAINT;; + return menu_return::RETURN_REPAINT; } int res = showSetup(); - - return res; + + return res; } #define LCDMENU_STATUSLINE_OPTION_COUNT 2 @@ -116,24 +116,30 @@ int CVfdSetup::showSetup() //vfd brightness menu CMenuWidget lcd_sliders(LOCALE_LCDMENU_HEAD, NEUTRINO_ICON_LCD,width, MN_WIDGET_ID_VFDSETUP_LCD_SLIDERS); showBrightnessSetup(&lcd_sliders); - vfds->addItem(new CMenuForwarder(LOCALE_LCDMENU_LCDCONTROLER, vfd_enabled, NULL, &lcd_sliders, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - + CMenuForwarder * mf = new CMenuForwarder(LOCALE_LCDMENU_LCDCONTROLER, vfd_enabled, NULL, &lcd_sliders, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_VFD_BRIGHTNESS_SETUP); + vfds->addItem(mf); + //led menu - if(cs_get_revision() > 7) + if(cs_get_revision() > 7) { CMenuWidget * ledMenu = new CMenuWidget(LOCALE_LCDMENU_HEAD, NEUTRINO_ICON_LCD, width, MN_WIDGET_ID_VFDSETUP_LED_SETUP); showLedSetup(ledMenu); - vfds->addItem(new CMenuDForwarder(LOCALE_LEDCONTROLER_MENU, true, NULL, ledMenu, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mf = new CMenuDForwarder(LOCALE_LEDCONTROLER_MENU, true, NULL, ledMenu, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint("", LOCALE_MENU_HINT_POWER_LEDS); + vfds->addItem(mf); } vfds->addItem(GenericMenuSeparatorLine); //status and info line options CMenuOptionChooser* oj = new CMenuOptionChooser(LOCALE_LCDMENU_STATUSLINE, &g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME], LCDMENU_STATUSLINE_OPTIONS, LCDMENU_STATUSLINE_OPTION_COUNT, vfd_enabled); + oj->setHint("", LOCALE_MENU_HINT_VFD_STATUSLINE); CMenuOptionChooser* lcd_clock_channelname_menu = new CMenuOptionChooser(LOCALE_LCD_INFO_LINE, &g_settings.lcd_info_line, LCD_INFO_OPTIONS, LCD_INFO_OPTION_COUNT, vfd_enabled); + lcd_clock_channelname_menu->setHint("", LOCALE_MENU_HINT_VFD_INFOLINE); vfds->addItem(oj); vfds->addItem(lcd_clock_channelname_menu); - + int res = vfds->exec(NULL, ""); delete vfds; @@ -142,35 +148,71 @@ int CVfdSetup::showSetup() void CVfdSetup::showBrightnessSetup(CMenuWidget *mn_widget) { + CMenuOptionNumberChooser * nc; + CMenuForwarder * mf; + mn_widget->addIntroItems(LOCALE_LCDMENU_LCDCONTROLER); - + brightness = CVFD::getInstance()->getBrightness(); brightnessstandby = CVFD::getInstance()->getBrightnessStandby(); brightnessdeepstandby = CVFD::getInstance()->getBrightnessDeepStandby(); - mn_widget->addItem(new CMenuOptionNumberChooser(LOCALE_LCDCONTROLER_BRIGHTNESS, &brightness, true, 0, 15, this, 0, 0, NONEXISTANT_LOCALE, NULL, true)); - mn_widget->addItem(new CMenuOptionNumberChooser(LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, &brightnessstandby, true, 0, 15, this, 0, 0, NONEXISTANT_LOCALE, NULL, true)); - if(cs_get_revision() > 7) - mn_widget->addItem(new CMenuOptionNumberChooser(LOCALE_LCDCONTROLER_BRIGHTNESSDEEPSTANDBY, &brightnessdeepstandby, true, 0, 15, this, 0, 0, NONEXISTANT_LOCALE, NULL, true)); - mn_widget->addItem(new CMenuOptionNumberChooser(LOCALE_LCDMENU_DIM_BRIGHTNESS, &g_settings.lcd_setting_dim_brightness, vfd_enabled, -1, 15, NULL, 0, -1, LOCALE_OPTIONS_OFF, NULL, true)); + nc = new CMenuOptionNumberChooser(LOCALE_LCDCONTROLER_BRIGHTNESS, &brightness, true, 0, 15, this, 0, 0, NONEXISTANT_LOCALE, NULL, true); + nc->setHint("", LOCALE_MENU_HINT_VFD_BRIGHTNESS); + mn_widget->addItem(nc); + + nc = new CMenuOptionNumberChooser(LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, &brightnessstandby, true, 0, 15, this, 0, 0, NONEXISTANT_LOCALE, NULL, true); + nc->setHint("", LOCALE_MENU_HINT_VFD_BRIGHTNESSSTANDBY); + mn_widget->addItem(nc); + + if(cs_get_revision() > 7) { + nc = new CMenuOptionNumberChooser(LOCALE_LCDCONTROLER_BRIGHTNESSDEEPSTANDBY, &brightnessdeepstandby, true, 0, 15, this, 0, 0, NONEXISTANT_LOCALE, NULL, true); + nc->setHint("", LOCALE_MENU_HINT_VFD_BRIGHTNESSDEEPSTANDBY); + mn_widget->addItem(nc); + } + nc = new CMenuOptionNumberChooser(LOCALE_LCDMENU_DIM_BRIGHTNESS, &g_settings.lcd_setting_dim_brightness, vfd_enabled, -1, 15, NULL, 0, -1, LOCALE_OPTIONS_OFF, NULL, true); + nc->setHint("", LOCALE_MENU_HINT_VFD_BRIGHTNESSDIM); + mn_widget->addItem(nc); + mn_widget->addItem(GenericMenuSeparatorLine); if (dim_time == NULL) dim_time = new CStringInput(LOCALE_LCDMENU_DIM_TIME, g_settings.lcd_setting_dim_time, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE,"0123456789 "); - mn_widget->addItem(new CMenuForwarder(LOCALE_LCDMENU_DIM_TIME, vfd_enabled, g_settings.lcd_setting_dim_time,dim_time)); + + mf = new CMenuForwarder(LOCALE_LCDMENU_DIM_TIME, vfd_enabled, g_settings.lcd_setting_dim_time,dim_time); + mf->setHint("", LOCALE_MENU_HINT_VFD_DIMTIME); + mn_widget->addItem(mf); + mn_widget->addItem(GenericMenuSeparatorLine); - mn_widget->addItem(new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, "def", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + mf = new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, "def", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint("", LOCALE_MENU_HINT_VFD_DEFAULTS); + mn_widget->addItem(mf); } void CVfdSetup::showLedSetup(CMenuWidget *mn_led_widget) { + CMenuOptionChooser * mc; mn_led_widget->addIntroItems(LOCALE_LEDCONTROLER_MENU); - mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_TV, &g_settings.led_tv_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true, this)); - mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_STANDBY, &g_settings.led_standby_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true)); - mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_DEEPSTANDBY, &g_settings.led_deep_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true)); - mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_RECORD, &g_settings.led_rec_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true)); - mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_BLINK, &g_settings.led_blink, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); -} + mc = new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_TV, &g_settings.led_tv_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_LEDS_TV); + mn_led_widget->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_STANDBY, &g_settings.led_standby_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_LEDS_STANDBY); + mn_led_widget->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_DEEPSTANDBY, &g_settings.led_deep_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_LEDS_DEEPSTANDBY); + mn_led_widget->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_RECORD, &g_settings.led_rec_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_LEDS_RECORD); + mn_led_widget->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_LEDCONTROLER_BLINK, &g_settings.led_blink, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_LEDS_BLINK); + mn_led_widget->addItem(mc); +} bool CVfdSetup::changeNotify(const neutrino_locale_t OptionName, void */* data */) { diff --git a/src/gui/videosettings.cpp b/src/gui/videosettings.cpp index 4588c45ef..c422a4ef0 100644 --- a/src/gui/videosettings.cpp +++ b/src/gui/videosettings.cpp @@ -43,8 +43,8 @@ #include #include -#include "gui/widget/hintbox.h" -#include "gui/widget/messagebox.h" +#include +#include #include @@ -62,17 +62,17 @@ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ CVideoSettings::CVideoSettings(bool wizard_mode) { frameBuffer = CFrameBuffer::getInstance(); - + is_wizard = wizard_mode; - + SyncControlerForwarder = NULL; VcrVideoOutSignalOptionChooser = NULL; width = w_max (35, 20); selected = -1; - + prev_video_mode = g_settings.video_Mode; - + setupVideoSystem(false); } @@ -92,7 +92,7 @@ int CVideoSettings::exec(CMenuTarget* parent, const std::string &/*actionKey*/) } res = showVideoSetup(); - + return res; } @@ -142,7 +142,6 @@ const CMenuOptionChooser::keyval VIDEOMENU_VIDEOSIGNAL_HD1PLUS_SCART_OPTIONS[VID // { 0, LOCALE_VIDEOMENU_VCRSIGNAL_COMPOSITE } // }; - #define VIDEOMENU_VIDEOSIGNAL_HD1PLUS_CINCH_OPTION_COUNT 4 const CMenuOptionChooser::keyval VIDEOMENU_VIDEOSIGNAL_HD1PLUS_CINCH_OPTIONS[VIDEOMENU_VIDEOSIGNAL_HD1PLUS_CINCH_OPTION_COUNT] = { @@ -233,19 +232,23 @@ int CVideoSettings::showVideoSetup() //analog options unsigned int system_rev = cs_get_revision(); - CMenuOptionChooser * vs_analg_ch = NULL; + CMenuOptionChooser * vs_analg_ch = NULL; CMenuOptionChooser * vs_scart_ch = NULL; CMenuOptionChooser * vs_chinch_ch = NULL; - if (system_rev == 0x06) + if (system_rev == 0x06) { vs_analg_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_ANALOG_MODE, &g_settings.analog_mode1, VIDEOMENU_VIDEOSIGNAL_HD1_OPTIONS, VIDEOMENU_VIDEOSIGNAL_HD1_OPTION_COUNT, true, this); - } - else if (system_rev > 0x06) + vs_analg_ch->setHint("", LOCALE_MENU_HINT_VIDEO_ANALOG_MODE); + } + else if (system_rev > 0x06) { - if(system_rev != 10) + if(system_rev != 10) { vs_scart_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_SCART, &g_settings.analog_mode1, VIDEOMENU_VIDEOSIGNAL_HD1PLUS_SCART_OPTIONS, VIDEOMENU_VIDEOSIGNAL_HD1PLUS_SCART_OPTION_COUNT, true, this); + vs_scart_ch->setHint("", LOCALE_MENU_HINT_VIDEO_SCART_MODE); + } vs_chinch_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_CINCH, &g_settings.analog_mode2, VIDEOMENU_VIDEOSIGNAL_HD1PLUS_CINCH_OPTIONS, VIDEOMENU_VIDEOSIGNAL_HD1PLUS_CINCH_OPTION_COUNT, true, this); + vs_chinch_ch->setHint("", LOCALE_MENU_HINT_VIDEO_CINCH_MODE); } else if (system_rev == 0x01) /* TRIPLEDRAGON hack... :-) */ { @@ -254,15 +257,19 @@ int CVideoSettings::showVideoSetup() //4:3 mode CMenuOptionChooser * vs_43mode_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_43MODE, &g_settings.video_43mode, VIDEOMENU_43MODE_OPTIONS, VIDEOMENU_43MODE_OPTION_COUNT, true, this); + vs_43mode_ch->setHint("", LOCALE_MENU_HINT_VIDEO_43MODE); //display format CMenuOptionChooser * vs_dispformat_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_VIDEOFORMAT, &g_settings.video_Format, VIDEOMENU_VIDEOFORMAT_OPTIONS, VIDEOMENU_VIDEOFORMAT_OPTION_COUNT, true, this); + vs_dispformat_ch->setHint("", LOCALE_MENU_HINT_VIDEO_FORMAT); //video system CMenuOptionChooser * vs_videomodes_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_VIDEOMODE, &g_settings.video_Mode, VIDEOMENU_VIDEOMODE_OPTIONS, VIDEOMENU_VIDEOMODE_OPTION_COUNT, true, this, CRCInput::RC_nokey, "", true); + vs_videomodes_ch->setHint("", LOCALE_MENU_HINT_VIDEO_MODE); //dbdr options CMenuOptionChooser * vs_dbdropt_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_DBDR, &g_settings.video_dbdr, VIDEOMENU_DBDR_OPTIONS, VIDEOMENU_DBDR_OPTION_COUNT, true, this); + vs_dbdropt_ch->setHint("", LOCALE_MENU_HINT_VIDEO_DBDR); //video system modes submenue CMenuWidget videomodes(LOCALE_MAINSETTINGS_VIDEO, NEUTRINO_ICON_SETTINGS); @@ -277,6 +284,7 @@ int CVideoSettings::showVideoSetup() //anotify.changeNotify(NONEXISTANT_LOCALE, 0); vs_videomodes_fw = new CMenuForwarder(LOCALE_VIDEOMENU_ENABLED_MODES, true, NULL, &videomodes, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ); + vs_videomodes_fw->setHint("", LOCALE_MENU_HINT_VIDEO_MODES); } //--------------------------------------- @@ -306,7 +314,6 @@ int CVideoSettings::showVideoSetup() return res; } - void CVideoSettings::setVideoSettings() { printf("[neutrino VideoSettings] %s init video settings...\n", __FUNCTION__); @@ -339,18 +346,18 @@ void CVideoSettings::setVideoSettings() void CVideoSettings::setupVideoSystem(bool do_ask) { printf("[neutrino VideoSettings] %s setup videosystem...\n", __FUNCTION__); - videoDecoder->SetVideoSystem(g_settings.video_Mode); //FIXME - + videoDecoder->SetVideoSystem(g_settings.video_Mode); //FIXME + if (do_ask) { - if (prev_video_mode != g_settings.video_Mode) + if (prev_video_mode != g_settings.video_Mode) { frameBuffer->paintBackground(); - if (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_VIDEO_MODE_OK), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_INFO) != CMessageBox::mbrYes) + if (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_VIDEO_MODE_OK), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_INFO) != CMessageBox::mbrYes) { g_settings.video_Mode = prev_video_mode; videoDecoder->SetVideoSystem(g_settings.video_Mode); - } + } } else prev_video_mode = g_settings.video_Mode; @@ -420,8 +427,6 @@ bool CVideoSettings::changeNotify(const neutrino_locale_t OptionName, void * /* return false; } - - void CVideoSettings::next43Mode(void) { printf("[neutrino VideoSettings] %s setting 43Mode...\n", __FUNCTION__); @@ -442,7 +447,6 @@ void CVideoSettings::next43Mode(void) g_settings.video_43mode = VIDEOMENU_43MODE_OPTIONS[curmode].key; videoDecoder->setAspectRatio(-1, g_settings.video_43mode); ShowHintUTF(LOCALE_VIDEOMENU_43MODE, g_Locale->getText(text), 450, 2); - } void CVideoSettings::SwitchFormat() @@ -530,4 +534,3 @@ void CVideoSettings::setWizardMode(bool mode) printf("[neutrino VideoSettings] %s set video settings menu to mode %d...\n", __FUNCTION__, mode); is_wizard = mode; } - diff --git a/src/gui/widget/Makefile.am b/src/gui/widget/Makefile.am index 6aee81798..7b976273a 100644 --- a/src/gui/widget/Makefile.am +++ b/src/gui/widget/Makefile.am @@ -26,6 +26,7 @@ noinst_LIBRARIES = libneutrino_gui_widget.a libneutrino_gui_widget2.a libneutrino_gui_widget_a_SOURCES = \ buttons.cpp \ colorchooser.cpp \ + components.cpp \ drawable.cpp \ helpbox.cpp \ hintbox.cpp \ diff --git a/src/gui/widget/colorchooser.cpp b/src/gui/widget/colorchooser.cpp index 66a258f9f..9240d13d9 100644 --- a/src/gui/widget/colorchooser.cpp +++ b/src/gui/widget/colorchooser.cpp @@ -44,7 +44,7 @@ #include #include -#include "gui/widget/icons.h" +#include #define VALUE_R 0 diff --git a/src/gui/widget/components.cpp b/src/gui/widget/components.cpp new file mode 100644 index 000000000..52f64db69 --- /dev/null +++ b/src/gui/widget/components.cpp @@ -0,0 +1,282 @@ +/* + GUI window component classes - Neutrino-GUI + + Copyright(C) 2012, Thilo Graf (dbt) + + This class contains generic components for GUI-related parts. + + License: GPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + + + + + +//basic class CComponents +CComponents::CComponents(const int x_pos, const int y_pos, const int h, const int w) +{ + x = x_pos; + y = y_pos; + height = h; + width = w; + sw = 0; //shadow width + frameBuffer = CFrameBuffer::getInstance(); + v_screen_val.clear(); +} + +CComponents::~CComponents() +{ + clear(); +} + +//paint framebuffer stuff and fill buffer +void CComponents::paintFbItems(struct comp_fbdata_t * fbdata, const int items_count, bool do_save_bg) +{ + int i; + for(i=0; i< items_count ;i++){ + if (do_save_bg) + fbdata[i].pixbuf = saveScreen(fbdata[i].x, fbdata[i].y, fbdata[i].dx, fbdata[i].dy); + v_screen_val.push_back(fbdata[i]); + } + + for(i=0; i< items_count ;i++){ + if (fbdata[i].is_frame) + frameBuffer->paintBoxFrame(fbdata[i].x, fbdata[i].y, fbdata[i].dx, fbdata[i].dy, fbdata[i].frame_thickness, fbdata[i].color, fbdata[i].r); + else + frameBuffer->paintBoxRel(fbdata[i].x, fbdata[i].y, fbdata[i].dx, fbdata[i].dy, fbdata[i].color, fbdata[i].r); + } +} + +//screen area save +inline fb_pixel_t* CComponents::saveScreen(int ax, int ay, int dx, int dy) +{ + fb_pixel_t* pixbuf = new fb_pixel_t[dx * dy]; + frameBuffer->SaveScreen(ax, ay, dx, dy, pixbuf); + return pixbuf; +} + +//restore screen +inline void CComponents::restore() +{ + for(size_t i =0; i< v_screen_val.size() ;i++) { + if (v_screen_val[i].pixbuf != NULL){ + frameBuffer->RestoreScreen(v_screen_val[i].x, v_screen_val[i].y, v_screen_val[i].dx, v_screen_val[i].dy, v_screen_val[i].pixbuf); + delete[] v_screen_val[i].pixbuf; + } + } + v_screen_val.clear(); +} + +//clean old screen buffer +inline void CComponents::clear() +{ + for(size_t i =0; i< v_screen_val.size() ;i++) + if (v_screen_val[i].pixbuf != NULL) + delete[] v_screen_val[i].pixbuf; + v_screen_val.clear(); +} + +//------------------------------------------------------------------------------------------------------- +//sub class CComponentsDetailLine +CComponentsDetailLine::CComponentsDetailLine(const int x_pos, const int y_pos_top, const int y_pos_down, const int h_mark_top_, const int h_mark_down_, fb_pixel_t color_line, fb_pixel_t color_shadow) +{ + x = x_pos; + width = 16; + thickness = 4; + sw = 1; //shadow width + y = y_pos_top; + y_down = y_pos_down; + h_mark_top = h_mark_top_; + h_mark_down = h_mark_down_; + col_line = color_line; + col_shadow = color_shadow; +} + +CComponentsDetailLine::~CComponentsDetailLine() +{ + clear(); +} + +// y_top (=y) +// xpos +--|h_mark_up +// | +// | +// | +// | +// | +// | +// | +// | +// | +// +--|h_mark_down +// y_down + + +#define DLINE_ITEMS_COUNT 12 +//paint details line with current parameters +void CComponentsDetailLine::paint(bool do_save_bg) +{ + clear(); + + int y_mark_top = y-h_mark_top/2+thickness/2; + int y_mark_down = y_down-h_mark_down/2+thickness/2; + + comp_fbdata_t fbdata[DLINE_ITEMS_COUNT] = + { + /* vertical item mark | */ + {x+width-thickness-sw, y_mark_top, thickness, h_mark_top, col_line, 0, NULL, NULL, false, 0}, + {x+width-sw, y_mark_top, sw, h_mark_top, col_shadow, 0, NULL, NULL, false, 0}, + {x+width-thickness-sw, y_mark_top+h_mark_top, thickness+sw, sw , col_shadow, 0, NULL, NULL, false, 0}, + + /* horizontal item line - */ + {x, y, width-thickness-sw, thickness, col_line, 0, NULL, NULL, false, 0}, + {x+thickness, y+thickness, width-2*thickness-sw, sw, col_shadow, 0, NULL, NULL, false, 0}, + + /* vertical connect line [ */ + {x, y+thickness, thickness, y_down-y-thickness, col_line, 0, NULL, NULL, false, 0}, + {x+thickness, y+thickness+sw, sw, y_down-y-thickness-sw, col_shadow, 0, NULL, NULL, false, 0}, + + /* horizontal info line - */ + {x, y_down, width-thickness-sw, thickness, col_line, 0, NULL, NULL, false, 0}, + {x, y_down+thickness, width-thickness-sw, sw, col_shadow, 0, NULL, NULL, false, 0}, + + /* vertical info mark | */ + {x+width-thickness-sw, y_mark_down, thickness, h_mark_down, col_line, 0, NULL, NULL, false, 0}, + {x+width-sw, y_mark_down, sw, h_mark_down, col_shadow, 0, NULL, NULL, false, 0}, + {x+width-thickness-sw, y_mark_down+h_mark_down,thickness+sw, sw, col_shadow, 0, NULL, NULL, false, 0}, + }; + + paintFbItems(fbdata, DLINE_ITEMS_COUNT, do_save_bg); +} + +//remove painted lines from screen +void CComponentsDetailLine::hide() +{ + //caching current colors + fb_pixel_t c_tmp1, c_tmp2; + c_tmp1 = col_line; + c_tmp2 = col_shadow; + + //set background color + col_line = col_shadow = COL_BACKGROUND; + + //paint with background and restore, set last used colors + paint(false); + col_line = c_tmp1; + col_shadow = c_tmp2; +} + + +//------------------------------------------------------------------------------------------------------- +//sub class CComponentsInfoBox +CComponentsInfoBox::CComponentsInfoBox(const int x_pos, const int y_pos, const int w, const int h, bool has_shadow, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) +{ + x = x_pos; + y = y_pos; + width = w; + height = h; + rad = 0; + shadow = has_shadow; + col_frame = color_frame; + col_body = color_body; + col_shadow = color_shadow; + fr_thickness = 2; + firstPaint = true; + v_infobox_val.clear(); +} + +#define INFOBOX_ITEMS_COUNT 3 +void CComponentsInfoBox::paint(bool do_save_bg, bool fullPaint) +{ + clear(); + rad = RADIUS_LARGE; + + comp_fbdata_t fbdata[INFOBOX_ITEMS_COUNT] = + { + {x+SHADOW_OFFSET, y+SHADOW_OFFSET, width, height, col_shadow, rad, NULL, NULL, false, 0}, + {x, y, width, height, col_frame, rad, NULL, NULL, false, 0}, + {x+fr_thickness, y+fr_thickness, width-2*fr_thickness, height-2*fr_thickness, col_body, rad, NULL, NULL, false, 0}, + }; + + int start = (shadow) ? 0 : 1; + if (firstPaint) { + if (do_save_bg) { + v_infobox_val.clear(); + for(int i = start; i < INFOBOX_ITEMS_COUNT; i++) { + fbdata[i].pixbuf = saveScreen(fbdata[i].x, fbdata[i].y, fbdata[i].dx, fbdata[i].dy); + v_infobox_val.push_back(fbdata[i]); + fbdata[i].pixbuf = NULL; + } + } + // paint infobox full + paintFbItems((comp_fbdata_t*)&fbdata[start], INFOBOX_ITEMS_COUNT - start, false); + firstPaint = false; + } + else { + if (fullPaint) + // paint infobox full + paintFbItems((comp_fbdata_t*)&fbdata[start], INFOBOX_ITEMS_COUNT - start, false); + else + // paint body only + paintFbItems((comp_fbdata_t*)&fbdata[INFOBOX_ITEMS_COUNT - 1], 1, false); + } +} + +//restore infobox +void CComponentsInfoBox::restore(bool clear_) +{ + if (!v_infobox_val.empty()) { + for(size_t i =0; i< v_infobox_val.size() ;i++) { + if (v_infobox_val[i].pixbuf != NULL) { + frameBuffer->RestoreScreen(v_infobox_val[i].x, v_infobox_val[i].y, v_infobox_val[i].dx, v_infobox_val[i].dy, v_infobox_val[i].pixbuf); + if (clear_) + delete[] v_infobox_val[i].pixbuf; + } + } + if (clear_) { + v_infobox_val.clear(); + firstPaint = true; + } + } +} + +void CComponentsInfoBox::hide() +{ + //caching current colors + fb_pixel_t c_tmp1, c_tmp2, c_tmp3; + c_tmp1 = col_body; + c_tmp2 = col_shadow; + c_tmp3 = col_frame; + + //set background color + col_body = col_frame = col_shadow = COL_BACKGROUND; + + //paint with background and restore, set last used colors + paint(false); + col_body = c_tmp1; + col_shadow = c_tmp2; + col_frame = c_tmp3; +} diff --git a/src/gui/widget/components.h b/src/gui/widget/components.h new file mode 100644 index 000000000..78f2bed53 --- /dev/null +++ b/src/gui/widget/components.h @@ -0,0 +1,110 @@ +/* + GUI window component classes - Neutrino-GUI + + Copyright(C) 2012, Thilo Graf (dbt) + + This class contains generic components for GUI-related parts. + + License: GPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __COMPONENTS__ +#define __COMPONENTS__ + +#include +#include +#include +#include + +//required typedefs +typedef struct comp_fbdata_t +{ + int x; + int y; + int dx; + int dy; + fb_pixel_t color; + int r; + void * data; + fb_pixel_t* pixbuf; + bool is_frame; + int frame_thickness; +} comp_fbdata_struct_t; + +class CComponents +{ + protected: + int x, y, height, width, sw; + CFrameBuffer * frameBuffer; + std::vector v_screen_val; + + void paintFbItems(struct comp_fbdata_t * fbdata, const int items_count, bool do_save_bg = true); + fb_pixel_t* saveScreen(int ax, int ay, int dx, int dy); + void clear(); + + public: + CComponents(const int x_pos = 0, const int y_pos = 0, const int h = 0, const int w = 0); + virtual~CComponents(); + + virtual void setXPos(const int& xpos){x = xpos;}; + virtual void setYPos(const int& ypos){y = ypos;}; + virtual void setHeight(const int& h){height = h;}; + virtual void setWidth(const int& w){width = w;}; + virtual void restore(); +}; + +class CComponentsDetailLine : public CComponents +{ + private: + int thickness, y_down, h_mark_top, h_mark_down; + fb_pixel_t col_line, col_shadow; + + public: + CComponentsDetailLine( const int x_pos,const int y_pos_top, const int y_pos_down, + const int h_mark_up =16 , const int h_mark_down = 16, + fb_pixel_t color_line = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); + ~CComponentsDetailLine(); + + void paint(bool do_save_bg = true); + void hide(); + void setColor(fb_pixel_t color_line, fb_pixel_t color_shadow){col_line = color_line; col_shadow = color_shadow;}; + void setYPosDown(const int& y_pos_down){y_down = y_pos_down;}; + void setHMarkDown(const int& h_mark_down_){h_mark_down = h_mark_down_;}; +}; + +#define INFO_BOX_Y_OFFSET 2 +class CComponentsInfoBox : public CComponents +{ + private: + int rad,fr_thickness; + bool shadow; + fb_pixel_t col_frame, col_body, col_shadow; + bool firstPaint; + std::vector v_infobox_val; + + public: + CComponentsInfoBox( const int x_pos, const int y_pos, const int w, const int h, bool has_shadow = true, + fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENTDARK_PLUS_0,fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); + + void paint(bool do_save_bg = true, bool fullPaint = false); + void hide(); + void restore(bool clear_ = true); + void setColor(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;}; +}; + +#endif diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index 1f7df6ae3..fa5a77fdd 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -166,6 +166,72 @@ #define NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE "mute_zap_green" #define NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE "mute_zap_gray" +/* menu hints */ +#define NEUTRINO_ICON_HINT_BACK "hint_back" +/* main menu */ +#define NEUTRINO_ICON_HINT_TVRADIO_SWITCH "hint_tvradio_switch" +#define NEUTRINO_ICON_HINT_TVMODE "hint_tvmode" +#define NEUTRINO_ICON_HINT_RADIOMODE "hint_radiomode" +#define NEUTRINO_ICON_HINT_TIMERS "hint_timers" +#define NEUTRINO_ICON_HINT_MEDIA "hint_media" +#define NEUTRINO_ICON_HINT_GAMES "hint_games" +#define NEUTRINO_ICON_HINT_SCRIPTS "hint_scripts" +#define NEUTRINO_ICON_HINT_SETTINGS "hint_settings" +#define NEUTRINO_ICON_HINT_SERVICE "hint_service" +#define NEUTRINO_ICON_HINT_SLEEPTIMER "hint_sleeptimer" +#define NEUTRINO_ICON_HINT_REBOOT "hint_reboot" +#define NEUTRINO_ICON_HINT_SHUTDOWN "hint_shutdown" +#define NEUTRINO_ICON_HINT_INFO "hint_info" +#define NEUTRINO_ICON_HINT_CI "hint_ci" +/* media */ +#define NEUTRINO_ICON_HINT_APLAY "hint_aplay" +#define NEUTRINO_ICON_HINT_INET_RADIO "hint_inetradio" +#define NEUTRINO_ICON_HINT_MOVIE "hint_movie" +#define NEUTRINO_ICON_HINT_PICVIEW "hint_picview" + +#define NEUTRINO_ICON_HINT_MB "hint_mb" +#define NEUTRINO_ICON_HINT_FILEPLAY "hint_fileplay" + +/* settings */ +#define NEUTRINO_ICON_HINT_SAVE_SETTINGS "hint_save" +#define NEUTRINO_ICON_HINT_MANAGE_SETTINGS "hint_manage" +#define NEUTRINO_ICON_HINT_PERSONALIZE "hint_personalize" +#define NEUTRINO_ICON_HINT_EXTENDED "hint_extended" +#define NEUTRINO_ICON_HINT_VIDEO "hint_video" +#define NEUTRINO_ICON_HINT_AUDIO "hint_audio" +#define NEUTRINO_ICON_HINT_PROTECTION "hint_protection" +#define NEUTRINO_ICON_HINT_NETWORK "hint_network" +#define NEUTRINO_ICON_HINT_RECORDING "hint_recording" +#define NEUTRINO_ICON_HINT_LANGUAGE "hint_language" +#define NEUTRINO_ICON_HINT_OSD "hint_osd" +#define NEUTRINO_ICON_HINT_VFD "hint_vfd" +#define NEUTRINO_ICON_HINT_HDD "hint_hdd" +#define NEUTRINO_ICON_HINT_KEYS "hint_keys" +#define NEUTRINO_ICON_HINT_A_PIC "hint_a_pic" + +#define NEUTRINO_ICON_HINT_COLORS "hint_colors" +#define NEUTRINO_ICON_HINT_FONTS "hint_fonts" + +/* service */ +#define NEUTRINO_ICON_HINT_SERVICE_SCAN "hint_scan" +#define NEUTRINO_ICON_HINT_RELOAD_CHANNELS "hint_reload" +#define NEUTRINO_ICON_HINT_BEDIT "hint_bedit" +#define NEUTRINO_ICON_HINT_DELETE_CHANNELS "hint_delete" +#define NEUTRINO_ICON_HINT_SOFT_RESTART "hint_restart" +#define NEUTRINO_ICON_HINT_SW_UPDATE "hint_swupdate" + +/* info */ +#define NEUTRINO_ICON_HINT_IMAGEINFO "hint_imageinfo" +#define NEUTRINO_ICON_HINT_DBOXINFO "hint_dboxinfo" +#define NEUTRINO_ICON_HINT_STREAMINFO "hint_streaminfo" + +/* settings manager */ +#define NEUTRINO_ICON_HINT_RESET "hint_reset" +#define NEUTRINO_ICON_HINT_SAVEAS "hint_saveas" +#define NEUTRINO_ICON_HINT_LOAD "hint_load" +#define NEUTRINO_ICON_HINT_BACKUP "hint_backup" +#define NEUTRINO_ICON_HINT_RESTORE "hint_restore" +#define NEUTRINO_ICON_HINT_FACTORY "hint_factory" /* misc */ diff --git a/src/gui/widget/listbox.h b/src/gui/widget/listbox.h index f4f556f9c..ce52081e0 100644 --- a/src/gui/widget/listbox.h +++ b/src/gui/widget/listbox.h @@ -31,7 +31,7 @@ #include -class CListBox : public CMenuWidget +class CListBox : public CMenuTarget { protected: CFrameBuffer* frameBuffer; diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index a124d993a..8a9678ede 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -49,7 +49,9 @@ #include #endif -#include "stdlib.h" +#include + +#include #include "listframe.h" #include diff --git a/src/gui/widget/listframe.h b/src/gui/widget/listframe.h index bbabc1b59..0f5a40195 100644 --- a/src/gui/widget/listframe.h +++ b/src/gui/widget/listframe.h @@ -44,8 +44,8 @@ Nov 2005 Günther initial implementation ****************************************************************************/ -#if !defined(LISTFRAME_H_) -#define LISTFRAME_H_ +#ifndef __LISTFRAME_H__ +#define __LISTFRAME_H__ #ifdef HAVE_CONFIG_H #include diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index aa9f8d4d0..7ee2d0d70 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1,27 +1,17 @@ /* - $port: menue.cpp,v 1.178 2010/12/08 19:49:30 tuxbox-cvs Exp $ - Neutrino-GUI - DBoxII-Project Copyright (C) 2001 Steffen Hehn 'McClean' Homepage: http://dbox.cyberphoria.org/ (C) 2008, 2009 Stefan Seyfried + Copyright (C) 2012 CoolStream International Ltd - Kommentar: - - Diese GUI wurde von Grund auf neu programmiert und sollte nun vom - Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert - auf der Client-Server Idee, diese GUI ist also von der direkten DBox- - Steuerung getrennt. Diese wird dann von Daemons uebernommen. - - - License: GPL + License: GPLv2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + the Free Software Foundation This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,8 +19,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H @@ -40,7 +31,6 @@ #include #include -#include #include #include @@ -52,6 +42,8 @@ #include +#define ConnectLineBox_Width 16 + /* the following generic menu items are integrated into multiple menus at the same time */ CMenuSeparator CGenericMenuSeparator; CMenuSeparator CGenericMenuSeparatorLine(CMenuSeparator::LINE); @@ -70,9 +62,9 @@ CMenuItem::CMenuItem() directKey = CRCInput::RC_nokey; iconName = ""; iconName_Info_right = ""; - can_arrow = false; used = false; icon_frame_w = 10; + hint = NONEXISTANT_LOCALE; } void CMenuItem::init(const int X, const int Y, const int DX, const int OFFX) @@ -307,6 +299,8 @@ CMenuWidget::CMenuWidget() savescreen = false; background = NULL; preselected = -1; + details_line = NULL; + info_box = NULL; } CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index) @@ -330,6 +324,8 @@ void CMenuWidget::Init(const std::string & Icon, const int mwidth, const mn_widg mglobal = CMenuGlobal::getInstance(); //create CMenuGlobal instance only here frameBuffer = CFrameBuffer::getInstance(); iconfile = Icon; + details_line = NULL; + info_box = NULL; //handle select values if(w_index > MN_WIDGET_ID_MAX){ @@ -370,6 +366,9 @@ void CMenuWidget::Init(const std::string & Icon, const int mwidth, const mn_widg fade = true; savescreen = false; background = NULL; + has_hints = false; + hint_painted = false; + hint_height = 0; } void CMenuWidget::move(int xoff, int yoff) @@ -380,21 +379,9 @@ void CMenuWidget::move(int xoff, int yoff) CMenuWidget::~CMenuWidget() { -#if 0 - for(unsigned int count=0;countgetMode(); int pos = 0; exit_pressed = false; @@ -503,6 +491,11 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) } } } + GenericMenuBack->setHint("", NONEXISTANT_LOCALE); + checkHints(); + if (has_hints) + GenericMenuBack->setHint(NEUTRINO_ICON_HINT_BACK, LOCALE_MENU_HINT_BACK); + if(savescreen) { calcSize(); saveScreen(); @@ -515,87 +508,68 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) do { if(hasItem() && selected >= 0 && (int)items.size() > selected ) - bAllowRepeatLR = items[selected]->can_arrow; + bAllowRepeatLR = items[selected]->isMenueOptionChooser(); g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, bAllowRepeatLR); + int handled= false; if ( msg <= CRCInput::RC_MaxRC ) { timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); - } - int handled= false; - for (unsigned int i= 0; i< items.size(); i++) { - CMenuItem* titem = items[i]; - if ((titem->directKey != CRCInput::RC_nokey) && (titem->directKey == msg)) { - if (titem->isSelectable()) { - items[selected]->paint( false ); - selected= i; - msg= CRCInput::RC_ok; - } else { - // swallow-key... - handled= true; + for (unsigned int i= 0; i< items.size(); i++) { + CMenuItem* titem = items[i]; + if ((titem->directKey != CRCInput::RC_nokey) && (titem->directKey == msg)) { + if (titem->isSelectable()) { + items[selected]->paint( false ); + selected= i; + msg= CRCInput::RC_ok; + } else { + // swallow-key... + handled= true; + } + break; } - break; } } - if (!handled) { - switch (msg) { - case (NeutrinoMessages::EVT_TIMER): - if(data == fader.GetTimer()) { - if(fader.Fade()) - msg = CRCInput::RC_timeout; + if (handled) + continue; + + switch (msg) { + case (NeutrinoMessages::EVT_TIMER): + if(data == fader.GetTimer()) { + if(fader.Fade()) + msg = CRCInput::RC_timeout; + } else { + if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { + retval = menu_return::RETURN_EXIT_ALL; + msg = CRCInput::RC_timeout; + } + } + break; + case (CRCInput::RC_page_up) : + case (CRCInput::RC_page_down) : + if(msg==CRCInput::RC_page_up) { + if(current_page) { + pos = (int) page_start[current_page] - 1; + for (unsigned int count=pos ; count > 0; count--) { + CMenuItem* item = items[pos]; + if ( item->isSelectable() ) { + if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) { + items[selected]->paint( false ); + item->paint( true ); + selected = pos; + } else { + selected=pos; + paintItems(); + } + break; + } + pos--; + } } else { - if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { - retval = menu_return::RETURN_EXIT_ALL; - msg = CRCInput::RC_timeout; - } - } - break; - case (CRCInput::RC_page_up) : - case (CRCInput::RC_page_down) : - if(msg==CRCInput::RC_page_up) { - if(current_page) { - pos = (int) page_start[current_page] - 1; - for (unsigned int count=pos ; count > 0; count--) { - CMenuItem* item = items[pos]; - if ( item->isSelectable() ) { - if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) { - items[selected]->paint( false ); - item->paint( true ); - selected = pos; - } else { - selected=pos; - paintItems(); - } - break; - } - pos--; - } - } else { - pos = 0; - for (unsigned int count=0; count < items.size(); count++) { - CMenuItem* item = items[pos]; - if ( item->isSelectable() ) { - if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) { - items[selected]->paint( false ); - item->paint( true ); - selected = pos; - } else { - selected=pos; - paintItems(); - } - break; - } - pos++; - } - } - } - else if(msg==CRCInput::RC_page_down) { - pos = (int) page_start[current_page + 1];// - 1; - if(pos >= (int) items.size()) - pos = items.size()-1; - for (unsigned int count=pos ; count < items.size(); count++) { + pos = 0; + for (unsigned int count=0; count < items.size(); count++) { CMenuItem* item = items[pos]; if ( item->isSelectable() ) { if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) { @@ -611,113 +585,148 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) pos++; } } - break; - case (CRCInput::RC_up) : - case (CRCInput::RC_down) : - { - //search next / prev selectable item - for (unsigned int count=1; count< items.size(); count++) { - if (msg==CRCInput::RC_up) { - pos = selected - count; - if ( pos < 0 ) - pos += items.size(); - } - else if(msg==CRCInput::RC_down) { - pos = (selected+ count)%items.size(); - } - - CMenuItem* item = items[pos]; - - if ( item->isSelectable() ) { - if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) - { // Item is currently on screen - //clear prev. selected - items[selected]->paint( false ); - //select new - item->paint( true ); - selected = pos; - } else { - selected=pos; - paintItems(); - } - break; + } + else if(msg==CRCInput::RC_page_down) { + pos = (int) page_start[current_page + 1];// - 1; + if(pos >= (int) items.size()) + pos = items.size()-1; + for (unsigned int count=pos ; count < items.size(); count++) { + CMenuItem* item = items[pos]; + if ( item->isSelectable() ) { + if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) { + items[selected]->paint( false ); + item->paint( true ); + paintHint(pos); + selected = pos; + } else { + selected=pos; + paintItems(); } + break; } + pos++; } - break; - case (CRCInput::RC_left): - { - CMenuItem* itemX = items[selected]; - int menu_left_exit = (itemX->isMenueOptionChooser() == 1) ? 0 : g_settings.menu_left_exit; - if ((hasItem() && (selected < 0 || !items[selected]->can_arrow)) || - menu_left_exit) { - msg = CRCInput::RC_timeout; + } + break; + case (CRCInput::RC_up) : + case (CRCInput::RC_down) : + { + //search next / prev selectable item + for (unsigned int count=1; count< items.size(); count++) { + if (msg==CRCInput::RC_up) { + pos = selected - count; + if ( pos < 0 ) + pos += items.size(); + } + else if(msg==CRCInput::RC_down) { + pos = (selected+ count)%items.size(); + } + + CMenuItem* item = items[pos]; + + if ( item->isSelectable() ) { + if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) + { // Item is currently on screen + //clear prev. selected + items[selected]->paint( false ); + //select new + item->paint( true ); + paintHint(pos); + selected = pos; + } else { + selected=pos; + paintItems(); + } break; } } - case (CRCInput::RC_right): - case (CRCInput::RC_ok): - { - if(hasItem() && selected > -1 && (int)items.size() > selected) { - //exec this item... - CMenuItem* item = items[selected]; - item->msg = msg; - fader.Stop(); - int rv = item->exec( this ); - switch ( rv ) { - case menu_return::RETURN_EXIT_ALL: - retval = menu_return::RETURN_EXIT_ALL; - case menu_return::RETURN_EXIT: - msg = CRCInput::RC_timeout; - break; - case menu_return::RETURN_REPAINT: - case menu_return::RETURN_EXIT_REPAINT: - paint(); - break; - } - } else - msg = CRCInput::RC_timeout; - } - break; - - case (CRCInput::RC_home): - exit_pressed = true; - msg = CRCInput::RC_timeout; - break; - case (CRCInput::RC_timeout): - break; - - case (CRCInput::RC_sat): - case (CRCInput::RC_favorites): - g_RCInput->postMsg (msg, 0); - //close any menue on dbox-key - case (CRCInput::RC_setup): - { - msg = CRCInput::RC_timeout; - retval = menu_return::RETURN_EXIT_ALL; - } - break; - - default: - if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { - retval = menu_return::RETURN_EXIT_ALL; - msg = CRCInput::RC_timeout; - } - } - if(msg == CRCInput::RC_timeout) { - if(fade && fader.StartFadeOut()) { - timeoutEnd = CRCInput::calcTimeoutEnd( 1 ); - msg = 0; - continue; } - } + break; + case (CRCInput::RC_left): + { + if(hasItem() && selected > -1 && (int)items.size() > selected) { + CMenuItem* itemX = items[selected]; + if (!itemX->isMenueOptionChooser()) { + if (g_settings.menu_left_exit) + msg = CRCInput::RC_timeout; + break; + } + } + } + case (CRCInput::RC_right): + case (CRCInput::RC_ok): + { + if(hasItem() && selected > -1 && (int)items.size() > selected) { + //exec this item... + CMenuItem* item = items[selected]; + item->msg = msg; + fader.Stop(); + int rv = item->exec( this ); + switch ( rv ) { + case menu_return::RETURN_EXIT_ALL: + retval = menu_return::RETURN_EXIT_ALL; + case menu_return::RETURN_EXIT: + msg = CRCInput::RC_timeout; + break; + case menu_return::RETURN_REPAINT: + case menu_return::RETURN_EXIT_REPAINT: + if (fade && washidden) + fader.StartFadeIn(); + checkHints(); + paint(); + break; + } + } else + msg = CRCInput::RC_timeout; + } + break; - if ( msg <= CRCInput::RC_MaxRC ) - { - // recalculate timeout for RC-keys - timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); + case (CRCInput::RC_home): + exit_pressed = true; + msg = CRCInput::RC_timeout; + break; + case (CRCInput::RC_timeout): + break; + + case (CRCInput::RC_sat): + case (CRCInput::RC_favorites): + g_RCInput->postMsg (msg, 0); + //close any menue on dbox-key + case (CRCInput::RC_setup): + { + msg = CRCInput::RC_timeout; + retval = menu_return::RETURN_EXIT_ALL; + } + break; + case (CRCInput::RC_help): + // FIXME should we switch hints in menu without hints ? + checkHints(); + if (has_hints) + hide(); + g_settings.show_menu_hints = !g_settings.show_menu_hints; + if (has_hints) + paint(); + break; + + default: + if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { + retval = menu_return::RETURN_EXIT_ALL; + msg = CRCInput::RC_timeout; + } + } + if(msg == CRCInput::RC_timeout) { + if(fade && fader.StartFadeOut()) { + timeoutEnd = CRCInput::calcTimeoutEnd( 1 ); + msg = 0; + continue; } } + + if ( msg <= CRCInput::RC_MaxRC ) + { + // recalculate timeout for RC-keys + timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); + } frameBuffer->blit(); } while ( msg!=CRCInput::RC_timeout ); @@ -728,7 +737,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) fader.Stop(); if(!parent) - CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); + if(oldLcdMode != CVFD::getInstance()->getMode()) + CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); for (unsigned int count = 0; count < items.size(); count++) { @@ -747,16 +757,32 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) void CMenuWidget::hide() { - //frameBuffer->paintBackgroundBoxRel(x, y, width+15+SHADOW_OFFSET,height+10+SHADOW_OFFSET); if(savescreen && background) restoreScreen();//FIXME - else + else { frameBuffer->paintBackgroundBoxRel(x, y, full_width, full_height); + paintHint(-1); + } frameBuffer->blit(); /* setActive() paints item for hidden parent menu, if called from child menu */ for (unsigned int count = 0; count < items.size(); count++) items[count]->init(-1, 0, 0, 0); + hint_painted = false; + washidden = true; +} + +void CMenuWidget::checkHints() +{ + GenericMenuBack->setHint("", NONEXISTANT_LOCALE); + for (unsigned int i= 0; i< items.size(); i++) { + if(!items[i]->hintIcon.empty() || items[i]->hint != NONEXISTANT_LOCALE) { + has_hints = true; + break; + } + } + if (has_hints) + GenericMenuBack->setHint(NEUTRINO_ICON_HINT_BACK, LOCALE_MENU_HINT_BACK); } void CMenuWidget::calcSize() @@ -764,9 +790,6 @@ void CMenuWidget::calcSize() if (name != NONEXISTANT_LOCALE) nameString = g_Locale->getText(name); - /* set the max height to 9/10 of usable screen height - debatable, if the callers need a possibility to set this */ - height = frameBuffer->getScreenHeight() / 20 * 18; /* make sure its a multiple of 2 */ width = min_width; int wi, hi; @@ -782,7 +805,25 @@ void CMenuWidget::calcSize() int tmpw = items[i]->getWidth() + 10 + 10 + wi; /* 10 pixels to the left and right of the text */ if (tmpw > width) width = tmpw; +#if 0 + if(!items[i]->hintIcon.empty() || items[i]->hint != NONEXISTANT_LOCALE) { + has_hints = true; + } +#endif } + hint_height = 0; + if(g_settings.show_menu_hints && has_hints) { + int fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]->getHeight(); + hint_height = 10 + 2*fheight; + /* assuming all hint icons has the same size ! */ + int iw, ih; + frameBuffer->getIconSize(NEUTRINO_ICON_HINT_TVMODE, &iw, &ih); + if(hint_height < (ih+10)) + hint_height = ih+10; + } + /* set the max height to 9/10 of usable screen height + debatable, if the callers need a possibility to set this */ + height = (frameBuffer->getScreenHeight() - hint_height) / 20 * 18; /* make sure its a multiple of 2 */ if(height > ((int)frameBuffer->getScreenHeight() - 10)) height = frameBuffer->getScreenHeight() - 10; @@ -800,13 +841,14 @@ void CMenuWidget::calcSize() total_pages=1; for (unsigned int i= 0; i< items.size(); i++) { int item_height=items[i]->getHeight(); - itemHeightTotal+=item_height; heightCurrPage+=item_height; if(heightCurrPage > (height-hheight)) { page_start.push_back(i); total_pages++; heightCurrPage=item_height; } + if(total_pages == 1) + itemHeightTotal+=item_height; } page_start.push_back(items.size()); @@ -840,8 +882,8 @@ void CMenuWidget::calcSize() if(total_pages > 1) sb_width=15; - full_width = width+sb_width+SHADOW_OFFSET; - full_height = height+RADIUS_LARGE-2+SHADOW_OFFSET; + full_width = ConnectLineBox_Width+width+sb_width+SHADOW_OFFSET; + full_height = height+RADIUS_LARGE+SHADOW_OFFSET*2+hint_height+INFO_BOX_Y_OFFSET; setMenuPos(full_width); } @@ -849,17 +891,14 @@ void CMenuWidget::calcSize() void CMenuWidget::paint() { calcSize(); -#if 0 - if(save) - saveScreen(); -#endif - CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, nameString.c_str()); + CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8 /*, nameString.c_str()*/); - //paint shadow and backround - int rad = RADIUS_LARGE-2; - frameBuffer->paintBoxRel(x+SHADOW_OFFSET ,y + SHADOW_OFFSET ,width + sb_width ,height + rad ,COL_MENUCONTENTDARK_PLUS_0 ,rad); - frameBuffer->paintBoxRel(x ,y ,width + sb_width ,height + rad ,COL_MENUCONTENT_PLUS_0 ,rad); - frameBuffer->paintBoxRel(x ,y ,width + sb_width ,hheight ,COL_MENUHEAD_PLUS_0 ,rad, CORNER_TOP); + // paint shadow + frameBuffer->paintBoxRel(x+SHADOW_OFFSET ,y + SHADOW_OFFSET ,width + sb_width ,height + RADIUS_LARGE ,COL_MENUCONTENTDARK_PLUS_0 ,RADIUS_LARGE); + // paint head + frameBuffer->paintBoxRel(x ,y ,width + sb_width ,hheight ,COL_MENUHEAD_PLUS_0 ,RADIUS_LARGE, CORNER_TOP); + // paint background + frameBuffer->paintBoxRel(x ,y+hheight, width + sb_width, height-hheight + RADIUS_LARGE ,COL_MENUCONTENT_PLUS_0 ,RADIUS_LARGE, CORNER_BOTTOM); //paint menu head int HeadiconOffset = 0; @@ -874,22 +913,21 @@ void CMenuWidget::paint() item_start_y = y+hheight; paintItems(); + washidden = false; } void CMenuWidget::setMenuPos(const int& menu_width) { - int mn_width = menu_width; - int scr_x = frameBuffer->getScreenX(); int scr_y = frameBuffer->getScreenY(); int scr_w = frameBuffer->getScreenWidth(); int scr_h = frameBuffer->getScreenHeight(); - + //configured positions switch(g_settings.menu_pos) { case MENU_POS_CENTER: - x = offx + scr_x + ((scr_w - mn_width ) >> 1 ); + x = offx + scr_x + ((scr_w - menu_width ) >> 1 ); y = offy + scr_y + ((scr_h - full_height) >> 1 ); break; @@ -900,7 +938,7 @@ void CMenuWidget::setMenuPos(const int& menu_width) case MENU_POS_TOP_RIGHT: y = offy + scr_y + 10; - x = /*offx +*/ scr_x + scr_w - mn_width - 10; + x = /*offx +*/ scr_x + scr_w - menu_width - 10; break; case MENU_POS_BOTTOM_LEFT: @@ -910,7 +948,7 @@ void CMenuWidget::setMenuPos(const int& menu_width) case MENU_POS_BOTTOM_RIGHT: y = /*offy +*/ scr_y + scr_h - full_height - 10; - x = /*offx +*/ scr_x + scr_w - mn_width - 10; + x = /*offx +*/ scr_x + scr_w - menu_width - 10; break; } } @@ -946,12 +984,15 @@ void CMenuWidget::paintItems() item->init(x, ypos, width, iconOffset); if( (item->isSelectable()) && (selected==-1) ) { + paintHint(count); ypos = item->paint(true); selected = count; } else { bool sel = selected==((signed int) count) ; + if(sel) + paintHint(count); ypos = item->paint(sel); } } @@ -1002,30 +1043,172 @@ void CMenuWidget::saveScreen() background = new fb_pixel_t [full_width * full_height]; if(background) - frameBuffer->SaveScreen(x, y, full_width, full_height, background); + frameBuffer->SaveScreen(x-ConnectLineBox_Width, y, full_width, full_height, background); } void CMenuWidget::restoreScreen() { if(background) { if(savescreen) - frameBuffer->RestoreScreen(x, y, full_width, full_height, background); -#if 0 - delete[] background; - background = NULL; -#endif + frameBuffer->RestoreScreen(x-ConnectLineBox_Width, y, full_width, full_height, background); } } void CMenuWidget::enableSaveScreen(bool enable) { savescreen = enable; - if(!enable && background) { + if (!enable && background) { delete[] background; background = NULL; } } +void CMenuWidget::paintHint(int pos) +{ + if (!g_settings.show_menu_hints) + return; + + if (pos < 0 && !hint_painted) + return; + + int rad = RADIUS_LARGE; + + int xpos = x - ConnectLineBox_Width; + int ypos2 = y + height + rad + SHADOW_OFFSET + INFO_BOX_Y_OFFSET; + int iwidth = width+sb_width; + + if (hint_painted) { + /* clear detailsline line */ + if (details_line != NULL) + details_line->restore(); + /* clear info box */ + if (info_box != NULL) + if (pos == -1) + info_box->restore(); + hint_painted = false; + } + if (pos < 0) + return; + + CMenuItem* item = items[pos]; +//printf("paintHint: icon %s text %s\n", item->hintIcon.c_str(), g_Locale->getText(item->hint)); + + if (item->hintIcon.empty() && item->hint == NONEXISTANT_LOCALE) { + if (info_box != NULL) + info_box->restore(); + return; + } + + hint_painted = true; + + int iheight = item->getHeight(); + + //details line + int ypos1 = item->getYPosition(); + int ypos1a = ypos1 + (iheight/2)-2; + int ypos2a = ypos2 + (hint_height/2) - INFO_BOX_Y_OFFSET; + int markh = hint_height > rad*2 ? hint_height - rad*2 : hint_height; + int imarkh = iheight/2+1; + + if (details_line == NULL){ + details_line = new CComponentsDetailLine(xpos, ypos1a, ypos2a, imarkh, markh); + }else{ + details_line->setXPos(xpos); + details_line->setYPos(ypos1a); + details_line->setYPosDown(ypos2a); + details_line->setHMarkDown(markh); + } + details_line->paint(); + + if (info_box == NULL) + info_box = new CComponentsInfoBox(x, ypos2, iwidth, hint_height); + else { + info_box->setXPos(x); + info_box->setYPos(ypos2); + info_box->setWidth(iwidth); + } + info_box->paint(); + + int offset = 10; + if (!item->hintIcon.empty()) { + int iw, ih; + frameBuffer->getIconSize(item->hintIcon.c_str(), &iw, &ih); + if (iw && ih) { + int ix = x + offset; + int iy = ypos2 + (hint_height - ih)/2; + frameBuffer->paintIcon(item->hintIcon.c_str(), ix, iy); + offset += iw + 10; + } + } + if (item->hint == NONEXISTANT_LOCALE) + return; + + int HintFont = SNeutrinoSettings::FONT_TYPE_MENU_HINT; + int fheight = g_Font[HintFont]->getHeight(); + + std::string str1, str2; + std::string str = g_Locale->getText(item->hint); + std::string::size_type spos = str.find_first_of("\n"); + if (spos != std::string::npos) { + str1 = str.substr(0, spos); + str2 = str.substr(spos+1); + } + else + str1 = str; + + if ((!str1.empty()) || (!str1.empty())) { + int wBox = iwidth - 6 - offset; + int wStr1 = 0, wStr2 = 0; + if (!str1.empty()) + wStr1 = g_Font[HintFont]->getRenderWidth(str1); + if (!str2.empty()) + wStr2 = g_Font[HintFont]->getRenderWidth(str2); + if ((wStr1 > wBox) || (wStr2 > wBox)) { + str = g_Locale->getText(item->hint); + // replace "\n" with " " + spos = str.find_first_of("\n"); + if (spos != std::string::npos) + str.replace(spos, 1, " "); + spos = str.length(); + if (spos >= 1) { + std::string BreakChars = "+-/"; + str1 = str; + wStr1 = g_Font[HintFont]->getRenderWidth(str1); + int count = 0; + std::string bChar; + while (wStr1 > wBox) { + spos = str1.find_last_of(BreakChars + " "); + if (spos != std::string::npos) { + str1 = str1.substr(0, spos+1); + // Last delimiter remember if it's not a whitespace + size_t len = str1.length(); + size_t spos2 = str1.find_last_of(BreakChars); + if (len == spos2+1) + bChar = str1.substr(spos2, spos2+1); + else + bChar = ""; + // Remove last delimiter + str1 = str1.substr(0, spos); + } + // Width of string with delimiter + wStr1 = g_Font[HintFont]->getRenderWidth(str1 + bChar); + count++; + if (count > 20) + break; + } + // Last delimiter append again + str1 += bChar; + str2 = str.substr(spos+1); + } + } + ypos2 += (hint_height-fheight*2)/2; + if (!str1.empty()) + g_Font[HintFont]->RenderString(x+offset, ypos2+fheight, wBox, str1, COL_MENUCONTENT, 0, true); // UTF-8 + if (!str2.empty()) + g_Font[HintFont]->RenderString(x+offset, ypos2+fheight*2, wBox, str2, COL_MENUCONTENT, 0, true); // UTF-8 + } +} + //------------------------------------------------------------------------------------------------------------------------------- CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, CChangeObserver * const Observ, const int print_offset, const int special_value, const neutrino_locale_t special_value_name, const char * non_localized_name, bool sliderOn) { @@ -1043,7 +1226,6 @@ CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name, localized_value_name = special_value_name; optionString = non_localized_name; - can_arrow = true; observ = Observ; slider_on = sliderOn; } @@ -1107,7 +1289,6 @@ CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * observ = Observ; directKey = DirectKey; iconName = IconName; - can_arrow = true; pulldown = Pulldown; for (unsigned int i = 0; i < number_of_options; i++) { @@ -1130,7 +1311,6 @@ CMenuOptionChooser::CMenuOptionChooser(const char* OptionName, int * const Optio observ = Observ; directKey = DirectKey; iconName = IconName; - can_arrow = true; pulldown = Pulldown; for (unsigned int i = 0; i < number_of_options; i++) { @@ -1155,7 +1335,6 @@ CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * observ = Observ; directKey = DirectKey; iconName = IconName; - can_arrow = true; pulldown = Pulldown; for (unsigned int i = 0; i < number_of_options; i++) options.push_back(Options[i]); @@ -1174,7 +1353,6 @@ CMenuOptionChooser::CMenuOptionChooser(const char* OptionName, int * const Optio observ = Observ; directKey = DirectKey; iconName = IconName; - can_arrow = true; pulldown = Pulldown; for (unsigned int i = 0; i < number_of_options; i++) options.push_back(Options[i]); @@ -1205,7 +1383,9 @@ int CMenuOptionChooser::exec(CMenuTarget*) int select = -1; char cnt[5]; CMenuWidget* menu = new CMenuWidget(optionNameString.c_str(), NEUTRINO_ICON_SETTINGS); - menu->addIntroItems(); + /* FIXME: BACK button with hints enabled - parent menu getting holes, possible solution + * to hide parent, or add hints ? */ + menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); // menu->move(20, 0); CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); for(unsigned int count = 0; count < number_of_options; count++) @@ -1324,14 +1504,28 @@ int CMenuOptionChooser::getWidth(void) CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t OptionName, char* OptionValue, bool Active, CChangeObserver* Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown) { height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); - optionName = OptionName; + optionNameString = g_Locale->getText(OptionName); + optionName = OptionName; + active = Active; + optionValue = OptionValue; + observ = Observ; + + directKey = DirectKey; + iconName = IconName; + pulldown = Pulldown; +} + +CMenuOptionStringChooser::CMenuOptionStringChooser(const char* OptionName, char* OptionValue, bool Active, CChangeObserver* Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown) +{ + height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); + optionNameString = OptionName; + optionName = NONEXISTANT_LOCALE; active = Active; optionValue = OptionValue; observ = Observ; directKey = DirectKey; iconName = IconName; - can_arrow = true; pulldown = Pulldown; } @@ -1363,8 +1557,8 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) if (parent) parent->hide(); - CMenuWidget* menu = new CMenuWidget(optionName, NEUTRINO_ICON_SETTINGS); - menu->addIntroItems(); + CMenuWidget* menu = new CMenuWidget(optionNameString.c_str(), NEUTRINO_ICON_SETTINGS); + menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); //if(parent) menu->move(20, 0); CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); for(unsigned int count = 0; count < options.size(); count++) @@ -1412,7 +1606,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) int CMenuOptionStringChooser::paint( bool selected ) { - const char * l_optionName = g_Locale->getText(optionName); + const char * l_optionName = optionNameString.c_str(); //paint item prepareItem(selected, height); @@ -1445,7 +1639,7 @@ CMenuOptionLanguageChooser::~CMenuOptionLanguageChooser() int CMenuOptionLanguageChooser::exec(CMenuTarget*) { - strncpy(g_settings.language, optionValue.c_str(), sizeof(g_settings.language)); + strncpy(g_settings.language, optionValue.c_str(), sizeof(g_settings.language)-1); if(observ) observ->changeNotify(LOCALE_LANGUAGESETUP_SELECT, (void *) optionValue.c_str()); return menu_return::RETURN_EXIT; diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 8a4fa70b6..1d694afa9 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -27,8 +27,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ @@ -40,6 +41,7 @@ #include #include #include +#include #include #include @@ -92,10 +94,12 @@ class CMenuItem bool active; neutrino_msg_t directKey; neutrino_msg_t msg; - bool can_arrow; std::string iconName; std::string selected_iconName; std::string iconName_Info_right; + std::string hintIcon; + neutrino_locale_t hint; + CMenuItem(); virtual ~CMenuItem(){} @@ -112,6 +116,7 @@ class CMenuItem { return 0; } + virtual int getYPosition(void) const { return y; } virtual bool isSelectable(void) const { @@ -137,6 +142,7 @@ class CMenuItem virtual void paintItemSlider( const bool select_mode, const int &item_height, const int &optionvalue, const int &factor, const char * left_text=NULL, const char * right_text=NULL); virtual int isMenueOptionChooser(void) const{return 0;} + void setHint(std::string icon, neutrino_locale_t text) { hintIcon = icon; hint = text; } }; class CMenuSeparator : public CMenuItem @@ -170,6 +176,22 @@ class CMenuSeparator : public CMenuItem void setString(const std::string& text); }; +class CNonLocalizedMenuSeparator : public CMenuSeparator +{ + const char * the_text; + +public: + CNonLocalizedMenuSeparator(const char * ptext, const neutrino_locale_t Text1) : CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, Text1) + { + the_text = ptext; + } + + virtual const char * getString(void) + { + return the_text; + } +}; + class CMenuForwarder : public CMenuItem { const char * option; @@ -333,6 +355,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser class CMenuOptionStringChooser : public CMenuItem { neutrino_locale_t optionName; + std::string optionNameString; int height; char * optionValue; std::vector options; @@ -341,6 +364,8 @@ class CMenuOptionStringChooser : public CMenuItem public: CMenuOptionStringChooser(const neutrino_locale_t OptionName, char* OptionValue, bool Active = false, CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false); + CMenuOptionStringChooser(const char* OptionName, char* OptionValue, bool Active = false, CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false); + ~CMenuOptionStringChooser(); void addOption(const char * value); @@ -398,6 +423,9 @@ class CMenuWidget : public CMenuTarget private: mn_widget_id_t widget_index; CMenuGlobal *mglobal; + CComponentsDetailLine *details_line; + CComponentsInfoBox *info_box; + protected: std::string nameString; neutrino_locale_t name; @@ -420,16 +448,21 @@ class CMenuWidget : public CMenuTarget fb_pixel_t *background; int full_width, full_height; bool savescreen; - + int hint_height; + bool has_hints; // is any items has hints + bool hint_painted; // is hint painted + unsigned int item_start_y; unsigned int current_page; unsigned int total_pages; bool exit_pressed; bool from_wizard; bool fade; + bool washidden; void Init(const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index); virtual void paintItems(); + void checkHints(); void calcSize(); void saveScreen(); void restoreScreen(); @@ -470,6 +503,7 @@ class CMenuWidget : public CMenuTarget void setWizardMode(bool _from_wizard) { from_wizard = _from_wizard;}; void enableFade(bool _enable) { fade = _enable; }; void enableSaveScreen(bool enable); + void paintHint(int num); enum { MENU_POS_CENTER , diff --git a/src/gui/widget/mountchooser.cpp b/src/gui/widget/mountchooser.cpp index a5d927709..b205b99d7 100644 --- a/src/gui/widget/mountchooser.cpp +++ b/src/gui/widget/mountchooser.cpp @@ -88,11 +88,12 @@ int CMountChooser::exec(CMenuTarget* parent, const std::string & actionKey) return CMenuWidget::exec(parent, actionKey); } } - +#if 0 +//never used void CMountChooser::setSelectedItem(int selection) { selected = selection; } - +#endif diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index db2bcee47..ec8e4932d 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -48,6 +48,8 @@ #include #endif +#include + #include "msgbox.h" #include diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index 85905a4f0..ead68cda1 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -54,7 +54,6 @@ #include #include "textbox.h" -#include #include class CMsgBox diff --git a/src/gui/widget/stringinput.h b/src/gui/widget/stringinput.h index 0da2a07f2..0a5a5aea9 100644 --- a/src/gui/widget/stringinput.h +++ b/src/gui/widget/stringinput.h @@ -37,7 +37,6 @@ #include #include -#include #include diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index 97bed729c..c21089569 100644 --- a/src/gui/widget/stringinput_ext.cpp +++ b/src/gui/widget/stringinput_ext.cpp @@ -116,13 +116,21 @@ void CExtendedInput::calculateDialog() hintPosY = height -10; - if (hint_1 != NONEXISTANT_LOCALE) + if (hint_1 != NONEXISTANT_LOCALE) { height += iheight; - if (hint_2 != NONEXISTANT_LOCALE) + int hw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_1), true); + if(width < hw + 40) + width = hw + 40; + } + if (hint_2 != NONEXISTANT_LOCALE) { height += iheight; + int hw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_2), true); + if(width < hw) + width = hw; + } - x = ((frameBuffer->getScreenWidth() - width)>>1); - y = ((frameBuffer->getScreenHeight() - height)>>1); + x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth() - width)>>1); + y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - height)>>1); hintPosY += y; } diff --git a/src/gui/widget/stringinput_ext.h b/src/gui/widget/stringinput_ext.h index eb49b14ad..42b632391 100644 --- a/src/gui/widget/stringinput_ext.h +++ b/src/gui/widget/stringinput_ext.h @@ -99,6 +99,7 @@ class CExtendedInput_Item virtual bool isSelectable(){return true;}; virtual void keyPressed( int /*key*/ ){}; + virtual ~CExtendedInput_Item() {}; }; class CExtendedInput_Item_Spacer : public CExtendedInput_Item @@ -225,8 +226,7 @@ class CIntInput : public CExtendedInput char* getValue() { return myValueStringOutput; } + void updateValue() { onBeforeExec(); } }; - - #endif diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 8a10ce34e..02a139261 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -55,10 +55,11 @@ #include #endif +#include + #include "textbox.h" #include -#define TEXT_BORDER_WIDTH 8 #define SCROLL_FRAME_WIDTH 10 #define SCROLL_MARKER_BORDER 2 @@ -163,6 +164,7 @@ void CTextBox::initVar(void) m_nLinesPerPage = 0; m_nCurrentLine = 0; m_nCurrentPage = 0; + text_border_width = 8; m_cFrame.iX = g_settings.screen_StartX + ((g_settings.screen_EndX - g_settings.screen_StartX - MIN_WINDOW_WIDTH) >>1); m_cFrame.iWidth = MIN_WINDOW_WIDTH; @@ -172,16 +174,37 @@ void CTextBox::initVar(void) m_nMaxHeight = MAX_WINDOW_HEIGHT; m_nMaxWidth = MAX_WINDOW_WIDTH; - m_textBackgroundColor = COL_MENUCONTENT_PLUS_0; - + m_textBackgroundColor = COL_MENUCONTENT_PLUS_0; + m_textColor = COL_MENUCONTENT; + m_nPaintBackground = true; + m_nBgRadius = 0; + m_nBgRadiusType = CORNER_ALL; + m_cLineArray.clear(); } +void CTextBox::setTextFont(Font* font_text) +{ + if ((m_pcFontText != font_text) && (font_text != NULL)) { + m_pcFontText = font_text; + m_nFontTextHeight = m_pcFontText->getHeight(); + initFramesRel(); + refreshTextLineArray(); + } +} + +void CTextBox::setTextBorderWidth(int border) +{ + text_border_width = border; + initFramesRel(); + refreshTextLineArray(); +} + void CTextBox::reSizeMainFrameWidth(int textWidth) { //TRACE("[CTextBox]->ReSizeMainFrameWidth: %d, current: %d\r\n",textWidth,m_cFrameTextRel.iWidth); - int iNewWindowWidth = textWidth + m_cFrameScrollRel.iWidth + 2*TEXT_BORDER_WIDTH; + int iNewWindowWidth = textWidth + m_cFrameScrollRel.iWidth + 2*text_border_width; if( iNewWindowWidth > m_nMaxWidth) iNewWindowWidth = m_nMaxWidth; if( iNewWindowWidth < MIN_WINDOW_WIDTH) iNewWindowWidth = MIN_WINDOW_WIDTH; @@ -196,8 +219,7 @@ void CTextBox::reSizeMainFrameHeight(int textHeight) { TRACE("[CTextBox]->ReSizeMainFrameHeight: %d, current: %d\r\n",textHeight,m_cFrameTextRel.iHeight); - int iNewWindowHeight = textHeight - + 2*TEXT_BORDER_WIDTH; + int iNewWindowHeight = textHeight + 2*text_border_width; if( iNewWindowHeight > m_nMaxHeight) iNewWindowHeight = m_nMaxHeight; if( iNewWindowHeight < MIN_WINDOW_HEIGHT) iNewWindowHeight = MIN_WINDOW_HEIGHT; @@ -233,7 +255,7 @@ void CTextBox::initFramesRel(void) m_cFrameTextRel.iWidth = m_cFrame.iWidth - m_cFrameScrollRel.iWidth; - m_nLinesPerPage = std::max(1, (m_cFrameTextRel.iHeight - (2*TEXT_BORDER_WIDTH)) / m_nFontTextHeight); + m_nLinesPerPage = std::max(1, (m_cFrameTextRel.iHeight - (2*text_border_width)) / m_nFontTextHeight); #if 0 TRACE_1("Frames\r\n\tScren:\t%3d,%3d,%3d,%3d\r\n\tMain:\t%3d,%3d,%3d,%3d\r\n\tText:\t%3d,%3d,%3d,%3d \r\n\tScroll:\t%3d,%3d,%3d,%3d \r\n", @@ -278,15 +300,11 @@ void CTextBox::refreshTextLineArray(void) m_nNrOfLines = 0; if( m_nMode & AUTO_WIDTH) - { /* In case of autowidth, we calculate the max allowed width of the textbox */ - lineBreakWidth = MAX_WINDOW_WIDTH - m_cFrameScrollRel.iWidth - 2*TEXT_BORDER_WIDTH; - } + lineBreakWidth = MAX_WINDOW_WIDTH - m_cFrameScrollRel.iWidth - 2*text_border_width; else - { /* If not autowidth, we just take the actuall textframe width */ - lineBreakWidth = m_cFrameTextRel.iWidth - 2*TEXT_BORDER_WIDTH; - } + lineBreakWidth = m_cFrameTextRel.iWidth - 2*text_border_width; if(max_width) lineBreakWidth = max_width; //printf("TextBox: lineBreakWidth %d\n", lineBreakWidth); @@ -297,13 +315,9 @@ void CTextBox::refreshTextLineArray(void) while(loop) { if(m_nMode & NO_AUTO_LINEBREAK) - { pos = m_cText.find_first_of("\n",pos_prev); - } else - { - pos = m_cText.find_first_of("\n-. ",pos_prev); - } + pos = m_cText.find_first_of("\n/-. ",pos_prev); //TRACE_1(" pos: %d pos_prev: %d\r\n",pos,pos_prev); @@ -369,7 +383,7 @@ void CTextBox::refreshTextLineArray(void) reSizeMainFrameHeight(m_nNrOfLines * m_nFontTextHeight); } - m_nLinesPerPage = std::max(1, (m_cFrameTextRel.iHeight - (2*TEXT_BORDER_WIDTH)) / m_nFontTextHeight); + m_nLinesPerPage = std::max(1, (m_cFrameTextRel.iHeight - (2*text_border_width)) / m_nFontTextHeight); m_nNrOfPages = ((m_nNrOfLines-1) / m_nLinesPerPage) + 1; if(m_nCurrentPage >= m_nNrOfPages) @@ -428,26 +442,28 @@ void CTextBox::refreshText(void) if( frameBuffer == NULL) return; //TRACE(" CTextBox::refreshText: %d,%s\r\n",m_nCurrentLine,m_cLineArray[m_nCurrentLine].c_str()); //Paint Text Background - frameBuffer->paintBoxRel(m_cFrameTextRel.iX+m_cFrame.iX, m_cFrameTextRel.iY+m_cFrame.iY, - m_cFrameTextRel.iWidth, m_cFrameTextRel.iHeight, m_textBackgroundColor); - + if (m_nPaintBackground) + frameBuffer->paintBoxRel(m_cFrameTextRel.iX+m_cFrame.iX, /*m_cFrameTextRel.iY+*/m_cFrame.iY, + m_cFrameTextRel.iWidth, m_cFrameTextRel.iHeight, m_textBackgroundColor, m_nBgRadius, m_nBgRadiusType); + if( m_nNrOfLines <= 0) return; - int y = m_cFrameTextRel.iY + TEXT_BORDER_WIDTH; + int y = m_cFrameTextRel.iY + text_border_width; int i; int x_center = 0; +// y += m_nFontTextHeight + ((m_cFrameTextRel.iHeight - m_nFontTextHeight * std::min(m_nLinesPerPage, m_nNrOfLines)) >> 1) - text_border_width; + y += m_nFontTextHeight + ((m_cFrameTextRel.iHeight - m_nFontTextHeight * m_nLinesPerPage) >> 1) - text_border_width; for(i = m_nCurrentLine; i < m_nNrOfLines && i < m_nCurrentLine + m_nLinesPerPage; i++) { - y += m_nFontTextHeight; - + + //calculate centered xpos if( m_nMode & CENTER ) - { x_center = (m_cFrameTextRel.iWidth - m_pcFontText->getRenderWidth(m_cLineArray[i], true))>>1; - } - m_pcFontText->RenderString(m_cFrameTextRel.iX + TEXT_BORDER_WIDTH + x_center+m_cFrame.iX, + m_pcFontText->RenderString(m_cFrameTextRel.iX + text_border_width + x_center+m_cFrame.iX, y+m_cFrame.iY, m_cFrameTextRel.iWidth, m_cLineArray[i].c_str(), - COL_MENUCONTENT, 0, true); // UTF-8 + m_textColor, 0, true); // UTF-8 + y += m_nFontTextHeight; } frameBuffer->blit(); } diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h index b639b75b9..a308d05f9 100644 --- a/src/gui/widget/textbox.h +++ b/src/gui/widget/textbox.h @@ -59,8 +59,9 @@ #include #include -#include #include +#include +#include #define TRACE printf #define TRACE_1 printf @@ -117,12 +118,18 @@ class CTextBox int m_nCurrentLine; int m_nCurrentPage; + int m_nBgRadius; + int m_nBgRadiusType; + bool m_nPaintBackground; + Font* m_pcFontText; int m_nFontTextHeight; CFBWindow::color_t m_textBackgroundColor; + fb_pixel_t m_textColor; CFrameBuffer * frameBuffer; int max_width; + int text_border_width; public: /* Constructor */ CTextBox(); @@ -138,8 +145,13 @@ class CTextBox /* Functions */ void refresh(void); void scrollPageDown(const int pages); - void scrollPageUp(const int pages); + void scrollPageUp(const int pages); + void enableBackgroundPaint(bool mode = true){m_nPaintBackground = mode;}; bool setText(const std::string* newText, int _max_width = 0); + void setTextColor(fb_pixel_t color_text){ m_textColor = color_text;}; + void setBackGroundRadius(const int radius, const int type){m_nBgRadius = radius; m_nBgRadiusType = type;}; + void setTextBorderWidth(int border); + void setTextFont(Font* font_text); inline bool isPainted(void) {if( frameBuffer == NULL) return (false); else return (true);}; inline CBox getWindowsPos(void) {return(m_cFrame);}; diff --git a/src/gui/zapit_setup.cpp b/src/gui/zapit_setup.cpp index 117a70c03..f8e18168c 100644 --- a/src/gui/zapit_setup.cpp +++ b/src/gui/zapit_setup.cpp @@ -27,7 +27,7 @@ #endif -#include "gui/zapit_setup.h" +#include "zapit_setup.h" #include #include @@ -67,12 +67,20 @@ void CZapitSetup::showMenu() zapit->addIntroItems(LOCALE_ZAPITSETUP_INFO); //zapit - zapit->addItem(new CMenuOptionChooser(LOCALE_ZAPITSETUP_LAST_USE, &g_settings.uselastchannel, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_ZAPITSETUP_LAST_USE, &g_settings.uselastchannel, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mc->setHint("", LOCALE_MENU_HINT_LAST_USE); + zapit->addItem(mc); CSelectChannelWidget select; zapit->addItem(GenericMenuSeparatorLine); - zapit->addItem(zapit1 = new CMenuForwarder(LOCALE_ZAPITSETUP_LAST_TV , !g_settings.uselastchannel, g_settings.StartChannelTV, &select, "tv", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN )); - zapit->addItem(zapit2 = new CMenuForwarder(LOCALE_ZAPITSETUP_LAST_RADIO , !g_settings.uselastchannel, g_settings.StartChannelRadio, &select, "radio", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW )); + + zapit1 = new CMenuForwarder(LOCALE_ZAPITSETUP_LAST_TV , !g_settings.uselastchannel, g_settings.StartChannelTV, &select, "tv", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN ); + zapit1->setHint("", LOCALE_MENU_HINT_LAST_TV); + zapit->addItem(zapit1); + + zapit2 = new CMenuForwarder(LOCALE_ZAPITSETUP_LAST_RADIO , !g_settings.uselastchannel, g_settings.StartChannelRadio, &select, "radio", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW ); + zapit2->setHint("", LOCALE_MENU_HINT_LAST_RADIO); + zapit->addItem(zapit2); zapit->exec(NULL, ""); delete zapit; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b8dc9b6bd..d835da12e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -38,9 +38,11 @@ #include #include #include +#include +#include +#include #include -#include #include "global.h" #include "neutrino.h" @@ -78,7 +80,6 @@ #include "gui/rc_lock.h" #include "gui/scan_setup.h" #include "gui/start_wizard.h" -#include "gui/timerlist.h" #include "gui/videosettings.h" #include "gui/widget/hintbox.h" @@ -101,7 +102,7 @@ #include #include #include -#include +#include #include @@ -111,12 +112,11 @@ #include #include -#include #include #include -#include "libdvbsub/dvbsub.h" -#include "libtuxtxt/teletext.h" +#include +#include #include int old_b_id = -1; @@ -144,12 +144,6 @@ void * nhttpd_main_thread(void *data); static pthread_t nhttpd_thread ; //#define DISABLE_SECTIONSD -extern int sectionsd_stop; -#ifndef DISABLE_SECTIONSD -//static pthread_t sections_thread; -#endif -void * sectionsd_main_thread(void *data); -extern bool timeset; // sectionsd extern cVideo * videoDecoder; extern cDemux *videoDemux; @@ -441,6 +435,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.casystem_display = configfile.getInt32("casystem_display", 2 );//mini ca mode default g_settings.scrambled_message = configfile.getBool("scrambled_message", true ); g_settings.volume_pos = configfile.getInt32("volume_pos", 0 ); + g_settings.volume_digits = configfile.getBool("volume_digits", true); g_settings.menu_pos = configfile.getInt32("menu_pos", CMenuWidget::MENU_POS_CENTER); g_settings.show_menu_hints = configfile.getBool("show_menu_hints", true); g_settings.infobar_show_sysfs_hdd = configfile.getBool("infobar_show_sysfs_hdd" , true ); @@ -602,9 +597,18 @@ int CNeutrinoApp::loadSetup(const char * fname) if(g_settings.auto_delete) { if(strcmp(g_settings.timeshiftdir, g_settings.network_nfs_recordingdir)) { - char buf[512]; - sprintf(buf, "rm -f %s/*_temp.ts %s/*_temp.xml &", timeshiftDir, timeshiftDir); - safe_system(buf); + DIR *d = opendir(timeshiftDir); + if(d){ + while (struct dirent *e = readdir(d)) + { + std::string filename = e->d_name; + if ((filename.find("_temp.ts") == filename.size() - 8) || (filename.find("_temp.xml") == filename.size() - 9)) + { + remove(filename.c_str()); + } + } + closedir(d); + } } } g_settings.record_hours = configfile.getInt32( "record_hours", 4 ); @@ -890,6 +894,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32("casystem_display" , g_settings.casystem_display ); configfile.setBool("scrambled_message" , g_settings.scrambled_message ); configfile.setInt32("volume_pos" , g_settings.volume_pos ); + configfile.setBool("volume_digits", g_settings.volume_digits); configfile.setInt32("menu_pos" , g_settings.menu_pos); configfile.setBool("show_menu_hints" , g_settings.show_menu_hints); configfile.setInt32("infobar_show_sysfs_hdd" , g_settings.infobar_show_sysfs_hdd ); @@ -1619,9 +1624,6 @@ void CNeutrinoApp::SetupTiming() } -bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); -bool sectionsd_isReady(void); - #define LCD_UPDATE_TIME_RADIO_MODE (6 * 1000 * 1000) #define LCD_UPDATE_TIME_TV_MODE (60 * 1000 * 1000) @@ -1769,7 +1771,47 @@ void CNeutrinoApp::InitSectiondClient() g_Sectionsd->registerEvent(CSectionsdClient::EVT_WRITE_SI_FINISHED, 222, NEUTRINO_UDS_NAME); } -extern bool timer_wakeup;//timermanager.cpp +#if HAVE_COOL_HARDWARE +#include +#endif + +void wake_up( bool &wakeup) +{ +#if HAVE_COOL_HARDWARE +#ifndef FP_IOCTL_CLEAR_WAKEUP_TIMER +#define FP_IOCTL_CLEAR_WAKEUP_TIMER 10 +#endif + +#define FP_IOCTL_SET_RTC 0x101 +#define FP_IOCTL_GET_RTC 0x102 + + int fd = open("/dev/display", O_RDONLY); + if (fd < 0) { + perror("/dev/display"); + } else { + wakeup_data_t wk; + memset(&wk, 0, sizeof(wk)); + int ret = ioctl(fd, IOC_VFD_GET_WAKEUP, &wk); + if(ret >= 0) + wakeup = ((wk.source == WAKEUP_SOURCE_TIMER) /* || (wk.source == WAKEUP_SOURCE_PWLOST)*/); + close(fd); + } + printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no"); +#endif + /* not platform specific - this is created by the init process */ + if (access("/tmp/.timer_wakeup", F_OK) == 0) { + wakeup = true; + unlink("/tmp/.timer_wakeup"); + } + + if(!wakeup){ + const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off"; + printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script); + if (my_system(neutrino_leave_deepstandby_script) != 0) + perror( neutrino_leave_deepstandby_script ); + } +} + int CNeutrinoApp::run(int argc, char **argv) { time_t starttime = time_monotonic_ms(); @@ -1824,6 +1866,7 @@ fprintf(stderr, "[neutrino start] %d -> %5ld ms\n", __LINE__, time_monotonic_ms ZapStart_arg.uselastchannel = g_settings.uselastchannel; ZapStart_arg.video_mode = g_settings.video_Mode; ZapStart_arg.ci_clock = g_settings.ci_clock; + ZapStart_arg.volume = g_settings.current_volume; /* create decoders, read channels */ CZapit::getInstance()->Start(&ZapStart_arg); @@ -1831,7 +1874,7 @@ fprintf(stderr, "[neutrino start] %d -> %5ld ms\n", __LINE__, time_monotonic_ms // init audio settings audioDecoder->SetSRS(g_settings.srs_enable, g_settings.srs_nmgr_enable, g_settings.srs_algo, g_settings.srs_ref_volume); - audioDecoder->setVolume(g_settings.current_volume, g_settings.current_volume); + //audioDecoder->setVolume(g_settings.current_volume, g_settings.current_volume); audioDecoder->SetHdmiDD((HDMI_ENCODED_MODE)g_settings.hdmi_dd); audioDecoder->SetSpdifDD(g_settings.spdif_dd ? true : false); audioDecoder->EnableAnalogOut(g_settings.analog_out ? true : false); @@ -1852,7 +1895,9 @@ fprintf(stderr, "[neutrino start] %d -> %5ld ms\n", __LINE__, time_monotonic_ms g_Zapit->setStandby(false); //timer start - pthread_create (&timer_thread, NULL, timerd_main_thread, (void *) NULL); + bool timer_wakeup = false; + wake_up( timer_wakeup ); + pthread_create (&timer_thread, NULL, timerd_main_thread, (void *) timer_wakeup); init_cec_setting = true; if(!(g_settings.shutdown_timer_record_type && timer_wakeup && g_settings.hdmi_cec_mode)){ @@ -1926,10 +1971,12 @@ fprintf(stderr, "[neutrino start] %d -> %5ld ms\n", __LINE__, time_monotonic_ms g_CamHandler->init(); #ifndef ASSUME_MDEV - system("mkdir /media/sda1 2> /dev/null"); - system("mount /media/sda1 2> /dev/null"); - system("mkdir /media/sdb1 2> /dev/null"); - system("mount /media/sdb1 2> /dev/null"); + const char hddsda1[] = "/media/sda1"; + const char hddsdb1[] = "/media/sdb1"; + mkdir(hddsda1, 0755); + mount("/dev/sda1", hddsda1, "ext3", 0, NULL); + mkdir(hddsdb1,0755); + mount("/dev/sdb1", hddsdb1, "ext3", 0, NULL); #endif CFSMounter::automount(); @@ -2049,7 +2096,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) } g_RCInput->clearRCMsg(); if(g_settings.power_standby || init_cec_setting) - standbyMode(true); + standbyMode(true, true); InfoClock = CInfoClock::getInstance(); if(g_settings.mode_clock) @@ -2120,32 +2167,24 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) else if( msg == (neutrino_msg_t) g_settings.key_tvradio_mode ) { switchTvRadioMode(); //used with defined rc key TODO: do we really need this, because we already have a specified key on the remote control } - else if( msg == (neutrino_msg_t) g_settings.key_subchannel_up ) { + else if( msg == (neutrino_msg_t) g_settings.key_subchannel_up || msg == (neutrino_msg_t) g_settings.key_subchannel_down) { if( !g_RemoteControl->subChannels.empty() ) { StopSubtitles(); - g_RemoteControl->subChannelUp(); + if( msg == (neutrino_msg_t) g_settings.key_subchannel_up ) + g_RemoteControl->subChannelUp(); + else if( msg == (neutrino_msg_t) g_settings.key_subchannel_down ) + g_RemoteControl->subChannelDown(); g_InfoViewer->showSubchan(); - } else if (g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) { + } + else if (g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) { g_volume->setVolume(msg, true); - } else if((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) || (g_settings.mode_left_right_key_tv == SNeutrinoSettings::INFOBAR)) { + } + else if((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) || (g_settings.mode_left_right_key_tv == SNeutrinoSettings::INFOBAR)) { if(channelList->getSize()) { showInfo(); } - } else - quickZap( msg ); - } - else if( msg == (neutrino_msg_t) g_settings.key_subchannel_down ) { - if( !g_RemoteControl->subChannels.empty() ) { - StopSubtitles(); - g_RemoteControl->subChannelDown(); - g_InfoViewer->showSubchan(); - } else if(g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) { - g_volume->setVolume(msg, true); - } else if((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) || (g_settings.mode_left_right_key_tv == SNeutrinoSettings::INFOBAR)) { - if(channelList->getSize()) { - showInfo(); - } - } else + } + else quickZap( msg ); } /* in case key_subchannel_up/down redefined */ @@ -2724,8 +2763,7 @@ _repeat: if(timer.epgID!=0) { CEPGData epgdata; zAddData += " :\n"; - //if (g_Sectionsd->getEPGid(timer.epgID, timer.epg_starttime, &epgdata)) - if (sectionsd_getEPGid(timer.epgID, timer.epg_starttime, &epgdata)) { + if (CEitManager::getInstance()->getEPGid(timer.epgID, timer.epg_starttime, &epgdata)) { zAddData += epgdata.title; } else if(strlen(timer.epgTitle)!=0) { @@ -2744,21 +2782,20 @@ _repeat: return messages_return::handled; } else if( msg == NeutrinoMessages::ANNOUNCE_RECORD) { - safe_system(NEUTRINO_RECORDING_TIMER_SCRIPT); + my_system(NEUTRINO_RECORDING_TIMER_SCRIPT); + if (g_settings.recording_type == RECORDING_FILE) { char * recordingDir = ((CTimerd::RecordingInfo*)data)->recordingDir; for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) { if (strcmp(g_settings.network_nfs_local_dir[i],recordingDir) == 0) { printf("[neutrino] waking up %s (%s)\n",g_settings.network_nfs_ip[i].c_str(),recordingDir); - std::string command = "ether-wake "; - command += g_settings.network_nfs_mac[i]; - if(safe_system(command.c_str()) != 0) + if(my_system("ether-wake",g_settings.network_nfs_mac[i]) != 0) perror("ether-wake failed"); break; } } if(has_hdd) { - safe_system("(rm /media/sda1/.wakeup; touch /media/sda1/.wakeup; sync) > /dev/null 2> /dev/null &"); // wakeup hdd + wakeup_hdd(g_settings.network_nfs_recordingdir); } } if( g_settings.recording_zap_on_announce ) { @@ -2988,7 +3025,6 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) //SDTreloadChannels = false; } - CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN); delete CRecordManager::getInstance(); @@ -3002,6 +3038,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) if(g_settings.epg_save /* && timeset && g_Sectionsd->getIsTimeSet ()*/) { saveEpg(true);// true CVFD::MODE_SHUTDOWN } + CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN); stop_daemons(true /*retcode*/);//need here for timer_is_rec before saveSetup g_settings.shutdown_timer_record_type = timer_is_rec; @@ -3012,7 +3049,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) #endif const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on"; printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script); - if (safe_system(neutrino_enter_deepstandby_script) != 0) + if (my_system(neutrino_enter_deepstandby_script) != 0) perror(neutrino_enter_deepstandby_script ); printf("entering off state\n"); @@ -3101,7 +3138,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) delete &CMoviePlayerGui::getInstance(); shutdown_cs_api(); - system("/etc/init.d/rcK"); + my_system("/etc/init.d/rcK"); CVFD::getInstance()->ShowIcon(VFD_ICON_CAM1, true); InfoClock->StopClock(); @@ -3159,16 +3196,16 @@ void CNeutrinoApp::saveEpg(bool cvfd_mode) { struct stat my_stat; if(stat(g_settings.epg_dir.c_str(), &my_stat) == 0){ - const char *save_txt = "Saving EPG"; - printf("%s to %s....\n",save_txt, g_settings.epg_dir.c_str()); - neutrino_msg_t msg; - neutrino_msg_data_t data; + printf("[neutrino] Saving EPG to %s...\n", g_settings.epg_dir.c_str()); CVFD::getInstance()->Clear(); CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); - CVFD::getInstance ()->ShowText(save_txt); + CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_EPG_SAVING)); g_Sectionsd->writeSI2XML(g_settings.epg_dir.c_str()); + + neutrino_msg_t msg; + neutrino_msg_data_t data; while( true ) { g_RCInput->getMsg(&msg, &data, 1200); // 120 secs.. if (( msg == CRCInput::RC_timeout ) || (msg == NeutrinoMessages::EVT_SI_FINISHED)) { @@ -3176,7 +3213,8 @@ void CNeutrinoApp::saveEpg(bool cvfd_mode) CVFD::getInstance()->Clear(); CVFD::getInstance()->setMode(cvfd_mode ? CVFD::MODE_SHUTDOWN : CVFD::MODE_STANDBY);// true CVFD::MODE_SHUTDOWN , false CVFD::MODE_STANDBY break; - } + } else if (!cvfd_mode) + handleMsg(msg, data); } } } @@ -3273,9 +3311,9 @@ void CNeutrinoApp::scartMode( bool bOnOff ) } } -void CNeutrinoApp::standbyMode( bool bOnOff ) +void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby ) { - static bool wasshift = false; + //static bool wasshift = false; INFO("%s", bOnOff ? "ON" : "OFF" ); if( bOnOff ) { @@ -3290,10 +3328,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) frameBuffer->useBackground(false); frameBuffer->paintBackground(); - CVFD::getInstance()->Clear(); - CVFD::getInstance()->setMode(CVFD::MODE_STANDBY); - - wasshift = CRecordManager::getInstance()->StopAutoRecord(); + /* wasshift = */ CRecordManager::getInstance()->StopAutoRecord(); if(!CRecordManager::getInstance()->RecordingStatus()) { g_Zapit->setStandby(true); @@ -3306,13 +3341,16 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) g_Sectionsd->setPauseScanning(true); g_Sectionsd->setServiceChanged(0, false); - if(!CRecordManager::getInstance()->RecordingStatus()) { + if(!CRecordManager::getInstance()->RecordingStatus() ) { //only save epg when not recording - if(g_settings.epg_save) { + if(g_settings.epg_save && !fromDeepStandby) { saveEpg(false);//false CVFD::MODE_STANDBY } } + CVFD::getInstance()->Clear(); + CVFD::getInstance()->setMode(CVFD::MODE_STANDBY); + if(g_settings.mode_clock) { InfoClock->StopClock(); } @@ -3321,7 +3359,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) standby_channel_id = CZapit::getInstance()->GetCurrentChannelID(); puts("[neutrino.cpp] executing " NEUTRINO_ENTER_STANDBY_SCRIPT "."); - if (safe_system(NEUTRINO_ENTER_STANDBY_SCRIPT) != 0) + if (my_system(NEUTRINO_ENTER_STANDBY_SCRIPT) != 0) perror(NEUTRINO_ENTER_STANDBY_SCRIPT " failed"); if(!CRecordManager::getInstance()->RecordingStatus()) @@ -3365,7 +3403,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) } puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_STANDBY_SCRIPT "."); - if (safe_system(NEUTRINO_LEAVE_STANDBY_SCRIPT) != 0) + if (my_system(NEUTRINO_LEAVE_STANDBY_SCRIPT) != 0) perror(NEUTRINO_LEAVE_STANDBY_SCRIPT " failed"); CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); @@ -3403,11 +3441,15 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) InfoClock->StartClock(); g_volume->AudioMute(current_muted, true); +#if 0 + /* auto-record will be started when zap is complete + * FIXME is it needed to restart manual timeshift here ? */ if((mode == mode_tv) && wasshift) { //startAutoRecord(); CRecordManager::getInstance()->StartAutoRecord(); } wasshift = false; +#endif StartSubtitles(); } } @@ -3645,7 +3687,6 @@ bool CNeutrinoApp::changeNotify(const neutrino_locale_t OptionName, void * /*dat void stop_daemons(bool stopall) { streamts_stop = 1; - sectionsd_stop = 1; dvbsub_close(); tuxtxt_stop(); tuxtxt_close(); @@ -3663,7 +3704,6 @@ void stop_daemons(bool stopall) } #ifndef DISABLE_SECTIONSD printf("sectionsd shutdown\n"); - //pthread_join(sections_thread, NULL); CEitManager::getInstance()->Stop(); printf("sectionsd shutdown done\n"); #endif diff --git a/src/neutrino.h b/src/neutrino.h index 34f29b33e..3ff32bf3e 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -36,16 +36,15 @@ #include #include -#include -#include -#include -#include -#include -#include /* CChannelList */ -#include -#include /* st_rmsg */ -#include -#include +#include "driver/framebuffer.h" +#include "system/setting_helpers.h" +#include "system/configure_network.h" +#include "daemonc/remotecontrol.h" /* st_rmsg */ +#include "gui/channellist.h" /* CChannelList */ +#include "gui/personalize.h" +#include "gui/rc_lock.h" +#include "gui/user_menue.h" +#include "gui/timerlist.h" #include @@ -80,6 +79,7 @@ typedef struct font_sizes_groups const unsigned int count; const SNeutrinoSettings::FONT_TYPES * const content; const char * const actionkey; + const neutrino_locale_t hint; } font_sizes_groups_struct; class CNeutrinoApp : public CMenuTarget, CChangeObserver @@ -133,7 +133,7 @@ private: void tvMode( bool rezap = true ); void radioMode( bool rezap = true ); void scartMode( bool bOnOff ); - void standbyMode( bool bOnOff ); + void standbyMode( bool bOnOff, bool fromDeepStandby = false ); void saveEpg(bool cvfd_mode); void ExitRun(const bool write_si = true, int retcode = 0); diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 7cbd47de0..dcd5e5a91 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -48,7 +48,7 @@ #include "gui/bouquetlist.h" #include "gui/cam_menu.h" #include "gui/dboxinfo.h" -#include +#include "gui/epgplus.h" #include "gui/favorites.h" #include "gui/hdd_menu.h" #include "gui/imageinfo.h" @@ -59,7 +59,7 @@ #include "gui/miscsettings_menu.h" #include "gui/motorcontrol.h" #include "gui/movieplayer.h" -#include +#include "gui/network_setup.h" #include "gui/osd_setup.h" #include "gui/osdlang_setup.h" #include "gui/parentallock_setup.h" @@ -70,11 +70,11 @@ #include "gui/settings_manager.h" #include "gui/sleeptimer.h" #include "gui/update_menue.h" -#include +#include "gui/streaminfo2.h" #include "gui/test_menu.h" #include "gui/update.h" #include "gui/vfd_setup.h" -#include +#include "driver/record.h" extern CPlugins * g_PluginList; @@ -89,7 +89,7 @@ enum MENU_MAIN, MENU_SETTINGS, MENU_SERVICE, - + MENU_MAX //3 }; @@ -106,18 +106,18 @@ const mn_widget_struct_t menu_widgets[MENU_MAX] = void CNeutrinoApp::InitMenu() { printf("[neutrino] init menus...\n"); - + //personalize: neutrino.h, neutrino.cpp personalize.enableUsermenu(); personalize.enablePinSetup(); personalize.addWidgets(menu_widgets, MENU_MAX); - + InitMenuMain(); InitMenuSettings(); InitMenuService(); //add submenu for media CMediaPlayerMenu::getInstance()->initMenuMedia(new CMenuWidget(LOCALE_MAINMENU_MEDIA, NEUTRINO_ICON_MULTIMEDIA, MENU_WIDTH), &personalize); - + personalize.addPersonalizedItems(); } @@ -125,90 +125,114 @@ void CNeutrinoApp::InitMenu() void CNeutrinoApp::InitMenuMain() { dprintf(DEBUG_DEBUG, "init mainmenue\n"); - + unsigned int system_rev = cs_get_revision(); #if HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE system_rev = 8; // :-) #endif - + // Dynamic renumbering personalize.setShortcut(); - + //CMenuWidget &menu = personalize.getWidget(MENU_MAIN)/**main**/; - + //top personalize.addItem(MENU_MAIN, GenericMenuSeparator, NULL, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); - - //1st section*************************************************************************************************** - + + //1st section*************************************************************************************************** + //tv <-> radio toggle CMenuForwarder *tvradio_switch = new CMenuForwarder(LOCALE_MAINMENU_TVRADIO_SWITCH, true, NULL, this, "tv_radio_switch", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + tvradio_switch->setHint(NEUTRINO_ICON_HINT_TVRADIO_SWITCH, LOCALE_MENU_HINT_TVRADIO_SWITCH); personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE]); - + //tv-mode CMenuForwarder *tvswitch = new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + tvswitch->setHint(NEUTRINO_ICON_HINT_TVMODE, LOCALE_MENU_HINT_TVMODE); personalize.addItem(MENU_MAIN, tvswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch); //observed - + //radio-mode CMenuForwarder *radioswitch = new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + radioswitch->setHint(NEUTRINO_ICON_HINT_RADIOMODE, LOCALE_MENU_HINT_RADIOMODE); personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch); //observed - + //timer CMenuForwarder *timerlist = new CMenuForwarder(LOCALE_TIMERLIST_NAME, true, NULL, new CTimerList(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + timerlist->setHint(NEUTRINO_ICON_HINT_TIMERS, LOCALE_MENU_HINT_TIMERS); personalize.addItem(MENU_MAIN, timerlist, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TIMER]); - + //multimedia menu CMenuForwarder *media = new CMenuForwarder(LOCALE_MAINMENU_MEDIA, true, NULL, CMediaPlayerMenu::getInstance(), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + media->setHint(NEUTRINO_ICON_HINT_MEDIA, LOCALE_MENU_HINT_MEDIA); personalize.addItem(MENU_MAIN, media, &g_settings.personalize[SNeutrinoSettings::P_MAIN_MEDIA]); - + //separator personalize.addSeparator(MENU_MAIN); - - + //2nd section*************************************************************************************************** - + //games bool show_games = g_PluginList->hasPlugin(CPlugins::P_TYPE_GAME); - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_MAINMENU_GAMES, show_games, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME)), &g_settings.personalize[SNeutrinoSettings::P_MAIN_GAMES]); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_MAINMENU_GAMES, show_games, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME)); + mf->setHint(NEUTRINO_ICON_HINT_GAMES, LOCALE_MENU_HINT_GAMES); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_GAMES]); - //scripts + //scripts bool show_scripts = g_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT); - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, show_scripts, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT)), &g_settings.personalize[SNeutrinoSettings::P_MAIN_SCRIPTS]); - + mf = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, show_scripts, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT)); + mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_SCRIPTS); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SCRIPTS]); + // settings, also as pin protected option in personalize menu, as a result of parameter value CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &personalize.getWidget(MENU_SETTINGS)/**settings**/), &g_settings.personalize[SNeutrinoSettings::P_MAIN_SETTINGS], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); + mf = new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &personalize.getWidget(MENU_SETTINGS)/**settings**/); + mf->setHint(NEUTRINO_ICON_HINT_SETTINGS, LOCALE_MENU_HINT_SETTINGS); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SETTINGS], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); // service, also as pin protected option in personalize menu, as a result of parameter value CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_MAINMENU_SERVICE, true, NULL, &personalize.getWidget(MENU_SERVICE)/**service**/), &g_settings.personalize[SNeutrinoSettings::P_MAIN_SERVICE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - + mf = new CMenuForwarder(LOCALE_MAINMENU_SERVICE, true, NULL, &personalize.getWidget(MENU_SERVICE)); + mf->setHint(NEUTRINO_ICON_HINT_SERVICE, LOCALE_MENU_HINT_SERVICE); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SERVICE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); + //separator personalize.addSeparator(MENU_MAIN); - + //3rd section*************************************************************************************************** - + //10. -- only 10 shortcuts (1-9, 0), the next could be the last also!(10. => 0) //sleeptimer - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget), &g_settings.personalize[SNeutrinoSettings::P_MAIN_SLEEPTIMER]); + mf = new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget); + mf->setHint(NEUTRINO_ICON_HINT_SLEEPTIMER, LOCALE_MENU_HINT_SLEEPTIMER); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SLEEPTIMER]); //reboot - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot"), &g_settings.personalize[SNeutrinoSettings::P_MAIN_REBOOT]); + mf = new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot"); + mf->setHint(NEUTRINO_ICON_HINT_REBOOT, LOCALE_MENU_HINT_REBOOT); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_REBOOT]); //shutdown - if(system_rev >= 8) - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER), &g_settings.personalize[SNeutrinoSettings::P_MAIN_SHUTDOWN]); + if(system_rev >= 8) { + mf = new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER); + mf->setHint(NEUTRINO_ICON_HINT_SHUTDOWN, LOCALE_MENU_HINT_SHUTDOWN); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SHUTDOWN]); + } //separator personalize.addSeparator(MENU_MAIN); - + //4th section*************************************************************************************************** //infomenu - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_info, NEUTRINO_ICON_BUTTON_INFO_SMALL), &g_settings.personalize[SNeutrinoSettings::P_MAIN_INFOMENU]); - + mf = new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_info, NEUTRINO_ICON_BUTTON_INFO_SMALL); + mf->setHint(NEUTRINO_ICON_HINT_INFO, LOCALE_MENU_HINT_INFO); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_INFOMENU]); + //cisettings - if (cCA::GetInstance()->GetNumberCISlots() > 0 || cCA::GetInstance()->GetNumberSmartCardSlots() > 0) - personalize.addItem(MENU_MAIN, new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler), &g_settings.personalize[SNeutrinoSettings::P_MAIN_CISETTINGS]); - + if (cCA::GetInstance()->GetNumberCISlots() > 0 || cCA::GetInstance()->GetNumberSmartCardSlots() > 0) { + mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler); + mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_CISETTINGS]); + } + #ifdef TEST_MENU personalize.addItem(MENU_MAIN, new CMenuForwarderNonLocalized("Test menu", true, NULL, new CTestMenu()), NULL, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); #endif @@ -218,124 +242,171 @@ void CNeutrinoApp::InitMenuMain() void CNeutrinoApp::InitMenuSettings() { dprintf(DEBUG_DEBUG, "init settings menue...\n"); - + //CMenuWidget &menu = personalize.getWidget(MENU_SETTINGS)/**settings**/; - + // Dynamic renumbering personalize.setShortcut(); - + // back button, no personalized personalize.addIntroItems(MENU_SETTINGS); - + + static int show = CPersonalizeGui::PERSONALIZE_MODE_VISIBLE; //*************************************************************************************************** // save - int show = CPersonalizeGui::PERSONALIZE_MODE_VISIBLE; - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "savesettings", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); - + CMenuForwarder * mf = new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "savesettings", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint(NEUTRINO_ICON_HINT_SAVE_SETTINGS, LOCALE_MENU_HINT_SAVE_SETTINGS); + personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); + // settings manager - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_MANAGE, true, NULL, new CSettingsManager(), NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN), &g_settings.personalize[SNeutrinoSettings::P_MSET_SETTINGS_MANAGER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MANAGE, true, NULL, new CSettingsManager(), NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint(NEUTRINO_ICON_HINT_MANAGE_SETTINGS, LOCALE_MENU_HINT_MANAGE_SETTINGS); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_SETTINGS_MANAGER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); + // personalize - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_PERSONALIZE_HEAD, true, NULL, &personalize, NULL, CRCInput::RC_yellow , NEUTRINO_ICON_BUTTON_YELLOW, NEUTRINO_ICON_LOCK), &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); - + mf = new CMenuForwarder(LOCALE_PERSONALIZE_HEAD, true, NULL, &personalize, NULL, CRCInput::RC_yellow , NEUTRINO_ICON_BUTTON_YELLOW, NEUTRINO_ICON_LOCK); + mf->setHint(NEUTRINO_ICON_HINT_PERSONALIZE, LOCALE_MENU_HINT_PERSONALIZE); + personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); + // miscSettings - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, new CMiscMenue() , NULL, CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE), &g_settings.personalize[SNeutrinoSettings::P_MSET_MISC]); - + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, new CMiscMenue() , NULL, CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint(NEUTRINO_ICON_HINT_EXTENDED, LOCALE_MENU_HINT_EXTENDED); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MISC]); + //separator personalize.addSeparator(MENU_SETTINGS); - + //1st section*************************************************************************************************** - + //use only 10 shortcuts (1-9, 0), >9 means -> no shortcut - + // video. - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO, true, NULL, g_videoSettings), &g_settings.personalize[SNeutrinoSettings::P_MSET_VIDEO]); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO, true, NULL, g_videoSettings); + mf->setHint(NEUTRINO_ICON_HINT_VIDEO, LOCALE_MENU_HINT_VIDEO); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_VIDEO]); // audio - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, true, NULL, new CAudioSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_AUDIO]); - + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, true, NULL, new CAudioSetup()); + mf->setHint(NEUTRINO_ICON_HINT_AUDIO, LOCALE_MENU_HINT_AUDIO); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_AUDIO]); + // parental lock - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, new CParentalSetup()), &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); + mf = new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, new CParentalSetup()); + mf->setHint(NEUTRINO_ICON_HINT_PROTECTION, LOCALE_MENU_HINT_PROTECTION); + personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); // network - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_NETWORK, true, NULL, CNetworkSetup::getInstance()), &g_settings.personalize[SNeutrinoSettings::P_MSET_NETWORK]); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_NETWORK, true, NULL, CNetworkSetup::getInstance()); + mf->setHint(NEUTRINO_ICON_HINT_NETWORK, LOCALE_MENU_HINT_NETWORK); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_NETWORK]); // record settings - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING, true, NULL, new CRecordSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_RECORDING]); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING, true, NULL, new CRecordSetup()); + mf->setHint(NEUTRINO_ICON_HINT_RECORDING, LOCALE_MENU_HINT_RECORDING); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_RECORDING]); // osdlang - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE, true, NULL, new COsdLangSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_OSDLANG]); - - // osd - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_OSD, true, NULL, new COsdSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_OSD]); - - // lcd - if (CVFD::getInstance()->has_lcd) - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_LCD, true, NULL, new CVfdSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_VFD]); - - // drive settings - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_HDD_SETTINGS, true, NULL, new CHDDMenuHandler()), &g_settings.personalize[SNeutrinoSettings::P_MSET_DRIVES]); - - // cisettings - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler), &g_settings.personalize[SNeutrinoSettings::P_MSET_CISETTINGS]); - - // keybindings - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, true, NULL, new CKeybindSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_KEYBINDING]); - - // audioplayer/pictureviewer settings - personalize.addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL, true, NULL, new CMediaPlayerSetup()), &g_settings.personalize[SNeutrinoSettings::P_MSET_MEDIAPLAYER]); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE, true, NULL, new COsdLangSetup()); + mf->setHint(NEUTRINO_ICON_HINT_LANGUAGE, LOCALE_MENU_HINT_LANGUAGE); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_OSDLANG]); + // osd + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_OSD, true, NULL, new COsdSetup()); + mf->setHint(NEUTRINO_ICON_HINT_OSD, LOCALE_MENU_HINT_OSD); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_OSD]); + + // lcd + if (CVFD::getInstance()->has_lcd) { + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_LCD, true, NULL, new CVfdSetup()); + mf->setHint(NEUTRINO_ICON_HINT_VFD, LOCALE_MENU_HINT_VFD); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_VFD]); + } + + // drive settings + mf = new CMenuForwarder(LOCALE_HDD_SETTINGS, true, NULL, new CHDDMenuHandler()); + mf->setHint(NEUTRINO_ICON_HINT_HDD, LOCALE_MENU_HINT_HDD); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_DRIVES]); + + // cisettings + mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler); + mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_CISETTINGS]); + + // keybindings + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, true, NULL, new CKeybindSetup()); + mf->setHint(NEUTRINO_ICON_HINT_KEYS, LOCALE_MENU_HINT_KEYS); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_KEYBINDING]); + + // audioplayer/pictureviewer settings + mf = new CMenuForwarder(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL, true, NULL, new CMediaPlayerSetup()); + mf->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_A_PIC); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MEDIAPLAYER]); } - + /* service menu*/ void CNeutrinoApp::InitMenuService() { dprintf(DEBUG_DEBUG, "init service menu...\n"); - + //CMenuWidget &menu = personalize.getWidget(MENU_SERVICE)/**service**/; - + // Dynamic renumbering personalize.setShortcut(); // back button, no personalized personalize.addIntroItems(MENU_SERVICE); - + //1st section*************************************************************************************************** - + // channel scan - personalize.addItem(MENU_SERVICE, new CMenuForwarder(LOCALE_SERVICEMENU_SCANTS , true, NULL, CScanSetup::getInstance(), "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED) , &g_settings.personalize[SNeutrinoSettings::P_MSER_SCANTS]); - + CMenuForwarder * mf = new CMenuForwarder(LOCALE_SERVICEMENU_SCANTS , true, NULL, CScanSetup::getInstance(), "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + mf->setHint(NEUTRINO_ICON_HINT_SERVICE_SCAN, LOCALE_MENU_HINT_SERVICE_SCAN); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SCANTS]); + //reload channels - personalize.addItem(MENU_SERVICE, new CMenuForwarder(LOCALE_SERVICEMENU_RELOAD , true, NULL, CScanSetup::getInstance(), "reloadchannels", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN) , &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_CHANNELS]); - + mf = new CMenuForwarder(LOCALE_SERVICEMENU_RELOAD , true, NULL, CScanSetup::getInstance(), "reloadchannels", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RELOAD_CHANNELS); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_CHANNELS]); + //bouquet edit // TODO: this needs a neutrino restart after changing parentallock_prompt to activate :-( - personalize.addItem(MENU_SERVICE, new CLockedMenuForwarder(LOCALE_BOUQUETEDITOR_NAME, g_settings.parentallock_pincode, g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED, true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW) , &g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT]); - + CLockedMenuForwarder *lf; + lf = new CLockedMenuForwarder(LOCALE_BOUQUETEDITOR_NAME, g_settings.parentallock_pincode, g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED, true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + lf->setHint(NEUTRINO_ICON_HINT_BEDIT, LOCALE_MENU_HINT_BEDIT); + personalize.addItem(MENU_SERVICE, lf, &g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT]); + //channel reset CDataResetNotifier *resetNotifier = new CDataResetNotifier(); - personalize.addItem(MENU_SERVICE, new CMenuForwarder(LOCALE_RESET_CHANNELS , true, NULL, resetNotifier, "channels", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE) , &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); - + mf = new CMenuForwarder(LOCALE_RESET_CHANNELS , true, NULL, resetNotifier, "channels", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); + mf->setHint(NEUTRINO_ICON_HINT_DELETE_CHANNELS, LOCALE_MENU_HINT_DELETE_CHANNELS); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); + //separator personalize.addSeparator(MENU_SERVICE); - + //restart neutrino - personalize.addItem(MENU_SERVICE, new CMenuForwarder(LOCALE_SERVICEMENU_RESTART , true, NULL, this, "restart", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER) , &g_settings.personalize[SNeutrinoSettings::P_MSER_RESTART]); - + mf = new CMenuForwarder(LOCALE_SERVICEMENU_RESTART , true, NULL, this, "restart", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER); + mf->setHint(NEUTRINO_ICON_HINT_SOFT_RESTART, LOCALE_MENU_HINT_SOFT_RESTART); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESTART]); + //reload plugins - personalize.addItem(MENU_SERVICE, new CMenuForwarder(LOCALE_SERVICEMENU_GETPLUGINS, true, NULL, this, "reloadplugins") , &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_PLUGINS]); - + mf = new CMenuForwarder(LOCALE_SERVICEMENU_GETPLUGINS, true, NULL, this, "reloadplugins"); + mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RELOAD_PLUGINS); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_PLUGINS]); + //separator personalize.addSeparator(MENU_SERVICE); - - //2nd section*************************************************************************************************** - - //infomenu - personalize.addItem(MENU_SERVICE, new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_info, NEUTRINO_ICON_BUTTON_INFO_SMALL) , &g_settings.personalize[SNeutrinoSettings::P_MSER_SERVICE_INFOMENU]); - - //firmware update - personalize.addItem(MENU_SERVICE, new CMenuForwarder(LOCALE_SERVICEMENU_UPDATE, true, NULL, new CSoftwareUpdate()) , &g_settings.personalize[SNeutrinoSettings::P_MSER_SOFTUPDATE]); - -} + //2nd section*************************************************************************************************** + + //infomenu + mf = new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_info, NEUTRINO_ICON_BUTTON_INFO_SMALL); + mf->setHint(NEUTRINO_ICON_HINT_INFO, LOCALE_MENU_HINT_INFO); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SERVICE_INFOMENU]); + + //firmware update + mf = new CMenuForwarder(LOCALE_SERVICEMENU_UPDATE, true, NULL, new CSoftwareUpdate()); + mf->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_SW_UPDATE); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SOFTUPDATE]); +} diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 4f33e72ca..6677e080a 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -163,6 +163,7 @@ enum MN_WIDGET_ID MN_WIDGET_ID_SCAN_AUTO_SCAN_ALL, MN_WIDGET_ID_SCAN_MANUAL_SCAN, MN_WIDGET_ID_SCAN_FAST_SCAN, + MN_WIDGET_ID_SCAN_CABLE_SCAN, MN_WIDGET_ID_MAX }; diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index fc54d2f84..8761e05fe 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -47,13 +48,6 @@ #include "neutrinoapi.h" #include "controlapi.h" -bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); -bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); -void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); -void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ); -bool sectionsd_getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); -bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); - extern CPlugins *g_PluginList;//for relodplugins extern CBouquetManager *g_bouquetManager; #define EVENTDEV "/dev/input/input0" @@ -903,7 +897,7 @@ std::string CControlAPI::_GetBouquetActualEPGItem(CyhookHandler *hh, CZapitChann if (event) { if (event->duration > 0) percentage = 100 * (time(NULL) - event->startTime) / event->duration; - sectionsd_getCurrentNextServiceKey(channel->channel_id & 0xFFFFFFFFFFFFULL, currentNextInfo); + CEitManager::getInstance()->getCurrentNextServiceKey(channel->channel_id, currentNextInfo); timestr = timeString(event->startTime); firstEPG += hh->outPair("startTime", timestr, true); @@ -1202,7 +1196,7 @@ void CControlAPI::GetBouquetsCGI(CyhookHandler *hh) { std::string CControlAPI::channelEPGformated(CyhookHandler *hh, int bouquetnr, t_channel_id channel_id, int max, long stoptime) { std::string result = ""; std::string channelData = ""; - sectionsd_getEventsServiceKey(channel_id, NeutrinoAPI->eList); + CEitManager::getInstance()->getEventsServiceKey(channel_id, NeutrinoAPI->eList); channelData += hh->outPair("channel_id", string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id), true); channelData += hh->outPair("channel_short_id", string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id & 0xFFFFFFFFFFFFULL), true); channelData += hh->outPair("channel_name", hh->outValue(NeutrinoAPI->GetServiceName(channel_id)), false); @@ -1236,7 +1230,7 @@ std::string CControlAPI::channelEPGformated(CyhookHandler *hh, int bouquetnr, t_ if (!(hh->ParamList["details"].empty())) { CShortEPGData epg; - if (sectionsd_getEPGidShort(eventIterator->eventID, &epg)) { + if (CEitManager::getInstance()->getEPGidShort(eventIterator->eventID, &epg)) { prog += hh->outPair("info1", hh->outValue(epg.info1), true); prog += hh->outPair("info2", hh->outValue(epg.info2), true); } @@ -1393,7 +1387,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) { uint64_t epgid; sscanf(hh->ParamList["eventid"].c_str(), "%llu", &epgid); CShortEPGData epg; - if (sectionsd_getEPGidShort(epgid, &epg)) { + if (CEitManager::getInstance()->getEPGidShort(epgid, &epg)) { hh->WriteLn(epg.title); hh->WriteLn(epg.info1); hh->WriteLn(epg.info2); @@ -1406,7 +1400,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) { sscanf(hh->ParamList["fskid"].c_str(), "%llu", &epgid); sscanf(hh->ParamList["starttime"].c_str(), "%lu", &starttime); CEPGData longepg; - if (sectionsd_getEPGid(epgid, starttime, &longepg)) { + if (CEitManager::getInstance()->getEPGid(epgid, starttime, &longepg)) { hh->printf("%u\n", longepg.fsk); return; } @@ -1417,11 +1411,11 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) { else if (!(hh->ParamList["id"].empty())) { t_channel_id channel_id; sscanf(hh->ParamList["id"].c_str(), SCANF_CHANNEL_ID_TYPE, &channel_id); - sectionsd_getEventsServiceKey(channel_id, NeutrinoAPI->eList); + CEitManager::getInstance()->getEventsServiceKey(channel_id, NeutrinoAPI->eList); CChannelEventList::iterator eventIterator; for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); ++eventIterator) { CShortEPGData epg; - if (sectionsd_getEPGidShort(eventIterator->eventID, &epg)) { + if (CEitManager::getInstance()->getEPGidShort(eventIterator->eventID, &epg)) { hh->printf("%llu %ld %d\n", eventIterator->eventID, eventIterator->startTime, eventIterator->duration); hh->printf("%s\n", epg.title.c_str()); hh->printf("%s\n", epg.info1.c_str()); @@ -1514,8 +1508,8 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh) t_channel_id current_channel = NeutrinoAPI->Zapit->getCurrentServiceID(); CSectionsdClient::LinkageDescriptorList desc; CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo; - sectionsd_getCurrentNextServiceKey(current_channel&0xFFFFFFFFFFFFULL, currentNextInfo); - if (sectionsd_getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey,desc)) + CEitManager::getInstance()->getCurrentNextServiceKey(current_channel, currentNextInfo); + if (CEitManager::getInstance()->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey,desc)) { for(unsigned int i=0; i< desc.size(); i++) { @@ -1589,7 +1583,7 @@ void CControlAPI::LCDAction(CyhookHandler *hh) void CControlAPI::SendEventList(CyhookHandler *hh, t_channel_id channel_id) { int pos = 0; - sectionsd_getEventsServiceKey(channel_id, NeutrinoAPI->eList); + CEitManager::getInstance()->getEventsServiceKey(channel_id, NeutrinoAPI->eList); CChannelEventList::iterator eventIterator; for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); ++eventIterator, pos++) @@ -1654,8 +1648,8 @@ void CControlAPI::SendAllCurrentVAPid(CyhookHandler *hh) t_channel_id current_channel = NeutrinoAPI->Zapit->getCurrentServiceID(); CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo; - sectionsd_getCurrentNextServiceKey(current_channel&0xFFFFFFFFFFFFULL, currentNextInfo); - if (sectionsd_getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey,tags)) + CEitManager::getInstance()->getCurrentNextServiceKey(current_channel, currentNextInfo); + if (CEitManager::getInstance()->getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey,tags)) { for (unsigned int i=0; i< tags.size(); i++) { @@ -1902,7 +1896,7 @@ void CControlAPI::SendTimersXML(CyhookHandler *hh) std::string title = timer->epgTitle; if(timer->epgID!=0) { CEPGData epgdata; - if (sectionsd_getEPGid(timer->epgID, timer->epg_starttime, &epgdata)) + if (CEitManager::getInstance()->getEPGid(timer->epgID, timer->epg_starttime, &epgdata)) title = epgdata.title; } diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp index ddef565df..2ca05cfd4 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp @@ -39,6 +39,7 @@ #include #include #include +#include extern CBouquetManager *g_bouquetManager; extern CFrontend * frontend; @@ -54,8 +55,6 @@ extern CZapitClient::SatelliteList satList; // nhttpd #include "neutrinoapi.h" -void sectionsd_getChannelEvents(CChannelEventList &eList, const bool tv_mode = true, t_channel_id *chidlist = NULL, int clen = 0); - //============================================================================= // No Class Helpers //============================================================================= @@ -259,7 +258,7 @@ bool CNeutrinoAPI::GetStreamInfo(int bitInfo[10]) bool CNeutrinoAPI::GetChannelEvents(void) { - sectionsd_getChannelEvents(eList); + CEitManager::getInstance()->getChannelEvents(eList); CChannelEventList::iterator eventIterator; ChannelListEvents.clear(); diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp index a7b5d0653..a4ba3bce3 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp @@ -29,16 +29,12 @@ #include #include #include +#include #include #include extern CBouquetManager *g_bouquetManager; -bool sectionsd_getNVODTimesServiceKey(const t_channel_id uniqueServiceKey, CSectionsdClient::NVODTimesList& nvod_list); -void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ); -bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); -bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); -bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); //============================================================================= // Constructor & Destructor & Initialization //============================================================================= @@ -291,7 +287,7 @@ std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler *, st sprintf(id,PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS,channel->channel_id); std::string _sid = std::string(id); sel = (_sid == achannel_id) ? "selected=\"selected\"" : ""; - sectionsd_getActualEPGServiceKey(channel->channel_id&0xFFFFFFFFFFFFULL, &epg); + CEitManager::getInstance()->getActualEPGServiceKey(channel->channel_id, &epg); sprintf(buf,"\n", channel->channel_id, sel.c_str(), channel->getName().c_str(),epg.title.c_str()); yresult += buf; } @@ -396,7 +392,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: if (channel->getServiceType() == ST_NVOD_REFERENCE_SERVICE) { CSectionsdClient::NVODTimesList nvod_list; - if (sectionsd_getNVODTimesServiceKey(channel->channel_id&0xFFFFFFFFFFFFULL, nvod_list)) + if (CEitManager::getInstance()->getNVODTimesServiceKey(channel->channel_id, nvod_list)) { CZapitClient::subServiceList subServiceList; @@ -413,7 +409,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: t_channel_id channel_id = CREATE_CHANNEL_ID(cmd.service_id, cmd.original_network_id, cmd.transport_stream_id); timestr = timeString(ni->zeit.startzeit); // FIXME: time is wrong (at least on little endian)! - sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epg); // FIXME: der scheissendreck geht nit!!! + CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epg); // FIXME: der scheissendreck geht nit!!! yresult += string_printf("\n ", classname); yresult += string_printf("%s ", classname, timestr.c_str()); yresult += string_printf("%sChannelListEvents[channel->channel_id])) { bool has_current_next = true; - sectionsd_getCurrentNextServiceKey(channel->channel_id&0xFFFFFFFFFFFFULL, currentNextInfo); + CEitManager::getInstance()->getCurrentNextServiceKey(channel->channel_id, currentNextInfo); timestr = timeString(event->startTime); yresult += string_printf("",classname); @@ -547,8 +543,8 @@ std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler *, t_channel_id current_channel = CZapit::getInstance()->GetCurrentChannelID(); CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo; - sectionsd_getCurrentNextServiceKey(current_channel&0xFFFFFFFFFFFFULL, currentNextInfo); - if (sectionsd_getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey,tags)) + CEitManager::getInstance()->getCurrentNextServiceKey(current_channel, currentNextInfo); + if (CEitManager::getInstance()->getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey,tags)) { for (unsigned int i=0; i< tags.size(); i++) { @@ -811,7 +807,7 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler *, std::string if(timer->epgID!=0) { CEPGData epgdata; - if (sectionsd_getEPGid(timer->epgID, timer->epg_starttime, &epgdata)) + if (CEitManager::getInstance()->getEPGid(timer->epgID, timer->epg_starttime, &epgdata)) sAddData+="
" + epgdata.title; else sAddData+=std::string("
")+timer->epgTitle; diff --git a/src/nhttpd/web/Makefile.am b/src/nhttpd/web/Makefile.am index a873fc92a..7a1a58268 100644 --- a/src/nhttpd/web/Makefile.am +++ b/src/nhttpd/web/Makefile.am @@ -61,7 +61,6 @@ install_DATA = channels.js \ Y_Settings_personalize.yhtm \ Y_Settings_Skin.yhtm \ Y_Settings_Timer.yhtm \ - Y_Settings_ucodes.yhtm \ Y_Settings_umount_liste.yhtm \ Y_Settings_video_audio.yhtm \ Y_Settings_VNC.yhtm \ diff --git a/src/nhttpd/web/Y_Blocks.txt b/src/nhttpd/web/Y_Blocks.txt index d438796ca..79995cc78 100644 --- a/src/nhttpd/web/Y_Blocks.txt +++ b/src/nhttpd/web/Y_Blocks.txt @@ -151,7 +151,6 @@ start-block~personalize_save_settings {=ini-set:/var/tuxbox/config/neutrino.conf;personalize_getplugins;{=p_getplugins=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;personalize_restart;{=p_restart=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;personalize_epgrestart;{=p_epgrestart=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_ucodecheck;{=p_ucodecheck=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;personalize_chan_epg_stat;{=p_chan_epg_stat=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;personalize_imageinfo;{=p_imageinfo=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;personalize_update;{=p_update=}~cache=} @@ -211,6 +210,11 @@ start-block~management_check_bottom =} end-block~management_check_bottom +# ------- Managemant Link +start-block~management_link +
{=var-get:m_link_text=} +end-block~management_link + # ------- Snip: Wait Message Layer-div hidden start-block~snip_wait
@@ -380,7 +384,7 @@ start-block~frame_main {=include-block:Y_Blocks.txt;frame_head=} yWeb - + @@ -469,7 +473,7 @@ end-block~frame_ext # ------- Lay-Frame Info-Menu start-block~frame_info {=var-set:sec_menu=Y_Info_Menue.yhtm=} -{=var-set:work=Y_blank.htm=} +{=var-set:work=Y_About.yhtm=} {=include-block:Y_Blocks.txt;frame_secondary=} end-block~frame_info diff --git a/src/nhttpd/web/Y_Boxcontrol_Bouquets.yhtm b/src/nhttpd/web/Y_Boxcontrol_Bouquets.yhtm index 25f3c273e..d2ebb7421 100644 --- a/src/nhttpd/web/Y_Boxcontrol_Bouquets.yhtm +++ b/src/nhttpd/web/Y_Boxcontrol_Bouquets.yhtm @@ -5,10 +5,14 @@
{=var-set:help_url=Help-BoxControl-Bouquet=}{=var-set:menu=Bouquet=}{=include-block:Y_Blocks.txt;work_menu=}
- + + scrolling="auto" marginheight="1" marginwidth="1" frameborder="0" name="content" + style="height: 600px; width: 74%;"> +
diff --git a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm index 601953b9a..c75361b24 100644 --- a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm +++ b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm @@ -36,8 +36,8 @@ function volumen_set(_volumen){ } function set_mute_button(){ var status = loadSyncURL("/control/volume?status"); - $('btMute').update( (status==1)? "  ": "  "); - return status; + $('btMute').update( (status==1) ? "" : ""); + return status; } function toggle_mute(){ var status = loadSyncURL("/control/volume?status"); @@ -64,7 +64,7 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu').insert({'bottom':el}); + $('secmenu_boxcontrol').insert({'bottom':el}); }); } @@ -79,31 +79,45 @@ function init(){

{=L:main.boxcontrol=}

-
@@ -119,15 +133,31 @@ function init(){
- -   - - - -    - -   -   + + + + + + + + + + + + + + + + + + + + + + + + + @@ -137,7 +167,9 @@ function init(){ diff --git a/src/nhttpd/web/Y_Ext_Menue.yhtm b/src/nhttpd/web/Y_Ext_Menue.yhtm index 547164c50..7981d982d 100644 --- a/src/nhttpd/web/Y_Ext_Menue.yhtm +++ b/src/nhttpd/web/Y_Ext_Menue.yhtm @@ -14,13 +14,10 @@ function build_menu(){ var item=""+e.get('menuitem')+""; y_add_li_to_ul(id("ext_normal"),"ext",item); }); - var ext_normal=ext.select_type("m"); - ext_normal.each(function(e){ - {=if-empty:{=var-get:management=}~ - var item=""+e.get('menuitem')+""; - ~ - var item=""+e.get('menuitem')+""; - =} + + var ext_management=ext.select_type("m"); + ext_management.each(function(e){ + var item=''+e.get("menuitem")+''; y_add_li_to_ul(id("ext_management"),"ext",item); }); } @@ -44,15 +41,21 @@ function build_menu(){
{=L:administration=}
    - {=if-empty:{=var-get:management=}~ -
  • {=L:main.settings=}
  • -
  • {=L:ext.installer_updater=}
  • -
  • {=L:uninstaller=}
  • - ~ -
  • {=L:main.settings=}
  • -
  • {=L:ext.installer_updater=}
  • -
  • {=L:uninstaller=}
  • - =} +
  • + {=var-set:m_link_href=Y_Ext_Settings.yhtm=} + {=var-set:m_link_text={=L:main.settings=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Ext_Update.yhtm=} + {=var-set:m_link_text={=L:ext.installer_updater=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Ext_Uninstall.yhtm=} + {=var-set:m_link_text={=L:uninstaller=}=} + {=include-block:Y_Blocks.txt;management_link=} +
diff --git a/src/nhttpd/web/Y_Ext_Update.js b/src/nhttpd/web/Y_Ext_Update.js index c0eb21905..53ace0604 100644 --- a/src/nhttpd/web/Y_Ext_Update.js +++ b/src/nhttpd/web/Y_Ext_Update.js @@ -156,19 +156,21 @@ function do_set_updates2(){ } var avaiable=0; function show_free(){ - var res=dbox_exec_tools("var_space"); + var res=dbox_exec_tools("mtd_space"); var Ausdruck = /([^ ]*)[ ]*([^ ]*)[ ]*([^ ]*)[ ]*([^ ]*)[ ]*([^ ]*)[ ]*([^ ]*).*$/; Ausdruck.exec(res); + var mtd = RegExp.$1; var total = RegExp.$2; var used = RegExp.$3; avaiable = RegExp.$4; var percentage = RegExp.$5; + var mtpt = RegExp.$6; if (total != "") { - str = "Sapce in /var Total: " + total + "k used: " + used + "k Free: " + avaiable + "k part used: " + percentage; + str = "Space in " + mtd + " (mounted on " + mtpt + ") Total: " + total + "kB; Used: " + used + "kB; Free: " + avaiable + "kB (" + percentage + ")"; $('avaiable').update(avaiable); } else - str = "Can not determine free space /var is no partition! JFFS2 oder YADD?"; + str = "Can not determine free space."; $("free").update(str); } /*uninstall*/ diff --git a/src/nhttpd/web/Y_Ext_Update.yhtm b/src/nhttpd/web/Y_Ext_Update.yhtm index 87caa4876..eff7c7ee0 100644 --- a/src/nhttpd/web/Y_Ext_Update.yhtm +++ b/src/nhttpd/web/Y_Ext_Update.yhtm @@ -34,7 +34,7 @@
?
- {=L:ext.free=}: ?k + {=L:ext.free=}: ?k
Log
diff --git a/src/nhttpd/web/Y_Info_Help.yhtm b/src/nhttpd/web/Y_Info_Help.yhtm index e6a1c46dd..7470308b2 100644 --- a/src/nhttpd/web/Y_Info_Help.yhtm +++ b/src/nhttpd/web/Y_Info_Help.yhtm @@ -8,10 +8,11 @@ diff --git a/src/nhttpd/web/Y_Info_Menue.yhtm b/src/nhttpd/web/Y_Info_Menue.yhtm index 227ad2af5..c549d5ffc 100644 --- a/src/nhttpd/web/Y_Info_Menue.yhtm +++ b/src/nhttpd/web/Y_Info_Menue.yhtm @@ -13,7 +13,7 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu').insert({'bottom':el}); + $('secmenu_info').insert({'bottom':el}); }); } @@ -24,14 +24,18 @@ function init(){

{=L:main.info=}

-
diff --git a/src/nhttpd/web/Y_Info_Updates.yhtm b/src/nhttpd/web/Y_Info_Updates.yhtm index d53fbe5bd..839f2054b 100644 --- a/src/nhttpd/web/Y_Info_Updates.yhtm +++ b/src/nhttpd/web/Y_Info_Updates.yhtm @@ -4,11 +4,7 @@ // @@ -21,7 +17,7 @@ function check_updates()
- -
+ {=L:info.your_version=}

{=ini-get:Y_Version.txt;version=}
@@ -30,7 +26,7 @@ function check_updates() {=ini-get:Y_Version.txt;info=}

+ {=L:info.actual_version=}

{=ini-get:/tmp/version.txt;version=}
diff --git a/src/nhttpd/web/Y_Live_Menue.yhtm b/src/nhttpd/web/Y_Live_Menue.yhtm index 5efd33a80..a92bb0d90 100644 --- a/src/nhttpd/web/Y_Live_Menue.yhtm +++ b/src/nhttpd/web/Y_Live_Menue.yhtm @@ -30,7 +30,17 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu_live').insert({'bottom':el}); + $('secmenu_live').insert({'bottom':el}); + }); + var menu=ext.select_menu('epg'); + menu.each(function(e){ + var el=new Element('li').update( + new Element('a', {'target':'work', + 'title': e.get('desc'), + 'href': e.get('file') + }).update("-"+e.get('menuitem')) + ); + $('secmenu_epg').insert({'bottom':el}); }); var menu=ext.select_menu('timer'); menu.each(function(e){ @@ -40,7 +50,7 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu_timer').insert({'bottom':el}); + $('secmenu_timer').insert({'bottom':el}); }); } //]]> @@ -55,33 +65,38 @@ function init(){

+
{=L:live.epg=}
+
+ +
{=L:live.timer=}
diff --git a/src/nhttpd/web/Y_Main.css b/src/nhttpd/web/Y_Main.css index b71b30e24..7f48c980d 100644 --- a/src/nhttpd/web/Y_Main.css +++ b/src/nhttpd/web/Y_Main.css @@ -1,6 +1,6 @@ body { font-family: Verdana, Geneva, Arial, 'Lucida Grande',Tahoma, Helvetica, sans-serif; - background-color: White; + background-color: #ffffff; margin: 0; padding:0; font-size:10pt; @@ -13,19 +13,18 @@ button,input,select,form,td { color:#555555; } /* buttons */ -/*button{margin:1px}*/ a img:hover { position:relative; left:1px; top:1px; } button[ytype]{ - background-position:1px; + background-position: 5px; background-attachment: scroll; background-color: transparent; background-repeat: no-repeat; - padding-left: 20px; - padding-right:0px; + padding-left: 25px; + padding-right: 5px; vertical-align: middle; text-align:left; } @@ -48,18 +47,24 @@ button[ytype="delete"]{background-image:url(/images/remove.png);} button[ytype="edit"]{background-image:url(/images/modify.png);} button[ytype="flash"]{background-image:url(/images/flash.png);} -button[ytype="no"]{height:21px;padding-left:1px} +button[ytype="no"] { + padding-left: 5px +} /*TODO: input file*/ button,input[type="button"],input[type="submit"]/*,input[type="file"],input[type="file"] > input[type="button"],input[type="file"] > input[type="text"]*/ { + height: 22px; border: 1px solid #888888; background-color: transparent; + border-radius: 3px; + + -webkit-border-radius: 3px; + -moz-border-radius: 3px; } button:hover,input[type="button"]:hover,input[type="submit"]:hover/*,input[type="file"]:hover*/ { position:relative; left:1px; top:1px; - border: 1px solid #888888; } div { margin:0; @@ -108,56 +113,55 @@ tr { } /* primary Navigation */ .y_menu_prim_box { - margin: 0; -/* padding:0;*/ - width: 100%; - background: url(/images/body-trans-r.gif) no-repeat bottom right; - font-size: 100%; + margin: 5px; + font-size: 100.01%; + border: 1px solid #a0a0a0; + border-radius: 5px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; } .y_menu_prim_box_head { - background: url(/images/head-trans-r.gif) no-repeat top right; margin: 0; padding: 0; text-align: center; + background: #ffffff; + border-radius: 4px 4px 0 0; + + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; } .y_menu_prim_box_head_h2 { - background: url(/images/head-trans-l.gif) no-repeat top left; margin: 0; padding: 5px 0px 5px; color: white; -/* font-size: 0;*/ -/* line-height: 0.5em;*/ } .y_menu_prim_box_body { - background: url(/images/body-trans-l.gif) no-repeat bottom left; -/* margin: 0;*/ - padding-bottom: 8px; - padding-left: 20px; - padding-right: 20px; + padding: 0 20px 5px; + background-color: #ffffff; + border-radius: 0 0 4px 4px; + + -webkit-border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; } .y_menu_item { margin: 0; -/* display: block; - background-repeat: no-repeat;*/ } .y_menu_prim { margin: 0; padding: 0; -/* background-color: transparent; - white-space: nowrap;*/ list-style: none; height: auto; -/* line-height: normal;*/ } .y_menu_prim li { display: inline; margin: 0; -/* font-family: Arial, 'Lucida Grande',Tahoma, Verdana, Geneva, Helvetica, sans-serif; - background-repeat: no-repeat; - background-position: 0 1px; -*/ text-align:center; + text-align:center; font-weight: normal; -/* height: auto;*/ padding: 0em 0.3em; } .y_menu_prim_item { @@ -180,38 +184,49 @@ tr { } /* secondary Navigation */ .y_menu_sec_box { - margin: 0; + margin: 0 0 5px 5px; padding: 0; - width: 100%; - background: url(/images/body-trans-r.gif) no-repeat bottom right; - font-size: 100%; + font-size: 100.01%; + border: 1px solid #a0a0a0; + border-radius: 5px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; } .y_menu_sec_box_head { - background: url(/images/head-orange-r.gif) no-repeat top right; margin: 0; padding: 0; + background: #ff6600; + border-radius: 4px 4px 0 0; + + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; } .y_menu_sec_box_head h2 { margin: 0; - padding: 10px 30px 3px 25px; - background: url(/images/head-orange-l.gif) no-repeat top left; + padding: 5px 5px 5px 10px; font-family: Arial, 'Lucida Grande',Tahoma, Verdana, Geneva, Helvetica, sans-serif; color: white; font-weight: bold; - font-size: 12pt; -/* line-height: 1.5em;*/ + font-size: 1.2em; text-align: left; } .y_menu_sec_box_body { - background: url(/images/body-trans-l.gif) no-repeat bottom left; margin: 0; -/* padding:0;*/ - padding: 5px 5px 20px 5px; + padding: 5px 0 10px; + background-color: #ffffff; + border-radius: 0 0 4px 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; } .y_menu_sec { - display: block; - background-repeat: no-repeat; + display: block; + background-repeat: no-repeat; margin: 0px; } @@ -227,12 +242,6 @@ tr { padding-left: 20px; color: #555555; } -.y_menu_sec li.disabled { - height: auto; - margin-bottom: 0.1em; - color: #808080; - text-decoration:line-through; -} .y_menu_sec li a { text-decoration: none; font-size: 10pt; @@ -240,8 +249,6 @@ tr { .y_menu_sec li.plain a { color: #555555 } -.y_menu_sec li.disabled a { -} .y_menu_sec li a:hover { color: #FF6600; } @@ -252,34 +259,65 @@ tr { font-size: 10pt; font-weight: bold; } +.y_menu_sec li a.disabled, +.y_menu_sec li a.restricted { + color: #808080; + text-decoration:line-through; +} +.y_menu_sec ul li:first-child { + margin-top: 5px; +} +.y_menu_popup_link { + float: right; + margin-right: 15px; +} + +.control_icon a img { + margin: 0 2px; +} /*work*/ .work_box { - margin: 0; - background: url(/images/body-trans-r.gif) no-repeat bottom right; + margin: 0 5px 5px 5px; + padding: 0; font-size: 100.01%; + border: 1px solid #a0a0a0; + border-radius: 5px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; } .work_box_head { - background: url(/images/head-blue-r.gif) no-repeat top right; margin: 0; padding: 0; text-align: center; + background-color: #2188e0; + border-radius: 4px 4px 0 0; + + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; } .work_box_head h2,.work_box_head_h2 { - background: url(/images/head-blue-l.gif) no-repeat top left; margin: 0; - padding: 10px 30px 3px 30px; + padding: 5px 20px; font-family: Arial, 'Lucida Grande',Tahoma, Verdana, Geneva, Helvetica, sans-serif; color: white; font-weight: bold; - font-size: 12pt; -/* line-height: 1.5em;*/ + font-size: 1.2em; text-align: left; } .work_box_body { - background: url(/images/body-trans-l.gif) no-repeat bottom left; margin: 0; padding: 5px 30px 10px 30px; + background-color: #ffffff; + border-radius: 0 0 4px 4px; + + -webkit-border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; } .work_box_help { float:right; @@ -332,47 +370,61 @@ tr { /*wait box*/ .y_wait_box { margin: 0; - background: url(/images/body-trans-r.gif) no-repeat bottom right; font-size: 100%; position : absolute; left : 100px; top : 100px; visibility : hidden; z-index : 500; + border: 1px solid #a0a0a0; + border-radius: 5px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; } .y_wait_box_visible { margin: 0; - background: url(/images/body-trans-r.gif) no-repeat bottom right; font-size: 100%; position : absolute; left : 100px; top : 100px; visibility : visible; z-index : 500; + border: 1px solid #a0a0a0; + border-radius: 5px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; } .y_wait_box_head { - background: url(/images/head-orange-r.gif) no-repeat top right; margin: 0; padding: 0; + background: #ff6600; + border-radius: 4px 4px 0 0; + + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; } .y_wait_box_head h2 { - background: url(/images/head-orange-l.gif) no-repeat top left; margin: 0; - padding: 12px 30px 3px 30px; + padding: 5px 20px; color: white; font-weight: bold; font-size: 1.2em; - line-height: 1.5em; text-align: center; } .y_wait_box_body { - background: url(/images/body-trans-l.gif) no-repeat bottom left; margin: 0; - padding-top: 5px; - padding-left: 16px; - padding-bottom: 20px; - padding-right: 16px; + padding: 5px 15px 20px; + background-color: #ffffff; + border-radius: 0 0 4px 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; } .y_wait_box_main { color: #666666; @@ -400,12 +452,10 @@ tr { width: 100%; } .y_live_button { -/* font-size: 8pt; - height: 22px;*/ padding: 0; color: #555555; margin:0; - + border: 0 none; } .y_live_bouquets { @@ -483,9 +533,10 @@ tr { .y_text_boxcontrol_table { width:114px; height: 22px; - background : url('/images/audiobar.gif') no-repeat 1px 0px; - padding : 1px; - border : #FF8e42 solid 1px; + background: url('/images/audiobar.gif') no-repeat 1px 0px; + padding: 1px; + margin-top: 10px; + border: #FF8e42 solid 1px; } .y_epg_info { border: 1px solid #CCCCCC; @@ -547,9 +598,11 @@ tr { height: 100%; font-size:8pt; z-index:10; - -moz-opacity: 0.2; opacity:.20; - filter: alpha(opacity=20); + + -webkit-opacity: 0.2; + -moz-opacity: 0.2; + filter: alpha(opacity=20); } .ep_bouquet_zap { border-right : #BBBBBB solid 1px; @@ -561,9 +614,11 @@ tr { height: 100%; font-size:8pt; z-index:10; - -moz-opacity: 0.2; opacity:.20; - filter: alpha(opacity=20); + + -webkit-opacity: 0.2; + -moz-opacity: 0.2; + filter: alpha(opacity=20); } .ep_bouquet_item:hover { background-color : #DDDDDD; diff --git a/src/nhttpd/web/Y_Menue.yhtm b/src/nhttpd/web/Y_Menue.yhtm index 8e69324e2..b2965a68d 100644 --- a/src/nhttpd/web/Y_Menue.yhtm +++ b/src/nhttpd/web/Y_Menue.yhtm @@ -98,7 +98,7 @@ function vlc() { @@ -54,49 +50,28 @@ function goUrl(_url){ - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - + - ~=} - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - - - - - - ~=}
- {=L:main.version=} {=ini-get:Y_Version.txt;version=} + v{=ini-get:{=var-get:vf=};version=} -   -   -   - + + + + + +   diff --git a/src/nhttpd/web/Y_Settings_Backup.yhtm b/src/nhttpd/web/Y_Settings_Backup.yhtm index 02f908e1d..4977afef7 100644 --- a/src/nhttpd/web/Y_Settings_Backup.yhtm +++ b/src/nhttpd/web/Y_Settings_Backup.yhtm @@ -36,27 +36,28 @@ function do_backup2() {=var-set:wait_text=Settings=}{=include-block:Y_Blocks.txt;snip_wait=}
- {=var-set:help_url=Help-Settings-Backup_Restore=}{=var-set:menu=Backup & Restore=}{=include-block:Y_Blocks.txt;work_menu=}
+ {=var-set:help_url=Help-Settings-Backup_Restore=}{=var-set:menu={=L:set.menue.backup_restore=}=}{=include-block:Y_Blocks.txt;work_menu=}
-

-  Achtung Backup & Restore ist nur bei einem gleichen Image mit gleichem Stand sinnvoll. -

-
+

+ + {=L:attention=} {=L:set.settings.warning=} +

- + - - + diff --git a/src/nhttpd/web/Y_Settings_Menue.yhtm b/src/nhttpd/web/Y_Settings_Menue.yhtm index c72f8bd94..2769674bf 100644 --- a/src/nhttpd/web/Y_Settings_Menue.yhtm +++ b/src/nhttpd/web/Y_Settings_Menue.yhtm @@ -13,7 +13,7 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu_general').insert({'bottom':el}); + $('secmenu_general').insert({'bottom':el}); }); var menu=ext.select_menu('settings_neutrino'); menu.each(function(e){ @@ -23,7 +23,7 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu_neutrino').insert({'bottom':el}); + $('secmenu_neutrino').insert({'bottom':el}); }); var menu=ext.select_menu('settings_plugins'); menu.each(function(e){ @@ -33,7 +33,7 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu_plugins').insert({'bottom':el}); + $('secmenu_plugins').insert({'bottom':el}); }); } @@ -46,103 +46,123 @@ function init(){
{=L:general=}
    - {=if-empty:{=var-get:management=}~ -
  • yWeb
  • -
  • {=L:set.menue.webserver=}
  • -
  • {=L:set.menue.zapit=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.ucodes=}
  • -
  • {=L:set.menue.boot_logo=}
  • - ~=} -
  • {=L:set.menue.timer_settings=}
  • - ~ -
  • yWeb
  • -
  • {=L:set.menue.webserver=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.zapit=}
  • -
  • {=L:set.menue.ucodes=}
  • -
  • {=L:set.menue.boot_logo=}
  • - ~=} - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.backup_restore=}
  • - ~=} -
  • {=L:set.menue.timer_settings=}
  • - =} +
  • + {=var-set:m_link_href=Y_Settings_yWeb.yhtm=} + {=var-set:m_link_text=yWeb=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_nhttpd.yhtm=} + {=var-set:m_link_text={=L:set.menue.webserver=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_zapit.yhtm=} + {=var-set:m_link_text={=L:set.menue.zapit=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_Backup.yhtm=} + {=var-set:m_link_text={=L:set.menue.backup_restore=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_Timer.yhtm=} + {=var-set:m_link_text={=L:set.menue.timer_settings=}=} + {=include-block:Y_Blocks.txt;management_link=} +
Neutrino
    - {=if-empty:{=var-get:management=}~ -
  • {=L:set.menue.bouquet_editor=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.video_audio=}
  • - ~=} -
  • {=L:set.menue.parental=}
  • -
  • {=L:set.menue.recording=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.direct_recording=}
  • - =} -
  • {=L:set.menue.audio_player=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.esound_server=}
  • -
  • {=L:set.menue.movieplayer=}
  • - ~=} -
  • {=L:set.menue.pictureviewer=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.lcd_display=}
  • - ~=} -
  • {=L:set.menue.key_settings=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.boot_options=}
  • -
  • {=L:set.menue.others=}
  • - ~=} -
  • {=L:set.menue.peronalization=}
  • - ~ -
  • {=L:set.menue.bouquet_editor=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.video_audio=}
  • - ~=} -
  • {=L:set.menue.parental=}
  • -
  • {=L:set.menue.recording=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.direct_recording=}
  • - =} -
  • {=L:set.menue.audio_player=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.esound_server=}
  • -
  • {=L:set.menue.movieplayer=}
  • - ~=} -
  • {=L:set.menue.pictureviewer=}
  • - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.lcd_display=}
  • - ~=} - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.key_settings=}
  • - ~=} - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.boot_options=}
  • -
  • {=L:set.menue.others=}
  • - ~=} - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:set.menue.peronalization=}
  • - ~=} - =} +
  • + {=var-set:m_link_href=Y_Boxcontrol_Bouquet_Editor_Main.yhtm=} + {=var-set:m_link_text={=L:set.menue.bouquet_editor=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_parental=} + {=var-set:m_link_text={=L:set.menue.parental=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_record=} + {=var-set:m_link_text={=L:set.menue.recording=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_movieplayer=} + {=var-set:m_link_text={=L:set.menue.movieplayer=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_audioplayer=} + {=var-set:m_link_text={=L:set.menue.audio_player=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_pictureviewer=} + {=var-set:m_link_text={=L:set.menue.pictureviewer=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • + {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ +
  • + {=var-set:m_link_href=Y_Settings_video_audio.yhtm=} + {=var-set:m_link_text={=L:set.menue.video_audio=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_esound=} + {=var-set:m_link_text={=L:set.menue.esound_server=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_direct_recording=} + {=var-set:m_link_text={=L:set.menue.direct_recording=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_lcd.yhtm=} + {=var-set:m_link_text={=L:set.menue.lcd_display=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_buttons.yhtm=} + {=var-set:m_link_text={=L:set.menue.key_settings=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_bootoptions=} + {=var-set:m_link_text={=L:set.menue.boot_options=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_neutrino_forms.yhtm?form=neutrino_form-data_diverse=} + {=var-set:m_link_text={=L:set.menue.others=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Settings_personalize.yhtm=} + {=var-set:m_link_text={=L:set.menue.peronalization=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • + ~=}
- {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ + {=if-not-equal:{=global-var-get:boxtype=}~coolstream~
{=L:plugins=}
    - {=if-empty:{=var-get:management=}~ -
  • VNC
  • - ~ -
  • VNC
  • - =} +
  • + {=var-set:m_link_href=Y_Settings_VNC.yhtm=} + {=var-set:m_link_text=VNC=} + {=include-block:Y_Blocks.txt;management_link=} +
- ~=} + ~=} diff --git a/src/nhttpd/web/Y_Settings_Timer.yhtm b/src/nhttpd/web/Y_Settings_Timer.yhtm index 1c82b4a9f..bd9a69344 100644 --- a/src/nhttpd/web/Y_Settings_Timer.yhtm +++ b/src/nhttpd/web/Y_Settings_Timer.yhtm @@ -29,19 +29,19 @@ function do_submit() { - + - + - + diff --git a/src/nhttpd/web/Y_Settings_automount_liste.yhtm b/src/nhttpd/web/Y_Settings_automount_liste.yhtm index 51a3b72a9..1ea68f360 100644 --- a/src/nhttpd/web/Y_Settings_automount_liste.yhtm +++ b/src/nhttpd/web/Y_Settings_automount_liste.yhtm @@ -41,6 +41,7 @@ function do_delete()
{=script:Y_Tools automount_list {=if-file-exists:/var/etc/auto.net~/var/etc/auto.net~/etc/auto.net=}=} +
diff --git a/src/nhttpd/web/Y_Settings_mount.yhtm b/src/nhttpd/web/Y_Settings_mount.yhtm index 926ee0fa7..47046bfac 100644 --- a/src/nhttpd/web/Y_Settings_mount.yhtm +++ b/src/nhttpd/web/Y_Settings_mount.yhtm @@ -32,7 +32,6 @@ function do_submit()
diff --git a/src/nhttpd/web/Y_Settings_personalize.yhtm b/src/nhttpd/web/Y_Settings_personalize.yhtm index 5cbcf937e..a4bce8d7f 100644 --- a/src/nhttpd/web/Y_Settings_personalize.yhtm +++ b/src/nhttpd/web/Y_Settings_personalize.yhtm @@ -49,7 +49,6 @@ function do_init() obj_set_radio_value('p_getplugins', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_getplugins;1~cache=}"); obj_set_radio_value('p_restart', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_restart;1~cache=}"); obj_set_radio_value('p_epgrestart', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_epgrestart;1~cache=}"); - obj_set_radio_value('p_ucodecheck', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_ucodecheck;1~cache=}"); obj_set_radio_value('p_chan_epg_stat', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_chan_epg_stat;1~cache=}"); obj_set_radio_value('p_imageinfo', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_imageinfo;1~cache=}"); obj_set_radio_value('p_update', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_update;1~cache=}"); @@ -324,13 +323,6 @@ function do_init() PIN - - -
Backup
{=L:set.settings.backup=}
- + + +
Restore
{=L:set.settings.restore=}
tar-File:  
- +

{=L:set.timer.password=}

klack.de (V2)
{=L:set.timer.klack.url=}
- {=L:set.timer.klack.url_desc=}
+
{=L:set.timer.klack.url_desc=}
{=L:set.timer.klack.security_code=}

{=L:set.timer.channel_name_replacelist=} NFS  CIFS  - FTPFS
Ucodes überprüfen - nicht sichtbar  - sichtbar  - PIN -
Sender/EPG Statistik nicht sichtbar  diff --git a/src/nhttpd/web/Y_Settings_ucodes.yhtm b/src/nhttpd/web/Y_Settings_ucodes.yhtm deleted file mode 100644 index 49cacf81c..000000000 --- a/src/nhttpd/web/Y_Settings_ucodes.yhtm +++ /dev/null @@ -1,58 +0,0 @@ -{=include-block:Y_Blocks.txt;head=} - - - -
-
- {=var-set:help_url=Help-Settings-ucodes=}{=var-set:menu=Ucodes=}{=include-block:Y_Blocks.txt;work_menu=}
-
- - - - - - -
UploadDownload
- -

- camalpha.bin
- avia500.ux
- avia600.ux
- ucode.bin
- -
- -

- -
- -
-
-
- - \ No newline at end of file diff --git a/src/nhttpd/web/Y_Settings_zapit.yhtm b/src/nhttpd/web/Y_Settings_zapit.yhtm index 8279ffe86..40a7aae32 100644 --- a/src/nhttpd/web/Y_Settings_zapit.yhtm +++ b/src/nhttpd/web/Y_Settings_zapit.yhtm @@ -9,9 +9,11 @@ function do_submit() else if (document.f.R1[1].checked == true) _url="/control/exec?Y_Tools&zapit_upload&services.xml"; else if (document.f.R1[2].checked == true) + _url="/control/exec?Y_Tools&zapit_upload&ubouquets.xml"; + else if (document.f.R1[3].checked == true) _url="/control/exec?Y_Tools&zapit_upload&myservices.xml"; else - alert("Bitte eine Auswahl treffen"); + alert("Please make a selection.\nBitte eine Auswahl treffen."); document.f.action=_url; document.f.submit(); } @@ -26,24 +28,25 @@ function do_submit() - -
UploadDownload
+
-

- bouquets.xml
+ bouquets.xml
services.xml
+ ubouquets.xml
myservices.xml
- -
- +

+
+

+

+

- + + bouquets.xml
+ services.xml
+ ubouquets.xml
+ myservices.xml
diff --git a/src/nhttpd/web/Y_Timer_Edit.yhtm b/src/nhttpd/web/Y_Timer_Edit.yhtm index 5a7f4a228..9f0aadb48 100644 --- a/src/nhttpd/web/Y_Timer_Edit.yhtm +++ b/src/nhttpd/web/Y_Timer_Edit.yhtm @@ -164,18 +164,7 @@ function init()
diff --git a/src/nhttpd/web/Y_Tools_Boxcontrol.yhtm b/src/nhttpd/web/Y_Tools_Boxcontrol.yhtm index 10a1cae8d..d4b1b6fec 100644 --- a/src/nhttpd/web/Y_Tools_Boxcontrol.yhtm +++ b/src/nhttpd/web/Y_Tools_Boxcontrol.yhtm @@ -34,11 +34,7 @@ function goUrl(_url){
- {=if-equal:{=global-var-get:boxtype=}~coolstream~ - ~ - - =}
{=L:bc.control.playback=}{=L:bc.control.recording_mode=}
{=L:bc.control.epg_sectiond=}{=L:bc.control.spts=}
{=L:bc.control.epg_sectiond=} 
- - - - - +  
{=L:bc.control.remote=}{=L:bc.control.live_lock=}
-
{=L:bc.control.optical_output=}{=L:bc.control.esound_server=}
- - - - - - -
diff --git a/src/nhttpd/web/Y_Tools_Check_Install.yhtm b/src/nhttpd/web/Y_Tools_Check_Install.yhtm index 19ca8ff51..768f771e3 100644 --- a/src/nhttpd/web/Y_Tools_Check_Install.yhtm +++ b/src/nhttpd/web/Y_Tools_Check_Install.yhtm @@ -94,57 +94,38 @@ function do_check(){ sLog_addRow(sLog_body, "green", "Programs: dboxshot is installed at: {=var-get:dboxshot=}. Remote & OSD is enabled.", "ok"); =} - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - {=var-set:fcp={=if-file-exists:/sbin/fcp~/sbin/fcp~{=if-file-exists:/var/bin/fcp~/var/bin/fcp~{=if-file-exists:/bin/fcp~/bin/fcp~false=}=}=}=} - {=if-equal:{=var-get:fcp=}~false~ - sLog_addRow(sLog_body, "red", "Programs: fcp is not installed. Image flashing is disabled. "+y_url("Help-Tools-Image"), "failed"); - ~ - sLog_addRow(sLog_body, "green", "Programs: fcp is installed at: {=var-get:fcp=}. Image flashing is enabled.", "ok"); - =} - ~=} +{=if-not-equal:{=global-var-get:boxtype=}~coolstream~ + {=var-set:fcp={=if-file-exists:/sbin/fcp~/sbin/fcp~{=if-file-exists:/var/bin/fcp~/var/bin/fcp~{=if-file-exists:/bin/fcp~/bin/fcp~false=}=}=}=} + {=if-equal:{=var-get:fcp=}~false~ + sLog_addRow(sLog_body, "red", "Programs: fcp is not installed. Image flashing is disabled. "+y_url("Help-Tools-Image"), "failed"); + ~ + sLog_addRow(sLog_body, "green", "Programs: fcp is installed at: {=var-get:fcp=}. Image flashing is enabled.", "ok"); + =} +~=} - {=var-set:ether-wake={=if-equal:{=global-var-get:boxtype=}~coolstream~{=if-file-exists:/bin/ether-wake~/bin/ether-wake~{=if-file-exists:/var/bin/ether-wake~/var/bin/ether-wake~=}=}~{=if-file-exists:/bin/ether-wake~/bin/ether-wake~{=if-file-exists:/var/bin/ether-wake~/var/bin/ether-wake~=}=}=}=} + {=var-set:ether-wake={=if-file-exists:/bin/ether-wake~/bin/ether-wake~{=if-file-exists:/var/bin/ether-wake~/var/bin/ether-wake~false=}=}=} {=if-equal:{=var-get:ether-wake=}~false~ sLog_addRow(sLog_body, "red", "Programs: ether-wake is not installed. Wake on LAN is disabled. "+y_url("Help-Tools-Wake_on_LAN"), "failed"); ~ sLog_addRow(sLog_body, "green", "Programs: ether-wake is installed at: {=var-get:ether-wake=}. Wake on LAN is enabled.", "ok"); =} - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - /*automount*/ - {=var-set:automount={=if-file-exists:/sbin/automount~/sbin/automount~{=if-file-exists:/var/bin/automount~/var/bin/automount~false=}=}=} - {=if-equal:{=var-get:automount=}~false~ - sLog_addRow(sLog_body, "red", "Programs: automount is not installed. AutoMount is disabled. "+y_url("Help-Tools-AutoMount"), "failed"); - ~ - sLog_addRow(sLog_body, "green", "Programs: automount is installed at: {=var-get:automount=}. AutoMount is enabled.", "ok"); - =} - /* udp */ - {=var-set:udpstreamts={=if-file-exists:/sbin/udpstreamts~/sbin/udpstreamts~{=if-file-exists:/var/bin/udpstreamts~/var/bin/udpstreamts~false=}=}=} - {=if-equal:{=var-get:udpstreamts=}~false~ - sLog_addRow(sLog_body, "red", "Programs: udpstreamts is not installed. udp-streaming is disabled. "+y_url("Help-Live_Timer-UDP_Streaming"), "failed"); - ~ - sLog_addRow(sLog_body, "green", "Programs: udpstreamts is installed at: {=var-get:udpstreamts=}. udp-streaming is enabled.", "ok"); - =} - ~=} +{=if-not-equal:{=global-var-get:boxtype=}~coolstream~ + /*automount*/ + {=var-set:automount={=if-file-exists:/sbin/automount~/sbin/automount~{=if-file-exists:/var/bin/automount~/var/bin/automount~false=}=}=} + {=if-equal:{=var-get:automount=}~false~ + sLog_addRow(sLog_body, "red", "Programs: automount is not installed. AutoMount is disabled. "+y_url("Help-Tools-AutoMount"), "failed"); + ~ + sLog_addRow(sLog_body, "green", "Programs: automount is installed at: {=var-get:automount=}. AutoMount is enabled.", "ok"); + =} + /* udp */ + {=var-set:udpstreamts={=if-file-exists:/sbin/udpstreamts~/sbin/udpstreamts~{=if-file-exists:/var/bin/udpstreamts~/var/bin/udpstreamts~false=}=}=} + {=if-equal:{=var-get:udpstreamts=}~false~ + sLog_addRow(sLog_body, "red", "Programs: udpstreamts is not installed. udp-streaming is disabled. "+y_url("Help-Live_Timer-UDP_Streaming"), "failed"); + ~ + sLog_addRow(sLog_body, "green", "Programs: udpstreamts is installed at: {=var-get:udpstreamts=}. udp-streaming is enabled.", "ok"); + =} +~=} - - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - /*ucodes*/ - {=if-file-exists:/var/tuxbox/ucodes/avia500.ux~ - sLog_addRow(sLog_body, "green", "Ucodes: avia500.ux found", "ok"); - ~ - sLog_addRow(sLog_body, "yellow", "Ucodes: avia500.ux not found. "+wiki_url("Ucodes"), "notice"); - =} - {=if-file-exists:/var/tuxbox/ucodes/avia600.ux~ - sLog_addRow(sLog_body, "green", "Ucodes: avia600.ux found", "ok"); - ~ - sLog_addRow(sLog_body, "yellow", "Ucodes: avia600.ux not found. "+wiki_url("Ucodes"), "notice"); - =} - {=if-file-exists:/var/tuxbox/ucodes/cam-alpha.bin~ - sLog_addRow(sLog_body, "green", "Ucodes: cam-alpha found", "ok"); - ~ - sLog_addRow(sLog_body, "red", "Ucodes: cam-alpha not found. "+wiki_url("Ucodes"), "failed"); - =} - ~=} do_stop(); } //]]> diff --git a/src/nhttpd/web/Y_Tools_Installer.yhtm b/src/nhttpd/web/Y_Tools_Installer.yhtm index 901d8d0df..b63273213 100644 --- a/src/nhttpd/web/Y_Tools_Installer.yhtm +++ b/src/nhttpd/web/Y_Tools_Installer.yhtm @@ -19,7 +19,7 @@ function do_submit() alert("{=L:tools.yinstaller.no_file_given=}"); } function init(){ - var res=dbox_exec_tools("var_space"); + var res=dbox_exec_tools("mtd_space"); var Ausdruck = /([^ ]*)[ ]*([^ ]*)[ ]*([^ ]*)[ ]*([^ ]*)[ ]*([^ ]*)[ ]*([^ ]*).*$/; Ausdruck.exec(res); var total = RegExp.$2; @@ -27,7 +27,7 @@ function init(){ var avaiable = RegExp.$4; var percentage = RegExp.$5; if(total != "") - str="{=L:tools.yinstaller.space.var=}: "+total+"{=L:tools.yinstaller.space.used=}: "+used+"{=L:tools.yinstaller.space.free=}: "+avaiable+"{=L:tools.yinstaller.space.percentage=}: "+percentage; + str="{=L:tools.yinstaller.space.mtd=}: "+total+"kB; {=L:tools.yinstaller.space.used=}: "+used+"kB; {=L:tools.yinstaller.space.free=}: "+avaiable+"kB; {=L:tools.yinstaller.space.percentage=}: "+percentage; else str="{=L:tools.yinstaller.not_determine=}"; id("free").innerHTML=str; diff --git a/src/nhttpd/web/Y_Tools_Menue.yhtm b/src/nhttpd/web/Y_Tools_Menue.yhtm index 04acc2d10..6cf1ac3e5 100644 --- a/src/nhttpd/web/Y_Tools_Menue.yhtm +++ b/src/nhttpd/web/Y_Tools_Menue.yhtm @@ -15,7 +15,7 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu_tools').insert({'bottom':el}); + $('secmenu_tools').insert({'bottom':el}); }); var menu=ext.select_menu('expert'); menu.each(function(e){ @@ -25,13 +25,23 @@ function init(){ 'href': e.get('file') }).update("-"+e.get('menuitem')) ); - $('secmenu_expert').insert({'bottom':el}); + $('secmenu_expert').insert({'bottom':el}); + }); + var menu=ext.select_menu('yweb'); + menu.each(function(e){ + var el=new Element('li').update( + new Element('a', {'target':'work', + 'title': e.get('desc'), + 'href': e.get('file') + }).update("-"+e.get('menuitem')) + ); + $('secmenu_yweb').insert({'bottom':el}); }); } -{=var-set:automount={=if-file-exists:/sbin/automount~true~{=if-file-exists:/var/bin/automount~true~=}=}=} {=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip2=}~1~=}=} +{=var-set:automount={=if-file-exists:/sbin/automount~true~{=if-file-exists:/var/bin/automount~true~=}=}=} {=var-set:ether-wake={=if-equal:{=global-var-get:boxtype=}~coolstream~{=if-file-exists:/bin/ether-wake~/bin/ether-wake~{=if-file-exists:/var/bin/ether-wake~/var/bin/ether-wake~=}=}~{=if-file-exists:/bin/ether-wake~/bin/ether-wake~{=if-file-exists:/var/bin/ether-wake~/var/bin/ether-wake~=}=}=}=}
@@ -40,46 +50,77 @@ function init(){
{=L:main.tools=}
    - {=if-empty:{=var-get:management=}~ - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:tools.automount=}
  • -
  • {=L:tools.mounts=}
  • -
  • {=L:tools.wake_on_lan=}
  • - ~=} - ~ - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ + {=if-not-equal:{=global-var-get:boxtype=}~coolstreamm~ +
  • {=if-empty:{=var-get:automount=}~ -
  • {=L:tools.automount=}
  • + {=L:tools.automount=} ~ -
  • {=L:tools.automount=}
  • + {=var-set:m_link_href=Y_Settings_automount_liste.yhtm=} + {=var-set:m_link_desc==} + {=var-set:m_link_text={=L:tools.automount=}=} + {=include-block:Y_Blocks.txt;management_link=} =} -
  • {=L:tools.mounts=}
  • - ~=} - {=if-empty:{=var-get:ether-wake=}~ -
  • {=L:tools.wake_on_lan=}
  • - ~ -
  • {=L:tools.wake_on_lan=}
  • - =} - =} -
  • {=L:tools.check_install=}
  • + +
  • + {=var-set:m_link_href=Y_Settings_mount_liste.yhtm=} + {=var-set:m_link_desc={=L:tools.mounts_desc=}=} + {=var-set:m_link_text={=L:tools.mounts=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • + ~=} +
  • + {=if-empty:{=var-get:ether-wake=}~ + {=L:tools.wake_on_lan=} + ~ + {=var-set:m_link_href=Y_Settings_wol.yhtm=} + {=var-set:m_link_desc==} + {=var-set:m_link_text={=L:tools.wake_on_lan=}=} + {=include-block:Y_Blocks.txt;management_link=} + =} +
{=L:tools.expert=}
    -
  • {=L:main.info=}
  • - {=if-empty:{=var-get:management=}~ -
  • {=L:tools.image=}
  • -
  • {=L:tools.command_shell=}
  • -
  • yInstaller
  • - ~ - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -
  • {=L:tools.image=}
  • - ~=} -
  • {=L:tools.command_shell=}  -
  • -
  • yInstaller
  • - =} +
  • + {=L:main.info=} +
  • + {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ +
  • + {=var-set:m_link_href=Y_Tools_Bootlogo.yhtm=} + {=var-set:m_link_desc==} + {=var-set:m_link_text={=L:tools.boot_logo=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • +
  • + {=var-set:m_link_href=Y_Tools_Flash_Menue.yhtm=} + {=var-set:m_link_desc==} + {=var-set:m_link_text={=L:tools.image=}=} + {=include-block:Y_Blocks.txt;management_link=} +
  • + ~=} +
  • + {=var-set:m_link_href=Y_Tools_Cmd.yhtm=} + {=var-set:m_link_desc==} + {=var-set:m_link_text={=L:tools.command_shell=}=} + {=include-block:Y_Blocks.txt;management_link=} + +
  • +
+
+
yWeb
+
+
    +
  • + {=L:tools.check_install=} +
  • +
  • + {=var-set:m_link_href=Y_Tools_Installer.yhtm=} + {=var-set:m_link_desc==} + {=var-set:m_link_text=yInstaller=} + {=include-block:Y_Blocks.txt;management_link=} +
diff --git a/src/nhttpd/web/Y_Tools_Timer_Sync.yhtm b/src/nhttpd/web/Y_Tools_Timer_Sync.yhtm index 0ec1d2fb4..d4159530a 100644 --- a/src/nhttpd/web/Y_Tools_Timer_Sync.yhtm +++ b/src/nhttpd/web/Y_Tools_Timer_Sync.yhtm @@ -23,19 +23,7 @@ Slave box
Test
--> {=L:live.timer-sync.rec_dir=}: - - + {=include-block:Y_neutrino_Blocks.txt;neutrino_list_record_dirs=}
{=L:live.timer-sync.settings=} {=L:live.timer-sync.debugging=}
diff --git a/src/nhttpd/web/Y_Tools_remote_osd.yhtm b/src/nhttpd/web/Y_Tools_remote_osd.yhtm index 6fe14f882..f45c62466 100644 --- a/src/nhttpd/web/Y_Tools_remote_osd.yhtm +++ b/src/nhttpd/web/Y_Tools_remote_osd.yhtm @@ -7,7 +7,7 @@ function rcsim(_key) { $('statusline').show(); $('buttons').hide(); dbox_rcsim(_key); - window.setTimeout("do_dboxshot()",50); + window.setTimeout("do_dboxshot()",750); } function do_dboxshot(){ var res = dbox_exec_tools("fbshot fb /tmp/a.png"); diff --git a/src/nhttpd/web/Y_Version.txt b/src/nhttpd/web/Y_Version.txt index 17bf39fdd..770a0d8f8 100644 --- a/src/nhttpd/web/Y_Version.txt +++ b/src/nhttpd/web/Y_Version.txt @@ -1,5 +1,4 @@ -version=2.8.0.8 -date=22.09.2010 +version=2.8.0.30 +date=18.08.2012 type=Release info=Port Coolstream - diff --git a/src/nhttpd/web/Y_neutrino_Blocks.txt b/src/nhttpd/web/Y_neutrino_Blocks.txt index 5137ea115..714a573cc 100644 --- a/src/nhttpd/web/Y_neutrino_Blocks.txt +++ b/src/nhttpd/web/Y_neutrino_Blocks.txt @@ -38,85 +38,59 @@ start-block~neutrino_form-data_record
- {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - - - - - - - - - - - - - - - - - - - - - - + + + + + - + - + + + + + + + + + + - - + + - =} - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - + + + + + - ~=} @@ -126,6 +100,13 @@ start-block~neutrino_form-data_record + + + + @@ -153,41 +134,6 @@ start-block~neutrino_form-data_record - - - - - - - - - - - - - - - - - - - - - - - - - -
{=L:set.rec.rec_dest=}
{=L:set.rec.device=} - -
{=L:set.rec.recserver_ip=} -
{=L:set.rec.recserver_port=} - -
{=L:set.rec.recserver_wol=} - {=L:off=}  - {=L:on=} -
{=L:set.rec.mac_adress=} - -
{=L:set.rec.rec_behavior=}
{=L:set.rec.stop_playback=}{=L:directory=}
{=L:set.rec.channeldir=} - {=L:off=}  - {=L:on=} + {=L:off=}  + {=L:on=}
{=L:set.rec.epg_sectionsd=}{=L:set.rec.epg_end=} - + {=L:off=}  + {=L:on=}
{=L:set.rec.zap=}{=L:set.rec.recordtime=}
{=L:set.rec.timeshift_desc=}
{=L:directory=}
{=L:set.rec.timeshift.pause=} - {=L:off=}  - {=L:on=} + {=L:off=}  + {=L:on=}
{=L:set.rec.scart=} - {=L:off=}  - {=L:on=} - {=L:set.rec.timeshift.auto_record=}
{=L:set.rec.spts=}{=L:set.rec.timeshift.auto_delete=} - {=L:off=}  - {=L:on=} + {=L:off=}  + {=L:on=} +
{=L:set.rec.timeshift.tmp_timeshift=} + {=L:off=}  + {=L:on=}
{=L:set.rec.timer_settings=}
{=L:set.rec.start_delay=}{=L:set.rec.stop_delay=}  {=L:set.reboot_required=}
{=L:set.rec.zap=} + {=L:off=}  + {=L:on=} +
{=L:set.rec.zap_delay=}  {=L:set.reboot_required=}
{=L:set.rec.timeshift_desc=}
{=L:set.rec.timeshift.directory=}
{=L:set.rec.timeshift.recordtime=}
{=L:set.rec.timeshift.pause=} - {=L:off=}  - {=L:on=} -
{=L:set.rec.timeshift.auto_record=}
{=L:set.rec.timeshift.auto_delete=} - {=L:off=}  - {=L:on=} -
{=L:set.rec.timeshift.tmp_timeshift=} - {=L:off=}  - {=L:on=} -

@@ -204,26 +150,10 @@ start-block~neutrino_form-data_record function form_init() { var val = ""; -{=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_server_ip;10.10.10.10=}"; - document.f.ip.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_server_port;4000=}"; - document.f.port.value = val; - obj_set_radio_value('wol', "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_server_wakeup;0=}"); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_server_mac;11:22:33:44:55:66=}"; - document.f.mac.value = val; - obj_set_radio_value('stopplayback', "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_stopplayback;false=}"); - obj_set_radio_value('zap_on_announce', "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_zap_on_announce;false=}"); - obj_set_radio_value('vcr_no_scart', "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_vcr_no_scart;0=}"); - obj_set_radio_value('in_spts_mode', "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_in_spts_mode;true=}"); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_stopsectionsd;0~cache=}"; - document.f.stopsectionsd.selectedIndex = val; - - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_type;0=}"; - document.f.rec_type.selectedIndex = val; - change_rec_type(); -=} + obj_set_radio_value('recording_zap_on_announce', "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_zap_on_announce;false=}"); + obj_set_radio_value('recording_epg_for_end', "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_epg_for_end;false=}"); + obj_set_radio_value('recording_save_in_channeldir', "{=ini-get:/var/tuxbox/config/neutrino.conf;recording_save_in_channeldir;false=}"); obj_set_radio_value('timeshift_pause', "{=ini-get:/var/tuxbox/config/neutrino.conf;timeshift_pause;0=}"); obj_set_radio_value('auto_delete', "{=ini-get:/var/tuxbox/config/neutrino.conf;auto_delete;true=}"); obj_set_radio_value('temp_timeshift', "{=ini-get:/var/tuxbox/config/neutrino.conf;temp_timeshift;0=}"); @@ -243,37 +173,7 @@ function form_init() else document.f.audio_ac3[0].checked = true; } -function change_rec_type() -{ -{=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - if(document.f.rec_type.selectedIndex != 1) - $('ip','port', 'mac', 'wol0', 'wol1').invoke('disable'); - else - $('ip','port', 'mac', 'wol0', 'wol1').invoke('enable'); - if(document.f.rec_type.selectedIndex != 2) - $('vcr0','vcr1').invoke('disable'); - else - $('vcr0','vcr1').invoke('enable') - if(document.f.rec_type.selectedIndex != 1 && document.f.rec_type.selectedIndex != 3){ - $('spts0','spts1', 'sp0', 'sp1', 'ss').invoke('disable'); - $$('.audio').invoke('disable'); - } - else{ - $('spts0','spts1', 'sp0', 'sp1', 'ss').invoke('enable'); - $$('.audio').invoke('enable'); - } - change_mac(); -=} -} -function change_mac() -{ -{=if-not-equal:{=global-var-get:boxtype=}~coolstream~ - var vis = document.f.wol[0].checked; - if(document.f.rec_type.selectedIndex == 1) - document.f.mac.disabled = vis; -=} -} function do_submit() { show_waitbox(true); @@ -290,26 +190,17 @@ end-block~neutrino_form-data_record # ------- yWeb save Settings start-block~neutrino_record_save_settings -{=if-not-equal:{=global-var-get:boxtype=}~coolstream~ -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_server_ip;{=ip=}~open=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_server_port;{=port=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_server_mac;{=mac=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_server_wakeup;{=wol=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_type;{=rec_type=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_stopplayback;{=stopplayback=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_stopsectionsd;{=stopsectionsd=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_zap_on_announce;{=zap_on_announce=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_vcr_no_scart;{=vcr_no_scart=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;recording_in_spts_mode;{=in_spts_mode=}~cache=} -~ -{=ini-set:/var/tuxbox/config/neutrino.conf;timeshiftdir;{=timeshiftdir=}~open=} +{=ini-set:/var/tuxbox/config/neutrino.conf;network_nfs_recordingdir;{=network_nfs_recordingdir=}~open=} +{=ini-set:/var/tuxbox/config/neutrino.conf;recording_save_in_channeldir;{=recording_save_in_channeldir=}~cache=} +{=ini-set:/var/tuxbox/config/neutrino.conf;recording_zap_on_announce;{=recording_zap_on_announce=}~cache=} +{=ini-set:/var/tuxbox/config/neutrino.conf;recording_epg_for_end;{=recording_epg_for_end=}~cache=} +{=ini-set:/var/tuxbox/config/neutrino.conf;timeshiftdir;{=timeshiftdir=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;record_hours;{=record_hours=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;timeshift_pause;{=timeshift_pause=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;auto_timeshift;{=auto_timeshift=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;auto_delete;{=auto_delete=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;temp_timeshift;{=temp_timeshift=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;recording_audio_pids_default;{=recording_audio_pids_default=}~save=} -=} {=ini-set:/var/tuxbox/config/timerd.conf;EXTRA_TIME_START;{=EXTRA_TIME_START=}=} {=ini-set:/var/tuxbox/config/timerd.conf;EXTRA_TIME_END;{=EXTRA_TIME_END=}=} {=ini-set:/var/tuxbox/config/timerd.conf;ZAPTO_EXTRA_TIME_START;{=ZAPTO_EXTRA_TIME_START=}=} @@ -324,142 +215,17 @@ start-block~neutrino_form-data_movieplayer
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
{=L:set.mp.sources=}
{=L:set.mp.streamingserver=} - {=L:off=}  - {=L:on=} -
{=L:set.mp.streamingserver_ip=} - - -
{=L:set.mp.streamingserver_port=} - - -
{=L:set.mp.dvd_device=} - - -
{=L:set.mp.vlc_dir=} - - -
{=L:set.mp.transcoding=}
{=L:set.mp.video_datarate=} - - -
{=L:set.mp.transcode=} - {=L:off=}  - {=L:on=} - -
{=L:set.mp.video_codec=} - - -
{=L:set.mp.resolution=} - - -
{=L:set.mp.audio_datarate=} - - -
{=L:set.mp.transcode_audio=} - {=L:off=}  - {=L:on=} - -
{=L:set.mp.force_ac3=} - {=L:off=}  - {=L:on=} - -
{=L:set.mp.player=}
{=L:set.mp.start_directory=}
{=L:set.rec.epg_sectionsd=} -  ({=L:set.mp.only_movieplayer=}) -
{=L:set.mp.used_buffer=} - {=L:off=}  - {=L:on=}  {=L:set.mp.only_movieplayer=} -
{=L:set.mp.number_buffersegments=}({=L:set.mp.only_movieplayer=})
{=L:set.mp.picture_in_browser=} - {=L:off=}  - {=L:on=} -

- +    {=L:help=} @@ -470,80 +236,11 @@ start-block~neutrino_form-data_movieplayer function form_init() { var val = ""; - obj_set_radio_value('streaming_type', "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_type;0~open=}"); - - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_server_ip~cache=}"; - document.f.streaming_server_ip.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_server_port;8080~cache=}"; - document.f.streaming_server_port.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_server_cddrive;D:~cache=}"; - document.f.streaming_server_cddrive.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_server_startdir;C:/Movies~cache=}"; - document.f.streaming_server_startdir.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_videorate;1000~cache=}"; - document.f.streaming_videorate.value = val; - - obj_set_radio_value('streaming_force_transcode_video', "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_force_transcode_video;0~cache=}"); - - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_transcode_video_codec;0~cache=}"; - document.f.streaming_transcode_video_codec.selectedIndex = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_resolution;0~cache=}"; - document.f.streaming_resolution.selectedIndex = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_audiorate;192~cache=}"; - document.f.streaming_audiorate.value = val; - - obj_set_radio_value('streaming_transcode_audio', "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_transcode_audio;0~cache=}"); - obj_set_radio_value('streaming_force_avi_rawaudio', "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_force_avi_rawaudio;0~cache=}"); - - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_moviedir~cache=}"; - document.f.streaming_moviedir.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_stopsectionsd;1~cache=}"; - document.f.stopsectionsd_mp.selectedIndex = val; - - obj_set_radio_value('streaming_use_buffer', "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_use_buffer;1~cache=}"); - - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_buffer_segment_size;24~cache=}"; - document.f.streaming_buffer_segment_size.value = val; - - obj_set_radio_value('streaming_show_tv_in_browser', "{=ini-get:/var/tuxbox/config/neutrino.conf;streaming_show_tv_in_browser;0~cache=}"); - change_streaming_type(); -} -function change_streaming_type() -{ - var vis = document.f.streaming_type[0].checked; - - document.f.streaming_server_ip.disabled = vis; - document.f.streaming_server_port.disabled = vis; - document.f.streaming_server_cddrive.disabled = vis; - document.f.streaming_server_startdir.disabled = vis; - document.f.streaming_videorate.disabled = vis; - document.f.streaming_force_transcode_video[0].disabled = vis; - document.f.streaming_force_transcode_video[1].disabled = vis; - document.f.streaming_transcode_video_codec.disabled = vis; - document.f.streaming_resolution.disabled = vis; - document.f.streaming_audiorate.disabled = vis; - document.f.streaming_transcode_audio[0].disabled = vis; - document.f.streaming_transcode_audio[1].disabled = vis; - document.f.streaming_force_avi_rawaudio[0].disabled = vis; - document.f.streaming_force_avi_rawaudio[1].disabled = vis; -} -function set_hidden_values() -{ - document.f.h_streaming_server_ip.value = document.f.streaming_server_ip.value; - document.f.h_streaming_server_port.value = document.f.streaming_server_port.value; - document.f.h_streaming_server_cddrive.value = document.f.streaming_server_cddrive.value; - document.f.h_streaming_server_startdir.value = document.f.streaming_server_startdir.value; - document.f.h_streaming_videorate.value = document.f.streaming_videorate.value; - document.f.h_streaming_force_transcode_video.value = obj_get_radio_value("streaming_force_transcode_video"); - document.f.h_streaming_transcode_video_codec.value = document.f.streaming_transcode_video_codec.selectedIndex; - document.f.h_streaming_resolution.value = document.f.streaming_resolution.selectedIndex; - document.f.h_streaming_audiorate.value = document.f.streaming_audiorate.value; - document.f.h_streaming_transcode_audio.value = obj_get_radio_value("streaming_transcode_audio"); - document.f.h_streaming_force_avi_rawaudio.value = obj_get_radio_value("streaming_force_avi_rawaudio"); + val = "{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_moviedir~open=}"; + document.f.network_nfs_moviedir.value = val; } function do_submit() { - set_hidden_values(); show_waitbox(true); document.f.submit(); } @@ -554,23 +251,7 @@ end-block~neutrino_form-data_movieplayer # ------- yWeb save Settings start-block~neutrino_movieplayer_save_settings -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_type;{=streaming_type=}~open=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_server_ip;{=h_streaming_server_ip=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_server_port;{=h_streaming_server_port=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_server_cddrive;{=h_streaming_server_cddrive=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_server_startdir;{=h_streaming_server_startdir=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_videorate;{=h_streaming_videorate=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_force_transcode_video;{=h_streaming_force_transcode_video=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_transcode_video_codec;{=h_streaming_transcode_video_codec=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_resolution;{=h_streaming_resolution=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_audiorate;{=h_streaming_audiorate=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_transcode_audio;{=h_streaming_transcode_audio=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_force_avi_rawaudio;{=h_streaming_force_avi_rawaudio=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_moviedir;{=streaming_moviedir=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_stopsectionsd;{=stopsectionsd_mp=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_use_buffer;{=streaming_use_buffer=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_buffer_segment_size;{=streaming_buffer_segment_size=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;streaming_show_tv_in_browser;{=streaming_show_tv_in_browser=}~save=} +{=ini-set:/var/tuxbox/config/neutrino.conf;network_nfs_moviedir;{=network_nfs_moviedir=}=} end-block~neutrino_movieplayer_save_settings @@ -1187,7 +868,7 @@ start-block~neutrino_form-data_pictureviewer {=L:set.pv.start_dir=} - + {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ @@ -1234,7 +915,7 @@ end-block~neutrino_form-data_pictureviewer start-block~neutrino_pictureviewer_save_settings {=ini-set:/var/tuxbox/config/neutrino.conf;picviewer_scaling;{=picviewer_scaling=}~open=} {=ini-set:/var/tuxbox/config/neutrino.conf;picviewer_slide_time;{=picviewer_slide_time=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;picviewer_picturedir;{=picviewer_picturedir=}~cache=} +{=ini-set:/var/tuxbox/config/neutrino.conf;network_nfs_picturedir;{=network_nfs_picturedir=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;picviewer_decode_server_ip;{=picviewer_decode_server_ip=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;picviewer_decode_server_port;{=picviewer_decode_server_port=}~save=} end-block~neutrino_pictureviewer_save_settings @@ -1297,7 +978,7 @@ start-block~neutrino_form-data_audioplayer {=L:set.ap.start_dir=} - + {=L:set.ap.parse_shoutcast=} @@ -1352,7 +1033,7 @@ start-block~neutrino_audioplayer_save_settings {=ini-set:/var/tuxbox/config/neutrino.conf;audioplayer_show_playlist;{=audioplayer_show_playlist=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;audioplayer_screensaver;{=audioplayer_screensaver=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;audioplayer_highprio;{=audioplayer_highprio=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;audioplayer_audioplayerdir;{=audioplayer_audioplayerdir=}~cache=} +{=ini-set:/var/tuxbox/config/neutrino.conf;network_nfs_audioplayerdir;{=network_nfs_audioplayerdir=}~cache=} {=ini-set:/var/tuxbox/config/neutrino.conf;audioplayer_enable_sc_metadata;{=audioplayer_enable_sc_metadata=}~save=} end-block~neutrino_audioplayer_save_settings @@ -1583,3 +1264,52 @@ start-block~neutrino_esound_save_settings {=ini-set:/var/tuxbox/config/neutrino.conf;esound_port;{=esound_port=}=} end-block~neutrino_esound_save_settings + +# ------- list possible directorys for records +start-block~neutrino_list_record_dirs + +end-block~neutrino_list_record_dirs diff --git a/src/nhttpd/web/images/LICENSE b/src/nhttpd/web/images/LICENSE index 5988e4386..c98e4bd19 100644 --- a/src/nhttpd/web/images/LICENSE +++ b/src/nhttpd/web/images/LICENSE @@ -9,10 +9,6 @@ Published under GPL v2 - y.png - audiobar.gif - blank.gif -- body-trans* -- head-blue* -- head-orange* -- head-trans* - help_white.gif From old (before yWeb): diff --git a/src/nhttpd/web/images/Makefile.am b/src/nhttpd/web/images/Makefile.am index 96d7d896a..01bcdc88b 100644 --- a/src/nhttpd/web/images/Makefile.am +++ b/src/nhttpd/web/images/Makefile.am @@ -11,8 +11,6 @@ install_DATA = accept.png \ arrowup.png \ audiobar.gif \ blank.gif \ - body-trans-l.gif \ - body-trans-r.gif \ check_green.gif \ chmod.gif \ comment.gif \ @@ -41,12 +39,6 @@ install_DATA = accept.png \ ftype_link.gif \ fullscreen.png \ hd1.jpg \ - head-blue-l.gif \ - head-blue-r.gif \ - head-orange-l.gif \ - head-orange-r.gif \ - head-trans-l.gif \ - head-trans-r.gif \ help.gif \ help_white.gif \ hidden.gif \ diff --git a/src/nhttpd/web/images/body-trans-l.gif b/src/nhttpd/web/images/body-trans-l.gif deleted file mode 100644 index 20e08cbf4..000000000 Binary files a/src/nhttpd/web/images/body-trans-l.gif and /dev/null differ diff --git a/src/nhttpd/web/images/body-trans-r.gif b/src/nhttpd/web/images/body-trans-r.gif deleted file mode 100644 index ed091687e..000000000 Binary files a/src/nhttpd/web/images/body-trans-r.gif and /dev/null differ diff --git a/src/nhttpd/web/images/fb.png b/src/nhttpd/web/images/fb.png index 3bc0bd32f..da7e7f031 100644 Binary files a/src/nhttpd/web/images/fb.png and b/src/nhttpd/web/images/fb.png differ diff --git a/src/nhttpd/web/images/hd1.jpg b/src/nhttpd/web/images/hd1.jpg index f28f85be7..2cfd4998c 100644 Binary files a/src/nhttpd/web/images/hd1.jpg and b/src/nhttpd/web/images/hd1.jpg differ diff --git a/src/nhttpd/web/images/head-blue-l.gif b/src/nhttpd/web/images/head-blue-l.gif deleted file mode 100644 index 9e763cf03..000000000 Binary files a/src/nhttpd/web/images/head-blue-l.gif and /dev/null differ diff --git a/src/nhttpd/web/images/head-blue-r.gif b/src/nhttpd/web/images/head-blue-r.gif deleted file mode 100644 index a998161c8..000000000 Binary files a/src/nhttpd/web/images/head-blue-r.gif and /dev/null differ diff --git a/src/nhttpd/web/images/head-orange-l.gif b/src/nhttpd/web/images/head-orange-l.gif deleted file mode 100644 index 6adb3fc94..000000000 Binary files a/src/nhttpd/web/images/head-orange-l.gif and /dev/null differ diff --git a/src/nhttpd/web/images/head-orange-r.gif b/src/nhttpd/web/images/head-orange-r.gif deleted file mode 100644 index a1875e3a2..000000000 Binary files a/src/nhttpd/web/images/head-orange-r.gif and /dev/null differ diff --git a/src/nhttpd/web/images/head-trans-l.gif b/src/nhttpd/web/images/head-trans-l.gif deleted file mode 100644 index 035aa26f0..000000000 Binary files a/src/nhttpd/web/images/head-trans-l.gif and /dev/null differ diff --git a/src/nhttpd/web/images/head-trans-r.gif b/src/nhttpd/web/images/head-trans-r.gif deleted file mode 100644 index 7dc2c7828..000000000 Binary files a/src/nhttpd/web/images/head-trans-r.gif and /dev/null differ diff --git a/src/nhttpd/web/images/neo.jpg b/src/nhttpd/web/images/neo.jpg index 9c8e6ceb0..03d0c1c02 100644 Binary files a/src/nhttpd/web/images/neo.jpg and b/src/nhttpd/web/images/neo.jpg differ diff --git a/src/nhttpd/web/images/rc.jpg b/src/nhttpd/web/images/rc.jpg index bd181e7c8..b9138f366 100644 Binary files a/src/nhttpd/web/images/rc.jpg and b/src/nhttpd/web/images/rc.jpg differ diff --git a/src/nhttpd/web/images/rc_sagem.jpg b/src/nhttpd/web/images/rc_sagem.jpg index 9b0c203d7..047a24d1f 100644 Binary files a/src/nhttpd/web/images/rc_sagem.jpg and b/src/nhttpd/web/images/rc_sagem.jpg differ diff --git a/src/nhttpd/web/images/streaminfo.png b/src/nhttpd/web/images/streaminfo.png index 7df94f66f..52a47319a 100644 Binary files a/src/nhttpd/web/images/streaminfo.png and b/src/nhttpd/web/images/streaminfo.png differ diff --git a/src/nhttpd/web/images/time_down.png b/src/nhttpd/web/images/time_down.png index b158203f3..330050232 100644 Binary files a/src/nhttpd/web/images/time_down.png and b/src/nhttpd/web/images/time_down.png differ diff --git a/src/nhttpd/web/images/time_up.png b/src/nhttpd/web/images/time_up.png index fc6b2af5d..826faf903 100644 Binary files a/src/nhttpd/web/images/time_up.png and b/src/nhttpd/web/images/time_up.png differ diff --git a/src/nhttpd/web/images/y.png b/src/nhttpd/web/images/y.png index 64d55055a..b1f19f549 100644 Binary files a/src/nhttpd/web/images/y.png and b/src/nhttpd/web/images/y.png differ diff --git a/src/nhttpd/web/images/zee.jpg b/src/nhttpd/web/images/zee.jpg index 0bc5b871b..7bbb8ae61 100644 Binary files a/src/nhttpd/web/images/zee.jpg and b/src/nhttpd/web/images/zee.jpg differ diff --git a/src/nhttpd/web/languages/Deutsch b/src/nhttpd/web/languages/Deutsch index 4586571d3..54c919d3e 100644 --- a/src/nhttpd/web/languages/Deutsch +++ b/src/nhttpd/web/languages/Deutsch @@ -16,19 +16,19 @@ url=URL server=Server refreshing=aktualisieren ... refresh=Aktualisieren -record=aufnehmen -zap=umschalten -lookup=nachschlagen -save_values_desc=senden und speichern der Werte +record=Aufnehmen +zap=Umschalten +lookup=Nachschlagen +save_values_desc=Senden und Speichern der Werte save_values=Werte werden übernommen ... administration=Administration normal=Normal management=Management uninstaller=Deinstallation -send=senden -save=speichern +send=Senden +save=Speichern save_all=Alle Änderungen speichern -cancel=abbrechen +cancel=Abbrechen answer=Antwort reboot=Neustart shutdown=Ausschalten @@ -47,9 +47,11 @@ description=Beschreibung color=Farbe tag=Bezeichnung empty=leer -check=prüfen +check=Prüfen help=Hilfe -restriced_by_management_ip=Zugriff verwert wg. ManagementIP +attention=Achtung! +directory=Verzeichnis +restriced_by_management_ip=Zugriff verwehrt wg. ManagementIP # ==========Main Menue main.boxcontrol=Boxsteuerung @@ -103,17 +105,13 @@ bc.menue.volumen_display=Lautstärke Anzeige bc.control.freemem=FreeMem bc.control.lock=sperren bc.control.unlock=freigeben -bc.control.lcd_unlock=LCD freigeben bc.control.standby_mode=Standby Modus bc.control.recording_mode=Aufnahmemodus bc.control.box=Box bc.control.remote=Fernbedienung bc.control.playback=Abspielen bc.control.epg_sectiond=EPG Sectiond -bc.control.spts=SPTS bc.control.live_lock=Live sperren -bc.control.optical_output=Optischer Ausgang -bc.control.esound_server=ESound Server bc.control.reboot.ask=Box wirklich neu starten? bc.control.reboot=Neustart bc.control.shutdown.ask=Box wirklich ausschalten? @@ -215,8 +213,6 @@ set.sync_with_neutrino=Zur Synchronisation mit Neutrino ========Settings General & Menue set.menue.webserver=Webserver -set.menue.ucodes=Ucodes -set.menue.boot_logo=Boot Logo set.menue.timer_settings=Timer Einstellungen set.menue.zapit=Zapit set.menue.backup_restore=Sichern und Wiederherstellen @@ -264,10 +260,11 @@ set.rec.audio_channels=Tonspuren set.rec.audio_standard=Standard Tonspur aufnehmen set.rec.audio_alternate=Alternative Tonspur aufnehmen set.rec.audio_ac3=AC3 Tonspuren aufnehmen +set.rec.channeldir=Speichere im Kanalverzeichnis +set.rec.epg_end=Aufnahme nur bis EPG-Ende +set.rec.recordtime=Aufnahmezeit in Stunden set.rec.timeshift_desc=Timeshift -set.rec.timeshift.directory=Verzeichnis -set.rec.timeshift.recordtime=Aufnahmezeit in Stunden -set.rec.timeshift.pause=Pause +set.rec.timeshift.pause=Start mit Pause-Taste set.rec.timeshift.auto_record=Autom. Aufnahme (in Sek, 0=deaktiviert) set.rec.timeshift.auto_delete=Automatisches Löschen set.rec.timeshift.tmp_timeshift=Temporäres timeshift @@ -365,15 +362,22 @@ set.ap.start_dir=Start-Verzeichnis set.ap.parse_shoutcast=Shoutcast Meta-Daten ========Settings Timer -set.timer.header=Timer Settings +set.timer.header=Timer Einstellungen set.timer.username=Benutzername set.timer.password=Passwort -set.timer.klack.url_desc=("&" wir beim Speichern zu ";" konvertiert) +set.timer.klack.url_desc=("&" wird beim Speichern zu ";" konvertiert) set.timer.klack.url=Persönliche RSS TV-Planer URL set.timer.klack.security_code_desc=Klack Sicherheits Code set.timer.klack.security_code=Sicherheits Code set.timer.channel_name_replacelist=Sendernamen-Ersetzungsliste +========Settings Backup/Restore +set.settings.backup=Sichern +set.settings.backup_desc=Sichern Ihrer Einstellungen +set.settings.restore=Wiederherstellen +set.settings.restore_desc=Hochladen und wiederherstellen einer vorher erstellten Sicherung. Ihre Box startet danach neu. +set.settings.warning=Sichern & Wiederherstellen ist nur bei einem gleichen Image mit gleichem Entwicklungsstand sinnvoll. + ============ Tools Info tools.info.show_messages=Kernel Meldungen tools.info.processes=Prozesse @@ -387,11 +391,11 @@ tools.info.version=Version ============ Tools yInstaller tools.yinstaller.no_file_given=Keine Datei angegeben! -tools.yinstaller.space.var=Platz in /var Gesamt -tools.yinstaller.space.used=k Benutzt -tools.yinstaller.space.free=k Frei -tools.yinstaller.space.percentage=k Anteil benutzt -tools.yinstaller.not_determine=Kann freien Speicherplatz nicht ermitteln /var ist keine Partition! JFFS2 oder YADD? +tools.yinstaller.space.mtd=Platz gesamt +tools.yinstaller.space.used=Benutzt +tools.yinstaller.space.free=Frei +tools.yinstaller.space.percentage=Anteil benutzt +tools.yinstaller.not_determine=Kann freien Speicherplatz nicht ermitteln. tools.yinstaller.head=yInstaller tools.yinstaller.tar_file=tar-Datei tools.yinstaller.upload_install=hochladen und installieren @@ -413,6 +417,7 @@ tools.path=Verzeichnis tools.command=Kommando tools.cmd.enter_command=Auszuführendes Kommando eingeben tools.cmd.execute_command=Kommando ausführen +tools.boot_logo=Boot Logo =========== LIVE Menue live.heading=Live/Timer diff --git a/src/nhttpd/web/languages/English b/src/nhttpd/web/languages/English index cec1fb334..b4a2e43e9 100644 --- a/src/nhttpd/web/languages/English +++ b/src/nhttpd/web/languages/English @@ -49,6 +49,8 @@ tag=Tag empty=empty check=check help=Help +attention=Attention! +directory=Directory restriced_by_management_ip=restricted by ManagementIP #========= MAIN Menue @@ -105,17 +107,13 @@ bc.menue.volumen_display=volumen display bc.control.freemem=FreeMem bc.control.lock=lock bc.control.unlock=unlock -bc.control.lcd_unlock=LCD unlock bc.control.standby_mode=standby mode bc.control.recording_mode=recording mode bc.control.box=box bc.control.remote=remote bc.control.playback=playback bc.control.epg_sectiond=EPG Sectiond -bc.control.spts=SPTS bc.control.live_lock=live lock -bc.control.optical_output=optical output -bc.control.esound_server=ESound Server bc.control.reboot.ask=Really restart the Box? bc.control.reboot=reboot bc.control.shutdown.ask=Really shutdown the Box? @@ -218,8 +216,6 @@ set.sync_with_neutrino=Synchronization with Neutrino =======Settings General & Menue set.menue.webserver=Webserver -set.menue.ucodes=Ucodes -set.menue.boot_logo=Boot Logo set.menue.timer_settings=Timer Settings set.menue.zapit=Zapit set.menue.backup_restore=Backup & Restore @@ -267,10 +263,11 @@ set.rec.audio_channels=Audio channels set.rec.audio_standard=Record standard audio channel set.rec.audio_alternate=Record alternate audio channel set.rec.audio_ac3=Record ac3 audio channel +set.rec.channeldir=Save in channeldir +set.rec.epg_end=Recording until end of EPG-time +set.rec.recordtime=Recording time in hours set.rec.timeshift_desc=Timeshift -set.rec.timeshift.directory=Directory -set.rec.timeshift.recordtime=Recording time in hours -set.rec.timeshift.pause=Pause +set.rec.timeshift.pause=Start with pause-key set.rec.timeshift.auto_record=Autom. Recording (in Sec, 0=deactivate) set.rec.timeshift.auto_delete=Automatic deletion set.rec.timeshift.tmp_timeshift=Temporaly timeshift @@ -377,6 +374,13 @@ set.timer.klack.security_code_desc=your klack security code to get your data wit set.timer.klack.security_code=Security Code set.timer.channel_name_replacelist=Channel name replace list +========Settings Backup/Restore +set.settings.backup=Backup +set.settings.backup_desc=Backup your settings +set.settings.restore=Restore +set.settings.restore_desc=Upload and restore your settings. Your STB will reboot. +set.settings.warning=Backup & Restore is only useful for the same image with the same level of development. + ============ Tools Info tools.info.show_messages=Kernel Messages tools.info.processes=Processes @@ -390,11 +394,11 @@ tools.info.version=Version ============ Tools yInstaller tools.yinstaller.no_file_given=No file given! -tools.yinstaller.space.var=Space in /var total -tools.yinstaller.space.used=k used -tools.yinstaller.space.free=k free -tools.yinstaller.space.percentage=k percentage used -tools.yinstaller.not_determine=Can not determine free space. /var is no partition! JFFS2, YADD or USB? +tools.yinstaller.space.mtd=Space total +tools.yinstaller.space.used=used +tools.yinstaller.space.free=free +tools.yinstaller.space.percentage=percentage used +tools.yinstaller.not_determine=Can not determine free space. tools.yinstaller.head=yInstaller tools.yinstaller.tar_file=tar-File tools.yinstaller.upload_install=upload and install @@ -416,6 +420,7 @@ tools.path=Path tools.command=Command tools.cmd.enter_command=enter command to execute tools.cmd.execute_command=execute shell command +tools.boot_logo=Boot Logo =========== LIVE Menue live.heading=Live/Timer diff --git a/src/nhttpd/web/languages/Portuguese b/src/nhttpd/web/languages/Portuguese index afa3c0913..cab847312 100644 --- a/src/nhttpd/web/languages/Portuguese +++ b/src/nhttpd/web/languages/Portuguese @@ -49,6 +49,7 @@ tag=Tag empty=vazio check=verificar help=Ajuda +directory=Diretório restriced_by_management_ip=restringido pela Gestão de IP #========= Menu Principal @@ -105,17 +106,13 @@ bc.menue.volumen_display=visualizar volume bc.control.freemem=FreeMem bc.control.lock=bloquear bc.control.unlock=desbloquear -bc.control.lcd_unlock=Bloqueio do LCD bc.control.standby_mode=modo em standby bc.control.recording_mode=modo de gravação bc.control.box=box bc.control.remote=remote bc.control.playback=playback bc.control.epg_sectiond=EPG Sectiond -bc.control.spts=SPTS bc.control.live_lock=bloqueio do live -bc.control.optical_output=saída optica -bc.control.esound_server=Servidor ESound bc.control.reboot.ask=Quer realmente reiniciar a sua Box? bc.control.reboot=reiniciar bc.control.shutdown.ask=Quer realmente desligar a sua Box? @@ -222,8 +219,6 @@ set.sync_with_neutrino=Sincronização com Neutrino =======Definições General & Menu set.menue.webserver=Webserver -set.menue.ucodes=Ucodes -set.menue.boot_logo=Boot Logo set.menue.timer_settings=Definições do Programador set.menue.zapit=Zapit set.menue.backup_restore=Backup & Restore @@ -272,10 +267,8 @@ set.rec.audio_channels=Canais Audio set.rec.audio_standard=Gravar audio em modo standard set.rec.audio_alternate=Gravar audio em modo alternativo set.rec.audio_ac3=Gravar audio ac3 +set.rec.recordtime=Tempo de gravação na hora set.rec.timeshift_desc=Timeshift(pausar Tv ao vivo) -set.rec.timeshift.directory=Diretório -set.rec.timeshift.recordtime=Tempo de gravação na hora -set.rec.timeshift.pause=Pausa set.rec.timeshift.auto_record=Gravação automática (em Sec, 0=desactivada) set.rec.timeshift.auto_delete=Eliminação automática set.rec.timeshift.tmp_timeshift=Timeshift temporário @@ -385,11 +378,11 @@ tools.info.version=Versão ============ Ferramentas yInstaller tools.yinstaller.no_file_given=Nenhum ficheiro selecionado! -tools.yinstaller.space.var=Total de Espaço em /var -tools.yinstaller.space.used=k usados -tools.yinstaller.space.free=k livres -tools.yinstaller.space.percentage=k percentagem usada -tools.yinstaller.not_determine=Sem puder determinar o espaço livre. /var não é uma partição! JFFS2, YADD ou USB? +tools.yinstaller.space.mtd=Total de espaço +tools.yinstaller.space.used=usados +tools.yinstaller.space.free=livres +tools.yinstaller.space.percentage=percentagem usada +tools.yinstaller.not_determine=Sem puder determinar o espaço livre. tools.yinstaller.head=yInstaller tools.yinstaller.tar_file=tar-Ficheiro tools.yinstaller.upload_install=upload e instalar @@ -411,6 +404,7 @@ tools.path=Path tools.command=Comando_Shell tools.cmd.enter_command=escrever comando para executar tools.cmd.execute_command=execute comando shell +tools.boot_logo=Boot Logo =========== Menu LIVE live.heading=Live/Timer diff --git a/src/nhttpd/web/scripts/Y_Live.sh b/src/nhttpd/web/scripts/Y_Live.sh index 1aa505f8f..e10efdce9 100755 --- a/src/nhttpd/web/scripts/Y_Live.sh +++ b/src/nhttpd/web/scripts/Y_Live.sh @@ -11,18 +11,12 @@ # ----------------------------------------------------------- live_lock() { - if [ "$boxtype" != "coolstream" ]; then - call_webserver "control/lcd?lock=1&clear=1&rect=10,10,110,50,1,0&xpos=20&ypos=27&size=22&font=2&text=%20%20%20%20yWeb%0A%20%20LiveView&update=1" >/dev/null - fi call_webserver "control/rc?lock" >/dev/null call_webserver "control/zapto?stopplayback" >/dev/null } # ----------------------------------------------------------- live_unlock() { - if [ "$boxtype" != "coolstream" ]; then - call_webserver "control/lcd?lock=0" >/dev/null - fi call_webserver "control/rc?unlock" >/dev/null call_webserver "control/zapto?startplayback" >/dev/null } diff --git a/src/nhttpd/web/scripts/Y_Tools.sh b/src/nhttpd/web/scripts/Y_Tools.sh index 56a099131..bd81a8b0e 100755 --- a/src/nhttpd/web/scripts/Y_Tools.sh +++ b/src/nhttpd/web/scripts/Y_Tools.sh @@ -179,16 +179,9 @@ bootlogo_lcd_upload() y_format_message_html } # ----------------------------------------------------------- -ucodes_upload() -{ - msg="$1 hochgeladen
next file" - upload_copy "$y_path_ucodes/$1" - y_format_message_html -} -# ----------------------------------------------------------- zapit_upload() { - msg="$1 hochgeladen
next file" + msg="$1 hochgeladen
next file" upload_copy "$y_path_zapit/$1" y_format_message_html } @@ -493,35 +486,25 @@ do_fbshot_clear() # ----------------------------------------------------------- do_settings_backup_restore() { - workdir="$y_path_tmp/y_save_settings" - yI_Version="0.1" + now=$(date +%Y-%m-%d_%H-%M-%S) + workdir="$y_path_tmp/y_save_settings/$now" case "$1" in backup) - mkdir $workdir >/dev/null - cp -r $y_path_config $workdir >/dev/null - t=`date +%y%m%d_%H%M%S` - filename="$y_path_tmp/y_Save_Settings_$t.tar" - cd $workdir - tar -cvf $filename ./* >/dev/null - rm -r $workdir >/dev/null - echo "$filename" + rm -rf $workdir + mkdir -p $workdir + /bin/backup.sh $workdir >/dev/null + filename=$(ls -1 -tr $workdir/settings_* | tail -1) + echo "$filename" ;; restore) - msg="restore settings" - if [ -s "$y_upload_file" ] - then - # unpack /tmp/upload.tmp - cd $y_path_tmp - tar -xf "$y_upload_file" - rm $y_upload_file - cp -rf ./config /var/tuxbox/ - rm -r ./config - msg="$msg ok" - else - msg="$msg error: no upload file" - fi - y_format_message_html + if [ -s "$y_upload_file" ] + then + msg=$(/bin/restore.sh "$y_upload_file") + else + msg="error: no upload file" + fi + y_format_message_html ;; esac } @@ -545,7 +528,6 @@ case "$1" in image_delete) image_delete_download_page ;; bootlogo_upload) bootlogo_upload ;; bootlogo_lcd_upload) bootlogo_lcd_upload ;; - ucodes_upload) ucodes_upload $2 ;; zapit_upload) zapit_upload $2 ;; kernel-stack) msg=`dmesg`; y_format_message_html ;; ps) msg=`ps`; y_format_message_html ;; @@ -566,8 +548,7 @@ case "$1" in fbshot) shift 1; do_fbshot $* ;; fbshot_clear) do_fbshot_clear ;; tvshot_clear) rm -f /tmp/screenshot.png ;; - get_update_version_dbox) wget -O /tmp/version.txt "http://www.yjogol.com/download/Y_Version.txt" ;; - get_update_version_coolstream) wget -O /tmp/version.txt "http://www.yjogol.com/download/coolstream/Y_Version.txt" ;; + get_update_version) wget -O /tmp/version.txt "http://git.coolstreamtech.de/?p=cst-public-gui-neutrino.git;a=blob_plain;f=src/nhttpd/web/Y_Version.txt" ;; settings_backup_restore) shift 1; do_settings_backup_restore $* ;; exec_cmd) shift 1; $* ;; automount_list) shift 1; do_automount_list $* ;; @@ -631,17 +612,15 @@ case "$1" in cat /tmp/$2 ;; - standby_status) - status=`switch -s|grep "FNC: 0"` - if [ "$status" = "" ] - then - echo "off" - else - echo "on" - fi - ;; - var_space) - df |grep mtd2 + mtd_space|var_space) + df | while read fs rest; do + case ${fs:0:3} in + mtd) + echo "$fs" "$rest" + break + ;; + esac + done ;; tmp_space) df /tmp|grep /tmp diff --git a/src/nhttpd/web/scripts/_Y_Globals.sh b/src/nhttpd/web/scripts/_Y_Globals.sh index ebe1a72c0..ed3206eb5 100755 --- a/src/nhttpd/web/scripts/_Y_Globals.sh +++ b/src/nhttpd/web/scripts/_Y_Globals.sh @@ -19,7 +19,6 @@ y_path_scripts="$y_path_httpd/scripts" y_path_usrbin="/var/bin" y_path_config="/var/tuxbox/config" y_path_tmp="/tmp" -y_path_ucodes="/var/tuxbox/ucodes" y_path_zapit="/var/tuxbox/config/zapit" y_path_plugin_tuxnew="/var/tuxbox/config/tuxnews" diff --git a/src/nhttpd/yhttpd_mods/mod_yparser.cpp b/src/nhttpd/yhttpd_mods/mod_yparser.cpp index fc8a5c48b..9ad6eb7e6 100644 --- a/src/nhttpd/yhttpd_mods/mod_yparser.cpp +++ b/src/nhttpd/yhttpd_mods/mod_yparser.cpp @@ -353,6 +353,7 @@ std::string CyParser::cgi_cmd_parsing(CyhookHandler *hh, //----------------------------------------------------------------------------- // ycgi : cmd executing +// comment:~ // script: // include: // func: (funcname to be implemented in CyParser::YWeb_cgi_func) @@ -377,7 +378,13 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd) { if (ySplitString(ycmd, ":", ycmd_type, ycmd_name)) { if (ycmd_type == "L") yresult = CLanguage::getInstance()->getTranslation(ycmd_name); - else if (ycmd_type == "script") + else if (ycmd_type == "comment") { + std::string comment_y, comment_html; + if (ySplitString(ycmd_name, "~", comment_y, comment_html)) { + if (comment_html != "") + yresult = ""; + } + } else if (ycmd_type == "script") yresult = YexecuteScript(hh, ycmd_name); else if (ycmd_type == "if-empty") { std::string if_value, if_then, if_else; diff --git a/src/system/Makefile.am b/src/system/Makefile.am index dfbaface4..7288f0507 100644 --- a/src/system/Makefile.am +++ b/src/system/Makefile.am @@ -28,8 +28,15 @@ endif noinst_LIBRARIES = libneutrino_system.a libneutrino_system_a_SOURCES = \ - safe_system.c \ - localize.cpp setting_helpers.cpp debug.cpp \ - ping.c flashtool.cpp httptool.cpp \ - settings.cpp lastchannel.cpp \ - configure_network.cpp fsmounter.cpp + configure_network.cpp \ + debug.cpp \ + flashtool.cpp \ + fsmounter.cpp \ + httptool.cpp \ + lastchannel.cpp \ + localize.cpp \ + helpers.cpp \ + ping.c \ + settings.cpp \ + setting_helpers.cpp +# safe_system.c diff --git a/src/system/configure_network.cpp b/src/system/configure_network.cpp index 1a7a8f12c..0e0040454 100644 --- a/src/system/configure_network.cpp +++ b/src/system/configure_network.cpp @@ -24,14 +24,13 @@ #include #include #include "configure_network.h" -#include "libnet.h" /* netGetNameserver, netSetNameserver */ -#include "network_interfaces.h" /* getInetAttributes, setInetAttributes */ -#include /* system */ +#include /* netGetNameserver, netSetNameserver */ +#include /* getInetAttributes, setInetAttributes */ #include #include #include #include -#include +#include CNetworkConfig::CNetworkConfig() { @@ -216,39 +215,13 @@ void CNetworkConfig::commitConfig(void) } } -int mysystem(char * cmd, char * arg1, char * arg2) -{ - int i; - pid_t pid; - int maxfd = getdtablesize();// sysconf(_SC_OPEN_MAX); - switch (pid = vfork()) - { - case -1: /* can't fork */ - perror("vfork"); - return -1; - - case 0: /* child process */ - for(i = 3; i < maxfd; i++) - close(i); - if(execlp(cmd, cmd, arg1, arg2, NULL)) - { - perror("exec"); - } - exit(0); - default: /* parent returns to calling process */ - break; - } - waitpid(pid, 0, 0); - return 0; -} - void CNetworkConfig::startNetwork(void) { - std::string cmd = "/sbin/ifup " + ifname; + const char _ifup[] = "/sbin/ifup"; #ifdef DEBUG - printf("CNetworkConfig::startNetwork: %s\n", cmd.c_str()); + printf("CNetworkConfig::startNetwork: %s %s\n",_ifup, ifname.c_str()); #endif - safe_system(cmd.c_str()); + my_system(_ifup, ifname.c_str()); if (!inet_static) { init_vars(); @@ -258,11 +231,11 @@ void CNetworkConfig::startNetwork(void) void CNetworkConfig::stopNetwork(void) { - std::string cmd = "/sbin/ifdown " + ifname; + const char _ifdown[] = "/sbin/ifdown"; #ifdef DEBUG - printf("CNetworkConfig::stopNetwork: %s\n", cmd.c_str()); + printf("CNetworkConfig::stopNetwork: %s %s\n",_ifdown, ifname.c_str()); #endif - safe_system(cmd.c_str()); + my_system(_ifdown, ifname.c_str()); } diff --git a/src/system/flashtool.cpp b/src/system/flashtool.cpp index ec9eff466..063827603 100644 --- a/src/system/flashtool.cpp +++ b/src/system/flashtool.cpp @@ -304,13 +304,15 @@ bool CFlashTool::erase(int globalProgressEnd) close(fd); return true; } - +#if 0 +//never used bool CFlashTool::check_cramfs( const std::string & /*filename*/ ) { int retVal = 0; //cramfs_crc( (char*) filename.c_str() ); printf("flashcheck returned: %d\n", retVal); return retVal==1; } +#endif #define FROMHEX(c) ((c)>='a' ? (c)-'a'+10 : ((c)>='A' ? (c)-'A'+10 : (c)-'0')) bool CFlashTool::check_md5( const std::string & filename, const std::string & smd5) { diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp new file mode 100644 index 000000000..a564982e6 --- /dev/null +++ b/src/system/helpers.cpp @@ -0,0 +1,237 @@ +/* + Neutrino-HD + + License: GPL + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include /* or */ +#include +#include +#include + +#include + +bool file_exists(const char *filename) +{ + struct stat stat_buf; + if(::stat(filename, &stat_buf) == 0) + { + return true; + } else + { + return false; + } +} + +void wakeup_hdd(const char *hdd_dir) +{ + if(!check_dir(hdd_dir)){ + std::string wakeup_file = hdd_dir; + wakeup_file += "/.wakeup"; + remove(wakeup_file.c_str()); + creat(wakeup_file.c_str(),S_IREAD|S_IWRITE); + sync(); + } +} +//use for script with full path +int my_system(const char * cmd) +{ + if (!file_exists(cmd)) + return -1; + + return my_system(cmd, NULL); +} + +int my_system(const char * cmd, const char * arg1, const char * arg2, const char * arg3, const char * arg4, const char * arg5, const char * arg6) +{ + int i=0 ,ret=0, childExit=0; + pid_t pid; + int maxfd = getdtablesize();// sysconf(_SC_OPEN_MAX); + switch (pid = vfork()) + { + case -1: /* can't vfork */ + perror("vfork"); + return -1; + case 0: /* child process */ + for(i = 3; i < maxfd; i++) + close(i); + if(execlp(cmd, cmd, arg1, arg2, arg3, arg4, arg5, arg6, NULL)) + { + std::string txt = "ERROR: my_system \"" + (std::string) cmd + "\""; + perror(txt.c_str()); + ret = -1; + } + _exit (0); // terminate c h i l d proces s only + default: /* parent returns to calling process */ + break; + } + waitpid(pid, &childExit, 0); + if(childExit != 0) + ret = childExit; + return ret; +} + +FILE* my_popen( pid_t& pid, const char *cmdstring, const char *type) +{ + int pfd[2] ={-1,-1}; + FILE *fp = NULL; + + /* only allow "r" or "w" */ + if ((type[0] != 'r' && type[0] != 'w') || type[1] != 0) { + errno = EINVAL; /* required by POSIX */ + return(NULL); + } + + if (pipe(pfd) < 0) + return(NULL); /* errno set by pipe() */ + + if ((pid = vfork()) < 0) { + return(NULL); /* errno set by vfork() */ + } else if (pid == 0) { /* child */ + if (*type == 'r') { + close(pfd[0]); + if (pfd[1] != STDOUT_FILENO) { + dup2(pfd[1], STDOUT_FILENO); + close(pfd[1]); + } + } else { + close(pfd[1]); + if (pfd[0] != STDIN_FILENO) { + dup2(pfd[0], STDIN_FILENO); + close(pfd[0]); + } + } + execl("/bin/sh", "sh", "-c", cmdstring, (char *)0); + exit(0); + } + + /* parent continues... */ + if (*type == 'r') { + close(pfd[1]); + if ((fp = fdopen(pfd[0], type)) == NULL) + return(NULL); + } else { + close(pfd[0]); + if ((fp = fdopen(pfd[1], type)) == NULL) + return(NULL); + } + return(fp); +} + +int safe_mkdir(char * path) +{ + struct statfs s; + int ret = 0; + if(!strncmp(path, "/hdd", 4)) { + ret = statfs("/hdd", &s); + if((ret != 0) || (s.f_type == 0x72b6)) + ret = -1; + else + mkdir(path, 0755); + } else + mkdir(path, 0755); + return ret; +} + +/* function used to check is this dir writable, i.e. not flash, for record etc */ +int check_dir(const char * dir) +{ + /* default to return, if statfs fail */ + int ret = -1; + struct statfs s; + if (::statfs(dir, &s) == 0) { + switch (s.f_type) /* f_type is long */ + { + case 0xEF53L: /*EXT2 & EXT3*/ + case 0x6969L: /*NFS*/ + case 0xFF534D42L: /*CIFS*/ + case 0x517BL: /*SMB*/ + case 0x52654973L: /*REISERFS*/ + case 0x65735546L: /*fuse for ntfs*/ + case 0x58465342L: /*xfs*/ + case 0x4d44L: /*msdos*/ + case 0x0187: /* AUTOFS_SUPER_MAGIC */ + case 0x858458f6L: /*ramfs*/ +#if 0 + case 0x72b6L: /*jffs2*/ +#endif + ret = 0; + break; //ok + default: + fprintf(stderr, "%s Unknow File system type: %i\n" ,dir ,s.f_type); + break; // error + } + } + return ret; +} + +bool get_fs_usage(const char * dir, long &btotal, long &bused) +{ + btotal = bused = 0; + struct statfs s; + + if (::statfs(dir, &s) == 0 && s.f_blocks) { + btotal = s.f_blocks; + bused = s.f_blocks - s.f_bfree; + //printf("fs (%s): total %ld used %ld\n", dir, btotal, bused); + return true; + } + return false; +} + +bool get_mem_usage(unsigned long &kbtotal, unsigned long &kbfree) +{ + unsigned long cached = 0, buffers = 0; + kbtotal = kbfree = 0; + + FILE * f = fopen("/proc/meminfo", "r"); + if (!f) + return false; + + char buffer[256]; + while (fgets(buffer, 255, f)) { + if (!strncmp(buffer, "Mem", 3)) { + if (!strncmp(buffer+3, "Total", 5)) + kbtotal = strtoul(buffer+9, NULL, 10); + else if (!strncmp(buffer+3, "Free", 4)) + kbfree = strtoul(buffer+8, NULL, 10); + } + else if (!strncmp(buffer, "Buffers", 7)) { + buffers = strtoul(buffer+8, NULL, 10); + } + else if (!strncmp(buffer, "Cached", 6)) { + cached = strtoul(buffer+7, NULL, 10); + break; + } + } + fclose(f); + kbfree = kbfree + cached + buffers; + printf("mem: total %ld cached %ld free %ld\n", kbtotal, cached, kbfree); + return true; +} diff --git a/src/system/helpers.h b/src/system/helpers.h new file mode 100644 index 000000000..c14938527 --- /dev/null +++ b/src/system/helpers.h @@ -0,0 +1,37 @@ + +#ifndef __system_helpers__ +#define __system_helpers__ + +/* + Neutrino-HD + + License: GPL + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +int my_system(const char * cmd, const char * arg1, const char * arg2 = NULL, const char * arg3 = NULL, const char * arg4 = NULL, const char * arg5 = NULL, const char * arg6 = NULL); + +int my_system(const char * cmd); + +FILE* my_popen( pid_t& pid, const char *cmdstring, const char *type); +int safe_mkdir(char * path); +bool file_exists(const char *filename); +void wakeup_hdd(const char *hdd_dir); +int check_dir(const char * dir); +bool get_fs_usage(const char * dir, long &total, long &used); +bool get_mem_usage(unsigned long &total, unsigned long &free); + +#endif diff --git a/src/system/httptool.cpp b/src/system/httptool.cpp index 99eb91f98..20bd5fba7 100644 --- a/src/system/httptool.cpp +++ b/src/system/httptool.cpp @@ -24,6 +24,10 @@ #include #include +#if LIBCURL_VERSION_NUM < 0x071507 +#include +#endif + #include diff --git a/src/system/lastchannel.cpp b/src/system/lastchannel.cpp index 8898d77b8..787c22c4b 100644 --- a/src/system/lastchannel.cpp +++ b/src/system/lastchannel.cpp @@ -122,13 +122,14 @@ void CLastChannel::set_store_difftime (int secs) { secs_diff_before_store = secs; } - +#if 0 +//never used int CLastChannel::get_store_difftime (void) const { return secs_diff_before_store; } - +#endif int CLastChannel::get_mode(t_channel_id channel_id) { std::list<_LastCh>::iterator It; diff --git a/src/system/lastchannel.h b/src/system/lastchannel.h index 911e7bd5e..0c281b1c5 100644 --- a/src/system/lastchannel.h +++ b/src/system/lastchannel.h @@ -34,7 +34,7 @@ class CLastChannel { int channel; t_channel_id channel_id; - unsigned long timestamp; + long int timestamp; int channel_mode; }; diff --git a/src/system/locals.h b/src/system/locals.h index b29c95e3a..4c1e6fdb3 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -152,6 +152,7 @@ typedef enum LOCALE_AUDIOMENU_PREF_SUBS_HEAD, LOCALE_AUDIOMENU_SPDIF_DD, LOCALE_AUDIOMENU_STEREO, + LOCALE_AUDIOMENU_VOLUME_ADJUST, LOCALE_AUDIOMENU_VOLUME_STEP, LOCALE_AUDIOPLAYER_ADD, LOCALE_AUDIOPLAYER_ADD_IC, @@ -318,6 +319,7 @@ typedef enum LOCALE_DATE_THU, LOCALE_DATE_TUE, LOCALE_DATE_WED, + LOCALE_EPG_SAVING, LOCALE_EPGEXTENDED_ACTORS, LOCALE_EPGEXTENDED_DIRECTOR, LOCALE_EPGEXTENDED_GUESTS, @@ -326,6 +328,7 @@ typedef enum LOCALE_EPGEXTENDED_YEAR_OF_PRODUCTION, LOCALE_EPGLIST_NOEVENTS, LOCALE_EPGVIEWER_MORE_SCREENINGS, + LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT, LOCALE_EPGVIEWER_NODETAILED, LOCALE_EPGVIEWER_NOTFOUND, LOCALE_EVENTFINDER_HEAD, @@ -418,6 +421,7 @@ typedef enum LOCALE_EXTRA_TP_RATE, LOCALE_EXTRA_UPDATE_DIR, LOCALE_EXTRA_USE_GOTOXX, + LOCALE_EXTRA_VOLUME_DIGITS, LOCALE_EXTRA_VOLUME_POS, LOCALE_EXTRA_WEST, LOCALE_EXTRA_ZAP_CYCLE, @@ -461,7 +465,8 @@ typedef enum LOCALE_FLASHUPDATE_ACTIONREADFLASH, LOCALE_FLASHUPDATE_CANTOPENFILE, LOCALE_FLASHUPDATE_CANTOPENMTD, - LOCALE_FLASHUPDATE_CHECKUPDATE, + LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, + LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL, LOCALE_FLASHUPDATE_CURRENTVERSION_SEP, LOCALE_FLASHUPDATE_CURRENTVERSIONDATE, LOCALE_FLASHUPDATE_CURRENTVERSIONTIME, @@ -548,6 +553,7 @@ typedef enum LOCALE_FONTSIZE_INFOBAR_NUMBER, LOCALE_FONTSIZE_INFOBAR_SMALL, LOCALE_FONTSIZE_MENU, + LOCALE_FONTSIZE_MENU_HINT, LOCALE_FONTSIZE_MENU_INFO, LOCALE_FONTSIZE_MENU_TITLE, LOCALE_HDD_10MIN, @@ -714,6 +720,377 @@ typedef enum LOCALE_MAINSETTINGS_VIDEO, LOCALE_MENU_BACK, LOCALE_MENU_CANCEL, + LOCALE_MENU_HINT_A_PIC, + LOCALE_MENU_HINT_APLAY, + LOCALE_MENU_HINT_AUDIO, + LOCALE_MENU_HINT_AUDIO_ANALOG_MODE, + LOCALE_MENU_HINT_AUDIO_AVSYNC, + LOCALE_MENU_HINT_AUDIO_DD, + LOCALE_MENU_HINT_AUDIO_HDMI_DD, + LOCALE_MENU_HINT_AUDIO_SPDIF_DD, + LOCALE_MENU_HINT_AUDIO_SRS, + LOCALE_MENU_HINT_AUDIO_SRS_ALGO, + LOCALE_MENU_HINT_AUDIO_SRS_NMGR, + LOCALE_MENU_HINT_AUDIO_SRS_VOLUME, + LOCALE_MENU_HINT_AUDIO_VOLSTEP, + LOCALE_MENU_HINT_AUDIOPLAYER_DEFDIR, + LOCALE_MENU_HINT_AUDIOPLAYER_FOLLOW, + LOCALE_MENU_HINT_AUDIOPLAYER_HIGHPRIO, + LOCALE_MENU_HINT_AUDIOPLAYER_ORDER, + LOCALE_MENU_HINT_AUDIOPLAYER_PLAYLIST, + LOCALE_MENU_HINT_AUDIOPLAYER_REPEAT, + LOCALE_MENU_HINT_AUDIOPLAYER_SC_METADATA, + LOCALE_MENU_HINT_AUDIOPLAYER_SCREENSAVER, + LOCALE_MENU_HINT_AUDIOPLAYER_TITLE, + LOCALE_MENU_HINT_AUTO_LANG, + LOCALE_MENU_HINT_AUTO_SUBS, + LOCALE_MENU_HINT_BACK, + LOCALE_MENU_HINT_BACKUP, + LOCALE_MENU_HINT_BEDIT, + LOCALE_MENU_HINT_BIGWINDOWS, + LOCALE_MENU_HINT_CACHE_TXT, + LOCALE_MENU_HINT_CEC_MODE, + LOCALE_MENU_HINT_CEC_STANDBY, + LOCALE_MENU_HINT_CEC_VIEW_ON, + LOCALE_MENU_HINT_CHANNELLIST_COLORED, + LOCALE_MENU_HINT_CHANNELLIST_EPG_ALIGN, + LOCALE_MENU_HINT_CHANNELLIST_EXTENDED, + LOCALE_MENU_HINT_CHANNELLIST_FONTS, + LOCALE_MENU_HINT_CHANNELLIST_FOOT, + LOCALE_MENU_HINT_CHANNELLIST_SETUP, + LOCALE_MENU_HINT_CI, + LOCALE_MENU_HINT_COLORS, + LOCALE_MENU_HINT_CONTENT_BACK, + LOCALE_MENU_HINT_CONTENT_TEXTCOLOR, + LOCALE_MENU_HINT_CONTRAST_FONTS, + LOCALE_MENU_HINT_DBOXINFO, + LOCALE_MENU_HINT_DELETE_CHANNELS, + LOCALE_MENU_HINT_EPG_CACHE, + LOCALE_MENU_HINT_EPG_DIR, + LOCALE_MENU_HINT_EPG_EXTENDEDCACHE, + LOCALE_MENU_HINT_EPG_FONTS, + LOCALE_MENU_HINT_EPG_MAX_EVENTS, + LOCALE_MENU_HINT_EPG_OLD_EVENTS, + LOCALE_MENU_HINT_EPG_SAVE, + LOCALE_MENU_HINT_EVENT_TEXTCOLOR, + LOCALE_MENU_HINT_EVENTLIST_FONTS, + LOCALE_MENU_HINT_EXTENDED, + LOCALE_MENU_HINT_FACTORY, + LOCALE_MENU_HINT_FADE, + LOCALE_MENU_HINT_FAN_SPEED, + LOCALE_MENU_HINT_FILEBROWSER_DENYDIRECTORYLEAVE, + LOCALE_MENU_HINT_FILEBROWSER_SHOWRIGHTS, + LOCALE_MENU_HINT_FILEPLAY, + LOCALE_MENU_HINT_FILESYSTEM_IS_UTF8, + LOCALE_MENU_HINT_FONT_GUI, + LOCALE_MENU_HINT_FONT_SCALING, + LOCALE_MENU_HINT_FONT_TTX, + LOCALE_MENU_HINT_FONTS, + LOCALE_MENU_HINT_GAMELIST_FONTS, + LOCALE_MENU_HINT_GAMES, + LOCALE_MENU_HINT_HDD, + LOCALE_MENU_HINT_HDD_APPLY, + LOCALE_MENU_HINT_HDD_CHECK, + LOCALE_MENU_HINT_HDD_FORMAT, + LOCALE_MENU_HINT_HDD_NOISE, + LOCALE_MENU_HINT_HDD_SLEEP, + LOCALE_MENU_HINT_HDD_TOOLS, + LOCALE_MENU_HINT_HEAD_BACK, + LOCALE_MENU_HINT_HEAD_TEXTCOLOR, + LOCALE_MENU_HINT_IMAGEINFO, + LOCALE_MENU_HINT_INACT_TIMER, + LOCALE_MENU_HINT_INACTIVE_BACK, + LOCALE_MENU_HINT_INACTIVE_TEXTCOLOR, + LOCALE_MENU_HINT_INET_RADIO, + LOCALE_MENU_HINT_INFO, + LOCALE_MENU_HINT_INFOBAR_BACK, + LOCALE_MENU_HINT_INFOBAR_CASYS, + LOCALE_MENU_HINT_INFOBAR_COLORED_EVENT, + LOCALE_MENU_HINT_INFOBAR_DD, + LOCALE_MENU_HINT_INFOBAR_FILESYS, + LOCALE_MENU_HINT_INFOBAR_FONTS, + LOCALE_MENU_HINT_INFOBAR_LOGO, + LOCALE_MENU_HINT_INFOBAR_LOGO_DIR, + LOCALE_MENU_HINT_INFOBAR_ON_EPG, + LOCALE_MENU_HINT_INFOBAR_RADIOTEXT, + LOCALE_MENU_HINT_INFOBAR_RES, + LOCALE_MENU_HINT_INFOBAR_SAT, + LOCALE_MENU_HINT_INFOBAR_SETUP, + LOCALE_MENU_HINT_INFOBAR_TEXTCOLOR, + LOCALE_MENU_HINT_INFOBAR_TUNER, + LOCALE_MENU_HINT_KEEP_NUMBERS, + LOCALE_MENU_HINT_KEY_ADDRECORD, + LOCALE_MENU_HINT_KEY_ADDREMIND, + LOCALE_MENU_HINT_KEY_AUDIO, + LOCALE_MENU_HINT_KEY_BINDING, + LOCALE_MENU_HINT_KEY_BOUQUETDOWN, + LOCALE_MENU_HINT_KEY_BOUQUETUP, + LOCALE_MENU_HINT_KEY_CANCEL, + LOCALE_MENU_HINT_KEY_CHANNEL_SMS, + LOCALE_MENU_HINT_KEY_CHANNELDOWN, + LOCALE_MENU_HINT_KEY_CHANNELLIST, + LOCALE_MENU_HINT_KEY_CHANNELUP, + LOCALE_MENU_HINT_KEY_HARDWARE, + LOCALE_MENU_HINT_KEY_HISTORY, + LOCALE_MENU_HINT_KEY_LASTCHANNEL, + LOCALE_MENU_HINT_KEY_LEFT_EXIT, + LOCALE_MENU_HINT_KEY_LIST_END, + LOCALE_MENU_HINT_KEY_LIST_START, + LOCALE_MENU_HINT_KEY_LOAD, + LOCALE_MENU_HINT_KEY_MODECHANGE, + LOCALE_MENU_HINT_KEY_MOVIEPLAYER, + LOCALE_MENU_HINT_KEY_MPAUDIO, + LOCALE_MENU_HINT_KEY_MPBOOKMARK, + LOCALE_MENU_HINT_KEY_MPFORWARD, + LOCALE_MENU_HINT_KEY_MPPAUSE, + LOCALE_MENU_HINT_KEY_MPPLAY, + LOCALE_MENU_HINT_KEY_MPPLUGIN, + LOCALE_MENU_HINT_KEY_MPREWIND, + LOCALE_MENU_HINT_KEY_MPSTOP, + LOCALE_MENU_HINT_KEY_MPTIME, + LOCALE_MENU_HINT_KEY_MPTIMESHIFT, + LOCALE_MENU_HINT_KEY_PAGEDOWN, + LOCALE_MENU_HINT_KEY_PAGEUP, + LOCALE_MENU_HINT_KEY_POWEROFF, + LOCALE_MENU_HINT_KEY_QUICKZAP, + LOCALE_MENU_HINT_KEY_REPEATBLOCK, + LOCALE_MENU_HINT_KEY_REPEATBLOCKGENERIC, + LOCALE_MENU_HINT_KEY_RIGHT, + LOCALE_MENU_HINT_KEY_SAVE, + LOCALE_MENU_HINT_KEY_SCREENSHOT, + LOCALE_MENU_HINT_KEY_SORT, + LOCALE_MENU_HINT_KEY_SUBCHANNELDOWN, + LOCALE_MENU_HINT_KEY_SUBCHANNELUP, + LOCALE_MENU_HINT_KEY_TRANSPONDER, + LOCALE_MENU_HINT_KEY_TVRADIOMODE, + LOCALE_MENU_HINT_KEY_UNLOCK, + LOCALE_MENU_HINT_KEYS, + LOCALE_MENU_HINT_LANG_PREF, + LOCALE_MENU_HINT_LANGUAGE, + LOCALE_MENU_HINT_LAST_RADIO, + LOCALE_MENU_HINT_LAST_TV, + LOCALE_MENU_HINT_LAST_USE, + LOCALE_MENU_HINT_LEDS_BLINK, + LOCALE_MENU_HINT_LEDS_DEEPSTANDBY, + LOCALE_MENU_HINT_LEDS_RECORD, + LOCALE_MENU_HINT_LEDS_STANDBY, + LOCALE_MENU_HINT_LEDS_TV, + LOCALE_MENU_HINT_LOAD, + LOCALE_MENU_HINT_MAKE_HDLIST, + LOCALE_MENU_HINT_MAKE_NEWLIST, + LOCALE_MENU_HINT_MAKE_REMOVEDLIST, + LOCALE_MENU_HINT_MANAGE_SETTINGS, + LOCALE_MENU_HINT_MB, + LOCALE_MENU_HINT_MEDIA, + LOCALE_MENU_HINT_MENU_FONTS, + LOCALE_MENU_HINT_MENU_HINTS, + LOCALE_MENU_HINT_MENU_POS, + LOCALE_MENU_HINT_MISC_CEC, + LOCALE_MENU_HINT_MISC_CHANNELLIST, + LOCALE_MENU_HINT_MISC_ENERGY, + LOCALE_MENU_HINT_MISC_EPG, + LOCALE_MENU_HINT_MISC_FILEBROWSER, + LOCALE_MENU_HINT_MISC_GENERAL, + LOCALE_MENU_HINT_MISC_ZAPIT, + LOCALE_MENU_HINT_MOVIE, + LOCALE_MENU_HINT_NET_BROADCAST, + LOCALE_MENU_HINT_NET_DHCP, + LOCALE_MENU_HINT_NET_DJMOUNT, + LOCALE_MENU_HINT_NET_FTPD, + LOCALE_MENU_HINT_NET_GATEWAY, + LOCALE_MENU_HINT_NET_HOSTNAME, + LOCALE_MENU_HINT_NET_IF, + LOCALE_MENU_HINT_NET_IPADDRESS, + LOCALE_MENU_HINT_NET_MOUNT, + LOCALE_MENU_HINT_NET_NAMESERVER, + LOCALE_MENU_HINT_NET_NETMASK, + LOCALE_MENU_HINT_NET_NFS_MOUNT, + LOCALE_MENU_HINT_NET_NFS_UMOUNT, + LOCALE_MENU_HINT_NET_NTP, + LOCALE_MENU_HINT_NET_NTPENABLE, + LOCALE_MENU_HINT_NET_NTPREFRESH, + LOCALE_MENU_HINT_NET_NTPSERVER, + LOCALE_MENU_HINT_NET_PASS, + LOCALE_MENU_HINT_NET_PROXY, + LOCALE_MENU_HINT_NET_PROXYPASS, + LOCALE_MENU_HINT_NET_PROXYSERVER, + LOCALE_MENU_HINT_NET_PROXYUSER, + LOCALE_MENU_HINT_NET_SERVICES, + LOCALE_MENU_HINT_NET_SETUPNOW, + LOCALE_MENU_HINT_NET_SETUPONSTARTUP, + LOCALE_MENU_HINT_NET_SHOW, + LOCALE_MENU_HINT_NET_SSID, + LOCALE_MENU_HINT_NET_TELNET, + LOCALE_MENU_HINT_NET_TEST, + LOCALE_MENU_HINT_NET_USHARE, + LOCALE_MENU_HINT_NETWORK, + LOCALE_MENU_HINT_NEW_ZAP_MODE, + LOCALE_MENU_HINT_OSD, + LOCALE_MENU_HINT_OSD_LANGUAGE, + LOCALE_MENU_HINT_OSD_PRESET, + LOCALE_MENU_HINT_PARENTALLOCK_CHANGEPIN, + LOCALE_MENU_HINT_PARENTALLOCK_LOCKAGE, + LOCALE_MENU_HINT_PARENTALLOCK_PROMPT, + LOCALE_MENU_HINT_PERSONALIZE, + LOCALE_MENU_HINT_PICTUREVIEWER_DEFDIR, + LOCALE_MENU_HINT_PICTUREVIEWER_SCALING, + LOCALE_MENU_HINT_PICTUREVIEWER_SLIDE_TIME, + LOCALE_MENU_HINT_PICVIEW, + LOCALE_MENU_HINT_PLUGINS_HDD_DIR, + LOCALE_MENU_HINT_POWER_LEDS, + LOCALE_MENU_HINT_PREF_LANG, + LOCALE_MENU_HINT_PREF_SUBS, + LOCALE_MENU_HINT_PROGRESSBAR_COLOR, + LOCALE_MENU_HINT_PROTECTION, + LOCALE_MENU_HINT_RADIOMODE, + LOCALE_MENU_HINT_REBOOT, + LOCALE_MENU_HINT_RECORD_APID_AC3, + LOCALE_MENU_HINT_RECORD_APID_ALT, + LOCALE_MENU_HINT_RECORD_APID_STD, + LOCALE_MENU_HINT_RECORD_APIDS, + LOCALE_MENU_HINT_RECORD_APPLY, + LOCALE_MENU_HINT_RECORD_CHANDIR, + LOCALE_MENU_HINT_RECORD_DIR, + LOCALE_MENU_HINT_RECORD_END, + LOCALE_MENU_HINT_RECORD_TDIR, + LOCALE_MENU_HINT_RECORD_TIME, + LOCALE_MENU_HINT_RECORD_TIMEAFTER, + LOCALE_MENU_HINT_RECORD_TIMEBEFORE, + LOCALE_MENU_HINT_RECORD_TIMER, + LOCALE_MENU_HINT_RECORD_TIMESHIFT, + LOCALE_MENU_HINT_RECORD_TIMESHIFT_AUTO, + LOCALE_MENU_HINT_RECORD_TIMESHIFT_DELETE, + LOCALE_MENU_HINT_RECORD_TIMESHIFT_PAUSE, + LOCALE_MENU_HINT_RECORD_TIMESHIFT_TEMP, + LOCALE_MENU_HINT_RECORD_ZAP, + LOCALE_MENU_HINT_RECORD_ZAP_PRE_TIME, + LOCALE_MENU_HINT_RECORDING, + LOCALE_MENU_HINT_RELOAD_CHANNELS, + LOCALE_MENU_HINT_RELOAD_PLUGINS, + LOCALE_MENU_HINT_RESET, + LOCALE_MENU_HINT_RESTORE, + LOCALE_MENU_HINT_ROTOR_SWAP, + LOCALE_MENU_HINT_ROUNDED_CORNERS, + LOCALE_MENU_HINT_SAVE_SETTINGS, + LOCALE_MENU_HINT_SAVEAS, + LOCALE_MENU_HINT_SCAN_AUTO, + LOCALE_MENU_HINT_SCAN_AUTOALL, + LOCALE_MENU_HINT_SCAN_AUTOALL_SELECT, + LOCALE_MENU_HINT_SCAN_BOUQUET, + LOCALE_MENU_HINT_SCAN_CABLE, + LOCALE_MENU_HINT_SCAN_CABLE_SIMPLE, + LOCALE_MENU_HINT_SCAN_COMMITED, + LOCALE_MENU_HINT_SCAN_DISEQC, + LOCALE_MENU_HINT_SCAN_DISEQCREPEAT, + LOCALE_MENU_HINT_SCAN_DISEQCTYPE, + LOCALE_MENU_HINT_SCAN_FAST, + LOCALE_MENU_HINT_SCAN_FASTPROV, + LOCALE_MENU_HINT_SCAN_FASTTYPE, + LOCALE_MENU_HINT_SCAN_FEC, + LOCALE_MENU_HINT_SCAN_FEMODE, + LOCALE_MENU_HINT_SCAN_FESETUP, + LOCALE_MENU_HINT_SCAN_FETIMEOUT, + LOCALE_MENU_HINT_SCAN_FREQ, + LOCALE_MENU_HINT_SCAN_FTA, + LOCALE_MENU_HINT_SCAN_LADIRECTION, + LOCALE_MENU_HINT_SCAN_LATITUDE, + LOCALE_MENU_HINT_SCAN_LNBCONFIG, + LOCALE_MENU_HINT_SCAN_LODIRECTION, + LOCALE_MENU_HINT_SCAN_LOFH, + LOCALE_MENU_HINT_SCAN_LOFL, + LOCALE_MENU_HINT_SCAN_LOFS, + LOCALE_MENU_HINT_SCAN_LOGICAL, + LOCALE_MENU_HINT_SCAN_LOGICAL_HD, + LOCALE_MENU_HINT_SCAN_LONGITUDE, + LOCALE_MENU_HINT_SCAN_MANUAL, + LOCALE_MENU_HINT_SCAN_MOD, + LOCALE_MENU_HINT_SCAN_MOTOR_18V, + LOCALE_MENU_HINT_SCAN_MOTOR_SPEED, + LOCALE_MENU_HINT_SCAN_MOTORPOS, + LOCALE_MENU_HINT_SCAN_NID, + LOCALE_MENU_HINT_SCAN_NIT, + LOCALE_MENU_HINT_SCAN_PIDS, + LOCALE_MENU_HINT_SCAN_POL, + LOCALE_MENU_HINT_SCAN_RATE, + LOCALE_MENU_HINT_SCAN_RESET_NUMBERS, + LOCALE_MENU_HINT_SCAN_SATADD, + LOCALE_MENU_HINT_SCAN_SATELLITE, + LOCALE_MENU_HINT_SCAN_SATENABLE, + LOCALE_MENU_HINT_SCAN_SATFIND, + LOCALE_MENU_HINT_SCAN_SATFIND_START, + LOCALE_MENU_HINT_SCAN_SATSCAN, + LOCALE_MENU_HINT_SCAN_SATSELECT, + LOCALE_MENU_HINT_SCAN_SATSETUP, + LOCALE_MENU_HINT_SCAN_SAVESETTINGS, + LOCALE_MENU_HINT_SCAN_SCANTYPE, + LOCALE_MENU_HINT_SCAN_SETUP_FE, + LOCALE_MENU_HINT_SCAN_START, + LOCALE_MENU_HINT_SCAN_TEST, + LOCALE_MENU_HINT_SCAN_TPSELECT, + LOCALE_MENU_HINT_SCAN_UNCOMMITED, + LOCALE_MENU_HINT_SCAN_USALS_REPEAT, + LOCALE_MENU_HINT_SCAN_USALSALL, + LOCALE_MENU_HINT_SCAN_USEUSALS, + LOCALE_MENU_HINT_SCRAMBLED_MESSAGE, + LOCALE_MENU_HINT_SCREEN_SETUP, + LOCALE_MENU_HINT_SCREENSHOT_COUNT, + LOCALE_MENU_HINT_SCREENSHOT_COVER, + LOCALE_MENU_HINT_SCREENSHOT_DIR, + LOCALE_MENU_HINT_SCREENSHOT_FORMAT, + LOCALE_MENU_HINT_SCREENSHOT_RES, + LOCALE_MENU_HINT_SCREENSHOT_SCALE, + LOCALE_MENU_HINT_SCREENSHOT_SETUP, + LOCALE_MENU_HINT_SCREENSHOT_VIDEO, + LOCALE_MENU_HINT_SCRIPTS, + LOCALE_MENU_HINT_SELECTED_BACK, + LOCALE_MENU_HINT_SELECTED_TEXT, + LOCALE_MENU_HINT_SERVICE, + LOCALE_MENU_HINT_SERVICE_SCAN, + LOCALE_MENU_HINT_SETTINGS, + LOCALE_MENU_HINT_SHOW_MUTE_ICON, + LOCALE_MENU_HINT_SHUTDOWN, + LOCALE_MENU_HINT_SHUTDOWN_COUNT, + LOCALE_MENU_HINT_SHUTDOWN_RCDELAY, + LOCALE_MENU_HINT_SHUTDOWN_REAL, + LOCALE_MENU_HINT_SLEEPTIMER, + LOCALE_MENU_HINT_SOFT_RESTART, + LOCALE_MENU_HINT_SOFTUPDATE_CHECK, + LOCALE_MENU_HINT_SOFTUPDATE_EXPERT, + LOCALE_MENU_HINT_SOFTUPDATE_EXPERT_READ, + LOCALE_MENU_HINT_SOFTUPDATE_EXPERT_WRITE, + LOCALE_MENU_HINT_SOFTUPDATE_SETTINGS, + LOCALE_MENU_HINT_START_TOSTANDBY, + LOCALE_MENU_HINT_STREAMINFO, + LOCALE_MENU_HINT_SUBCHANNEL_POS, + LOCALE_MENU_HINT_SW_UPDATE, + LOCALE_MENU_HINT_THEME, + LOCALE_MENU_HINT_TIMEOUTS, + LOCALE_MENU_HINT_TIMERS, + LOCALE_MENU_HINT_TIMEZONE, + LOCALE_MENU_HINT_TVMODE, + LOCALE_MENU_HINT_TVRADIO_SWITCH, + LOCALE_MENU_HINT_VFD, + LOCALE_MENU_HINT_VFD_BRIGHTNESS, + LOCALE_MENU_HINT_VFD_BRIGHTNESS_SETUP, + LOCALE_MENU_HINT_VFD_BRIGHTNESSDEEPSTANDBY, + LOCALE_MENU_HINT_VFD_BRIGHTNESSDIM, + LOCALE_MENU_HINT_VFD_BRIGHTNESSSTANDBY, + LOCALE_MENU_HINT_VFD_DEFAULTS, + LOCALE_MENU_HINT_VFD_DIMTIME, + LOCALE_MENU_HINT_VFD_INFOLINE, + LOCALE_MENU_HINT_VFD_STATUSLINE, + LOCALE_MENU_HINT_VIDEO, + LOCALE_MENU_HINT_VIDEO_43MODE, + LOCALE_MENU_HINT_VIDEO_ANALOG_MODE, + LOCALE_MENU_HINT_VIDEO_CINCH_MODE, + LOCALE_MENU_HINT_VIDEO_DBDR, + LOCALE_MENU_HINT_VIDEO_FORMAT, + LOCALE_MENU_HINT_VIDEO_MODE, + LOCALE_MENU_HINT_VIDEO_MODES, + LOCALE_MENU_HINT_VIDEO_SCART_MODE, + LOCALE_MENU_HINT_VOLUME_DIGITS, + LOCALE_MENU_HINT_VOLUME_POS, + LOCALE_MENU_HINT_ZAP_CYCLE, LOCALE_MENU_NEXT, LOCALE_MESSAGEBOX_BACK, LOCALE_MESSAGEBOX_CANCEL, @@ -811,6 +1188,7 @@ typedef enum LOCALE_MOTORCONTROL_TIMED_MODE, LOCALE_MOTORCONTROL_USER_MENU, LOCALE_MOTORCONTROL_WEST_LIMIT, + LOCALE_MOVIEBROWSER_BOOK_ADD, LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, LOCALE_MOVIEBROWSER_BOOK_HEAD, LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, @@ -1156,6 +1534,7 @@ typedef enum LOCALE_RESET_SETTINGS, LOCALE_SATSETUP_AUTO_SCAN, LOCALE_SATSETUP_AUTO_SCAN_ALL, + LOCALE_SATSETUP_CABLE, LOCALE_SATSETUP_CABLE_NID, LOCALE_SATSETUP_COMM_INPUT, LOCALE_SATSETUP_DISEQC, @@ -1187,6 +1566,7 @@ typedef enum LOCALE_SATSETUP_LOFH, LOCALE_SATSETUP_LOFL, LOCALE_SATSETUP_LOFS, + LOCALE_SATSETUP_LOGICAL_HD, LOCALE_SATSETUP_LOGICAL_NUMBERS, LOCALE_SATSETUP_MANUAL_SCAN, LOCALE_SATSETUP_MINIDISEQC, @@ -1266,6 +1646,7 @@ typedef enum LOCALE_SETTINGS_BACKUP, LOCALE_SETTINGS_BACKUP_FAILED, LOCALE_SETTINGS_HELP, + LOCALE_SETTINGS_MENU_HINTS, LOCALE_SETTINGS_MENU_POS, LOCALE_SETTINGS_MISSINGOPTIONSCONFFILE, LOCALE_SETTINGS_NOCONFFILE, @@ -1298,6 +1679,8 @@ typedef enum LOCALE_STREAMINFO_SIGNAL, LOCALE_STREAMING_BUSY, LOCALE_STREAMING_DIR_NOT_WRITABLE, + LOCALE_STREAMING_OVERFLOW, + LOCALE_STREAMING_SLOW, LOCALE_STREAMING_WRITE_ERROR, LOCALE_STRINGINPUT_CAPS, LOCALE_STRINGINPUT_CLEAR, @@ -1451,6 +1834,8 @@ typedef enum LOCALE_VIDEOMENU_VIDEOFORMAT_169, LOCALE_VIDEOMENU_VIDEOFORMAT_43, LOCALE_VIDEOMENU_VIDEOMODE, + LOCALE_WIZARD_INITIAL_SETTINGS, + LOCALE_WIZARD_INSTALL_SETTINGS, LOCALE_WIZARD_WELCOME_HEAD, LOCALE_WIZARD_WELCOME_TEXT, LOCALE_WORD_FROM, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index a0d883ef9..808dfc6e0 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -152,6 +152,7 @@ const char * locale_real_names[] = "audiomenu.pref_subs_head", "audiomenu.spdif_dd", "audiomenu.stereo", + "audiomenu.volume_adjust", "audiomenu.volume_step", "audioplayer.add", "audioplayer.add_ic", @@ -318,6 +319,7 @@ const char * locale_real_names[] = "date.Thu", "date.Tue", "date.Wed", + "epg.saving", "epgextended.actors", "epgextended.director", "epgextended.guests", @@ -326,6 +328,7 @@ const char * locale_real_names[] = "epgextended.year_of_production", "epglist.noevents", "epgviewer.More_Screenings", + "epgviewer.More_Screenings_short", "epgviewer.nodetailed", "epgviewer.notfound", "eventfinder.head", @@ -418,6 +421,7 @@ const char * locale_real_names[] = "extra.tp_rate", "extra.update_dir", "extra.use_gotoxx", + "extra.volume_digits", "extra.volume_pos", "extra.west", "extra.zap_cycle", @@ -461,7 +465,8 @@ const char * locale_real_names[] = "flashupdate.actionreadflash", "flashupdate.cantopenfile", "flashupdate.cantopenmtd", - "flashupdate.checkupdate", + "flashupdate.checkupdate_internet", + "flashupdate.checkupdate_local", "flashupdate.currentversion_sep", "flashupdate.currentversiondate", "flashupdate.currentversiontime", @@ -548,6 +553,7 @@ const char * locale_real_names[] = "fontsize.infobar_number", "fontsize.infobar_small", "fontsize.menu", + "fontsize.menu_hint", "fontsize.menu_info", "fontsize.menu_title", "hdd_10min", @@ -714,6 +720,377 @@ const char * locale_real_names[] = "mainsettings.video", "menu.back", "menu.cancel", + "menu.hint_a_pic", + "menu.hint_aplay", + "menu.hint_audio", + "menu.hint_audio_analog_mode", + "menu.hint_audio_avsync", + "menu.hint_audio_dd", + "menu.hint_audio_hdmi_dd", + "menu.hint_audio_spdif_dd", + "menu.hint_audio_srs", + "menu.hint_audio_srs_algo", + "menu.hint_audio_srs_nmgr", + "menu.hint_audio_srs_volume", + "menu.hint_audio_volstep", + "menu.hint_audioplayer_defdir", + "menu.hint_audioplayer_follow", + "menu.hint_audioplayer_highprio", + "menu.hint_audioplayer_order", + "menu.hint_audioplayer_playlist", + "menu.hint_audioplayer_repeat", + "menu.hint_audioplayer_sc_metadata", + "menu.hint_audioplayer_screensaver", + "menu.hint_audioplayer_title", + "menu.hint_auto_lang", + "menu.hint_auto_subs", + "menu.hint_back", + "menu.hint_backup", + "menu.hint_bedit", + "menu.hint_bigwindows", + "menu.hint_cache_txt", + "menu.hint_cec_mode", + "menu.hint_cec_standby", + "menu.hint_cec_view_on", + "menu.hint_channellist_colored", + "menu.hint_channellist_epg_align", + "menu.hint_channellist_extended", + "menu.hint_channellist_fonts", + "menu.hint_channellist_foot", + "menu.hint_channellist_setup", + "menu.hint_ci", + "menu.hint_colors", + "menu.hint_content_back", + "menu.hint_content_textcolor", + "menu.hint_contrast_fonts", + "menu.hint_dboxinfo", + "menu.hint_delete_channels", + "menu.hint_epg_cache", + "menu.hint_epg_dir", + "menu.hint_epg_extendedcache", + "menu.hint_epg_fonts", + "menu.hint_epg_max_events", + "menu.hint_epg_old_events", + "menu.hint_epg_save", + "menu.hint_event_textcolor", + "menu.hint_eventlist_fonts", + "menu.hint_extended", + "menu.hint_factory", + "menu.hint_fade", + "menu.hint_fan_speed", + "menu.hint_filebrowser_denydirectoryleave", + "menu.hint_filebrowser_showrights", + "menu.hint_fileplay", + "menu.hint_filesystem_is_utf8", + "menu.hint_font_gui", + "menu.hint_font_scaling", + "menu.hint_font_ttx", + "menu.hint_fonts", + "menu.hint_gamelist_fonts", + "menu.hint_games", + "menu.hint_hdd", + "menu.hint_hdd_apply", + "menu.hint_hdd_check", + "menu.hint_hdd_format", + "menu.hint_hdd_noise", + "menu.hint_hdd_sleep", + "menu.hint_hdd_tools", + "menu.hint_head_back", + "menu.hint_head_textcolor", + "menu.hint_imageinfo", + "menu.hint_inact_timer", + "menu.hint_inactive_back", + "menu.hint_inactive_textcolor", + "menu.hint_inet_radio", + "menu.hint_info", + "menu.hint_infobar_back", + "menu.hint_infobar_casys", + "menu.hint_infobar_colored_event", + "menu.hint_infobar_dd", + "menu.hint_infobar_filesys", + "menu.hint_infobar_fonts", + "menu.hint_infobar_logo", + "menu.hint_infobar_logo_dir", + "menu.hint_infobar_on_epg", + "menu.hint_infobar_radiotext", + "menu.hint_infobar_res", + "menu.hint_infobar_sat", + "menu.hint_infobar_setup", + "menu.hint_infobar_textcolor", + "menu.hint_infobar_tuner", + "menu.hint_keep_numbers", + "menu.hint_key_addrecord", + "menu.hint_key_addremind", + "menu.hint_key_audio", + "menu.hint_key_binding", + "menu.hint_key_bouquetdown", + "menu.hint_key_bouquetup", + "menu.hint_key_cancel", + "menu.hint_key_channel_sms", + "menu.hint_key_channeldown", + "menu.hint_key_channellist", + "menu.hint_key_channelup", + "menu.hint_key_hardware", + "menu.hint_key_history", + "menu.hint_key_lastchannel", + "menu.hint_key_left_exit", + "menu.hint_key_list_end", + "menu.hint_key_list_start", + "menu.hint_key_load", + "menu.hint_key_modechange", + "menu.hint_key_movieplayer", + "menu.hint_key_mpaudio", + "menu.hint_key_mpbookmark", + "menu.hint_key_mpforward", + "menu.hint_key_mppause", + "menu.hint_key_mpplay", + "menu.hint_key_mpplugin", + "menu.hint_key_mprewind", + "menu.hint_key_mpstop", + "menu.hint_key_mptime", + "menu.hint_key_mptimeshift", + "menu.hint_key_pagedown", + "menu.hint_key_pageup", + "menu.hint_key_poweroff", + "menu.hint_key_quickzap", + "menu.hint_key_repeatblock", + "menu.hint_key_repeatblockgeneric", + "menu.hint_key_right", + "menu.hint_key_save", + "menu.hint_key_screenshot", + "menu.hint_key_sort", + "menu.hint_key_subchanneldown", + "menu.hint_key_subchannelup", + "menu.hint_key_transponder", + "menu.hint_key_tvradiomode", + "menu.hint_key_unlock", + "menu.hint_keys", + "menu.hint_lang_pref", + "menu.hint_language", + "menu.hint_last_radio", + "menu.hint_last_tv", + "menu.hint_last_use", + "menu.hint_leds_blink", + "menu.hint_leds_deepstandby", + "menu.hint_leds_record", + "menu.hint_leds_standby", + "menu.hint_leds_tv", + "menu.hint_load", + "menu.hint_make_hdlist", + "menu.hint_make_newlist", + "menu.hint_make_removedlist", + "menu.hint_manage_settings", + "menu.hint_mb", + "menu.hint_media", + "menu.hint_menu_fonts", + "menu.hint_menu_hints", + "menu.hint_menu_pos", + "menu.hint_misc_cec", + "menu.hint_misc_channellist", + "menu.hint_misc_energy", + "menu.hint_misc_epg", + "menu.hint_misc_filebrowser", + "menu.hint_misc_general", + "menu.hint_misc_zapit", + "menu.hint_movie", + "menu.hint_net_broadcast", + "menu.hint_net_dhcp", + "menu.hint_net_djmount", + "menu.hint_net_ftpd", + "menu.hint_net_gateway", + "menu.hint_net_hostname", + "menu.hint_net_if", + "menu.hint_net_ipaddress", + "menu.hint_net_mount", + "menu.hint_net_nameserver", + "menu.hint_net_netmask", + "menu.hint_net_nfs_mount", + "menu.hint_net_nfs_umount", + "menu.hint_net_ntp", + "menu.hint_net_ntpenable", + "menu.hint_net_ntprefresh", + "menu.hint_net_ntpserver", + "menu.hint_net_pass", + "menu.hint_net_proxy", + "menu.hint_net_proxypass", + "menu.hint_net_proxyserver", + "menu.hint_net_proxyuser", + "menu.hint_net_services", + "menu.hint_net_setupnow", + "menu.hint_net_setuponstartup", + "menu.hint_net_show", + "menu.hint_net_ssid", + "menu.hint_net_telnet", + "menu.hint_net_test", + "menu.hint_net_ushare", + "menu.hint_network", + "menu.hint_new_zap_mode", + "menu.hint_osd", + "menu.hint_osd_language", + "menu.hint_osd_preset", + "menu.hint_parentallock_changepin", + "menu.hint_parentallock_lockage", + "menu.hint_parentallock_prompt", + "menu.hint_personalize", + "menu.hint_pictureviewer_defdir", + "menu.hint_pictureviewer_scaling", + "menu.hint_pictureviewer_slide_time", + "menu.hint_picview", + "menu.hint_plugins_hdd_dir", + "menu.hint_power_leds", + "menu.hint_pref_lang", + "menu.hint_pref_subs", + "menu.hint_progressbar_color", + "menu.hint_protection", + "menu.hint_radiomode", + "menu.hint_reboot", + "menu.hint_record_apid_ac3", + "menu.hint_record_apid_alt", + "menu.hint_record_apid_std", + "menu.hint_record_apids", + "menu.hint_record_apply", + "menu.hint_record_chandir", + "menu.hint_record_dir", + "menu.hint_record_end", + "menu.hint_record_tdir", + "menu.hint_record_time", + "menu.hint_record_timeafter", + "menu.hint_record_timebefore", + "menu.hint_record_timer", + "menu.hint_record_timeshift", + "menu.hint_record_timeshift_auto", + "menu.hint_record_timeshift_delete", + "menu.hint_record_timeshift_pause", + "menu.hint_record_timeshift_temp", + "menu.hint_record_zap", + "menu.hint_record_zap_pre_time", + "menu.hint_recording", + "menu.hint_reload_channels", + "menu.hint_reload_plugins", + "menu.hint_reset", + "menu.hint_restore", + "menu.hint_rotor_swap", + "menu.hint_rounded_corners", + "menu.hint_save_settings", + "menu.hint_saveas", + "menu.hint_scan_auto", + "menu.hint_scan_autoall", + "menu.hint_scan_autoall_select", + "menu.hint_scan_bouquet", + "menu.hint_scan_cable", + "menu.hint_scan_cable_simple", + "menu.hint_scan_commited", + "menu.hint_scan_diseqc", + "menu.hint_scan_diseqcrepeat", + "menu.hint_scan_diseqctype", + "menu.hint_scan_fast", + "menu.hint_scan_fastprov", + "menu.hint_scan_fasttype", + "menu.hint_scan_fec", + "menu.hint_scan_femode", + "menu.hint_scan_fesetup", + "menu.hint_scan_fetimeout", + "menu.hint_scan_freq", + "menu.hint_scan_fta", + "menu.hint_scan_ladirection", + "menu.hint_scan_latitude", + "menu.hint_scan_lnbconfig", + "menu.hint_scan_lodirection", + "menu.hint_scan_lofh", + "menu.hint_scan_lofl", + "menu.hint_scan_lofs", + "menu.hint_scan_logical", + "menu.hint_scan_logical_hd", + "menu.hint_scan_longitude", + "menu.hint_scan_manual", + "menu.hint_scan_mod", + "menu.hint_scan_motor_18v", + "menu.hint_scan_motor_speed", + "menu.hint_scan_motorpos", + "menu.hint_scan_nid", + "menu.hint_scan_nit", + "menu.hint_scan_pids", + "menu.hint_scan_pol", + "menu.hint_scan_rate", + "menu.hint_scan_reset_numbers", + "menu.hint_scan_satadd", + "menu.hint_scan_satellite", + "menu.hint_scan_satenable", + "menu.hint_scan_satfind", + "menu.hint_scan_satfind_start", + "menu.hint_scan_satscan", + "menu.hint_scan_satselect", + "menu.hint_scan_satsetup", + "menu.hint_scan_savesettings", + "menu.hint_scan_scantype", + "menu.hint_scan_setup_fe", + "menu.hint_scan_start", + "menu.hint_scan_test", + "menu.hint_scan_tpselect", + "menu.hint_scan_uncommited", + "menu.hint_scan_usals_repeat", + "menu.hint_scan_usalsall", + "menu.hint_scan_useusals", + "menu.hint_scrambled_message", + "menu.hint_screen_setup", + "menu.hint_screenshot_count", + "menu.hint_screenshot_cover", + "menu.hint_screenshot_dir", + "menu.hint_screenshot_format", + "menu.hint_screenshot_res", + "menu.hint_screenshot_scale", + "menu.hint_screenshot_setup", + "menu.hint_screenshot_video", + "menu.hint_scripts", + "menu.hint_selected_back", + "menu.hint_selected_text", + "menu.hint_service", + "menu.hint_service_scan", + "menu.hint_settings", + "menu.hint_show_mute_icon", + "menu.hint_shutdown", + "menu.hint_shutdown_count", + "menu.hint_shutdown_rcdelay", + "menu.hint_shutdown_real", + "menu.hint_sleeptimer", + "menu.hint_soft_restart", + "menu.hint_softupdate_check", + "menu.hint_softupdate_expert", + "menu.hint_softupdate_expert_read", + "menu.hint_softupdate_expert_write", + "menu.hint_softupdate_settings", + "menu.hint_start_tostandby", + "menu.hint_streaminfo", + "menu.hint_subchannel_pos", + "menu.hint_sw_update", + "menu.hint_theme", + "menu.hint_timeouts", + "menu.hint_timers", + "menu.hint_timezone", + "menu.hint_tvmode", + "menu.hint_tvradio_switch", + "menu.hint_vfd", + "menu.hint_vfd_brightness", + "menu.hint_vfd_brightness_setup", + "menu.hint_vfd_brightnessdeepstandby", + "menu.hint_vfd_brightnessdim", + "menu.hint_vfd_brightnessstandby", + "menu.hint_vfd_defaults", + "menu.hint_vfd_dimtime", + "menu.hint_vfd_infoline", + "menu.hint_vfd_statusline", + "menu.hint_video", + "menu.hint_video_43mode", + "menu.hint_video_analog_mode", + "menu.hint_video_cinch_mode", + "menu.hint_video_dbdr", + "menu.hint_video_format", + "menu.hint_video_mode", + "menu.hint_video_modes", + "menu.hint_video_scart_mode", + "menu.hint_volume_digits", + "menu.hint_volume_pos", + "menu.hint_zap_cycle", "menu.next", "messagebox.back", "messagebox.cancel", @@ -811,6 +1188,7 @@ const char * locale_real_names[] = "motorcontrol.timed_mode", "motorcontrol.user_menu", "motorcontrol.west_limit", + "moviebrowser.book_add", "moviebrowser.book_clear_all", "moviebrowser.book_head", "moviebrowser.book_lastmoviestop", @@ -1156,6 +1534,7 @@ const char * locale_real_names[] = "reset_settings", "satsetup.auto_scan", "satsetup.auto_scan_all", + "satsetup.cable", "satsetup.cable_nid", "satsetup.comm_input", "satsetup.diseqc", @@ -1187,6 +1566,7 @@ const char * locale_real_names[] = "satsetup.lofh", "satsetup.lofl", "satsetup.lofs", + "satsetup.logical_hd", "satsetup.logical_numbers", "satsetup.manual_scan", "satsetup.minidiseqc", @@ -1266,6 +1646,7 @@ const char * locale_real_names[] = "settings.backup", "settings.backup_failed", "settings.help", + "settings.menu_hints", "settings.menu_pos", "settings.missingoptionsconffile", "settings.noconffile", @@ -1298,6 +1679,8 @@ const char * locale_real_names[] = "streaminfo.signal", "streaming.busy", "streaming.dir_not_writable", + "streaming.overflow", + "streaming.slow", "streaming.write_error", "stringinput.caps", "stringinput.clear", @@ -1451,6 +1834,8 @@ const char * locale_real_names[] = "videomenu.videoformat_169", "videomenu.videoformat_43", "videomenu.videomode", + "wizard.initial_settings", + "wizard.install_settings", "wizard.welcome_head", "wizard.welcome_text", "word.from", @@ -1464,6 +1849,6 @@ const char * locale_real_names[] = "zapitsetup.last_radio", "zapitsetup.last_tv", "zapitsetup.last_use", - "zaptotimer.announce", + "zaptotimer.announce" }; #endif diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 6d8cedb29..f1ddda657 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -33,7 +33,6 @@ #include "configure_network.h" #include #include -#include #include #include #include @@ -44,12 +43,9 @@ #include #include #include -#include #include #include #include -#include -#include #if HAVE_COOL_HARDWARE #include @@ -76,8 +72,8 @@ #include #include #include -#include "libdvbsub/dvbsub.h" -#include "libtuxtxt/teletext.h" +#include +#include #include #include @@ -92,43 +88,24 @@ extern cDemux *pcrDemux; extern "C" int pinghost( const char *hostname ); -// gui/moviebrowser.cpp -COnOffNotifier::COnOffNotifier( CMenuItem* a1,CMenuItem* a2,CMenuItem* a3,CMenuItem* a4,CMenuItem* a5) +COnOffNotifier::COnOffNotifier(int OffValue) { - number = 0; - if(a1 != NULL){ toDisable[0] =a1;number++;}; - if(a2 != NULL){ toDisable[1] =a2;number++;}; - if(a3 != NULL){ toDisable[2] =a3;number++;}; - if(a4 != NULL){ toDisable[3] =a4;number++;}; - if(a5 != NULL){ toDisable[4] =a5;number++;}; + offValue = OffValue; } bool COnOffNotifier::changeNotify(const neutrino_locale_t, void *Data) { - if(*(int*)(Data) == 0) - { - for (int i=0; isetActive(false); - } - else - { - for (int i=0; isetActive(true); - } - return false; + bool active = (*(int*)(Data) != offValue); + + for (std::vector::iterator it = toDisable.begin(); it != toDisable.end(); it++) + (*it)->setActive(active); + + return false; } -//used in gui/miscsettings_menu.cpp -CMiscNotifier::CMiscNotifier( CMenuItem* i1, CMenuItem* i2) +void COnOffNotifier::addItem(CMenuItem* menuItem) { - toDisable[0]=i1; - toDisable[1]=i2; -} -bool CMiscNotifier::changeNotify(const neutrino_locale_t, void *) -{ - toDisable[0]->setActive(!g_settings.shutdown_real); - toDisable[1]->setActive(!g_settings.shutdown_real); - return false; + toDisable.push_back(menuItem); } bool CSectionsdConfigNotifier::changeNotify(const neutrino_locale_t, void *) @@ -577,45 +554,3 @@ bool CAutoModeNotifier::changeNotify(const neutrino_locale_t /*OptionName*/, voi videoDecoder->SetAutoModes(modes); return false; } - -int safe_mkdir(char * path) -{ - struct statfs s; - int ret = 0; - if(!strncmp(path, "/hdd", 4)) { - ret = statfs("/hdd", &s); - if((ret != 0) || (s.f_type == 0x72b6)) - ret = -1; - else - mkdir(path, 0755); - } else - mkdir(path, 0755); - return ret; -} - -int check_dir(const char * newdir) -{ - - struct statfs s; - if (::statfs(newdir, &s) == 0) { - switch (s.f_type) /* f_type is long */ - { - case 0xEF53L: /*EXT2 & EXT3*/ - case 0x6969L: /*NFS*/ - case 0xFF534D42L: /*CIFS*/ - case 0x517BL: /*SMB*/ - case 0x52654973L: /*REISERFS*/ - case 0x65735546L: /*fuse for ntfs*/ - case 0x58465342L: /*xfs*/ - case 0x4d44L: /*msdos*/ - case 0x0187: /* AUTOFS_SUPER_MAGIC */ - case 0x858458f6: /*ramfs*/ - return 0;//ok - default: - fprintf(stderr, "%s(%s): Unknown File system type: 0x%lx\n", - __func__, newdir, s.f_type); - break; - } - } - return 1; // error -} diff --git a/src/system/setting_helpers.h b/src/system/setting_helpers.h index 149a5e082..22d0b27c9 100644 --- a/src/system/setting_helpers.h +++ b/src/system/setting_helpers.h @@ -55,22 +55,16 @@ class CGenericMenuActivate }; class COnOffNotifier : public CChangeObserver -{ - private: - int number; - CMenuItem* toDisable[5]; - public: - COnOffNotifier (CMenuItem* a1,CMenuItem* a2 = NULL,CMenuItem* a3 = NULL,CMenuItem* a4 = NULL,CMenuItem* a5 = NULL); - bool changeNotify(const neutrino_locale_t, void *Data); -}; - -class CMiscNotifier : public CChangeObserver { private: - CMenuItem* toDisable[2]; + int offValue; + std::vector toDisable; + public: - CMiscNotifier( CMenuItem*, CMenuItem* ); - bool changeNotify(const neutrino_locale_t, void *); + COnOffNotifier(int OffValue = 0); + bool changeNotify(const neutrino_locale_t, void *Data); + + void addItem(CMenuItem* menuItem); }; class CSectionsdConfigNotifier : public CChangeObserver @@ -144,9 +138,6 @@ class COnekeyPluginChangeExec : public CMenuTarget int exec(CMenuTarget* parent, const std::string & actionKey); }; -int safe_mkdir(char * path); -int check_dir(const char * newdir); - class CTZChangeNotifier : public CChangeObserver { public: diff --git a/src/system/settings.cpp b/src/system/settings.cpp index aa455a387..15c32b6cb 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -132,6 +132,7 @@ bool CScanSettings::loadSettings(const char * const fileName, const delivery_sys scan_bat = configfile.getInt32("scan_bat", 0); scan_reset_numbers = configfile.getInt32("scan_reset_numbers", 0); scan_logical_numbers = configfile.getInt32("scan_logical_numbers", 0); + scan_logical_hd = configfile.getInt32("scan_logical_hd", 1); TP_fec = configfile.getInt32("TP_fec", 1); TP_pol = configfile.getInt32("TP_pol", 0); TP_mod = configfile.getInt32("TP_mod", 3); @@ -166,6 +167,7 @@ bool CScanSettings::saveSettings(const char * const fileName) configfile.setInt32("scan_bat", scan_bat); configfile.setInt32("scan_reset_numbers", scan_reset_numbers); configfile.setInt32("scan_logical_numbers", scan_logical_numbers); + configfile.setInt32("scan_logical_hd", scan_logical_hd); configfile.setInt32("TP_fec", TP_fec); configfile.setInt32("TP_pol", TP_pol); configfile.setInt32("TP_mod", TP_mod); diff --git a/src/system/settings.h b/src/system/settings.h index 8888c16c1..fee77a8eb 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -90,6 +90,7 @@ struct SNeutrinoSettings int casystem_display; int scrambled_message; int volume_pos; + int volume_digits; int show_mute_icon; int menu_pos; int show_menu_hints; @@ -476,7 +477,7 @@ struct SNeutrinoSettings // Font sizes -#define FONT_TYPE_COUNT 22 +#define FONT_TYPE_COUNT 23 enum FONT_TYPES { FONT_TYPE_MENU = 0, FONT_TYPE_MENU_TITLE = 1, @@ -499,7 +500,8 @@ struct SNeutrinoSettings FONT_TYPE_INFOBAR_CHANNAME = 18, FONT_TYPE_INFOBAR_INFO = 19, FONT_TYPE_INFOBAR_SMALL = 20, - FONT_TYPE_FILEBROWSER_ITEM = 21 + FONT_TYPE_FILEBROWSER_ITEM = 21, + FONT_TYPE_MENU_HINT = 22 }; // lcdd @@ -696,6 +698,7 @@ public: int scan_fta_flag; int scan_reset_numbers; int scan_logical_numbers; + int scan_logical_hd; int TP_fec; int TP_pol; int TP_mod; diff --git a/src/timerd/Makefile.am b/src/timerd/Makefile.am index b446dd7d4..76c1954c4 100644 --- a/src/timerd/Makefile.am +++ b/src/timerd/Makefile.am @@ -3,6 +3,7 @@ AM_CPPFLAGS = -fno-rtti -fno-exceptions INCLUDES = \ -I$(top_builddir) \ -I$(top_srcdir) \ + -I$(top_srcdir)/src \ -I$(top_srcdir)/src/zapit/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/libconfigfile \ diff --git a/src/timerd/timerd.cpp b/src/timerd/timerd.cpp index 4fa540ce2..db1e2c5da 100644 --- a/src/timerd/timerd.cpp +++ b/src/timerd/timerd.cpp @@ -461,7 +461,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) return true; } -int timerd_main_thread(void */*data*/) +int timerd_main_thread(void *data) { pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0); @@ -474,6 +474,7 @@ int timerd_main_thread(void */*data*/) // Start timer thread CTimerManager::getInstance(); + CTimerManager::getInstance()->wakeup =(bool)data; timerd_server.run(timerd_parse_command, CTimerdMsg::ACTVERSION); printf("timerd shutdown complete\n"); diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 304788a1c..ef84e1526 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -33,9 +33,7 @@ #include #include #include -#if HAVE_COOL_HARDWARE -#include -#endif +#include #include #include @@ -43,22 +41,12 @@ #include "debug.h" #include "timermanager.h" -#ifndef FP_IOCTL_CLEAR_WAKEUP_TIMER -#define FP_IOCTL_CLEAR_WAKEUP_TIMER 10 -#endif - -#define FP_IOCTL_SET_RTC 0x101 -#define FP_IOCTL_GET_RTC 0x102 extern bool timeset; time_t timer_minutes; bool timer_is_rec; -bool timer_wakeup; static pthread_mutex_t tm_eventsMutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; -void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); -bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); - //------------------------------------------------------------ CTimerManager::CTimerManager() { @@ -72,37 +60,6 @@ void CTimerManager::Init(void) m_saveEvents = false; m_isTimeSet = false; wakeup = 0; - timer_wakeup = false; -#if HAVE_COOL_HARDWARE - int fd = open("/dev/display", O_RDONLY); - - if (fd < 0) { - perror("/dev/display"); - } else { - wakeup_data_t wk; - memset(&wk, 0, sizeof(wk)); - int ret = ioctl(fd, IOC_VFD_GET_WAKEUP, &wk); - if(ret >= 0) - wakeup = ((wk.source == WAKEUP_SOURCE_TIMER) /* || (wk.source == WAKEUP_SOURCE_PWLOST)*/); - close(fd); - } -#endif - /* not platform specific - this is created by the init process */ - if (access("/tmp/.timer_wakeup", F_OK) == 0) { - wakeup = true; - unlink("/tmp/.timer_wakeup"); - } - - printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no"); - if(wakeup){ - close(creat("/tmp/.wakeup", 0644)); - timer_wakeup = true; - }else{ - const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off"; - printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script); - if (system(neutrino_leave_deepstandby_script) != 0) - perror( neutrino_leave_deepstandby_script ); - } loadRecordingSafety(); //thread starten @@ -1154,7 +1111,7 @@ CTimerEvent_Record::CTimerEvent_Record(time_t announce_Time, time_t alarm_Time, recordingDir = recDir; epgTitle=""; CShortEPGData epgdata; - if (sectionsd_getEPGidShort(epgID, &epgdata)) + if (CEitManager::getInstance()->getEPGidShort(epgID, &epgdata)) epgTitle=epgdata.title; } @@ -1263,7 +1220,7 @@ void CTimerEvent_Record::getEpgId() { //TODO: Record/Zapto getEpgId code almost identical ! CChannelEventList evtlist; - sectionsd_getEventsServiceKey(eventInfo.channel_id &0xFFFFFFFFFFFFULL, evtlist); + CEitManager::getInstance()->getEventsServiceKey(eventInfo.channel_id, evtlist); // we check for a time in the middle of the recording time_t check_time=alarmTime/2 + stopTime/2; for ( CChannelEventList::iterator e= evtlist.begin(); e != evtlist.end(); ++e ) @@ -1278,7 +1235,7 @@ void CTimerEvent_Record::getEpgId() if(eventInfo.epgID != 0) { CShortEPGData epgdata; - if (sectionsd_getEPGidShort(eventInfo.epgID, &epgdata)) + if (CEitManager::getInstance()->getEPGidShort(eventInfo.epgID, &epgdata)) epgTitle=epgdata.title; } } @@ -1311,7 +1268,7 @@ void CTimerEvent_Zapto::getEpgId() { //TODO: Record/Zapto getEpgId code almost identical ! CChannelEventList evtlist; - sectionsd_getEventsServiceKey(eventInfo.channel_id &0xFFFFFFFFFFFFULL, evtlist); + CEitManager::getInstance()->getEventsServiceKey(eventInfo.channel_id, evtlist); // we check for a time 5 min after zap time_t check_time=alarmTime + 300; for ( CChannelEventList::iterator e= evtlist.begin(); e != evtlist.end(); ++e ) @@ -1326,7 +1283,7 @@ void CTimerEvent_Zapto::getEpgId() if(eventInfo.epgID != 0) { CShortEPGData epgdata; - if (sectionsd_getEPGidShort(eventInfo.epgID, &epgdata)) + if (CEitManager::getInstance()->getEPGidShort(eventInfo.epgID, &epgdata)) epgTitle=epgdata.title; } } diff --git a/src/timerd/timermanager.h b/src/timerd/timermanager.h index 6fc29e661..db2224311 100644 --- a/src/timerd/timermanager.h +++ b/src/timerd/timermanager.h @@ -219,13 +219,13 @@ private: bool m_isTimeSet; int m_extraTimeStart; int m_extraTimeEnd; - char wakeup; CTimerManager(); static void* timerThread(void *arg); CTimerEvent *nextEvent(); public: + bool wakeup; static CTimerManager* getInstance(); diff --git a/src/zapit/include/zapit/capmt.h b/src/zapit/include/zapit/capmt.h index c55b625bd..c24267c58 100644 --- a/src/zapit/include/zapit/capmt.h +++ b/src/zapit/include/zapit/capmt.h @@ -63,6 +63,7 @@ class CCam : public CBasicClient CAPMT_UPDATE = 0x05 }; CCam(); + virtual ~CCam() {}; bool sendMessage(const char * const data, const size_t length, bool update = false); bool makeCaPmt(CZapitChannel * channel, uint8_t list = CAPMT_ONLY, const CaIdVector &caids = CaIdVector()); bool setCaPmt(bool update = false); diff --git a/src/zapit/include/zapit/client/zapitclient.h b/src/zapit/include/zapit/client/zapitclient.h index 01470e40e..726441d6f 100644 --- a/src/zapit/include/zapit/client/zapitclient.h +++ b/src/zapit/include/zapit/client/zapitclient.h @@ -514,6 +514,8 @@ class CZapitClient:public CBasicClient ein beliebiges Event abmelden */ void unRegisterEvent(const unsigned int eventID, const unsigned int clientID); + + virtual ~CZapitClient() {}; }; #define PAL 0 diff --git a/src/zapit/include/zapit/frontend_c.h b/src/zapit/include/zapit/frontend_c.h index 971691cbe..2af2a867c 100644 --- a/src/zapit/include/zapit/frontend_c.h +++ b/src/zapit/include/zapit/frontend_c.h @@ -25,6 +25,7 @@ #define __zapit_frontend_h__ #include +#include #include #include #include @@ -78,8 +79,6 @@ static inline fe_rolloff_t dvbs_get_rolloff(fe_delivery_system_t delsys) return ROLLOFF_35; } -#define MAX_LNBS 64 /* due to Diseqc 1.1 (2003-01-10 rasc) */ - class CFEManager; class CFrontend @@ -87,18 +86,17 @@ class CFrontend private: /* frontend filedescriptor */ int fd; + + OpenThreads::Mutex mutex; /* use count for locking purposes */ int usecount; /* current adapter where this frontend is on */ int adapter; - /* current frontend instance */ - //static CFrontend *currentFe; bool locked; /* information about the used frontend type */ struct dvb_frontend_info info; /* current 22kHz tone mode */ fe_sec_tone_mode_t currentToneMode; - int currentDiseqc; fe_sec_voltage_t currentVoltage; /* current satellite position */ int32_t currentSatellitePosition; @@ -115,7 +113,6 @@ class CFrontend int repeatUsals; int feTimeout; - int diseqc; uint8_t uncommitedInput; /* lnb offsets */ int32_t lnbOffsetLow; @@ -123,15 +120,12 @@ class CFrontend int32_t lnbSwitch; /* current Transponderdata */ TP_params currentTransponder; - FrontendParameters curfe; bool slave; int fenumber; bool standby; bool buildProperties(const FrontendParameters*, struct dtv_properties &); - uint32_t getDiseqcReply(const int timeout_ms) const; FrontendParameters getFrontend(void) const; - void secResetOverload(void); void secSetTone(const fe_sec_tone_mode_t mode, const uint32_t ms); void secSetVoltage(const fe_sec_voltage_t voltage, const uint32_t ms); void sendDiseqcCommand(const struct dvb_diseqc_master_cmd *cmd, const uint32_t ms); @@ -144,12 +138,13 @@ class CFrontend void sendToneBurst(const fe_sec_mini_cmd_t burst, const uint32_t ms); int setFrontend(const FrontendParameters *feparams, bool nowait = false); void setSec(const uint8_t sat_no, const uint8_t pol, const bool high_band); - void set12V(bool enable); void reset(void); /* Private constructor */ CFrontend(int Number = 0, int Adapter = 0); + bool Open(bool init = false); + void Close(void); + void Init(void); - //static CFrontend *getInstance(int Number = 0, int Adapter = 0); friend class CFEManager; public: /* tuning finished flag */ @@ -162,7 +157,7 @@ class CFrontend uint8_t getDiseqcRepeats(void) const { return config.diseqcRepeats; } diseqc_t getDiseqcType(void) const { return (diseqc_t) config.diseqcType; } int getUniSCR(void) const { return config.uni_scr; } - uint32_t getFrequency(void) const { return curfe.dvb_feparams.frequency; } + uint32_t getFrequency(void) const { return currentTransponder.feparams.dvb_feparams.frequency; } bool getHighBand() { return (int) getFrequency() >= lnbSwitch; } static fe_modulation_t getModulation(const uint8_t modulation); uint8_t getPolarization(void) const; @@ -179,7 +174,7 @@ class CFrontend int32_t getRotorSatellitePosition() { return rotorSatellitePosition; } void setDiseqcRepeats(const uint8_t repeats) { config.diseqcRepeats = repeats; } - void setDiseqcType(const diseqc_t type); + void setDiseqcType(const diseqc_t type, bool force = false); void setTimeout(int timeout) { feTimeout = timeout; }; void configUsals(double Latitude, double Longitude, int LaDirection, int LoDirection, bool _repeatUsals) { @@ -198,7 +193,6 @@ class CFrontend int setParameters(TP_params *TP, bool nowait = 0); int tuneFrequency (FrontendParameters * feparams, uint8_t polarization, bool nowait = false); const TP_params* getParameters(void) const { return ¤tTransponder; }; - struct dvb_frontend_event* setParametersResponse(TP_params *TP); void setCurrentSatellitePosition(int32_t satellitePosition) {currentSatellitePosition = satellitePosition; } void setRotorSatellitePosition(int32_t satellitePosition) {rotorSatellitePosition = satellitePosition; } @@ -207,7 +201,6 @@ class CFrontend void gotoXX(t_satellite_position pos); bool tuneChannel(CZapitChannel *channel, bool nvod); bool retuneChannel(void); - bool retuneTP(bool nowait = true); fe_code_rate_t getCFEC (); transponder_id_t getTsidOnid() { return currentTransponder.TP_id; } @@ -219,8 +212,6 @@ class CFrontend void setTsidOnid(transponder_id_t newid) { currentTransponder.TP_id = newid; } uint32_t getRate (); - bool Open(); - void Close(); void Lock(); void Unlock(); diff --git a/src/zapit/include/zapit/satconfig.h b/src/zapit/include/zapit/satconfig.h index 8fe00ada4..75fb482bf 100644 --- a/src/zapit/include/zapit/satconfig.h +++ b/src/zapit/include/zapit/satconfig.h @@ -40,6 +40,7 @@ typedef struct sat_config { int unicable_qrg; int unicable_lnb; int configured; + int cable_nid; } sat_config_t; typedef enum diseqc_cmd_order { diff --git a/src/zapit/include/zapit/scan.h b/src/zapit/include/zapit/scan.h index b298a9469..d12b0ab3e 100644 --- a/src/zapit/include/zapit/scan.h +++ b/src/zapit/include/zapit/scan.h @@ -54,7 +54,8 @@ class CServiceScan : public OpenThreads::Thread SCAN_RADIO = 0x40, SCAN_TVRADIO = 0x60, SCAN_DATA = 0x80, - SCAN_ALL = 0xE0 + SCAN_ALL = 0xE0, + SCAN_LOGICAL_HD = 0x100, } scan_flags_t; private: diff --git a/src/zapit/include/zapit/zapit.h b/src/zapit/include/zapit/zapit.h index 0ca2c9ee6..ef7f2d2e0 100644 --- a/src/zapit/include/zapit/zapit.h +++ b/src/zapit/include/zapit/zapit.h @@ -21,11 +21,21 @@ #define PAL 0 #define NTSC 1 #define AUDIO_CONFIG_FILE "/var/tuxbox/config/zapit/audio.conf" +#define VOLUME_CONFIG_FILE "/var/tuxbox/config/zapit/volume.conf" typedef std::map audio_map_t; typedef audio_map_t::iterator audio_map_iterator_t; typedef std::map sdt_tp_map_t; +typedef std::pair pid_pair_t; +typedef std::pair volume_pair_t; +typedef std::multimap volume_map_t; +typedef volume_map_t::iterator volume_map_iterator_t; +typedef std::pair volume_map_range_t; + +#define VOLUME_PERCENT_AC3 100 +#define VOLUME_PERCENT_PCM 75 + /* complete zapit start thread-parameters in a struct */ typedef struct ZAPIT_start_arg { @@ -33,6 +43,7 @@ typedef struct ZAPIT_start_arg t_channel_id startchannelradio_id; int uselastchannel; int video_mode; + int volume; int ci_clock; } Z_start_arg; @@ -87,6 +98,7 @@ class CZapit : public OpenThreads::Thread RECORD_MODE = 0x04 }; + OpenThreads::Mutex mutex; bool started; bool event_mode; bool firstzap; @@ -97,10 +109,12 @@ class CZapit : public OpenThreads::Thread int def_audio_mode; int aspectratio; int mode43; +#if 0 unsigned int volume_left; unsigned int volume_right; - unsigned int def_volume_left; - unsigned int def_volume_right; +#endif + int current_volume; + int volume_percent; int currentMode; bool playbackStopForced; @@ -119,6 +133,7 @@ class CZapit : public OpenThreads::Thread CFrontend * live_fe; audio_map_t audio_map; + volume_map_t vol_map; //bool current_is_nvod; //bool standby; t_channel_id lastChannelRadio; @@ -128,6 +143,7 @@ class CZapit : public OpenThreads::Thread //void LoadAudioMap(); void SaveAudioMap(); + void SaveVolumeMap(); void SaveSettings(bool write_conf); //void SaveChannelPids(CZapitChannel* channel); void RestoreChannelPids(CZapitChannel* channel); @@ -169,6 +185,7 @@ class CZapit : public OpenThreads::Thread Zapit_config config; CZapitSdtMonitor SdtMonitor; void LoadAudioMap(); + void LoadVolumeMap(); void SaveChannelPids(CZapitChannel* channel); virtual void ConfigFrontend(); bool StopPlayBack(bool send_pmt); @@ -222,5 +239,11 @@ class CZapit : public OpenThreads::Thread void SetCurrentChannelID(const t_channel_id channel_id) { live_channel_id = channel_id; }; void SetLiveFrontend(CFrontend * fe) { if(fe) live_fe = fe; } CFrontend * GetLiveFrontend() { return live_fe; }; + + int GetPidVolume(t_channel_id channel_id, int pid, bool ac3 = false); + void SetPidVolume(t_channel_id channel_id, int pid, int percent); + void SetVolume(int vol); + int GetVolume() { return current_volume; }; + int SetVolumePercent(int percent); }; #endif /* __zapit_h__ */ diff --git a/src/zapit/lib/zapitclient.cpp b/src/zapit/lib/zapitclient.cpp index e6cc9fbf5..0cfff20a1 100644 --- a/src/zapit/lib/zapitclient.cpp +++ b/src/zapit/lib/zapitclient.cpp @@ -313,8 +313,8 @@ void CZapitClient::getBouquets(BouquetList& bouquets, const bool emptyBouquetsTo if (!utf_encoded) { buffer[30] = (char) 0x00; - strncpy(buffer, response.name, 30); - strncpy(response.name, ZapitTools::UTF8_to_Latin1(buffer).c_str(), 30); + strncpy(buffer, response.name, sizeof(buffer)-1); + strncpy(response.name, ZapitTools::UTF8_to_Latin1(buffer).c_str(), sizeof(buffer)-1); } bouquets.push_back(response); } @@ -344,15 +344,16 @@ bool CZapitClient::receive_channel_list(BouquetChannelList& channels, const bool { char buffer[CHANNEL_NAME_SIZE + 1]; buffer[CHANNEL_NAME_SIZE] = (char) 0x00; - strncpy(buffer, response.name, CHANNEL_NAME_SIZE); - strncpy(response.name, ZapitTools::UTF8_to_Latin1(buffer).c_str(), CHANNEL_NAME_SIZE); + strncpy(buffer, response.name, CHANNEL_NAME_SIZE-1); + strncpy(response.name, ZapitTools::UTF8_to_Latin1(buffer).c_str(), CHANNEL_NAME_SIZE-1); } channels.push_back(response); } } return true; } - +#if 0 +//never used bool CZapitClient::receive_nchannel_list(BouquetNChannelList& channels) { CZapitMessages::responseGeneralInteger responseInteger; @@ -375,7 +376,7 @@ bool CZapitClient::receive_nchannel_list(BouquetNChannelList& channels) } return true; } - +#endif /* gets all channels that are in specified bouquet */ /* bouquets are numbered starting at 0 */ @@ -529,7 +530,8 @@ void CZapitClient::getVolume(unsigned int *left, unsigned int *right) close_connection(); } - +#if 0 +//never used delivery_system_t CZapitClient::getDeliverySystem(void) { send(CZapitMessages::CMD_GET_DELIVERY_SYSTEM, 0, 0); @@ -543,6 +545,7 @@ delivery_system_t CZapitClient::getDeliverySystem(void) return response.system; } +#endif #if 0 bool CZapitClient::get_current_TP(TP_params* TP) { @@ -1031,6 +1034,8 @@ void CZapitClient::setRecordMode(const bool activate) send(CZapitMessages::CMD_SET_RECORD_MODE, (char*)&msg, sizeof(msg)); close_connection(); } +#if 0 +//never used void CZapitClient::setEventMode(const bool activate) { CZapitMessages::commandSetRecordMode msg; @@ -1038,7 +1043,7 @@ void CZapitClient::setEventMode(const bool activate) send(CZapitMessages::CMD_SET_EVENT_MODE, (char*)&msg, sizeof(msg)); close_connection(); } - +#endif bool CZapitClient::isRecordModeActive() { send(CZapitMessages::CMD_GET_RECORD_MODE); diff --git a/src/zapit/src/Makefile.am b/src/zapit/src/Makefile.am index c3f4224ee..80b9286cd 100644 --- a/src/zapit/src/Makefile.am +++ b/src/zapit/src/Makefile.am @@ -26,10 +26,22 @@ endif noinst_LIBRARIES = libzapit.a libzapit_a_SOURCES = \ - bouquets.cpp channel.cpp dvbstring.cpp getservices.cpp \ - transponder.cpp scan.cpp zapit.cpp capmt.cpp frontend.cpp femanager.cpp \ - pat.cpp scanpmt.cpp scansdt.cpp scannit.cpp scanbat.cpp -# pat.cpp scanpmt.cpp fastscan.cpp scansdt.cpp scannit.cpp scanbat.cpp + bouquets.cpp \ + capmt.cpp \ + channel.cpp \ + dvbstring.cpp \ + femanager.cpp \ + frontend.cpp \ + getservices.cpp \ + pat.cpp \ + scanbat.cpp \ + scan.cpp \ + scannit.cpp \ + scanpmt.cpp \ + scansdt.cpp \ + transponder.cpp \ + zapit.cpp +# fastscan.cpp bin_PROGRAMS = pzapit sbin_PROGRAMS = udpstreampes diff --git a/src/zapit/src/capmt.cpp b/src/zapit/src/capmt.cpp index fa64dca1e..64ec0edd9 100644 --- a/src/zapit/src/capmt.cpp +++ b/src/zapit/src/capmt.cpp @@ -1,9 +1,9 @@ /* - * $Id: cam.cpp,v 1.33 2004/04/04 20:20:45 obi Exp $ - * * (C) 2002 by Andreas Oberritter , * thegoodguy * + * Copyright (C) 2011-2012 CoolStream International Ltd + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -81,7 +81,7 @@ bool CCam::makeCaPmt(CZapitChannel * channel, uint8_t list, const CaIdVector &ca int len; unsigned char * buffer = channel->getRawPmt(len); - INFO("cam %p source %d camask %d list %02x buffer", this, source_demux, camask, list); + DBG("cam %p source %d camask %d list %02x buffer", this, source_demux, camask, list); if(!buffer) return false; @@ -149,7 +149,7 @@ int CCam::makeMask(int demux, bool add) if(demuxes[i] > 0) mask |= 1 << i; } - INFO("demuxes %d:%d:%d old mask %d new mask %d", demuxes[0], demuxes[1], demuxes[2], camask, mask); + DBG("demuxes %d:%d:%d old mask %d new mask %d", demuxes[0], demuxes[1], demuxes[2], camask, mask); return mask; } @@ -188,7 +188,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start printf("CCamManager: channel %llx not found\n", channel_id); return false; } - INFO("channel %llx [%s] mode %d %s update %d", channel_id, channel->getName().c_str(), mode, start ? "START" : "STOP", force_update); + //INFO("channel %llx [%s] mode %d %s update %d", channel_id, channel->getName().c_str(), mode, start ? "START" : "STOP", force_update); mutex.lock(); cammap_iterator_t it = channel_map.find(channel_id); @@ -226,11 +226,10 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start if(cam->getSource() > 0) source = cam->getSource(); - INFO("source %d old mask %d new mask %d force update %s", source, oldmask, newmask, force_update ? "yes" : "no"); + INFO("channel %llx [%s] mode %d %s src %d mask %d -> %d update %d", channel_id, channel->getName().c_str(), + mode, start ? "START" : "STOP", source, oldmask, newmask, force_update); + //INFO("source %d old mask %d new mask %d force update %s", source, oldmask, newmask, force_update ? "yes" : "no"); if((oldmask != newmask) || force_update) { -#if 0 - cam->setCaPmt(channel, source, newmask, true); -#endif cam->setCaMask(newmask); cam->setSource(source); if(newmask == 0) { diff --git a/src/zapit/src/channel.cpp b/src/zapit/src/channel.cpp index 991f978ce..72374d4ad 100644 --- a/src/zapit/src/channel.cpp +++ b/src/zapit/src/channel.cpp @@ -269,7 +269,8 @@ CZapitAbsSub* CZapitChannel::getChannelSub(int index) } return retval; } - +#if 0 +//never used void CZapitChannel::setChannelSub(int subIdx) { if (subIdx < (int)channelSubs.size()){ @@ -281,7 +282,7 @@ int CZapitChannel::getChannelSubIndex(void) { return currentSub < getSubtitleCount() ? currentSub : -1; } - +#endif #if 0 void CZapitChannel::setCaPmt(CCaPmt *pCaPmt) { diff --git a/src/zapit/src/femanager.cpp b/src/zapit/src/femanager.cpp index f08b6e000..d001a47e9 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -186,8 +186,7 @@ bool CFEManager::loadSettings() frontend_config_t & fe_config = fe->getConfig(); INFO("load config for fe%d", fe->fenumber); - //fe_config.diseqcType = (diseqc_t) getConfigValue(fe, "diseqcType", NO_DISEQC); - diseqc_t diseqcType = (diseqc_t) getConfigValue(fe, "diseqcType", NO_DISEQC); + fe_config.diseqcType = (diseqc_t) getConfigValue(fe, "diseqcType", NO_DISEQC); fe_config.diseqcRepeats = getConfigValue(fe, "diseqcRepeats", 0); fe_config.motorRotationSpeed = getConfigValue(fe, "motorRotationSpeed", 18); fe_config.highVoltage = getConfigValue(fe, "highVoltage", 0); @@ -195,14 +194,17 @@ bool CFEManager::loadSettings() fe->setRotorSatellitePosition(getConfigValue(fe, "lastSatellitePosition", 0)); //fe->setDiseqcType((diseqc_t) fe_config.diseqcType); +#if 0 + diseqc_t diseqcType = (diseqc_t) getConfigValue(fe, "diseqcType", NO_DISEQC); fe->setDiseqcType(diseqcType); +#endif char cfg_key[81]; sprintf(cfg_key, "fe%d_satellites", fe->fenumber); - std::vector satList = configfile.getInt32Vector(cfg_key); satellite_map_t & satmap = fe->getSatellites(); satmap.clear(); #if 0 + std::vector satList = configfile.getInt32Vector(cfg_key); for(unsigned int i = 0; i < satList.size(); i++) t_satellite_position position = satList[i]; #endif @@ -280,27 +282,29 @@ void CFEManager::saveSettings(bool write) void CFEManager::setMode(fe_mode_t newmode, bool initial) { - if(newmode == mode) + if(!initial && (newmode == mode)) return; - if(femap.size() == 1) { - mode = FE_MODE_SINGLE; - return; - } mode = newmode; - bool setslave = (mode == FE_MODE_LOOP); + if(femap.size() == 1) + mode = FE_MODE_SINGLE; + + bool setslave = (mode == FE_MODE_LOOP) || (mode == FE_MODE_SINGLE); for(fe_map_iterator_t it = femap.begin(); it != femap.end(); it++) { + CFrontend * fe = it->second; if(it != femap.begin()) { - CFrontend * fe = it->second; INFO("Frontend %d as slave: %s", fe->fenumber, setslave ? "yes" : "no"); fe->setMasterSlave(setslave); - } + } else + fe->Init(); } +#if 0 if(setslave && !initial) { CFrontend * fe = getFE(0); fe->Close(); - fe->Open(); + fe->Open(true); } +#endif } void CFEManager::Open() @@ -308,7 +312,7 @@ void CFEManager::Open() for(fe_map_iterator_t it = femap.begin(); it != femap.end(); it++) { CFrontend * fe = it->second; if(!fe->Locked()) - fe->Open(); + fe->Open(true); } } @@ -331,7 +335,8 @@ CFrontend * CFEManager::getFE(int index) INFO("Frontend #%d not found", index); return NULL; } - +#if 0 +//never used transponder * CFEManager::getChannelTransponder(CZapitChannel * channel) { transponder_list_t::iterator tpI = transponders.find(channel->getTransponderId()); @@ -341,6 +346,7 @@ transponder * CFEManager::getChannelTransponder(CZapitChannel * channel) INFO("Transponder %llx not found", channel->getTransponderId()); return NULL; } +#endif /* try to find fe with same tid, or unlocked. fe with same tid is preffered */ CFrontend * CFEManager::findFrontend(CZapitChannel * channel) diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 318418b4e..ad7edb6d8 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -163,19 +163,6 @@ typedef enum dvb_fec { #define TIME_STEP 200 #define TIMEOUT_MAX_MS (feTimeout*100) /*********************************************************************************************************/ -#if 0 -// Global fe instance -CFrontend *CFrontend::currentFe = NULL; - -CFrontend *CFrontend::getInstance(int Number, int Adapter) -{ - if (!currentFe) { - currentFe = new CFrontend(Number, Adapter); - currentFe->Open(); - } - return currentFe; -} -#endif CFrontend::CFrontend(int Number, int Adapter) { printf("[fe%d] New frontend on adapter %d\n", Number, Adapter); @@ -194,14 +181,10 @@ CFrontend::CFrontend(int Number, int Adapter) printf("[fe%d] FE_OFFSET is %d -> use frontend%d\n", Number, fe_offset, fenumber); } - memset(&curfe, 0, sizeof(curfe)); - curfe.dvb_feparams.u.qpsk.fec_inner = FEC_3_4; - curfe.dvb_feparams.u.qam.fec_inner = FEC_3_4; - curfe.dvb_feparams.u.qam.modulation = QAM_64; - tuned = false; uncommitedInput = 255; - diseqc = 255; + + memset(¤tTransponder, 0, sizeof(currentTransponder)); currentTransponder.polarization = 1; currentTransponder.feparams.dvb_feparams.frequency = 0; currentTransponder.TP_id = 0; @@ -216,28 +199,22 @@ CFrontend::CFrontend(int Number, int Adapter) config.motorRotationSpeed = 0; //in 0.1 degrees per second feTimeout = 40; - // to allow Open() switch it off - currentVoltage = SEC_VOLTAGE_OFF; //SEC_VOLTAGE_13; + currentVoltage = SEC_VOLTAGE_OFF; currentToneMode = SEC_TONE_ON; } CFrontend::~CFrontend(void) { printf("[fe%d] close frontend fd %d\n", fenumber, fd); - if(fd >= 0) { + if(fd >= 0) Close(); - close(fd); - } - //currentFe = NULL; } -bool CFrontend::Open(void) +bool CFrontend::Open(bool init) { if(!standby) return false; - printf("[fe%d] open frontend\n", fenumber); - char filename[128]; snprintf(filename, sizeof(filename), "/dev/dvb/adapter%d/frontend%d", adapter, fenumber); printf("[fe%d] open %s\n", fenumber, filename); @@ -252,14 +229,9 @@ bool CFrontend::Open(void) } //FIXME info.type = FE_QAM; - //currentVoltage = SEC_VOLTAGE_OFF; - //secSetVoltage(SEC_VOLTAGE_OFF, 15); - secSetVoltage(SEC_VOLTAGE_13, 15); - secSetTone(SEC_TONE_OFF, 15); - diseqc_t diseqcType = (diseqc_t) config.diseqcType; - config.diseqcType = NO_DISEQC; - setDiseqcType(diseqcType); + if (init) + Init(); currentTransponder.TP_id = 0; @@ -268,6 +240,15 @@ bool CFrontend::Open(void) return true; } +void CFrontend::Init(void) +{ + mutex.lock(); + secSetVoltage(SEC_VOLTAGE_13, 100); + secSetTone(SEC_TONE_OFF, 15); + setDiseqcType((diseqc_t) config.diseqcType, true); + mutex.unlock(); +} + void CFrontend::Close(void) { if(standby) @@ -294,16 +275,10 @@ void CFrontend::setMasterSlave(bool _slave) if(_slave) { secSetVoltage(SEC_VOLTAGE_OFF, 0); secSetTone(SEC_TONE_OFF, 15); - } - slave = _slave; - if(!slave) { - secSetVoltage(SEC_VOLTAGE_13, 0); -#if 1 - diseqc_t diseqcType = (diseqc_t) config.diseqcType; - config.diseqcType = NO_DISEQC; - setDiseqcType(diseqcType); -#endif } + slave = _slave; + if(!slave) + Init(); } void CFrontend::reset(void) @@ -326,11 +301,10 @@ void CFrontend::Unlock() fe_code_rate_t CFrontend::getCFEC() { - if (info.type == FE_QPSK) { - return curfe.dvb_feparams.u.qpsk.fec_inner; - } else { - return curfe.dvb_feparams.u.qam.fec_inner; - } + if (info.type == FE_QPSK) + return currentTransponder.feparams.dvb_feparams.u.qpsk.fec_inner; + else + return currentTransponder.feparams.dvb_feparams.u.qam.fec_inner; } fe_code_rate_t CFrontend::getCodeRate(const uint8_t fec_inner, int system) @@ -413,30 +387,26 @@ uint8_t CFrontend::getPolarization(void) const uint32_t CFrontend::getRate() { - if (info.type == FE_QPSK) { - return curfe.dvb_feparams.u.qpsk.symbol_rate; - } else { - return curfe.dvb_feparams.u.qam.symbol_rate; - } + if (info.type == FE_QPSK) + return currentTransponder.feparams.dvb_feparams.u.qpsk.symbol_rate; + else + return currentTransponder.feparams.dvb_feparams.u.qam.symbol_rate; } fe_status_t CFrontend::getStatus(void) const { -#if 1 // FIXME FE_READ_STATUS works ? struct dvb_frontend_event event; fop(ioctl, FE_READ_STATUS, &event.status); - //printf("CFrontend::getStatus: %x\n", event.status); return (fe_status_t) (event.status & FE_HAS_LOCK); -#else - fe_status_t status = (fe_status_t) tuned; - return status; -#endif } +#if 0 +//never used FrontendParameters CFrontend::getFrontend(void) const { return currentTransponder.feparams; } +#endif uint32_t CFrontend::getBitErrorRate(void) const { @@ -462,7 +432,8 @@ uint16_t CFrontend::getSignalNoiseRatio(void) const fop(ioctl, FE_READ_SNR, &snr); return snr; } - +#if 0 +//never used uint32_t CFrontend::getUncorrectedBlocks(void) const { uint32_t blocks = 0; @@ -470,7 +441,7 @@ uint32_t CFrontend::getUncorrectedBlocks(void) const return blocks; } - +#endif struct dvb_frontend_event CFrontend::getEvent(void) { struct dvb_frontend_event event; @@ -485,12 +456,9 @@ struct dvb_frontend_event CFrontend::getEvent(void) memset(&event, 0, sizeof(struct dvb_frontend_event)); - //printf("[fe%d] getEvent: max timeout: %d\n", fenumber, TIMEOUT_MAX_MS); FE_TIMER_START(); - //while (msec <= TIMEOUT_MAX_MS ) { while ((int) timer_msec < TIMEOUT_MAX_MS) { - //int ret = poll(&pfd, 1, TIME_STEP); int ret = poll(&pfd, 1, TIMEOUT_MAX_MS - timer_msec); if (ret < 0) { perror("CFrontend::getEvent poll"); @@ -504,7 +472,6 @@ struct dvb_frontend_event CFrontend::getEvent(void) if (pfd.revents & (POLLIN | POLLPRI)) { memset(&event, 0, sizeof(struct dvb_frontend_event)); - //fop(ioctl, FE_READ_STATUS, &event.status); ret = ioctl(fd, FE_GET_EVENT, &event); if (ret < 0) { perror("CFrontend::getEvent ioctl"); @@ -831,7 +798,7 @@ bool CFrontend::buildProperties(const FrontendParameters *feparams, struct dtv_p return true; } -int CFrontend::setFrontend(const FrontendParameters *feparams, bool /*nowait*/) +int CFrontend::setFrontend(const FrontendParameters *feparams, bool nowait) { struct dtv_property cmdargs[FE_COMMON_PROPS + FE_DVBT_PROPS]; // WARNING: increase when needed more space struct dtv_properties cmdseq; @@ -841,7 +808,6 @@ int CFrontend::setFrontend(const FrontendParameters *feparams, bool /*nowait*/) tuned = false; - //printf("[fe%d] DEMOD: FEC %s system %s modulation %s pilot %s\n", fenumber, f, s, m, pilot == PILOT_ON ? "on" : "off"); struct dvb_frontend_event ev; { // Erase previous events @@ -852,7 +818,6 @@ int CFrontend::setFrontend(const FrontendParameters *feparams, bool /*nowait*/) } } - //printf("[fe%d] DEMOD: FEC %s system %s modulation %s pilot %s, freq %d\n", fenumber, f, s, m, pilot == PILOT_ON ? "on" : "off", p->props[FREQUENCY].u.data); if (!buildProperties(feparams, cmdseq)) return 0; @@ -865,6 +830,8 @@ int CFrontend::setFrontend(const FrontendParameters *feparams, bool /*nowait*/) } FE_TIMER_STOP("FE_SET_PROPERTY took"); } + if (nowait) + return 0; { FE_TIMER_INIT(); FE_TIMER_START(); @@ -917,12 +884,6 @@ void CFrontend::secSetVoltage(const fe_sec_voltage_t voltage, const uint32_t ms) return; printf("[fe%d] voltage %s\n", fenumber, voltage == SEC_VOLTAGE_OFF ? "OFF" : voltage == SEC_VOLTAGE_13 ? "13" : "18"); - //printf("[fe%d] voltage %s high %d\n", fenumber, voltage == SEC_VOLTAGE_OFF ? "OFF" : voltage == SEC_VOLTAGE_13 ? "13" : "18", config.highVoltage); - //int val = config.highVoltage; - //fop(ioctl, FE_ENABLE_HIGH_LNB_VOLTAGE, val); - - //FE_TIMER_INIT(); - //FE_TIMER_START(); if (config.uni_scr >= 0) { /* see my comment in secSetTone... */ currentVoltage = voltage; /* need to know polarization for unicable */ @@ -932,32 +893,23 @@ void CFrontend::secSetVoltage(const fe_sec_voltage_t voltage, const uint32_t ms) if (fop(ioctl, FE_SET_VOLTAGE, voltage) == 0) { currentVoltage = voltage; - //FE_TIMER_STOP("[frontend] FE_SET_VOLTAGE took"); - usleep(1000 * ms); // FIXME : is needed ? + usleep(1000 * ms); } } -void CFrontend::secResetOverload(void) -{ -} - void CFrontend::sendDiseqcCommand(const struct dvb_diseqc_master_cmd *cmd, const uint32_t ms) { + if (slave || info.type != FE_QPSK) + return; + printf("[fe%d] Diseqc cmd: ", fenumber); for (int i = 0; i < cmd->msg_len; i++) printf("0x%X ", cmd->msg[i]); printf("\n"); - if (slave || info.type != FE_QPSK) - return; if (fop(ioctl, FE_DISEQC_SEND_MASTER_CMD, cmd) == 0) usleep(1000 * ms); } -uint32_t CFrontend::getDiseqcReply(const int /*timeout_ms*/) const -{ - return 0; -} - void CFrontend::sendToneBurst(const fe_sec_mini_cmd_t burst, const uint32_t ms) { if (slave || info.type != FE_QPSK) @@ -966,7 +918,7 @@ void CFrontend::sendToneBurst(const fe_sec_mini_cmd_t burst, const uint32_t ms) usleep(1000 * ms); } -void CFrontend::setDiseqcType(const diseqc_t newDiseqcType) +void CFrontend::setDiseqcType(const diseqc_t newDiseqcType, bool force) { switch (newDiseqcType) { case NO_DISEQC: @@ -1006,19 +958,13 @@ void CFrontend::setDiseqcType(const diseqc_t newDiseqcType) return; } -#if 0 - if (!slave && (config.diseqcType <= MINI_DISEQC) - && (newDiseqcType > MINI_DISEQC)) { + if (force || ((config.diseqcType <= MINI_DISEQC) + && (newDiseqcType > MINI_DISEQC))) { + secSetTone(SEC_TONE_OFF, 15); sendDiseqcPowerOn(); sendDiseqcReset(); + secSetTone(SEC_TONE_ON, 20); } -#else - - if (config.diseqcType != newDiseqcType) { - sendDiseqcPowerOn(); - sendDiseqcReset(); - } -#endif config.diseqcType = newDiseqcType; } @@ -1049,8 +995,8 @@ void CFrontend::sendMotorCommand(uint8_t cmdtype, uint8_t address, uint8_t comma cmd.msg_len = 3 + num_parameters; //secSetVoltage(config.highVoltage ? SEC_VOLTAGE_18 : SEC_VOLTAGE_13, 15); - secSetVoltage(SEC_VOLTAGE_13, 15); secSetTone(SEC_TONE_OFF, 15); + secSetVoltage(SEC_VOLTAGE_13, 100); for(i = 0; i <= repeat; i++) sendDiseqcCommand(&cmd, 50); @@ -1068,12 +1014,12 @@ void CFrontend::positionMotor(uint8_t motorPosition) }; if (motorPosition != 0) { - secSetVoltage(config.highVoltage ? SEC_VOLTAGE_18 : SEC_VOLTAGE_13, 15); secSetTone(SEC_TONE_OFF, 25); + secSetVoltage(config.highVoltage ? SEC_VOLTAGE_18 : SEC_VOLTAGE_13, 15); cmd.msg[3] = motorPosition; for (int i = 0; i <= repeatUsals; ++i) - sendDiseqcCommand(&cmd, 50); + sendDiseqcCommand(&cmd, 50); printf("[fe%d] motor positioning command sent.\n", fenumber); } @@ -1082,12 +1028,10 @@ void CFrontend::positionMotor(uint8_t motorPosition) bool CFrontend::setInput(CZapitChannel * channel, bool nvod) { transponder_list_t::iterator tpI; - //transponder_id_t ct = channel->getTransponderId(); transponder_id_t ct = nvod ? (channel->getTransponderId() & 0xFFFFFFFFULL) : channel->getTransponderId(); transponder_id_t current_id = nvod ? (currentTransponder.TP_id & 0xFFFFFFFFULL) : currentTransponder.TP_id; //printf("CFrontend::setInput tuned %d nvod %d current_id %llx new %llx\n\n", tuned, nvod, current_id, ct); - //if (tuned && (ct == currentTransponder.TP_id)) if (tuned && (ct == current_id)) return false; @@ -1105,6 +1049,7 @@ bool CFrontend::setInput(CZapitChannel * channel, bool nvod) } currentTransponder.TP_id = tpI->first; + currentTransponder.polarization = tpI->second.polarization; currentSatellitePosition = channel->getSatellitePosition(); setInput(channel->getSatellitePosition(), tpI->second.feparams.dvb_feparams.frequency, tpI->second.polarization); @@ -1115,16 +1060,12 @@ void CFrontend::setInput(t_satellite_position satellitePosition, uint32_t freque { sat_iterator_t sit = satellites.find(satellitePosition); -#if 0 - printf("[fe%d] setInput: SatellitePosition %d -> %d\n", fenumber, currentSatellitePosition, satellitePosition); - if (currentSatellitePosition != satellitePosition) -#endif - setLnbOffsets(sit->second.lnbOffsetLow, sit->second.lnbOffsetHigh, sit->second.lnbSwitch); /* unicable */ config.uni_scr = sit->second.unicable_scr; config.uni_qrg = sit->second.unicable_qrg; config.uni_lnb = sit->second.unicable_lnb; + setLnbOffsets(sit->second.lnbOffsetLow, sit->second.lnbOffsetHigh, sit->second.lnbSwitch); if (config.diseqcType != DISEQC_ADVANCED) { setDiseqc(sit->second.diseqc, polarization, frequency); return; @@ -1135,7 +1076,7 @@ void CFrontend::setInput(t_satellite_position satellitePosition, uint32_t freque sendUncommittedSwitchesCommand(sit->second.uncommited); } else { if (sendUncommittedSwitchesCommand(sit->second.uncommited)) - diseqc = -1; + currentTransponder.diseqc = -1; setDiseqcSimple(sit->second.commited, polarization, frequency); } } @@ -1175,48 +1116,42 @@ uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int bool CFrontend::tuneChannel(CZapitChannel * /*channel*/, bool /*nvod*/) { -//printf("tuneChannel: tpid %llx\n", currentTransponder.TP_id); transponder_list_t::iterator transponder = transponders.find(currentTransponder.TP_id); if (transponder == transponders.end()) return false; return tuneFrequency(&transponder->second.feparams, transponder->second.polarization, false); } -bool CFrontend::retuneTP(bool nowait) -{ - /* used in pip only atm */ - tuneFrequency(&curfe, currentTransponder.polarization, nowait); - return 0; -} - bool CFrontend::retuneChannel(void) { - setFrontend(¤tTransponder.feparams); - return 0; + mutex.lock(); + setInput(currentSatellitePosition, currentTransponder.feparams.dvb_feparams.frequency, currentTransponder.polarization); + transponder_list_t::iterator transponder = transponders.find(currentTransponder.TP_id); + if (transponder == transponders.end()) + return false; + mutex.unlock(); + return tuneFrequency(&transponder->second.feparams, transponder->second.polarization, true); } int CFrontend::tuneFrequency(FrontendParameters * feparams, uint8_t polarization, bool nowait) { TP_params TP; - //printf("[fe%d] tune to frequency %d pol %s srate %d\n", fenumber, feparams->dvb_feparams.frequency, polarization ? "Vertical/Right" : "Horizontal/Left", feparams->dvb_feparams.u.qpsk.symbol_rate); - memmove(&curfe, feparams, sizeof(struct dvb_frontend_parameters)); + memmove(¤tTransponder.feparams, feparams, sizeof(struct dvb_frontend_parameters)); memmove(&TP.feparams, feparams, sizeof(struct dvb_frontend_parameters)); TP.polarization = polarization; return setParameters(&TP, nowait); } -int CFrontend::setParameters(TP_params *TP, bool /*nowait*/) +int CFrontend::setParameters(TP_params *TP, bool nowait) { int freq_offset = 0, freq; - TP_params currTP; - FrontendParameters *feparams; + FrontendParameters feparams; /* Copy the data for local use */ - currTP = *TP; - feparams = &currTP.feparams; - freq = (int) feparams->dvb_feparams.frequency; + memcpy(&feparams, &TP->feparams, sizeof(feparams)); + freq = (int) feparams.dvb_feparams.frequency; char * f, *s, *m; bool high_band; @@ -1230,58 +1165,27 @@ int CFrontend::setParameters(TP_params *TP, bool /*nowait*/) freq_offset = lnbOffsetHigh; } - feparams->dvb_feparams.frequency = abs(freq - freq_offset); + feparams.dvb_feparams.frequency = abs(freq - freq_offset); setSec(TP->diseqc, TP->polarization, high_band); - getDelSys(feparams->dvb_feparams.u.qpsk.fec_inner, dvbs_get_modulation(feparams->dvb_feparams.u.qpsk.fec_inner), f, s, m); + getDelSys(feparams.dvb_feparams.u.qpsk.fec_inner, dvbs_get_modulation(feparams.dvb_feparams.u.qpsk.fec_inner), f, s, m); break; case FE_QAM: if (freq < 1000*1000) - feparams->dvb_feparams.frequency = freq * 1000; - getDelSys(feparams->dvb_feparams.u.qam.fec_inner,feparams->dvb_feparams.u.qam.modulation, f, s, m); -#if 0 - switch (TP->feparams.dvb_feparams.inversion) { - case INVERSION_OFF: - TP->feparams.dvb_feparams.inversion = INVERSION_ON; - break; - case INVERSION_ON: - default: - TP->feparams.dvb_feparams.inversion = INVERSION_OFF; - break; - } -#endif + feparams.dvb_feparams.frequency = freq * 1000; + getDelSys(feparams.dvb_feparams.u.qam.fec_inner, feparams.dvb_feparams.u.qam.modulation, f, s, m); case FE_OFDM: if (freq < 1000*1000) - feparams->dvb_feparams.frequency = freq * 1000; - getDelSys(feparams->dvb_feparams.u.ofdm.code_rate_HP,feparams->dvb_feparams.u.ofdm.constellation, f, s, m); + feparams.dvb_feparams.frequency = freq * 1000; + getDelSys(feparams.dvb_feparams.u.ofdm.code_rate_HP,feparams.dvb_feparams.u.ofdm.constellation, f, s, m); break; default: printf("[fe%d] unknown type %d\n", fenumber, info.type); break; } - //printf("[fe%d] tuner to frequency %d (offset %d timeout %d)\n", fenumber, feparams->dvb_feparams.frequency, freq_offset, TIMEOUT_MAX_MS); - //printf("[fe%d] tune to frequency %d (tuner %d offset %d timeout %d)\n", fenumber, freq, feparams->dvb_feparams.frequency, freq_offset, TIMEOUT_MAX_MS); printf("[fe%d] tune to %d %s %s %s %s srate %d (tuner %d offset %d timeout %d)\n", fenumber, freq, s, m, f, - TP->polarization ? "V/R" : "H/L", feparams->dvb_feparams.u.qpsk.symbol_rate, feparams->dvb_feparams.frequency, freq_offset, TIMEOUT_MAX_MS); - setFrontend(feparams); - -#if 0 - if (tuned) { - ret = diff(event.parameters.frequency, TP->feparams.dvb_feparams.frequency); - /* if everything went ok, then it is a good idea to copy the real - * frontend parameters, so we can update the service list, if it differs. - * TODO: set a flag to indicate a change in the service list */ - memmove(¤tTransponder.feparams, &event.parameters, sizeof(struct dvb_frontend_parameters)); - } -#endif - -#if 0 - /* add the frequency offset to the frontend parameters again - * because they are used for the channel list and were given - * to this method as a pointer */ - if (info.type == FE_QPSK) - TP->feparams.dvb_feparams.frequency += freq_offset; -#endif + TP->polarization & 1 ? "V/R" : "H/L", feparams.dvb_feparams.u.qpsk.symbol_rate, feparams.dvb_feparams.frequency, freq_offset, TIMEOUT_MAX_MS); + setFrontend(&feparams, nowait); return tuned; } @@ -1307,7 +1211,6 @@ bool CFrontend::sendUncommittedSwitchesCommand(int input) /* off = low band, on - hi band , vertical 13v, horizontal 18v */ bool CFrontend::setDiseqcSimple(int sat_no, const uint8_t pol, const uint32_t frequency) { - //for monoblock fe_sec_voltage_t v = (pol & 1) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18; //fe_sec_mini_cmd_t b = (sat_no & 1) ? SEC_MINI_B : SEC_MINI_A; bool high_band = ((int)frequency >= lnbSwitch); @@ -1316,20 +1219,15 @@ bool CFrontend::setDiseqcSimple(int sat_no, const uint8_t pol, const uint32_t fr {0xe0, 0x10, 0x38, 0x00, 0x00, 0x00}, 4 }; - INFO("[fe%d] diseqc input %d -> %d", fenumber, diseqc, sat_no); + INFO("[fe%d] diseqc input %d -> %d", fenumber, currentTransponder.diseqc, sat_no); currentTransponder.diseqc = sat_no; if (slave) return true; - if ((sat_no >= 0) && (diseqc != sat_no)) { - diseqc = sat_no; - printf("[fe%d] diseqc no. %d\n", fenumber, sat_no); - + if ((sat_no >= 0) /* && (diseqc != sat_no)*/) { cmd.msg[3] = 0xf0 | (((sat_no * 4) & 0x0f) | (high_band ? 1 : 0) | ((pol & 1) ? 0 : 2)); - //for monoblock - needed ?? - secSetVoltage(v, 15); - //secSetVoltage(SEC_VOLTAGE_13, 15);//FIXME for test secSetTone(SEC_TONE_OFF, 20); + secSetVoltage(v, 100); sendDiseqcCommand(&cmd, 100); return true; @@ -1350,21 +1248,23 @@ void CFrontend::setDiseqc(int sat_no, const uint8_t pol, const uint32_t frequenc uint8_t loop; bool high_band = ((int)frequency >= lnbSwitch); struct dvb_diseqc_master_cmd cmd = { {0xE0, 0x10, 0x38, 0xF0, 0x00, 0x00}, 4 }; - //fe_sec_voltage_t polarity = (pol & 1) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18; - //fe_sec_tone_mode_t tone = high_band ? SEC_TONE_ON : SEC_TONE_OFF;//seems needed? fe_sec_mini_cmd_t b = (sat_no & 1) ? SEC_MINI_B : SEC_MINI_A; int delay = 0; - printf("[fe%d] diseqc input %d -> %d\n", fenumber, diseqc, sat_no); + if ((config.diseqcType == NO_DISEQC) || sat_no < 0) + return; + + printf("[fe%d] diseqc input %d -> %d\n", fenumber, currentTransponder.diseqc, sat_no); + currentTransponder.diseqc = sat_no; if (slave) return; - //secSetVoltage(polarity, 15); /* first of all set the "polarization" */ - //secSetTone(tone, 1); /* set the "band" */ - - //secSetVoltage(SEC_VOLTAGE_13, 15);//FIXME for test secSetTone(SEC_TONE_OFF, 20); - +#if 1 + fe_sec_voltage_t v = (pol & 1) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18; + secSetVoltage(v, 100); +#endif + sendDiseqcReset(); for (loop = 0; loop <= config.diseqcRepeats; loop++) { //usleep(50*1000); /* sleep at least 50 milli seconds */ @@ -1407,13 +1307,6 @@ void CFrontend::setDiseqc(int sat_no, const uint8_t pol, const uint32_t frequenc if (config.diseqcType == SMATV_REMOTE_TUNING) sendDiseqcSmatvRemoteTuningCommand(frequency); - -#if 0 // setSec do this, when tune called - if (high_band) - secSetTone(SEC_TONE_ON, 20); -#endif - //secSetTone(tone, 20); - currentTransponder.diseqc = sat_no; } void CFrontend::setSec(const uint8_t /*sat_no*/, const uint8_t pol, const bool high_band) @@ -1421,33 +1314,29 @@ void CFrontend::setSec(const uint8_t /*sat_no*/, const uint8_t pol, const bool h fe_sec_voltage_t v = (pol & 1) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18; fe_sec_tone_mode_t t = high_band ? SEC_TONE_ON : SEC_TONE_OFF; - secSetVoltage(v, 15); + currentTransponder.polarization = pol; secSetTone(t, 15); - currentTransponder.polarization = pol;// & 1; + secSetVoltage(v, 100); } void CFrontend::sendDiseqcPowerOn(void) { // FIXME power on can take a while. Should be wait // more time here ? 15 ms enough for some switches ? -#if 1 printf("[fe%d] diseqc power on\n", fenumber); sendDiseqcZeroByteCommand(0xe0, 0x10, 0x03); -#else - struct dvb_diseqc_master_cmd cmd = { - {0xE0, 0x10, 0x03, 0x00, 0x00, 0x00}, 3 - }; - sendDiseqcCommand(&cmd, 100); -#endif } void CFrontend::sendDiseqcReset(void) { printf("[fe%d] diseqc reset\n", fenumber); +#if 0 /* Reset && Clear Reset */ sendDiseqcZeroByteCommand(0xe0, 0x10, 0x00); sendDiseqcZeroByteCommand(0xe0, 0x10, 0x01); - //sendDiseqcZeroByteCommand(0xe0, 0x00, 0x00); // enigma +#else + sendDiseqcZeroByteCommand(0xe0, 0x00, 0x00); // enigma +#endif } void CFrontend::sendDiseqcStandby(void) @@ -1493,7 +1382,6 @@ int CFrontend::driveToSatellitePosition(t_satellite_position satellitePosition, //if(config.diseqcType == DISEQC_ADVANCED) //FIXME testing { - //printf("[fe%d] SatellitePosition %d -> %d\n", fenumber, rotorSatellitePosition, satellitePosition); bool moved = false; sat_iterator_t sit = satellites.find(satellitePosition); @@ -1508,7 +1396,6 @@ int CFrontend::driveToSatellitePosition(t_satellite_position satellitePosition, if (sit != satellites.end()) old_position = sit->second.motor_position; - //printf("[fe%d] motorPosition %d -> %d usals %s\n", fenumber, old_position, new_position, use_usals ? "on" : "off"); printf("[fe%d] sat pos %d -> %d motor pos %d -> %d usals %s\n", fenumber, rotorSatellitePosition, satellitePosition, old_position, new_position, use_usals ? "on" : "off"); if (rotorSatellitePosition == satellitePosition) diff --git a/src/zapit/src/getservices.cpp b/src/zapit/src/getservices.cpp index e9c6cfe12..035c7a9e4 100644 --- a/src/zapit/src/getservices.cpp +++ b/src/zapit/src/getservices.cpp @@ -82,7 +82,8 @@ bool CServiceManager::ParseScanXml(void) } return (scanInputParser != NULL); } - +#if 0 +//never used xmlDocPtr CServiceManager::ScanXml() { if(!scanInputParser) @@ -90,7 +91,7 @@ xmlDocPtr CServiceManager::ScanXml() return scanInputParser; } - +#endif bool CServiceManager::AddChannel(CZapitChannel * &channel) { channel_insert_res_t ret = allchans.insert ( @@ -163,12 +164,13 @@ void CServiceManager::RemoveAllChannels() { allchans.clear(); } - +#if 0 +//never used void CServiceManager::RemoveNVODChannels() { nvodchannels.clear(); } - +#endif void CServiceManager::RemoveCurrentChannels() { curchans.clear(); @@ -579,10 +581,10 @@ int CServiceManager::LoadMotorPositions(void) return 0; } - +#if 0 +//never used void CServiceManager::SaveMotorPositions() { -#if 0 FILE * fd; sat_iterator_t sit; printf("[getservices] saving motor positions...\n"); @@ -601,9 +603,8 @@ void CServiceManager::SaveMotorPositions() } fdatasync(fileno(fd)); fclose(fd); -#endif } - +#endif bool CServiceManager::InitSatPosition(t_satellite_position position, char * name, bool force) { if(force || (satellitePositions.find(position) == satellitePositions.end())) { @@ -623,6 +624,7 @@ bool CServiceManager::InitSatPosition(t_satellite_position position, char * name satellitePositions[position].unicable_qrg = 0; satellitePositions[position].unicable_lnb = 0; satellitePositions[position].configured = 0; + satellitePositions[position].cable_nid = 0; if(name) satellitePositions[position].name = name; return true; @@ -668,6 +670,7 @@ bool CServiceManager::LoadServices(bool only_current) !strcmp(xmlGetName(search), "terrestrial")) { char * name = xmlGetAttribute(search, "name"); InitSatPosition(position, name); + satellitePositions[position].cable_nid = xmlGetNumericAttribute(search, "nid", 0); } ParseSatTransponders(frontendType, search, position); position++; @@ -1075,7 +1078,8 @@ bool CServiceManager::ReplaceProviderName(std::string &name, t_transport_stream_ } return false; } - +#if 0 +//never used int CServiceManager::GetFreeNumber(bool radio) { service_number_map_t * channel_numbers = radio ? &radio_numbers : &tv_numbers; @@ -1089,7 +1093,7 @@ int CServiceManager::GetFreeNumber(bool radio) } } } - +#endif int CServiceManager::GetMaxNumber(bool radio) { service_number_map_t * channel_numbers = radio ? &radio_numbers : &tv_numbers; @@ -1101,7 +1105,8 @@ int CServiceManager::GetMaxNumber(bool radio) } return i+1; } - +#if 0 +//never used void CServiceManager::FreeNumber(int number, bool radio) { service_number_map_t * channel_numbers = radio ? &radio_numbers : &tv_numbers; @@ -1113,7 +1118,7 @@ void CServiceManager::UseNumber(int number, bool radio) service_number_map_t * channel_numbers = radio ? &radio_numbers : &tv_numbers; channel_numbers->insert(number); } - +#endif bool CServiceManager::GetTransponder(transponder_id_t tid, transponder &t) { stiterator tI = transponders.find(tid); diff --git a/src/zapit/src/scan.cpp b/src/zapit/src/scan.cpp index f82d2dcf9..f96b22cb1 100644 --- a/src/zapit/src/scan.cpp +++ b/src/zapit/src/scan.cpp @@ -335,7 +335,7 @@ _repeat: if((flags & SCAN_NIT) && AddFromNit()) goto _repeat; - if (flags & (SCAN_NIT/*|SCAN_LOGICAL_NUMBERS*/) && !nit_logical_map.empty()) { + if ((flags & SCAN_LOGICAL_NUMBERS /*(SCAN_NIT|SCAN_LOGICAL_NUMBERS)*/) && !nit_logical_map.empty()) { std::string pname = networkName; INFO("network [%s] %d logical channels (%d hd)\n", pname.c_str(), nit_logical_map.size(), nit_hd_logical_map.size()); g_bouquetManager->loadBouquets(true); @@ -347,13 +347,15 @@ _repeat: else bouquet = g_bouquetManager->Bouquets[bouquetId]; - for(channel_number_map_t::iterator cit = nit_hd_logical_map.begin(); cit != nit_hd_logical_map.end(); ++cit) { - //nit_logical_map.erase(cit->first); - CZapitChannel * channel = CServiceManager::getInstance()->FindChannel48(cit->first); - if (channel) { - channel->number = cit->second; - if (!bouquet->getChannelByChannelID(channel->getChannelID())) - bouquet->addService(channel); + if (flags & SCAN_LOGICAL_HD) { + for(channel_number_map_t::iterator cit = nit_hd_logical_map.begin(); cit != nit_hd_logical_map.end(); ++cit) { + //nit_logical_map.erase(cit->first); + CZapitChannel * channel = CServiceManager::getInstance()->FindChannel48(cit->first); + if (channel) { + channel->number = cit->second; + if (!bouquet->getChannelByChannelID(channel->getChannelID())) + bouquet->addService(channel); + } } } for(channel_number_map_t::iterator cit = nit_logical_map.begin(); cit != nit_logical_map.end(); ++cit) { @@ -637,7 +639,8 @@ bool CServiceScan::ScanTransponder() return (found_channels != 0); } - +#if 0 +//never used bool CServiceScan::ReplaceTransponderParams(freq_id_t freq, t_satellite_position satellitePosition, struct dvb_frontend_parameters * feparams, uint8_t polarization) { bool ret = false; @@ -655,7 +658,7 @@ bool CServiceScan::ReplaceTransponderParams(freq_id_t freq, t_satellite_position } return ret; } - +#endif void CServiceScan::SendTransponderInfo(transponder &t) { uint32_t actual_freq = t.feparams.dvb_feparams.frequency; diff --git a/src/zapit/src/scannit.cpp b/src/zapit/src/scannit.cpp index 762960867..756750c84 100644 --- a/src/zapit/src/scannit.cpp +++ b/src/zapit/src/scannit.cpp @@ -293,12 +293,17 @@ bool CNit::ParseSatelliteDescriptor(SatelliteDeliverySystemDescriptor * sd, Tran newSat += ((sd->getOrbitalPosition() >> 8) & 0xF) * 100; newSat += ((sd->getOrbitalPosition() >> 4) & 0xF) * 10; newSat += ((sd->getOrbitalPosition()) & 0xF); - if (newSat && (!sd->getWestEastFlag())) + + if (newSat > 1800) newSat = 3600 - newSat; + if (!sd->getWestEastFlag()) + newSat = -newSat; + if (abs(newSat - satellitePosition) < 5) + newSat = satellitePosition; if(satellitePosition != newSat) { - printf("NIT: different satellite position: our %d nit %d\n", - satellitePosition, sd->getOrbitalPosition()); + printf("NIT: different satellite position: our %d nit %d (%X)\n", + satellitePosition, newSat, sd->getOrbitalPosition()); return false; } @@ -320,7 +325,7 @@ bool CNit::ParseSatelliteDescriptor(SatelliteDeliverySystemDescriptor * sd, Tran break; default: #ifdef DEBUG_NIT - printf("NIT: undefined modulation system %08x\n", modulation_system; + printf("NIT: undefined modulation system %08x\n", modulation_system); #endif feparams.delsys = SYS_UNDEFINED; break; diff --git a/src/zapit/src/transponder.cpp b/src/zapit/src/transponder.cpp index 147b327b8..1eebbcfcf 100644 --- a/src/zapit/src/transponder.cpp +++ b/src/zapit/src/transponder.cpp @@ -149,13 +149,14 @@ void transponder::dump(std::string label) transponder_id, dvb_feparams->frequency, dvb_feparams->u.ofdm.bandwidth, dvb_feparams->u.ofdm.code_rate_HP); } - +#if 0 +//never used void transponder::ddump(std::string label) { if (zapit_debug) dump(label); } - +#endif char transponder::pol(unsigned char p) { if (p == 0) diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index ec6b78a26..c0b48dc67 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -70,8 +70,8 @@ #endif #include -#include "libdvbsub/dvbsub.h" -#include "libtuxtxt/teletext.h" +#include +#include /* globals */ int sig_delay = 2; // seconds between signal check @@ -110,8 +110,7 @@ CZapit::CZapit() { started = false; pmt_update_fd = -1; - volume_left = 0, volume_right = 0; - def_volume_left = 0, def_volume_right = 0; + //volume_left = 0, volume_right = 0; audio_mode = 0; aspectratio=0; mode43=0; @@ -123,6 +122,8 @@ CZapit::CZapit() playing = false; list_changed = false; // flag to indicate, allchans was changed currentMode = 0; + current_volume = 100; + volume_percent = 0; } CZapit::~CZapit() @@ -239,6 +240,38 @@ void CZapit::SaveAudioMap() fclose(audio_config_file); } +void CZapit::LoadVolumeMap() +{ + vol_map.clear(); + FILE *volume_config_file = fopen(VOLUME_CONFIG_FILE, "r"); + if (!volume_config_file) { + perror(VOLUME_CONFIG_FILE); + return; + } + t_channel_id chan; + int apid = 0; + int volume = 0; + char s[1000]; + while (fgets(s, 1000, volume_config_file)) { + if (sscanf(s, "%llx %d %d", &chan, &apid, &volume) == 3) + vol_map.insert(volume_pair_t(chan, pid_pair_t(apid, volume))); + } + fclose(volume_config_file); +} + +void CZapit::SaveVolumeMap() +{ + FILE *volume_config_file = fopen(VOLUME_CONFIG_FILE, "w"); + if (!volume_config_file) { + perror(VOLUME_CONFIG_FILE); + return; + } + for (volume_map_iterator_t it = vol_map.begin(); it != vol_map.end(); ++it) + fprintf(volume_config_file, "%llx %d %d\n", (uint64_t) it->first, it->second.first, it->second.second); + + fdatasync(fileno(volume_config_file)); + fclose(volume_config_file); +} void CZapit::LoadSettings() { @@ -282,6 +315,7 @@ void CZapit::LoadSettings() /**/ LoadAudioMap(); + LoadVolumeMap(); } void CZapit::ConfigFrontend() @@ -313,9 +347,6 @@ void CZapit::SendPMT(bool forupdate) return; CCamManager::getInstance()->Start(current_channel->getChannelID(), CCamManager::PLAY, forupdate); - int len; - unsigned char * pmt = current_channel->getRawPmt(len); - ca->SendPMT(DEMUX_SOURCE_0, pmt, len); } void CZapit::SaveChannelPids(CZapitChannel* channel) @@ -323,10 +354,10 @@ void CZapit::SaveChannelPids(CZapitChannel* channel) if(channel == NULL) return; - printf("[zapit] saving channel, apid %x sub pid %x mode %d volume %d\n", channel->getAudioPid(), dvbsub_getpid(), audio_mode, volume_right); + printf("[zapit] saving channel, apid %x sub pid %x mode %d volume %d\n", channel->getAudioPid(), dvbsub_getpid(), audio_mode, current_volume); audio_map[channel->getChannelID()].apid = channel->getAudioPid(); audio_map[channel->getChannelID()].mode = audio_mode; - audio_map[channel->getChannelID()].volume = audioDecoder->getVolume(); + audio_map[channel->getChannelID()].volume = current_volume; audio_map[channel->getChannelID()].subpid = dvbsub_getpid(); tuxtx_subtitle_running(&audio_map[channel->getChannelID()].ttxpid, &audio_map[channel->getChannelID()].ttxpage, NULL); } @@ -343,19 +374,9 @@ void CZapit::RestoreChannelPids(CZapitChannel * channel) if (channel->getAudioChannel(i)->pid == pidmap->apid ) { DBG("***** Setting audio!\n"); channel->setAudioChannel(i); -#if 0 - if(we_playing && (channel->getAudioChannel(i)->audioChannelType != CZapitAudioChannel::MPEG)) - ChangeAudioPid(i); -#endif } } } -#if 0 // to restore saved volume per channel if needed. after first zap its done by neutrino - if(firstzap) { - audioDecoder->setVolume(audio_map_it->second.volume, audio_map_it->second.volume); - } -#endif - volume_left = volume_right = pidmap->volume; audio_mode = pidmap->mode; dvbsub_setpid(pidmap->subpid); @@ -373,12 +394,10 @@ void CZapit::RestoreChannelPids(CZapitChannel * channel) else tuxtx_set_pid(pidmap->ttxpid, pidmap->ttxpage, (char *) tmplang.c_str()); } else { - volume_left = volume_right = def_volume_left; audio_mode = def_audio_mode; tuxtx_set_pid(0, 0, (char *) channel->getTeletextLang()); } /* restore saved stereo / left / right channel mode */ - //audioDecoder->setVolume(volume_left, volume_right); audioDecoder->setChannel(audio_mode); } @@ -393,43 +412,28 @@ audio_map_set_t * CZapit::GetSavedPids(const t_channel_id channel_id) bool CZapit::TuneChannel(CFrontend * frontend, CZapitChannel * channel, bool &transponder_change) { - //CFrontend * frontend = CFEManager::getInstance()->allocateFE(channel); - if(frontend == NULL) { - ERROR("Cannot get frontend\n"); - return false; - } - transponder_change = false; -#if 0 - if (!(currentMode & RECORD_MODE)) -#endif - { - transponder_change = frontend->setInput(channel, current_is_nvod); - if(transponder_change && !current_is_nvod) { - int waitForMotor = frontend->driveToSatellitePosition(channel->getSatellitePosition()); - if(waitForMotor > 0) { - printf("[zapit] waiting %d seconds for motor to turn satellite dish.\n", waitForMotor); - SendEvent(CZapitClient::EVT_ZAP_MOTOR, &waitForMotor, sizeof(waitForMotor)); - for(int i = 0; i < waitForMotor; i++) { - sleep(1); - if(abort_zapit) { - abort_zapit = 0; - return false; - } + transponder_change = frontend->setInput(channel, current_is_nvod); + if(transponder_change && !current_is_nvod) { + int waitForMotor = frontend->driveToSatellitePosition(channel->getSatellitePosition()); + if(waitForMotor > 0) { + printf("[zapit] waiting %d seconds for motor to turn satellite dish.\n", waitForMotor); + SendEvent(CZapitClient::EVT_ZAP_MOTOR, &waitForMotor, sizeof(waitForMotor)); + for(int i = 0; i < waitForMotor; i++) { + sleep(1); + if(abort_zapit) { + abort_zapit = 0; + return false; } } } + } - /* if channel's transponder does not match frontend's tuned transponder ... */ - if (transponder_change /* || current_is_nvod*/) { - if (frontend->tuneChannel(channel, current_is_nvod) == false) { - return false; - } + /* if channel's transponder does not match frontend's tuned transponder ... */ + if (transponder_change /* || current_is_nvod*/) { + if (frontend->tuneChannel(channel, current_is_nvod) == false) { + return false; } - } -#if 0 - else if(!SAME_TRANSPONDER(channel->getChannelID(), live_channel_id)) - return false; -#endif + } return true; } @@ -457,15 +461,13 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay bool failed = false; CZapitChannel* newchannel; - DBG("[zapit] zapto channel id %llx diseqcType %d\n", channel_id, diseqcType); - abort_zapit = 0; if((newchannel = CServiceManager::getInstance()->FindChannel(channel_id, ¤t_is_nvod)) == NULL) { - DBG("channel_id " PRINTF_CHANNEL_ID_TYPE " not found", channel_id); + INFO("channel_id " PRINTF_CHANNEL_ID_TYPE " not found", channel_id); return false; } - printf("[zapit] zap to %s (%llx tp %llx)\n", newchannel->getName().c_str(), newchannel->getChannelID(), newchannel->getTransponderId()); + INFO("[zapit] zap to %s (%llx tp %llx)", newchannel->getName().c_str(), newchannel->getChannelID(), newchannel->getTransponderId()); CFrontend * fe = CFEManager::getInstance()->allocateFE(newchannel); if(fe == NULL) { @@ -484,7 +486,6 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay pmt_stop_update_filter(&pmt_update_fd); - ca->SendPMT(0, (unsigned char*) "", 0, CA_SLOT_TYPE_CI); StopPlayBack(!forupdate); if(!forupdate && current_channel) @@ -600,6 +601,85 @@ bool CZapit::ZapForRecord(const t_channel_id channel_id) return true; } +/* set channel/pid volume percent, using current channel_id and pid, if those params is 0 */ +void CZapit::SetPidVolume(t_channel_id channel_id, int pid, int percent) +{ + if (!channel_id) + channel_id = live_channel_id; + + if (!pid && (channel_id == live_channel_id) && current_channel) + pid = current_channel->getAudioPid(); + +INFO("############################### channel %llx pid %x map size %d percent %d", channel_id, pid, vol_map.size(), percent); + volume_map_range_t pids = vol_map.equal_range(channel_id); + for (volume_map_iterator_t it = pids.first; it != pids.second; ++it) { + if (it->second.first == pid) { + it->second.second = percent; + return; + } + } + vol_map.insert(volume_pair_t(channel_id, pid_pair_t(pid, percent))); +} + +/* return channel/pid volume percent, using current channel_id and pid, if those params is 0 */ +int CZapit::GetPidVolume(t_channel_id channel_id, int pid, bool ac3) +{ + int percent = -1; + + if (!channel_id) + channel_id = live_channel_id; + + if (!pid && (channel_id == live_channel_id) && current_channel) + pid = current_channel->getAudioPid(); + + volume_map_range_t pids = vol_map.equal_range(channel_id); + for (volume_map_iterator_t it = pids.first; it != pids.second; ++it) { + if (it->second.first == pid) { + percent = it->second.second; + break; + } + } + if (percent < 0) { + percent = ac3 ? VOLUME_PERCENT_AC3 : VOLUME_PERCENT_PCM; + if ((channel_id == live_channel_id) && current_channel) { + for (int i = 0; i < current_channel->getAudioChannelCount(); i++) { + if (pid == current_channel->getAudioPid(i)) { + percent = current_channel->getAudioChannel(i)->audioChannelType == CZapitAudioChannel::AC3 ? + VOLUME_PERCENT_AC3 : VOLUME_PERCENT_PCM; + break; + } + } + } + } + DBG("channel %llx pid %x map size %d percent %d", channel_id, pid, vol_map.size(), percent); + return percent; +} + +void CZapit::SetVolume(int vol) +{ + current_volume = vol; + if (current_volume < 0) + current_volume = 0; + if (current_volume > 100) + current_volume = 100; + + int value = (current_volume * volume_percent) / 100; + DBG("volume %d percent %d -> %d", current_volume, volume_percent, value); + audioDecoder->setVolume(value, value); + //volume_left = volume_right = current_volume; +} + +int CZapit::SetVolumePercent(int percent) +{ + int ret = volume_percent; + + if (volume_percent != percent) { + volume_percent = percent; + SetVolume(current_volume); + } + return ret; +} + void CZapit::SetAudioStreamType(CZapitAudioChannel::ZapitAudioChannelType audioChannelType) { const char *audioStr = "UNKNOWN"; @@ -629,6 +709,10 @@ void CZapit::SetAudioStreamType(CZapitAudioChannel::ZapitAudioChannelType audioC break; } + /* FIXME: bigger percent for AC3 only, what about AAC etc ? */ + int newpercent = GetPidVolume(0, 0, audioChannelType == CZapitAudioChannel::AC3); + SetVolumePercent(newpercent); + printf("[zapit] starting %s audio\n", audioStr); } @@ -708,11 +792,6 @@ void CZapit::SetRecordMode(bool enable) event = CZapitClient::EVT_RECORDMODE_ACTIVATED; } else { currentMode &= ~RECORD_MODE; - - int demux = 2; - if(current_channel) - demux = current_channel->getRecordDemux(); - ca->SendPMT(demux /*DEMUX_SOURCE_2*/, (unsigned char*) "", 0, CA_SLOT_TYPE_SMARTCARD); event = CZapitClient::EVT_RECORDMODE_DEACTIVATED; } SendEvent(event); @@ -966,7 +1045,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) CZapitChannel * channel = (requested_channel_id == 0) ? current_channel : CServiceManager::getInstance()->FindChannel(requested_channel_id); if(channel) { - strncpy(response.name, channel->getName().c_str(), CHANNEL_NAME_SIZE); + strncpy(response.name, channel->getName().c_str(), CHANNEL_NAME_SIZE-1); response.name[CHANNEL_NAME_SIZE-1] = 0; } CBasicServer::send_data(connfd, &response, sizeof(response)); @@ -1108,7 +1187,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) satellite_map_t satmap = CServiceManager::getInstance()->SatelliteList(); for(sat_iterator_t sit = satmap.begin(); sit != satmap.end(); sit++) { - strncpy(sat.satName, sit->second.name.c_str(), 50); + strncpy(sat.satName, sit->second.name.c_str(), 49); sat.satName[49] = 0; sat.satPosition = sit->first; sat.motorPosition = sit->second.motor_position; @@ -1545,15 +1624,21 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) case CZapitMessages::CMD_SET_VOLUME: { CZapitMessages::commandVolume msgVolume; CBasicServer::receive_data(connfd, &msgVolume, sizeof(msgVolume)); +#if 0 audioDecoder->setVolume(msgVolume.left, msgVolume.right); volume_left = msgVolume.left; volume_right = msgVolume.right; +#endif + SetVolume(msgVolume.left); break; } case CZapitMessages::CMD_GET_VOLUME: { CZapitMessages::commandVolume msgVolume; +#if 0 msgVolume.left = volume_left; msgVolume.right = volume_right; +#endif + msgVolume.left = msgVolume.right = current_volume; CBasicServer::send_data(connfd, &msgVolume, sizeof(msgVolume)); break; } @@ -1635,7 +1720,7 @@ void CZapit::sendAPIDs(int connfd) for (uint32_t i = 0; i < current_channel->getAudioChannelCount(); i++) { CZapitClient::responseGetAPIDs response; response.pid = current_channel->getAudioPid(i); - strncpy(response.desc, current_channel->getAudioChannel(i)->description.c_str(), DESC_MAX_LEN); + strncpy(response.desc, current_channel->getAudioChannel(i)->description.c_str(), DESC_MAX_LEN-1); response.is_ac3 = response.is_aac = 0; if (current_channel->getAudioChannel(i)->audioChannelType == CZapitAudioChannel::AC3) { response.is_ac3 = 1; @@ -1671,7 +1756,7 @@ void CZapit::internalSendChannels(int connfd, ZapitChannelList* channels, const } } else { CZapitClient::responseGetBouquetChannels response; - strncpy(response.name, ((*channels)[i]->getName()).c_str(), CHANNEL_NAME_SIZE); + strncpy(response.name, ((*channels)[i]->getName()).c_str(), CHANNEL_NAME_SIZE-1); response.name[CHANNEL_NAME_SIZE-1] = 0; //printf("internalSendChannels: name %s\n", response.name); response.satellitePosition = (*channels)[i]->getSatellitePosition(); @@ -1714,7 +1799,7 @@ void CZapit::sendBouquets(int connfd, const bool emptyBouquetsToo, CZapitClient: ((curMode & TV_MODE) && !g_bouquetManager->Bouquets[i]->tvChannels.empty())))) { msgBouquet.bouquet_nr = i; - strncpy(msgBouquet.name, g_bouquetManager->Bouquets[i]->Name.c_str(), 30); + strncpy(msgBouquet.name, g_bouquetManager->Bouquets[i]->Name.c_str(), 29); msgBouquet.name[29] = 0; msgBouquet.locked = g_bouquetManager->Bouquets[i]->bLocked; msgBouquet.hidden = g_bouquetManager->Bouquets[i]->bHidden; @@ -1880,17 +1965,9 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel) bool CZapit::StopPlayBack(bool send_pmt) { -#if 1 - if(send_pmt) { + if(send_pmt) CCamManager::getInstance()->Stop(live_channel_id, CCamManager::PLAY); - ca->SendPMT(0, (unsigned char*) "", 0, CA_SLOT_TYPE_SMARTCARD); - } -#endif -#if 0 - if (send_pmt && !(currentMode & RECORD_MODE)) - ca->SendPMT(0, (unsigned char*) "", 0, CA_SLOT_TYPE_SMARTCARD); - CCamManager::getInstance()->Stop(live_channel_id, CCamManager::PLAY); -#endif + INFO("standby %d playing %d forced %d", standby, playing, playbackStopForced); if (!playing) @@ -1923,6 +2000,9 @@ bool CZapit::StopPlayBack(bool send_pmt) else dvbsub_stop(); + /* reset volume percent to 100% i.e. for media playback, should be safe + * because StartPlayBack will use defaults or saved value */ + SetVolumePercent(100); return true; } @@ -1936,6 +2016,7 @@ void CZapit::enterStandby(void) SaveSettings(true); SaveAudioMap(); + SaveVolumeMap(); StopPlayBack(true); if(!(currentMode & RECORD_MODE)) { @@ -2027,6 +2108,7 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg) live_fe = CFEManager::getInstance()->getFE(0); /* load configuration or set defaults if no configuration file exists */ video_mode = ZapStart_arg->video_mode; + current_volume = ZapStart_arg->volume; videoDemux = new cDemux(); videoDemux->Open(DMX_VIDEO_CHANNEL); @@ -2043,6 +2125,8 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg) audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/); videoDecoder->SetAudioHandle(audioDecoder->GetHandle()); + /* set initial volume with 100% */ + SetVolumePercent(100); #ifdef USE_VBI videoDecoder->OpenVBI(1); #endif @@ -2133,10 +2217,6 @@ static bool zapit_parse_command(CBasicMessage::Header &rmsg, int connfd) void CZapit::run() { -#if 0 - time_t stime = time(0); - time_t curtime; -#endif #if HAVE_SPARK_HARDWARE bool v_stopped = false; #endif @@ -2214,14 +2294,15 @@ void CZapit::run() /* yuck, don't waste that much cpu time :) */ usleep(0); #if 0 - if(!standby && !CServiceScan::getInstance()->Scanning() &¤t_channel) { - curtime = time(0); + static time_t stime = time(0); + if(!standby && !CServiceScan::getInstance()->Scanning() && current_channel) { + time_t curtime = time(0); + //FIXME check if sig_delay needed */ if(sig_delay && (curtime - stime) > sig_delay) { stime = curtime; - uint16_t sig = live_fe->getSignalStrength(); - //if(sig < 8000) - if(sig < 28000) { - printf("[monitor] signal %d, trying to re-tune...\n", sig); + fe_status_t status = live_fe->getStatus(); + printf("[zapit] frontend status %d\n", status); + if (status != FE_HAS_LOCK) { live_fe->retuneChannel(); } } @@ -2232,6 +2313,7 @@ void CZapit::run() SaveChannelPids(current_channel); SaveSettings(true); SaveAudioMap(); + SaveVolumeMap(); StopPlayBack(true); CFEManager::getInstance()->saveSettings(true); @@ -2277,13 +2359,14 @@ void CZapit::SetConfig(Zapit_config * Cfg) SaveSettings(true); ConfigFrontend(); } - +#if 0 +//never used void CZapit::SendConfig(int connfd) { printf("[zapit] %s...\n", __FUNCTION__); CBasicServer::send_data(connfd, &config, sizeof(config)); } - +#endif void CZapit::GetConfig(Zapit_config &Cfg) { printf("[zapit] %s...\n", __FUNCTION__);