diff --git a/cross-configure.cool b/cross-configure.cool index e8117eb56..b35b48763 100755 --- a/cross-configure.cool +++ b/cross-configure.cool @@ -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 @@ -12,11 +12,11 @@ export RANLIB=$CCPATH$HOST-ranlib export OBJDUMP=$CCPATH$HOST-objdump export STRIP=$CCPATH$HOST-strip -export CFLAGS="-Wall -Werror -g0 -O2 \ +export CFLAGS="-Wall -Werror -g0 -O2 -fno-strict-aliasing \ -D__KERNEL_STRICT_NAMES -DUSE_NEVIS_GXA \ -I"$PWD"/include -I"$PWD"/include/linux/dvb -I"$PREFIX"/include/freetype2" -export CXXFLAGS="-Wall -Werror -g0 -O2 \ +export CXXFLAGS="-Wall -Werror -g0 -O2 -fno-strict-aliasing \ -D__KERNEL_STRICT_NAMES -DUSE_NEVIS_GXA \ -I"$PWD"/include -I"$PWD"/include/linux/dvb -I"$PREFIX"/include/freetype2" diff --git a/cross-configure.cool.debug b/cross-configure.cool.debug index 6ce9ebed1..4ae70b853 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 diff --git a/data/cables.xml b/data/cables.xml index 05d8e39a2..b0b9f8965 100644 --- a/data/cables.xml +++ b/data/cables.xml @@ -35,6 +35,7 @@ + @@ -1353,4 +1354,7 @@ + + + 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/shutdown.jpg b/data/icons/shutdown.jpg index 4831422df..4c0c0bbf9 100644 Binary files a/data/icons/shutdown.jpg and b/data/icons/shutdown.jpg 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/start.jpg b/data/icons/start.jpg index b5ebeff90..a980916e7 100644 Binary files a/data/icons/start.jpg and b/data/icons/start.jpg 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 8d243e510..d09ead308 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,7 +123,7 @@ 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_step Lautstärke Schrittweite audioplayer.add Hinzufügen @@ -246,7 +246,7 @@ colorchooser.red rot colormenu.background Hintergrundfarbe colormenu.contrast_fonts Schriftkontrast colormenu.fade Menüs faden -colormenu.font Neutrino Schriftart +colormenu.font Neutrino-HD Schriftart colormenu.font_ttx Teletext Schriftart colormenu.hd_preset LCD colormenu.menucolors Menüfarben @@ -259,7 +259,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 @@ -299,6 +299,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 @@ -355,7 +356,7 @@ extra.key_timeshift Timeshift extra.key_unlock Entsperrtaste extra.ladirection Breitengrad-Ausrichtung extra.latitude Breitengrad -extra.loadconfig Neutrino-Einstellungen: Laden von +extra.loadconfig Neutrino-HD Einstellungen: Laden von extra.loadkeys Lade Tastenbelegung von extra.lodirection Längengrad-Ausrichtung extra.longitude Längengrad @@ -366,7 +367,7 @@ extra.rotor_swap Rotor dreht Ost/West extra.rounded_corners Eckendarstellung extra.rounded_corners_off eckig extra.rounded_corners_on abgerundet -extra.saveconfig Neutrino-Einstellungen: Sichern als +extra.saveconfig Neutrino-HD Einstellungen: Sichern als extra.savekeys Speichere Tastenbelegung als extra.scrambled_message Verschlüsselung melden extra.show_mute_icon Mute-Icon bei Lautstärke 0 @@ -389,8 +390,9 @@ extra.tp_pol_h H extra.tp_pol_l L extra.tp_pol_r R extra.tp_rate Symbolrate -extra.update_dir Update-Verzeichnis +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 +436,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 neuer Version suchen +flashupdate.checkupdate_internet Online nach Updates suchen +flashupdate.checkupdate_local Lokales Update flashupdate.currentversion_sep Installierte Version flashupdate.currentversiondate Datum flashupdate.currentversiontime Uhrzeit @@ -475,13 +478,14 @@ flashupdate.ready fertig flashupdate.reallyflashmtd Wollen Sie den Flashvorgang wirklich durchführen?\n\nFalls ein Fehler auftritt oder das Image nicht\nfunktionfähig ist, wird Ihre Box nicht mehr booten.\n\nImagename: %s\nZiel: %s flashupdate.savesuccess Das Image wurde erfolgreich unter dem\nDateinamen %s gespeichert. flashupdate.selectimage Verfügbare Images/Files +flashupdate.settings Update-Einstellungen flashupdate.squashfs.noversion Bei Updates werden Versionsüberprüfungen derzeit nur über Web-Updates unterstützt.\nWollen Sie das ausgewählte Image wirklich installieren? flashupdate.titlereadflash Flash auslesen flashupdate.titlewriteflash Flash schreiben flashupdate.updatemode Updatemodus flashupdate.updatemode_internet Internet -flashupdate.updatemode_manual manuell (ftp) -flashupdate.url_file Konfigfile +flashupdate.updatemode_manual von lokalem Update-Verzeichnis +flashupdate.url_file Internet Konfigurations-Datei flashupdate.versioncheck Versionsüberprüfung flashupdate.writeflash ganzes Flashimage einspielen flashupdate.writeflashmtd einzelne Partition einspielen @@ -520,10 +524,9 @@ 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 -gtxalpha.alpha1 Alpha 1 -gtxalpha.alpha2 Alpha 2 hdd_10min 10 min. hdd_1min 1 min. hdd_20min 20 min. @@ -606,7 +609,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. @@ -634,7 +637,6 @@ lcd_info_line_clock Uhrzeit lcdcontroler.brightness normale lcdcontroler.brightnessdeepstandby Deep-Standby lcdcontroler.brightnessstandby Standby -lcdcontroler.contrast Kontrast lcdmenu.dim_brightness nach Dimm-Timeout lcdmenu.dim_time Dimm-Timeout lcdmenu.head VFD Einstellungen @@ -689,6 +691,376 @@ 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_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 @@ -738,6 +1110,7 @@ miscsettings.infobar_disp_log Logo miscsettings.infobar_logo_hdd_dir Logo Verz. miscsettings.infobar_sat_display Kabel-/Satellitenanbieter miscsettings.infobar_show Info bei EPG Änderungen +miscsettings.infobar_show_dd_available DD-Verfügbarkeit anzeigen miscsettings.infobar_show_res Auflösung anzeigen miscsettings.infobar_show_res_simple einfach miscsettings.infobar_show_sysfs_hdd Füllstandanzeige (sysFS & hdd) @@ -950,15 +1323,16 @@ networkmenu.ntpserver NTP-URL (Zeitserver) networkmenu.ntpserver_hint1 NTP-URL 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... +neutrino_starting Neutrino-HD wird gestartet... nfs.alreadymounted Verzeichnis bereits gemountet. nfs.automount Beim Start mounten nfs.dir Verzeichnis/Freigabe @@ -1040,7 +1414,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 @@ -1088,9 +1462,9 @@ rclock.lockmsg Die Fernbedienung der Coolstream wird gesperrt.\n Um die Sperre a 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. @@ -1111,7 +1485,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 @@ -1126,6 +1500,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 @@ -1153,10 +1528,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 @@ -1227,17 +1603,18 @@ servicemenu.head Service servicemenu.imageinfo Imageinfo servicemenu.reload Kanallisten neu laden servicemenu.reload_hint Kanallisten werden neu geladen,\nbitte warten... -servicemenu.restart Neutrino neu starten -servicemenu.restart_hint Neutrino wird neu gestartet... +servicemenu.restart Neutrino-HD neu starten +servicemenu.restart_hint Neutrino-HD wird neu gestartet... servicemenu.restart_refused_recording Aufnahme läuft. Neustart nicht möglich. servicemenu.scants Kanalsuche 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. +settings.missingoptionsconffile Die Neutrino-HD Einstellungen wurden erweitert.\nDie neuen Werte werden auf Standard gesetzt. +settings.noconffile Die Neutrino-HD Einstellungen wurden nicht\ngefunden. Es werden Standardwerte benutzt. settings.pos_bottom_left unten links settings.pos_bottom_right unten rechts settings.pos_default_center oben Mitte @@ -1265,7 +1642,7 @@ streaminfo.head Tech. Information streaminfo.not_available nicht verfügbar 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.busy Ein oder mehrere Aufnahmeprozesse sind aktiv.\nSollte die Aufnahme eigentlich beendet sein,\nschafft ein Neustart von Neutrino-HD Abhilfe. streaming.dir_not_writable Das Aufnahmeverzeichnis ist nicht beschreibbar.\nAufnahmen sind daher nicht möglich. streaming.write_error Die Aufnahme wurde leider abgebrochen,\nda ein Fehler beim Schreiben der Daten auftrat. stringinput.caps Groß-/Kleinbuchstaben @@ -1386,7 +1763,6 @@ videomenu.auto Automatisch videomenu.brightness Helligkeit videomenu.cinch Cinch videomenu.contrast Kontrast -videomenu.csync Sync.-Korrektur videomenu.dbdr MPEG2 Filter videomenu.dbdr_both deBlock & deRing videomenu.dbdr_deblock deBlock @@ -1418,7 +1794,7 @@ videomenu.videoformat_169 16:9 videomenu.videoformat_43 4:3 videomenu.videomode Videosystem 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 1ea978765..10e8c4549 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -299,6 +299,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 @@ -355,7 +356,7 @@ extra.key_timeshift Timeshift extra.key_unlock Unlock key extra.ladirection LaDirection extra.latitude Latitude -extra.loadconfig Neutrino-Settings: Load from +extra.loadconfig Neutrino-HD Settings: Load from extra.loadkeys Load keys from extra.lodirection LoDirection extra.longitude Longitude @@ -366,7 +367,7 @@ extra.rotor_swap Swap rotor east/west extra.rounded_corners Shape of corners extra.rounded_corners_off angular extra.rounded_corners_on rounded -extra.saveconfig Neutrino-Settings: Save as +extra.saveconfig Neutrino-HD Settings: Save as extra.savekeys Save keys as extra.scrambled_message Scrambled Message extra.show_mute_icon mute-icon at volume 0 @@ -389,8 +390,9 @@ extra.tp_pol_h H extra.tp_pol_l L extra.tp_pol_r R extra.tp_rate Symbol rate -extra.update_dir Directory for updates +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 +436,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 search for new version +flashupdate.checkupdate_internet Check for online updates +flashupdate.checkupdate_local Local update flashupdate.currentversion_sep Current version flashupdate.currentversiondate Date flashupdate.currentversiontime Time @@ -475,12 +478,13 @@ flashupdate.ready ready flashupdate.reallyflashmtd Do you really want to flash?\n\nIf a error occurs or the image is not\nvalid, the box will not boot after flashing.\n\nImagename: %s\nTarget: %s flashupdate.savesuccess The image was successfully saved \nunder %s. flashupdate.selectimage Available Images/Files +flashupdate.settings Update settings flashupdate.squashfs.noversion SquashFS version checks are currently only supported when updating over the web.\nAre you sure that you wish to install this image? flashupdate.titlereadflash Reading Flash flashupdate.titlewriteflash Writing Flash flashupdate.updatemode Updatemode flashupdate.updatemode_internet internet -flashupdate.updatemode_manual manual (ftp) +flashupdate.updatemode_manual from local update directory flashupdate.url_file config file flashupdate.versioncheck checking version flashupdate.writeflash Write whole image @@ -520,10 +524,9 @@ 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 -gtxalpha.alpha1 Alpha 1 -gtxalpha.alpha2 Alpha 2 hdd_10min 10 min. hdd_1min 1 min. hdd_20min 20 min. @@ -577,7 +580,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 @@ -634,7 +637,6 @@ lcd_info_line_clock clock lcdcontroler.brightness normal Brightness lcdcontroler.brightnessdeepstandby DeepStandby Brightness lcdcontroler.brightnessstandby Standby Brightness -lcdcontroler.contrast Contrast lcdmenu.dim_brightness Brightness after dim timeout lcdmenu.dim_time Dim timeout lcdmenu.head VFD Settings @@ -644,7 +646,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 @@ -689,6 +691,376 @@ 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_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 @@ -728,16 +1100,17 @@ 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 miscsettings.infobar_show show Info on EPG change +miscsettings.infobar_show_dd_available show DD availability miscsettings.infobar_show_res show resolution on infobar miscsettings.infobar_show_res_simple simple miscsettings.infobar_show_sysfs_hdd Fill level (sysFS & hdd) @@ -950,15 +1323,16 @@ 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... +neutrino_starting Neutrino-HD starting... nfs.alreadymounted directory already mounted nfs.automount Mount on startup nfs.dir directory/share @@ -1088,7 +1462,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,6 +1557,7 @@ + @@ -1569,16 +1570,23 @@ + + + + + + - + + @@ -1591,8 +1599,9 @@ - + + @@ -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/controldclient/Makefile.am b/lib/controldclient/Makefile.am deleted file mode 100644 index 56165105b..000000000 --- a/lib/controldclient/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -INCLUDES = \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/connection \ - -I$(top_srcdir)/lib/libeventserver - -AM_CPPFLAGS = -fno-rtti -fno-exceptions - -lib_LTLIBRARIES = libcontroldclient.la - -libcontroldclient_la_SOURCES = controldclient.cpp diff --git a/lib/controldclient/controldMsg.h b/lib/controldclient/controldMsg.h deleted file mode 100644 index e68d6f112..000000000 --- a/lib/controldclient/controldMsg.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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. -*/ - -#ifndef __controldMsg__ -#define __controldMsg__ - -#include -#include - -#define CONTROLD_UDS_NAME "/tmp/controld.sock" - - -class CControldMsg : public CBasicMessage -{ - - public: - - static const CBasicMessage::t_version ACTVERSION = 2; - - enum commands - { - CMD_SHUTDOWN = 1, - CMD_SAVECONFIG, - - CMD_SETVOLUME, - CMD_GETVOLUME, - - CMD_SETVOLUME_AVS, - CMD_GETVOLUME_AVS, - - CMD_SETMUTE, - CMD_GETMUTESTATUS, - - CMD_SETVIDEOFORMAT, - CMD_GETVIDEOFORMAT, - - CMD_SETVIDEOOUTPUT, - CMD_GETVIDEOOUTPUT, - - CMD_SETVCROUTPUT, - CMD_GETVCROUTPUT, - - CMD_SETBOXTYPE, - CMD_GETBOXTYPE, - - CMD_SETSCARTMODE, - CMD_GETSCARTMODE, - - CMD_GETASPECTRATIO, - - CMD_SETVIDEOPOWERDOWN, - CMD_GETVIDEOPOWERDOWN, - - CMD_REGISTEREVENT, - CMD_UNREGISTEREVENT, - - CMD_EVENT, - - CMD_SETCSYNC, - CMD_GETCSYNC, - CMD_SETVIDEOMODE, - CMD_GETVIDEOMODE - - }; - - struct commandVolume - { - unsigned char volume; - CControld::volume_type type; - }; - - struct commandMute - { - bool mute; - CControld::volume_type type; - }; - - struct commandVideoFormat - { - unsigned char format; - }; - - struct commandVideoOutput - { - unsigned char output; - }; - - struct commandVCROutput - { - unsigned char vcr_output; - }; - - struct commandBoxType - { - CControld::tuxbox_maker_t boxtype; - }; - - struct commandScartMode - { - unsigned char mode; - }; - - struct commandVideoPowerSave - { - bool powerdown; - }; - - //response structures - - struct responseVideoFormat - { - unsigned char format; - }; - - struct responseAspectRatio - { - unsigned char aspectRatio; - }; - - struct responseVideoOutput - { - unsigned char output; - }; - - struct responseVCROutput - { - unsigned char vcr_output; - }; - - struct responseBoxType - { - CControld::tuxbox_maker_t boxtype; - }; - - struct responseScartMode - { - unsigned char mode; - }; - - struct commandCsync - { - unsigned char csync; - }; - - struct responseVideoPowerSave - { - bool videoPowerSave; - }; - -}; - -#endif diff --git a/lib/controldclient/controldclient.cpp b/lib/controldclient/controldclient.cpp deleted file mode 100644 index f0c44520f..000000000 --- a/lib/controldclient/controldclient.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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. -*/ - -#include - -#include -#include - - -unsigned char CControldClient::getVersion () const -{ - return CControldMsg::ACTVERSION; -} - -const char * CControldClient::getSocketName() const -{ - return CONTROLD_UDS_NAME; -} - -void CControldClient::shutdown() -{ - send(CControldMsg::CMD_SHUTDOWN); - close_connection(); -} - -void CControldClient::setBoxType(CControld::tuxbox_maker_t type) -{ - CControldMsg::commandBoxType msg2; - - msg2.boxtype = type; - - send(CControldMsg::CMD_SETBOXTYPE, (char*)&msg2, sizeof(msg2)); - - close_connection(); -} - -CControld::tuxbox_maker_t CControldClient::getBoxType() -{ - CControldMsg::responseBoxType rmsg; - - send(CControldMsg::CMD_GETBOXTYPE); - - if (!receive_data((char*)&rmsg, sizeof(rmsg))) - rmsg.boxtype = CControld::TUXBOX_MAKER_UNKNOWN; - - close_connection(); - - return rmsg.boxtype; -} - -void CControldClient::setScartMode(bool mode) -{ - CControldMsg::commandScartMode msg2; - - msg2.mode = mode; - - send(CControldMsg::CMD_SETSCARTMODE, (char*)&msg2, sizeof(msg2)); - - close_connection(); -} - -char CControldClient::getScartMode() -{ - CControldMsg::responseScartMode rmsg; - send(CControldMsg::CMD_GETSCARTMODE); - receive_data((char*)&rmsg, sizeof(rmsg)); - close_connection(); - - return rmsg.mode; -} - -void CControldClient::setVolume(const char volume, const CControld::volume_type volume_type) -{ - CControldMsg::commandVolume msg2; - msg2.type = volume_type; - msg2.volume = volume; - send(CControldMsg::CMD_SETVOLUME, (char*)&msg2, sizeof(msg2)); - close_connection(); -} - -char CControldClient::getVolume(const CControld::volume_type volume_type) -{ - CControldMsg::commandVolume rmsg; - rmsg.type = volume_type; - send(CControldMsg::CMD_GETVOLUME, (char*)&rmsg, sizeof(rmsg)); - receive_data((char*)&rmsg, sizeof(rmsg)); - close_connection(); - - return rmsg.volume; -} - -void CControldClient::setVideoFormat(char format) -{ - CControldMsg::commandVideoFormat msg2; - - msg2.format = format; - - send(CControldMsg::CMD_SETVIDEOFORMAT, (char*)&msg2, sizeof(msg2)); - - close_connection(); -} - -char CControldClient::getAspectRatio() -{ - CControldMsg::responseAspectRatio rmsg; - - send(CControldMsg::CMD_GETASPECTRATIO); - - receive_data((char*)&rmsg, sizeof(rmsg)); - - close_connection(); - - return rmsg.aspectRatio; -} - -char CControldClient::getVideoFormat() -{ - CControldMsg::responseVideoFormat rmsg; - - send(CControldMsg::CMD_GETVIDEOFORMAT); - - bool success = receive_data((char*)&rmsg, sizeof(rmsg)); - - close_connection(); - - return success ? rmsg.format : 2; /* default value is 2 (cf. controld.cpp) */ -} - -void CControldClient::setVideoOutput(char output) -{ - CControldMsg::commandVideoOutput msg2; - - msg2.output = output; - - send(CControldMsg::CMD_SETVIDEOOUTPUT, (char*)&msg2, sizeof(msg2)); - - close_connection(); -} - -void CControldClient::setVCROutput(char output) -{ - CControldMsg::commandVCROutput msg2; - - msg2.vcr_output = output; - - send(CControldMsg::CMD_SETVCROUTPUT, (char*)&msg2, sizeof(msg2)); - - close_connection(); -} - -char CControldClient::getVideoOutput() -{ - CControldMsg::responseVideoOutput rmsg; - - send(CControldMsg::CMD_GETVIDEOOUTPUT); - - bool success = receive_data((char*)&rmsg, sizeof(rmsg)); - - close_connection(); - - return success ? rmsg.output : 1; /* default value is 1 (cf. controld.cpp) */ -} - -char CControldClient::getVCROutput() -{ - CControldMsg::responseVCROutput rmsg; - - send(CControldMsg::CMD_GETVCROUTPUT); - - bool success = receive_data((char*)&rmsg, sizeof(rmsg)); - - close_connection(); - - return success ? rmsg.vcr_output : 1; /* default value is 1 (cf. controld.cpp) */ -} - -void CControldClient::Mute(const CControld::volume_type volume_type) -{ - setMute(true,volume_type); -} - -void CControldClient::UnMute(const CControld::volume_type volume_type) -{ - setMute(false,volume_type); -} - -void CControldClient::setMute(const bool mute, const CControld::volume_type volume_type) -{ - CControldMsg::commandMute msg; - msg.mute = mute; - msg.type = volume_type; - send(CControldMsg::CMD_SETMUTE, (char*)&msg, sizeof(msg)); - close_connection(); -} - -bool CControldClient::getMute(const CControld::volume_type volume_type) -{ - CControldMsg::commandMute rmsg; - rmsg.type = volume_type; - send(CControldMsg::CMD_GETMUTESTATUS, (char*)&rmsg, sizeof(rmsg)); - receive_data((char*)&rmsg, sizeof(rmsg)); - close_connection(); - return rmsg.mute; -} - -void CControldClient::registerEvent(unsigned int eventID, unsigned int clientID, const char * const udsName) -{ - CEventServer::commandRegisterEvent msg2; - - msg2.eventID = eventID; - msg2.clientID = clientID; - strcpy(msg2.udsName, udsName); - - send(CControldMsg::CMD_REGISTEREVENT, (char*)&msg2, sizeof(msg2)); - - close_connection(); -} - -void CControldClient::unRegisterEvent(unsigned int eventID, unsigned int clientID) -{ - CEventServer::commandUnRegisterEvent msg2; - - msg2.eventID = eventID; - msg2.clientID = clientID; - - send(CControldMsg::CMD_UNREGISTEREVENT, (char*)&msg2, sizeof(msg2)); - - close_connection(); -} - -void CControldClient::videoPowerDown(bool powerdown) -{ - CControldMsg::commandVideoPowerSave msg2; - - msg2.powerdown = powerdown; - - send(CControldMsg::CMD_SETVIDEOPOWERDOWN, (char*)&msg2, sizeof(msg2)); - - close_connection(); -} - -bool CControldClient::getVideoPowerDown() -{ - CControldMsg::responseVideoPowerSave msg; - send(CControldMsg::CMD_GETVIDEOPOWERDOWN); - receive_data((char*) &msg, sizeof(msg)); - close_connection(); - return msg.videoPowerSave; -} - -void CControldClient::saveSettings() -{ - send(CControldMsg::CMD_SAVECONFIG); - close_connection(); -} - -void CControldClient::setRGBCsync(char val) -{ - CControldMsg::commandCsync msg; - msg.csync = val; - send(CControldMsg::CMD_SETCSYNC, (char*) &msg, sizeof(msg)); - close_connection(); -} - -char CControldClient::getRGBCsync() -{ - CControldMsg::commandCsync msg; - send(CControldMsg::CMD_GETCSYNC); - receive_data((char*) &msg, sizeof(msg)); - close_connection(); - return msg.csync; -} -char CControldClient::getVideoMode() -{ - CControldMsg::responseVideoFormat rmsg; - send(CControldMsg::CMD_GETVIDEOMODE); - bool success = receive_data((char*)&rmsg, sizeof(rmsg)); - close_connection(); - return success ? rmsg.format : 1; /* default value is 2 (cf. controld.cpp) */ -} -void CControldClient::setVideoMode(char format) -{ - CControldMsg::commandVideoFormat msg2; - msg2.format = format; - send(CControldMsg::CMD_SETVIDEOMODE, (char*)&msg2, sizeof(msg2)); - close_connection(); -} - diff --git a/lib/controldclient/controldclient.h b/lib/controldclient/controldclient.h deleted file mode 100644 index 7a9ded911..000000000 --- a/lib/controldclient/controldclient.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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. -*/ - -#ifndef __controldclient__ -#define __controldclient__ - -#include -#include - - -#define VCR_STATUS_OFF 0 -#define VCR_STATUS_ON 1 -#define VCR_STATUS_16_9 2 - -class CControldClient:private CBasicClient -{ - private: - virtual unsigned char getVersion () const; - virtual const char * getSocketName() const; - - public: - - enum events - { - EVT_VOLUMECHANGED, - EVT_MUTECHANGED, - EVT_MODECHANGED, - EVT_VCRCHANGED - }; - - //VideoFormat - static const char VIDEOFORMAT_AUTO = 0; - static const char VIDEOFORMAT_16_9 = 1; - static const char VIDEOFORMAT_4_3 = 2; - static const char VIDEOFORMAT_4_3_PS = 3; - - //VideoOutput - static const char VIDEOOUTPUT_COMPOSITE = 0; - static const char VIDEOOUTPUT_RGB = 1; - static const char VIDEOOUTPUT_SVIDEO = 2; - static const char VIDEOOUTPUT_YUV_VBS = 3; - static const char VIDEOOUTPUT_YUV_CVBS = 4; - - //mute - static const bool VOLUME_MUTE = true; - static const bool VOLUME_UNMUTE = false; - - //scartmode - static const char SCARTMODE_ON = 1; - static const char SCARTMODE_OFF = 0; - - /* - setVolume(volume_type) : Setzen der Lautstaerke - Parameter: 0..100 - 0=leise 100=laut - volume_type : device AVS/OST/UNKOWN(=last used) - */ - void setVolume(const char volume, const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN); - char getVolume(const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN); - - /* - setMute(bool, volume_type) : setzen von Mute - Parameter: mute == true : ton aus - mute == false : ton an - volume_type : device AVS/OST/UNKOWN(=last used) - */ - void setMute(const bool mute, const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN); - bool getMute(const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN); - - /* - Mute(volume_type) : Ton ausschalten - Parameter: volume_type : device AVS/OST/UNKOWN(=last used) - */ - void Mute(const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN); - - /* - UnMute(bool) : Ton wieder einschalten - Parameter: volume_type : device AVS/OST/UNKOWN(=last used) - - */ - void UnMute(const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN); - - - /* - setVideoFormat(char) : Setzten des Bildformates ( 4:3 / 16:9 ) - Parameter: VIDEOFORMAT_AUTO = auto - VIDEOFORMAT_4_3 = 4:3 - VIDEOFORMAT_16_9 = 16:9 - */ - void setVideoFormat(char); - char getVideoFormat(); - /* - getAspectRatio : Aktueller Wert aus dem Bitstream - 0: 4:3 - 1: 16:9 - 2: 2:2.1 - */ - char getAspectRatio(); - - /* - setVideoOutput(char) : Setzten des Videooutputs ( composite (= cvbs) / svideo / rgb+cvbs / yuv+vbs / yuv+cvbs ) - Parameter: VIDEOOUTPUT_COMPOSITE = cvbs (composite) video - VIDEOOUTPUT_SVIDEO = svideo - VIDEOOUTPUT_RGB = rgb+cvbs - VIDEOOUTPUT_YUV_VBS = yuv+vbs - VIDEOOUTPUT_YUV_CVBS = yuv+cvbs - */ - void setVideoOutput(char); - char getVideoOutput(); - - /* - setVCROutput(char) : Setzen des Videooutputs fuer VCR ( composite / svideo ) - Parameter: VIDEOOUTPUT_COMPOSITE = cvbs - VIDEOOUTPUT_SVIDEO = svideo - */ - void setVCROutput(char); - char getVCROutput(); - - /* - setBoxType(CControldClient::tuxbox_vendor_t) : Setzten des Boxentyps ( nokia / sagem / philips ) - */ - void setBoxType(const CControld::tuxbox_maker_t); - CControld::tuxbox_maker_t getBoxType(); - - /* - setScartMode(char) : Scartmode ( an / aus ) - Parameter: SCARTMODE_ON = auf scartinput schalten - SCARTMODE_OFF = wieder dvb anzeigen - - - */ - void setScartMode(bool); - char getScartMode(); - - - /* - die dBox in standby bringen - */ - void videoPowerDown(bool); - - /* - standby abfragen - */ - bool getVideoPowerDown(); - - /* - die Dbox herunterfahren - */ - void shutdown(); - - - /* - ein beliebiges Event anmelden - */ - void registerEvent(unsigned int eventID, unsigned int clientID, const char * const udsName); - - /* - ein beliebiges Event abmelden - */ - void unRegisterEvent(unsigned int eventID, unsigned int clientID); - - void saveSettings(); - - /* - setzen der sync correction im RGB mode des saa7126 (csync) 0=aus, 31=max - */ - - void setRGBCsync(char csync); - /* - lesen der sync correction im RGB mode des saa7126 (csync) 0=aus, 31=max - */ - char getRGBCsync(); - void setVideoMode(char); - char getVideoMode(); -}; - -#endif diff --git a/lib/controldclient/controldtypes.h b/lib/controldclient/controldtypes.h deleted file mode 100644 index 1025b0494..000000000 --- a/lib/controldclient/controldtypes.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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. -*/ - -#ifndef __controldtypes__ -#define __controldtypes__ - -class CControld -{ -public: - - //BoxType /* cf. driver/include/tuxbox/tuxbox_info.h */ - typedef enum tuxbox_maker - { - TUXBOX_MAKER_UNKNOWN = 0, - TUXBOX_MAKER_NOKIA = 1, - TUXBOX_MAKER_PHILIPS = 2, - TUXBOX_MAKER_SAGEM = 3, - TUXBOX_MAKER_DREAM_MM = 4, - TUXBOX_MAKER_TECHNOTREND = 5 - } tuxbox_maker_t; - - enum volume_type - { - TYPE_OST=0, - TYPE_AVS=1, - TYPE_LIRC=2, - TYPE_UNKNOWN - }; - - const static int no_video_formats = 5; - - typedef enum video_format - { - FORMAT_CVBS = 0, - FORMAT_RGB = 1, - FORMAT_SVIDEO = 2, - FORMAT_YUV_VBS = 3, - FORMAT_YUV_CVBS = 4 - } t_video_format; - -}; -#endif diff --git a/lib/libcoolstream/record_cs.h b/lib/libcoolstream/record_cs.h index 51b28bfe6..e139495f2 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_ @@ -17,9 +18,7 @@ class cRecord { private: cRecordData * rd; bool enabled; - int num_apids; int unit; - int nRecordFD; public: cRecord(int num = 0); @@ -27,11 +26,9 @@ 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); }; #endif // __RECORD_CS_H_ 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/libnet/network_interfaces.cpp b/lib/libnet/network_interfaces.cpp index 5a4bc14f0..f97b2b9fe 100644 --- a/lib/libnet/network_interfaces.cpp +++ b/lib/libnet/network_interfaces.cpp @@ -24,6 +24,7 @@ #include #include #include +#include /* * Known bugs: diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 346210d4f..c629daa6a 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -236,12 +236,13 @@ void ClearFB(int /*color*/) //memset(lfb,0, var_screeninfo.yres*fix_screeninfo.line_length); CFrameBuffer::getInstance()->paintBackground(); } - +#if 0 +//never used void ClearB(int color) { FillRect(0,0,var_screeninfo.xres,var_screeninfo.yres*2,color); } - +#endif int GetCurFontWidth() { int mx = (displaywidth)%(40-nofirst); // # of unused pixels diff --git a/lib/libupnpclient/UPNPDevice.cpp b/lib/libupnpclient/UPNPDevice.cpp index 568f2c8d7..98660c2b9 100644 --- a/lib/libupnpclient/UPNPDevice.cpp +++ b/lib/libupnpclient/UPNPDevice.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "upnpclient.h" #include @@ -387,7 +388,7 @@ std::string CUPnPDevice::HTTP(std::string url, std::string post, std::string act } path = url.substr(pos2); - if (post.size()) + if (!post.empty()) command << "POST " << path << " HTTP/1.0\r\n"; else command << "GET " << path << " HTTP/1.0\r\n"; @@ -397,18 +398,18 @@ std::string CUPnPDevice::HTTP(std::string url, std::string post, std::string act command << "Accept: text/xml\r\n"; command << "Connection: Close\r\n"; - if (post.size()) + if (!post.empty()) { command << "Content-Length: " << post.size() << "\r\n"; command << "Content-Type: text/xml\r\n"; } - if (action.size()) + if (!action.empty()) command << "SOAPAction: \"" << action << "\"\r\n"; command << "\r\n"; - if (post.size()) + if (!post.empty()) command << post; t_socket = socket(PF_INET, SOCK_STREAM, 0); diff --git a/lib/libupnpclient/UPNPSocket.cpp b/lib/libupnpclient/UPNPSocket.cpp index 31f779a76..5c3bcbe6e 100644 --- a/lib/libupnpclient/UPNPSocket.cpp +++ b/lib/libupnpclient/UPNPSocket.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include "upnpclient.h" diff --git a/lib/sectionsdclient/sectionsdclient.cpp b/lib/sectionsdclient/sectionsdclient.cpp index 97eadb83d..6d6da6b4b 100644 --- a/lib/sectionsdclient/sectionsdclient.cpp +++ b/lib/sectionsdclient/sectionsdclient.cpp @@ -375,6 +375,8 @@ CChannelEventList CSectionsdClient::getChannelEvents(const bool tv_mode, t_chann 3: keyword search in EPG description (INFO2) In case of a match, the EPG event is added to the Eventlist eList. */ +#if 0 +//never used bool CSectionsdClient::getEventsServiceKeySearchAdd(CChannelEventList& eList,const t_channel_id channel_id,char search_typ,std::string& search_text) { int nBufSize=0; @@ -435,7 +437,7 @@ bool CSectionsdClient::getEventsServiceKeySearchAdd(CChannelEventList& eList,con close_connection(); return true; } - +#endif CChannelEventList CSectionsdClient::getEventsServiceKey(const t_channel_id channel_id) { CChannelEventList eList; @@ -479,6 +481,8 @@ CChannelEventList CSectionsdClient::getEventsServiceKey(const t_channel_id chann close_connection(); return eList; } +#if 0 +//never used void showhexdumpa (char *label, unsigned char * from, int len) { int i, j, k; @@ -519,7 +523,7 @@ void showhexdumpa (char *label, unsigned char * from, int len) } printf ("\n"); } - +#endif // 21.07.2005 - rainerk // Convert line-terminated extended events to vector of strings char * CSectionsdClient::parseExtendedEvents(char * dp, CEPGData * epgdata) { diff --git a/lib/sectionsdclient/sectionsdclient.h b/lib/sectionsdclient/sectionsdclient.h index d42e99237..4065ffc2d 100644 --- a/lib/sectionsdclient/sectionsdclient.h +++ b/lib/sectionsdclient/sectionsdclient.h @@ -72,6 +72,7 @@ class CSectionsdClient : private CBasicClient char * parseExtendedEvents(char * dp, CEPGData * epgdata); public: + virtual ~CSectionsdClient() {}; enum SIlanguageMode_t { ALL, FIRST_FIRST, diff --git a/lib/timerdclient/timerdclient.cpp b/lib/timerdclient/timerdclient.cpp index 28a3861ae..0926748a9 100644 --- a/lib/timerdclient/timerdclient.cpp +++ b/lib/timerdclient/timerdclient.cpp @@ -247,7 +247,7 @@ int CTimerdClient::addTimerEvent( CTimerd::CTimerEventTypes evType, void* data, //printf("[CTimerdClient] checking for overlapping timers\n"); CTimerd::TimerList overlappingTimer; overlappingTimer = getOverlappingTimers(alarmtime, stoptime); - if (overlappingTimer.size() > 0) + if (!overlappingTimer.empty()) { // timerd starts eventID at 0 so we can return -1 return -1; 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/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp index 06ba0b50d..d6659148d 100644 --- a/src/daemonc/remotecontrol.cpp +++ b/src/daemonc/remotecontrol.cpp @@ -39,7 +39,6 @@ #include #include -#include #include #include #include "libdvbsub/dvbsub.h" @@ -367,7 +366,7 @@ printf("CRemoteControl::handleMsg: EVT_TUNE_COMPLETE (%016llx)\n", chid); void CRemoteControl::getSubChannels() { //printf("[neutrino] getSubChannels, current_EPGid %llx\n", current_EPGid); - if ( subChannels.size() == 0 ) + if ( subChannels.empty() ) { CSectionsdClient::LinkageDescriptorList linkedServices; //if ( g_Sectionsd->getLinkageDescriptorsUniqueKey( current_EPGid, linkedServices ) ) @@ -401,7 +400,7 @@ void CRemoteControl::getSubChannels() void CRemoteControl::getNVODs() { //printf("[neutrino] getNVODs, current_EPGid %llx\n", current_EPGid); - if ( subChannels.size() == 0 ) + if ( subChannels.empty() ) { CSectionsdClient::NVODTimesList NVODs; //if ( g_Sectionsd->getNVODTimesServiceKey( current_channel_id & 0xFFFFFFFFFFFFULL, NVODs ) ) @@ -454,7 +453,7 @@ void CRemoteControl::getNVODs() void CRemoteControl::processAPIDnames() { has_unresolved_ctags= false; - has_ac3 = false; //FIXME what this variable suppoused to do ?? seems unused + has_ac3 = false; //use in infoviewer int pref_found = -1; int pref_ac3_found = -1; int pref_idx = -1; @@ -521,13 +520,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 ) @@ -549,11 +548,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; @@ -631,15 +630,15 @@ const std::string & CRemoteControl::setSubChannel(const int numSub, const bool f const std::string & CRemoteControl::subChannelUp(void) { - //return setSubChannel((subChannels.size() == 0) ? -1 : (int)((selected_subchannel + 1) % subChannels.size())); + //return setSubChannel((subChannels.empty()) ? -1 : (int)((selected_subchannel + 1) % subChannels.size())); // if there are any NVOD/subchannels switch these else switch audio channel (if any) - if (subChannels.size() > 0 || !g_settings.audiochannel_up_down_enable) + if ( !subChannels.empty() || !g_settings.audiochannel_up_down_enable) { - return setSubChannel((subChannels.size() == 0) ? -1 : (int)((selected_subchannel + 1) % subChannels.size())); + return setSubChannel( subChannels.empty() ? -1 : (int)((selected_subchannel + 1) % subChannels.size())); } else { - if (current_PIDs.APIDs.size() > 0) + if ( !current_PIDs.APIDs.empty() ) { setAPID((current_PIDs.PIDs.selected_apid + 1) % current_PIDs.APIDs.size()); } @@ -651,13 +650,13 @@ const std::string & CRemoteControl::subChannelDown(void) { //return setSubChannel((selected_subchannel <= 0) ? (subChannels.size() - 1) : (selected_subchannel - 1)); // if there are any NVOD/subchannels switch these else switch audio channel (if any) - if (subChannels.size() > 0 || !g_settings.audiochannel_up_down_enable) + if ( !subChannels.empty() || !g_settings.audiochannel_up_down_enable) { return setSubChannel((selected_subchannel <= 0) ? (subChannels.size() - 1) : (selected_subchannel - 1)); } else { - if (current_PIDs.APIDs.size() > 0) + if ( !current_PIDs.APIDs.empty() ) { if (current_PIDs.PIDs.selected_apid <= 0) setAPID(current_PIDs.APIDs.size() - 1); diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 430651655..617c4be36 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -18,24 +18,24 @@ noinst_LIBRARIES = libneutrino_driver.a libneutrino_driver_netfile.a libneutrino_driver_a_SOURCES = \ abstime.c \ + audiofile.cpp \ + audiometadata.cpp \ + audioplay.cpp \ + fade.cpp \ + fb_window.cpp \ + file.cpp \ fontrenderer.cpp \ framebuffer.cpp \ - fb_window.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 \ - fade.cpp \ - screenshot.cpp \ ringbuffer.c \ + screen_max.cpp \ + screenshot.cpp \ + shutdown_count.cpp \ + streamts.cpp \ volume.cpp if BOXTYPE_COOL diff --git a/src/driver/audiodec/Makefile.am b/src/driver/audiodec/Makefile.am index 7e73469a1..c21b2c4d0 100644 --- a/src/driver/audiodec/Makefile.am +++ b/src/driver/audiodec/Makefile.am @@ -27,10 +27,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 \ - vis.cpp + vis.cpp \ + wavdec.cpp diff --git a/src/driver/audiodec/flacdec.cpp b/src/driver/audiodec/flacdec.cpp index ed114dc50..242337945 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/aviaext.cpp b/src/driver/aviaext.cpp deleted file mode 100644 index 22a51e7c0..000000000 --- a/src/driver/aviaext.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/* - LCD-Daemon - DBoxII-Project - - Copyright (C) 2004 Zwen@tuxbox.org - - 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 -#if 1 -#include -#include - -#define AVIAEXT_DEV "/dev/dbox/aviaEXT" - -CAViAExt* CAViAExt::getInstance() -{ - static CAViAExt* AViAExt = NULL; - if(AViAExt == NULL) - { - AViAExt = new CAViAExt(); - } - return AViAExt; -} - -void CAViAExt::iecOn() -{ - int res,fd; - - if ((fd = open(AVIAEXT_DEV,O_RDWR))<0) - { - if (errno==ENOENT) - fprintf (stderr,"%s does not exist, did you forget to load the aviaEXT module?\n",AVIAEXT_DEV); - else - perror ("aviaext: error opening /dev/dbox/aviaEXT"); - return; - } - res = ioctl(fd, AVIA_EXT_IEC_SET, 1); - if (res<0) - perror("aviaext: ioctl"); - close(fd); -} - -void CAViAExt::iecOff() -{ - int res,fd; - - if ((fd = open(AVIAEXT_DEV,O_RDWR))<0) - { - if (errno==ENOENT) - fprintf (stderr,"%s does not exist, did you forget to load the aviaEXT module?\n",AVIAEXT_DEV); - else - perror ("aviaext: error opening /dev/dbox/aviaEXT"); - return; - } - res = ioctl(fd, AVIA_EXT_IEC_SET, 0); - if (res<0) - perror("aviaext: ioctl"); - close(fd); -} - -int CAViAExt::iecState() -{ - int res,fd; - unsigned int param; - - if ((fd = open(AVIAEXT_DEV,O_RDWR))<0) - { - if (errno==ENOENT) - fprintf (stderr,"%s does not exist, did you forget to load the aviaEXT module?\n",AVIAEXT_DEV); - else - perror ("aviaext: error opening /dev/dbox/aviaEXT"); - return -1; - } - res = ioctl(fd, AVIA_EXT_IEC_GET, ¶m); - - close(fd); - - if (res<0) - { - perror("aviaext: ioctl"); - return -1; - } - return param; -} - -void CAViAExt::playbackSPTS() -{ - int res,fd; - - if ((fd = open(AVIAEXT_DEV,O_RDWR))<0) - { - if (errno==ENOENT) - fprintf (stderr,"%s does not exist, did you forget to load the aviaEXT module?\n",AVIAEXT_DEV); - else - perror ("aviaext: error opening /dev/dbox/aviaEXT"); - return; - } - res = ioctl(fd, AVIA_EXT_AVIA_PLAYBACK_MODE_SET, 1); - if (res<0) - perror("aviaext: ioctl"); - close(fd); -} - -void CAViAExt::playbackPES() -{ - int res,fd; - - if ((fd = open(AVIAEXT_DEV,O_RDWR))<0) - { - if (errno==ENOENT) - fprintf (stderr,"%s does not exist, did you forget to load the aviaEXT module?\n",AVIAEXT_DEV); - else - perror ("aviaext: error opening /dev/dbox/aviaEXT"); - return; - } - res = ioctl(fd, AVIA_EXT_AVIA_PLAYBACK_MODE_SET, 0); - if (res<0) - perror("aviaext: ioctl"); - close(fd); -} - -int CAViAExt::playbackState() -{ - int res,fd; - unsigned int param; - - if ((fd = open(AVIAEXT_DEV,O_RDWR))<0) - { - if (errno==ENOENT) - fprintf (stderr,"%s does not exist, did you forget to load the aviaEXT module?\n",AVIAEXT_DEV); - else - perror ("aviaext: error opening /dev/dbox/aviaEXT"); - return -1; - } - res = ioctl(fd, AVIA_EXT_AVIA_PLAYBACK_MODE_GET, ¶m); - - close(fd); - - if (res<0) - { - perror("aviaext: ioctl"); - return -1; - } - return param; -} -#endif diff --git a/src/driver/bigclock.cpp b/src/driver/bigclock.cpp deleted file mode 100644 index e5264f59b..000000000 --- a/src/driver/bigclock.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - LCD-Daemon - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - - - 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. -*/ - - -#include "bigclock.h" - - -void doppelpunkt(CLCDDisplay* display, int pos) -{ - int i,j; - - for (i=1;i<=4;i++) - for (j=1;j<=4;j++) - display->draw_point(i+10+pos*24-3,j+23,CLCDDisplay::PIXEL_ON); - for (i=1;i<=4;i++) - for (j=1;j<=4;j++) - display->draw_point(i+10+pos*24-3,j+37,CLCDDisplay::PIXEL_ON); -} - - -void balken(CLCDDisplay* display, int pos, int balken) -{ - int i,j; - - if (balken==3||balken==6||balken==7) - { - //horizontaler balken - if (balken == 6) for (i=1;i<=14;i++) for (j=1;j<=4;j++) display->draw_point(i+5+pos*24-3,j+14,CLCDDisplay::PIXEL_ON); - if (balken == 7) for (i=1;i<=8;i++) for (j=1;j<=4;j++) display->draw_point(i+8+pos*24-3,j+30,CLCDDisplay::PIXEL_ON); - } if (balken == 3) for (i=1;i<=14;i++) for (j=1;j<=4;j++) display->draw_point(i+5+pos*24-3,j+46,CLCDDisplay::PIXEL_ON); - else - { - //vertikaler balken - if (balken == 1) for (i=1;i<=4;i++) for (j=1;j<=13;j++) display->draw_point(i+19+pos*24-3,j+18,CLCDDisplay::PIXEL_ON); - if (balken == 2) for (i=1;i<=4;i++) for (j=1;j<=13;j++) display->draw_point(i+19+pos*24-3,j+33,CLCDDisplay::PIXEL_ON); - if (balken == 5) for (i=1;i<=4;i++) for (j=1;j<=13;j++) display->draw_point(i+1+pos*24-3,j+18,CLCDDisplay::PIXEL_ON); - if (balken == 4) for (i=1;i<=4;i++) for (j=1;j<=13;j++) display->draw_point(i+1+pos*24-3,j+33,CLCDDisplay::PIXEL_ON); - - } -} - -void showBigClock(CLCDDisplay* display, int h, int m) -{ - - //stunden einer - if (h==0||h==10||h==20) - { balken(display, 1,1); balken(display, 1,2); balken(display, 1,3); balken(display, 1,4); balken(display, 1,5); balken(display, 1,6);} - if (h==1||h==11||h==21) - { balken(display, 1,1); balken(display, 1,2);} - if (h==2||h==12||h==22) - { balken(display, 1,1); balken(display, 1,7); balken(display, 1,3); balken(display, 1,4); balken(display, 1,6);} - if (h==3||h==13||h==23) - { balken(display, 1,1); balken(display, 1,2); balken(display, 1,3); balken(display, 1,7); balken(display, 1,6);} - if (h==4||h==14) - { balken(display, 1,1); balken(display, 1,2); balken(display, 1,7); balken(display, 1,5);} - if (h==5||h==15) - { balken(display, 1,2); balken(display, 1,3); balken(display, 1,5); balken(display, 1,6); balken(display, 1,7);} - if (h==6||h==16) - { balken(display, 1,7); balken(display, 1,2); balken(display, 1,3); balken(display, 1,4); balken(display, 1,5); balken(display, 1,6);} - if (h==7||h==17) - { balken(display, 1,1); balken(display, 1,2); balken(display, 1,6);} - if (h==8||h==18) - { balken(display, 1,1); balken(display, 1,2); balken(display, 1,3); balken(display, 1,4); balken(display, 1,5); balken(display, 1,6); balken(display, 1,7);} - if (h==9||h==19) - { balken(display, 1,1); balken(display, 1,2); balken(display, 1,3); balken(display, 1,7); balken(display, 1,5); balken(display, 1,6);} - //stunden zehner - if (h>9&&h<20){ balken(display, 0,1); balken(display, 0,2);} - if (h>19) { balken(display, 0,1); balken(display, 0,7); balken(display, 0,3); balken(display, 0,4); balken(display, 0,6);} - - - //minuten einer - if (m==0||m==10||m==20||m==30||m==40||m==50) - { balken(display, 4,1); balken(display, 4,2); balken(display, 4,3); balken(display, 4,4); balken(display, 4,5); balken(display, 4,6);} - if (m==1||m==11||m==21||m==31||m==41||m==51) - { balken(display, 4,1); balken(display, 4,2);} - if (m==2||m==12||m==22||m==32||m==42||m==52) - { balken(display, 4,1); balken(display, 4,7); balken(display, 4,3); balken(display, 4,4); balken(display, 4,6);} - if (m==3||m==13||m==23||m==33||m==43||m==53) - { balken(display, 4,1); balken(display, 4,2); balken(display, 4,3); balken(display, 4,7); balken(display, 4,6);} - if (m==4||m==14||m==24||m==34||m==44||m==54) - { balken(display, 4,1); balken(display, 4,2); balken(display, 4,7); balken(display, 4,5);} - if (m==5||m==15||m==25||m==35||m==45||m==55) - { balken(display, 4,2); balken(display, 4,3); balken(display, 4,5); balken(display, 4,6); balken(display, 4,7);} - if (m==6||m==16||m==26||m==36||m==46||m==56) - { balken(display, 4,7); balken(display, 4,2); balken(display, 4,3); balken(display, 4,4); balken(display, 4,5); balken(display, 4,6);} - if (m==7||m==17||m==27||m==37||m==47||m==57) - { balken(display, 4,1); balken(display, 4,2); balken(display, 4,6);} - if (m==8||m==18||m==28||m==38||m==48||m==58) - { balken(display, 4,1); balken(display, 4,2); balken(display, 4,3); balken(display, 4,4); balken(display, 4,5); balken(display, 4,6); balken(display, 4,7);} - if (m==9||m==19||m==29||m==39||m==49||m==59) - { balken(display, 4,1); balken(display, 4,2); balken(display, 4,3); balken(display, 4,7); balken(display, 4,5); balken(display, 4,6);} - - //minuten zehner - if (m<10) - { balken(display, 3,1); balken(display, 3,2); balken(display, 3,3); balken(display, 3,4); balken(display, 3,5); balken(display, 3,6);} - if (m>9&&m<20){ balken(display, 3,1); balken(display, 3,2);} - if (m>19&&m<30){ balken(display, 3,1); balken(display, 3,7); balken(display, 3,3); balken(display, 3,4); balken(display, 3,6);} - if (m>29&&m<40){ balken(display, 3,1); balken(display, 3,2); balken(display, 3,3); balken(display, 3,7); balken(display, 3,6);} - if (m>39&&m<50){ balken(display, 3,1); balken(display, 3,2); balken(display, 3,7); balken(display, 3,5);} - if (m>=50) { balken(display, 3,2); balken(display, 3,3); balken(display, 3,5); balken(display, 3,6); balken(display, 3,7);} - - doppelpunkt(display, 2); - } diff --git a/src/driver/bigclock.h b/src/driver/bigclock.h deleted file mode 100644 index 91735f93c..000000000 --- a/src/driver/bigclock.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - LCD-Daemon - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - - - 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. -*/ - -#ifndef __bigclock__ -#define __bigclock__ - -#include - - -void showBigClock(CLCDDisplay* display, int h,int m); - - -#endif diff --git a/src/driver/capture.cpp b/src/driver/capture.cpp deleted file mode 100644 index 35c580b42..000000000 --- a/src/driver/capture.cpp +++ /dev/null @@ -1,308 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - - 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. -*/ - - - - - -#include -#include -#include -#include -#include -#include -#include - -#include "capture.h" - - -#include -#warning "experimental..." - - -// -// -- TV Picture Capture -// -- This module is a class to provide a capture abstraction layer -// -- -// -- 2003-12 rasc -// - - - -// -// -- Constructor -// - -CCAPTURE::CCAPTURE() -{ - fd = -1; -} - - -CCAPTURE::CCAPTURE(int capture_nr) -{ - fd = -1; - fd = captureopen(capture_nr); -} - - -CCAPTURE::CCAPTURE(int capture_nr, int x, int y, int w, int h) -{ - fd = -1; - fd = captureopen (capture_nr); - set_coord (x,y, w,h); -} - - - - -CCAPTURE::~CCAPTURE() -{ - captureclose (); // cleanup anyway!! -} - - -// -// -- open Capture device -// -- return >=0: ok -// - -int CCAPTURE::captureopen (int cap_nr) -{ - char *capturedevs[] = { - CAPTURE_DEV "0" // CAPTURE device 0 - // CAPTURE_DEV "1", // CAPTURE device 1 - // CAPTURE_DEV "2", // CAPTURE device 2 - // CAPTURE_DEV "3" // CAPTURE device 3 - }; - - - if ( (cap_nr>0) || (cap_nr < (int)(sizeof (capturedevs)/sizeof(char *))) ) { - - if (fd < 0) { - fd = open( capturedevs[cap_nr], O_RDWR ); - if (fd >= 0) { - cx = cy = cw = ch = 0; - out_w = out_h = 0; - stride = 0; - } else perror (capturedevs[cap_nr]); - return fd; - } - - } - - return -1; -} - - -// -// -- close Capture Device -// - -void CCAPTURE::captureclose () -{ - if (fd >=0 ) { - close (fd); - fd = -1; - cx = cy = cw = ch = 0; - out_w = out_h = 0; - stride = 0; - } - return; -} - - - - -/* - -- Coordination routines... - */ - -void CCAPTURE::set_coord (int x, int y, int w, int h) -{ - if (( x != cx ) || ( y != cy )) { - cx = x; - cy = y; - cw = w; - ch = h; - _set_window (cx,cy,cw,ch); - } -} - - -void CCAPTURE::set_xy (int x, int y) -{ - if (( x != cx ) || ( y != cy )) { - cx = x; - cy = y; - _set_window (cx,cy,cw,ch); - } -} - - - -void CCAPTURE::set_size (int w, int h) -{ - if (( w != cw ) || ( h != ch )) { - cw = w; - ch = h; - _set_window (cx,cy,cw,ch); - } -} - - - - -// -// -- set Capture Position -// - -void CCAPTURE::_set_window (int x, int y, int w, int h) -{ -#ifdef __v4l_capture - - struct v4l2_crop crop; - - crop.c.left = x; - crop.c.top = y; - crop.c.width = w; - crop.c.height = h; - if( ioctl(fd, VIDIOC_S_CROP, &crop) < 0) - perror ("error VIDIOC_S_CROP"); - -#else - - capture_set_input_pos(fd, x, y); - capture_set_input_size(fd, w, h); - -#endif -} - - - -void CCAPTURE::set_output_size (int w, int h) -{ -#ifdef __v4l_capture - - struct v4l2_format format; - - out_w = w; - out_h = h; - format.fmt.pix.width = w; - format.fmt.pix.height = h; - - if (ioctl(fd, VIDIOC_S_FMT, &format) < 0) - perror ("error VIDIOC_S_FMT"); - -#else - - out_w = w; - out_h = h; - capture_set_output_size(fd, w, h); - -#endif -} - - -// -// -- capture a frame -// -- if buffer == NULL, routine will alloc memory! -// -- destroy will not free this allocated memory! -// -- otherwise buffer has to be large enough! -// - -u_char *CCAPTURE::readframe (u_char *buf) -{ -#ifdef __v4l_capture - - struct v4l2_format vid; - int n; - u_char *b; - - if (fd >= 0) { - // get capture information - vid.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - if (ioctl(fd, VIDIOC_G_FMT, &vid) < 0) - perror ("Error getting info with VIDIOC_G_FMT"); - - printf ("reported bytesperline: %d, height: %d, sizeimage: %d\n", - vid.fmt.pix.bytesperline, - vid.fmt.pix.height, - vid.fmt.pix.sizeimage); - - b = (buf != NULL) - ? buf - : (u_char *) malloc (vid.fmt.pix.bytesperline * - vid.fmt.pix.height); - - - n = read (fd, b, vid.fmt.pix.bytesperline*vid.fmt.pix.height); - if (n < 0) { - perror ("Error reading capture buffer"); - if (!buf) free (b); - return (u_char *)NULL; - } - - return b; - } - - return (u_char *) NULL; - - -#else - - u_char *b; - int stride; - int n; - - if (fd >= 0) { - stride = capture_start(fd); - - b = (buf != NULL) - ? buf - : (u_char *) malloc (stride * out_h); - - n = read(fd, b, stride * out_h); - capture_stop(fd); - if (n < 0) { - perror ("Error reading capture buffer"); - if (!buf) free (b); - return (u_char *)NULL; - } - - - return b; - } - - return (u_char *) NULL; - -#endif -} - - - - - - - - - - diff --git a/src/driver/capture.h b/src/driver/capture.h deleted file mode 100644 index 53775739e..000000000 --- a/src/driver/capture.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - - 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. -*/ - - -#ifndef __CAPTURE_CONTROL__ -#define __CAPTURE_CONTROL__ - - -#define __v4l_capture - - -using namespace std; - - -// -// -- Picture Capture Control -// -- 2003-12 rasc -// - -#ifdef __v4l_capture - -#include -#define CAPTURE_DEV "/dev/v4l/video" // CaptureNr will be appended! - -#else - -#include -#define CAPTURE_DEV "/dev/dbox/capture" // CaptureNr will be appended! - -#endif - - -class CCAPTURE -{ - public: - CCAPTURE (); - CCAPTURE (int capture_nr); // incl. open - CCAPTURE (int capture_nr, int x, int y, int w, int h); // open + set_coord - ~CCAPTURE (); - - int captureopen (int capture_nr); - void captureclose (void); - void set_coord (int x, int y, int w, int h); - void set_xy (int x, int y); - void set_size (int w, int h); - void set_output_size (int w, int h); - u_char *readframe (u_char *buf); - - private: - void _set_window (int x, int y, int w, int h); - - int fd; // io descriptor - int cx, cy, cw, ch; // capture size - int out_w, out_h; // capture output size - int stride; - -}; - - - -#endif - - diff --git a/src/driver/encoding.cpp b/src/driver/encoding.cpp deleted file mode 100644 index b4c1c238f..000000000 --- a/src/driver/encoding.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Header: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/encoding.cpp,v 1.2 2003/09/27 11:48:09 thegoodguy Exp $ - * - * conversion of character encodings - d-box2 linux project - * - * (C) 2003 by thegoodguy - * - * 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. - * - */ - -#include - -std::string Latin1_to_UTF8(const std::string & s) -{ - std::string r; - - for (std::string::const_iterator it = s.begin(); it != s.end(); ++it) - { - unsigned char c = *it; - if (c < 0x80) - r += c; - else - { - unsigned char d = 0xc0 | (c >> 6); - r += d; - d = 0x80 | (c & 0x3f); - r += d; - } - } - return r; -} diff --git a/src/driver/encoding.h b/src/driver/encoding.h deleted file mode 100644 index 9564a8733..000000000 --- a/src/driver/encoding.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * $Header: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/encoding.h,v 1.2 2003/09/27 11:48:09 thegoodguy Exp $ - * - * conversion of character encodings - d-box2 linux project - * - * (C) 2003 by thegoodguy - * - * 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. - * - */ - -#ifndef __neutrino__encoding_h__ -#define __neutrino__encoding_h__ - -#include - -std::string Latin1_to_UTF8(const std::string & s); - -#endif /* __neutrino__encoding_h__ */ diff --git a/src/driver/file.cpp b/src/driver/file.cpp index 01723fe7c..775332ee6 100644 --- a/src/driver/file.cpp +++ b/src/driver/file.cpp @@ -45,8 +45,8 @@ const char * const file_extension_list[] = "asf", "avi", "bmp", "cdr", "crw", "flac", "gif", "imu", "jpeg", "jpg", "m2a", "m3u", "mkv", "mp2", "mp3", - "mpa", "ogg", "png", "sh", "txt", - "url", "wav", "xml" + "mpa", "ogg", "pls", "png", "sh", + "txt", "url", "wav", "xml" }; /* ATTENTION: the array file_extension_list MUST BE SORTED ASCENDING (cf. sort, man bsearch) - otherwise bsearch will not work correctly! */ @@ -55,8 +55,8 @@ const CFile::FileType file_type_list[] = CFile::FILE_ASF , CFile::FILE_AVI , CFile::FILE_PICTURE , CFile::FILE_CDR , CFile::FILE_PICTURE , CFile::FILE_FLAC , CFile::FILE_PICTURE , CFile::STREAM_PICTURE, CFile::FILE_PICTURE , CFile::FILE_PICTURE , CFile::FILE_MP3 , CFile::FILE_PLAYLIST , CFile::FILE_MKV , CFile::FILE_MP3 , CFile::FILE_MP3 , - CFile::FILE_MP3 , CFile::FILE_OGG , CFile::FILE_PICTURE , CFile::FILE_TEXT , CFile::FILE_TEXT , - CFile::STREAM_AUDIO , CFile::FILE_WAV , CFile::FILE_XML + CFile::FILE_MP3 , CFile::FILE_OGG , CFile::FILE_PLAYLIST, CFile::FILE_PICTURE , CFile::FILE_TEXT , + CFile::FILE_TEXT , CFile::STREAM_AUDIO , CFile::FILE_WAV , CFile::FILE_XML }; int mycasecmp(const void * a, const void * b) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index 0ff7020d7..ab4a80c3e 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -510,11 +510,12 @@ int CFrameBuffer::setMode(unsigned int /*nxRes*/, unsigned int /*nyRes*/, unsign } return 0; } - +#if 0 +//never used void CFrameBuffer::setTransparency( int /*tr*/ ) { } - +#endif void CFrameBuffer::setBlendMode(uint8_t mode) { #ifdef HAVE_COOL_HARDWARE @@ -539,14 +540,15 @@ void CFrameBuffer::setBlendLevel(int level) #endif #endif } - +#if 0 +//never used void CFrameBuffer::setAlphaFade(int in, int num, int tr) { for (int i=0; ilfb, 0, thiz->stride * thiz->yRes); } } +#endif void CFrameBuffer::Clear() { paintBackground(); //memset(getFrameBufferPointer(), 0, stride * yRes); } - +#if 0 +//never used void CFrameBuffer::showFrame(const std::string & filename) { std::string varpath = "/var/tuxbox/config/neutrino/icons/"; @@ -1611,7 +1619,7 @@ void CFrameBuffer::showFrame(const std::string & filename) else videoDecoder->ShowPicture((iconBasePath + filename).c_str()); } - +#endif bool CFrameBuffer::Lock() { if(locked) diff --git a/src/driver/lcdd.cpp b/src/driver/lcdd.cpp index 2104bf8c8..8b6083df6 100644 --- a/src/driver/lcdd.cpp +++ b/src/driver/lcdd.cpp @@ -1241,7 +1241,7 @@ void CLCD::showFilelist(int flist_pos,CFileList* flist,const char * const mainDi if (mode == MODE_FILEBROWSER && m_fileList != NULL && - m_fileList->size() > 0) + !m_fileList->empty() ) { printf("[lcdd] FileList:OK\n"); diff --git a/src/driver/netfile.cpp b/src/driver/netfile.cpp index 71d61d2f2..2b6303cb2 100644 --- a/src/driver/netfile.cpp +++ b/src/driver/netfile.cpp @@ -1059,6 +1059,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 +1102,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 +1301,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 +1722,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 +1739,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 8c452bc78..c70fcf859 100644 --- a/src/driver/pictureviewer/Makefile.am +++ b/src/driver/pictureviewer/Makefile.am @@ -19,5 +19,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/gif.cpp b/src/driver/pictureviewer/gif.cpp index 3e2c837d4..a37238772 100644 --- a/src/driver/pictureviewer/gif.cpp +++ b/src/driver/pictureviewer/gif.cpp @@ -6,6 +6,7 @@ #ifdef FBV_SUPPORT_GIF #include "pictureviewer.h" #include + #include #include #include #include diff --git a/src/driver/pictureviewer/make15color_errdiff.cpp b/src/driver/pictureviewer/make15color_errdiff.cpp deleted file mode 100644 index e00ae47ee..000000000 --- a/src/driver/pictureviewer/make15color_errdiff.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2005 Zwen - - Kommentar: - This is an implementation of the floyd steinberg error diffusion algorithm - adapted for 24bit to 15bit color reduction. - - For a description of the base alorithm see e.g.: - http://www.informatik.fh-muenchen.de/~schieder/graphik-01-02/slide0264.html - - 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. -*/ - -#include -#include -#include - -#include "pictureviewer.h" - -void c32_15(unsigned char r, unsigned char g , unsigned char b , unsigned char* d) -{ - *d = ((r >> 1) & 0x7C) | (g >> 6); - *(d+1) = ((g << 2) & 0xE0) | (b >> 3); -} - -#define FS_CALC_ERROR_COMMON(color, index) \ - p1 = p2 = (p_src[index] + (this_line_error_##color[ix]>>4)); \ - if(p1>255)p1=255; if(p1<0)p1=0; \ - color = (p1 & 0xF8) | 0x4; \ - error = p2 - color; \ - -#define FS_CALC_ERROR_RIGHT(color, index) \ - FS_CALC_ERROR_COMMON(color,index) \ - this_line_error_##color[ix+1] += (error * 7); \ - next_line_error_##color[ix-1] += (error * 3); \ - next_line_error_##color[ix] += (error * 5); \ - next_line_error_##color[ix+1] += error; - -#define FS_CALC_ERROR_LEFT(color, index) \ - FS_CALC_ERROR_COMMON(color,index) \ - this_line_error_##color[ix-1] += (error * 7); \ - next_line_error_##color[ix+1] += (error * 3); \ - next_line_error_##color[ix] += (error * 5); \ - next_line_error_##color[ix-1] += error; - -unsigned char * make15color_errdiff(unsigned char * src,int width, int height) -{ - int odd_line=1; - int ix,iy, error, p1, p2; - unsigned char r,g,b; - unsigned char *p_src, *p_dst; - unsigned char *dst = (unsigned char*) malloc(width*height*2); - int *this_line_error_r; - int *this_line_error_g; - int *this_line_error_b; - int *next_line_error_r; - int *next_line_error_g; - int *next_line_error_b; - int *save_error; - int *error1_r = (int*) malloc((width+2)*sizeof(int)); - int *error1_g = (int*) malloc((width+2)*sizeof(int)); - int *error1_b = (int*) malloc((width+2)*sizeof(int)); - int *error2_r = (int*) malloc((width+2)*sizeof(int)); - int *error2_g = (int*) malloc((width+2)*sizeof(int)); - int *error2_b = (int*) malloc((width+2)*sizeof(int)); - - dbout("Start error diffusion\n"); - - this_line_error_r = error1_r; - this_line_error_g = error1_g; - this_line_error_b = error1_b; - next_line_error_r = error2_r; - next_line_error_g = error2_g; - next_line_error_b = error2_b; - memset (this_line_error_r, 0 , (width+2) * sizeof(int)); - memset (this_line_error_g, 0 , (width+2) * sizeof(int)); - memset (this_line_error_b, 0 , (width+2) * sizeof(int)); - memset (next_line_error_r, 0 , (width+2) * sizeof(int)); - memset (next_line_error_g, 0 , (width+2) * sizeof(int)); - memset (next_line_error_b, 0 , (width+2) * sizeof(int)); - p_src = src; - p_dst = dst; - - for(iy=0 ; iy < height ; iy++) - { - save_error = this_line_error_r; - this_line_error_r = next_line_error_r; - next_line_error_r = save_error; - save_error = this_line_error_g; - this_line_error_g = next_line_error_g; - next_line_error_g = save_error; - save_error = this_line_error_b; - this_line_error_b = next_line_error_b; - next_line_error_b = save_error; - memset (next_line_error_r, 0 , (width+2) * sizeof(int)); - memset (next_line_error_g, 0 , (width+2) * sizeof(int)); - memset (next_line_error_b, 0 , (width+2) * sizeof(int)); - - if(odd_line) - { - for(ix=1 ; ix <= width ; ix++) - { - FS_CALC_ERROR_RIGHT(r,0); - FS_CALC_ERROR_RIGHT(g,1); - FS_CALC_ERROR_RIGHT(b,2); - c32_15(r,g,b,p_dst); - p_src+=3; - p_dst+=2; - } - odd_line=0; - } - else - { - p_src+=(width-1)*3; - p_dst+=(width-1)*2; - for(ix=width ; ix >= 1 ; ix--) - { - FS_CALC_ERROR_LEFT(r,0); - FS_CALC_ERROR_LEFT(g,1); - FS_CALC_ERROR_LEFT(b,2); - c32_15(r,g,b,p_dst); - p_src-=3; - p_dst-=2; - } - p_src+=width*3; - p_dst+=width*2; - odd_line=1; - } - } - free(error1_r); - free(error1_g); - free(error1_b); - free(error2_r); - free(error2_g); - free(error2_b); - dbout("End error diffusion\n"); - return dst; -} - diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index d0aa23b0c..39ca3203d 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -5,7 +5,7 @@ #include "pv_config.h" #include "driver/framebuffer.h" - +#include #include #include #include @@ -587,7 +587,7 @@ fb_pixel_t * CPictureViewer::int_getImage(const std::string & name, int *width, if (buffer == NULL) { printf("%s: Error: malloc\n", mode_str.c_str()); - return false; + return 0; } #ifdef FBV_SUPPORT_PNG if ((name.find(".png") == (name.length() - 4)) && (fh_png_id(name.c_str()))) diff --git a/src/driver/pictureviewer/resize.cpp b/src/driver/pictureviewer/resize.cpp deleted file mode 100644 index 5da99fa09..000000000 --- a/src/driver/pictureviewer/resize.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include - -#include "pictureviewer.h" - -unsigned char * simple_resize(unsigned char * orgin,int ox,int oy,int dx,int dy) -{ - unsigned char *cr,*p,*l; - int i,j,k,ip; - cr=(unsigned char*) malloc(dx*dy*3); - if(cr==NULL) - { - printf("Error: malloc\n"); - return(orgin); - } - l=cr; - - for(j=0;j=ox) - xb_v[i]=ox-1; - } - for(j=0;j=oy) yb=oy-1; - for(i=0;i -#include -#include -#include -#include -#include -#include - -#include "pig.h" - - - - -// Video4Linux API for PIG -// - -// -// -- Picture in Graphics Control -// -- This module is a Class to provide a PIG abstraction layer -// -- -// -- 2002-11 rasc -// -- 2003-06 rasc V4L Api -// - - - -// -// -- Constructor -// - -CPIG::CPIG() -{ - fd = -1; - status = CLOSED; -} - - -CPIG::CPIG(int pig_nr) -{ - fd = -1; - status = CLOSED; - fd = pigopen (pig_nr); -} - - -CPIG::CPIG(int pig_nr, int x, int y, int w, int h) -{ - fd = -1; - status = CLOSED; - fd = pigopen (pig_nr); - set_coord (x,y, w,h); - -} - -CPIG::~CPIG() -{ - pigclose (); // cleanup anyway!! - -} - - -// -// -- open PIG #nr -// -- return >=0: ok -// - -int CPIG::pigopen (int pig_nr) -{ - - char *pigdevs[] = { - PIG_DEV "0" // PIG device 0 - // PIG_DEV "1", // PIG device 1 - // PIG_DEV "2", // PIG device ... - // PIG_DEV "3" - }; - - - if ( (pig_nr>0) || (pig_nr < (int)(sizeof (pigdevs)/sizeof(char *))) ) { - - if (fd < 0) { - fd = open( pigdevs[pig_nr], O_RDWR ); - if (fd >= 0) { - status = HIDE; - px = py = pw = ph = 0; - } - return fd; - } - - } - - return -1; -} - - -// -// -- close PIG -// - -void CPIG::pigclose () -{ - if (fd >=0 ) { - close (fd); - fd = -1; - status = CLOSED; - px = py = pw = ph = 0; - } - return; -} - - -// -// -- set PIG Position -// -- routines should be self explaining -// - -void CPIG::_set_window (int x, int y, int w, int h) -{ -#if 1 - // -- Modul interne Routine - struct v4l2_crop crop; - struct v4l2_format coord; -// int err; - - crop.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; - err = ioctl(fd, VIDIOC_G_CROP, &crop); - - // take whole input frame - crop.c.left = 0; - crop.c.top = 0; - crop.c.width = 720; - crop.c.height = 576; - /*err =*/ ioctl(fd, VIDIOC_S_CROP, &crop); - - coord.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; - /*err = */ioctl(fd, VIDIOC_G_FMT, &coord); - - // fit into small window - coord.fmt.win.w.left = x; - coord.fmt.win.w.top = y; - coord.fmt.win.w.width = w; - coord.fmt.win.w.height = h; - - err = ioctl(fd, VIDIOC_S_FMT, &coord); -#if 0 // old - struct v4l2_format coord; - int err; - - ioctl(fd, VIDIOC_G_FMT, &coord); - coord.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; - - coord.fmt.win.w.left = x; - coord.fmt.win.w.top = y; - coord.fmt.win.w.width = w; - coord.fmt.win.w.height = h; - - int pigmode = 0; - /*err =*/ ioctl(fd, VIDIOC_OVERLAY, &pigmode); -printf("pig::window VIDIOC_OVERLAY %d\n", err); - - err = ioctl(fd, VIDIOC_S_FMT, &coord); -printf("pig::window VIDIOC_S_FMT %d\n", err); -#endif -#else - avia_pig_set_pos(fd,x,y); - avia_pig_set_size(fd, w, h); - avia_pig_set_stack(fd,2); -#endif -} - - -void CPIG::set_coord (int x, int y, int w, int h) -{ - - if (( x != px ) || ( y != py )) { - px = x; - py = y; - pw = w; - ph = h; - _set_window (px,py,pw,ph); - } - -} - - -void CPIG::set_xy (int x, int y) -{ - - if (( x != px ) || ( y != py )) { - px = x; - py = y; - _set_window (px,py,pw,ph); - } - -} - - -void CPIG::set_size (int w, int h) -{ - - if (( w != pw ) || ( h != ph )) { - pw = w; - ph = h; - _set_window (px,py,pw,ph); - } - -} - - -// $$$ ???? what this for? - -//void CPIG::set_source (int x, int y) -//{ -// -// if (fd >= 0) { -// -// if (( x != px ) || ( y != py )) { -// // avia_pig_set_source(fd,x,y); -// } -// -// } -// -//} - - -// -// -- routine set's stack position of PIG on display -// - -//void CPIG::set_stackpos (int pos) -// -//{ -// if (fd >= 0) { -// avia_pig_set_stack(fd,pos); -// stackpos = pos; -// } -//} - - -// -// -- Show PIG or hide PIG -// - -void CPIG::show (int x, int y, int w, int h) -{ - set_coord (x,y, w,h); - show (); -} - -void CPIG::show (void) -{ - if ( fd >= 0 ) { -#if 1 - int pigmode = 1; - int err; - err = ioctl(fd, VIDIOC_OVERLAY, &pigmode); -//printf("pig::show err %d\n", err); -#else - avia_pig_show(fd); -#endif - status = SHOW; - } -} - -void CPIG::hide (void) -{ - if ( fd >= 0 ) { -#if 1 - int pigmode = 0; - int err; - err = ioctl(fd, VIDIOC_OVERLAY, &pigmode); -#else - avia_pig_hide(fd); -#endif - status = HIDE; - } -} - - -CPIG::PigStatus CPIG::getStatus(void) -{ - return status; - -} - - - - - -// -// ToDo's: -// -- Capability unavail check/status -// -- Cropping for resizing (possible zoom/scaling?) -// -- Capturing -// - diff --git a/src/driver/pig.h b/src/driver/pig.h deleted file mode 100644 index c88cda236..000000000 --- a/src/driver/pig.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - - 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. -*/ - - -#ifndef __PIG_CONTROL__ -#define __PIG_CONTROL__ -#include -using namespace std; - - -// -// -- Picture in Graphics Control -// -- 2002-11 rasc -// -- 2003-06 rasc V4L API -// - - - -#if 1 -#include - -#define PIG_DEV "/dev/v4l/video" // PigNr will be appended! -#else -#include -#define PIG_DEV "/dev/dbox/pig" -#endif - - -class CPIG -{ - public: - CPIG (); - CPIG (int pig_nr); // incl. open - CPIG (int pig_nr, int x, int y, int w, int h); // open + set_coord - ~CPIG (); - - int pigopen (int pig_nr); - void pigclose (void); - void set_coord (int x, int y, int w, int h); - void set_xy (int x, int y); - void set_size (int w, int h); -// void set_source(int x, int y); -// void set_stackpos (int pos); - void show (void); - void show (int x, int y, int w, int h); - void hide (void); - - enum PigStatus { CLOSED, HIDE, SHOW }; - PigStatus getStatus(void); - - private: - void _set_window (int x, int y, int w, int h); - - int fd; // io descriptor - int px, py, pw, ph; // pig frame - int stackpos; // Order (Framebuffer, PIGs) - PigStatus status; // on display? - - -}; - - -#endif - - diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index c064c5fd0..30f970f71 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -285,7 +284,8 @@ void CRCInput::restartInput() close(); open(); } - +#if 0 +//never used int CRCInput::messageLoop( bool anyKeyCancels, int timeout ) { neutrino_msg_t msg; @@ -336,6 +336,7 @@ int CRCInput::messageLoop( bool anyKeyCancels, int timeout ) } return res; } +#endif int CRCInput::addTimer(uint64_t Interval, bool oneshot, bool correct_time ) { @@ -539,7 +540,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 #endif while(1) { timer_id = 0; - if ( timers.size()> 0 ) + if ( !timers.empty() ) { #ifdef USE_GETTIMEOFDAY gettimeofday( &tv, NULL ); @@ -1143,6 +1144,7 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); } else if (emsg.initiatorID == CEventServer::INITID_NEUTRINO) { +#if 0 if ((emsg.eventID == NeutrinoMessages::EVT_RECORDING_ENDED) && (read_bytes == sizeof(stream2file_status2_t))) { @@ -1150,6 +1152,7 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); *data = (neutrino_msg_data_t) p; dont_delete_p = true; } +#endif } else if (emsg.initiatorID == CEventServer::INITID_GENERIC_INPUT_EVENT_PROVIDER) { @@ -1556,7 +1559,8 @@ void CRCInput::close_click() void CRCInput::open_click() { } - +#if 0 +//never used void CRCInput::reset_dsp(int /*rate*/) { } @@ -1564,7 +1568,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 5a5bbe4dc..269a4b442 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -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 @@ -50,8 +49,7 @@ #include #include -#include -#include +#include #include #include #include @@ -64,7 +62,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); @@ -134,7 +131,7 @@ void CRecordInstance::WaitRecMsg(time_t StartTime, time_t WaitTime) usleep(100000); } -record_error_msg_t CRecordInstance::Start(CZapitChannel * channel /*, APIDList &apid_list*/) +record_error_msg_t CRecordInstance::Start(CZapitChannel * channel) { int fd; std::string tsfile; @@ -142,7 +139,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]); @@ -175,7 +172,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel /*, APIDList & record->Open(); - if(!record->Start(fd, (unsigned short ) allpids.PIDs.vpid, (unsigned short *) apids, numpids)) { + if(!record->Start(fd, (unsigned short ) allpids.PIDs.vpid, (unsigned short *) apids, numpids, channel_id)) { /* Stop do close fd */ record->Stop(); delete record; @@ -193,11 +190,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(); @@ -219,7 +211,7 @@ 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(); @@ -295,7 +287,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); @@ -328,7 +320,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; @@ -351,12 +343,12 @@ 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)) { @@ -366,11 +358,11 @@ void CRecordInstance::ProcessAPIDnames() 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; @@ -522,7 +514,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis info2 = epgdata.info2; recMovieInfo->parentalLockAge = epgdata.fsk; - if(epgdata.contentClassification.size() > 0 ) + if( !epgdata.contentClassification.empty() ) recMovieInfo->genreMajor = epgdata.contentClassification[0]; recMovieInfo->length = epgdata.epg_times.dauer / 60; @@ -547,7 +539,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); @@ -555,10 +547,10 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis } } /* FIXME sometimes no apid in xml ?? */ - if(recMovieInfo->audioPids.empty() && allpids.APIDs.size()) { + 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); @@ -606,16 +598,16 @@ 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); @@ -639,7 +631,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; } @@ -652,7 +644,9 @@ void CRecordInstance::GetRecordString(std::string &str) str = "Unknown channel : " + GetEpgTitle(); return; } - str = channel->getName() + ": " + GetEpgTitle(); + char stime[15]; + strftime(stime, sizeof(stime), "%H:%M:%S ", localtime(&start_time)); + str = stime + channel->getName() + ": " + GetEpgTitle(); } //------------------------------------------------------------------------- @@ -664,7 +658,7 @@ CRecordManager::CRecordManager() StreamVTxtPid = false; StreamPmtPid = false; StopSectionsd = false; - recordingstatus = 0; + //recordingstatus = 0; recmap.clear(); nextmap.clear(); autoshift = false; @@ -699,36 +693,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)) @@ -742,13 +766,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) @@ -771,7 +816,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); } @@ -786,36 +831,34 @@ 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; - if(recmap.size()) + if( !recmap.empty() ) StopSectionsd = true; #endif 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); @@ -824,21 +867,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; } @@ -867,7 +909,7 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons LOCALE_STREAMING_WRITE_ERROR )); // UTF-8 return false; } - + return true; } @@ -879,10 +921,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); @@ -890,29 +930,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() { @@ -920,9 +961,10 @@ 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(recmap.size() > 0) { +#if 0 + bool tested = true; + if( !recmap.empty() ) { CRecordInstance * inst = FindInstance(eventinfo->channel_id); /* same channel recording and not auto - skip */ if(inst && !inst->Timeshift()) @@ -933,21 +975,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; @@ -958,7 +1007,7 @@ bool CRecordManager::RecordingStatus(const t_channel_id channel_id) CRecordInstance * inst = FindInstance(channel_id); ret = (inst != NULL); } else - ret = recmap.size() != 0; + ret = !recmap.empty(); mutex.unlock(); return ret; @@ -972,17 +1021,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)); } } @@ -990,52 +1040,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) { @@ -1054,7 +1107,7 @@ bool CRecordManager::Stop(const CTimerd::RecordingStopInfo * recinfo) mutex.unlock(); StopPostProcess(); - + return ret; } @@ -1099,6 +1152,7 @@ int CRecordManager::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data return messages_return::unhandled; } +#if 0 bool CRecordManager::IsTimeshift(t_channel_id channel_id) { bool ret = false; @@ -1111,12 +1165,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; @@ -1129,44 +1182,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); @@ -1186,76 +1251,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++; @@ -1263,34 +1276,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; @@ -1312,38 +1333,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); @@ -1353,10 +1376,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++; @@ -1366,10 +1389,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); } @@ -1382,26 +1405,30 @@ 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; 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(); inst->GetRecordString(title); @@ -1457,63 +1484,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.size()) + 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.size()) { - 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; @@ -1522,6 +1540,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) { @@ -1546,27 +1566,31 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mo void CRecordManager::RestoreNeutrino(void) { - if(recmap.size()) + if(!recmap.empty()) return; /* 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() { @@ -1616,7 +1640,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) { @@ -1640,7 +1665,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; @@ -1681,20 +1706,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 a973d972c..05c226e82 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 @@ -71,7 +70,7 @@ class CRecordInstance { private: typedef struct { - unsigned short apid; + uint32_t apid; unsigned int index;//FIXME not used ? bool ac3; } APIDDesc; @@ -105,7 +104,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); @@ -117,6 +116,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); @@ -128,13 +128,14 @@ class CRecordInstance 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; @@ -153,13 +154,16 @@ class CRecordManager : public CMenuTarget, public CChangeObserver 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 @@ -181,13 +185,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); @@ -205,17 +209,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/rfmod.cpp b/src/driver/rfmod.cpp deleted file mode 100644 index 5cbe6f071..000000000 --- a/src/driver/rfmod.cpp +++ /dev/null @@ -1,134 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include -#include -#include -#include - -#define RFMOD_DEV "/dev/rfmod0" -#define IOCTL_SET_CHANNEL 0 -#define IOCTL_SET_TESTMODE 1 -#define IOCTL_SET_SOUNDENABLE 2 -#define IOCTL_SET_SOUNDSUBCARRIER 3 -#define IOCTL_SET_FINETUNE 4 -#define IOCTL_SET_STANDBY 5 - -#define C0 3 -#define C1 2 -#define FL 1 -#define FM 0 - -RFmod::RFmod() -{ - rfmodfd=open(RFMOD_DEV, O_RDWR); -} - -void RFmod::init() -{ - soundsubcarrier=g_settings.rf_subcarrier; - soundenable=g_settings.rf_soundenable; - channel = g_settings.rf_channel; - finetune = g_settings.rf_finetune; - standby = g_settings.rf_standby; - - setSoundSubCarrier(soundsubcarrier); - setSoundEnable(soundenable); - setChannel(channel); - setFinetune(finetune); - setStandby(standby); - setTestPattern(0); -} - -RFmod::~RFmod() -{ - if (rfmodfd>=0) - close(rfmodfd); -} - -int RFmod::setSoundEnable(int val) -{ - soundenable = val; -//printf("RF sound: %d\n", val); - if(rfmodfd > 0) - ioctl(rfmodfd,IOCTL_SET_SOUNDENABLE,&soundenable); - - return 0; -} - -int RFmod::setStandby(int val) -{ - standby = val; -//printf("RF standby: %d\n", val); - - if(rfmodfd > 0) - ioctl(rfmodfd,IOCTL_SET_STANDBY,&standby); - - return 0; -} - -int RFmod::setChannel(int val) -{ - channel = val; -//printf("RF channel: %d\n", val); - - if(rfmodfd > 0) - ioctl(rfmodfd,IOCTL_SET_CHANNEL,&channel); - - return 0; -} - -int RFmod::setFinetune(int val) -{ - finetune = val; -//printf("RF finetune: %d\n", val); - - if(rfmodfd > 0) - ioctl(rfmodfd,IOCTL_SET_FINETUNE,&finetune); - - return 0; -} - -int RFmod::setTestPattern(int val) -{ -//printf("RF test: %d\n", val); - if(rfmodfd > 0) - ioctl(rfmodfd,IOCTL_SET_TESTMODE,&val); - - return 0; -} - - -int RFmod::setSoundSubCarrier(int freq) //freq in KHz -{ -//printf("RF carrier: %d\n", freq); - soundsubcarrier=freq; -/* - switch(freq) - { - case 4500: - sfd=0; - break; - case 5500: - sfd=1; - break; - case 6000: - sfd=2; - break; - case 6500: - sfd=3; - break; - default: - return -1; - } -*/ - if(rfmodfd > 0) - ioctl(rfmodfd,IOCTL_SET_SOUNDSUBCARRIER,&soundsubcarrier); - - return 0; -} diff --git a/src/driver/rfmod.h b/src/driver/rfmod.h deleted file mode 100644 index 31b669077..000000000 --- a/src/driver/rfmod.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __erfmod_h -#define __erfmod_h - - -class RFmod -{ - int channel,soundsubcarrier,soundenable,finetune,standby; - -public: - RFmod(); - ~RFmod(); - - int rfmodfd; - void init(); - - int setChannel(int channel); - int setSoundSubCarrier(int val); - int setSoundEnable(int val); - int setStandby(int val); - int setFinetune(int val); - int setTestPattern(int val); -}; -#endif diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index 6ae11889f..7aea07577 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -126,6 +126,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 +138,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() { diff --git a/src/driver/showframe.c b/src/driver/showframe.c deleted file mode 100644 index a00afd1b0..000000000 --- a/src/driver/showframe.c +++ /dev/null @@ -1,80 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define VIDEO_DEV "/dev/dvb/card0/video0" -#define VIDEO_SET_AUTOFLUSH _IOW('o', 2, int) - -void showframe(char * fname) -{ - int file, size; - char *buffer; - - file=open(fname, O_RDONLY); - if (file < 0) - return; - size=lseek(file, 0, SEEK_END); - lseek(file, 0, SEEK_SET); - if (size < 0) - { - close(file); - return; - } - buffer = malloc(size); - read(file, buffer, size); - close(file); - displayIFrame(buffer, size); - free(buffer); - return; -} -static int displayIFrame(const char *frame, int len) -{ - int fdv, fdvideo, i; - fdv=open("/dev/video", O_WRONLY); - if (fdv < 0) { - printf("cant open /dev/video\n"); - return -1; - } - - fdvideo = open(VIDEO_DEV, O_RDWR); - if (fdvideo < 0) { - colose(fdv);//Resource leak: fdv - printf("cant open %s\n", VIDEO_DEV); - return -1; - } - if (ioctl(fdvideo, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY ) <0) - printf("VIDEO_SELECT_SOURCE failed \n"); - if (ioctl(fdvideo, VIDEO_CLEAR_BUFFER) <0 ) - printf("VIDEO_CLEAR_BUFFER failed \n"); - if (ioctl(fdvideo, VIDEO_PLAY) < 0 ) - printf("VIDEO_PLAY failed\n"); - - for (i=0; i < 2; i++ ) - write(fdv, frame, len); - - unsigned char buf[128]; - memset(&buf, 0, 128); - write(fdv, buf, 128); - - if ( ioctl(fdv, VIDEO_SET_AUTOFLUSH, 0) < 0 ) - printf("VIDEO_SET_AUTOFLUSH off failed\n"); - - if (ioctl(fdvideo, VIDEO_SET_BLANK, 0) < 0 ) - printf("VIDEO_SET_BLANK failed\n"); - - close(fdvideo); - if ( ioctl(fdv, VIDEO_SET_AUTOFLUSH, 1) < 0 ) - printf("VIDEO_SET_AUTOFLUSH on failed\n"); - - close(fdv); - return 0; -} - diff --git a/src/driver/shutdown_count.cpp b/src/driver/shutdown_count.cpp index c9219f583..9bf77c2f1 100644 --- a/src/driver/shutdown_count.cpp +++ b/src/driver/shutdown_count.cpp @@ -34,6 +34,7 @@ #include #include +#include SHTDCNT::SHTDCNT() diff --git a/src/driver/slotbuffer.c b/src/driver/slotbuffer.c deleted file mode 100644 index 9b50e6875..000000000 --- a/src/driver/slotbuffer.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * $Header: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/slotbuffer.c,v 1.1 2004/06/03 09:51:54 thegoodguy Exp $ - * - * (C) 2004 by thegoodguy - * - * 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. - * - */ - -/* Note: this slotbuffer "wastes" one slot */ - -#include "slotbuffer.h" -#include - -slotbuffer_t * slotbuffer_construct(const size_t size) -{ - slotbuffer_t * slotbuffer; - - slotbuffer = malloc(sizeof(slotbuffer_t)); - - slotbuffer->buffer = malloc(size); - slotbuffer->size = size; - slotbuffer->read_pointer = 0; - slotbuffer->write_pointer = 0; - - return slotbuffer; -} - -void slotbuffer_destruct(slotbuffer_t * const slotbuffer) -{ - free(slotbuffer->buffer); - free(slotbuffer); -} - -size_t slotbuffer_remaining_read_space(slotbuffer_t * const slotbuffer) -{ - ssize_t delta; - - delta = slotbuffer->write_pointer; - delta -= slotbuffer->read_pointer; - - return (delta >= 0) ? (size_t)delta : (size_t)(delta + slotbuffer->size); -} - -size_t slotbuffer_remaining_write_space(slotbuffer_t * const slotbuffer) -{ - ssize_t delta; - - delta = slotbuffer->read_pointer; - delta -= slotbuffer->write_pointer; - - return ((delta > 0) ? (size_t)delta : (size_t)(delta + slotbuffer->size)) - 1; -} - -size_t slotbuffer_remaining_continuous_read_space(slotbuffer_t * const slotbuffer) -{ - ssize_t delta; - size_t read_pointer; - - delta = slotbuffer->write_pointer; - read_pointer = slotbuffer->read_pointer; - delta -= read_pointer; - - return (delta >= 0) ? (size_t)delta : (size_t)(slotbuffer->size - read_pointer); -} - -size_t slotbuffer_remaining_continuous_write_space(slotbuffer_t * const slotbuffer) -{ - ssize_t delta; - size_t write_pointer; - - delta = slotbuffer->read_pointer; - - if (delta == 0) - return (slotbuffer->size - slotbuffer->write_pointer - 1); - - write_pointer = slotbuffer->write_pointer; - delta -= write_pointer; - - return (delta > 0) ? (size_t)(delta - 1) : (size_t)(slotbuffer->size - write_pointer); -} - -void slotbuffer_advance_read_pointer(slotbuffer_t * const slotbuffer, const size_t delta) -{ - slotbuffer->read_pointer += delta; - if (slotbuffer->read_pointer >= slotbuffer->size) - slotbuffer->read_pointer = 0; -} - -void slotbuffer_advance_write_pointer(slotbuffer_t * const slotbuffer, const size_t delta) -{ - slotbuffer->write_pointer += delta; - if (slotbuffer->write_pointer >= slotbuffer->size) - slotbuffer->write_pointer = 0; -} diff --git a/src/driver/slotbuffer.h b/src/driver/slotbuffer.h deleted file mode 100644 index 07266f62d..000000000 --- a/src/driver/slotbuffer.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __slotbuffer_h__ -#define __slotbuffer_h__ - -/* - * $Header: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/slotbuffer.h,v 1.1 2004/06/03 09:51:54 thegoodguy Exp $ - * - * (C) 2004 by thegoodguy - * - * 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. - * - */ - -#include - -typedef struct -{ - unsigned char * buffer; - size_t size; - volatile size_t read_pointer; - volatile size_t write_pointer; -} slotbuffer_t; - -slotbuffer_t * slotbuffer_construct (size_t const size ); -void slotbuffer_destruct (slotbuffer_t * const slotbuffer ); -size_t slotbuffer_remaining_read_space (slotbuffer_t * const slotbuffer ); -size_t slotbuffer_remaining_write_space (slotbuffer_t * const slotbuffer ); -size_t slotbuffer_remaining_continuous_read_space (slotbuffer_t * const slotbuffer ); -size_t slotbuffer_remaining_continuous_write_space(slotbuffer_t * const slotbuffer ); -void slotbuffer_advance_read_pointer (slotbuffer_t * const slotbuffer, size_t const delta); -void slotbuffer_advance_write_pointer (slotbuffer_t * const slotbuffer, size_t const delta); - -#endif diff --git a/src/driver/stacktrace.h b/src/driver/stacktrace.h deleted file mode 100644 index 49a5e5c0a..000000000 --- a/src/driver/stacktrace.h +++ /dev/null @@ -1,93 +0,0 @@ -// stacktrace.h (c) 2008, Timo Bingmann from http://idlebox.net/ -// published under the WTFPL v2.0 - -#ifndef _STACKTRACE_H_ -#define _STACKTRACE_H_ - -#include -#include -#include -#include - -/** Print a demangled stack backtrace of the caller function to FILE* out. */ -static inline void print_stacktrace(FILE *out = stderr, unsigned int max_frames = 63) -{ - fprintf(out, "stack trace:\n"); - - // storage array for stack trace address data - void* addrlist[max_frames+1]; - - // retrieve current stack addresses - int addrlen = backtrace(addrlist, sizeof(addrlist) / sizeof(void*)); - - if (addrlen == 0) { - fprintf(out, " \n"); - return; - } - - // resolve addresses into strings containing "filename(function+address)", - // this array must be free()-ed - char** symbollist = backtrace_symbols(addrlist, addrlen); - - // allocate string which will be filled with the demangled function name - size_t funcnamesize = 256; - char* funcname = (char*)malloc(funcnamesize); - - // iterate over the returned symbol lines. skip the first, it is the - // address of this function. - for (int i = 1; i < addrlen; i++) - { - char *begin_name = 0, *begin_offset = 0, *end_offset = 0; - - // find parentheses and +address offset surrounding the mangled name: - // ./module(function+0x15c) [0x8048a6d] - for (char *p = symbollist[i]; *p; ++p) - { - if (*p == '(') - begin_name = p; - else if (*p == '+') - begin_offset = p; - else if (*p == ')' && begin_offset) { - end_offset = p; - break; - } - } - - if (begin_name && begin_offset && end_offset - && begin_name < begin_offset) - { - *begin_name++ = '\0'; - *begin_offset++ = '\0'; - *end_offset = '\0'; - - // mangled name is now in [begin_name, begin_offset) and caller - // offset in [begin_offset, end_offset). now apply - // __cxa_demangle(): - - int status; - char* ret = abi::__cxa_demangle(begin_name, - funcname, &funcnamesize, &status); - if (status == 0) { - funcname = ret; // use possibly realloc()-ed string - fprintf(out, " %s : %s+%s\n", - symbollist[i], funcname, begin_offset); - } - else { - // demangling failed. Output function name as a C function with - // no arguments. - fprintf(out, " %s : %s()+%s\n", - symbollist[i], begin_name, begin_offset); - } - } - else - { - // couldn't parse the line? print the whole line. - fprintf(out, " %s\n", symbollist[i]); - } - } - - free(funcname); - free(symbollist); -} - -#endif // _STACKTRACE_H_ diff --git a/src/driver/stream2file.cpp b/src/driver/stream2file.cpp deleted file mode 100644 index c6a836c44..000000000 --- a/src/driver/stream2file.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* - * $Id: stream2file.cpp,v 1.19 2005/01/12 20:40:22 chakazulu Exp $ - * - * streaming to file/disc - * - * Copyright (C) 2004 Axel Buehning , - * thegoodguy - * - * based on code which is - * Copyright (C) 2001 TripleDES - * Copyright (C) 2000, 2001 Marcus Metzler - * Copyright (C) 2002 Andreas Oberritter - * - * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * Or, point your browser to http://www.gnu.org/copyleft/gpl.html - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if HAVE_COOL_HARDWARE -#include -#include -#endif -#if HAVE_TRIPLEDRAGON -#include -#include -#endif -#include -#include -#include - -extern "C" { -#include -} - -static cRecord * record = NULL; -extern CZapitChannel *g_current_channel; -extern CCam *cam0; - -extern bool autoshift; -extern bool autoshift_delete; - -#define MAXPIDS 64 -#define FILENAMEBUFFERSIZE 1024 - -static stream2file_status_t exit_flag = STREAM2FILE_STATUS_IDLE; - -char rec_filename[FILENAMEBUFFERSIZE]; - -stream2file_error_msg_t start_recording(const char * const filename, - const char * const info, const unsigned short vpid, const unsigned short * const pids, - const unsigned int numpids) -{ - int fd; - char buf[FILENAMEBUFFERSIZE]; - struct statfs s; - - if(autoshift) - sprintf(rec_filename, "%s_temp", filename); - else - sprintf(rec_filename, "%s", filename); - - // write stream information (should wakeup the disk from standby, too) - sprintf(buf, "%s.xml", rec_filename); - - char * dir = strdup(buf); - int ret = statfs(dirname(dir), &s); - free(dir); - if((ret != 0) || (s.f_type == 0x72b6) || (s.f_type == 0x24051905)) { - return STREAM2FILE_INVALID_DIRECTORY; - } - if ((fd = open(buf, O_SYNC | O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) >= 0) { - write(fd, info, strlen(info)); - fdatasync(fd); - close(fd); - } else { - return STREAM2FILE_INVALID_DIRECTORY; - } - - exit_flag = STREAM2FILE_STATUS_RUNNING; - - sprintf(buf, "%s.ts", rec_filename); - - printf("Record start: file %s vpid %x apid %x\n", buf, vpid, pids[0]); - - fd = open(buf, O_CREAT | O_RDWR | O_LARGEFILE | O_TRUNC , S_IRWXO | S_IRWXG | S_IRWXU); - if(fd < 0) { - perror(buf); - return STREAM2FILE_INVALID_DIRECTORY; - } - genpsi(fd); - - if(!record) - record = new cRecord(2); - - record->Open(numpids); - - if(!record->Start(fd, (unsigned short ) vpid, (unsigned short *) pids, numpids)) { - record->Stop(); - delete record; - record = NULL; - return STREAM2FILE_INVALID_DIRECTORY; - } - if(g_current_channel) { - cam0->setCaPmt(g_current_channel->getCaPmt(), DEMUX_SOURCE_0, cam0->getCaMask() | DEMUX_DECODE_2 /*5*/, true); // demux 0 + 2, update - - int len; - unsigned char * pmt = g_current_channel->getRawPmt(len); - cCA * ca = cCA::GetInstance(); - ca->SendPMT(DEMUX_SOURCE_2, pmt, len); - } - - CVFD::getInstance()->ShowIcon(VFD_ICON_CAM1, true); - - return STREAM2FILE_OK; -} - -stream2file_error_msg_t stop_recording(const char * const info) -{ - char buf[FILENAMEBUFFERSIZE]; - char buf1[FILENAMEBUFFERSIZE]; - int fd; - stream2file_error_msg_t ret = STREAM2FILE_RECORDING_THREADS_FAILED; - - //if(!autoshift || autoshift_delete) - { - sprintf(buf, "%s.xml", rec_filename); - if ((fd = open(buf, O_SYNC | O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) >= 0) { - write(fd, info, strlen(info)); - fdatasync(fd); - close(fd); - } - } - - if(record) { - record->Stop(); - delete record; - record = NULL; - } - - if (exit_flag == STREAM2FILE_STATUS_RUNNING) { - exit_flag = STREAM2FILE_STATUS_IDLE; - ret = STREAM2FILE_OK; - } - else - ret = STREAM2FILE_RECORDING_THREADS_FAILED; - - if((autoshift && g_settings.auto_delete) || autoshift_delete) { - sprintf(buf, "rm -f %s.ts &", rec_filename); - sprintf(buf1, "%s.xml", rec_filename); - autoshift_delete = false; - system(buf); - unlink(buf1); - } - CVFD::getInstance()->ShowIcon(VFD_ICON_CAM1, false); - - rec_filename[0] = 0; - return ret; -} - -stream2file_error_msg_t update_recording(const char * const info, const unsigned short vpid, - const unsigned short * const pids, const unsigned int numpids) -{ -// stream2file_error_msg_t ret; - char buf[FILENAMEBUFFERSIZE]; - int fd; - - sprintf(buf, "%s.xml", rec_filename); - if ((fd = open(buf, O_SYNC | O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) >= 0) { - write(fd, info, strlen(info)); - fdatasync(fd); - close(fd); - } - if(record) - record->ChangePids((unsigned short) vpid, (unsigned short *) pids, numpids); - - if(g_current_channel) - cam0->setCaPmt(g_current_channel->getCaPmt(), DEMUX_SOURCE_0, cam0->getCaMask() | DEMUX_DECODE_0 | DEMUX_DECODE_2, true); - - return STREAM2FILE_OK /*ret*/; -} diff --git a/src/driver/stream2file.h b/src/driver/stream2file.h deleted file mode 100644 index 059bca9d4..000000000 --- a/src/driver/stream2file.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Id: stream2file.h,v 1.10 2005/01/12 20:40:22 chakazulu Exp $ - * - * (C) 2004 by thegoodguy - * - * 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. - * - */ - -#ifndef __stream2file_h__ -#define __stream2file_h__ - -enum stream2file_error_msg_t -{ - STREAM2FILE_OK = 0, - STREAM2FILE_BUSY = -1, - STREAM2FILE_INVALID_DIRECTORY = -2, - STREAM2FILE_INVALID_PID = -3, - STREAM2FILE_PES_FILTER_FAILURE = -4, - STREAM2FILE_DVR_OPEN_FAILURE = -5, - STREAM2FILE_RECORDING_THREADS_FAILED = -6 -}; - -enum stream2file_status_t -{ - STREAM2FILE_STATUS_RUNNING = 0, - STREAM2FILE_STATUS_IDLE = 1, - STREAM2FILE_STATUS_BUFFER_OVERFLOW = -1, - STREAM2FILE_STATUS_WRITE_OPEN_FAILURE = -2, - STREAM2FILE_STATUS_WRITE_FAILURE = -3, - STREAM2FILE_STATUS_READ_FAILURE = -4 -}; - -struct stream2file_status2_t -{ - stream2file_status_t status; - char dir[100]; -}; - -stream2file_error_msg_t start_recording(const char * const filename, - const char * const info, - const unsigned short vpid, - const unsigned short * const apids, - const unsigned int numpids); -stream2file_error_msg_t stop_recording(const char * const info); -stream2file_error_msg_t update_recording(const char * const info, - const unsigned short vpid, - const unsigned short * const apids, - const unsigned int numpids); - -#endif diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index dfd70d8bf..ec2633bc0 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include @@ -208,8 +208,6 @@ void streamts_main_thread(void * /*data*/) if (pfd[i].revents & (POLLIN | POLLPRI | POLLHUP | POLLRDHUP)) { printf("fd %d has events %x\n", pfd[i].fd, pfd[i].revents); if (pfd[i].fd == listenfd) { - if(connfd >= 0) - close(connfd); connfd = accept (listenfd, (struct sockaddr *) &servaddr, (socklen_t *) & clilen); printf("new connection, fd %d\n", connfd); if(connfd < 0) { @@ -315,7 +313,14 @@ void * streamts_live_thread(void *data) if(demuxfd_count == 0) { printf("No pids!\n"); - return 0; + CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel(); + if(!channel) + return 0; + pids[demuxfd_count++] = 0; + pids[demuxfd_count++] = channel->getPmtPid(); + pids[demuxfd_count++] = channel->getVideoPid(); + for (int i = 0; i < channel->getAudioChannelCount(); i++) + pids[demuxfd_count++] = channel->getAudioChannel(i)->pid; } buf = (unsigned char *) malloc(IN_SIZE); @@ -352,7 +357,8 @@ void * streamts_live_thread(void *data) close(fd); return 0; } - +#if 0 +//never used void streamts_file_thread(void *data) { int dvrfd; @@ -453,3 +459,4 @@ void streamts_file_thread(void *data) return; } +#endif \ No newline at end of file diff --git a/src/driver/vcrcontrol.cpp b/src/driver/vcrcontrol.cpp deleted file mode 100644 index d0570cd82..000000000 --- a/src/driver/vcrcontrol.cpp +++ /dev/null @@ -1,963 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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 -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ -int was_record = 0; -extern bool autoshift; -extern bool autoshift_delete; - -#define SA struct sockaddr -#define SAI struct sockaddr_in -extern "C" { -#include -} - -extern t_channel_id rec_channel_id; - -static CVCRControl vcrControl; - -CVCRControl * CVCRControl::getInstance() -{ - return &vcrControl; -} - -//------------------------------------------------------------------------- -CVCRControl::CVCRControl() -{ - Device = NULL; -} - -//------------------------------------------------------------------------- -CVCRControl::~CVCRControl() -{ - unregisterDevice(); -} - -//------------------------------------------------------------------------- -void CVCRControl::unregisterDevice() -{ - if (Device) - { - delete Device; - Device = NULL; - } -} - -//------------------------------------------------------------------------- -void CVCRControl::registerDevice(CDevice * const device) -{ - unregisterDevice(); - - Device = device; - if(CNeutrinoApp::getInstance()->recordingstatus) - Device->deviceState = CMD_VCR_RECORD; -} - -//------------------------------------------------------------------------- -bool CVCRControl::Record(const CTimerd::RecordingInfo * const eventinfo) -{ - int mode = g_Zapit->isChannelTVChannel(eventinfo->channel_id) ? NeutrinoMessages::mode_tv : NeutrinoMessages::mode_radio; - - return Device->Record(eventinfo->channel_id, mode, eventinfo->epgID, eventinfo->epgTitle, eventinfo->apids, eventinfo->epg_starttime); -} - -MI_MOVIE_INFO * CVCRControl::GetMovieInfo(void) -{ - if(Device) - return Device->recMovieInfo; - return NULL; -} - -bool CVCRControl::GetPids(unsigned short *vpid, unsigned short *vtype, unsigned short *apid, unsigned short *atype, unsigned short * apidnum, unsigned short * apids, unsigned short * atypes) -{ - if(Device) { - if(vpid) - *vpid = Device->rec_vpid; - if(vtype) - *vtype = Device->rec_vtype; - if(apid) - *apid = Device->rec_currentapid; - if(atype) - *atype = Device->rec_currentac3; - if(apidnum) { - *apidnum = Device->rec_numpida; - for(int i = 0; i < Device->rec_numpida; i++) { - if(apids) - apids[i] = Device->rec_apids[i]; - if(atypes) - atypes[i] = Device->rec_ac3flags[i]; - } - } - return true; - } - return false; -} - -//------------------------------------------------------------------------- -void CVCRControl::CDevice::getAPIDs(const unsigned char _apidmode, APIDList & apid_list) -{ - unsigned char apidmode = _apidmode; - - if (apidmode == TIMERD_APIDS_CONF) - apidmode = g_settings.recording_audio_pids_default; - - apid_list.clear(); - //CZapitClient::responseGetPIDs allpids; - g_Zapit->getPIDS(allpids); - - // assume smallest apid ist std apid - if (apidmode & TIMERD_APIDS_STD) { - uint32_t apid_min=UINT_MAX; - uint32_t apid_min_idx=0; - for(unsigned int i = 0; i < allpids.APIDs.size(); i++) { - if (allpids.APIDs[i].pid < apid_min && !allpids.APIDs[i].is_ac3) { - apid_min = allpids.APIDs[i].pid; - apid_min_idx = i; - } - } - if (apid_min != UINT_MAX) { - APIDDesc a = {apid_min, apid_min_idx, false}; - apid_list.push_back(a); - } - } - if (apidmode & TIMERD_APIDS_ALT) { - uint32_t apid_min=UINT_MAX; - uint32_t apid_min_idx=0; - for(unsigned int i = 0; i < allpids.APIDs.size(); i++) { - if (allpids.APIDs[i].pid < apid_min && !allpids.APIDs[i].is_ac3) { - apid_min = allpids.APIDs[i].pid; - apid_min_idx = i; - } - } - for(unsigned int i = 0; i < allpids.APIDs.size(); i++) { - if (allpids.APIDs[i].pid != apid_min && !allpids.APIDs[i].is_ac3) { - APIDDesc a = {allpids.APIDs[i].pid, i, false}; - apid_list.push_back(a); - } - } - } - if (apidmode & TIMERD_APIDS_AC3) { - bool ac3_found=false; - for(unsigned int i = 0; i < allpids.APIDs.size(); i++) { - if (allpids.APIDs[i].is_ac3) { - APIDDesc a = {allpids.APIDs[i].pid, i, true}; - apid_list.push_back(a); - ac3_found=true; - } - } - // add non ac3 apid if ac3 not found - if (!(apidmode & TIMERD_APIDS_STD) && !ac3_found) { - uint32_t apid_min=UINT_MAX; - uint32_t apid_min_idx=0; - for(unsigned int i = 0; i < allpids.APIDs.size(); i++) { - if (allpids.APIDs[i].pid < apid_min && !allpids.APIDs[i].is_ac3) { - apid_min = allpids.APIDs[i].pid; - apid_min_idx = i; - } - } - if (apid_min != UINT_MAX) { - APIDDesc a = {apid_min, apid_min_idx, false}; - apid_list.push_back(a); - } - } - } - // no apid selected use standard - if (apid_list.empty() && !allpids.APIDs.empty()) { - uint32_t apid_min=UINT_MAX; - uint32_t apid_min_idx=0; - for(unsigned int i = 0; i < allpids.APIDs.size(); i++) { - if (allpids.APIDs[i].pid < apid_min && !allpids.APIDs[i].is_ac3) { - apid_min = allpids.APIDs[i].pid; - apid_min_idx = i; - } - } - if (apid_min != UINT_MAX) { - APIDDesc a = {apid_min, apid_min_idx, false}; - apid_list.push_back(a); - } - for(APIDList::iterator it = apid_list.begin(); it != apid_list.end(); ++it) - printf("Record APID 0x%X %d\n",it->apid, it->ac3); - - } -} - -//------------------------------------------------------------------------- -bool CVCRControl::CVCRDevice::Stop() -{ - deviceState = CMD_VCR_STOP; - - if(last_mode != NeutrinoMessages::mode_scart) - { - g_RCInput->postMsg( NeutrinoMessages::VCR_OFF, 0 ); - g_RCInput->postMsg( NeutrinoMessages::CHANGEMODE , last_mode); - } - return true; -} - -//------------------------------------------------------------------------- -bool CVCRControl::CVCRDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& /*epgTitle*/, unsigned char apidmode, const time_t /*epg_time*/) -{ - printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " epg: %llx, apidmode 0x%X mode \n", - channel_id, epgid, apidmode); - - // leave menu (if in any) - g_RCInput->postMsg( CRCInput::RC_timeout, 0 ); - - last_mode = CNeutrinoApp::getInstance()->getMode(); - if(mode != last_mode) - CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap ); - - if(channel_id != 0) { - if(g_Zapit->getCurrentServiceID() != channel_id) - g_Zapit->zapTo_serviceID(channel_id); - } - if(! (apidmode & TIMERD_APIDS_STD)) { - APIDList apid_list; - getAPIDs(apidmode,apid_list); - if(!apid_list.empty()) { - if(!apid_list.begin()->ac3) - g_Zapit->setAudioChannel(apid_list.begin()->index); - else - g_Zapit->setAudioChannel(0); - } - else - g_Zapit->setAudioChannel(0); - } - else - g_Zapit->setAudioChannel(0); - - if(SwitchToScart) { - // Auf Scart schalten - CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::VCR_ON, 0 ); - // Das ganze nochmal in die queue, da obiges RC_timeout erst in der naechsten ev. loop ausgeführt wird - // und dann das menu widget das display falsch rücksetzt - g_RCInput->postMsg( NeutrinoMessages::VCR_ON, 0 ); - } - - deviceState = CMD_VCR_RECORD; - - return true; -} - -//------------------------------------------------------------------------- -void CVCRControl::CFileAndServerDevice::RestoreNeutrino(void) -{ -//printf("RestoreNeutrino\n");fflush(stdout); - /* after this zapit send EVT_RECORDMODE_DEACTIVATED, so neutrino getting NeutrinoMessages::EVT_RECORDMODE */ - g_Zapit->setRecordMode( false ); - if (!g_Zapit->isPlayBackActive() && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby)) - g_Zapit->startPlayBack(); - // alten mode wieder herstellen (ausser wen zwischenzeitlich auf oder aus sb geschalten wurde) - 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); - - if(last_mode == NeutrinoMessages::mode_standby && - CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_standby ) - { - //Wenn vorher und jetzt standby, dann die zapit wieder auf sb schalten - //g_Zapit->setStandby(true); - //was_record = 1; - } - if((last_mode != NeutrinoMessages::mode_standby) && StopSectionsd) - g_Sectionsd->setPauseScanning(false); -} - -void CVCRControl::CFileAndServerDevice::CutBackNeutrino(const t_channel_id channel_id, const int mode) -{ - rec_channel_id = channel_id; -//printf("CutBackNeutrino\n");fflush(stdout); - g_Zapit->setStandby(false); - last_mode = CNeutrinoApp::getInstance()->getMode(); - if(last_mode == NeutrinoMessages::mode_standby) - was_record = 1; - if (channel_id != 0) { - if (mode != last_mode && (last_mode != NeutrinoMessages::mode_standby || mode != CNeutrinoApp::getInstance()->getLastMode())) { - CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap ); - // Wenn wir im Standby waren, dann brauchen wir fürs streamen nicht aufwachen... - if(last_mode == NeutrinoMessages::mode_standby) - CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_standby); - } - if(g_Zapit->getCurrentServiceID() != channel_id) { - g_Zapit->zapTo_serviceID(channel_id); - } - } - if(StopSectionsd) // wenn sectionsd gestoppt werden soll - g_Sectionsd->setPauseScanning(true); // sectionsd stoppen - - /* after this zapit send EVT_RECORDMODE_ACTIVATED, so neutrino getting NeutrinoMessages::EVT_RECORDMODE */ - g_Zapit->setRecordMode( true ); - if((last_mode == NeutrinoMessages::mode_standby) || (StopPlayBack && g_Zapit->isPlayBackActive())) - g_Zapit->stopPlayBack(); -} - -bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); -bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); - -std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, unsigned char apidmode) -{ - char tmp[40]; - std::string apids_selected; - const char * extCommand; - std::string info1, info2; - - std::string extMessage = "\n\n\n\t\n" - "\t\t"; - - CZapitClient::responseGetPIDs pids; - g_Zapit->getPIDS (pids); - CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo (); - - APIDList apid_list; - getAPIDs(apidmode,apid_list); - apids_selected=""; - for(APIDList::iterator it = apid_list.begin(); it != apid_list.end(); ++it) - { - if(it != apid_list.begin()) - apids_selected += " "; - sprintf(tmp, "%u", it->apid); - apids_selected += tmp; - } - - std::string tmpstring = g_Zapit->getChannelName(channel_id); - if (tmpstring.empty()) - extMessage += "unknown"; - else - extMessage += ZapitTools::UTF8_to_UTF8XML(tmpstring.c_str()); - - extMessage += "\n\t\t"; - - tmpstring = "not available"; - if (epgid != 0) - { - CShortEPGData epgdata; - //if (g_Sectionsd->getEPGidShort(epgid, &epgdata)) { - if(sectionsd_getEPGidShort(epgid, &epgdata)) { -//#warning fixme sectionsd should deliver data in UTF-8 format - tmpstring = epgdata.title; - info1 = epgdata.info1; - info2 = epgdata.info2; - } - } else if (!epgTitle.empty()) { - tmpstring = epgTitle; - } - extMessage += ZapitTools::UTF8_to_UTF8XML(tmpstring.c_str()); - - extMessage += "\n\t\t"; - - sprintf(tmp, PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id); - extMessage += tmp; - - extMessage += "\n\t\t"; - extMessage += ZapitTools::UTF8_to_UTF8XML(info1.c_str()); - extMessage += "\n\t\t"; - extMessage += ZapitTools::UTF8_to_UTF8XML(info2.c_str()); - extMessage += "\n\t\t"; - sprintf(tmp, "%llu", epgid); - extMessage += tmp; - extMessage += "\n\t\t"; - sprintf(tmp, "%d", g_Zapit->getMode()); - extMessage += tmp; - extMessage += "\n\t\t"; - sprintf(tmp, "%u", si.vpid); - extMessage += tmp; - extMessage += "\n\t\t\n"; - // super hack :-), der einfachste weg an die apid descriptions ranzukommen - g_RemoteControl->current_PIDs = pids; - g_RemoteControl->processAPIDnames(); - - for(unsigned int i= 0; i< pids.APIDs.size(); i++) - { - extMessage += "\t\t\t\n" - "\t\t"; - sprintf(tmp, "%u", si.vtxtpid); - extMessage += tmp; - extMessage += - "\n" - "\t\n" - "\n"; - - return extMessage; -} - -bool CVCRControl::CFileDevice::Stop() -{ - std::string extMessage = " "; - time_t end_time = time(0); -//printf("[direct] Stop recording, recMovieInfo %lx\n", recMovieInfo); fflush(stdout); -//FIXME why not save info if shift ? - //if(!autoshift || autoshift_delete) - if(recMovieInfo && cMovieInfo) { - // recMovieInfo->length = (end_time - start_time) / 60; - recMovieInfo->length = (int) round((double) (end_time - start_time) / (double) 60); - cMovieInfo->encodeMovieInfoXml(&extMessage, recMovieInfo); - } - bool return_value = (::stop_recording(extMessage.c_str()) == STREAM2FILE_OK); - - RestoreNeutrino(); - - deviceState = CMD_VCR_STOP; - - if(recMovieInfo) { - recMovieInfo->audioPids.clear(); - delete recMovieInfo; - recMovieInfo = NULL; - } - if(cMovieInfo) { - delete cMovieInfo; - cMovieInfo = NULL; - } - - return return_value; -} - -bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& epgTitle, unsigned char apidmode, const time_t epg_time) -{ - std::string ext_channel_name; - unsigned short apids[REC_MAX_PIDS]; - unsigned int numpids = 0; - unsigned int pos; - char filename[512]; // UTF-8 - - printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " epg: %llx, apidmode 0x%X mode %d\n", - channel_id, epgid, apidmode, mode); - - CutBackNeutrino(channel_id, mode); - - apids_mode = apidmode; - - CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo(); - - if (si.vpid != 0) - transfer_pids(si.vpid, si.vtype ? EN_TYPE_AVC : EN_TYPE_VIDEO, 0); - - APIDList apid_list; - getAPIDs(apids_mode, apid_list); - - for(APIDList::iterator it = apid_list.begin(); it != apid_list.end(); ++it) { - apids[numpids++] = it->apid; - transfer_pids(it->apid, EN_TYPE_AUDIO, it->ac3 ? 1 : 0); - } -#if 0 // FIXME : why this needed ? - if(!apid_list.empty()) - g_Zapit->setAudioChannel(apid_list.begin()->index); -#endif -#if 0 - CZapitClient::responseGetPIDs allpids; - g_Zapit->getPIDS(allpids); -#endif - - if ((StreamVTxtPid) && (si.vtxtpid != 0)) { - apids[numpids++] = si.vtxtpid; - } - if ((StreamPmtPid) && (si.pmtpid != 0)) { - apids[numpids++] = si.pmtpid; - } - - // Create filename for recording - pos = Directory.size(); - strcpy(filename, Directory.c_str()); - - if ((pos == 0) || (filename[pos - 1] != '/')) { - filename[pos] = '/'; - pos++; - filename[pos] = '\0'; - } - pos = strlen(filename); -#if 0 - time_t t = time(NULL); - strftime(&(filename[pos]), sizeof(filename) - pos - 1, "%Y%m%d_%H%M%S", localtime(&t)); - strcat(filename, "_"); - pos = strlen(filename); -#endif - ext_channel_name = g_Zapit->getChannelName(channel_id); - if (!(ext_channel_name.empty())) - { - strcpy(&(filename[pos]), UTF8_TO_FILESYSTEM_ENCODING(ext_channel_name.c_str())); - ZapitTools::replace_char(&filename[pos]); - - if (!autoshift && g_settings.recording_save_in_channeldir) { - struct stat statInfo; - int res = stat(filename,&statInfo); - if (res == -1) { - if (errno == ENOENT) { - res = safe_mkdir(filename); - if (res == 0) { - strcat(filename,"/"); - } else { - perror("[vcrcontrol] mkdir"); - } - - } else { - perror("[vcrcontrol] stat"); - } - } else { - // directory exists - strcat(filename,"/"); - } - - } else - strcat(filename, "_"); - } - - pos = strlen(filename); - if (g_settings.recording_epg_for_filename) { - if(epgid != 0) { - CShortEPGData epgdata; - //if (g_Sectionsd->getEPGidShort(epgid, &epgdata)) - if(sectionsd_getEPGidShort(epgid, &epgdata)) - { - if (!(epgdata.title.empty())) - { - strcpy(&(filename[pos]), epgdata.title.c_str()); - ZapitTools::replace_char(&filename[pos]); - } - } - } else if (!epgTitle.empty()) { - strcpy(&(filename[pos]), epgTitle.c_str()); - ZapitTools::replace_char(&filename[pos]); - } - } -#if 1 - pos = strlen(filename); - time_t t = time(NULL); - strftime(&(filename[pos]), sizeof(filename) - pos - 1, "%Y%m%d_%H%M%S", localtime(&t)); - //pos = strlen(filename); -#endif - - start_time = time(0); - stream2file_error_msg_t error_msg = ::start_recording(filename, - getMovieInfoString(CMD_VCR_RECORD, channel_id, epgid, epgTitle, apid_list, epg_time).c_str(), - si.vpid, apids, numpids); - - if (error_msg == STREAM2FILE_OK) { - deviceState = CMD_VCR_RECORD; - return true; - } - else { - RestoreNeutrino(); - - printf("[vcrcontrol] stream2file error code: %d\n", error_msg); - //FIXME: Use better error message - DisplayErrorMessage(g_Locale->getText( - error_msg == STREAM2FILE_BUSY ? LOCALE_STREAMING_BUSY : - error_msg == STREAM2FILE_INVALID_DIRECTORY ? LOCALE_STREAMING_DIR_NOT_WRITABLE : - LOCALE_STREAMINGSERVER_NOCONNECT - )); // UTF-8 - - return false; - } -} - -bool CVCRControl::CFileDevice::Update(void) -{ - EPG_AUDIO_PIDS audio_pids; - std::string extMessage; - //unsigned short apids[REC_MAX_PIDS]; - //unsigned int numpids = 0; - APIDList apid_list; - APIDList::iterator it; - bool update = false; - - if(!recMovieInfo || !cMovieInfo) - return false; - - getAPIDs(apids_mode, apid_list); - CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo (); - - g_RemoteControl->current_PIDs = allpids; - g_RemoteControl->processAPIDnames(); - - for(it = apid_list.begin(); it != apid_list.end(); ++it) { - bool found = false; - for(unsigned int i = 0; i < rec_numpida; i++) { - if(rec_apids[i] == it->apid) { - found = true; - break; - } - } - if(!found) { - update = true; - printf("CVCRControl::CFileDevice::Update: apid %x not found in recording pids\n", it->apid); - for(unsigned int i = 0; i < allpids.APIDs.size(); i++) { - if(allpids.APIDs[i].pid == it->apid) { - audio_pids.epgAudioPid = allpids.APIDs[i].pid; - audio_pids.epgAudioPidName = ZapitTools::UTF8_to_UTF8XML(g_RemoteControl->current_PIDs.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 == (int) rec_currentapid) ? 1 : 0; - recMovieInfo->audioPids.push_back(audio_pids); - - if(allpids.APIDs[i].is_ac3) - rec_ac3flags[rec_numpida] = 1; - if(allpids.APIDs[i].is_aac) - rec_ac3flags[rec_numpida] = 5; - - rec_apids[rec_numpida] = allpids.APIDs[i].pid; - if(rec_apids[rec_numpida] == rec_currentapid) - rec_currentac3 = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : 0; - rec_numpida++; - } - - } - } - } - if(!update) { - printf("CVCRControl::CFileDevice::Update: no update needed\n"); - return false; - } - - cMovieInfo->encodeMovieInfoXml(&extMessage, recMovieInfo); - /* neutrino check if vpid changed, so using 0 to disable vpid restart */ - ::update_recording(extMessage.c_str(), 0 /*si.vpid*/, rec_apids, rec_numpida); - - return true; -} - -bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); - -void CVCRControl::Screenshot(const t_channel_id channel_id, char * fname) -{ - char filename[512]; // UTF-8 - char cmd[512]; - std::string channel_name; - CEPGData epgData; - event_id_t epgid = 0; - unsigned int pos; - - if(!fname) { - if(safe_mkdir((char *) "/hdd/screenshots/")) - return; - - strcpy(filename, "/hdd/screenshots/"); - - pos = strlen(filename); - channel_name = g_Zapit->getChannelName(channel_id); - if (!(channel_name.empty())) { - strcpy(&(filename[pos]), UTF8_TO_FILESYSTEM_ENCODING(channel_name.c_str())); - ZapitTools::replace_char(&filename[pos]); - strcat(filename, "_"); - } - pos = strlen(filename); - - //if (g_Sectionsd->getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData)) - if(sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData)) - {}; - epgid = epgData.eventID; - if(epgid != 0) { - CShortEPGData epgdata; - //if (g_Sectionsd->getEPGidShort(epgid, &epgdata)) { - if(sectionsd_getEPGidShort(epgid, &epgdata)) { - if (!(epgdata.title.empty())) { - strcpy(&(filename[pos]), epgdata.title.c_str()); - ZapitTools::replace_char(&filename[pos]); - } - } - } - pos = strlen(filename); - time_t t = time(NULL); - strftime(&(filename[pos]), sizeof(filename) - pos - 1, "%Y%m%d_%H%M%S", localtime(&t)); - strcat(filename, ".bmp"); - } else - strcpy(filename, fname); - - sprintf(cmd, "grab -v %s", filename); -printf("Executing %s\n", cmd); - CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "Saving screenshot.."); - hintBox->paint(); - system(cmd); - hintBox->hide(); - delete hintBox; -} - -//------------------------------------------------------------------------- -bool CVCRControl::CServerDevice::Stop() -{ - printf("Stop\n"); - - bool return_value = sendCommand(CMD_VCR_STOP); - RestoreNeutrino(); - - return return_value; -} - -//------------------------------------------------------------------------- -bool CVCRControl::CServerDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& epgTitle, unsigned char apids, const time_t /*epg_time*/) -{ - printf("Record channel_id: " - PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS - " epg: %llx, apids 0x%X mode %d\n", - channel_id, - epgid, - apids, - mode); - - CutBackNeutrino(channel_id, mode); - if(!sendCommand(CMD_VCR_RECORD, channel_id, epgid, epgTitle, apids)) - { - RestoreNeutrino(); - - DisplayErrorMessage(g_Locale->getText(LOCALE_STREAMINGSERVER_NOCONNECT)); - - return false; - } - else { - //ext_channel_name = g_Zapit->getChannelName(channel_id); - return true; - } -} - - -//------------------------------------------------------------------------- -void CVCRControl::CServerDevice::serverDisconnect() -{ - close(sock_fd); -} - -//------------------------------------------------------------------------- -bool CVCRControl::CServerDevice::sendCommand(CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, unsigned char apids) -{ - printf("Send command: %d channel_id: " - PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS - " epgid: %llx\n", - command, - channel_id, - epgid); - if(serverConnect()) - { - std::string extMessage = getCommandString(command, channel_id, epgid, epgTitle, apids); - - printf("sending to vcr-client:\n\n%s\n", extMessage.c_str()); - write(sock_fd, extMessage.c_str() , extMessage.length() ); - - serverDisconnect(); - - deviceState = command; - return true; - } - else - return false; - -} - -//------------------------------------------------------------------------- -bool CVCRControl::CServerDevice::serverConnect() -{ - - printf("connect to server: %s:%d\n",ServerAddress.c_str(),ServerPort); - - sock_fd=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - SAI servaddr; - memset(&servaddr,0,sizeof(SAI)); - servaddr.sin_family=AF_INET; - servaddr.sin_port=htons(ServerPort); - inet_pton(AF_INET, ServerAddress.c_str(), &servaddr.sin_addr); - - - if(connect(sock_fd, (SA *)&servaddr, sizeof(servaddr))==-1) - { - perror("[cvcr] - cannot connect to streamingserver\n"); - return false; - } - - return true; -} - -//------------------------------------------------------------------------- -std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const CVCRCommand /*command*/, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, APIDList apid_list, const time_t epg_time) -{ - std::string extMessage; - std::string info1, info2; - - if(!cMovieInfo) - cMovieInfo = new CMovieInfo(); - if(!recMovieInfo) - recMovieInfo = new MI_MOVIE_INFO(); - - cMovieInfo->clearMovieInfo(recMovieInfo); -#if 0 - CZapitClient::responseGetPIDs pids; - g_Zapit->getPIDS (pids); -#endif - CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo (); - - std::string tmpstring = g_Zapit->getChannelName(channel_id); - if (tmpstring.empty()) - recMovieInfo->epgChannel = "unknown"; - else - recMovieInfo->epgChannel = ZapitTools::UTF8_to_UTF8XML(tmpstring.c_str()); - - tmpstring = "not available"; - if (epgid != 0) { - CEPGData epgdata; - if (sectionsd_getEPGid(epgid, epg_time, &epgdata)) { - tmpstring = epgdata.title; - info1 = epgdata.info1; - info2 = epgdata.info2; - - recMovieInfo->parentalLockAge = epgdata.fsk; - if(epgdata.contentClassification.size() > 0 ) - recMovieInfo->genreMajor = epgdata.contentClassification[0]; - - recMovieInfo->length = epgdata.epg_times.dauer / 60; - - printf("fsk:%d, Genre:%d, Dauer: %d\r\n",recMovieInfo->parentalLockAge,recMovieInfo->genreMajor,recMovieInfo->length); - } - } else if (!epgTitle.empty()) { - tmpstring = epgTitle; - } - recMovieInfo->epgTitle = ZapitTools::UTF8_to_UTF8XML(tmpstring.c_str()); - recMovieInfo->epgId = channel_id; - recMovieInfo->epgInfo1 = ZapitTools::UTF8_to_UTF8XML(info1.c_str()); - recMovieInfo->epgInfo2 = ZapitTools::UTF8_to_UTF8XML(info2.c_str()); - recMovieInfo->epgEpgId = epgid ; - recMovieInfo->epgMode = g_Zapit->getMode(); - recMovieInfo->epgVideoPid = si.vpid; - recMovieInfo->VideoType = si.vtype; - - rec_vpid = si.vpid; - rec_vtype = si.vtype; - rec_currentapid = si.apid; - memset(rec_apids, 0, sizeof(unsigned short)*REC_MAX_APIDS); - memset(rec_ac3flags, 0, sizeof(unsigned short)*REC_MAX_APIDS); - rec_numpida = 0; - - EPG_AUDIO_PIDS audio_pids; - /* super hack :-), der einfachste weg an die apid descriptions ranzukommen */ - g_RemoteControl->current_PIDs = allpids; - g_RemoteControl->processAPIDnames(); - - APIDList::iterator it; - for(unsigned int i= 0; i< allpids.APIDs.size(); i++) { - 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 = ZapitTools::UTF8_to_UTF8XML(g_RemoteControl->current_PIDs.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 == (int) rec_currentapid) ? 1 : 0; - recMovieInfo->audioPids.push_back(audio_pids); - - if(allpids.APIDs[i].is_ac3) - rec_ac3flags[rec_numpida] = 1; - if(allpids.APIDs[i].is_aac) - rec_ac3flags[rec_numpida] = 5; - - rec_apids[rec_numpida] = allpids.APIDs[i].pid; - if(rec_apids[rec_numpida] == rec_currentapid) - rec_currentac3 = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : 0; - rec_numpida++; - } - } - } - /* FIXME sometimes no apid in xml ?? */ - if(recMovieInfo->audioPids.empty() && allpids.APIDs.size()) { - int i = 0; - audio_pids.epgAudioPid = allpids.APIDs[i].pid; - audio_pids.epgAudioPidName = ZapitTools::UTF8_to_UTF8XML(g_RemoteControl->current_PIDs.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); - } - recMovieInfo->epgVTXPID = si.vtxtpid; - - cMovieInfo->encodeMovieInfoXml(&extMessage, recMovieInfo); - - return extMessage; -} diff --git a/src/driver/vcrcontrol.h b/src/driver/vcrcontrol.h deleted file mode 100644 index 088d5ee58..000000000 --- a/src/driver/vcrcontrol.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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. -*/ -#ifndef __vcrcontrol__ -#define __vcrcontrol__ - -#include -//#include -#include - -#include -#include - -#include -#include - -#define REC_MAX_APIDS 10 -#define REC_MAX_PIDS 13 - -class CVCRControl -{ - public: - typedef enum CVCRStates - { - CMD_VCR_UNKNOWN = 0, - CMD_VCR_RECORD = 1, - CMD_VCR_STOP = 2, - CMD_VCR_PAUSE = 3, - CMD_VCR_RESUME = 4, - CMD_VCR_AVAILABLE = 5 - } CVCRCommand; - - enum CVCRDevices - { - DEVICE_VCR, - DEVICE_SERVER, - DEVICE_FILE - }; - - class CDevice // basisklasse für die devices - { - public: - int sock_fd; - int last_mode; - time_t start_time; - virtual CVCRDevices getDeviceType(void) const = 0; - CVCRStates deviceState; - virtual bool Stop() = 0; - virtual bool Record(const t_channel_id channel_id = 0, int mode=1, const event_id_t epgid = 0, const std::string& epgTitle = "", unsigned char apidmode = 0, const time_t epg_time=0) = 0; // epg_time added for .xml (MovieBrowser) - virtual bool Pause() = 0; - virtual bool Resume() = 0; - virtual bool Update() = 0; - virtual bool IsAvailable() = 0; - CDevice() { deviceState = CMD_VCR_STOP; cMovieInfo = NULL; recMovieInfo = NULL; rec_numpida = 0; rec_vpid = 0;}; - virtual ~CDevice(){}; - typedef struct { - unsigned short apid; - unsigned int index; - bool ac3; - } APIDDesc; - typedef std::list APIDList; - virtual void getAPIDs(const unsigned char apidmode, APIDList & apid_list); - CMovieInfo * cMovieInfo; - MI_MOVIE_INFO * recMovieInfo; - unsigned short rec_vpid; - unsigned short rec_vtype; - unsigned short rec_apids[REC_MAX_APIDS]; - unsigned short rec_ac3flags[REC_MAX_APIDS]; - unsigned short rec_numpida; - unsigned short rec_currentapid, rec_currentac3; - unsigned char apids_mode; - CZapitClient::responseGetPIDs allpids; - }; - - class CVCRDevice : public CDevice // VCR per IR - { - public: - bool SwitchToScart; - - virtual CVCRDevices getDeviceType(void) const - { - return DEVICE_VCR; - }; - virtual bool Stop(); - virtual bool Record(const t_channel_id channel_id = 0, int mode=1, const event_id_t epgid = 0, const std::string& epgTitle = "", unsigned char apidmode = 0, const time_t epg_time=0); // epg_time added for .xml (MovieBrowser) - virtual bool Pause() { return false; }; - virtual bool Resume() { return false; }; - virtual bool Update() { return false; }; - virtual bool IsAvailable() { return true; }; - CVCRDevice(bool switchtoscart) { SwitchToScart = switchtoscart; }; - virtual ~CVCRDevice(){}; - }; - - class CFileAndServerDevice : public CDevice - { - protected: - void RestoreNeutrino(void); - void CutBackNeutrino(const t_channel_id channel_id, const int mode); - std::string getCommandString(const CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, unsigned char apidmode); - std::string getMovieInfoString(const CVCRCommand command, const t_channel_id channel_id,const event_id_t epgid, const std::string& epgTitle, APIDList apid_list, const time_t epg_time); - - public: - bool StopPlayBack; - bool StopSectionsd; - - virtual bool Pause() { return false; }; - virtual bool Resume() { return false; }; - virtual bool Update() { return false; }; - virtual bool IsAvailable() { return true; }; - }; - - class CFileDevice : public CFileAndServerDevice - { - public: - std::string Directory; - unsigned int SplitSize; - bool Use_O_Sync; - bool Use_Fdatasync; - bool StreamVTxtPid; - bool StreamPmtPid; - unsigned int RingBuffers; - - virtual CVCRDevices getDeviceType(void) const - { - return DEVICE_FILE; - }; - - virtual bool Stop(); - virtual bool Record(const t_channel_id channel_id = 0, int mode=1, const event_id_t epgid = 0, const std::string& epgTitle = "", unsigned char apidmode = 0, const time_t epg_time=0); // epg_time added for .xml (MovieBrowser) - virtual bool Update(void); - - CFileDevice(const bool stopplayback, const bool stopsectionsd, const char * const directory, const unsigned int splitsize, const bool use_o_sync, const bool use_fdatasync, const bool stream_vtxt_pid, const bool stream_pmt_pid, const unsigned int ringbuffers) - { - StopPlayBack = stopplayback; - StopSectionsd = stopsectionsd; - Directory = directory; - SplitSize = splitsize; - Use_O_Sync = use_o_sync; - Use_Fdatasync = use_fdatasync; - StreamVTxtPid = stream_vtxt_pid; - StreamPmtPid = stream_pmt_pid; - RingBuffers = ringbuffers; - }; - virtual ~CFileDevice() - { - }; - }; - - class CServerDevice : public CFileAndServerDevice // externer Streamingserver per tcp - { - private: - bool serverConnect(); - void serverDisconnect(); - - bool sendCommand(CVCRCommand command, const t_channel_id channel_id = 0, const event_id_t epgid = 0, const std::string& epgTitle = "", unsigned char apidmode = 0); - - public: - std::string ServerAddress; - unsigned int ServerPort; - - virtual CVCRDevices getDeviceType(void) const - { - return DEVICE_SERVER; - }; - - virtual bool Stop(); - virtual bool Record(const t_channel_id channel_id = 0, int mode=1, const event_id_t epgid = 0, const std::string& epgTitle = "", unsigned char apidmode = 0, const time_t epg_time=0); // epg_time added for .xml (MovieBrowser) - - CServerDevice(const bool stopplayback, const bool stopsectionsd, const char * const serveraddress, const unsigned int serverport) - { - StopPlayBack = stopplayback; - StopSectionsd = stopsectionsd; - ServerAddress = serveraddress; - ServerPort = serverport; - }; - virtual ~CServerDevice(){}; - }; - - public: - CVCRControl(); - ~CVCRControl(); - static CVCRControl * getInstance(); - - CDevice * Device; - - void registerDevice(CDevice * const device); - void unregisterDevice(); - - inline bool isDeviceRegistered(void) const { return (Device != NULL); }; - - inline CVCRStates getDeviceState(void) const { return Device->deviceState; }; - bool Stop(){return Device->Stop();}; - bool Record(const CTimerd::RecordingInfo * const eventinfo); - bool Pause(){return Device->Pause();}; - bool Resume(){return Device->Resume();}; - bool Update() {return Device->Update();}; - void Screenshot(const t_channel_id channel_id, char * fname = NULL); - MI_MOVIE_INFO * GetMovieInfo(void); - bool GetPids(unsigned short *vpid, unsigned short *vtype, unsigned short *apid, unsigned short *atype, unsigned short * apidnum, unsigned short * apids, unsigned short * atypes); -}; - - -#endif diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index b1348aa8a..670f0a66f 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: { @@ -802,7 +814,7 @@ void CVFD::showFilelist(int flist_pos,CFileList* flist,const char * const mainDi if (mode == MODE_FILEBROWSER && m_fileList != NULL && - m_fileList->size() > 0) + !m_fileList->empty() ) { printf("[lcdd] FileList:OK\n"); diff --git a/src/driver/vfd.h b/src/driver/vfd.h index 4bbe70e60..1519021d3 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 07f26ce78..a5534d80d 100644 --- a/src/driver/volume.cpp +++ b/src/driver/volume.cpp @@ -57,12 +57,11 @@ CVolume::CVolume() 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(); Init(); } @@ -75,6 +74,7 @@ CVolume::~CVolume() void CVolume::Init() { + paintDigits = g_settings.volume_digits; mute_ay_old = mute_ay; int faktor_h = 18; // scale * 10 int clock_height= 0; @@ -239,9 +239,9 @@ 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 diff --git a/src/eitd/Makefile.am b/src/eitd/Makefile.am index e01b04bcd..c151cd6b2 100644 --- a/src/eitd/Makefile.am +++ b/src/eitd/Makefile.am @@ -20,5 +20,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 1ee4b307c..802ffacea 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -150,12 +150,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); @@ -215,7 +215,7 @@ static bool deleteEvent(const event_id_t uniqueKey) MySIeventsOrderUniqueKey::iterator e = mySIeventsOrderUniqueKey.find(uniqueKey); if (e != mySIeventsOrderUniqueKey.end()) { - if (e->second->times.size()) { + if (!e->second->times.empty()) { mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.erase(e->second); mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.erase(e->second); } @@ -439,7 +439,7 @@ xprintf("addEvent: current %016llx event %016llx running %d messaging_got_CN %d\ } deleteEvent(e->uniqueKey()); readLockEvents(); - if (mySIeventsOrderUniqueKey.size() >= max_events) { + if ( !mySIeventsOrderUniqueKey.empty() && mySIeventsOrderUniqueKey.size() >= max_events && max_events != 0 ) { MySIeventsOrderFirstEndTimeServiceIDEventUniqueKey::iterator lastEvent = mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.begin(); @@ -557,7 +557,7 @@ static void addNVODevent(const SIevent &evt) // mehrere Events mit gleicher ID sind, diese vorher loeschen deleteEvent(e->uniqueKey()); readLockEvents(); - if (mySIeventsOrderUniqueKey.size() >= max_events) { + if ( !mySIeventsOrderUniqueKey.empty() && mySIeventsOrderUniqueKey.size() >= max_events && max_events != 0 ) { //TODO: Set Old Events to 0 if limit is reached... MySIeventsOrderFirstEndTimeServiceIDEventUniqueKey::iterator lastEvent = mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.end(); @@ -1164,7 +1164,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; } @@ -1672,8 +1672,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 +1691,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 +1746,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); @@ -1825,7 +1833,7 @@ static bool addService(const SIservice &s, const int is_actual) mySIservicesOrderUniqueKey.insert(std::make_pair(sptr->uniqueKey(), sptr)); unlockServices(); - if (sptr->nvods.size()) + if (!sptr->nvods.empty()) { writeLockServices(); mySIservicesNVODorderUniqueKey.insert(std::make_pair(sptr->uniqueKey(), sptr)); @@ -2700,7 +2708,7 @@ bool sectionsd_getNVODTimesServiceKey(const t_channel_id uniqueServiceKey, CSect { dprintf("NVODServices: %u\n", si->second->nvods.size()); - if (si->second->nvods.size()) { + if (!si->second->nvods.empty()) { for (SInvodReferences::iterator ni = si->second->nvods.begin(); ni != si->second->nvods.end(); ++ni) { SItime zeitEvt1(0, 0); findActualSIeventForServiceUniqueKey(ni->uniqueKey(), zeitEvt1, 15*60); diff --git a/src/global.h b/src/global.h index 97945f7b8..e0fe58160 100644 --- a/src/global.h +++ b/src/global.h @@ -40,7 +40,6 @@ #include #if HAVE_COOL_HARDWARE #include -#include #endif #if HAVE_TRIPLEDRAGON #include @@ -95,9 +94,6 @@ NEUTRINO_CPP CInfoViewer *g_InfoViewer; NEUTRINO_CPP CNeutrinoEventList *g_EventList; NEUTRINO_CPP CLocaleManager *g_Locale; -#if HAVE_COOL_HARDWARE -NEUTRINO_CPP RFmod *g_RFmod; -#endif NEUTRINO_CPP CVideoSettings *g_videoSettings; NEUTRINO_CPP CRadioText *g_Radiotext; diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index bbe3d6174..629a488f2 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -63,6 +63,7 @@ libneutrino_gui_a_SOURCES = \ moviebrowser.cpp \ movieinfo.cpp \ movieplayer.cpp \ + network_service.cpp \ network_setup.cpp \ nfs.cpp \ osd_setup.cpp \ @@ -81,7 +82,6 @@ libneutrino_gui_a_SOURCES = \ screensetup.cpp \ settings_manager.cpp \ sleeptimer.cpp \ - software_update.cpp \ start_wizard.cpp \ streaminfo2.cpp \ subchannel_select.cpp \ @@ -89,6 +89,8 @@ libneutrino_gui_a_SOURCES = \ themes.cpp \ timeosd.cpp \ update.cpp \ + update_menue.cpp \ + update_settings.cpp \ user_menue.cpp \ user_menue_setup.cpp \ vfd_setup.cpp \ diff --git a/src/gui/alphasetup.cpp b/src/gui/alphasetup.cpp deleted file mode 100644 index 47e887289..000000000 --- a/src/gui/alphasetup.cpp +++ /dev/null @@ -1,272 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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 -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define ALPHA_SETUP_ICON_DESELECTED NEUTRINO_ICON_VOLUMESLIDER2 -#define ALPHA_SETUP_ICON_ALPHA1_SELECTED NEUTRINO_ICON_VOLUMESLIDER2RED -#define ALPHA_SETUP_ICON_ALPHA2_SELECTED NEUTRINO_ICON_VOLUMESLIDER2GREEN - - -CAlphaSetup::CAlphaSetup(const neutrino_locale_t Name, unsigned char* Alpha1, unsigned char* Alpha2, CChangeObserver* Observer) -{ - frameBuffer = CFrameBuffer::getInstance(); - observer = Observer; - name = Name; - - - alpha1 = Alpha1; - alpha2 = Alpha2; - //frameBuffer->setBlendLevel(*alpha1, *alpha2); //FIXME until blend works -} - -int CAlphaSetup::exec(CMenuTarget* parent, const std::string &) -{ - neutrino_msg_t msg; - neutrino_msg_data_t data; - - width = w_max(360, 0); - - hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); - mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); - - height = hheight+ mheight*3; - - x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth()-width) >> 1); - y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight()-height) >> 1); - - int res = menu_return::RETURN_REPAINT; - if (parent) - { - parent->hide(); - } - unsigned char alpha1_alt= *alpha1; - unsigned char alpha2_alt= *alpha2; - - frameBuffer->setBlendLevel(*alpha1, *alpha2); - paint(); - - int selected = 0; -// int max = 1; - - uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings -::TIMING_MENU]); - - bool loop=true; - while (loop) - { - g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd, true ); - - if ( msg <= CRCInput::RC_MaxRC ) - timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings -::TIMING_MENU]); - - switch ( msg ) - { -#if 0 - case CRCInput::RC_down: - { - if(selected 0) - { - paintSlider(x + 10, y + hheight , alpha1, LOCALE_GTXALPHA_ALPHA1, ALPHA_SETUP_ICON_DESELECTED , false); - paintSlider(x + 10, y + hheight + mheight, alpha2, LOCALE_GTXALPHA_ALPHA2, ALPHA_SETUP_ICON_DESELECTED , false); - - selected--; - - switch (selected) - { - case 0: - paintSlider(x + 10, y + hheight , alpha1, LOCALE_GTXALPHA_ALPHA1, ALPHA_SETUP_ICON_ALPHA1_SELECTED, true ); - break; - case 1: - paintSlider(x + 10, y + hheight + mheight, alpha2, LOCALE_GTXALPHA_ALPHA2, ALPHA_SETUP_ICON_ALPHA2_SELECTED, true ); - break; - } - } - break; - } -#endif - case CRCInput::RC_right: - { - switch (selected) - { - case 0: - if (*alpha1 < 255) { - *alpha1+= 0x10; - paintSlider(x + 10, y + hheight , alpha1, LOCALE_GTXALPHA_ALPHA1, ALPHA_SETUP_ICON_ALPHA1_SELECTED, true ); - frameBuffer->setBlendLevel(*alpha1, *alpha2); - } - break; - case 1: - if (*alpha2 < 255) { - *alpha2 += 0x10; - paintSlider(x + 10, y + hheight + mheight, alpha2, LOCALE_GTXALPHA_ALPHA2, ALPHA_SETUP_ICON_ALPHA2_SELECTED, true ); - frameBuffer->setBlendLevel(*alpha1, *alpha2); - } - break; - } - break; - } - case CRCInput::RC_left: - { - switch (selected) - { - case 0: - if (*alpha1 >= 0x10) { - *alpha1 -= 0x10; - paintSlider(x + 10, y + hheight , alpha1, LOCALE_GTXALPHA_ALPHA1, ALPHA_SETUP_ICON_ALPHA1_SELECTED, true ); - frameBuffer->setBlendLevel(*alpha1, *alpha2); - } - break; - case 1: - if (*alpha2 >= 0x10) { - *alpha2 -= 0x10; - paintSlider(x + 10, y + hheight + mheight, alpha2, LOCALE_GTXALPHA_ALPHA2, ALPHA_SETUP_ICON_ALPHA2_SELECTED, true ); - frameBuffer->setBlendLevel(*alpha1, *alpha2); - } - break; - } - break; - } - case CRCInput::RC_favorites: - case CRCInput::RC_sat: - break; - case CRCInput::RC_home: - if ((*alpha1 != alpha1_alt) || (*alpha2 != alpha2_alt)) - { - if (ShowLocalizedMessage(name, LOCALE_MESSAGEBOX_DISCARD, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbCancel) == CMessageBox::mbrCancel) - { - break; - } - } - - // sonst abbruch... - *alpha1 = alpha1_alt; - *alpha2 = alpha2_alt; - - case CRCInput::RC_timeout: - case CRCInput::RC_ok: - loop = false; - break; - - default: - if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) - { - loop = false; - res = menu_return::RETURN_EXIT_ALL; - } - } - } - - hide(); - - if(observer) - observer->changeNotify(name, NULL); - - return res; -} - -void CAlphaSetup::hide() -{ - frameBuffer->paintBackgroundBoxRel(x,y, width,height); -} - -void CAlphaSetup::paint() -{ - frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 - frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0); - - paintSlider(x + 10, y + hheight , alpha1, LOCALE_GTXALPHA_ALPHA1, ALPHA_SETUP_ICON_ALPHA1_SELECTED, true ); - //paintSlider(x + 10, y + hheight + mheight, alpha2, LOCALE_GTXALPHA_ALPHA2, ALPHA_SETUP_ICON_DESELECTED , false); -} - -void CAlphaSetup::paintSlider(const int px, const int py, const unsigned char * const spos, const neutrino_locale_t text, const char * const iconname, const bool /*selected*/) // UTF-8 -{ - if (!spos) - return; - - int sspos = (*spos)*100/255; - - frameBuffer->paintBoxRel(x+70,y,120,mheight, COL_MENUCONTENT_PLUS_0); - - frameBuffer->paintIcon(NEUTRINO_ICON_VOLUMEBODY, px + 70 , py + 2 + mheight / 4); - frameBuffer->paintIcon(iconname , px + 73 + sspos, py + mheight / 4); - - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px,py+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 -} diff --git a/src/gui/alphasetup.h b/src/gui/alphasetup.h deleted file mode 100644 index 3631dadaa..000000000 --- a/src/gui/alphasetup.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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. -*/ - - -#ifndef __alphasetup__ -#define __alphasetup__ - - -#include "widget/menue.h" - -#include -#include - -#include - - -class CAlphaSetup : public CMenuTarget -{ - private: - CFrameBuffer *frameBuffer; - int x; - int y; - int width; - int height; - int hheight,mheight; // head/menu font height - - unsigned char *alpha1; - unsigned char *alpha2; - - - neutrino_locale_t name; - - CChangeObserver* observer; - - void paint(); - void setAlpha(); - void paintSlider(const int x, const int y, const unsigned char * const spos, const neutrino_locale_t text, const char * const iconname, const bool selected); - - public: - - CAlphaSetup(const neutrino_locale_t Name, unsigned char* Alpha1, unsigned char* Alpha2, CChangeObserver* Observer = NULL); - - void hide(); - int exec(CMenuTarget* parent, const std::string & actionKey); - -}; - - -#endif - diff --git a/src/gui/audio_setup.cpp b/src/gui/audio_setup.cpp index 0b51fdf13..4cf8ee6a5 100644 --- a/src/gui/audio_setup.cpp +++ b/src/gui/audio_setup.cpp @@ -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] = { @@ -128,21 +127,27 @@ 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 = 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); @@ -150,17 +155,21 @@ 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); + #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 ); @@ -189,7 +198,7 @@ int CAudioSetup::showAudioSetup() #if 0 audioSettings->addItem(mf); #endif - + int res = audioSettings->exec(NULL, ""); selected = audioSettings->getSelected(); delete audioSettings; @@ -203,12 +212,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) @@ -224,4 +232,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 d69841228..60359eb71 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -42,7 +42,6 @@ #include #include -#include #include #include #include @@ -76,6 +75,7 @@ #include #include #include +#include #if 0 #ifdef ENABLE_LIRC @@ -187,6 +187,8 @@ CAudioPlayerGui::CAudioPlayerGui(bool inetmode) m_frameBuffer = CFrameBuffer::getInstance(); m_visible = false; m_inetmode = inetmode; + dline = NULL; + ibox = NULL; Init(); } @@ -236,6 +238,8 @@ CAudioPlayerGui::~CAudioPlayerGui() m_title2Pos.clear(); // g_Zapit->setStandby (false); g_Sectionsd->setPauseScanning (false); + delete dline; + delete ibox; } //------------------------------------------------------------------------ @@ -582,7 +586,7 @@ int CAudioPlayerGui::show() //stop(); // Stop if song is deleted, next song will be startet automat. } if (m_selected >= m_playlist.size()) - m_selected = m_playlist.size() == 0 ? m_playlist.size() : m_playlist.size() - 1; + m_selected = m_playlist.empty() ? m_playlist.size() : m_playlist.size() - 1; update = true; } } @@ -784,26 +788,24 @@ int CAudioPlayerGui::show() { //printf("select by name\n"); unsigned char smsKey = 0; + int w = 0; do { smsKey = m_SMSKeyInput.handleMsg(msg); //printf(" new key: %c", smsKey); - g_RCInput->getMsg_ms(&msg, &data, AUDIOPLAYERGUI_SMSKEY_TIMEOUT - 200); - - /* show a hint box with current char (too slow at the moment?)*/ -#if 1 char selectedKey[1]; sprintf(selectedKey,"%c",smsKey); int x1=(g_settings.screen_EndX- g_settings.screen_StartX)/2 + g_settings.screen_StartX-50; int y1=(g_settings.screen_EndY- g_settings.screen_StartY)/2 + g_settings.screen_StartY; int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); - int w = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(selectedKey); - m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6); - m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0); + w = std::max(w, g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(selectedKey)); + m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6, RADIUS_SMALL); + m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0, RADIUS_SMALL); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP] - ->RenderString(x1,y1,w+1,selectedKey,COL_MENUCONTENTSELECTED,0); -#endif + ->RenderString(x1,y1,w+1,selectedKey,COL_MENUCONTENTSELECTED,0); + + g_RCInput->getMsg_ms(&msg, &data, AUDIOPLAYERGUI_SMSKEY_TIMEOUT - 200); } while (CRCInput::isNumeric(msg) && !(m_playlist.empty())); @@ -812,8 +814,8 @@ int CAudioPlayerGui::show() { //printf("selected key: %c\n",smsKey); selectTitle(smsKey); - update = true; } + update = true; m_SMSKeyInput.resetOldKey(); } else @@ -1297,6 +1299,7 @@ bool CAudioPlayerGui::openFilebrowser(void) std::string sPath = files->Name.substr(0, files->Name.rfind('/')); std::ifstream infile; char cLine[256]; + char name[255] = { 0 }; infile.open(files->Name.c_str(), std::ifstream::in); while (infile.good()) { @@ -1304,12 +1307,16 @@ bool CAudioPlayerGui::openFilebrowser(void) // remove CR if (cLine[strlen(cLine)-1]=='\r') cLine[strlen(cLine)-1]=0; + int duration; + sscanf(cLine, "#EXTINF:%d,%[^\n]\n", &duration, name); if (strlen(cLine) > 0 && cLine[0]!='#') { char *url = strstr(cLine, "http://"); if (url != NULL) { if (strstr(url, ".m3u") || strstr(url, ".pls")) processPlaylistUrl(url); + else + addUrl2Playlist(url, name, duration); } else if ((url = strstr(cLine, "icy://")) != NULL) { addUrl2Playlist(url); } else if ((url = strstr(cLine, "scast:://")) != NULL) { @@ -1866,50 +1873,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)) { - // 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 - - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos2, 4, 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, 1, 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->paintBoxRel(m_x, ypos2 , 2 , m_info_height , col1); - m_frameBuffer->paintBoxRel(m_x + m_width - 2, ypos2 , 2 , m_info_height , col1); - m_frameBuffer->paintBoxRel(m_x, ypos2 , m_width -2 , 2 , col1); - m_frameBuffer->paintBoxRel(m_x, ypos2 + m_info_height -2, m_width -2 , 2 , col1); - // m_frameBuffer->paintBoxRel(m_x, ypos2, m_width, m_info_height, col1); + //details line + if (dline == NULL) + dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, m_fheight/2+1, m_fheight); + dline->setYPos(ypos1a); + dline->paint(); // paint id3 infobox - m_frameBuffer->paintBoxRel(m_x + 2, ypos2 + 2 , m_width - 4, m_info_height - 4, COL_MENUCONTENTDARK_PLUS_0); + 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; @@ -1938,7 +1929,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(); } } //------------------------------------------------------------------------ @@ -2469,7 +2463,7 @@ void CAudioPlayerGui::removeFromPlaylist(long pos) item->second.erase(pos); // delete empty entries - if (item->second.size() == 0) + if (item->second.empty()) { m_title2Pos.erase(item); } @@ -2529,7 +2523,7 @@ void CAudioPlayerGui::selectTitle(unsigned char selectionChar) } else { - if (it->second.size() > 0) + if ( !it->second.empty() ) { i = *(it->second.begin()); //printf("using begin i: %ld\n",i); diff --git a/src/gui/audioplayer.h b/src/gui/audioplayer.h index 1c94fe164..07a6c6fc5 100644 --- a/src/gui/audioplayer.h +++ b/src/gui/audioplayer.h @@ -37,6 +37,7 @@ #include "driver/framebuffer.h" #include "driver/audiofile.h" #include "gui/filebrowser.h" +#include "gui/widget/components.h" #include "gui/widget/menue.h" #include @@ -138,9 +139,10 @@ class CAudioPlayerGui : public CMenuTarget int m_LastMode; int m_idletime; bool m_screensaver; - bool m_vol_ost; 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 597bee4e0..4dea21a80 100644 --- a/src/gui/audioplayer_setup.cpp +++ b/src/gui/audioplayer_setup.cpp @@ -82,7 +82,7 @@ int CAudioPlayerSetup::exec(CMenuTarget* parent, const std::string &actionKey) } res = showAudioPlayerSetup(); - + return res; } @@ -98,25 +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)); - - audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_HIGHPRIO , &g_settings.audioplayer_highprio , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true )); + mf = new CMenuForwarder(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, true, g_settings.audioplayer_screensaver, &audio_screensaver); + mf->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_SCREENSAVER); + audioplayerSetup->addItem(mf); + 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 )); - 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 )); +#endif + 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 0659dc7f4..6cfb749f6 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -66,6 +66,11 @@ CBEBouquetWidget::CBEBouquetWidget() liststart = 0; state = beDefault; blueFunction = beRename; + Bouquets = NULL; + iheight = 0; + ButtonHeight = 0; + fheight = 0; + theight = 0; } void CBEBouquetWidget::paintItem(int pos) @@ -83,7 +88,7 @@ void CBEBouquetWidget::paintItem(int pos) } else { bool has_channels = true; if(current < Bouquets->size()) - has_channels = ((*Bouquets)[current]->tvChannels.size() > 0) || ((*Bouquets)[current]->radioChannels.size() > 0); + has_channels = (!(*Bouquets)[current]->tvChannels.empty() ) || (!(*Bouquets)[current]->radioChannels.empty()); color = has_channels ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE; bgcolor = has_channels ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; frameBuffer->paintBoxRel(x,ypos, width- 15, iheight, bgcolor); @@ -528,7 +533,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 83936c788..00fa4d5e0 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -87,6 +87,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 +109,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); @@ -193,8 +199,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*/) @@ -203,41 +209,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 ad0604abd..e2f787e44 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -72,6 +72,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 +120,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); @@ -208,8 +222,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*/) @@ -218,34 +232,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 0b363dd76..d7f81a167 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -90,7 +90,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 +116,7 @@ void CBookmarkManager::renameBookmark (unsigned int index) { bookmarksmodified=true; } } - +#endif #define BOOKMARKSTRINGLENGTH (10 + 1) #define BOOKMARKSTRINGMODIFICATIONPOINT 8 const char * const BOOKMARKSTRING = "bookmark0."; @@ -195,7 +196,8 @@ CBookmarkManager::~CBookmarkManager () { } //------------------------------------------------------------------------ - +#if 0 +//never used int CBookmarkManager::getBookmarkCount(void) const { return bookmarks.size(); } @@ -205,7 +207,7 @@ int CBookmarkManager::getBookmarkCount(void) const { int CBookmarkManager::getMaxBookmarkCount(void) const { return MAXBOOKMARKS; } - +#endif //------------------------------------------------------------------------ void CBookmarkManager::flush() { @@ -215,7 +217,8 @@ void CBookmarkManager::flush() { } //------------------------------------------------------------------------ - +#if 0 +//never used const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) { if (parent) @@ -244,7 +247,7 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) listmaxshow=bookmarks.size(); height = theight+0+listmaxshow*fheight*2; // recalc height } - if (selected==bookmarks.size() && !(bookmarks.empty())) + if ((!bookmarks.empty() && selected==bookmarks.size())) { selected=bookmarks.size()-1; liststart = (selected/listmaxshow)*listmaxshow; @@ -360,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 5e84ab9f5..c433ffad4 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -224,7 +224,7 @@ int CBouquetList::doMenu() CZapitBouquet * tmp, * zapitBouquet; ZapitChannelList* channels; - if(!Bouquets.size() || g_settings.minimode) + if(Bouquets.empty() || g_settings.minimode) return 0; zapitBouquet = Bouquets[selected]->zapitBouquet; @@ -363,27 +363,31 @@ 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; } } - else if(Bouquets.size() == 0) + else if(Bouquets.empty()) continue; //FIXME msgs not forwarded to neutrino !! else if ( msg == CRCInput::RC_setup) { int ret = doMenu(); @@ -593,7 +597,7 @@ void CBouquetList::paint() { liststart = (selected/listmaxshow)*listmaxshow; int lastnum = liststart + listmaxshow; - int bsize = Bouquets.size() > 0 ? Bouquets.size() : 1; + int bsize = Bouquets.empty() ? 1 : Bouquets.size(); if(lastnum<10) numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("0"); @@ -610,7 +614,7 @@ void CBouquetList::paint() ::paintButtons(x, y + (height - footerHeight), width, sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]), CBouquetListButtons, footerHeight); - if(Bouquets.size()) + if(!Bouquets.empty()) { for(unsigned int count=0;counthide(); - + 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/ch_mosaic.cpp b/src/gui/ch_mosaic.cpp deleted file mode 100644 index c630c0a98..000000000 --- a/src/gui/ch_mosaic.cpp +++ /dev/null @@ -1,256 +0,0 @@ - -/* - Neutrino-GUI - DBoxII-Project - - - 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. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "ch_mosaic.h" - -#warning "experimental..." - - -/* - -- Channel/Service Mosaic - -- Display multiple channel images on screen - -- capture used from outdoor (tmbinc) - -- 2002-11 rasc - */ - - - - -// -// -- init Channel Mosaic Handler Class -// -- to be used for calls from Menue -// - -int CChMosaicHandler::exec(CMenuTarget* parent, const std::string &actionkey) -{ - int res = menu_return::RETURN_EXIT_ALL; - CChMosaic * mosaic; - - - if (parent) { - parent->hide(); - } - - mosaic = new CChMosaic; - mosaic->doMosaic (); - delete mosaic; - - return res; -} - - - - -#define SCREEN_X 720 -#define SCREEN_Y 572 -#define RATIO(y) (((y)*100)/126) // w/h PAL ratio - - -// -// -- Channel Mosaic Class -// -- do Mosaic -// - -CChMosaic::CChMosaic() -{ - pig = new CPIG (0); - capture = new CCAPTURE (0); - current_pig_pos = 0; - - channellist = CNeutrinoApp::getInstance()->channelList; - frameBuffer = CFrameBuffer::getInstance(); -} - - -CChMosaic::~CChMosaic() -{ - delete pig; - -} - - -void CChMosaic::doMosaic() -{ -#define W (150) -#define H (120) - struct PIG_COORD coord[] = { - { 40, 10, W,H }, - {200, 10, W,H }, - {360, 10, W,H }, - {520, 10, W,H }, - { 40,150, W,H }, - {200,150, W,H }, - {360,150, W,H }, - {520,150, W,H }, - { 40,290, W,H }, - {200,290, W,H }, - {360,290, W,H }, - {520,290, W,H }, - { 40,430, W,H }, - {200,430, W,H }, - {360,430, W,H }, - {520,430, W,H } - }; - - int channel; - int i; - - - - channellist = CNeutrinoApp::getInstance()->channelList; - channel = channellist->getActiveChannelNumber(); - - frameBuffer = CFrameBuffer::getInstance(); - - - - - // $$$ mute - - - // -- paint background and - windows - paintBackground(); - for (i=0; i < (int)(sizeof(coord)/sizeof(coord[0])); i++) { - paintMiniTVBackground(coord[i].x,coord[i].y, coord[i].w, coord[i].h); - } - - - - - // experimental - for (i=0; i < (int)(sizeof(coord)/sizeof(coord[0])); i++) { - - u_char frame_buf[SCREEN_X*SCREEN_Y*2]; - int j; - - - // -- adjust pig and zap to channel, set capture size - printf ("pig: %d \n",i); - pig->show (coord[i].x,coord[i].y, coord[i].w, coord[i].h); - channellist->zapTo(channel); - capture->set_coord (coord[i].x, coord[i].y, coord[i].w, coord[i].h); -// capture->set_output_size (coord[i].w, coord[i].h); - - sleep (2); - - - // -- inner loop - // -- try 4 times (4 * 0,5 sec) to get a captured frame - for (j=0; j < 4; j++) { - - neutrino_msg_t msg; - neutrino_msg_data_t data; - - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(500); - g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd ); - printf ("pig inner loop: %d - %d \n",i,j); - - - // $$$ TEST - capture->readframe (frame_buf); - //if (frame_buf[10] == 0x00) continue; - - int a; - for (a=0; a<0x10; a++) { - printf("%02x ",frame_buf[a]); - } - printf ("\n"); - - if (msg == CRCInput::RC_timeout) { - printf ("pig inner loop timeout: \n"); - i = i; - } - - - // -- push other events - if ( msg > CRCInput::RC_MaxRC ) { - CNeutrinoApp::getInstance()->handleMsg( msg, data ); - } - - - - // zap, sleep 0.5 sec - // capture frame - - // loop 4 times frame "empty"? - // --> wait 0,5 sec, re-capture - - } - - // display frame - - // display add info (sendername, epg info) - // - - - channel ++; - } - - - - - // -- clear - clearTV(); - - // $$$ unmute - -} - - - - - -// -// -- some paint abstraction functions in this class -// - -void CChMosaic::clearTV() -{ - frameBuffer->paintBackgroundBoxRel(0,0,SCREEN_X-1,SCREEN_Y-1); -} - -void CChMosaic::paintBackground() -{ - fb_pixel_t col = 254; - frameBuffer->paintBoxRel(0, 0, SCREEN_X-1, SCREEN_Y-1, col); - //frameBuffer->paintBoxRel(0, 0, SCREEN_X-1, SCREEN_Y-1, frameBuffer->realcolor[0xFe]); -} - -void CChMosaic::paintMiniTVBackground(int x, int y, int w, int h) -{ - fb_pixel_t col = 240; - frameBuffer->paintBoxRel(x,y,w,h, col); - //frameBuffer->paintBoxRel(x,y,w,h, frameBuffer->realcolor[0xF0]); -} - - diff --git a/src/gui/ch_mosaic.h b/src/gui/ch_mosaic.h deleted file mode 100644 index e2a8c8b7a..000000000 --- a/src/gui/ch_mosaic.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - - 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. -*/ - - -#ifndef __ch_mosaic__ -#define __ch_mosaic__ - -#include -#include "widget/menue.h" - -#include -#include - - -using namespace std; - -class CChMosaicHandler : public CMenuTarget -{ - public: - int exec( CMenuTarget* parent, const std::string &actionkey); - -}; - - -class CChMosaic -{ - public: - CChMosaic (); - ~CChMosaic (); - void doMosaic (); - - private: - void clearTV (); - void paintBackground (); - void paintMiniTVBackground(int x, int y, int w, int h); - - CPIG *pig; - CCAPTURE *capture; - int current_pig_pos; - - struct PIG_COORD { - int x,y,w,h; - }; - - CChannelList *channellist; - CFrameBuffer *frameBuffer; - -}; - - -#endif - diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 7241799b4..06f6226e1 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 @@ -54,6 +55,7 @@ #include #include #include +#include #include #include @@ -251,10 +253,10 @@ int CChannelList::getKey(int id) static const std::string empty_string; -const std::string & CChannelList::getActiveChannelName(void) const +const std::string CChannelList::getActiveChannelName(void) const { if (selected < chanlist.size()) - return chanlist[selected]->name; + return chanlist[selected]->getName(); else return empty_string; } @@ -583,6 +585,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"); @@ -599,10 +602,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)) { @@ -614,7 +627,7 @@ int CChannelList::show() else if ((msg == CRCInput::RC_red) || (msg == CRCInput::RC_epg)) { hide(); - if ( g_EventList->exec(chanlist[selected]->channel_id, chanlist[selected]->name) == menu_return::RETURN_EXIT_ALL) { + if ( g_EventList->exec(chanlist[selected]->channel_id, chanlist[selected]->getName()) == menu_return::RETURN_EXIT_ALL) { res = -2; loop = false; } @@ -678,7 +691,7 @@ int CChannelList::show() actzap = updateSelection(new_selected); } else if (msg == (neutrino_msg_t)g_settings.key_bouquet_up) { - if (bouquetList->Bouquets.size() > 0) { + if (!bouquetList->Bouquets.empty()) { bool found = true; uint32_t nNext = (bouquetList->getActiveBouquetNumber()+1) % bouquetList->Bouquets.size(); if(bouquetList->Bouquets[nNext]->channelList->getSize() <= 0) { @@ -700,7 +713,7 @@ int CChannelList::show() } } else if (msg == (neutrino_msg_t)g_settings.key_bouquet_down) { - if (bouquetList->Bouquets.size() > 0) { + if (!bouquetList->Bouquets.empty()) { bool found = true; int nNext = (bouquetList->getActiveBouquetNumber()+bouquetList->Bouquets.size()-1) % bouquetList->Bouquets.size(); if(bouquetList->Bouquets[nNext]->channelList->getSize() <= 0) { @@ -752,17 +765,17 @@ int CChannelList::show() if (msg == CRCInput::RC_timeout || msg == CRCInput::RC_nokey) { uint32_t i; for(i = selected+1; i < chanlist.size(); i++) { - char firstCharOfTitle = chanlist[i]->name.c_str()[0]; + char firstCharOfTitle = chanlist[i]->getName().c_str()[0]; if(tolower(firstCharOfTitle) == smsKey) { - //printf("SMS chan found was= %d selected= %d i= %d %s\n", was_sms, selected, i, chanlist[i]->channel->name.c_str()); + //printf("SMS chan found was= %d selected= %d i= %d %s\n", was_sms, selected, i, chanlist[i]->channel->getName().c_str()); break; } } if(i >= chanlist.size()) { for(i = 0; i < chanlist.size(); i++) { - char firstCharOfTitle = chanlist[i]->name.c_str()[0]; + char firstCharOfTitle = chanlist[i]->getName().c_str()[0]; if(tolower(firstCharOfTitle) == smsKey) { - //printf("SMS chan found was= %d selected= %d i= %d %s\n", was_sms, selected, i, chanlist[i]->channel->name.c_str()); + //printf("SMS chan found was= %d selected= %d i= %d %s\n", was_sms, selected, i, chanlist[i]->channel->getName().c_str()); break; } } @@ -844,10 +857,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()) @@ -1116,7 +1125,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel) if (tuned < chanlist.size() && chanlist[tuned]->last_unlocked_time != 0) chanlist[tuned]->last_unlocked_time = time_monotonic(); - printf("**************************** CChannelList::zapToChannel me %p %s tuned %d new %s -> %llx\n", this, name.c_str(), tuned, channel->name.c_str(), channel->channel_id); + printf("**************************** CChannelList::zapToChannel me %p %s tuned %d new %s -> %llx\n", this, name.c_str(), tuned, channel->getName().c_str(), channel->channel_id); if(tuned < chanlist.size()) selected_chid = chanlist[tuned]->getChannelID(); @@ -1128,7 +1137,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel) } selected_chid = channel->getChannelID(); - g_RemoteControl->zapTo_ChannelID(channel->getChannelID(), channel->name, !channel->bAlwaysLocked); + g_RemoteControl->zapTo_ChannelID(channel->getChannelID(), channel->getName(), !channel->bAlwaysLocked); CNeutrinoApp::getInstance()->channelList->adjustToChannelID(channel->getChannelID()); } if(!this->new_mode_active) { @@ -1186,6 +1195,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; @@ -1204,13 +1214,15 @@ int CChannelList::numericZap(int key) if (channelList->getSize() != 0) { this->frameBuffer->paintBackground(); res = channelList->exec(); + CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); } delete channelList; } return res; } - - int sx = 4 * g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(widest_number) + 14; + size_t maxchansize = MaxChanNr().size(); + int fw = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(widest_number); + int sx = maxchansize * fw + (fw/2); int sy = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight() + 6; int ox = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - sx)/2; @@ -1225,14 +1237,14 @@ int CChannelList::numericZap(int key) while(1) { if (lastchan != chn) { snprintf((char*) &valstr, sizeof(valstr), "%d", chn); - while(strlen(valstr) < 4) - strcat(valstr,"-"); //"_" + while(strlen(valstr) < maxchansize) + strcat(valstr,"-"); //"_" frameBuffer->paintBoxRel(ox, oy, sx, sy, COL_INFOBAR_PLUS_0); - for (int i = 3; i >= 0; i--) { + for (int i = maxchansize-1; i >= 0; i--) { valstr[i+ 1] = 0; - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(ox+7+ i*((sx-14)>>2), oy+sy-3, sx, &valstr[i], COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(ox+fw/3+ i*fw, oy+sy-3, sx, &valstr[i], COL_INFOBAR); } showInfo(chn); @@ -1421,7 +1433,7 @@ void CChannelList::virtual_zap_mode(bool up) void CChannelList::quickZap(int key, bool /* cycle */) { - if(chanlist.size() == 0) + if(chanlist.empty()) return; unsigned int sl = selected; @@ -1560,7 +1572,6 @@ 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); @@ -1569,25 +1580,12 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/) 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; - 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(); - 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->paintBoxRel(x, ypos2, width, info_height, col1, RADIUS_LARGE); + //info box frame frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE); - } } } @@ -1601,7 +1599,7 @@ void CChannelList::showChannelLogo() frameBuffer->paintBoxRel(x + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0); std::string lname; - if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->name, lname, &logo_w, &logo_h)) { + if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->getName(), lname, &logo_w, &logo_h)) { if((logo_h > theight) || (logo_w > logo_w_max)) g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, theight); g_PicViewer->DisplayImage(lname, x + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h); @@ -1749,6 +1747,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; @@ -1765,11 +1764,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) @@ -1781,9 +1780,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 @@ -1799,7 +1798,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); @@ -1815,9 +1813,9 @@ void CChannelList::paintItem(int pos) int l=0; if (this->historyMode) - l = snprintf(nameAndDescription, sizeof(nameAndDescription), ": %d %s", chan->number, chan->name.c_str()); + l = snprintf(nameAndDescription, sizeof(nameAndDescription), ": %d %s", chan->number, chan->getName().c_str()); else - l = snprintf(nameAndDescription, sizeof(nameAndDescription), "%s", chan->name.c_str()); + l = snprintf(nameAndDescription, sizeof(nameAndDescription), "%s", chan->getName().c_str()); CProgressBar pb(false); /* never colored */ int pb_space = prg_offset - title_offset; @@ -1901,10 +1899,10 @@ void CChannelList::paintItem(int pos) if (curr == selected) { if (!(chan->currentEvent.description.empty())) { snprintf(nameAndDescription, sizeof(nameAndDescription), "%s - %s", - chan->name.c_str(), p_event->description.c_str()); + chan->getName().c_str(), p_event->description.c_str()); CVFD::getInstance()->showMenuText(0, nameAndDescription, -1, true); // UTF-8 } else - CVFD::getInstance()->showMenuText(0, chan->name.c_str(), -1, true); // UTF-8 + CVFD::getInstance()->showMenuText(0, chan->getName().c_str(), -1, true); // UTF-8 } } } @@ -1955,17 +1953,7 @@ void CChannelList::paintHead() void CChannelList::paint() { - zapit_list_it_t chan_it; - std::stringstream ss; - std::string chan_width; - int chan_nr_max = 1; - unsigned int nr = 0; - for (chan_it=chanlist.begin(); chan_it!=chanlist.end(); ++chan_it) { - chan_nr_max = std::max(chan_nr_max, chanlist[nr++]->number); - } - ss << chan_nr_max; - ss >> chan_width; - numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(chan_width.c_str()); + numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(MaxChanNr().c_str()); liststart = (selected/listmaxshow)*listmaxshow; updateEvents(this->historyMode ? 0:liststart, this->historyMode ? 0:(liststart + listmaxshow)); @@ -2029,3 +2017,17 @@ bool CChannelList::SameTP(CZapitChannel * channel) } return iscurrent; } +std::string CChannelList::MaxChanNr() +{ + zapit_list_it_t chan_it; + std::stringstream ss; + std::string maxchansize; + int chan_nr_max = 1; + unsigned int nr = 0; + for (chan_it=chanlist.begin(); chan_it!=chanlist.end(); ++chan_it) { + chan_nr_max = std::max(chan_nr_max, chanlist[nr++]->number); + } + ss << chan_nr_max; + ss >> maxchansize; + return maxchansize; +} diff --git a/src/gui/channellist.h b/src/gui/channellist.h index cfc4a5061..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 @@ -96,6 +97,7 @@ private: void hide(); void showChannelLogo(); void calcSize(); + std::string MaxChanNr(); public: CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false, bool new_mode_active = false ); @@ -120,7 +122,7 @@ public: const char * getName (void) const { return name.c_str(); }; - const std::string & getActiveChannelName (void) const; // UTF-8 + const std::string getActiveChannelName (void) const; // UTF-8 t_satellite_position getActiveSatellitePosition(void) const; int getActiveChannelNumber (void) const; t_channel_id getActiveChannel_ChannelID(void) const; diff --git a/src/gui/epg_menu.cpp b/src/gui/epg_menu.cpp deleted file mode 100644 index 28dbc172d..000000000 --- a/src/gui/epg_menu.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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 - -// -// -- EPG Menue Handler Class -// -- to be used for calls from Menue -// -- (2004-03-06 rasc) -// - -int CEPGMenuHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/) -{ - int res = menu_return::RETURN_EXIT_ALL; - - - if (parent) { - parent->hide(); - } - - doMenu (); - return res; -} - -int CEPGMenuHandler::doMenu () -{ - CMenuWidget EPGSelector(LOCALE_EPGMENU_HEAD, NEUTRINO_ICON_FEATURES); - - // EPGSelector.addItem(GenericMenuSeparator); - EPGSelector.addItem(new CMenuForwarder(LOCALE_EPGMENU_EVENTLIST , true, NULL, new CEventListHandler(), NULL, CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED ), false); - EPGSelector.addItem(new CMenuForwarder(LOCALE_EPGMENU_EPGPLUS , true, NULL, new CEPGplusHandler() , NULL, CRCInput::RC_green , NEUTRINO_ICON_BUTTON_GREEN ), false); - EPGSelector.addItem(new CMenuForwarder(LOCALE_EPGMENU_EVENTINFO , true, NULL, new CEPGDataHandler() , NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW), false); - EPGSelector.addItem(new CMenuForwarder(LOCALE_EPGMENU_STREAMINFO, true, NULL, new CStreamInfo2() , NULL, CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE ), false); - - EPGSelector.addItem(GenericMenuSeparator); - - return EPGSelector.exec(NULL, ""); -} - diff --git a/src/gui/epg_menu.h b/src/gui/epg_menu.h deleted file mode 100644 index 8c9a98add..000000000 --- a/src/gui/epg_menu.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - - 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. -*/ - - -#ifndef __epg_menu__ -#define __epg_menu__ - - -#include "widget/menue.h" - - - -using namespace std; - -class CEPGMenuHandler : public CMenuTarget -{ - public: - int exec( CMenuTarget* parent, const std::string &actionkey); - int doMenu(); - -}; - - -#endif - diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index d19a778ed..35bbcaca7 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -881,7 +881,7 @@ int EpgPlus::exec (CChannelList * pchannelList, int selectedChannelIndex, CBouqu this->paint(); } if (msg == CRCInput::RC_yellow) { - if (bouquetList->Bouquets.size() > 0) { + if (!bouquetList->Bouquets.empty()) { bool found = true; uint32_t nNext = (bouquetList->getActiveBouquetNumber()+1) % bouquetList->Bouquets.size(); //printf("**************************** EpgPlus::exec current bouquet %d new %d\n", bouquetList->getActiveBouquetNumber(), nNext); @@ -908,7 +908,7 @@ int EpgPlus::exec (CChannelList * pchannelList, int selectedChannelIndex, CBouqu } } else if (msg == CRCInput::RC_green) { - if (bouquetList->Bouquets.size() > 0) { + if (!bouquetList->Bouquets.empty()) { bool found = true; int nNext = (bouquetList->getActiveBouquetNumber()+bouquetList->Bouquets.size()-1) % bouquetList->Bouquets.size(); if(bouquetList->Bouquets[nNext]->channelList->getSize() <= 0) { @@ -1263,7 +1263,7 @@ int CEPGplusHandler::exec (CMenuTarget * parent, const std::string & /*actionKey //channelList = CNeutrinoApp::getInstance()->channelList; int bnum = bouquetList->getActiveBouquetNumber(); current_bouquet = bnum; - if(bouquetList->Bouquets.size() && bouquetList->Bouquets[bnum]->channelList->getSize() > 0) + if(!bouquetList->Bouquets.empty() && bouquetList->Bouquets[bnum]->channelList->getSize() > 0) channelList = bouquetList->Bouquets[bnum]->channelList; else channelList = CNeutrinoApp::getInstance()->channelList; diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index d4ad4202d..40f6616be 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -47,7 +47,6 @@ #include #include -#include #include #include #include @@ -568,7 +567,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start // 21.07.2005 - rainerk // Show extended information - if (0 != epgData.itemDescriptions.size() && 0 != epgData.items.size()) { + if ( !epgData.itemDescriptions.empty() && !epgData.items.empty()) { char line[256]; std::vector::iterator description; std::vector::iterator item; @@ -593,10 +592,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; } COSDFader fader(g_settings.menu_Content_alpha); @@ -848,7 +849,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; @@ -1073,7 +1091,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) @@ -1098,9 +1118,9 @@ void CEpgData::showTimerEventBar (bool pshow) frameBuffer->paintBoxRel(sx,y,ox,h, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM);//round if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) - ::paintButtons(x, y, 0, 2, EpgButtons, h); + ::paintButtons(x, y, 0, has_follow_screenings ? 3:2, EpgButtons, h); else - ::paintButtons(x, y, 0, 1, &EpgButtons[1], h); + ::paintButtons(x, y, 0, has_follow_screenings ? 2:1, &EpgButtons[1], h); #if 0 // Button: Timer Record & Channelswitch 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 42e1b5a80..496f545cf 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 @@ -230,7 +231,7 @@ void CNeutrinoEventList::readEvents(const t_channel_id channel_id) current_event++; } - if ( evtlist.size() == 0 ) + if ( evtlist.empty() ) { CChannelEvent evt; @@ -247,12 +248,12 @@ void CNeutrinoEventList::readEvents(const t_channel_id channel_id) } -int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& channelname, const std::string& channelname_prev, const std::string& channelname_next) // UTF-8 +int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& channelname, const std::string& channelname_prev, const std::string& channelname_next,const CChannelEventList &followlist) // UTF-8 { neutrino_msg_t msg; neutrino_msg_data_t data; bool in_search = false; - + showfollow = false; // Calculate iheight struct button_label tmp_button[1] = { { NEUTRINO_ICON_BUTTON_RED, NONEXISTANT_LOCALE } }; iheight = ::paintButtons(0, 0, 0, 1, tmp_button, 0, 0, false, COL_INFOBAR_SHADOW, NULL, 0, false); @@ -299,8 +300,13 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c COSDFader fader(g_settings.menu_Content_alpha); fader.StartFadeIn(); - - readEvents(channel_id); + if(!followlist.empty()){ + insert_iterator >ii(evtlist,evtlist.begin()); + copy(followlist.begin(), followlist.end(), ii); + showfollow = true; + }else{ + readEvents(channel_id); + } UpdateTimerList(); if(channelname_prev.empty(), channelname_next.empty()){ @@ -384,7 +390,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) @@ -634,7 +640,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]); @@ -937,11 +943,12 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id) bx+=w_button+4; } } - - // Button: Search - FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_SECOND_BUTTON, EventListSecondButton), FunctionBarHeight); - bx+=w_button+4; + if(!showfollow){ + // Button: Search + FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_SECOND_BUTTON, EventListSecondButton), FunctionBarHeight); + bx+=w_button+4; + } // Button: Timer Channelswitch if ((uint) g_settings.key_channelList_addremind != CRCInput::RC_nokey) { if (!g_settings.minimode) { @@ -960,14 +967,15 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id) FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_THIRD_BUTTON, EventListThirdButton), FunctionBarHeight); bx+=w_button+4; } - - // 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); - EventListFourthButton[0].button = icon; - FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_THIRD_BUTTON, EventListFourthButton), FunctionBarHeight); -// bx+=w_button+4; + 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); + EventListFourthButton[0].button = icon; + FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_THIRD_BUTTON, EventListFourthButton), FunctionBarHeight); +// bx+=w_button+4; + } } } @@ -1066,7 +1074,7 @@ bool CNeutrinoEventList::findEvents(void) } if(evtlist.empty()) { - if ( evtlist.size() == 0 ) + if ( evtlist.empty() ) { CChannelEvent evt; //evt.description = m_search_keyword + ": " + g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND); 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 2f5487ccf..9bfc94f0e 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -40,8 +40,6 @@ #include #include -#include - #include #include #include @@ -49,6 +47,7 @@ #include #include +#include #include #include #include @@ -63,8 +62,6 @@ #include #endif -#include - #include #ifdef __USE_FILE_OFFSET64 @@ -986,7 +983,7 @@ bool CFileBrowser::exec(const char * const dirname) } else #endif - if (selections.size() > 0) + if (!selections.empty()) { ChangeDir("..",selections.back()); selections.pop_back(); @@ -1046,7 +1043,7 @@ bool CFileBrowser::exec(const char * const dirname) else #endif { - if (selections.size() > 0) + if ( !selections.empty() ) { ChangeDir("..",selections.back()); selections.pop_back(); diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index b88bcda6a..178c56192 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -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)); @@ -226,11 +233,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]); diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp index b5af0e710..ea5ffd0c7 100644 --- a/src/gui/info_menue.cpp +++ b/src/gui/info_menue.cpp @@ -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.cpp b/src/gui/infoclock.cpp index 6449d5fea..dee035330 100644 --- a/src/gui/infoclock.cpp +++ b/src/gui/infoclock.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 28586a3e4..595044fc6 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -250,20 +251,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; @@ -799,14 +806,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) { @@ -1883,7 +1895,7 @@ void CInfoViewer::showEpgInfo() //message on event change } } - +#if 0 int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & /*actionkey*/) { int res = menu_return::RETURN_EXIT_ALL; @@ -1903,3 +1915,4 @@ int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & /*action return res; } +#endif diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index cc1bec95a..acecd909a 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -171,7 +171,7 @@ class CInfoViewer void Init(void); bool SDT_freq_update; }; - +#if 0 class CInfoViewerHandler : public CMenuTarget { public: @@ -180,3 +180,4 @@ class CInfoViewerHandler : public CMenuTarget }; #endif +#endif diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 29060db68..1d0f8a193 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -163,7 +164,8 @@ void CInfoViewerBB::getBBIconInfo() break; #endif case CInfoViewerBB::ICON_DD: - iconView = checkBBIcon(NEUTRINO_ICON_DD, &w, &h); + if( g_settings.infobar_show_dd_available ) + iconView = checkBBIcon(NEUTRINO_ICON_DD, &w, &h); break; case CInfoViewerBB::ICON_16_9: //no radio if (neutrino->getMode() != NeutrinoMessages::mode_radio) @@ -223,7 +225,7 @@ void CInfoViewerBB::getBBButtonInfo() text = g_settings.usermenu_text[SNeutrinoSettings::BUTTON_GREEN]; if (text == g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD)) text = ""; - if (g_RemoteControl->current_PIDs.APIDs.size() > 0) { + if (!g_RemoteControl->current_PIDs.APIDs.empty()) { int selected = g_RemoteControl->current_PIDs.PIDs.selected_apid; if (text.empty()) text = g_RemoteControl->current_PIDs.APIDs[selected].desc; @@ -414,14 +416,14 @@ void CInfoViewerBB::showIcon_VTXT() void CInfoViewerBB::showIcon_DD() { - if (!is_visible) + if (!is_visible || !g_settings.infobar_show_dd_available) return; std::string dd_icon; if ((g_RemoteControl->current_PIDs.PIDs.selected_apid < g_RemoteControl->current_PIDs.APIDs.size()) && (g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].is_ac3)) dd_icon = NEUTRINO_ICON_DD; - else - dd_icon = (g_RemoteControl->has_ac3) ? NEUTRINO_ICON_DD_AVAIL : NEUTRINO_ICON_DD_GREY; + else + dd_icon = g_RemoteControl->has_ac3 ? NEUTRINO_ICON_DD_AVAIL : NEUTRINO_ICON_DD_GREY; showBBIcons(CInfoViewerBB::ICON_DD, dd_icon); } @@ -672,7 +674,7 @@ void CInfoViewerBB::paint_ca_icons(int caid, char * icon, int &icon_space_offset void CInfoViewerBB::showIcon_CA_Status(int notfirst) { - int caids[] = { 0x600, 0x0100, 0x0500, 0x1800, 0xB00, 0xD00, 0x900, 0x2600, 0x4a00, 0x0E00 }; + int caids[] = { 0x900, 0xD00, 0xB00, 0x1800, 0x0500, 0x0100, 0x600, 0x2600, 0x4a00, 0x0E00 }; const char * white = (char *) "white"; const char * yellow = (char *) "yellow"; int icon_space_offset = 0; @@ -698,7 +700,7 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst) return; if (g_settings.casystem_display == 2) { - fta = (channel->camap.size() == 0); + fta = channel->camap.empty(); showOne_CAIcon(); return; } diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 21f8dce61..ae783f70e 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -86,7 +86,7 @@ int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey) { parent->hide(); } - + if(actionKey == "loadkeys") { CFileBrowser fileBrowser; CFileFilter fileFilter; @@ -148,43 +148,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 } }; @@ -203,27 +204,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, ""); @@ -238,7 +257,7 @@ int CKeybindSetup::showKeySetup() g_settings.remote_control_hardware = org_remote_control_hardware; g_RCInput->CRCInput::set_rc_hw(); } - } + } delete keySettings; return res; @@ -247,76 +266,123 @@ 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])); - bindSettings->addItem(new CMenuDForwarder(key_settings[KEY_SCREENSHOT].keydescription, true, keychooser[KEY_SCREENSHOT]->getKeyName(), keychooser[KEY_SCREENSHOT])); + // 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 + 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); + //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..dd4422e0e 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -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/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index e4cc2dc89..01ec9cfb6 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -66,7 +66,6 @@ CMiscMenue::~CMiscMenue() } - int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey) { printf("init extended settings menu...\n"); @@ -169,40 +168,54 @@ 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(cs_get_revision() > 7) { 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; - 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); //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 @@ -224,22 +237,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*/ @@ -251,16 +276,24 @@ 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 CMiscNotifier( m1, m2 ); - ms_energy->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier)); + 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(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 @@ -268,21 +301,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 @@ -290,9 +335,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 @@ -300,12 +353,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 @@ -319,15 +390,3 @@ void CMiscMenue::showMiscSettingsMenuCPUFreq(CMenuWidget *ms_cpu) ms_cpu->addItem(new CMenuOptionChooser(LOCALE_CPU_FREQ_STANDBY, &g_settings.standby_cpufreq, CPU_FREQ_OPTIONS, CPU_FREQ_OPTION_COUNT, true)); } #endif /*CPU_FREQ*/ - -#if 0 -//emlog -void CMiscMenue::showMiscSettingsMenuEmLog(CMenuWidget *ms_emlog) -{ - ms_emlog->addIntroItems(LOCALE_MISCSETTINGS_DRIVER_BOOT); - if (access("/var/tuxbox/emlog", F_OK) == 0) - g_settings.emlog = 1; - ms_emlog->addItem(new CMenuOptionChooser(LOCALE_EXTRA_USELOG, &g_settings.emlog, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, new CLogChangeNotifier)); -} -#endif - diff --git a/src/gui/miscsettings_menu.h b/src/gui/miscsettings_menu.h index b73bdd970..888d91915 100644 --- a/src/gui/miscsettings_menu.h +++ b/src/gui/miscsettings_menu.h @@ -54,9 +54,6 @@ class CMiscMenue : public CMenuTarget #ifdef CPU_FREQ void showMiscSettingsMenuCPUFreq(CMenuWidget *ms_cpu); #endif /*CPU_FREQ*/ -#if 0 - void showMiscSettingsMenuEmLog(CMenuWidget *ms_emlog); -#endif public: CMiscMenue(); ~CMiscMenue(); diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index 6334a1946..6c42ab6d4 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -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(); @@ -162,9 +162,9 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) g_Zapit->setScanSatelliteList( satList); CZapit::getInstance()->SetLiveFrontend(frontend); - TP.feparams.frequency = atoi(scansettings.TP_freq); - TP.feparams.u.qpsk.symbol_rate = atoi(scansettings.TP_rate); - TP.feparams.u.qpsk.fec_inner = (fe_code_rate_t)scansettings.TP_fec; + TP.feparams.dvb_feparams.frequency = atoi(scansettings.TP_freq); + TP.feparams.dvb_feparams.u.qpsk.symbol_rate = atoi(scansettings.TP_rate); + TP.feparams.dvb_feparams.u.qpsk.fec_inner = (fe_code_rate_t)scansettings.TP_fec; TP.polarization = scansettings.TP_pol; g_Zapit->tune_TP(TP); diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 6daa81ca8..219d90c2f 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -59,14 +59,15 @@ #include #include #include "neutrino.h" -#include #include // for statfs -#include #include #include +#include +#include #include #include #include +#include #include extern CPictureViewer * g_PicViewer; @@ -1206,7 +1207,7 @@ void CMovieBrowser::refreshMovieInfo(void) { //TRACE("[mb]->refreshMovieInfo m_vMovieInfo.size %d\n", m_vMovieInfo.size()); std::string emptytext = " "; - if(m_vMovieInfo.size() <= 0) { + if(m_vMovieInfo.empty()) { if(m_pcInfo != NULL) m_pcInfo->setText(&emptytext); return; @@ -1286,7 +1287,7 @@ void CMovieBrowser::info_hdd_level(bool paint_hdd) } void CMovieBrowser::refreshLCD(void) { - if(m_vMovieInfo.size() <= 0) return; + if(m_vMovieInfo.empty()) return; //CVFD * lcd = CVFD::getInstance(); if(m_movieSelectionHandler == NULL) @@ -1313,7 +1314,7 @@ void CMovieBrowser::refreshFilterList(void) m_FilterLines.rowWidth[0] = 100; m_FilterLines.lineHeader[0]= ""; - if(m_vMovieInfo.size() <= 0) + if(m_vMovieInfo.empty()) return; // exit here if nothing else is to do if(m_settings.filter.item == MB_INFO_MAX_NUMBER) @@ -1389,7 +1390,7 @@ void CMovieBrowser::refreshLastPlayList(void) //P2 } m_vHandlePlayList.clear(); - if(m_vMovieInfo.size() <= 0) { + if(m_vMovieInfo.empty()) { if(m_pcLastPlay != NULL) m_pcLastPlay->setLines(&m_playListLines); return; // exit here if nothing else is to do @@ -1447,7 +1448,7 @@ void CMovieBrowser::refreshLastRecordList(void) //P2 } m_vHandleRecordList.clear(); - if(m_vMovieInfo.size() <= 0) { + if(m_vMovieInfo.empty()) { if(m_pcLastRecord != NULL) m_pcLastRecord->setLines(&m_recordListLines); return; // exit here if nothing else is to do @@ -1506,7 +1507,7 @@ void CMovieBrowser::refreshBrowserList(void) //P1 } m_vHandleBrowserList.clear(); - if(m_vMovieInfo.size() <= 0) + if(m_vMovieInfo.empty()) { m_currentBrowserSelection = 0; m_movieSelectionHandler = NULL; @@ -1727,7 +1728,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) } else if (msg == CRCInput::RC_spkr) { - if ((m_vMovieInfo.size() > 0) && (m_movieSelectionHandler != NULL) && (IsRecord == false)) + if ((!m_vMovieInfo.empty()) && (m_movieSelectionHandler != NULL) && (IsRecord == false)) onDeleteFile(*m_movieSelectionHandler); } else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) @@ -2086,8 +2087,8 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler) m_vMovieInfo.erase( (std::vector::iterator)&movieSelectionHandler); TRACE("List size: %d\n", m_vMovieInfo.size()); - //if(m_vMovieInfo.size() == 0) fileInfoStale(); - //if(m_vMovieInfo.size() == 0) onSetGUIWindow(m_settings.gui); + //if(m_vMovieInfo.empty()) fileInfoStale(); + //if(m_vMovieInfo.empty()) onSetGUIWindow(m_settings.gui); updateSerienames(); refreshBrowserList(); refreshLastPlayList(); @@ -2318,7 +2319,7 @@ void CMovieBrowser::onSetFocusNext(void) bool CMovieBrowser::onSortMovieInfoHandleList(std::vector& handle_list, MB_INFO_ITEM sort_item, MB_DIRECTION direction) { //TRACE("sort: %d\r\n",direction); - if(handle_list.size() <= 0) + if(handle_list.empty()) return (false); // nothing to sort, return immedately if(sortBy[sort_item] == NULL) return (false); @@ -2399,7 +2400,7 @@ void CMovieBrowser::loadAllTsFileNamesFromStorage(void) TRACE("[mb] Dir%d, Files:%d \r\n",m_dirNames.size(),m_vMovieInfo.size()); /* - if(m_vMovieInfo.size() == 0) + if(m_vMovieInfo.empty()) { std::string msg = g_Locale->getText(LOCALE_MOVIEBROWSER_ERROR_NO_MOVIES); DisplayErrorMessage(msg.c_str()); @@ -2575,23 +2576,23 @@ bool CMovieBrowser::delFile_vlc(CFile& /*file*/) bool CMovieBrowser::delFile_std(CFile& file) { bool result = true; - char buf[FILENAME_MAX]={0}; - snprintf(buf,sizeof(buf), "nice -n 20 rm -f \"%s\" &", file.Name.c_str()); - system(buf); + int errno = unlink(file.Name.c_str()); TRACE(" delete file: %s\r\n",file.Name.c_str()); + if(errno) + result = false; return(result); } void CMovieBrowser::updateMovieSelection(void) { //TRACE("[mb]->updateMovieSelection %d\r\n",m_windowFocus); - if (m_vMovieInfo.size() == 0) return; + if (m_vMovieInfo.empty()) return; bool new_selection = false; unsigned int old_movie_selection; if(m_windowFocus == MB_FOCUS_BROWSER) { - if(m_vHandleBrowserList.size() == 0) + if(m_vHandleBrowserList.empty()) { // There are no elements in the Filebrowser, clear all handles m_currentBrowserSelection = 0; @@ -2612,7 +2613,7 @@ void CMovieBrowser::updateMovieSelection(void) } else if(m_windowFocus == MB_FOCUS_LAST_PLAY) { - if(m_vHandlePlayList.size() == 0) + if(m_vHandlePlayList.empty()) { // There are no elements in the Filebrowser, clear all handles m_currentPlaySelection = 0; @@ -2633,7 +2634,7 @@ void CMovieBrowser::updateMovieSelection(void) } else if(m_windowFocus == MB_FOCUS_LAST_RECORD) { - if(m_vHandleRecordList.size() == 0) + if(m_vHandleRecordList.empty()) { // There are no elements in the Filebrowser, clear all handles m_currentRecordSelection = 0; @@ -2666,7 +2667,7 @@ void CMovieBrowser::updateMovieSelection(void) void CMovieBrowser::updateFilterSelection(void) { //TRACE("[mb]->updateFilterSelection \r\n"); - if(m_FilterLines.lineArray[0].size() == 0) return; + if(m_FilterLines.lineArray[0].empty()) return; bool result = true; int selected_line = m_pcFilter->getSelectedLine(); @@ -2883,7 +2884,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); } @@ -3112,7 +3113,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) { @@ -3214,7 +3215,7 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite *item_string = movie_info.file.getFileName(); break; case MB_INFO_FILEPATH: // = 1, - if(m_dirNames.size() > 0) + if(!m_dirNames.empty()) *item_string = m_dirNames[movie_info.dirItNr]; break; case MB_INFO_TITLE: // = 2, @@ -3447,7 +3448,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; @@ -3557,7 +3558,7 @@ CDirMenu::CDirMenu(std::vector* dir_list) { std::string tmp = g_settings.network_nfs_local_dir[nfs]; int result = -1; - if(tmp.size()) + if(!tmp.empty()) result = (*dirList)[i].name.compare( 0,tmp.size(),tmp) ; printf("[CDirMenu] (nfs%d) %s == (mb%d) %s (%d)\n",nfs,g_settings.network_nfs_local_dir[nfs],i,(*dirList)[i].name.c_str(),result); @@ -3840,7 +3841,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); @@ -3851,7 +3853,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) { diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp index 32d3ae023..e5c4f0912 100644 --- a/src/gui/movieinfo.cpp +++ b/src/gui/movieinfo.cpp @@ -48,6 +48,7 @@ #include #include +#include #include #include #include @@ -82,7 +83,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; } @@ -182,7 +183,7 @@ bool CMovieInfo::encodeMovieInfoXml(std::string * extMessage, MI_MOVIE_INFO * mo XML_ADD_TAG_UNSIGNED(*extMessage, MI_XML_TAG_MODE, movie_info->epgMode); //%d XML_ADD_TAG_UNSIGNED(*extMessage, MI_XML_TAG_VIDEOPID, movie_info->epgVideoPid); //%u XML_ADD_TAG_UNSIGNED(*extMessage, MI_XML_TAG_VIDEOTYPE, movie_info->VideoType); //%u - if (movie_info->audioPids.size() > 0) { + if ( !movie_info->audioPids.empty() ) { //*extMessage += "\t\t<"MI_XML_TAG_AUDIOPIDS" selected=\""; //sprintf(tmp, "%u", movie_info->audioPids[0].epgAudioPid); //pids.APIDs[i].pid); //*extMessage += tmp; @@ -320,6 +321,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 @@ -412,7 +415,7 @@ bool CMovieInfo::parseXmlTree(char */*text*/, MI_MOVIE_INFO * /*movie_info*/) #endif /* XMLTREE_LIB */ return (true); } - +#endif /************************************************************************ ************************************************************************/ @@ -426,7 +429,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) print_buffer += "\n"; print_buffer += movie_info.epgInfo2; - if (movie_info.productionCountry.size() != 0 || movie_info.productionDate != 0) { + if ( !movie_info.productionCountry.empty() || movie_info.productionDate != 0) { print_buffer += "\n"; print_buffer += movie_info.productionCountry; print_buffer += " "; @@ -468,7 +471,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) snprintf(date_char, 12, "%3d", movie_info.length); print_buffer += date_char; } - if (movie_info.audioPids.size() != 0) { + if ( !movie_info.audioPids.empty() ) { print_buffer += "\n"; print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_AUDIO); print_buffer += ": "; @@ -512,6 +515,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()); @@ -560,7 +565,7 @@ void CMovieInfo::printDebugMovieInfo(MI_MOVIE_INFO & movie_info) } } } - +#endif /************************************************************************ ************************************************************************/ @@ -828,7 +833,7 @@ bool CMovieInfo::addNewBookmark(MI_MOVIE_INFO * movie_info, MI_BOOKMARK & new_bo movie_info->bookmarks.user[i].pos = new_bookmark.pos; movie_info->bookmarks.user[i].length = new_bookmark.length; //if(movie_info->bookmarks.user[i].name.empty()) - if (movie_info->bookmarks.user[i].name.size() == 0) { + if (movie_info->bookmarks.user[i].name.empty() ) { if (new_bookmark.length == 0) movie_info->bookmarks.user[i].name = g_Locale->getText(LOCALE_MOVIEBROWSER_BOOK_NEW); if (new_bookmark.length < 0) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 7b7af2963..373e2e031 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -47,6 +48,9 @@ #include #include "libtuxtxt/teletext.h" #include +#include +#include +#include //extern CPlugins *g_PluginList; #if HAVE_TRIPLEDRAGON @@ -113,6 +117,8 @@ void CMoviePlayerGui::Init(void) tsfilefilter.addFilter("m2ts"); tsfilefilter.addFilter("mp4"); tsfilefilter.addFilter("mov"); + tsfilefilter.addFilter("m3u"); + tsfilefilter.addFilter("pls"); if (strlen(g_settings.network_nfs_moviedir) != 0) Path_local = g_settings.network_nfs_moviedir; @@ -292,6 +298,7 @@ bool CMoviePlayerGui::SelectFile() is_file_player = false; p_movie_info = NULL; + file_name = ""; printf("CMoviePlayerGui::SelectFile: isBookmark %d timeshift %d isMovieBrowser %d\n", isBookmark, timeshift, isMovieBrowser); if (has_hdd) @@ -348,10 +355,35 @@ bool CMoviePlayerGui::SelectFile() is_file_player = true; full_name = file->Name.c_str(); ret = true; + if(file->getType() == CFile::FILE_PLAYLIST) { + std::ifstream infile; + char cLine[256]; + char name[255] = { 0 }; + infile.open(file->Name.c_str(), std::ifstream::in); + while (infile.good()) + { + infile.getline(cLine, 255); + if (cLine[strlen(cLine)-1]=='\r') + cLine[strlen(cLine)-1]=0; + + int duration; + sscanf(cLine, "#EXTINF:%d,%[^\n]\n", &duration, name); + if (strlen(cLine) > 0 && cLine[0]!='#') + { + char *url = strstr(cLine, "http://"); + if (url != NULL) { + printf("name %s [%d] url: %s\n", name, duration, url); + full_name = url; + if(strlen(name)) + file_name = name; + } + } + } + } } } } - if(ret) { + if(ret && file_name.empty()) { std::string::size_type pos = full_name.find_last_of('/'); if(pos != std::string::npos) { file_name = full_name.substr(pos+1); diff --git a/src/gui/network_service.cpp b/src/gui/network_service.cpp new file mode 100644 index 000000000..6585c919c --- /dev/null +++ b/src/gui/network_service.cpp @@ -0,0 +1,202 @@ +/* + Neutrino-GUI - DBoxII-Project + + Copyright (C) 2011 CoolStream International Ltd + + 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; + + 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 "gui/network_service.h" +#include "mymenu.h" + +#include + +#include +#include + +#define TOUCH_BASE "/var/etc/." + +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", "", 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) +{ + command = cmd; + options = opts; + enabled = false; + + std::string file = TOUCH_BASE + cmd; + if (!access(file.c_str(), F_OK)) + enabled = true; +} + +void CNetworkService::Start() +{ + std::string cmd = command + " " + options; + printf("CNetworkService::Start: %s\n", cmd.c_str()); + system(cmd.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()); + enabled = false; + TouchFile(); +} + +void CNetworkService::TouchFile() +{ + std::string file = TOUCH_BASE + command; + printf("CNetworkService::TouchFile: %s %s\n", enabled ? "create" : "remove", file.c_str()); + if(enabled) { + FILE * fp = fopen(file.c_str(), "w"); + if (fp) + fclose(fp); + } else { + unlink(file.c_str()); + } +} + +bool CNetworkService::changeNotify(const neutrino_locale_t /*OptionName*/, void * data) +{ + int value = *(int *)data; + + printf("CNetworkService::changeNotify: %d (enabled %d)\n", value, enabled); + if (value != 0) + Start(); + else + Stop(); + + return false; +} + +CNetworkServiceSetup::CNetworkServiceSetup() +{ + width = w_max (40, 10); + selected = -1; +} + +CNetworkServiceSetup::~CNetworkServiceSetup() +{ +} + +int CNetworkServiceSetup::exec(CMenuTarget* parent, const std::string & /*actionKey*/) +{ + dprintf(DEBUG_DEBUG, "init network services setup menu\n"); + + if (parent) + parent->hide(); + + return showNetworkServiceSetup(); +} + +int CNetworkServiceSetup::showNetworkServiceSetup() +{ + int shortcut = 1; + + CMenuWidget* setup = new CMenuWidget(LOCALE_MAINSETTINGS_NETWORK, NEUTRINO_ICON_SETTINGS, width); + setup->setSelected(selected); + setup->addIntroItems(LOCALE_NETWORKMENU_SERVICES); + + 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(); + + 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, ""); + selected = setup->getSelected(); + delete setup; + + for(unsigned i = 0; i < SERVICE_COUNT; i++) + delete items[i]; + + return res; +} diff --git a/src/gui/network_service.h b/src/gui/network_service.h new file mode 100644 index 000000000..f186046c1 --- /dev/null +++ b/src/gui/network_service.h @@ -0,0 +1,61 @@ +/* + Neutrino-GUI - DBoxII-Project + + Copyright (C) 2011 CoolStream International Ltd + + 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; + + 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. +*/ + +#ifndef __network_service__ +#define __network_service__ + +#include + +#include + +class CNetworkService : public CChangeObserver +{ + private: + std::string command; + std::string options; + bool enabled; + + void Stop(); + void Start(); + void TouchFile(); + + public: + CNetworkService(std::string cmd, std::string options); + bool Enabled() { return enabled; } + + bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/); +}; + +class CNetworkServiceSetup : public CMenuTarget +{ + private: + int width, selected; + + int showNetworkServiceSetup(); + + public: + CNetworkServiceSetup(); + ~CNetworkServiceSetup(); + + int exec(CMenuTarget* parent, const std::string & actionKey); +}; + +#endif diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp index 6ed6c6830..97e5c879b 100644 --- a/src/gui/network_setup.cpp +++ b/src/gui/network_setup.cpp @@ -44,6 +44,8 @@ #include #include +#include + #include #include #include @@ -102,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(); @@ -120,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) { @@ -134,7 +136,7 @@ int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey) printf("[neutrino] init network setup...\n"); res = showNetworkSetup(); - + return res; } @@ -142,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; @@ -196,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; @@ -222,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); @@ -232,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; @@ -249,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; @@ -256,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) @@ -298,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; @@ -309,21 +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; + 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()) @@ -331,7 +366,7 @@ int CNetworkSetup::showNetworkSetup() if(res == menu_return::RETURN_EXIT) break; } - + delete networkSettings; delete sectionsdConfigNotifier; return ret; @@ -347,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); @@ -357,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 @@ -367,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++) @@ -394,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 }, @@ -420,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; } @@ -464,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"); @@ -496,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(); @@ -517,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) @@ -530,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; @@ -538,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()); diff --git a/src/gui/nfs.cpp b/src/gui/nfs.cpp index bef2fe9d4..79122a775 100644 --- a/src/gui/nfs.cpp +++ b/src/gui/nfs.cpp @@ -318,7 +318,7 @@ int CNFSUmountGui::menu() umountMenu.addItem(forwarder); } } - if(infos.size() > 0) + if( !infos.empty() ) return umountMenu.exec(this,""); else return menu_return::RETURN_REPAINT; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 749637ec4..f00c98c38 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -35,11 +35,9 @@ #include "osd_setup.h" -#include "alphasetup.h" #include "themes.h" #include "screensetup.h" #include "osdlang_setup.h" -#include "themes.h" #include "filebrowser.h" #include @@ -122,22 +120,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 @@ -167,7 +166,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) @@ -178,13 +178,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()); @@ -192,13 +192,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; @@ -394,51 +394,113 @@ 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); //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)); + 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); //monitor - osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, this)); + CMenuOptionChooser * 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)); - 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)); + // 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; + 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, ""); @@ -451,7 +513,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); @@ -469,33 +533,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 */ @@ -547,19 +643,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++) { @@ -574,7 +685,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++; } } @@ -611,27 +724,89 @@ 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_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 + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER, &g_settings.infobar_show_tuner, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + 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) @@ -642,6 +817,12 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) osd_menu->hide(); return true; } + 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; + } else if((ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY)) || (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER))) { if (g_InfoViewer == NULL) @@ -664,7 +845,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; } @@ -690,24 +877,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++) { @@ -716,7 +901,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(); @@ -744,13 +928,32 @@ void COsdSetup::showOsdScreenshottSetup(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); } diff --git a/src/gui/osdlang_setup.cpp b/src/gui/osdlang_setup.cpp index 7561fc2b0..5e07e270c 100644 --- a/src/gui/osdlang_setup.cpp +++ b/src/gui/osdlang_setup.cpp @@ -56,7 +56,7 @@ COsdLangSetup::COsdLangSetup(bool wizard_mode) { is_wizard = wizard_mode; - + width = w_max (45, 10); } @@ -72,8 +72,8 @@ int COsdLangSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/) parent->hide(); int res = showLocalSetup(); - - return res; + + return res; } //show international settings menu @@ -82,28 +82,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; @@ -117,15 +123,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"); @@ -135,16 +142,16 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems() } search = search->xmlNextNode; } - + if (!found) - { + { delete tzSelect; tzSelect = NULL; } - + xmlFreeDoc(parser); } - + return tzSelect; } @@ -156,23 +163,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); @@ -192,27 +199,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); @@ -236,16 +249,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()); @@ -256,6 +269,6 @@ bool CLangSelectNotifier::changeNotify(const neutrino_locale_t, void *) } //if(found) sectionsd_set_languages(v_languages); - + return false; } diff --git a/src/gui/parentallock_setup.cpp b/src/gui/parentallock_setup.cpp index a4b6981c8..8a7d867a1 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. */ @@ -56,10 +57,10 @@ int CParentalSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/) if (parent) parent->hide(); - + if (check()) showParentalSetup(); - + return res; } @@ -99,12 +100,19 @@ 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); 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 cbcc62758..2b089178a 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -168,7 +168,6 @@ #include #include "widget/messagebox.h" #include "widget/hintbox.h" -#include "widget/lcdcontroler.h" #include "widget/keychooser.h" #include "color.h" #include "personalize.h" @@ -578,7 +577,7 @@ bool CPersonalizeGui::changeNotify(const neutrino_locale_t locale, void *data) } } } - return true; + return false; } //shows a short help message @@ -808,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)) { @@ -912,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/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 151f1520e..4d2d1586c 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -63,6 +63,7 @@ #include #include #include +#include #include extern cVideo * videoDecoder; diff --git a/src/gui/pictureviewer_setup.cpp b/src/gui/pictureviewer_setup.cpp index 63c68856c..601638c6b 100644 --- a/src/gui/pictureviewer_setup.cpp +++ b/src/gui/pictureviewer_setup.cpp @@ -33,7 +33,6 @@ #include #endif - #include "gui/pictureviewer_setup.h" #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/pluginlist.cpp b/src/gui/pluginlist.cpp index 862888241..dfa8f6bd6 100644 --- a/src/gui/pluginlist.cpp +++ b/src/gui/pluginlist.cpp @@ -52,7 +52,6 @@ #include #include -#include #include #include diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 97e3a8554..de8b7fbb0 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -40,6 +40,8 @@ #include #include +#include +#include #include #include @@ -91,10 +93,9 @@ int CPlugins::find_plugin(const std::string & filename) bool CPlugins::pluginfile_exists(const std::string & filename) { - FILE *file = fopen(filename.c_str(),"r"); - if (file != NULL) + struct stat stat_buf; + if(::stat(filename.c_str(), &stat_buf) == 0) { - fclose(file); return true; } else { @@ -324,7 +325,6 @@ void CPlugins::startScriptPlugin(int number) script, plugin_list[number].cfgfile.c_str()); return; } - FILE *f = popen(script,"r"); if (f != NULL) { @@ -345,7 +345,7 @@ void CPlugins::startScriptPlugin(int number) } } -int mysystem(char * cmd, char * arg1, char * arg2); +int mysystem(const char * cmd,const char * arg1,const char * arg2); void CPlugins::startPlugin(int number,int /*param*/) { // always delete old output @@ -592,7 +592,7 @@ void CPlugins::startPlugin(int number,int /*param*/) g_RCInput->stopInput(); //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); + mysystem(plugin_list[number].pluginfile.c_str(), NULL, NULL); //frameBuffer->setMode(720, 576, 8 * sizeof(fb_pixel_t)); frameBuffer->paintBackground(); g_RCInput->restartInput(); diff --git a/src/gui/proxyserver_setup.cpp b/src/gui/proxyserver_setup.cpp index 55b98bb70..38c8990b3 100644 --- a/src/gui/proxyserver_setup.cpp +++ b/src/gui/proxyserver_setup.cpp @@ -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..f9ba63afb 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -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/scale.cpp b/src/gui/scale.cpp deleted file mode 100644 index eadca127d..000000000 --- a/src/gui/scale.cpp +++ /dev/null @@ -1,140 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include - -#define RED_BAR 40 -#define YELLOW_BAR 70 -#define GREEN_BAR 100 - -#define BAR_BORDER 1 -#define BARW 2 -#define BARWW 2 - -#define ITEMW 4 -#define POINT 2 - -#define RED 0xFF0000 -#define GREEN 0x00FF00 -#define YELLOW 0xFFFF00 - -inline unsigned int make16color(__u32 rgb) -{ - return 0xFF000000 | rgb; -} - -CScale::CScale (int w, int h, int r, int g, int b, bool inv) -{ - width = w; - height = h; - inverse = inv; -#ifndef NO_BLINKENLIGHTS - double div; -//printf("new SCALE, w %d h %d size %d\n", w, h, sizeof(CScale)); fflush(stdout); - frameBuffer = CFrameBuffer::getInstance (); - div = (double) 100 / (double) width; - red = (double) r / (double) div / (double) ITEMW; - green = (double) g / (double) div / (double) ITEMW; - yellow = (double) b / (double) div / (double) ITEMW; -#endif - percent = 255; -} - -#ifndef NO_BLINKENLIGHTS -void CScale::paint (int x, int y, int pcr) -{ - int i, j, siglen; - int posx, posy; - int xpos, ypos; - int hcnt = height / ITEMW; - double div; - uint32_t rgb; - - fb_pixel_t color; - int b = 0; - - i = 0; - xpos = x; - ypos = y; -//printf("CScale::paint: old %d new %d x %d y %d\n", percent, pcr, x, y); fflush(stdout); - if (pcr != percent) { - if(percent == 255) percent = 0; - div = (double) 100 / (double) width; - siglen = (double) pcr / (double) div; - posx = xpos; - posy = ypos; - int maxi = siglen / ITEMW; - int total = width / ITEMW; - int step = 255/total; - if (pcr > percent) { - - for (i = 0; (i < red) && (i < maxi); i++) { - step = 255/red; - if(inverse) rgb = GREEN + ((unsigned char)(step*i) << 16); // adding red - else rgb = RED + ((unsigned char)(step*i) << 8); // adding green - color = make16color(rgb); - for(j = 0; j <= hcnt; j++ ) { - frameBuffer->paintBoxRel (posx + i*ITEMW, posy + j*ITEMW, POINT, POINT, color); - } - } -//printf("hcnt %d yellow %d i %d\n", hcnt, yellow, i); fflush(stdout); - for (; (i < yellow) && (i < maxi); i++) { - step = 255/yellow/2; - if(inverse) rgb = YELLOW - (((unsigned char)step*(b++)) << 8); // removing green - else rgb = YELLOW - ((unsigned char)(step*(b++)) << 16); // removing red - color = make16color(rgb); -//printf("YELLOW: or %08X diff %08X result %08X\n", YELLOW, ((unsigned char)(step*(b-1)) << 16), color); - for(j = 0; j <= hcnt; j++ ) { - frameBuffer->paintBoxRel (posx + i*ITEMW, posy + j*ITEMW, POINT, POINT, color); - } - } - for (; (i < green) && (i < maxi); i++) { - step = 255/green; - if(inverse) rgb = YELLOW - ((unsigned char) (step*(b++)) << 8); // removing green - else rgb = YELLOW - ((unsigned char) (step*(b++)) << 16); // removing red - color = make16color(rgb); - for(j = 0; j <= hcnt; j++ ) { - frameBuffer->paintBoxRel (posx + i*ITEMW, posy + j*ITEMW, POINT, POINT, color); - } - } - } - for(i = maxi; i < total; i++) { - for(j = 0; j <= hcnt; j++ ) { - frameBuffer->paintBoxRel (posx + i*ITEMW, posy + j*ITEMW, POINT, POINT, COL_INFOBAR_PLUS_3);//fill passive - } - } - percent = pcr; - } -} -#else -void CScale::paint (int x, int y, int pcr) -{ - if (pcr == percent) - return; - percent = pcr; - pb.paintProgressBar(x, y, width, height, pcr * width / 100, width, COL_INFOBAR_PLUS_3, COL_INFOBAR_PLUS_0, COL_INFOBAR_PLUS_3); -} -#endif - -void CScale::reset () -{ - percent = 255; -} - -void CScale::hide () -{ -} diff --git a/src/gui/scale.h b/src/gui/scale.h deleted file mode 100644 index a6b62208c..000000000 --- a/src/gui/scale.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __scale_ -#define __scale_ -#include -/* config.h is included by driver/framebuffer.h already */ -#ifdef NO_BLINKENLIGHTS -#include -#endif -#error scale.h/CScale is obsolete, use CProgressBar instead. -class CScale -{ - private: -#ifdef NO_BLINKENLIGHTS - CProgressBar pb; -#else - CFrameBuffer * frameBuffer; - short red, green, yellow; -#endif - short width; - short height; - char percent; - bool inverse; - - public: - CScale(int w, int h, int r, int g, int b, bool inv = false); - void paint(int x, int y, int pcr); - void hide(); - void reset(); - int getPercent() { return percent; }; -}; -#endif diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index d53b7111f..75324cfd1 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -97,14 +97,14 @@ void CScanTs::prev_next_TP( bool up) /* FIXME transponders with duplicate frequency skipped */ if(up) { for (tI = select_transponders.begin(); tI != select_transponders.end(); ++tI) { - if(tI->second.feparams.frequency > TP.feparams.frequency){ + if(tI->second.feparams.dvb_feparams.frequency > TP.feparams.dvb_feparams.frequency){ next_tp = true; break; } } } else { for ( tI=select_transponders.end() ; tI != select_transponders.begin(); --tI ) { - if(tI->second.feparams.frequency < TP.feparams.frequency) { + if(tI->second.feparams.dvb_feparams.frequency < TP.feparams.dvb_feparams.frequency) { next_tp = true; break; } @@ -112,15 +112,15 @@ void CScanTs::prev_next_TP( bool up) } if(next_tp) { - TP.feparams.frequency = tI->second.feparams.frequency; + TP.feparams.dvb_feparams.frequency = tI->second.feparams.dvb_feparams.frequency; if(g_info.delivery_system == DVB_S) { - TP.feparams.u.qpsk.symbol_rate = tI->second.feparams.u.qpsk.symbol_rate; - TP.feparams.u.qpsk.fec_inner = tI->second.feparams.u.qpsk.fec_inner; + TP.feparams.dvb_feparams.u.qpsk.symbol_rate = tI->second.feparams.dvb_feparams.u.qpsk.symbol_rate; + TP.feparams.dvb_feparams.u.qpsk.fec_inner = tI->second.feparams.dvb_feparams.u.qpsk.fec_inner; TP.polarization = tI->second.polarization; } else { - TP.feparams.u.qam.symbol_rate = tI->second.feparams.u.qam.symbol_rate; - TP.feparams.u.qam.fec_inner = tI->second.feparams.u.qam.fec_inner; - TP.feparams.u.qam.modulation = tI->second.feparams.u.qam.modulation; + TP.feparams.dvb_feparams.u.qam.symbol_rate = tI->second.feparams.dvb_feparams.u.qam.symbol_rate; + TP.feparams.dvb_feparams.u.qam.fec_inner = tI->second.feparams.dvb_feparams.u.qam.fec_inner; + TP.feparams.dvb_feparams.u.qam.modulation = tI->second.feparams.dvb_feparams.u.qam.modulation; } testFunc(); } @@ -134,8 +134,8 @@ void CScanTs::testFunc() CFrontend * frontend = CServiceScan::getInstance()->GetFrontend(); if(frontend->getInfo()->type == FE_QPSK) { - frontend->getDelSys(TP.feparams.u.qpsk.fec_inner, dvbs_get_modulation((fe_code_rate_t)TP.feparams.u.qpsk.fec_inner), f, s, m); - snprintf(buffer,sizeof(buffer), "%u %c %d %s %s %s", TP.feparams.frequency/1000, transponder::pol(TP.polarization), TP.feparams.u.qpsk.symbol_rate/1000, f, s, m); + frontend->getDelSys(TP.feparams.dvb_feparams.u.qpsk.fec_inner, dvbs_get_modulation((fe_code_rate_t)TP.feparams.dvb_feparams.u.qpsk.fec_inner), f, s, m); + snprintf(buffer,sizeof(buffer), "%u %c %d %s %s %s", TP.feparams.dvb_feparams.frequency/1000, transponder::pol(TP.polarization), TP.feparams.dvb_feparams.u.qpsk.symbol_rate/1000, f, s, m); } else if(frontend->getInfo()->type == FE_QAM) { frontend->getDelSys(scansettings.TP_fec, scansettings.TP_mod, f, s, m); snprintf(buffer,sizeof(buffer), "%u %d %s %s %s", atoi(scansettings.TP_freq)/1000, atoi(scansettings.TP_rate)/1000, f, s, m); @@ -159,6 +159,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; @@ -205,17 +207,17 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) if(scansettings.scan_nit_manual) scan_flags |= CServiceScan::SCAN_NIT; TP.scan_mode = scan_flags; - TP.feparams.frequency = atoi(scansettings.TP_freq); + TP.feparams.dvb_feparams.frequency = atoi(scansettings.TP_freq); if(g_info.delivery_system == DVB_S) { - TP.feparams.u.qpsk.symbol_rate = atoi(scansettings.TP_rate); - TP.feparams.u.qpsk.fec_inner = (fe_code_rate_t) scansettings.TP_fec; + TP.feparams.dvb_feparams.u.qpsk.symbol_rate = atoi(scansettings.TP_rate); + TP.feparams.dvb_feparams.u.qpsk.fec_inner = (fe_code_rate_t) scansettings.TP_fec; TP.polarization = scansettings.TP_pol; } else { - TP.feparams.u.qam.symbol_rate = atoi(scansettings.TP_rate); - TP.feparams.u.qam.fec_inner = (fe_code_rate_t)scansettings.TP_fec; - TP.feparams.u.qam.modulation = (fe_modulation_t) scansettings.TP_mod; + TP.feparams.dvb_feparams.u.qam.symbol_rate = atoi(scansettings.TP_rate); + TP.feparams.dvb_feparams.u.qam.fec_inner = (fe_code_rate_t)scansettings.TP_fec; + TP.feparams.dvb_feparams.u.qam.modulation = (fe_modulation_t) scansettings.TP_mod; } - //printf("[neutrino] freq %d rate %d fec %d pol %d\n", TP.feparams.frequency, TP.feparams.u.qpsk.symbol_rate, TP.feparams.u.qpsk.fec_inner, TP.polarization); + //printf("[neutrino] freq %d rate %d fec %d pol %d\n", TP.feparams.dvb_feparams.frequency, TP.feparams.dvb_feparams.u.qpsk.symbol_rate, TP.feparams.dvb_feparams.u.qpsk.fec_inner, TP.polarization); } else { if(scansettings.scan_nit) scan_flags |= CServiceScan::SCAN_NIT; @@ -230,14 +232,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); } } @@ -253,7 +255,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) g_Zapit->setScanBouquetMode( (CZapitClient::bouquetMode)scansettings.bouquetMode); /* send satellite list to zapit */ - if(satList.size()) + if(!satList.empty()) g_Zapit->setScanSatelliteList( satList); tuned = -1; diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index 7b7df4e27..e92b3211e 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -45,7 +45,6 @@ #include "gui/widget/hintbox.h" #include "gui/widget/stringinput.h" -#include "gui/widget/stringinput_ext.h" #include #include @@ -221,6 +220,7 @@ CScanSetup::CScanSetup(bool wizard_mode) satSelect = NULL; frontendSetup = NULL; + nid = NULL; } CScanSetup* CScanSetup::getInstance() @@ -281,6 +281,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++) @@ -333,6 +348,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 @@ -343,47 +361,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) //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)); @@ -399,48 +426,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); @@ -450,27 +498,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(LOCALE_EXTRA_LATITUDE, (char *) zapit_lat, 10, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789."); - setupMenu->addItem(new CMenuForwarder(LOCALE_EXTRA_LATITUDE, true, zapit_lat, &toff1, "", CRCInput::convertDigitToKey(shortcut++))); + CStringInput * toff1 = new CStringInput(LOCALE_EXTRA_LATITUDE, (char *) zapit_lat, 10, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789."); + 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(LOCALE_EXTRA_LONGITUDE, (char *) zapit_long, 10, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789."); - setupMenu->addItem(new CMenuForwarder(LOCALE_EXTRA_LONGITUDE, true, zapit_long, &toff2, "", CRCInput::convertDigitToKey(shortcut++))); + CStringInput * toff2 = new CStringInput(LOCALE_EXTRA_LONGITUDE, (char *) zapit_long, 10, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789."); + 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) @@ -482,12 +541,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; @@ -499,12 +552,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); @@ -514,27 +567,42 @@ 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); +#if 0 + mc = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_HVOLTAGE, (int *)&fe_config.highVoltage, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + setupMenu->addItem(mc); +#endif - 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; @@ -563,7 +631,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 @@ -576,7 +643,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++; } @@ -589,12 +660,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(); @@ -608,7 +679,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) @@ -618,22 +689,24 @@ void CScanSetup::fillSatSelect() if(CFEManager::getInstance()->getMode() != CFEManager::FE_MODE_ALONE) break; } - if(!sfound && satpos.size()) { + if(!sfound && !satpos.empty()) { tmpit = satpos.begin(); std::string satname = CServiceManager::getInstance()->GetSatelliteName(*tmpit); snprintf(scansettings.satNameNoDiseqc, sizeof(scansettings.satNameNoDiseqc), "%s", satname.c_str()); } 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 @@ -642,14 +715,14 @@ 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; dprintf(DEBUG_DEBUG, "got scanprovider (cable): %s\n", sit->second.name.c_str()); } - if (!sfound && satmap.size()) { + if (!sfound && !satmap.empty()) { sat_iterator_t sit = satmap.begin(); snprintf(scansettings.satNameNoDiseqc, sizeof(scansettings.satNameNoDiseqc), "%s", sit->second.name.c_str()); } @@ -668,6 +741,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; @@ -678,7 +753,7 @@ int CScanSetup::showScanMenuSatFind() feSatSelect->addOption(satname.c_str()); if (!sfound && strcmp(scansettings.satNameNoDiseqc, satname.c_str()) == 0) sfound = true; - if (!sfound && !firstname.size()) + if (!sfound && firstname.empty()) firstname = satname; count++; } @@ -688,14 +763,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; @@ -708,23 +787,19 @@ 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 *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); @@ -734,9 +809,17 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon temp_sat->addItem(uncomm); 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 @@ -744,15 +827,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); //---------------------------------------------------------------------- @@ -761,8 +852,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 @@ -771,14 +867,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 @@ -805,14 +905,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*/ @@ -820,19 +924,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 @@ -843,18 +1013,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); 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 *fec = NULL; CMenuOptionChooser *mod_pol= NULL; 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); @@ -878,14 +1053,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++)); @@ -910,7 +1091,7 @@ void CScanSetup::saveScanSetup() if(!scansettings.saveSettings(NEUTRINO_SCAN_SETTINGS_FILE)) dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n"); - CServiceManager::getInstance()->SaveMotorPositions(); + //CServiceManager::getInstance()->SaveMotorPositions(); zapitCfg.gotoXXLatitude = strtod(zapit_lat, NULL); zapitCfg.gotoXXLongitude = strtod(zapit_long, NULL); @@ -920,6 +1101,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); @@ -934,27 +1117,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); @@ -969,9 +1137,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() @@ -983,18 +1171,18 @@ void CScanSetup::updateManualSettings() transponder_list_t::iterator tI; tI = transponders.find(channel->getTransponderId()); if(tI != transponders.end()) { - sprintf(scansettings.TP_freq, "%d", tI->second.feparams.frequency); + sprintf(scansettings.TP_freq, "%d", tI->second.feparams.dvb_feparams.frequency); CFrontend * frontend = CFEManager::getInstance()->getLiveFE(); switch (frontend->getInfo()->type) { case FE_QPSK: - sprintf(scansettings.TP_rate, "%d", tI->second.feparams.u.qpsk.symbol_rate); - scansettings.TP_fec = tI->second.feparams.u.qpsk.fec_inner; + sprintf(scansettings.TP_rate, "%d", tI->second.feparams.dvb_feparams.u.qpsk.symbol_rate); + scansettings.TP_fec = tI->second.feparams.dvb_feparams.u.qpsk.fec_inner; scansettings.TP_pol = tI->second.polarization; break; case FE_QAM: - sprintf(scansettings.TP_rate, "%d", tI->second.feparams.u.qam.symbol_rate); - scansettings.TP_fec = tI->second.feparams.u.qam.fec_inner; - scansettings.TP_mod = tI->second.feparams.u.qam.modulation; + sprintf(scansettings.TP_rate, "%d", tI->second.feparams.dvb_feparams.u.qam.symbol_rate); + scansettings.TP_fec = tI->second.feparams.dvb_feparams.u.qam.fec_inner; + scansettings.TP_mod = tI->second.feparams.dvb_feparams.u.qam.modulation; break; case FE_OFDM: case FE_ATSC: @@ -1070,21 +1258,21 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/ tmpI = tmplist.find(select); - printf("CTPSelectHandler::exec: selected TP: freq %d pol %d SR %d\n", tmpI->second.feparams.frequency, - tmpI->second.polarization, tmpI->second.feparams.u.qpsk.symbol_rate); + printf("CTPSelectHandler::exec: selected TP: freq %d pol %d SR %d\n", tmpI->second.feparams.dvb_feparams.frequency, + tmpI->second.polarization, tmpI->second.feparams.dvb_feparams.u.qpsk.symbol_rate); - sprintf(scansettings.TP_freq, "%d", tmpI->second.feparams.frequency); + sprintf(scansettings.TP_freq, "%d", tmpI->second.feparams.dvb_feparams.frequency); switch (frontend->getInfo()->type) { case FE_QPSK: - sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.u.qpsk.symbol_rate); - scansettings.TP_fec = tmpI->second.feparams.u.qpsk.fec_inner; + sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.dvb_feparams.u.qpsk.symbol_rate); + scansettings.TP_fec = tmpI->second.feparams.dvb_feparams.u.qpsk.fec_inner; scansettings.TP_pol = tmpI->second.polarization; break; case FE_QAM: - sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.u.qam.symbol_rate); - scansettings.TP_fec = tmpI->second.feparams.u.qam.fec_inner; - scansettings.TP_mod = tmpI->second.feparams.u.qam.modulation; + sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.dvb_feparams.u.qam.symbol_rate); + scansettings.TP_fec = tmpI->second.feparams.dvb_feparams.u.qam.fec_inner; + scansettings.TP_mod = tmpI->second.feparams.dvb_feparams.u.qam.modulation; break; case FE_OFDM: case FE_ATSC: diff --git a/src/gui/scan_setup.h b/src/gui/scan_setup.h index ea038ddd0..bdc7655e8 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/settings_manager.cpp b/src/gui/settings_manager.cpp index bc30f6349..e1ac9e752 100644 --- a/src/gui/settings_manager.cpp +++ b/src/gui/settings_manager.cpp @@ -62,18 +62,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 +84,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,33 +99,33 @@ 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); - } + } 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()); @@ -135,7 +135,7 @@ int CSettingsManager::exec(CMenuTarget* parent, const std::string &actionKey) } return res; } - + res = showMenu(); return res; @@ -147,19 +147,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/software_update.cpp b/src/gui/software_update.cpp deleted file mode 100644 index 9c449d3ac..000000000 --- a/src/gui/software_update.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - $Id: port of software_update.cpp,v 1.8 2011/04/03 21:56:13 tuxbox-cvs Exp $ - - Neutrino-GUI - DBoxII-Project - - Software update implementation - Neutrino-GUI - - Copyright (C) 2001 Steffen Hehn 'McClean' - and some other guys - Homepage: http://dbox.cyberphoria.org/ - - rework Copyright (C) 2011 T. Graf 'dbt' - Homepage: http://www.dbox2-tuning.net/ - - 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 "software_update.h" - -#include "gui/filebrowser.h" -#include -#include -#include -#include -#include - -CSoftwareUpdate::CSoftwareUpdate() -{ - width = w_max (40, 10); - fe = new CFlashExpert(); - input_url_file = new CStringInputSMS(LOCALE_FLASHUPDATE_URL_FILE, g_settings.softupdate_url_file, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789!""�$%&/()=?-. "); -} - -CSoftwareUpdate::~CSoftwareUpdate() -{ - delete fe; - delete input_url_file; -} - -#define FLASHUPDATE_UPDATEMODE_OPTION_COUNT 2 -const CMenuOptionChooser::keyval FLASHUPDATE_UPDATEMODE_OPTIONS[FLASHUPDATE_UPDATEMODE_OPTION_COUNT] = -{ - { 0, LOCALE_FLASHUPDATE_UPDATEMODE_MANUAL }, - { 1, LOCALE_FLASHUPDATE_UPDATEMODE_INTERNET } -}; - -int CSoftwareUpdate::exec(CMenuTarget* parent, const std::string &actionKey) -{ - dprintf(DEBUG_DEBUG, "init software-update\n"); - int res = menu_return::RETURN_REPAINT; - - if (parent) - { - parent->hide(); - } - - if(actionKey == "update_dir") { - - const char *action_str = "update"; - if(chooserDir(g_settings.update_dir, true, action_str, sizeof(g_settings.update_dir)-1)) - printf("[neutrino] new %s dir %s\n", action_str, g_settings.update_dir); - - return res; - } - - res = showSoftwareUpdate(); - return res; -} - -int CSoftwareUpdate::showSoftwareUpdate() -/* shows the menue and options for software update */ -{ - CMenuWidget* softUpdate = new CMenuWidget(LOCALE_MAINMENU_SERVICE, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE); - - softUpdate->addIntroItems(LOCALE_SERVICEMENU_UPDATE); - - //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, "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - - softUpdate->addItem(GenericMenuSeparatorLine); - - CMenuOptionChooser *oj = new CMenuOptionChooser(LOCALE_FLASHUPDATE_UPDATEMODE, &g_settings.softupdate_mode, FLASHUPDATE_UPDATEMODE_OPTIONS, FLASHUPDATE_UPDATEMODE_OPTION_COUNT, true, NULL); - softUpdate->addItem( oj ); - - softUpdate->addItem( new CMenuForwarder(LOCALE_EXTRA_UPDATE_DIR, true, g_settings.update_dir , this, "update_dir", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); - - softUpdate->addItem(GenericMenuSeparatorLine); - CFlashUpdate flash; - softUpdate->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE, true, NULL, &flash, "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW )); - - int res = softUpdate->exec (NULL, ""); - delete softUpdate; - return res; -} - -/* shows experts-functions to read/write to the mtd */ -void CSoftwareUpdate::showSoftwareUpdateExpert(CMenuWidget *mtd_expert) -{ - mtd_expert->addIntroItems(); - - mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASHMTD , true, NULL, fe, "readflashmtd" )); - mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASHMTD, true, NULL, fe, "writeflashmtd")); - - mtd_expert->addItem(GenericMenuSeparatorLine); - - mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_URL_FILE, true, g_settings.softupdate_url_file, input_url_file)); -} diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 64eb145a4..07396e261 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -501,7 +501,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 @@ -535,7 +535,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 @@ -583,7 +583,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) ypos += iheight; scaling = 27000; - if (t.type == FE_QPSK && t.feparams.u.qpsk.fec_inner < FEC_S2_QPSK_1_2) + if (t.type == FE_QPSK && t.feparams.dvb_feparams.u.qpsk.fec_inner < FEC_S2_QPSK_1_2) scaling = 15000; sprintf (buf, "%s",g_Locale->getText (LOCALE_SCANTS_FREQDATA)); @@ -801,7 +801,7 @@ int CStreamInfo2::ts_setup () unsigned short vpid, apid = 0; vpid = g_RemoteControl->current_PIDs.PIDs.vpid; - if(g_RemoteControl->current_PIDs.APIDs.size() > 0) + if( !g_RemoteControl->current_PIDs.APIDs.empty() ) apid = g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid; if(vpid == 0 && apid == 0) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index bbe52bb48..45803538a 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -40,7 +40,6 @@ #include -#include #include #include #include @@ -328,7 +327,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; @@ -365,7 +364,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 +588,7 @@ int CTimerList::show() { update=true; } +#if 0 else if ((msg==CRCInput::RC_blue)|| (CRCInput::isNumeric(msg)) ) { @@ -596,6 +596,7 @@ int CTimerList::show() g_RCInput->postMsg( msg, data ); loop=false; } +#endif else if (msg==CRCInput::RC_setup) { res=menu_return::RETURN_EXIT_ALL; @@ -1051,7 +1052,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); @@ -1101,7 +1102,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); diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 4ec7feaf9..e6afd19ba 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 @@ -39,7 +40,6 @@ #include #include -#include #include #include #include @@ -115,22 +115,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) { @@ -607,6 +591,8 @@ void CFlashExpert::writemtd(const std::string & filename, int mtdNumber) void CFlashExpert::showMTDSelector(const std::string & actionkey) { + int shortcut = 0; + mn_widget_id_t widget_id = NO_WIDGET_ID; if (actionkey == "readmtd") widget_id = MN_WIDGET_ID_MTDREAD_SELECTOR; @@ -625,7 +611,7 @@ void CFlashExpert::showMTDSelector(const std::string & actionkey) if ((actionkey == "writemtd") && (lx == 0)) enabled = false; sprintf(sActionKey, "%s%d", actionkey.c_str(), lx); - mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey)); + mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey, CRCInput::convertDigitToKey(shortcut++))); } mtdselector->exec(NULL,""); delete mtdselector; 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 new file mode 100644 index 000000000..e5f38e0e9 --- /dev/null +++ b/src/gui/update_menue.cpp @@ -0,0 +1,121 @@ +/* + $Id: port of software_update.cpp,v 1.8 2011/04/03 21:56:13 tuxbox-cvs Exp $ + + Neutrino-GUI - DBoxII-Project + + Software update implementation - Neutrino-GUI + + Copyright (C) 2001 Steffen Hehn 'McClean' + and some other guys + Homepage: http://dbox.cyberphoria.org/ + + Rework Copyright (C) 2011 T. Graf 'dbt' + Homepage: http://www.dbox2-tuning.net/ + + 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 Library General Public + License 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 +#include +#endif + +#include +#include +#include + +#include "update_menue.h" +#include "update_settings.h" + +#include +#include +#include +#include + +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*/) +{ + dprintf(DEBUG_DEBUG, "init software-update\n"); + int res = menu_return::RETURN_REPAINT; + + if (parent) + parent->hide(); + + res = showSoftwareUpdate(); + return res; +} + +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; + 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); + 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; +} + +/* shows experts-functions to read/write to the mtd */ +void CSoftwareUpdate::showSoftwareUpdateExpert(CMenuWidget *w_mtd_expert) +{ + CMenuForwarder * mf; + w_mtd_expert->addIntroItems(); + + 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/software_update.h b/src/gui/update_menue.h similarity index 75% rename from src/gui/software_update.h rename to src/gui/update_menue.h index 814834761..683bdae0e 100644 --- a/src/gui/software_update.h +++ b/src/gui/update_menue.h @@ -1,54 +1,51 @@ /* $Id: port of software_update.h,v 1.6 2011/04/03 21:56:13 tuxbox-cvs Exp $ - + Neutrino-GUI - DBoxII-Project - - Software update implementation - Neutrino-GUI - + + Software update implementation - Neutrino-GUI + Copyright (C) 2001 Steffen Hehn 'McClean' and some other guys Homepage: http://dbox.cyberphoria.org/ - + Rework Copyright (C) 2011 T. Graf 'dbt' Homepage: http://www.dbox2-tuning.net/ - + + 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. - + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ #ifndef __software_update__ #define __software_update__ #include - #include "gui/update.h" -#include "gui/widget/stringinput.h" - #include class CSoftwareUpdate : public CMenuTarget { private: int width; - + CMenuForwarder * update_item; int showSoftwareUpdate(); - void showSoftwareUpdateExpert(CMenuWidget *mtd_expert); + void showSoftwareUpdateExpert(CMenuWidget *w_mtd_expert); CFlashExpert *fe; - CStringInputSMS *input_url_file; - + public: CSoftwareUpdate(); ~CSoftwareUpdate(); diff --git a/src/gui/update_settings.cpp b/src/gui/update_settings.cpp new file mode 100644 index 000000000..c6a432bd7 --- /dev/null +++ b/src/gui/update_settings.cpp @@ -0,0 +1,151 @@ +/* + Neutrino-GUI - DBoxII-Project + + Update settings implementation - Neutrino-GUI + + Copyright (C) 2001 Steffen Hehn 'McClean' + and some other guys + Homepage: http://dbox.cyberphoria.org/ + + Copyright (C) 2012 T. Graf 'dbt' + Homepage: http://www.dbox2-tuning.net/ + + 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 Library General Public + License 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 +#include +#endif + +#include +#include +#include +#include "update_settings.h" +#include "gui/filebrowser.h" +#include +#include +#include + + +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 +} + +CUpdateSettings::~CUpdateSettings() +{ +#ifdef USE_SMS_INPUT + delete input_url_file; +#endif +} + +#define FLASHUPDATE_UPDATEMODE_OPTION_COUNT 2 +const CMenuOptionChooser::keyval FLASHUPDATE_UPDATEMODE_OPTIONS[FLASHUPDATE_UPDATEMODE_OPTION_COUNT] = +{ + { 0, LOCALE_FLASHUPDATE_UPDATEMODE_MANUAL }, + { 1, LOCALE_FLASHUPDATE_UPDATEMODE_INTERNET } +}; + +int CUpdateSettings::exec(CMenuTarget* parent, const std::string &actionKey) +{ + dprintf(DEBUG_DEBUG, "init software-update settings\n"); + int res = menu_return::RETURN_REPAINT; + + if (parent) + parent->hide(); + + if(actionKey == "update_dir") { + const char *action_str = "update"; + if(chooserDir(g_settings.update_dir, true, action_str, sizeof(g_settings.update_dir)-1)) + printf("[neutrino] new %s dir %s\n", action_str, g_settings.update_dir); + + return res; + } +#ifndef USE_SMS_INPUT + else if(actionKey == "select_url_config_file"){ + CFileBrowser fileBrowser; + CFileFilter fileFilter; + + fileFilter.addFilter("conf"); + fileFilter.addFilter("urls"); + fileBrowser.Filter = &fileFilter; + if (fileBrowser.exec("/var/etc") == true) + strncpy(g_settings.softupdate_url_file, fileBrowser.getSelectedFile()->Name.c_str(), 30); + + return res; + } +#endif + + res = initMenu(); + return res; +} + +/* init options for software update */ +int CUpdateSettings::initMenu() +{ + CMenuWidget w_upsettings(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE_SETTINGS); + + w_upsettings.addIntroItems(LOCALE_FLASHUPDATE_SETTINGS); + +#ifdef USE_SMS_INPUT + CMenuForwarder * fw_url = new CMenuForwarder(LOCALE_FLASHUPDATE_URL_FILE, g_settings.softupdate_mode, g_settings.softupdate_url_file, input_url_file, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); +#else + CMenuForwarder * fw_url = new CMenuForwarder(LOCALE_FLASHUPDATE_URL_FILE, g_settings.softupdate_mode, g_settings.softupdate_url_file, this, "select_url_config_file", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); +#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, updateItem); + + CMenuOptionChooser *oj_mode = new CMenuOptionChooser(LOCALE_FLASHUPDATE_UPDATEMODE, &g_settings.softupdate_mode, FLASHUPDATE_UPDATEMODE_OPTIONS, FLASHUPDATE_UPDATEMODE_OPTION_COUNT, true, &url_setup_notifier); + + w_upsettings.addItem(oj_mode, true); + w_upsettings.addItem(GenericMenuSeparatorLine); + w_upsettings.addItem(fw_update_dir); + w_upsettings.addItem(fw_url); + + int res = w_upsettings.exec (NULL, ""); + + return res; +} + + +CUrlConfigSetupNotifier::CUrlConfigSetupNotifier( CMenuItem* i1, CMenuItem* i2, CMenuForwarder * f1) +{ + toDisable[0] = i1; + toDisable[1] = i2; + updateItem = f1; +} + +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 new file mode 100644 index 000000000..1c9b44198 --- /dev/null +++ b/src/gui/update_settings.h @@ -0,0 +1,76 @@ +/* + $Id: port of software_update.h,v 1.6 2011/04/03 21:56:13 tuxbox-cvs Exp $ + + Neutrino-GUI - DBoxII-Project + + Update settings implementation - Neutrino-GUI + + Copyright (C) 2001 Steffen Hehn 'McClean' + and some other guys + Homepage: http://dbox.cyberphoria.org/ + + Copyright (C) 2012 T. Graf 'dbt' + Homepage: http://www.dbox2-tuning.net/ + + 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 Library General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ + +#ifndef __update_settings__ +#define __update_settings__ + +#include + +#include "gui/update.h" + +// #define USE_SMS_INPUT + +#ifdef USE_SMS_INPUT +#include "gui/widget/stringinput.h" +#endif + +#include + +//helper class to enable/disable update config url item +class CUrlConfigSetupNotifier : public CChangeObserver +{ + private: + CMenuItem* toDisable[2]; + CMenuForwarder * updateItem; + public: + CUrlConfigSetupNotifier( CMenuItem*, CMenuItem*, CMenuForwarder *); + bool changeNotify(const neutrino_locale_t = NONEXISTANT_LOCALE, void *data = NULL); +}; + +class CUpdateSettings : public CMenuTarget +{ + private: + int width; + CMenuForwarder * updateItem; + int initMenu(); + + CFlashExpert *fe; +#ifdef USE_SMS_INPUT + CStringInputSMS *input_url_file; +#endif + + public: + CUpdateSettings(CMenuForwarder * update_item); + ~CUpdateSettings(); + int exec(CMenuTarget* parent, const std::string & actionKey); +}; + +#endif diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 503562a90..f88f9a49c 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -390,7 +389,7 @@ void CUpnpBrowserGui::selectDevice() m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1"); scanBox->hide(); - if (!m_devices.size()) + if (m_devices.empty()) { ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_UPNPBROWSER_NOSERVERS, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); delete scanBox; @@ -457,7 +456,7 @@ void CUpnpBrowserGui::selectDevice() #endif m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1"); scanBox->hide(); - if (!m_devices.size()) + if (m_devices.empty()) { ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_UPNPBROWSER_NOSERVERS, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); delete scanBox; diff --git a/src/gui/vfd_setup.cpp b/src/gui/vfd_setup.cpp index 2e6a43147..2373eae4d 100644 --- a/src/gui/vfd_setup.cpp +++ b/src/gui/vfd_setup.cpp @@ -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 9b2827e6a..51f5f9763 100644 --- a/src/gui/videosettings.cpp +++ b/src/gui/videosettings.cpp @@ -60,17 +60,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); } @@ -90,7 +90,7 @@ int CVideoSettings::exec(CMenuTarget* parent, const std::string &/*actionKey*/) } res = showVideoSetup(); - + return res; } @@ -133,7 +133,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] = { @@ -186,32 +185,40 @@ 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); } //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); @@ -223,6 +230,7 @@ int CVideoSettings::showVideoSetup() //anotify.changeNotify(NONEXISTANT_LOCALE, 0); CMenuForwarder * 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); //--------------------------------------- videosetup->addIntroItems(LOCALE_MAINSETTINGS_VIDEO, LOCALE_VIDEOMENU_TV_SCART); @@ -248,7 +256,6 @@ int CVideoSettings::showVideoSetup() return res; } - void CVideoSettings::setVideoSettings() { printf("[neutrino VideoSettings] %s init video settings...\n", __FUNCTION__); @@ -281,18 +288,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; @@ -362,8 +369,6 @@ bool CVideoSettings::changeNotify(const neutrino_locale_t OptionName, void * /* return false; } - - void CVideoSettings::next43Mode(void) { printf("[neutrino VideoSettings] %s setting 43Mode...\n", __FUNCTION__); @@ -384,7 +389,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() @@ -472,4 +476,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 15a9c3f4d..4b12dbb6a 100644 --- a/src/gui/widget/Makefile.am +++ b/src/gui/widget/Makefile.am @@ -22,13 +22,13 @@ 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 \ hintboxext.cpp \ keychooser.cpp \ listbox.cpp \ - listbox_legacy.cpp \ listframe.cpp \ menue.cpp \ messagebox.cpp \ 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/lcdcontroler.cpp b/src/gui/widget/lcdcontroler.cpp deleted file mode 100644 index 527198264..000000000 --- a/src/gui/widget/lcdcontroler.cpp +++ /dev/null @@ -1,334 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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 - -#define BRIGHTNESSFACTOR 2.55 -#define CONTRASTFACTOR 0.63 - -CLcdControler::CLcdControler(const neutrino_locale_t Name, CChangeObserver* Observer) -{ - frameBuffer = CFrameBuffer::getInstance(); - hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); - mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); - observer = Observer; - name = Name; - width = w_max(390, 0); - height = h_max(hheight+ mheight* 4+ +mheight/2, 0); - x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth()-width) >> 1); - y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight()-height)>>1); - - contrast = CLCD::getInstance()->getContrast(); - brightness = CLCD::getInstance()->getBrightness(); - brightnessstandby = CLCD::getInstance()->getBrightnessStandby(); -} - -void CLcdControler::setLcd() -{ -// printf("contrast: %d brightness: %d brightness standby: %d\n", contrast, brightness, brightnessstandby); - CLCD::getInstance()->setBrightness(brightness); - CLCD::getInstance()->setBrightnessStandby(brightnessstandby); - CLCD::getInstance()->setContrast(contrast); -} - -int CLcdControler::exec(CMenuTarget* parent, const std::string &) -{ - neutrino_msg_t msg; - neutrino_msg_data_t data; - - int selected, res = menu_return::RETURN_REPAINT; - unsigned int contrast_alt, brightness_alt, brightnessstandby_alt, autodimm_alt; - - if (parent) - { - parent->hide(); - } - contrast_alt = CLCD::getInstance()->getContrast(); - brightness_alt = CLCD::getInstance()->getBrightness(); - brightnessstandby_alt = CLCD::getInstance()->getBrightnessStandby(); - autodimm_alt = CLCD::getInstance()->getAutoDimm(); - selected = 0; - - setLcd(); - CLCD::getInstance()->setAutoDimm(0); // autodimm deactivated to control and see the real settings - paint(); - - uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); - - bool loop=true; - while (loop) - { - g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd, true ); - - if ( msg <= CRCInput::RC_MaxRC ) - timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); - - switch ( msg ) - { - case CRCInput::RC_down: - if(selected < 3) // max entries - { - paintSlider(x + 10, y + hheight , contrast , CONTRASTFACTOR , LOCALE_LCDCONTROLER_CONTRAST , false); - paintSlider(x + 10, y + hheight + mheight , brightness , BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESS , false); - paintSlider(x + 10, y + hheight + mheight * 2, brightnessstandby, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, false); - selected++; - switch (selected) - { - case 0: - paintSlider(x+ 10, y+ hheight, contrast, CONTRASTFACTOR, LOCALE_LCDCONTROLER_CONTRAST, true); - break; - case 1: - paintSlider(x+ 10, y+ hheight+ mheight, brightness, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESS, true); - break; - case 2: - paintSlider(x+ 10, y+ hheight+ mheight* 2, brightnessstandby, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, true); - CLCD::getInstance()->setMode(CLCD::MODE_STANDBY); - break; - case 3: - frameBuffer->paintBoxRel(x, y+hheight+mheight*3+mheight/2, width, mheight, COL_MENUCONTENTSELECTED_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, y+hheight+mheight*4+mheight/2, width, g_Locale->getText(LOCALE_OPTIONS_DEFAULT), COL_MENUCONTENTSELECTED, 0, true); // UTF-8 - break; - } - } - break; - - case CRCInput::RC_up: - if (selected > 0) - { - paintSlider(x + 10, y + hheight , contrast , CONTRASTFACTOR , LOCALE_LCDCONTROLER_CONTRAST , false); - paintSlider(x + 10, y + hheight + mheight , brightness , BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESS , false); - paintSlider(x + 10, y + hheight + mheight * 2, brightnessstandby, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, false); - selected--; - switch (selected) - { - case 0: - paintSlider(x+ 10, y+ hheight, contrast, CONTRASTFACTOR, LOCALE_LCDCONTROLER_CONTRAST, true); - break; - case 1: - paintSlider(x+ 10, y+ hheight+ mheight, brightness, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESS, true); - CLCD::getInstance()->setMode(CLCD::MODE_TVRADIO); - break; - case 2: - paintSlider(x+10, y+hheight+mheight*2, brightnessstandby, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, true); - CLCD::getInstance()->setMode(CLCD::MODE_STANDBY); - frameBuffer->paintBoxRel(x, y+hheight+mheight*3+mheight/2, width, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, y+hheight+mheight*4+mheight/2, width, g_Locale->getText(LOCALE_OPTIONS_DEFAULT), COL_MENUCONTENT, 0, true); // UTF-8 - break; - case 3: - break; - } - } - break; - - case CRCInput::RC_right: - switch (selected) - { - case 0: - if (contrast < 63) - { - int val = lrint(::log(contrast+1)); - - if (contrast + val < 63) - contrast += val; - else - contrast = 63; - - paintSlider(x+10, y+hheight, contrast, CONTRASTFACTOR, LOCALE_LCDCONTROLER_CONTRAST, true); - setLcd(); - } - break; - case 1: - if (brightness < 255) - { - if (brightness < 250) - brightness += 5; - else - brightness = 255; - - paintSlider(x+10, y+hheight+mheight, brightness, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESS, true); - setLcd(); - } - break; - case 2: - if (brightnessstandby < 255) - { - if (brightnessstandby < 250) - brightnessstandby += 5; - else - brightnessstandby = 255; - - paintSlider(x+10, y+hheight+mheight*2, brightnessstandby, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, true); - setLcd(); - } - break; - } - break; - - case CRCInput::RC_left: - switch (selected) - { - case 0: - if (contrast > 0) - { - contrast -= lrint(::log(contrast)); - - paintSlider(x+10, y+hheight, contrast, CONTRASTFACTOR, LOCALE_LCDCONTROLER_CONTRAST, true); - setLcd(); - } - break; - case 1: - if (brightness > 0) - { - if (brightness > 5) - brightness -= 5; - else - brightness = 0; - - paintSlider(x+10, y+hheight+mheight, brightness, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESS, true); - setLcd(); - } - break; - case 2: - if (brightnessstandby > 0) - { - if (brightnessstandby > 5) - brightnessstandby -= 5; - else - brightnessstandby = 0; - - paintSlider(x+10, y+hheight+mheight*2, brightnessstandby, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, true); - setLcd(); - } - break; - } - break; - - case CRCInput::RC_home: - if ( ( (contrast != contrast_alt) || (brightness != brightness_alt) || (brightnessstandby != brightnessstandby_alt) ) && - (ShowLocalizedMessage(name, LOCALE_MESSAGEBOX_DISCARD, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbCancel) == CMessageBox::mbrCancel)) - break; - - // sonst abbruch... - contrast = contrast_alt; - brightness = brightness_alt; - brightnessstandby = brightnessstandby_alt; - setLcd(); - loop = false; - break; - - case CRCInput::RC_ok: - if (selected==3) // default Werte benutzen - { - brightness = DEFAULT_LCD_BRIGHTNESS; - brightnessstandby = DEFAULT_LCD_STANDBYBRIGHTNESS; - contrast = DEFAULT_LCD_CONTRAST; - selected = 0; - setLcd(); - paint(); - break; - } - - case CRCInput::RC_timeout: - loop = false; - break; - - default: - if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) - { - loop = false; - res = menu_return::RETURN_EXIT_ALL; - } - } - } - - CLCD::getInstance()->setAutoDimm(autodimm_alt); - hide(); - - if(observer) - observer->changeNotify(name, NULL); - - return res; -} - -void CLcdControler::hide() -{ - frameBuffer->paintBackgroundBoxRel(x,y, width,height); -} - -void CLcdControler::paint() -{ - CLCD::getInstance()->setMode(CLCD::MODE_TVRADIO); - - //frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0); - //frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round - frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);//round - - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 - - paintSlider(x+10, y+hheight, contrast, CONTRASTFACTOR, LOCALE_LCDCONTROLER_CONTRAST, true); - paintSlider(x+10, y+hheight+mheight, brightness, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESS, false); - paintSlider(x+10, y+hheight+mheight*2, brightnessstandby, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, false); - - frameBuffer->paintHLineRel(x+10, width-20, y+hheight+mheight*3+mheight/4, COL_MENUCONTENT_PLUS_3); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, y+hheight+mheight*4+mheight/2, width, g_Locale->getText(LOCALE_OPTIONS_DEFAULT), COL_MENUCONTENT, 0, true); // UTF-8 -} - -void CLcdControler::paintSlider(int x, int y, unsigned int spos, float factor, const neutrino_locale_t text, bool selected) -{ - int startx = 200; - char wert[5]; - - frameBuffer->paintBoxRel(x + startx, y, 120, mheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintIcon(NEUTRINO_ICON_VOLUMEBODY, x + startx, y+2+mheight/4); - frameBuffer->paintIcon(selected ? NEUTRINO_ICON_VOLUMESLIDER2BLUE : NEUTRINO_ICON_VOLUMESLIDER2, (int)(x + (startx+3)+(spos / factor)), y+mheight/4); - - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x, y+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 - sprintf(wert, "%3d", spos); // UTF-8 encoded - frameBuffer->paintBoxRel(x + startx + 120 + 10, y, 50, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x + startx + 120 + 10, y+mheight, width, wert, COL_MENUCONTENT, 0, true); // UTF-8 -} diff --git a/src/gui/widget/lcdcontroler.h b/src/gui/widget/lcdcontroler.h deleted file mode 100644 index 2c7c80c79..000000000 --- a/src/gui/widget/lcdcontroler.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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. -*/ - - -#ifndef __lcdcontroler__ -#define __lcdcontroler__ - -#include -#include - -#include "menue.h" - -#include - -class CLcdControler : public CMenuTarget -{ - private: - CFrameBuffer *frameBuffer; - int x; - int y; - int width; - int height; - int hheight,mheight; // head/menu font height - - unsigned char contrast; - unsigned char brightness; - unsigned char brightnessstandby; - - neutrino_locale_t name; - - CChangeObserver* observer; - - void paint(); - void setLcd(); - void paintSlider(int x, int y, unsigned int spos, float factor, const neutrino_locale_t text, bool selected); - - public: - - CLcdControler(const neutrino_locale_t Name, CChangeObserver* Observer = NULL); - - void hide(); - int exec(CMenuTarget* parent, const std::string & actionKey); - -}; - - -#endif 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/listbox_legacy.cpp b/src/gui/widget/listbox_legacy.cpp deleted file mode 100644 index 0c00ea0fe..000000000 --- a/src/gui/widget/listbox_legacy.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2003 thegoodguy - - 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 "listbox_legacy.h" - -#include - -CListBoxExt::CListBoxExt(void) : CListBox("") -{ - saveBoxCaption = NONEXISTANT_LOCALE; - saveBoxText = NULL; -} - -void CListBoxExt::setTitle(const char * const title) -{ - caption = title ? title : ""; -} - -void CListBoxExt::hide() -{ - //want2save? - if ((modified) && (saveBoxCaption != NONEXISTANT_LOCALE) && (saveBoxText != NULL)) - { - if (ShowMsgUTF(saveBoxCaption, saveBoxText, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes) // UTF-8 - onSaveData(); - } - - CListBox::hide(); -} - -void CListBoxExt::setSaveDialogText(const neutrino_locale_t title, const char * const text) -{ - saveBoxCaption = title; - saveBoxText = text; -} diff --git a/src/gui/widget/listbox_legacy.h b/src/gui/widget/listbox_legacy.h deleted file mode 100644 index 14b729374..000000000 --- a/src/gui/widget/listbox_legacy.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2003 thegoodguy - - 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. -*/ - - -#ifndef __listbox_legacy__ -#define __listbox_legacy__ - -#include "listbox.h" - -class CListBoxExt : public CListBox -{ - protected: - neutrino_locale_t saveBoxCaption; - const char * saveBoxText; - - void setTitle(const char * const title); - - virtual void hide(); - void setSaveDialogText(const neutrino_locale_t title, const char * const text); - virtual void onSaveData(){}; - - public: - CListBoxExt(void); -}; - - -#endif diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 53414aaf1..b973b7eb0 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 @@ -52,6 +43,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 +63,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 +300,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 +325,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 +367,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 +380,9 @@ void CMenuWidget::move(int xoff, int yoff) CMenuWidget::~CMenuWidget() { -#if 0 - for(unsigned int count=0;countsetHint("", NONEXISTANT_LOCALE); + checkHints(); + if (has_hints) + GenericMenuBack->setHint(NEUTRINO_ICON_HINT_BACK, LOCALE_MENU_HINT_BACK); + if(savescreen) { calcSize(); saveScreen(); @@ -513,87 +506,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])) { @@ -609,113 +583,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]); + } } while ( msg!=CRCInput::RC_timeout ); hide(); @@ -744,15 +753,31 @@ 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); + } /* 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() @@ -760,9 +785,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; @@ -778,7 +800,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; @@ -796,13 +836,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()); @@ -836,8 +877,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(width - sb_width); } @@ -845,17 +886,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; @@ -870,23 +908,22 @@ 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 ); - y = offy + scr_y + ((scr_h - height) >> 1 ); + x = offx + scr_x + ((scr_w - menu_width ) >> 1 ); + y = offy + scr_y + ((scr_h - height - hint_height) >> 1 ); break; case MENU_POS_TOP_LEFT: @@ -896,17 +933,17 @@ 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: - y = offy + scr_y + scr_h - height - 10; + y = offy + scr_y + scr_h - height - hint_height - 10; x = offx + scr_x + 10; break; case MENU_POS_BOTTOM_RIGHT: - y = offy + scr_y + scr_h - height - 10; - x = offx + scr_x + scr_w - mn_width - 10; + y = offy + scr_y + scr_h - height - hint_height - 10; + x = offx + scr_x + scr_w - menu_width - 10; break; } } @@ -942,12 +979,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); } } @@ -998,30 +1038,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) { @@ -1039,7 +1221,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; } @@ -1103,7 +1284,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++) { @@ -1126,7 +1306,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++) { @@ -1151,7 +1330,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]); @@ -1170,7 +1348,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]); @@ -1201,7 +1378,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++) @@ -1320,14 +1499,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; } @@ -1359,8 +1552,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++) @@ -1408,7 +1601,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); @@ -1441,7 +1634,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/rgbcsynccontroler.cpp b/src/gui/widget/rgbcsynccontroler.cpp deleted file mode 100644 index aecf0de5b..000000000 --- a/src/gui/widget/rgbcsynccontroler.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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 "gui/widget/icons.h" - -#include -#include - -#include -#include - -extern cVideo * videoDecoder; - - -#define CSYNCFACTOR 0.31 - - -CRGBCSyncControler::CRGBCSyncControler(const neutrino_locale_t Name, unsigned char* Csync, CChangeObserver* Observer) -{ - frameBuffer = CFrameBuffer::getInstance(); - hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); - mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); - observer = Observer; - name = Name; - width = w_max(390, 0); - height = h_max(hheight+ mheight* 1+ +mheight/2, 0); - x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth()-width) >> 1); - y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight()-height)>>1); - csync=Csync; -} - -void CRGBCSyncControler::setCSync() -{ -// printf("contrast: %d brightness: %d brightness standby: %d\n", contrast, brightness, brightnessstandby); - g_Controld->setRGBCsync(*csync); -} - -int CRGBCSyncControler::exec(CMenuTarget* parent, const std::string &) -{ - neutrino_msg_t msg; - neutrino_msg_data_t data; - - int res = menu_return::RETURN_REPAINT; - unsigned char csync_alt; - - if (parent) - { - parent->hide(); - } - csync_alt = *csync; - - setCSync(); - paint(); - - uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); - - bool loop=true; - while (loop) - { - g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd, true ); - - if ( msg <= CRCInput::RC_MaxRC ) - timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); - - switch ( msg ) - { - case CRCInput::RC_right: - if (*csync < 31) - { - (*csync)++; - paintSlider(x+10, y+hheight, *csync, CSYNCFACTOR, LOCALE_VIDEOMENU_CSYNC, true); - setCSync(); - } - break; - - case CRCInput::RC_left: - if (*csync > 0) - { - (*csync)--; - paintSlider(x+10, y+hheight, *csync, CSYNCFACTOR, LOCALE_VIDEOMENU_CSYNC, true); - setCSync(); - } - break; - - case CRCInput::RC_home: - if ( ( (*csync != csync_alt) ) && - (ShowLocalizedMessage(name, LOCALE_MESSAGEBOX_DISCARD, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbCancel) == CMessageBox::mbrCancel)) - break; - - // sonst abbruch... - *csync = csync_alt; - setCSync(); - loop = false; - break; - - case CRCInput::RC_ok: - loop = false; - break; - - case CRCInput::RC_timeout: - loop = false; - break; - - default: - if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) - { - loop = false; - res = menu_return::RETURN_EXIT_ALL; - } - } - } - - hide(); - - if(observer) - observer->changeNotify(name, NULL); - - return res; -} - -void CRGBCSyncControler::hide() -{ - frameBuffer->paintBackgroundBoxRel(x,y, width,height); -} - -void CRGBCSyncControler::paint() -{ - frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 - frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0); - - paintSlider(x+10, y+hheight, *csync, CSYNCFACTOR, LOCALE_VIDEOMENU_CSYNC, true); - -// frameBuffer->paintHLineRel(x+10, width-20, y+hheight+mheight*3+mheight/4, COL_MENUCONTENT_PLUS_3); -} - -void CRGBCSyncControler::paintSlider(int px, int py, unsigned int spos, float factor, const neutrino_locale_t text, bool selected) -{ - int startx = 200; - char wert[5]; - - frameBuffer->paintBoxRel(px + startx, py, 120, mheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintIcon(NEUTRINO_ICON_VOLUMEBODY, px + startx, py+2+mheight/4); - frameBuffer->paintIcon(selected ? NEUTRINO_ICON_VOLUMESLIDER2BLUE : NEUTRINO_ICON_VOLUMESLIDER2, (int)(px + (startx+3)+(spos / factor)), py+mheight/4); - - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, py+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 - sprintf(wert, "%3d", spos); // UTF-8 encoded - frameBuffer->paintBoxRel(px + startx + 120 + 10, py, 50, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px + startx + 120 + 10, py+mheight, width, wert, COL_MENUCONTENT, 0, true); // UTF-8 -} diff --git a/src/gui/widget/rgbcsynccontroler.h b/src/gui/widget/rgbcsynccontroler.h deleted file mode 100644 index ea3010482..000000000 --- a/src/gui/widget/rgbcsynccontroler.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Neutrino-GUI - DBoxII-Project - - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ - - 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 - - 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. -*/ - - -#ifndef __rgbcsynccontroler__ -#define __rgbcsynccontroler__ - -#include -#include - -#include "menue.h" - -#include - -class CRGBCSyncControler : public CMenuTarget -{ - private: - CFrameBuffer *frameBuffer; - int x; - int y; - int width; - int height; - int hheight,mheight; // head/menu font height - - unsigned char* csync; - - neutrino_locale_t name; - - CChangeObserver* observer; - - void paint(); - void setCSync(); - void paintSlider(int x, int y, unsigned int spos, float factor, const neutrino_locale_t text, bool selected); - - public: - - CRGBCSyncControler(const neutrino_locale_t Name, unsigned char* Csync, CChangeObserver* Observer=NULL); // UTF-8 - - void hide(); - int exec(CMenuTarget* parent, const std::string & actionKey); - -}; - - -#endif diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index ffb5e9ccd..2f80729bc 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/zapit_setup.cpp b/src/gui/zapit_setup.cpp index 97cc14bed..12bb06ec4 100644 --- a/src/gui/zapit_setup.cpp +++ b/src/gui/zapit_setup.cpp @@ -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; @@ -129,13 +137,11 @@ int CSelectChannelWidget::exec(CMenuTarget* parent, const std::string& actionKey { g_settings.StartChannelTV = actionKey.substr(actionKey.find_first_of("#")+1); g_settings.startchanneltv_id = channel_id; - g_settings.startchanneltv_nr = cnr-1; } else if (strncmp(actionKey.c_str(), "ZCR:", 4) == 0)//...radio { g_settings.StartChannelRadio = actionKey.substr(actionKey.find_first_of("#")+1); g_settings.startchannelradio_id= channel_id; - g_settings.startchannelradio_nr = cnr-1; } // ...leave bouquet/channel menu and show a refreshed zapit menu with current start channel(s) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 774aa7a45..b822dac89 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -376,7 +375,6 @@ int CNeutrinoApp::loadSetup(const char * fname) //misc g_settings.power_standby = configfile.getInt32( "power_standby", 0); g_settings.rotor_swap = configfile.getInt32( "rotor_swap", 0); - g_settings.emlog = configfile.getInt32( "emlog", 0); //led g_settings.led_tv_mode = configfile.getInt32( "led_tv_mode", 1); @@ -405,10 +403,13 @@ 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 ); g_settings.show_mute_icon = configfile.getInt32("show_mute_icon" ,0); g_settings.infobar_show_res = configfile.getInt32("infobar_show_res", 0 ); + g_settings.infobar_show_dd_available = configfile.getInt32("infobar_show_dd_available", 1 ); g_settings.infobar_show_tuner = configfile.getInt32("infobar_show_tuner", 1 ); g_settings.radiotext_enable = configfile.getBool("radiotext_enable" , false); //audio @@ -701,8 +702,6 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.StartChannelRadio = configfile.getString("startchannelradio",""); g_settings.startchanneltv_id = configfile.getInt64("startchanneltv_id", 0); g_settings.startchannelradio_id = configfile.getInt64("startchannelradio_id", 0); - g_settings.startchanneltv_nr = configfile.getInt32("startchanneltv_nr", 0); - g_settings.startchannelradio_nr = configfile.getInt32("startchannelradio_nr", 0); g_settings.uselastchannel = configfile.getInt32("uselastchannel" , 1); @@ -831,7 +830,6 @@ void CNeutrinoApp::saveSetup(const char * fname) //misc configfile.setInt32( "power_standby", g_settings.power_standby); configfile.setInt32( "rotor_swap", g_settings.rotor_swap); - configfile.setInt32( "emlog", g_settings.emlog); configfile.setInt32( "zap_cycle", g_settings.zap_cycle ); configfile.setInt32( "hdd_fs", g_settings.hdd_fs); configfile.setInt32( "hdd_sleep", g_settings.hdd_sleep); @@ -848,10 +846,13 @@ 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 ); configfile.setInt32("show_mute_icon" , g_settings.show_mute_icon); configfile.setInt32("infobar_show_res" , g_settings.infobar_show_res ); + configfile.setInt32("infobar_show_dd_available" , g_settings.infobar_show_dd_available ); configfile.setInt32("infobar_show_tuner" , g_settings.infobar_show_tuner ); configfile.setBool("radiotext_enable" , g_settings.radiotext_enable); //audio @@ -1104,8 +1105,6 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString( "startchannelradio", g_settings.StartChannelRadio ); configfile.setInt64("startchanneltv_id", g_settings.startchanneltv_id); configfile.setInt64("startchannelradio_id", g_settings.startchannelradio_id); - configfile.setInt32("startchanneltv_nr", g_settings.startchanneltv_nr); - configfile.setInt32("startchannelradio_nr", g_settings.startchannelradio_nr); configfile.setInt32("uselastchannel", g_settings.uselastchannel); // USERMENU @@ -1240,7 +1239,7 @@ void CNeutrinoApp::channelsInit(bool bOnly) satellite_map_t satlist = CServiceManager::getInstance()->SatelliteList(); for(sit = satlist.begin(); sit != satlist.end(); sit++) { CServiceManager::getInstance()->GetAllSatelliteChannels(zapitList, sit->first); - if(!zapitList.size()) + if( zapitList.empty() ) continue; tvi = 0, ri = 0; @@ -1720,7 +1719,42 @@ 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"); + if(!wakeup){ + 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 ); + } +#endif + +} + int CNeutrinoApp::run(int argc, char **argv) { CmdParser(argc, argv); @@ -1761,8 +1795,6 @@ TIMER_START(); Z_start_arg ZapStart_arg; ZapStart_arg.startchanneltv_id = g_settings.startchanneltv_id; ZapStart_arg.startchannelradio_id = g_settings.startchannelradio_id; - ZapStart_arg.startchanneltv_nr = g_settings.startchanneltv_nr; - ZapStart_arg.startchannelradio_nr = g_settings.startchannelradio_nr; ZapStart_arg.uselastchannel = g_settings.uselastchannel; ZapStart_arg.video_mode = g_settings.video_Mode; ZapStart_arg.ci_clock = g_settings.ci_clock; @@ -1791,7 +1823,9 @@ TIMER_START(); 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)){ @@ -1973,7 +2007,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) @@ -2044,32 +2078,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 ) { - if(g_RemoteControl->subChannels.size() > 0) { + 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.size()> 0) { - 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 */ @@ -2291,7 +2317,7 @@ _show: //_show: if(msg == CRCInput::RC_ok) { - if(bouquetList->Bouquets.size() && bouquetList->Bouquets[old_b]->channelList->getSize() > 0) + if( !bouquetList->Bouquets.empty() && bouquetList->Bouquets[old_b]->channelList->getSize() > 0) nNewChannel = bouquetList->Bouquets[old_b]->channelList->exec();//with ZAP! else nNewChannel = bouquetList->exec(true); @@ -2627,7 +2653,7 @@ _repeat: tmpTimerList.clear(); tmpTimerdClient.getTimerList( tmpTimerList ); - if(tmpTimerList.size() > 0) { + if( !tmpTimerList.empty() ) { sort( tmpTimerList.begin(), tmpTimerList.end() ); CTimerd::responseGetTimer &timer = tmpTimerList[0]; @@ -2900,7 +2926,6 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) //SDTreloadChannels = false; } - CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN); delete CRecordManager::getInstance(); @@ -2914,6 +2939,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; @@ -3152,7 +3178,7 @@ void CNeutrinoApp::scartMode( bool bOnOff ) } } -void CNeutrinoApp::standbyMode( bool bOnOff ) +void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby ) { static bool wasshift = false; INFO("%s", bOnOff ? "ON" : "OFF" ); @@ -3185,9 +3211,9 @@ 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 } } diff --git a/src/neutrino.h b/src/neutrino.h index 34f29b33e..97b483a7c 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -80,6 +80,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 +134,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 3c88c08ce..3e8ddce2c 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -48,7 +48,6 @@ #include "gui/bouquetlist.h" #include "gui/cam_menu.h" #include "gui/dboxinfo.h" -#include "gui/epg_menu.h" #include #include "gui/favorites.h" #include "gui/hdd_menu.h" @@ -70,7 +69,7 @@ #include "gui/scan_setup.h" #include "gui/settings_manager.h" #include "gui/sleeptimer.h" -#include "gui/software_update.h" +#include "gui/update_menue.h" #include #include "gui/test_menu.h" #include "gui/update.h" @@ -90,7 +89,7 @@ enum MENU_MAIN, MENU_SETTINGS, MENU_SERVICE, - + MENU_MAX //3 }; @@ -107,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(); } @@ -126,87 +125,111 @@ void CNeutrinoApp::InitMenu() void CNeutrinoApp::InitMenuMain() { dprintf(DEBUG_DEBUG, "init mainmenue\n"); - + unsigned int system_rev = cs_get_revision(); - + // 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 @@ -216,123 +239,169 @@ 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 - personalize.addItem(MENU_SERVICE, new CMenuForwarder(LOCALE_BOUQUETEDITOR_NAME , true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW) , &g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT]); - + mf = new CMenuForwarder(LOCALE_BOUQUETEDITOR_NAME , true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + mf->setHint(NEUTRINO_ICON_HINT_BEDIT, LOCALE_MENU_HINT_BEDIT); + personalize.addItem(MENU_SERVICE, mf, &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 1abf49308..6677e080a 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -153,6 +153,9 @@ enum MN_WIDGET_ID //software update MN_WIDGET_ID_SOFTWAREUPDATE, MN_WIDGET_ID_MTDEXPERT, + + //software update settings + MN_WIDGET_ID_SOFTWAREUPDATE_SETTINGS, MN_WIDGET_ID_SCAN_MAIN, MN_WIDGET_ID_SCAN_FE_SETUP, @@ -160,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 0da793884..e53469824 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -136,7 +136,7 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh) void CControlAPI::compatibility_Timer(CyhookHandler *hh) { log_level_printf(4,"CControlAPI Compatibility Timer Start url:%s\n",hh->UrlData["url"].c_str()); - if(NeutrinoAPI->Timerd->isTimerdAvailable() && hh->ParamList.size() > 0) + if(NeutrinoAPI->Timerd->isTimerdAvailable() && !hh->ParamList.empty() ) { if(hh->ParamList["action"] == "remove") { @@ -390,7 +390,7 @@ void CControlAPI::ExecCGI(CyhookHandler *hh) hh->SetHeader(HTTP_OK, "text/xml; charset=UTF-8"); else hh->SetHeader(HTTP_OK, "text/plain; charset=UTF-8"); - if (hh->ParamList.size() > 0) + if ( !hh->ParamList.empty() ) { script = hh->ParamList["1"]; unsigned int len = hh->ParamList.size(); diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp index 11c0a3507..ddef565df 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp @@ -11,6 +11,7 @@ // C #include #include +#include // C++ #include diff --git a/src/nhttpd/tuxboxapi/dbox/controlapi.cpp b/src/nhttpd/tuxboxapi/dbox/controlapi.cpp index 1fe9f694a..9b39fbce9 100644 --- a/src/nhttpd/tuxboxapi/dbox/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/dbox/controlapi.cpp @@ -110,7 +110,7 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh) void CControlAPI::compatibility_Timer(CyhookHandler *hh) { log_level_printf(4,"CControlAPI Compatibility Timer Start url:%s\n",hh->UrlData["url"].c_str()); - if(NeutrinoAPI->Timerd->isTimerdAvailable() && hh->ParamList.size() > 0) + if(NeutrinoAPI->Timerd->isTimerdAvailable() && !hh->ParamList.empty() ) { if(hh->ParamList["action"] == "remove") { @@ -353,7 +353,7 @@ void CControlAPI::ExecCGI(CyhookHandler *hh) hh->SetHeader(HTTP_OK, "text/xml; charset=UTF-8"); else hh->SetHeader(HTTP_OK, "text/plain; charset=UTF-8"); - if (hh->ParamList.size() > 0) + if ( !hh->ParamList.empty() ) { script = hh->ParamList["1"]; unsigned int len = hh->ParamList.size(); 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..9ef89d701 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%; float: right;"> +
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..3fb27ca2d 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,21 @@ 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; } 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 +110,42 @@ 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; } .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; } .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; } .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 +168,36 @@ 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; } .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; } .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; } .y_menu_sec { - display: block; - background-repeat: no-repeat; + display: block; + background-repeat: no-repeat; margin: 0px; } @@ -227,12 +213,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 +220,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 +230,52 @@ 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; } .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; } .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; } .work_box_help { float:right; @@ -332,47 +328,45 @@ 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; } .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; } .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; } .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; } .y_wait_box_main { color: #666666; @@ -400,12 +394,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 +475,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; 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..c5fea8aff 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.29 +date=12.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_core/ylanguage.cpp b/src/nhttpd/yhttpd_core/ylanguage.cpp index 80bde852b..38c67f9df 100644 --- a/src/nhttpd/yhttpd_core/ylanguage.cpp +++ b/src/nhttpd/yhttpd_core/ylanguage.cpp @@ -7,6 +7,7 @@ #include #include #include +#include // yhttpd #include diff --git a/src/nhttpd/yhttpd_core/yrequest.cpp b/src/nhttpd/yhttpd_core/yrequest.cpp index 5f648ea6b..94fb344bd 100644 --- a/src/nhttpd/yhttpd_core/yrequest.cpp +++ b/src/nhttpd/yhttpd_core/yrequest.cpp @@ -21,6 +21,8 @@ #include #include #include +#include + // system #include #include diff --git a/src/nhttpd/yhttpd_core/yresponse.cpp b/src/nhttpd/yhttpd_core/yresponse.cpp index 64aad7195..c010a0f74 100644 --- a/src/nhttpd/yhttpd_core/yresponse.cpp +++ b/src/nhttpd/yhttpd_core/yresponse.cpp @@ -7,6 +7,8 @@ #include #include #include +#include + // c++ #include // system diff --git a/src/nhttpd/yhttpd_core/ysocket.cpp b/src/nhttpd/yhttpd_core/ysocket.cpp index 76098536f..d78912640 100644 --- a/src/nhttpd/yhttpd_core/ysocket.cpp +++ b/src/nhttpd/yhttpd_core/ysocket.cpp @@ -14,6 +14,8 @@ #include #include #include +#include + // yhttpd #include "yhttpd.h" #include "ysocket.h" diff --git a/src/nhttpd/yhttpd_mods/mod_sendfile.cpp b/src/nhttpd/yhttpd_mods/mod_sendfile.cpp index c0a36ec8c..1e0d42b02 100644 --- a/src/nhttpd/yhttpd_mods/mod_sendfile.cpp +++ b/src/nhttpd/yhttpd_mods/mod_sendfile.cpp @@ -45,6 +45,7 @@ #include #include #include +#include // yhttpd #include "yconfig.h" #include "ytypes_globals.h" diff --git a/src/nhttpd/yhttpd_mods/mod_weblog.cpp b/src/nhttpd/yhttpd_mods/mod_weblog.cpp index 8f467b6f5..4d25f6e3f 100644 --- a/src/nhttpd/yhttpd_mods/mod_weblog.cpp +++ b/src/nhttpd/yhttpd_mods/mod_weblog.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include "mod_weblog.h" #include "helper.h" diff --git a/src/nhttpd/yhttpd_mods/mod_yparser.cpp b/src/nhttpd/yhttpd_mods/mod_yparser.cpp index 0df6079b8..9ad6eb7e6 100644 --- a/src/nhttpd/yhttpd_mods/mod_yparser.cpp +++ b/src/nhttpd/yhttpd_mods/mod_yparser.cpp @@ -159,7 +159,7 @@ void CyParser::cgi(CyhookHandler *hh) { bool ydebug = false; std::string htmlfilename, yresult, ycmd; - if (hh->ParamList.size() > 0) { + if ( !hh->ParamList.empty() ) { if (hh->ParamList["tmpl"] != "") // for GET and POST htmlfilename = hh->ParamList["tmpl"]; else @@ -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/sectionsd/FreesatTables.hpp b/src/sectionsd/FreesatTables.hpp deleted file mode 100644 index 68a33b3ac..000000000 --- a/src/sectionsd/FreesatTables.hpp +++ /dev/null @@ -1,3052 +0,0 @@ -/* - * This table was derived from on-air transmissions. It certainly has omissions and - * almost certainly contains errors. Use entirely at your own risk. - */ -struct hufftab { - char last; - unsigned int value; - short bits; - char next; -}; - -#define START '\0' -#define STOP '\0' -#define ESCAPE '\1' - -static struct hufftab fsat_huffman1[] = -{ - { START, 0x00000000, 2, 'T'}, - { START, 0x40000000, 3, 'B'}, - { START, 0x60000000, 5, 'L'}, - { START, 0x68000000, 7, 'K'}, - { START, 0x6a000000, 8, '6'}, - { START, 0x6c000000, 6, 'Q'}, - { START, 0x70000000, 5, 'D'}, - { START, 0x78000000, 5, 'H'}, - { START, 0x80000000, 4, 'C'}, - { START, 0x90000000, 4, 'I'}, - { START, 0xa0000000, 5, 'R'}, - { START, 0xa8000000, 5, 'N'}, - { START, 0xb0000000, 5, 'E'}, - { START, 0xb8000000, 8, 'V'}, - { START, 0xb9000000, 10, 'Z'}, - { START, 0xb9400000, 11, '1'}, - { START, 0xb9600000, 11, '3'}, - { START, 0xb9800000, 9, '2'}, - { START, 0xba000000, 7, 'U'}, - { START, 0xbc000000, 6, 'G'}, - { START, 0xc0000000, 5, 'F'}, - { START, 0xc8000000, 5, 'A'}, - { START, 0xd0000000, 4, 'S'}, - { START, 0xe0000000, 5, 'M'}, - { START, 0xe8000000, 5, 'P'}, - { START, 0xf0000000, 5, 'W'}, - { START, 0xf8000000, 6, 'J'}, - { START, 0xfc000000, 7, 'O'}, - { START, 0xfe000000, 8, 'Y'}, - { START, 0xff400000, 11, '4'}, - { START, 0xff600000, 14, '5'}, - { START, 0xff698000, 18, 't'}, - { START, 0xff800000, 9, 'X'}, - { ' ', 0x00000000, 4, 'W'}, - { ' ', 0x10000000, 7, 'f'}, - { ' ', 0x12000000, 7, 'Q'}, - { ' ', 0x14000000, 8, '-'}, - { ' ', 0x15240000, 14, '.'}, - { ' ', 0x152c0000, 14, 'l'}, - { ' ', 0x15300000, 13, 'g'}, - { ' ', 0x15400000, 10, 'r'}, - { ' ', 0x15800000, 11, 'b'}, - { ' ', 0x15a00000, 12, 'v'}, - { ' ', 0x15b00000, 12, 'd'}, - { ' ', 0x15f00000, 13, 'u'}, - { ' ', 0x16000000, 7, 'V'}, - { ' ', 0x18000000, 5, 'I'}, - { ' ', 0x20000000, 5, 'G'}, - { ' ', 0x28000000, 7, STOP}, - { ' ', 0x2a000000, 7, 'w'}, - { ' ', 0x2c000000, 6, 'U'}, - { ' ', 0x30000000, 4, 'M'}, - { ' ', 0x40000000, 4, 'C'}, - { ' ', 0x50000000, 4, 'B'}, - { ' ', 0x60000000, 5, 'H'}, - { ' ', 0x68000000, 5, 'D'}, - { ' ', 0x70000000, 4, 'P'}, - { ' ', 0x80000000, 5, 'o'}, - { ' ', 0x88000000, 5, 'A'}, - { ' ', 0x90000000, 4, 'T'}, - { ' ', 0xa0000000, 5, 't'}, - { ' ', 0xa8000000, 9, '&'}, - { ' ', 0xa8800000, 10, '5'}, - { ' ', 0xa8c00000, 10, 'Z'}, - { ' ', 0xa9000000, 8, '1'}, - { ' ', 0xaa000000, 11, '\''}, - { ' ', 0xaa200000, 11, '0'}, - { ' ', 0xaa400000, 10, '9'}, - { ' ', 0xab000000, 11, '6'}, - { ' ', 0xab200000, 12, 'n'}, - { ' ', 0xab300000, 12, '8'}, - { ' ', 0xab400000, 10, 's'}, - { ' ', 0xab800000, 10, '4'}, - { ' ', 0xabc00000, 10, '3'}, - { ' ', 0xac000000, 6, 'O'}, - { ' ', 0xb0000000, 5, 'a'}, - { ' ', 0xb8000000, 5, 'F'}, - { ' ', 0xc0000000, 4, 'N'}, - { ' ', 0xd0000000, 5, 'L'}, - { ' ', 0xd8000000, 5, 'R'}, - { ' ', 0xe0000000, 7, '2'}, - { ' ', 0xe2000000, 7, 'K'}, - { ' ', 0xe4000000, 6, 'J'}, - { ' ', 0xe8000000, 6, 'E'}, - { ' ', 0xec000000, 7, 'Y'}, - { ' ', 0xee000000, 7, 'i'}, - { ' ', 0xf0000000, 4, 'S'}, - { '!', 0x40000000, 2, ' '}, - { '!', 0x80000000, 8, STOP}, - { '&', 0x40000000, 2, 'B'}, - { '&', 0x80000000, 1, ' '}, - { '%', 0x80000000, 1, ' '}, - { ',', 0x80000000, 1, ' '}, - { '-', 0x0c000000, 7, 'L'}, - { '-', 0x1c000000, 6, 'I'}, - { '-', 0x20000000, 8, 'P'}, - { '-', 0x38000000, 10, 'E'}, - { '-', 0x40000000, 4, 'U'}, - { '-', 0x5d000000, 8, 'i'}, - { '-', 0x84000000, 7, 'D'}, - { '-', 0x96af8000, 17, 'H'}, - { '-', 0xb0000000, 4, 'S'}, - { '-', 0xc0000000, 2, ' '}, - { '.', 0x08000000, 5, 'T'}, - { '.', 0x19600000, 13, ESCAPE}, - { '.', 0x1a000000, 8, 'W'}, - { '.', 0x20000000, 4, ' '}, - { '.', 0x40000000, 2, STOP}, - { '.', 0x80000000, 1, '.'}, - { '/', 0x40000000, 3, '7'}, - { '0', 0x40000000, 2, ' '}, - { '0', 0x80000000, 3, '6'}, - { '0', 0xa0000000, 4, STOP}, - { '0', 0xb0000000, 6, '8'}, - { '0', 0xb4000000, 7, 's'}, - { '0', 0xb7000000, 9, '/'}, - { '0', 0xb7800000, 9, '%'}, - { '0', 0xb8000000, 5, '7'}, - { '0', 0xc0000000, 2, '0'}, - { '1', 0x30000000, 4, ' '}, - { '1', 0x40000000, 2, STOP}, - { '1', 0x8c000000, 6, ':'}, - { '1', 0x98000000, 6, '\''}, - { '1', 0xa0000000, 3, '0'}, - { '1', 0xc0000000, 5, '3'}, - { '1', 0xc8000000, 6, 'X'}, - { '1', 0xcc000000, 6, '9'}, - { '1', 0xe0000000, 3, '1'}, - { '2', 0x00000000, 1, '0'}, - { '2', 0x80000000, 5, ':'}, - { '2', 0x90000000, 4, ' '}, - { '2', 0xa0000000, 3, STOP}, - { '2', 0xc0000000, 2, '4'}, - { '3', 0x00000000, 1, ' '}, - { '3', 0x80000000, 8, STOP}, - { '3', 0xe0000000, 5, '0'}, - { '3', 0xe8000000, 7, ':'}, - { '4', 0x00000000, 8, STOP}, - { '4', 0x52000000, 8, 'M'}, - { '4', 0x90000000, 4, ':'}, - { '4', 0xa0000000, 3, '-'}, - { '4', 0xc0000000, 2, ' '}, - { '5', 0xa0000000, 3, '0'}, - { '5', 0xc0000000, 2, ' '}, - { '6', 0x40000000, 2, ' '}, - { '6', 0x80000000, 2, '0'}, - { '6', 0xc6000000, 7, '4'}, - { '6', 0xd8000000, 6, '8'}, - { '6', 0xe0000000, 3, ':'}, - { '7', 0x80000000, 8, STOP}, - { '8', 0x00000000, 2, '0'}, - { '8', 0x84000000, 7, ':'}, - { '8', 0x86800000, 9, STOP}, - { '8', 0x87800000, 10, '.'}, - { '8', 0x88000000, 5, ' '}, - { '9', 0x00000000, 1, '1'}, - { '9', 0x80000000, 4, '9'}, - { '9', 0x98000000, 5, '0'}, - { '9', 0xa0000000, 3, '6'}, - { '9', 0xc0000000, 3, STOP}, - { ':', 0x00000000, 2, '0'}, - { ':', 0x58000000, 8, ESCAPE}, - { ':', 0x59000000, 8, 'T'}, - { ':', 0x60000000, 3, '.'}, - { ':', 0x80000000, 1, ' '}, - { '?', 0x20000000, 3, ':'}, - { '?', 0x40000000, 2, ' '}, - { '?', 0x80000000, 2, STOP}, - { 'A', 0x00000000, 4, 'm'}, - { 'A', 0x10000000, 5, 'w'}, - { 'A', 0x18000000, 6, 'u'}, - { 'A', 0x1c000000, 6, STOP}, - { 'A', 0x20000000, 3, 'r'}, - { 'A', 0x40000000, 3, ' '}, - { 'A', 0x68000000, 5, 'c'}, - { 'A', 0x70000000, 4, 'g'}, - { 'A', 0x80000000, 3, 'l'}, - { 'A', 0xa2000000, 7, 'v'}, - { 'A', 0xa8000000, 5, 't'}, - { 'A', 0xb0000000, 5, 'f'}, - { 'A', 0xb8000000, 5, 'i'}, - { 'A', 0xc0000000, 3, 'n'}, - { 'A', 0xe0000000, 5, 's'}, - { 'A', 0xe8000000, 6, 'b'}, - { 'A', 0xec000000, 7, 'p'}, - { 'A', 0xef180000, 13, '\''}, - { 'A', 0xef400000, 12, 'y'}, - { 'A', 0xf0000000, 4, 'd'}, - { 'B', 0x00000000, 2, 'C'}, - { 'B', 0x40000000, 2, 'B'}, - { 'B', 0x80000000, 6, STOP}, - { 'B', 0x84000000, 7, 'y'}, - { 'B', 0x87a00000, 11, 'h'}, - { 'B', 0x87e00000, 11, ' '}, - { 'B', 0x88000000, 5, 'l'}, - { 'B', 0x90000000, 4, 'i'}, - { 'B', 0xa0000000, 3, 'r'}, - { 'B', 0xc0000000, 4, 'o'}, - { 'B', 0xd0000000, 4, 'u'}, - { 'B', 0xe0000000, 4, 'a'}, - { 'B', 0xf0000000, 4, 'e'}, - { 'C', 0x00000000, 2, 'o'}, - { 'C', 0x40000000, 2, ' '}, - { 'C', 0x80000000, 3, 'l'}, - { 'C', 0xa0000000, 4, 'r'}, - { 'C', 0xb0000000, 5, 'i'}, - { 'C', 0xb8000000, 5, 'e'}, - { 'C', 0xc0000000, 3, 'h'}, - { 'C', 0xe0000000, 4, 'a'}, - { 'C', 0xf0000000, 6, 'u'}, - { 'C', 0xf4000000, 6, 'B'}, - { 'C', 0xf8000000, 7, 'y'}, - { 'C', 0xfa800000, 11, '4'}, - { 'C', 0xfc000000, 7, '!'}, - { 'C', 0xfe000000, 9, STOP}, - { 'C', 0xfea00000, 11, 'D'}, - { 'C', 0xfec00000, 10, 'I'}, - { 'C', 0xff000000, 9, 'S'}, - { 'D', 0x00000000, 3, 'r'}, - { 'D', 0x28400000, 10, 'h'}, - { 'D', 0x29800000, 9, '&'}, - { 'D', 0x2a000000, 7, 'J'}, - { 'D', 0x2c000000, 6, ' '}, - { 'D', 0x30000000, 7, 'y'}, - { 'D', 0x32000000, 9, '\''}, - { 'D', 0x32a00000, 11, 'N'}, - { 'D', 0x38000000, 5, 'u'}, - { 'D', 0x40000000, 2, 'o'}, - { 'D', 0x80000000, 2, 'a'}, - { 'D', 0xc0000000, 3, 'e'}, - { 'D', 0xe0000000, 3, 'i'}, - { 'E', 0x00000000, 2, 'm'}, - { 'E', 0x40000000, 4, 'E'}, - { 'E', 0x50000000, 5, 'F'}, - { 'E', 0x58000000, 6, 'u'}, - { 'E', 0x5d000000, 9, 'g'}, - { 'E', 0x5e000000, 7, 's'}, - { 'E', 0x60000000, 3, 'v'}, - { 'E', 0x80000000, 4, STOP}, - { 'E', 0x90000000, 6, 'r'}, - { 'E', 0x96000000, 8, 'R'}, - { 'E', 0x98000000, 5, 'd'}, - { 'E', 0xa0000000, 3, 'n'}, - { 'E', 0xc6000000, 8, '\''}, - { 'E', 0xc7000000, 8, ' '}, - { 'E', 0xc8000000, 5, 'l'}, - { 'E', 0xd0000000, 4, 'x'}, - { 'E', 0xe0000000, 3, 'a'}, - { 'F', 0x00000000, 2, 'i'}, - { 'F', 0x40000000, 4, 'e'}, - { 'F', 0x50000000, 7, 'A'}, - { 'F', 0x52000000, 8, ' '}, - { 'F', 0x53000000, 9, 'h'}, - { 'F', 0x54000000, 7, 'O'}, - { 'F', 0x57200000, 11, 'I'}, - { 'F', 0x57600000, 11, '1'}, - { 'F', 0x58000000, 5, 'l'}, - { 'F', 0x60000000, 3, 'r'}, - { 'F', 0x80000000, 2, 'a'}, - { 'F', 0xc0000000, 3, 'u'}, - { 'F', 0xe0000000, 3, 'o'}, - { 'G', 0x00000000, 8, ':'}, - { 'G', 0x01300000, 13, ESCAPE}, - { 'G', 0x01400000, 11, 'A'}, - { 'G', 0x01600000, 12, 'T'}, - { 'G', 0x02000000, 7, 'y'}, - { 'G', 0x04000000, 6, 'h'}, - { 'G', 0x08000000, 5, 'u'}, - { 'G', 0x1a800000, 10, 'P'}, - { 'G', 0x1ac00000, 10, ' '}, - { 'G', 0x1b000000, 8, 'C'}, - { 'G', 0x1c000000, 6, 'l'}, - { 'G', 0x20000000, 3, 'M'}, - { 'G', 0x40000000, 3, 'a'}, - { 'G', 0x60000000, 3, 'o'}, - { 'G', 0x80000000, 2, 'r'}, - { 'G', 0xc0000000, 3, 'i'}, - { 'G', 0xe0000000, 3, 'e'}, - { 'H', 0x00000000, 1, 'o'}, - { 'H', 0x80000000, 3, 'a'}, - { 'H', 0xa0000000, 3, 'i'}, - { 'H', 0xc0000000, 3, 'e'}, - { 'H', 0xe0000000, 4, 'u'}, - { 'H', 0xf0000000, 5, 'R'}, - { 'H', 0xfe200000, 14, ESCAPE}, - { 'H', 0xfe280000, 13, 'D'}, - { 'H', 0xff000000, 9, 'S'}, - { 'I', 0x00000000, 1, 'T'}, - { 'I', 0x80000000, 3, 's'}, - { 'I', 0xa0000000, 3, 'n'}, - { 'I', 0xc0000000, 6, 'I'}, - { 'I', 0xc4000000, 6, STOP}, - { 'I', 0xc8000000, 5, ' '}, - { 'I', 0xd0000000, 4, 't'}, - { 'I', 0xe4000000, 6, 'm'}, - { 'I', 0xe8000000, 5, '\''}, - { 'I', 0xf0000000, 8, 'a'}, - { 'I', 0xf6900000, 13, ','}, - { 'I', 0xf6980000, 13, 'A'}, - { 'I', 0xf6c00000, 11, 'f'}, - { 'I', 0xf6e00000, 12, 'o'}, - { 'I', 0xf7000000, 9, 'c'}, - { 'I', 0xf7800000, 11, 'l'}, - { 'I', 0xf7a80000, 13, 'g'}, - { 'I', 0xf7d40000, 14, 'b'}, - { 'I', 0xf8000000, 5, 'r'}, - { 'J', 0x00000000, 2, 'a'}, - { 'J', 0x40000000, 2, 'u'}, - { 'J', 0x80000000, 5, ' '}, - { 'J', 0x8c800000, 9, 's'}, - { 'J', 0x8d900000, 12, 'D'}, - { 'J', 0x90000000, 4, 'i'}, - { 'J', 0xa0000000, 3, 'o'}, - { 'J', 0xc0000000, 2, 'e'}, - { 'K', 0x00000000, 4, 'a'}, - { 'K', 0x10000000, 8, STOP}, - { 'K', 0x18000000, 5, 'r'}, - { 'K', 0x20000000, 3, 'e'}, - { 'K', 0x40000000, 2, 'i'}, - { 'K', 0x80000000, 4, 'o'}, - { 'K', 0x92800000, 9, 'w'}, - { 'K', 0x93000000, 8, 'G'}, - { 'K', 0x98000000, 6, 'n'}, - { 'K', 0xa0000000, 3, ' '}, - { 'K', 0xc0000000, 2, 'y'}, - { 'L', 0x00000000, 2, 'a'}, - { 'L', 0x40000000, 3, 'e'}, - { 'L', 0x60000000, 7, 'l'}, - { 'L', 0x63000000, 8, 'y'}, - { 'L', 0x68000000, 5, 'K'}, - { 'L', 0x70000000, 4, 'u'}, - { 'L', 0x80000000, 2, 'o'}, - { 'L', 0xc0000000, 2, 'i'}, - { 'M', 0x00000000, 3, 'e'}, - { 'M', 0x20000000, 4, 'T'}, - { 'M', 0x30000000, 5, STOP}, - { 'M', 0x38200000, 11, 'h'}, - { 'M', 0x38c00000, 10, ' '}, - { 'M', 0x39000000, 8, 'r'}, - { 'M', 0x3a000000, 8, 'E'}, - { 'M', 0x3b000000, 10, '1'}, - { 'M', 0x3c000000, 6, 'c'}, - { 'M', 0x40000000, 2, 'a'}, - { 'M', 0x80000000, 2, 'o'}, - { 'M', 0xc0000000, 4, 'y'}, - { 'M', 0xd0000000, 4, 'u'}, - { 'M', 0xe0000000, 3, 'i'}, - { 'N', 0x00000000, 2, 'o'}, - { 'N', 0x45400000, 12, 'M'}, - { 'N', 0x45c00000, 11, 'A'}, - { 'N', 0x48000000, 5, 'u'}, - { 'N', 0x50000000, 4, 'a'}, - { 'N', 0x60000000, 3, 'i'}, - { 'N', 0x80000000, 1, 'e'}, - { 'O', 0x00000000, 3, '\''}, - { 'O', 0x30000000, 4, 'l'}, - { 'O', 0x40000000, 3, 'f'}, - { 'O', 0x60800000, 9, 'g'}, - { 'O', 0x62000000, 8, 'x'}, - { 'O', 0x64000000, 6, 'S'}, - { 'O', 0x68000000, 5, 'r'}, - { 'O', 0x70000000, 5, 'd'}, - { 'O', 0x7c000000, 6, 'b'}, - { 'O', 0x80000000, 5, 'p'}, - { 'O', 0x8a800000, 9, 'a'}, - { 'O', 0x8c000000, 6, 'v'}, - { 'O', 0x90000000, 4, 'm'}, - { 'O', 0xa8000000, 6, 'w'}, - { 'O', 0xac000000, 6, 'U'}, - { 'O', 0xb0000000, 5, STOP}, - { 'O', 0xbe000000, 8, 's'}, - { 'O', 0xc0000000, 3, 'u'}, - { 'O', 0xe0000000, 3, 'n'}, - { 'P', 0x00000000, 3, 'e'}, - { 'P', 0x20000000, 3, 'a'}, - { 'P', 0x40000000, 2, 'r'}, - { 'P', 0x80000000, 2, 'l'}, - { 'P', 0xc0000000, 6, 'D'}, - { 'P', 0xc4000000, 6, 'u'}, - { 'P', 0xc8000000, 8, ' '}, - { 'P', 0xc9800000, 9, 'M'}, - { 'P', 0xcb800000, 11, ':'}, - { 'P', 0xcbc60000, 15, ESCAPE}, - { 'P', 0xcbe80000, 13, 'G'}, - { 'P', 0xcc000000, 6, 'h'}, - { 'P', 0xd0000000, 4, 'i'}, - { 'P', 0xe0000000, 3, 'o'}, - { 'Q', 0x68000000, 5, 'C'}, - { 'Q', 0x80000000, 1, 'u'}, - { 'R', 0x00000000, 2, 'a'}, - { 'R', 0x40000000, 2, 'o'}, - { 'R', 0x80000000, 3, 'i'}, - { 'R', 0xa4540000, 15, ESCAPE}, - { 'R', 0xa4600000, 12, ' '}, - { 'R', 0xa4c00000, 10, 'n'}, - { 'R', 0xa6000000, 7, STOP}, - { 'R', 0xa8000000, 5, 'E'}, - { 'R', 0xb0000000, 4, 'u'}, - { 'R', 0xc0000000, 2, 'e'}, - { 'S', 0x00000000, 5, 'n'}, - { 'S', 0x0a000000, 7, 'A'}, - { 'S', 0x0c000000, 6, 'w'}, - { 'S', 0x10000000, 4, 'a'}, - { 'S', 0x20000000, 3, 'o'}, - { 'S', 0x40000000, 3, 'p'}, - { 'S', 0x60000000, 3, 'u'}, - { 'S', 0x80000000, 8, 'O'}, - { 'S', 0x81000000, 9, 'y'}, - { 'S', 0x83000000, 8, ' '}, - { 'S', 0x84000000, 7, 'l'}, - { 'S', 0x86000000, 9, 'E'}, - { 'S', 0x86800000, 11, 'g'}, - { 'S', 0x88000000, 5, 'i'}, - { 'S', 0x90000000, 4, 'e'}, - { 'S', 0xa0000000, 6, 'm'}, - { 'S', 0xa4000000, 7, 'q'}, - { 'S', 0xa8000000, 5, 'k'}, - { 'S', 0xb0000000, 4, 'c'}, - { 'S', 0xc0000000, 3, 'h'}, - { 'S', 0xe0000000, 3, 't'}, - { 'T', 0x00000000, 1, 'h'}, - { 'T', 0x80000000, 4, 'e'}, - { 'T', 0x90000000, 4, 'r'}, - { 'T', 0xa0000000, 3, 'o'}, - { 'T', 0xc0000000, 5, 'a'}, - { 'T', 0xc83e1600, 24, '-'}, - { 'T', 0xc9000000, 8, 'y'}, - { 'T', 0xcb800000, 9, '4'}, - { 'T', 0xcc000000, 6, 'i'}, - { 'T', 0xd0000000, 5, 'w'}, - { 'T', 0xd9000000, 10, ' '}, - { 'T', 0xdc000000, 8, 'u'}, - { 'T', 0xdd000000, 8, 'W'}, - { 'T', 0xde000000, 7, 'H'}, - { 'T', 0xe0000000, 3, 'V'}, - { 'U', 0x00000000, 1, 'n'}, - { 'U', 0x80000000, 2, 'p'}, - { 'U', 0xc0000000, 5, 'R'}, - { 'U', 0xc8800000, 9, 'r'}, - { 'U', 0xce000000, 8, 'E'}, - { 'U', 0xd0000000, 4, 'K'}, - { 'U', 0xe0000000, 5, 'S'}, - { 'U', 0xec000000, 6, 's'}, - { 'U', 0xf0000000, 4, 'l'}, - { 'V', 0x20000000, 4, 'e'}, - { 'V', 0x30000000, 4, 'a'}, - { 'V', 0x50000000, 7, '\''}, - { 'V', 0x52000000, 7, '4'}, - { 'V', 0x58000000, 10, 's'}, - { 'V', 0x58e00000, 14, ESCAPE}, - { 'V', 0x5a000000, 7, 'o'}, - { 'V', 0x5c000000, 8, STOP}, - { 'V', 0x60000000, 3, 'i'}, - { 'V', 0x80000000, 1, ' '}, - { 'W', 0x10000000, 5, 'O'}, - { 'W', 0x18000000, 5, 'r'}, - { 'W', 0x20000000, 3, 'h'}, - { 'W', 0x40000000, 2, 'o'}, - { 'W', 0x80000000, 3, 'a'}, - { 'W', 0xa0000000, 3, 'i'}, - { 'W', 0xc0000000, 2, 'e'}, - { 'X', 0x80000000, 2, ' '}, - { 'X', 0xc0000000, 2, 't'}, - { 'Y', 0x40000000, 2, 'e'}, - { 'Y', 0x80000000, 1, 'o'}, - { 'Z', 0x00000000, 2, 'a'}, - { 'Z', 0x70000000, 5, 'e'}, - { 'Z', 0x7e000000, 8, STOP}, - { 'Z', 0x80000000, 1, 'o'}, - { '\'', 0x00000000, 3, 'm'}, - { '\'', 0x20000000, 4, 't'}, - { '\'', 0x30000000, 4, ' '}, - { '\'', 0x40000000, 3, 'C'}, - { '\'', 0x60000000, 5, 'd'}, - { '\'', 0x68000000, 8, 'G'}, - { '\'', 0x69700000, 13, 'K'}, - { '\'', 0x6c000000, 6, 'r'}, - { '\'', 0x70000000, 5, 'v'}, - { '\'', 0x79000000, 8, 'l'}, - { '\'', 0x7a400000, 10, STOP}, - { '\'', 0x7b800000, 13, '0'}, - { '\'', 0x7b880000, 14, ESCAPE}, - { '\'', 0x80000000, 1, 's'}, - { 'a', 0x00000000, 7, 'e'}, - { 'a', 0x02000000, 7, '\''}, - { 'a', 0x04000000, 10, '!'}, - { 'a', 0x04600000, 11, 'a'}, - { 'a', 0x04800000, 9, ':'}, - { 'a', 0x05000000, 8, 'f'}, - { 'a', 0x06000000, 7, 'w'}, - { 'a', 0x08000000, 6, 'b'}, - { 'a', 0x0c000000, 8, STOP}, - { 'a', 0x10000000, 4, 'm'}, - { 'a', 0x20000000, 3, 'r'}, - { 'a', 0x40000000, 4, 'c'}, - { 'a', 0x50000000, 10, 'o'}, - { 'a', 0x50400000, 10, 'x'}, - { 'a', 0x50900000, 13, 'j'}, - { 'a', 0x50e00000, 11, ','}, - { 'a', 0x51000000, 8, 'h'}, - { 'a', 0x52000000, 7, 'u'}, - { 'a', 0x54000000, 7, 'z'}, - { 'a', 0x56000000, 7, 'v'}, - { 'a', 0x58000000, 6, 'p'}, - { 'a', 0x5c000000, 6, 'g'}, - { 'a', 0x60000000, 3, 't'}, - { 'a', 0x80000000, 3, 'l'}, - { 'a', 0xa0000000, 4, 's'}, - { 'a', 0xb0000000, 5, ' '}, - { 'a', 0xb8000000, 5, 'd'}, - { 'a', 0xb8000000, 5, 'd'}, - { 'a', 0xc0000000, 3, 'n'}, - { 'a', 0xe0000000, 4, 'y'}, - { 'a', 0xf0000000, 5, 'i'}, - { 'a', 0xf8000000, 5, 'k'}, - { 'b', 0x00000000, 3, 'r'}, - { 'b', 0x20000000, 3, 'o'}, - { 'b', 0x40000000, 3, 'e'}, - { 'b', 0x60000000, 3, 'a'}, - { 'b', 0x80000000, 3, 'i'}, - { 'b', 0xa0000000, 6, 'h'}, - { 'b', 0xa4000000, 7, ':'}, - { 'b', 0xa6400000, 10, 't'}, - { 'b', 0xa8000000, 5, 's'}, - { 'b', 0xb0000000, 4, 'u'}, - { 'b', 0xc0000000, 4, 'y'}, - { 'b', 0xd0000000, 4, 'l'}, - { 'b', 0xe0000000, 5, 'b'}, - { 'b', 0xe8000000, 5, STOP}, - { 'b', 0xf0000000, 4, ' '}, - { 'c', 0x00000000, 2, 'k'}, - { 'c', 0x40000000, 3, 'o'}, - { 'c', 0x60000000, 6, 'l'}, - { 'c', 0x64000000, 6, 'y'}, - { 'c', 0x68000000, 6, 's'}, - { 'c', 0x6c000000, 6, STOP}, - { 'c', 0x70000000, 4, 'r'}, - { 'c', 0x80000000, 3, 'h'}, - { 'c', 0xa0000000, 5, ' '}, - { 'c', 0xa8000000, 7, 'c'}, - { 'c', 0xaa000000, 8, ':'}, - { 'c', 0xac500000, 12, '\''}, - { 'c', 0xac600000, 11, 'A'}, - { 'c', 0xac800000, 9, 'D'}, - { 'c', 0xad400000, 11, 'q'}, - { 'c', 0xad680000, 13, 'I'}, - { 'c', 0xae000000, 7, 'u'}, - { 'c', 0xb0000000, 5, 'i'}, - { 'c', 0xb8000000, 5, 'a'}, - { 'c', 0xc0000000, 3, 't'}, - { 'c', 0xe0000000, 3, 'e'}, - { 'd', 0x00000000, 5, 'o'}, - { 'd', 0x08000000, 7, '\''}, - { 'd', 0x0a000000, 8, ':'}, - { 'd', 0x0b000000, 8, 'h'}, - { 'd', 0x0c000000, 6, 'u'}, - { 'd', 0x10000000, 4, 'y'}, - { 'd', 0x20000000, 3, 'e'}, - { 'd', 0x40000000, 4, 'i'}, - { 'd', 0x50000000, 5, 'd'}, - { 'd', 0x58000000, 6, 'r'}, - { 'd', 0x5c000000, 6, 'l'}, - { 'd', 0x60000000, 4, 's'}, - { 'd', 0x70000000, 8, 'c'}, - { 'd', 0x71c00000, 10, 'm'}, - { 'd', 0x72000000, 8, 'n'}, - { 'd', 0x73000000, 8, 'w'}, - { 'd', 0x74000000, 6, 'v'}, - { 'd', 0x78000000, 6, 'g'}, - { 'd', 0x7c000000, 9, '!'}, - { 'd', 0x7c800000, 9, '-'}, - { 'd', 0x7d000000, 9, 'f'}, - { 'd', 0x7d800000, 10, ','}, - { 'd', 0x7dc00000, 11, 't'}, - { 'd', 0x7de00000, 11, 'b'}, - { 'd', 0x7e000000, 7, '.'}, - { 'd', 0x80000000, 3, STOP}, - { 'd', 0xa0000000, 3, 'a'}, - { 'd', 0xc0000000, 2, ' '}, - { 'e', 0x00000000, 3, 's'}, - { 'e', 0x20000000, 4, 't'}, - { 'e', 0x30000000, 8, 'g'}, - { 'e', 0x31000000, 8, 'f'}, - { 'e', 0x32000000, 8, 'x'}, - { 'e', 0x33000000, 10, 'P'}, - { 'e', 0x33400000, 10, 'B'}, - { 'e', 0x33800000, 9, 'h'}, - { 'e', 0x34000000, 7, 'i'}, - { 'e', 0x36000000, 7, 'p'}, - { 'e', 0x38000000, 6, 'm'}, - { 'e', 0x3c000000, 7, 'b'}, - { 'e', 0x3e000000, 8, 'k'}, - { 'e', 0x3f000000, 8, ':'}, - { 'e', 0x40000000, 2, ' '}, - { 'e', 0x80000000, 5, 'l'}, - { 'e', 0x88000000, 6, 'c'}, - { 'e', 0x8c000000, 6, 'd'}, - { 'e', 0x90000000, 4, 'n'}, - { 'e', 0xa0000000, 3, 'r'}, - { 'e', 0xc0000000, 8, STOP}, - { 'e', 0xd0000000, 7, 'v'}, - { 'e', 0xd2000000, 10, ','}, - { 'e', 0xd2400000, 11, '4'}, - { 'e', 0xd2600000, 11, '?'}, - { 'e', 0xd2800000, 9, '.'}, - { 'e', 0xd3000000, 8, 'o'}, - { 'e', 0xd4000000, 8, '\''}, - { 'e', 0xd5000000, 10, 'V'}, - { 'e', 0xd5400000, 10, 'z'}, - { 'e', 0xd5820000, 15, 'G'}, - { 'e', 0xd5840000, 14, 'q'}, - { 'e', 0xd5880000, 13, '!'}, - { 'e', 0xd5900000, 12, '-'}, - { 'e', 0xd5a00000, 11, 'u'}, - { 'e', 0xd5c00000, 10, 'j'}, - { 'e', 0xd6000000, 7, 'y'}, - { 'e', 0xd8000000, 5, 'e'}, - { 'e', 0xe0000000, 4, 'a'}, - { 'e', 0xf0000000, 4, 'w'}, - { 'f', 0x00000000, 1, ' '}, - { 'f', 0x80000000, 5, '.'}, - { 'f', 0x88000000, 6, STOP}, - { 'f', 0x8cb00000, 12, 's'}, - { 'f', 0x8d000000, 8, 'y'}, - { 'f', 0x8e700000, 12, ':'}, - { 'f', 0x8f000000, 8, 'u'}, - { 'f', 0x90000000, 4, 't'}, - { 'f', 0xa0000000, 3, 'o'}, - { 'f', 0xc0000000, 4, 'a'}, - { 'f', 0xd0000000, 4, 'i'}, - { 'f', 0xe0000000, 5, 'r'}, - { 'f', 0xe8000000, 5, 'f'}, - { 'f', 0xf0000000, 4, 'e'}, - { 'g', 0x00000000, 2, 'h'}, - { 'g', 0x40000000, 8, STOP}, - { 'g', 0x60000000, 3, 'e'}, - { 'g', 0x80000000, 2, ' '}, - { 'g', 0xc0000000, 4, 'i'}, - { 'g', 0xd0000000, 6, 's'}, - { 'g', 0xd5000000, 10, '.'}, - { 'g', 0xd5800000, 10, '\''}, - { 'g', 0xd5c00000, 10, 't'}, - { 'g', 0xd6000000, 7, 'b'}, - { 'g', 0xd8000000, 7, 'g'}, - { 'g', 0xda000000, 7, 'o'}, - { 'g', 0xdc000000, 6, 'l'}, - { 'g', 0xe0000000, 5, ':'}, - { 'g', 0xe8000000, 5, 'r'}, - { 'g', 0xf1000000, 11, 'w'}, - { 'g', 0xf1300000, 12, 'm'}, - { 'g', 0xf1400000, 10, 'y'}, - { 'g', 0xf1800000, 9, 'd'}, - { 'g', 0xf2000000, 7, 'n'}, - { 'g', 0xf4000000, 6, 'u'}, - { 'g', 0xf8000000, 5, 'a'}, - { 'h', 0x00000000, 1, 'e'}, - { 'h', 0x80000000, 6, 'b'}, - { 'h', 0x84000000, 6, 'u'}, - { 'h', 0x88000000, 8, 'w'}, - { 'h', 0x89000000, 8, 'd'}, - { 'h', 0x8a000000, 8, 'n'}, - { 'h', 0x8b000000, 8, 'y'}, - { 'h', 0x8d000000, 8, 'l'}, - { 'h', 0x8e000000, 9, '\''}, - { 'h', 0x8e800000, 10, 's'}, - { 'h', 0x8ec00000, 11, 'm'}, - { 'h', 0x8ee80000, 14, 'c'}, - { 'h', 0x8eee0000, 16, 'g'}, - { 'h', 0x8eef0000, 17, '-'}, - { 'h', 0x8f000000, 8, '.'}, - { 'h', 0x90000000, 4, 'i'}, - { 'h', 0xa0000000, 3, 'o'}, - { 'h', 0xc0000000, 4, 'a'}, - { 'h', 0xd0000000, 5, 'r'}, - { 'h', 0xd8000000, 8, STOP}, - { 'h', 0xe0000000, 4, ' '}, - { 'h', 0xf0000000, 4, 't'}, - { 'i', 0x00000000, 3, 'c'}, - { 'i', 0x20000000, 6, 'p'}, - { 'i', 0x24060000, 15, 'j'}, - { 'i', 0x24200000, 11, 'h'}, - { 'i', 0x24400000, 11, ':'}, - { 'i', 0x24600000, 11, 'w'}, - { 'i', 0x26000000, 8, 'x'}, - { 'i', 0x27000000, 10, 'u'}, - { 'i', 0x28000000, 5, 'a'}, - { 'i', 0x30000000, 5, 'v'}, - { 'i', 0x38000000, 6, ' '}, - { 'i', 0x3c000000, 7, 'z'}, - { 'i', 0x3e000000, 8, STOP}, - { 'i', 0x40000000, 2, 'n'}, - { 'i', 0x80000000, 5, 'r'}, - { 'i', 0x88000000, 5, 'd'}, - { 'i', 0x90000000, 4, 'o'}, - { 'i', 0xa0000000, 4, 'l'}, - { 'i', 0xb0000000, 5, 'm'}, - { 'i', 0xb8000000, 7, 'b'}, - { 'i', 0xba000000, 7, 'k'}, - { 'i', 0xbc000000, 6, 'f'}, - { 'i', 0xc0000000, 4, 'g'}, - { 'i', 0xd0000000, 4, 's'}, - { 'i', 0xe0000000, 4, 't'}, - { 'i', 0xf0000000, 4, 'e'}, - { 'j', 0x00000000, 1, 'y'}, - { 'j', 0x84000000, 6, 'i'}, - { 'j', 0x88000000, 5, 'u'}, - { 'j', 0x90000000, 4, 'a'}, - { 'j', 0xa0000000, 3, 'e'}, - { 'k', 0x00000000, 2, ' '}, - { 'k', 0x40000000, 3, 'i'}, - { 'k', 0x60000000, 4, 'y'}, - { 'k', 0x70000000, 4, 's'}, - { 'k', 0x80000000, 2, 'e'}, - { 'k', 0xc0000000, 8, STOP}, - { 'k', 0xe0000000, 8, '\''}, - { 'k', 0xe1000000, 11, 'b'}, - { 'k', 0xe1800000, 9, 'w'}, - { 'k', 0xe2000000, 7, ':'}, - { 'k', 0xe4000000, 6, 'a'}, - { 'k', 0xe8000000, 6, 'l'}, - { 'k', 0xec000000, 7, 'k'}, - { 'k', 0xee000000, 9, 'o'}, - { 'k', 0xeea00000, 12, '?'}, - { 'k', 0xeeb80000, 13, 't'}, - { 'k', 0xeee00000, 11, 'n'}, - { 'k', 0xf0000000, 4, 'f'}, - { 'l', 0x00000000, 3, 'l'}, - { 'l', 0x20000000, 5, 'u'}, - { 'l', 0x28000000, 6, 't'}, - { 'l', 0x2c000000, 6, 'm'}, - { 'l', 0x30000000, 4, 'y'}, - { 'l', 0x40000000, 2, 'e'}, - { 'l', 0x80000000, 8, STOP}, - { 'l', 0x90000000, 4, 'd'}, - { 'l', 0xa0000000, 3, 'a'}, - { 'l', 0xc0000000, 4, 'o'}, - { 'l', 0xd0000000, 5, 's'}, - { 'l', 0xd8000000, 8, 'f'}, - { 'l', 0xd9000000, 11, 'z'}, - { 'l', 0xd9400000, 10, '.'}, - { 'l', 0xd9800000, 9, 'v'}, - { 'l', 0xda000000, 7, 'k'}, - { 'l', 0xdc000000, 8, 'b'}, - { 'l', 0xdd000000, 9, ':'}, - { 'l', 0xdd800000, 10, 'w'}, - { 'l', 0xddc00000, 13, 'g'}, - { 'l', 0xdddb0000, 16, '?'}, - { 'l', 0xde000000, 8, '\''}, - { 'l', 0xdf000000, 8, 'c'}, - { 'l', 0xe0000000, 4, 'i'}, - { 'l', 0xf0000000, 4, ' '}, - { 'm', 0x00000000, 4, 'i'}, - { 'm', 0x10000000, 8, STOP}, - { 'm', 0x20000000, 3, 'm'}, - { 'm', 0x40000000, 4, 'y'}, - { 'm', 0x50000000, 5, 'b'}, - { 'm', 0x5a000000, 8, ':'}, - { 'm', 0x5b000000, 9, 'h'}, - { 'm', 0x5b800000, 13, ESCAPE}, - { 'm', 0x5ba00000, 11, '.'}, - { 'm', 0x5bc00000, 10, '\''}, - { 'm', 0x5c000000, 7, 'f'}, - { 'm', 0x5f000000, 9, 'w'}, - { 'm', 0x5f800000, 10, 'r'}, - { 'm', 0x5fc00000, 10, 'u'}, - { 'm', 0x60000000, 3, ' '}, - { 'm', 0x80000000, 2, 'e'}, - { 'm', 0xc0000000, 5, 'o'}, - { 'm', 0xc8000000, 6, 'n'}, - { 'm', 0xcc000000, 6, 's'}, - { 'm', 0xd0000000, 4, 'p'}, - { 'm', 0xe0000000, 3, 'a'}, - { 'n', 0x00000000, 3, 'i'}, - { 'n', 0x20000000, 7, 'r'}, - { 'n', 0x22000000, 8, 'v'}, - { 'n', 0x23000000, 10, '!'}, - { 'n', 0x23600000, 12, 'B'}, - { 'n', 0x23800000, 9, ','}, - { 'n', 0x24000000, 8, '-'}, - { 'n', 0x25000000, 8, '.'}, - { 'n', 0x26000000, 7, 'f'}, - { 'n', 0x28000000, 6, 'y'}, - { 'n', 0x2c000000, 7, 'u'}, - { 'n', 0x2e000000, 7, 'j'}, - { 'n', 0x30000000, 4, 'a'}, - { 'n', 0x40000000, 4, 's'}, - { 'n', 0x50000000, 6, '\''}, - { 'n', 0x54000000, 6, 'k'}, - { 'n', 0x58000000, 8, 'l'}, - { 'n', 0x59000000, 12, 'w'}, - { 'n', 0x59140000, 14, 'p'}, - { 'n', 0x59180000, 13, 'q'}, - { 'n', 0x59400000, 11, 'h'}, - { 'n', 0x59600000, 11, 'b'}, - { 'n', 0x59800000, 9, 'm'}, - { 'n', 0x5a000000, 8, 'x'}, - { 'n', 0x5b000000, 8, ':'}, - { 'n', 0x5c000000, 6, 'o'}, - { 'n', 0x60000000, 4, 'e'}, - { 'n', 0x70000000, 5, 'c'}, - { 'n', 0x78000000, 5, 'n'}, - { 'n', 0x80000000, 3, 'g'}, - { 'n', 0xa0000000, 3, ' '}, - { 'n', 0xc0000000, 3, 'd'}, - { 'n', 0xe0000000, 8, STOP}, - { 'n', 0xf0000000, 4, 't'}, - { 'o', 0x00000000, 2, 'r'}, - { 'o', 0x40000000, 4, 'f'}, - { 'o', 0x50000000, 4, ' '}, - { 'o', 0x60000000, 4, 'w'}, - { 'o', 0x70000000, 6, 'a'}, - { 'o', 0x74000000, 6, 'b'}, - { 'o', 0x78000000, 5, 't'}, - { 'o', 0x80000000, 4, 'o'}, - { 'o', 0x90000000, 5, 'c'}, - { 'o', 0x98000000, 6, 'y'}, - { 'o', 0x9c000000, 8, STOP}, - { 'o', 0xa0000000, 5, 'p'}, - { 'o', 0xa8000000, 5, 'd'}, - { 'o', 0xb0000000, 4, 'u'}, - { 'o', 0xc0000000, 3, 'n'}, - { 'o', 0xe0000000, 5, 'm'}, - { 'o', 0xe8000000, 6, 's'}, - { 'o', 0xec000000, 6, 'k'}, - { 'o', 0xf0000000, 5, 'l'}, - { 'o', 0xf8180000, 14, ','}, - { 'o', 0xf8200000, 11, '?'}, - { 'o', 0xf8400000, 11, ':'}, - { 'o', 0xf8600000, 12, '.'}, - { 'o', 0xf8800000, 9, 'h'}, - { 'o', 0xf9000000, 9, '!'}, - { 'o', 0xf9800000, 10, '\''}, - { 'o', 0xf9c00000, 11, 'z'}, - { 'o', 0xf9e00000, 11, 'x'}, - { 'o', 0xfa000000, 7, 'v'}, - { 'o', 0xfc000000, 7, 'g'}, - { 'o', 0xfe000000, 9, 'e'}, - { 'o', 0xfe800000, 9, 'j'}, - { 'o', 0xff000000, 8, 'i'}, - { 'p', 0x00000000, 2, 'e'}, - { 'p', 0x40000000, 8, STOP}, - { 'p', 0x60000000, 4, 's'}, - { 'p', 0x70000000, 5, 'l'}, - { 'p', 0x78000000, 5, 'r'}, - { 'p', 0x80000000, 3, 'i'}, - { 'p', 0xa0000000, 4, ' '}, - { 'p', 0xb0000000, 5, 'h'}, - { 'p', 0xb8000000, 6, 't'}, - { 'p', 0xbc000000, 6, '\''}, - { 'p', 0xc0000000, 3, 'o'}, - { 'p', 0xe0000000, 4, 'p'}, - { 'p', 0xf0000000, 5, 'a'}, - { 'p', 0xf8000000, 7, 'd'}, - { 'p', 0xfa000000, 7, 'm'}, - { 'p', 0xfc000000, 7, 'y'}, - { 'p', 0xfe000000, 10, '?'}, - { 'p', 0xfe600000, 11, '.'}, - { 'p', 0xff000000, 10, 'w'}, - { 'p', 0xff400000, 10, 'u'}, - { 'p', 0xff800000, 9, '!'}, - { 'q', 0x10000000, 4, '\''}, - { 'q', 0x40000000, 8, STOP}, - { 'q', 0x80000000, 1, 'u'}, - { 'r', 0x00000000, 3, ' '}, - { 'r', 0x20000000, 7, '\''}, - { 'r', 0x22000000, 8, 'f'}, - { 'r', 0x23000000, 8, '.'}, - { 'r', 0x24000000, 6, 'k'}, - { 'r', 0x28000000, 6, 'r'}, - { 'r', 0x2c000000, 6, 'm'}, - { 'r', 0x30000000, 4, 'y'}, - { 'r', 0x40000000, 4, 'd'}, - { 'r', 0x50000000, 9, ','}, - { 'r', 0x50800000, 9, 'p'}, - { 'r', 0x51000000, 8, 'b'}, - { 'r', 0x52000000, 7, 'c'}, - { 'r', 0x54000000, 6, 'u'}, - { 'r', 0x58000000, 5, 'n'}, - { 'r', 0x60000000, 3, 'i'}, - { 'r', 0x80000000, 4, 's'}, - { 'r', 0x90000000, 4, 't'}, - { 'r', 0xa0000000, 3, 'e'}, - { 'r', 0xc0000000, 4, 'a'}, - { 'r', 0xd0000000, 4, STOP}, - { 'r', 0xe0000000, 8, 'v'}, - { 'r', 0xe1000000, 9, 'w'}, - { 'r', 0xe1800000, 11, '-'}, - { 'r', 0xe1a00000, 12, 'h'}, - { 'r', 0xe1c00000, 10, 'j'}, - { 'r', 0xe2000000, 7, ':'}, - { 'r', 0xe4000000, 6, 'g'}, - { 'r', 0xe8000000, 5, 'l'}, - { 'r', 0xf0000000, 4, 'o'}, - { 's', 0x00000000, 4, 's'}, - { 's', 0x10000000, 7, '.'}, - { 's', 0x12000000, 7, '!'}, - { 's', 0x14000000, 8, ','}, - { 's', 0x15000000, 8, 'f'}, - { 's', 0x16000000, 7, 'y'}, - { 's', 0x20000000, 4, 'i'}, - { 's', 0x30000000, 4, 'h'}, - { 's', 0x40000000, 7, 'p'}, - { 's', 0x42000000, 11, '?'}, - { 's', 0x42200000, 11, 'w'}, - { 's', 0x42400000, 10, 'm'}, - { 's', 0x42800000, 9, 'k'}, - { 's', 0x43000000, 8, '\''}, - { 's', 0x44000000, 6, 'o'}, - { 's', 0x48000000, 7, 'a'}, - { 's', 0x4a000000, 9, 'd'}, - { 's', 0x4a800000, 11, 'g'}, - { 's', 0x4aa00000, 12, 'q'}, - { 's', 0x4ac00000, 10, 'b'}, - { 's', 0x4b000000, 8, 'n'}, - { 's', 0x4c000000, 6, 'c'}, - { 's', 0x50000000, 5, 'e'}, - { 's', 0x58000000, 6, ':'}, - { 's', 0x5c000000, 8, 'l'}, - { 's', 0x5d000000, 8, 'r'}, - { 's', 0x5e000000, 7, 'u'}, - { 's', 0x60000000, 3, 't'}, - { 's', 0x80000000, 2, ' '}, - { 's', 0xc0000000, 2, STOP}, - { 't', 0x00000000, 3, 'i'}, - { 't', 0x20000000, 4, 'a'}, - { 't', 0x30000000, 7, '\''}, - { 't', 0x32000000, 8, 'w'}, - { 't', 0x33000000, 9, '?'}, - { 't', 0x33c00000, 11, '-'}, - { 't', 0x33e00000, 11, ','}, - { 't', 0x34000000, 7, ':'}, - { 't', 0x36000000, 8, '!'}, - { 't', 0x37000000, 9, 'n'}, - { 't', 0x37800000, 10, 'd'}, - { 't', 0x38000000, 5, 't'}, - { 't', 0x40000000, 4, 'r'}, - { 't', 0x50000000, 5, 'y'}, - { 't', 0x58000000, 6, 'm'}, - { 't', 0x5c000000, 8, '.'}, - { 't', 0x5d000000, 8, 'b'}, - { 't', 0x5e000000, 8, 'E'}, - { 't', 0x60000000, 8, STOP}, - { 't', 0x80000000, 3, ' '}, - { 't', 0xa0000000, 4, 's'}, - { 't', 0xb0000000, 4, 'o'}, - { 't', 0xc0000000, 5, 'u'}, - { 't', 0xc8000000, 6, 'c'}, - { 't', 0xcc000000, 6, 'l'}, - { 't', 0xd0000000, 4, 'e'}, - { 't', 0xe0000000, 3, 'h'}, - { 'u', 0x00000000, 2, 'r'}, - { 'u', 0x40000000, 4, 'e'}, - { 'u', 0x50000000, 4, 'm'}, - { 'u', 0x60000000, 5, 'c'}, - { 'u', 0x68000000, 5, 'g'}, - { 'u', 0x70000000, 5, 'b'}, - { 'u', 0x78000000, 6, STOP}, - { 'u', 0x7e800000, 10, 'f'}, - { 'u', 0x7f000000, 8, '\''}, - { 'u', 0x80000000, 3, 's'}, - { 'u', 0xa0000000, 5, 'p'}, - { 'u', 0xa8000000, 5, 'i'}, - { 'u', 0xb0000000, 5, 'l'}, - { 'u', 0xb8000000, 6, 'y'}, - { 'u', 0xbc000000, 7, ' '}, - { 'u', 0xbf000000, 10, 'w'}, - { 'u', 0xbf400000, 12, 'v'}, - { 'u', 0xbf500000, 12, 'x'}, - { 'u', 0xbf600000, 13, 'j'}, - { 'u', 0xc0000000, 4, 't'}, - { 'u', 0xd0000000, 5, 'd'}, - { 'u', 0xd8000000, 5, 'a'}, - { 'u', 0xe0000000, 3, 'n'}, - { 'v', 0x00000000, 5, '.'}, - { 'v', 0x08000000, 7, 'y'}, - { 'v', 0x0a000000, 10, ESCAPE}, - { 'v', 0x0b000000, 8, 's'}, - { 'v', 0x10000000, 4, 'o'}, - { 'v', 0x20000000, 3, 'a'}, - { 'v', 0x40000000, 2, 'i'}, - { 'v', 0x80000000, 1, 'e'}, - { 'w', 0x00000000, 1, 's'}, - { 'w', 0x80000000, 3, ' '}, - { 'w', 0xa0000000, 5, 'a'}, - { 'w', 0xa8000000, 8, 'm'}, - { 'w', 0xa9800000, 9, 'b'}, - { 'w', 0xaa000000, 9, 'k'}, - { 'w', 0xaa800000, 9, 'r'}, - { 'w', 0xab000000, 8, 'd'}, - { 'w', 0xac000000, 11, 'c'}, - { 'w', 0xac200000, 11, 'f'}, - { 'w', 0xacc00000, 10, 'h'}, - { 'w', 0xad000000, 8, 'l'}, - { 'w', 0xae000000, 7, 'y'}, - { 'w', 0xb0000000, 4, 'i'}, - { 'w', 0xc0000000, 3, STOP}, - { 'w', 0xe0000000, 4, 'o'}, - { 'w', 0xf0000000, 5, 'n'}, - { 'w', 0xf8000000, 5, 'e'}, - { 'x', 0x00000000, 2, 'p'}, - { 'x', 0x40000000, 5, 'o'}, - { 'x', 0x48000000, 6, 'e'}, - { 'x', 0x4e000000, 7, 'f'}, - { 'x', 0x50000000, 5, 'c'}, - { 'x', 0x58000000, 6, 'y'}, - { 'x', 0x5c800000, 9, 'a'}, - { 'x', 0x5d000000, 12, ESCAPE}, - { 'x', 0x5d400000, 10, '\''}, - { 'x', 0x60000000, 4, STOP}, - { 'x', 0x70000000, 5, 'i'}, - { 'x', 0x80000000, 2, ' '}, - { 'x', 0xc0000000, 2, 't'}, - { 'y', 0x00000000, 1, ' '}, - { 'y', 0x80000000, 8, 'i'}, - { 'y', 0x81800000, 9, 'f'}, - { 'y', 0x82000000, 7, 'n'}, - { 'y', 0x84000000, 7, 't'}, - { 'y', 0x86000000, 8, ','}, - { 'y', 0x87000000, 8, 'p'}, - { 'y', 0x88000000, 5, 'o'}, - { 'y', 0x90000000, 5, 's'}, - { 'y', 0x98000000, 6, 'd'}, - { 'y', 0x9c000000, 8, 'm'}, - { 'y', 0x9d000000, 9, 'r'}, - { 'y', 0x9d800000, 9, 'g'}, - { 'y', 0x9e000000, 8, 'c'}, - { 'y', 0x9f500000, 13, 'v'}, - { 'y', 0x9f5c0000, 15, 'h'}, - { 'y', 0xa0000000, 5, 'a'}, - { 'y', 0xa8000000, 7, '\''}, - { 'y', 0xaa000000, 7, 'b'}, - { 'y', 0xac000000, 8, 'w'}, - { 'y', 0xad000000, 8, 'e'}, - { 'y', 0xae000000, 7, '.'}, - { 'y', 0xb0000000, 5, 'l'}, - { 'y', 0xb8000000, 5, ':'}, - { 'y', 0xc0000000, 8, STOP}, - { 'z', 0x00000000, 2, 'z'}, - { 'z', 0x40000000, 2, STOP}, - { 'z', 0x80000000, 4, 'y'}, - { 'z', 0x90000000, 4, 'e'}, - { 'z', 0xa0000000, 3, 'i'}, - { 'z', 0xd0000000, 4, ' '}, - { 'z', 0xe0000000, 4, 'l'}, - { 'z', 0xf0000000, 5, 'a'}, - { 'z', 0xf8000000, 6, 'o'}, - { 'z', 0xfc000000, 8, 'm'} -}; - - -/* - * This table was derived from on-air transmissions. It certainly has omissions and - * almost certainly contains errors. Use entirely at your own risk. - */ - -static struct hufftab fsat_huffman2[] = -{ - { START, 0x00000000, 5, 'H'}, - { START, 0x08000000, 6, 'O'}, - { START, 0x0c000000, 7, 'K'}, - { START, 0x0e000000, 8, '2'}, - { START, 0x0f000000, 9, 'Q'}, - { START, 0x0f800000, 10, '9'}, - { START, 0x0fc00000, 10, '8'}, - { START, 0x10000000, 4, 'J'}, - { START, 0x20000000, 5, 'I'}, - { START, 0x28000000, 5, 'R'}, - { START, 0x30000000, 4, 'D'}, - { START, 0x40000000, 3, 'A'}, - { START, 0x62000000, 8, 'U'}, - { START, 0x63000000, 8, '('}, - { START, 0x64000000, 6, '['}, - { START, 0x68000000, 5, 'F'}, - { START, 0x70000000, 5, '.'}, - { START, 0x78000000, 5, 'W'}, - { START, 0x80000000, 3, 'C'}, - { START, 0xa0000000, 4, 'S'}, - { START, 0xb0000000, 8, '1'}, - { START, 0xb1000000, 9, '3'}, - { START, 0xb1800000, 10, '6'}, - { START, 0xb1c00000, 10, '5'}, - { START, 0xb2000000, 10, 'Z'}, - { START, 0xb2400000, 10, '7'}, - { START, 0xb2800000, 10, '4'}, - { START, 0xb2f00000, 12, ' '}, - { START, 0xb3000000, 8, 'V'}, - { START, 0xb4000000, 6, 'L'}, - { START, 0xb8000000, 5, 'M'}, - { START, 0xc0000000, 5, 'B'}, - { START, 0xc8000000, 5, 'P'}, - { START, 0xd0000000, 7, 'Y'}, - { START, 0xd2000000, 7, 'G'}, - { START, 0xd4000000, 6, 'E'}, - { START, 0xd8000000, 5, 'N'}, - { START, 0xe0000000, 3, 'T'}, - { ' ', 0x00000000, 6, 'A'}, - { ' ', 0x04000000, 8, 'k'}, - { ' ', 0x05000000, 8, 'O'}, - { ' ', 0x06000000, 7, 'v'}, - { ' ', 0x08000000, 7, 'G'}, - { ' ', 0x0a000000, 7, 'N'}, - { ' ', 0x0c000000, 6, 'M'}, - { ' ', 0x10000000, 4, 'o'}, - { ' ', 0x20000000, 4, 's'}, - { ' ', 0x30000000, 5, 'd'}, - { ' ', 0x38000000, 10, '3'}, - { ' ', 0x38400000, 10, '8'}, - { ' ', 0x38800000, 10, '6'}, - { ' ', 0x38c00000, 11, '0'}, - { ' ', 0x38e60000, 15, '$'}, - { ' ', 0x38f00000, 12, 'X'}, - { ' ', 0x39000000, 9, 'q'}, - { ' ', 0x39800000, 9, 'U'}, - { ' ', 0x3a000000, 7, 'y'}, - { ' ', 0x3c000000, 6, 'e'}, - { ' ', 0x40000000, 3, 'a'}, - { ' ', 0x60000000, 5, '['}, - { ' ', 0x68000000, 8, '-'}, - { ' ', 0x69000000, 9, 'V'}, - { ' ', 0x69800000, 11, '\''}, - { ' ', 0x69a00000, 11, '9'}, - { ' ', 0x69c00000, 10, '5'}, - { ' ', 0x6a000000, 7, 'H'}, - { ' ', 0x6c000000, 9, 'Y'}, - { ' ', 0x6c800000, 9, ' '}, - { ' ', 0x6d000000, 8, '1'}, - { ' ', 0x6e000000, 7, 'L'}, - { ' ', 0x70000000, 6, 'B'}, - { ' ', 0x74000000, 6, 'C'}, - { ' ', 0x78000000, 5, 'p'}, - { ' ', 0x80000000, 3, 't'}, - { ' ', 0xa0000000, 6, 'T'}, - { ' ', 0xa4000000, 7, 'J'}, - { ' ', 0xa6000000, 7, 'F'}, - { ' ', 0xa8000000, 5, 'b'}, - { ' ', 0xb0000000, 10, '('}, - { ' ', 0xb0400000, 11, 'Z'}, - { ' ', 0xb0600000, 13, ESCAPE}, - { ' ', 0xb0680000, 13, '.'}, - { ' ', 0xb0700000, 13, '&'}, - { ' ', 0xb0780000, 14, '"'}, - { ' ', 0xb07c0000, 14, 'z'}, - { ' ', 0xb0800000, 9, '2'}, - { ' ', 0xb1000000, 8, 'K'}, - { ' ', 0xb2000000, 7, 'R'}, - { ' ', 0xb4000000, 6, 'S'}, - { ' ', 0xb8000000, 6, 'g'}, - { ' ', 0xbc000000, 7, 'u'}, - { ' ', 0xbe000000, 8, 'j'}, - { ' ', 0xbf000000, 10, STOP}, - { ' ', 0xbf800000, 10, '7'}, - { ' ', 0xbfc00000, 11, '4'}, - { ' ', 0xbfe00000, 11, 'Q'}, - { ' ', 0xc0000000, 6, 'r'}, - { ' ', 0xc4000000, 7, 'D'}, - { ' ', 0xc6000000, 7, 'W'}, - { ' ', 0xc8000000, 5, 'c'}, - { ' ', 0xd0000000, 5, 'h'}, - { ' ', 0xd8000000, 6, 'n'}, - { ' ', 0xdc000000, 6, 'l'}, - { ' ', 0xe0000000, 5, 'w'}, - { ' ', 0xe8000000, 5, 'i'}, - { ' ', 0xf0000000, 8, 'I'}, - { ' ', 0xf1000000, 8, 'E'}, - { ' ', 0xf2000000, 7, 'P'}, - { ' ', 0xf4000000, 6, 'm'}, - { ' ', 0xf8000000, 5, 'f'}, - { '!', 0x00000000, 4, ':'}, - { '!', 0x11c00000, 10, '?'}, - { '!', 0x40000000, 2, STOP}, - { '!', 0x80000000, 1, ' '}, - { '"', 0x20000000, 3, '.'}, - { '"', 0x90000000, 6, 'm'}, - { '"', 0x9e000000, 8, 'P'}, - { '"', 0x9f000000, 10, ESCAPE}, - { '"', 0xac000000, 6, 'I'}, - { '"', 0xb0000000, 7, 'c'}, - { '"', 0xb4000000, 8, 'r'}, - { '"', 0xc0000000, 2, ' '}, - { '$', 0x00000000, 1, '1'}, - { '$', 0xb0000000, 4, '2'}, - { '$', 0xde000000, 9, '3'}, - { '%', 0x80000000, 1, ' '}, - { '&', 0x00000000, 4, 'E'}, - { '&', 0x16000000, 9, ESCAPE}, - { '&', 0x18000000, 6, 'A'}, - { '&', 0x20000000, 3, 'B'}, - { '&', 0x40000000, 2, 'w'}, - { '&', 0x80000000, 1, ' '}, - { '(', 0x00000000, 3, 'P'}, - { '(', 0x23000000, 8, 'E'}, - { '(', 0x24000000, 6, 'a'}, - { '(', 0x28000000, 6, 'S'}, - { '(', 0x2c000000, 7, 'D'}, - { '(', 0x2e000000, 8, 'W'}, - { '(', 0x2f000000, 10, '4'}, - { '(', 0x30000000, 6, 'R'}, - { '(', 0x34800000, 10, '3'}, - { '(', 0x35a00000, 13, ESCAPE}, - { '(', 0x35a80000, 13, 'u'}, - { '(', 0x35b00000, 12, 'O'}, - { '(', 0x36000000, 7, 'K'}, - { '(', 0x38000000, 5, 'T'}, - { '(', 0x40000000, 2, '1'}, - { '(', 0x80000000, 4, '2'}, - { '(', 0x9c000000, 6, 'e'}, - { '(', 0xa0000000, 3, 't'}, - { '(', 0xc2000000, 9, 'w'}, - { '(', 0xc2800000, 9, 'B'}, - { '(', 0xc3000000, 8, 'g'}, - { '(', 0xc4000000, 7, 'G'}, - { '(', 0xc8000000, 7, 'M'}, - { '(', 0xca000000, 7, 'H'}, - { '(', 0xcc000000, 7, 'C'}, - { '(', 0xd0000000, 4, '5'}, - { '(', 0xe0000000, 4, 'N'}, - { '(', 0xf0000000, 6, 'J'}, - { '(', 0xf4000000, 6, 'A'}, - { ')', 0x00000000, 1, ' '}, - { ')', 0x80000000, 5, ':'}, - { ')', 0x8c000000, 6, ';'}, - { ')', 0x90000000, 4, ','}, - { ')', 0xc0000000, 2, '.'}, - { '+', 0x40000000, 2, ' '}, - { ',', 0x20000000, 3, '0'}, - { ',', 0x40000000, 2, 'S'}, - { ',', 0x80000000, 1, ' '}, - { '-', 0x00000000, 2, ' '}, - { '-', 0x40000000, 4, 't'}, - { '-', 0x50000000, 4, 'b'}, - { '-', 0x60000000, 4, 'w'}, - { '-', 0x70000000, 4, 'u'}, - { '-', 0x80000000, 5, 'c'}, - { '-', 0x88000000, 6, '9'}, - { '-', 0x8c000000, 7, 'S'}, - { '-', 0x8e000000, 8, 'C'}, - { '-', 0x8f000000, 10, 'F'}, - { '-', 0x8f480000, 13, '0'}, - { '-', 0x8f600000, 11, 'K'}, - { '-', 0x8f800000, 9, 'H'}, - { '-', 0x90000000, 4, 'o'}, - { '-', 0xa0000000, 4, 's'}, - { '-', 0xb0000000, 4, 'f'}, - { '-', 0xc0000000, 6, 'h'}, - { '-', 0xc4000000, 9, 'A'}, - { '-', 0xc4800000, 10, 'j'}, - { '-', 0xc4c00000, 10, 'P'}, - { '-', 0xc5000000, 8, 'W'}, - { '-', 0xc6000000, 9, '6'}, - { '-', 0xc6800000, 9, 'B'}, - { '-', 0xc7000000, 8, 'g'}, - { '-', 0xc8000000, 6, '1'}, - { '-', 0xcc000000, 6, 'y'}, - { '-', 0xd0000000, 7, 'e'}, - { '-', 0xd2000000, 7, 'i'}, - { '-', 0xd4000000, 6, 'r'}, - { '-', 0xd8000000, 5, 'l'}, - { '-', 0xe0000000, 6, 'a'}, - { '-', 0xe4000000, 11, 'v'}, - { '-', 0xe4200000, 11, 'Z'}, - { '-', 0xe4800000, 10, '5'}, - { '-', 0xe4c00000, 10, 'T'}, - { '-', 0xe5000000, 8, 'J'}, - { '-', 0xe6000000, 8, 'D'}, - { '-', 0xe7000000, 16, '\''}, - { '-', 0xe7080000, 14, '3'}, - { '-', 0xe70c0000, 14, '8'}, - { '-', 0xe7400000, 10, 'I'}, - { '-', 0xe7800000, 9, 'M'}, - { '-', 0xe8000000, 5, 'd'}, - { '-', 0xf0000000, 6, 'm'}, - { '-', 0xf4000000, 9, 'E'}, - { '-', 0xf4800000, 9, 'L'}, - { '-', 0xf5000000, 8, '2'}, - { '-', 0xf6000000, 7, 'n'}, - { '-', 0xf8000000, 6, 'p'}, - { '-', 0xfc000000, 8, '7'}, - { '-', 0xfd000000, 9, 'U'}, - { '-', 0xfd800000, 9, 'k'}, - { '-', 0xfe000000, 8, 'G'}, - { '-', 0xff000000, 8, 'O'}, - { '.', 0x00000000, 7, 'a'}, - { '.', 0x02000000, 7, '['}, - { '.', 0x04000000, 6, 'u'}, - { '.', 0x08000000, 8, '4'}, - { '.', 0x09000000, 10, 'N'}, - { '.', 0x09400000, 12, 'E'}, - { '.', 0x09500000, 12, ':'}, - { '.', 0x09600000, 15, '?'}, - { '.', 0x09700000, 13, 'K'}, - { '.', 0x09780000, 13, 'Y'}, - { '.', 0x09800000, 10, 't'}, - { '.', 0x0a000000, 9, '5'}, - { '.', 0x0b000000, 11, 'r'}, - { '.', 0x0b300000, 14, '"'}, - { '.', 0x0b360000, 17, 'd'}, - { '.', 0x0b368000, 18, ESCAPE}, - { '.', 0x0b370000, 16, 'k'}, - { '.', 0x0b380000, 13, 'O'}, - { '.', 0x0b400000, 10, 'R'}, - { '.', 0x0c000000, 9, 'T'}, - { '.', 0x0d000000, 9, 'M'}, - { '.', 0x0dc00000, 10, 'P'}, - { '.', 0x0e000000, 8, 'H'}, - { '.', 0x0f000000, 9, 'C'}, - { '.', 0x0f800000, 9, '2'}, - { '.', 0x10000000, 5, 'i'}, - { '.', 0x18000000, 8, 'S'}, - { '.', 0x19000000, 8, 'W'}, - { '.', 0x1a000000, 7, '3'}, - { '.', 0x1c000000, 8, 'o'}, - { '.', 0x1d800000, 9, 'D'}, - { '.', 0x1e000000, 8, '1'}, - { '.', 0x1f000000, 9, 'B'}, - { '.', 0x1f800000, 12, '\''}, - { '.', 0x1f980000, 13, '('}, - { '.', 0x1fa00000, 11, 'G'}, - { '.', 0x1fc00000, 10, 'I'}, - { '.', 0x20000000, 5, '0'}, - { '.', 0x28000000, 5, 'c'}, - { '.', 0x30000000, 4, '.'}, - { '.', 0x40000000, 4, STOP}, - { '.', 0x80000000, 1, ' '}, - { '/', 0x00000000, 4, '5'}, - { '/', 0x10000000, 5, 'T'}, - { '/', 0x20000000, 4, '8'}, - { '/', 0x30000000, 5, 'B'}, - { '/', 0x38000000, 5, '2'}, - { '/', 0x45e80000, 13, 'c'}, - { '/', 0x54800000, 9, 'U'}, - { '/', 0x80000000, 7, 'F'}, - { '/', 0x82000000, 11, 'v'}, - { '/', 0x82400000, 10, 'J'}, - { '/', 0x82a00000, 12, 'l'}, - { '/', 0x82c00000, 10, '9'}, - { '/', 0x83000000, 8, 'm'}, - { '/', 0x84000000, 7, 's'}, - { '/', 0x86000000, 7, 'M'}, - { '/', 0x88000000, 5, '3'}, - { '/', 0x90000000, 5, '7'}, - { '/', 0x98000000, 7, 'H'}, - { '/', 0x9a000000, 8, 'W'}, - { '/', 0x9b000000, 9, 'L'}, - { '/', 0x9b800000, 12, 'V'}, - { '/', 0x9b900000, 14, ESCAPE}, - { '/', 0x9c000000, 7, 'D'}, - { '/', 0x9e000000, 7, 'A'}, - { '/', 0xa0000000, 5, '6'}, - { '/', 0xa8000000, 8, 'G'}, - { '/', 0xaa000000, 7, 'S'}, - { '/', 0xac000000, 8, 'd'}, - { '/', 0xae000000, 8, 'N'}, - { '/', 0xaf800000, 9, 'I'}, - { '/', 0xb0000000, 5, 'a'}, - { '/', 0xb8000000, 9, 'E'}, - { '/', 0xb8800000, 9, 'R'}, - { '/', 0xb9000000, 8, 'C'}, - { '/', 0xba000000, 9, 'K'}, - { '/', 0xbb000000, 8, 'P'}, - { '/', 0xbc000000, 6, '4'}, - { '/', 0xc0000000, 3, '1'}, - { '0', 0x00000000, 1, '0'}, - { '0', 0x80000000, 6, '4'}, - { '0', 0x84000000, 6, 't'}, - { '0', 0x88000000, 5, 's'}, - { '0', 0x90000000, 4, 'a'}, - { '0', 0xa0000000, 7, '3'}, - { '0', 0xa2000000, 7, '7'}, - { '0', 0xa4000000, 6, '5'}, - { '0', 0xa8000000, 8, ')'}, - { '0', 0xa9000000, 8, '/'}, - { '0', 0xaa000000, 7, ']'}, - { '0', 0xac000000, 7, '-'}, - { '0', 0xae000000, 7, '1'}, - { '0', 0xb0000000, 4, 'p'}, - { '0', 0xc0000000, 5, '.'}, - { '0', 0xc8000000, 5, '8'}, - { '0', 0xd0000000, 6, '6'}, - { '0', 0xd4000000, 8, STOP}, - { '0', 0xd5000000, 8, '9'}, - { '0', 0xd6000000, 9, '%'}, - { '0', 0xd6800000, 10, ':'}, - { '0', 0xd6e80000, 14, 'k'}, - { '0', 0xd6f00000, 12, 'm'}, - { '0', 0xd7000000, 8, '2'}, - { '0', 0xd8000000, 5, ','}, - { '0', 0xe0000000, 3, ' '}, - { '1', 0x00000000, 2, '9'}, - { '1', 0x40000000, 5, '6'}, - { '1', 0x48000000, 5, '8'}, - { '1', 0x50000000, 4, ' '}, - { '1', 0x60000000, 7, STOP}, - { '1', 0x62000000, 7, '-'}, - { '1', 0x64000000, 6, '7'}, - { '1', 0x68000000, 5, '/'}, - { '1', 0x70000000, 4, '2'}, - { '1', 0x80000000, 3, '1'}, - { '1', 0xa0000000, 5, ']'}, - { '1', 0xa8000000, 7, ')'}, - { '1', 0xaa000000, 8, '\''}, - { '1', 0xab000000, 9, 'X'}, - { '1', 0xabc00000, 11, 't'}, - { '1', 0xabe00000, 11, 'R'}, - { '1', 0xac000000, 7, ':'}, - { '1', 0xae000000, 7, 's'}, - { '1', 0xb0000000, 4, '.'}, - { '1', 0xc0000000, 4, '5'}, - { '1', 0xd0000000, 5, '3'}, - { '1', 0xd8000000, 6, '4'}, - { '1', 0xdc000000, 7, ','}, - { '1', 0xde000000, 7, 'x'}, - { '1', 0xe0000000, 3, '0'}, - { '2', 0x00000000, 3, ' '}, - { '2', 0x20000000, 5, ']'}, - { '2', 0x30000000, 4, '/'}, - { '2', 0x40000000, 3, '.'}, - { '2', 0x60000000, 6, '6'}, - { '2', 0x64000000, 6, '2'}, - { '2', 0x68000000, 5, '1'}, - { '2', 0x70000000, 6, ':'}, - { '2', 0x74000000, 6, '-'}, - { '2', 0x79000000, 8, '3'}, - { '2', 0x7a000000, 8, 't'}, - { '2', 0x7c000000, 6, ')'}, - { '2', 0x80000000, 3, '5'}, - { '2', 0xa2000000, 8, 'n'}, - { '2', 0xa3000000, 9, 'a'}, - { '2', 0xa3800000, 10, '\''}, - { '2', 0xa3d00000, 13, '"'}, - { '2', 0xa3de0000, 15, 'L'}, - { '2', 0xa4000000, 7, '8'}, - { '2', 0xa6000000, 7, '9'}, - { '2', 0xa8000000, 5, '4'}, - { '2', 0xb0000000, 4, ','}, - { '2', 0xc0000000, 2, '0'}, - { '3', 0x00000000, 2, ' '}, - { '3', 0x40000000, 5, '2'}, - { '3', 0x4cda0000, 15, 'm'}, - { '3', 0x50000000, 5, ')'}, - { '3', 0x58000000, 6, 'D'}, - { '3', 0x5c000000, 7, '7'}, - { '3', 0x5e000000, 7, '3'}, - { '3', 0x60000000, 5, ':'}, - { '3', 0x68000000, 6, '4'}, - { '3', 0x70000000, 5, '-'}, - { '3', 0x78980000, 14, ESCAPE}, - { '3', 0x7a000000, 7, '6'}, - { '3', 0x7c000000, 6, '5'}, - { '3', 0x80000000, 2, '0'}, - { '3', 0xc0000000, 3, '.'}, - { '3', 0xe0000000, 4, '/'}, - { '3', 0xf0000000, 6, ','}, - { '3', 0xf4000000, 8, '8'}, - { '3', 0xf5000000, 9, '9'}, - { '3', 0xf5800000, 10, 'r'}, - { '3', 0xf6000000, 7, 't'}, - { '3', 0xf8000000, 5, ']'}, - { '4', 0x00000000, 3, '4'}, - { '4', 0x20000000, 4, '/'}, - { '4', 0x30000000, 5, '1'}, - { '4', 0x38000000, 6, '2'}, - { '4', 0x3c000000, 7, ':'}, - { '4', 0x40000000, 2, ' '}, - { '4', 0x80000000, 3, '.'}, - { '4', 0xa0000000, 4, '5'}, - { '4', 0xb0000000, 4, '-'}, - { '4', 0xc0000000, 3, '0'}, - { '4', 0xe0000000, 7, 't'}, - { '4', 0xe2000000, 7, '3'}, - { '4', 0xe4000000, 6, '8'}, - { '4', 0xe8000000, 5, ']'}, - { '4', 0xf0000000, 5, ','}, - { '4', 0xf8000000, 6, ')'}, - { '4', 0xfc000000, 10, '9'}, - { '4', 0xfc800000, 10, '7'}, - { '4', 0xfce40000, 15, ESCAPE}, - { '4', 0xfd000000, 8, '6'}, - { '5', 0x00000000, 2, '0'}, - { '5', 0x40000000, 3, '.'}, - { '5', 0x60000000, 5, '/'}, - { '5', 0x68000000, 6, '3'}, - { '5', 0x6c000000, 7, ':'}, - { '5', 0x6e000000, 8, '4'}, - { '5', 0x6f200000, 11, ';'}, - { '5', 0x6f440000, 14, 'f'}, - { '5', 0x6fc00000, 10, '1'}, - { '5', 0x70000000, 4, 'p'}, - { '5', 0x80000000, 2, ' '}, - { '5', 0xc0000000, 4, '5'}, - { '5', 0xd0000000, 5, 'a'}, - { '5', 0xd8000000, 5, '-'}, - { '5', 0xe0000000, 7, ')'}, - { '5', 0xe6000000, 7, ','}, - { '5', 0xe8000000, 5, '6'}, - { '5', 0xf0000000, 6, '2'}, - { '5', 0xf4000000, 7, '7'}, - { '5', 0xf6000000, 7, '9'}, - { '5', 0xf8000000, 6, '8'}, - { '5', 0xfc000000, 6, ']'}, - { '6', 0x00000000, 2, ' '}, - { '6', 0x40000000, 7, '6'}, - { '6', 0x44000000, 6, '-'}, - { '6', 0x48000000, 5, '1'}, - { '6', 0x50000000, 4, ']'}, - { '6', 0x60000000, 5, '7'}, - { '6', 0x68000000, 6, '5'}, - { '6', 0x6c000000, 6, '4'}, - { '6', 0x70000000, 5, ')'}, - { '6', 0x78000000, 7, '3'}, - { '6', 0x7a000000, 7, '2'}, - { '6', 0x7c000000, 6, '8'}, - { '6', 0x80000000, 2, '.'}, - { '6', 0xc0000000, 5, ','}, - { '6', 0xc8000000, 5, ':'}, - { '6', 0xd0000000, 5, '/'}, - { '6', 0xd9fc0000, 15, ESCAPE}, - { '6', 0xda000000, 7, '9'}, - { '6', 0xdc000000, 6, 't'}, - { '6', 0xe0000000, 3, '0'}, - { '7', 0x00000000, 4, '8'}, - { '7', 0x10000000, 8, STOP}, - { '7', 0x11200000, 13, ESCAPE}, - { '7', 0x11d00000, 12, '?'}, - { '7', 0x12000000, 7, '3'}, - { '7', 0x14000000, 6, '6'}, - { '7', 0x18000000, 6, '2'}, - { '7', 0x1c000000, 6, '1'}, - { '7', 0x20000000, 3, ' '}, - { '7', 0x40000000, 4, '7'}, - { '7', 0x50000000, 5, '/'}, - { '7', 0x58000000, 8, ':'}, - { '7', 0x59000000, 8, 'p'}, - { '7', 0x5a000000, 7, ','}, - { '7', 0x5c000000, 6, 't'}, - { '7', 0x60000000, 3, '0'}, - { '7', 0x80000000, 6, '9'}, - { '7', 0x84000000, 7, 'a'}, - { '7', 0x86000000, 7, '4'}, - { '7', 0x88000000, 6, ')'}, - { '7', 0x90000000, 4, ']'}, - { '7', 0xa0000000, 3, '-'}, - { '7', 0xc0000000, 2, '.'}, - { '8', 0x00000000, 3, '4'}, - { '8', 0x20000000, 5, '/'}, - { '8', 0x28000000, 7, ':'}, - { '8', 0x2a000000, 7, ','}, - { '8', 0x2c000000, 8, 'p'}, - { '8', 0x2d000000, 8, '-'}, - { '8', 0x2e100000, 12, '\''}, - { '8', 0x2e800000, 9, STOP}, - { '8', 0x2f000000, 8, 'a'}, - { '8', 0x30000000, 4, '0'}, - { '8', 0x40000000, 2, ' '}, - { '8', 0x80000000, 4, '9'}, - { '8', 0x90000000, 4, '7'}, - { '8', 0xa0000000, 5, '3'}, - { '8', 0xa8000000, 6, ')'}, - { '8', 0xad000000, 8, '2'}, - { '8', 0xae000000, 7, 't'}, - { '8', 0xb0000000, 4, '8'}, - { '8', 0xc0000000, 3, '.'}, - { '8', 0xe0000000, 4, '1'}, - { '8', 0xf0000000, 5, '5'}, - { '8', 0xf8000000, 6, '6'}, - { '8', 0xfc000000, 6, ']'}, - { '9', 0x00000000, 3, '5'}, - { '9', 0x20000000, 3, ']'}, - { '9', 0x40000000, 5, '2'}, - { '9', 0x48000000, 6, '1'}, - { '9', 0x4c000000, 6, '/'}, - { '9', 0x50000000, 4, '0'}, - { '9', 0x60000000, 4, '.'}, - { '9', 0x70000000, 4, '-'}, - { '9', 0x80000000, 4, '4'}, - { '9', 0x90000000, 4, '8'}, - { '9', 0xa0000000, 5, '3'}, - { '9', 0xa8000000, 6, 't'}, - { '9', 0xac000000, 8, ':'}, - { '9', 0xad000000, 9, ','}, - { '9', 0xadd80000, 15, ESCAPE}, - { '9', 0xae000000, 7, ')'}, - { '9', 0xb0000000, 4, '6'}, - { '9', 0xc0000000, 4, ' '}, - { '9', 0xd0000000, 4, '7'}, - { '9', 0xe0000000, 3, '9'}, - { ':', 0x40000000, 2, '0'}, - { ':', 0x80000000, 1, ' '}, - { ';', 0x80000000, 1, ' '}, - { '=', 0x80000000, 1, ESCAPE}, - { '?', 0x00000000, 3, ':'}, - { '?', 0x20000000, 5, '!'}, - { '?', 0x28000000, 6, ';'}, - { '?', 0x2c000000, 7, '\''}, - { '?', 0x40000000, 2, STOP}, - { '?', 0x80000000, 1, ' '}, - { '@', 0xd0000000, 4, 'b'}, - { 'A', 0x00000000, 4, 's'}, - { 'A', 0x10000000, 4, 'm'}, - { 'A', 0x20000000, 4, 'd'}, - { 'A', 0x30000000, 5, 'c'}, - { 'A', 0x38000000, 10, 'C'}, - { 'A', 0x38400000, 11, 'P'}, - { 'A', 0x38700000, 12, 'K'}, - { 'A', 0x38800000, 10, ','}, - { 'A', 0x38c00000, 11, '-'}, - { 'A', 0x39c80000, 13, 'W'}, - { 'A', 0x39d00000, 12, 'M'}, - { 'A', 0x39ef8000, 18, ESCAPE}, - { 'A', 0x39f00000, 12, 'Y'}, - { 'A', 0x3ac00000, 11, 'A'}, - { 'A', 0x38f00000, 12, '&'}, - { 'A', 0x39000000, 9, 'h'}, - { 'A', 0x39800000, 10, 'y'}, - { 'A', 0x3a000000, 9, '.'}, - { 'A', 0x3a800000, 10, 'S'}, - { 'A', 0x3b000000, 10, 'k'}, - { 'A', 0x3b400000, 10, 'T'}, - { 'A', 0x3b800000, 9, 'B'}, - { 'A', 0x3c000000, 6, 'b'}, - { 'A', 0x40000000, 2, ' '}, - { 'A', 0x80000000, 4, 'r'}, - { 'A', 0x90000000, 5, 'u'}, - { 'A', 0x98100000, 13, '\''}, - { 'A', 0x98180000, 13, ':'}, - { 'A', 0x98800000, 10, 'F'}, - { 'A', 0x98c00000, 10, 'z'}, - { 'A', 0x99000000, 8, 'v'}, - { 'A', 0x9a000000, 9, 'q'}, - { 'A', 0x9aa00000, 11, 'x'}, - { 'A', 0x9ac00000, 10, 'a'}, - { 'A', 0x9b000000, 8, 'p'}, - { 'A', 0x9c000000, 6, 't'}, - { 'A', 0xa0000000, 5, 'g'}, - { 'A', 0xa8000000, 7, 'w'}, - { 'A', 0xaa000000, 7, 'i'}, - { 'A', 0xac000000, 6, 'f'}, - { 'A', 0xb0000000, 4, 'l'}, - { 'A', 0xc0000000, 3, 'D'}, - { 'A', 0xe0000000, 3, 'n'}, - { 'B', 0x00000000, 2, 'C'}, - { 'B', 0x40000000, 3, 'a'}, - { 'B', 0x60000000, 8, 'T'}, - { 'B', 0x61000000, 8, '.'}, - { 'B', 0x62000000, 9, 'A'}, - { 'B', 0x62800000, 10, 'O'}, - { 'B', 0x62e80000, 15, '-'}, - { 'B', 0x62f00000, 12, 'W'}, - { 'B', 0x63000000, 8, 'y'}, - { 'B', 0x64000000, 8, 'I'}, - { 'B', 0x65000000, 11, '&'}, - { 'B', 0x65600000, 11, 'M'}, - { 'B', 0x65940000, 15, 'S'}, - { 'B', 0x65960000, 15, 'F'}, - { 'B', 0x65a00000, 12, ','}, - { 'B', 0x65b00000, 12, '1'}, - { 'B', 0x65e00000, 12, ESCAPE}, - { 'B', 0x65f00000, 12, 'P'}, - { 'B', 0x66000000, 8, 'h'}, - { 'B', 0x67000000, 8, ' '}, - { 'B', 0x68000000, 5, 'l'}, - { 'B', 0x70000000, 4, 'i'}, - { 'B', 0x80000000, 4, 'u'}, - { 'B', 0x90000000, 4, 'o'}, - { 'B', 0xa0000000, 3, 'r'}, - { 'B', 0xc0000000, 3, 'e'}, - { 'B', 0xe0000000, 3, 'B'}, - { 'C', 0x00000000, 2, 'h'}, - { 'C', 0x40000000, 5, '\''}, - { 'C', 0x48000000, 9, 'A'}, - { 'C', 0x48b00000, 13, 'z'}, - { 'C', 0x48b80000, 16, ':'}, - { 'C', 0x48b90000, 17, ESCAPE}, - { 'C', 0x49000000, 8, 'I'}, - { 'C', 0x4a000000, 7, 'y'}, - { 'C', 0x4c000000, 6, 'e'}, - { 'C', 0x50000000, 4, 'r'}, - { 'C', 0x60000000, 3, 'B'}, - { 'C', 0x80000000, 3, 'a'}, - { 'C', 0xa0000000, 4, '.'}, - { 'C', 0xb0400000, 10, 'D'}, - { 'C', 0xb0920000, 15, '7'}, - { 'C', 0xb0b00000, 12, 'H'}, - { 'C', 0xb1000000, 10, 'S'}, - { 'C', 0xb1400000, 10, 'T'}, - { 'C', 0xb1900000, 14, 'P'}, - { 'C', 0xb1a00000, 11, 'J'}, - { 'C', 0xb1c00000, 10, 'G'}, - { 'C', 0xb2000000, 7, ','}, - { 'C', 0xb4000000, 6, 'u'}, - { 'C', 0xb8000000, 5, 'i'}, - { 'C', 0xc0000000, 3, 'o'}, - { 'C', 0xe0000000, 4, ' '}, - { 'C', 0xf0000000, 4, 'l'}, - { 'D', 0x00000000, 2, 'a'}, - { 'D', 0x40000000, 2, ','}, - { 'D', 0x80000000, 3, 'r'}, - { 'D', 0xa0000000, 3, 'o'}, - { 'D', 0xc0000000, 3, 'e'}, - { 'D', 0xe0000000, 4, 'i'}, - { 'D', 0xf0000000, 8, '.'}, - { 'D', 0xf2000000, 7, ' '}, - { 'D', 0xf4140000, 16, 'B'}, - { 'D', 0xf4180000, 14, '9'}, - { 'D', 0xf4200000, 11, 'M'}, - { 'D', 0xf4400000, 11, '&'}, - { 'D', 0xf4600000, 11, 'V'}, - { 'D', 0xf4800000, 10, 'h'}, - { 'D', 0xf4d00000, 12, 's'}, - { 'D', 0xf4e80000, 13, 'j'}, - { 'D', 0xf5000000, 9, 'w'}, - { 'D', 0xf5800000, 9, 'W'}, - { 'D', 0xf6000000, 7, '\''}, - { 'D', 0xf8400000, 11, '-'}, - { 'D', 0xf8600000, 11, 'G'}, - { 'D', 0xf8800000, 9, 'N'}, - { 'D', 0xf9000000, 9, 'C'}, - { 'D', 0xf9c00000, 10, 'I'}, - { 'D', 0xfa000000, 8, 'y'}, - { 'D', 0xfb000000, 12, 'v'}, - { 'D', 0xfb100000, 13, ESCAPE}, - { 'D', 0xfb400000, 10, ':'}, - { 'D', 0xfb800000, 9, 'J'}, - { 'D', 0xfc000000, 6, 'u'}, - { 'E', 0x00000000, 3, 'p'}, - { 'E', 0x20000000, 5, 's'}, - { 'E', 0x28000000, 6, '.'}, - { 'E', 0x2c000000, 6, 'i'}, - { 'E', 0x30000000, 5, 'r'}, - { 'E', 0x38000000, 5, 'u'}, - { 'E', 0x40000000, 3, 'a'}, - { 'E', 0x60000000, 3, 'n'}, - { 'E', 0x80000000, 5, 'E'}, - { 'E', 0x88000000, 5, ' '}, - { 'E', 0x90000000, 4, 'm'}, - { 'E', 0xa0000000, 4, 'x'}, - { 'E', 0xb0000000, 7, 'y'}, - { 'E', 0xb2000000, 7, 't'}, - { 'E', 0xb4000000, 6, ':'}, - { 'E', 0xb8000000, 7, 'g'}, - { 'E', 0xba040000, 14, 'S'}, - { 'E', 0xba160000, 16, ESCAPE}, - { 'E', 0xba400000, 11, 'f'}, - { 'E', 0xba600000, 11, 'o'}, - { 'E', 0xba800000, 10, 'R'}, - { 'E', 0xbac00000, 10, 'F'}, - { 'E', 0xbb000000, 9, 'w'}, - { 'E', 0xbbc00000, 10, 'C'}, - { 'E', 0xbe000000, 9, 'c'}, - { 'E', 0xbea00000, 11, 'e'}, - { 'E', 0xbef00000, 12, '\''}, - { 'E', 0xbf000000, 9, 'b'}, - { 'E', 0xbf800000, 11, 'h'}, - { 'E', 0xbfe00000, 11, 'D'}, - { 'E', 0xc0000000, 3, 'l'}, - { 'E', 0xe0000000, 4, 'v'}, - { 'E', 0xf0000000, 4, 'd'}, - { 'F', 0x00000000, 2, 'o'}, - { 'F', 0x40000000, 3, 'e'}, - { 'F', 0x60000000, 4, 'l'}, - { 'F', 0x70000000, 5, 'u'}, - { 'F', 0x78000000, 7, ' '}, - { 'F', 0x7a000000, 7, 'O'}, - { 'F', 0x7c000000, 10, '.'}, - { 'F', 0x7c900000, 13, 'y'}, - { 'F', 0x7c980000, 13, ','}, - { 'F', 0x7ca00000, 11, 'T'}, - { 'F', 0x7d000000, 8, 'A'}, - { 'F', 0x7ee80000, 14, 'I'}, - { 'F', 0x7ef00000, 12, '1'}, - { 'F', 0x7f000000, 8, 'B'}, - { 'F', 0x80000000, 2, 'r'}, - { 'F', 0xc0000000, 3, 'i'}, - { 'F', 0xe0000000, 3, 'a'}, - { 'G', 0x00000000, 2, 'r'}, - { 'G', 0x40000000, 2, 'a'}, - { 'G', 0x84800000, 11, ';'}, - { 'G', 0x84000000, 9, '-'}, - { 'G', 0x84a00000, 11, ','}, - { 'G', 0x84c00000, 11, 'A'}, - { 'G', 0x86000000, 9, 'C'}, - { 'G', 0x86d60000, 15, '\''}, - { 'G', 0x87000000, 8, 'P'}, - { 'G', 0x88000000, 5, 'n'}, - { 'G', 0x90000000, 4, 'u'}, - { 'G', 0xa0000000, 3, 'o'}, - { 'G', 0xc0000000, 3, 'e'}, - { 'G', 0xe0000000, 7, 'y'}, - { 'G', 0xe2000000, 7, ' '}, - { 'G', 0xe4000000, 10, '.'}, - { 'G', 0xe4400000, 10, 'I'}, - { 'G', 0xe5000000, 8, 'h'}, - { 'G', 0xe6000000, 7, 'w'}, - { 'G', 0xe8000000, 5, 'l'}, - { 'G', 0xf0000000, 4, 'i'}, - { 'H', 0x00000000, 2, 'e'}, - { 'H', 0x40000000, 2, 'a'}, - { 'H', 0x80000000, 2, 'o'}, - { 'H', 0xc0000000, 3, 'i'}, - { 'H', 0xe0000000, 5, 'R'}, - { 'H', 0xea000000, 10, 'S'}, - { 'H', 0xea400000, 10, '.'}, - { 'H', 0xea8c0000, 15, 'D'}, - { 'H', 0xea8e0000, 16, ESCAPE}, - { 'H', 0xeaa00000, 11, 'G'}, - { 'H', 0xeb000000, 8, 'I'}, - { 'H', 0xec000000, 7, 'y'}, - { 'H', 0xee000000, 9, 'Q'}, - { 'H', 0xee800000, 9, 'M'}, - { 'H', 0xef800000, 9, ' '}, - { 'H', 0xf0000000, 4, 'u'}, - { 'I', 0x00000000, 1, 'n'}, - { 'I', 0x80000000, 5, 'T'}, - { 'I', 0x88000000, 6, 'c'}, - { 'I', 0x8d000000, 9, 'P'}, - { 'I', 0x8da00000, 11, '5'}, - { 'I', 0x8e000000, 7, '\''}, - { 'I', 0x90000000, 4, 's'}, - { 'I', 0xa0000000, 8, 'A'}, - { 'I', 0xa1000000, 8, 'v'}, - { 'I', 0xa2000000, 9, 'w'}, - { 'I', 0xa2a00000, 11, '9'}, - { 'I', 0xa2c00000, 10, 'y'}, - { 'I', 0xa3000000, 9, ':'}, - { 'I', 0xa3d00000, 12, ')'}, - { 'I', 0xa4000000, 6, 'm'}, - { 'I', 0xa8000000, 5, 'a'}, - { 'I', 0xb4000000, 6, '.'}, - { 'I', 0xb8000000, 9, 'p'}, - { 'I', 0xb8800000, 11, 'b'}, - { 'I', 0xb8c00000, 11, '-'}, - { 'I', 0xb9000000, 8, 'V'}, - { 'I', 0xba000000, 7, 'l'}, - { 'I', 0xbc000000, 6, 'd'}, - { 'I', 0xc0000000, 3, 't'}, - { 'I', 0xe0000000, 5, ' '}, - { 'I', 0xe8800000, 9, ','}, - { 'I', 0xe9000000, 8, 'f'}, - { 'I', 0xea000000, 10, 'g'}, - { 'I', 0xea400000, 10, 'D'}, - { 'I', 0xea800000, 9, 'Y'}, - { 'I', 0xeb000000, 8, 'o'}, - { 'I', 0xec000000, 6, 'I'}, - { 'I', 0xf0000000, 4, 'r'}, - { 'J', 0x00000000, 2, 'e'}, - { 'J', 0x40000000, 5, ' '}, - { 'J', 0x48c00000, 10, ','}, - { 'J', 0x49000000, 8, 'r'}, - { 'J', 0x4a400000, 10, '-'}, - { 'J', 0x4ac00000, 11, 'n'}, - { 'J', 0x4aec0000, 15, ESCAPE}, - { 'J', 0x4af80000, 13, '\''}, - { 'J', 0x4b000000, 9, 's'}, - { 'J', 0x4b800000, 10, 'K'}, - { 'J', 0x4bc00000, 10, 'T'}, - { 'J', 0x4c000000, 7, 'D'}, - { 'J', 0x4e000000, 7, '.'}, - { 'J', 0x50000000, 4, 'i'}, - { 'J', 0x60000000, 3, 'u'}, - { 'J', 0x80000000, 2, 'a'}, - { 'J', 0xc0000000, 2, 'o'}, - { 'K', 0x00000000, 2, 'i'}, - { 'K', 0x40000000, 2, 'a'}, - { 'K', 0x80000000, 2, 'e'}, - { 'K', 0xc0000000, 5, 'n'}, - { 'K', 0xc8000000, 5, 'o'}, - { 'K', 0xd0000000, 6, '\''}, - { 'K', 0xd4e00000, 12, '-'}, - { 'K', 0xd5000000, 10, 'w'}, - { 'K', 0xd5600000, 12, ':'}, - { 'K', 0xd5800000, 9, 'G'}, - { 'K', 0xd6000000, 7, '.'}, - { 'K', 0xd8000000, 5, 'r'}, - { 'K', 0xe0000000, 6, 'u'}, - { 'K', 0xe4500000, 12, 'S'}, - { 'K', 0xe4800000, 9, ','}, - { 'K', 0xe5000000, 8, 'h'}, - { 'K', 0xe6000000, 7, 'l'}, - { 'K', 0xe8000000, 5, ' '}, - { 'K', 0xf0000000, 4, 'y'}, - { 'L', 0x00000000, 2, 'i'}, - { 'L', 0x40000000, 4, 'u'}, - { 'L', 0x50000000, 6, 'l'}, - { 'L', 0x54000000, 6, 'A'}, - { 'L', 0x58000000, 9, 'I'}, - { 'L', 0x59400000, 10, '\''}, - { 'L', 0x59a00000, 11, '.'}, - { 'L', 0x5a680000, 16, ESCAPE}, - { 'L', 0x5a700000, 12, 'S'}, - { 'L', 0x5c000000, 6, 'y'}, - { 'L', 0x60000000, 3, ']'}, - { 'L', 0x80000000, 2, 'o'}, - { 'L', 0xc0000000, 3, 'e'}, - { 'L', 0xe0000000, 3, 'a'}, - { 'M', 0x00000000, 2, 'o'}, - { 'M', 0x40000000, 9, '1'}, - { 'M', 0x40800000, 10, 'A'}, - { 'M', 0x41000000, 8, 'C'}, - { 'M', 0x42000000, 7, ' '}, - { 'M', 0x44000000, 9, 'h'}, - { 'M', 0x44800000, 10, 'z'}, - { 'M', 0x45000000, 9, 'I'}, - { 'M', 0x45800000, 12, 'R'}, - { 'M', 0x45b60000, 15, '2'}, - { 'M', 0x45b80000, 13, 'D'}, - { 'M', 0x45c00000, 11, '.'}, - { 'M', 0x45f00000, 13, 'E'}, - { 'M', 0x45fc0000, 14, 'w'}, - { 'M', 0x46000000, 8, 'F'}, - { 'M', 0x47800000, 9, 'X'}, - { 'M', 0x48000000, 5, 'y'}, - { 'M', 0x50000000, 4, 'c'}, - { 'M', 0x60000000, 3, 'e'}, - { 'M', 0x80000000, 6, 'S'}, - { 'M', 0x84000000, 6, 'P'}, - { 'M', 0x88000000, 5, 'r'}, - { 'M', 0x90000000, 4, 'u'}, - { 'M', 0xa0000000, 3, 'i'}, - { 'M', 0xc0000000, 2, 'a'}, - { 'N', 0x00000000, 2, 'a'}, - { 'N', 0x43500000, 12, 'M'}, - { 'N', 0x44000000, 7, 'y'}, - { 'N', 0x47000000, 8, ' '}, - { 'N', 0x48000000, 6, 'A'}, - { 'N', 0x4e000000, 9, 'L'}, - { 'N', 0x4f680000, 13, ESCAPE}, - { 'N', 0x50000000, 5, 'u'}, - { 'N', 0x58000000, 5, 'E'}, - { 'N', 0x60000000, 3, 'i'}, - { 'N', 0x80000000, 2, 'o'}, - { 'N', 0xc0000000, 2, 'e'}, - { 'O', 0x00000000, 4, 's'}, - { 'O', 0x20000000, 6, 'o'}, - { 'O', 0x28000000, 5, 'U'}, - { 'O', 0x40000000, 4, 'r'}, - { 'O', 0x50000000, 6, 'b'}, - { 'O', 0x54000000, 6, 'm'}, - { 'O', 0x58000000, 5, 'h'}, - { 'O', 0x60000000, 9, 'K'}, - { 'O', 0x60a00000, 12, ':'}, - { 'O', 0x61000000, 8, 't'}, - { 'O', 0x62000000, 8, 'k'}, - { 'O', 0x63200000, 11, 'L'}, - { 'O', 0x6c000000, 6, 'v'}, - { 'O', 0x70000000, 5, 'f'}, - { 'O', 0x78000000, 5, 'w'}, - { 'O', 0x80000000, 4, 'u'}, - { 'O', 0x90000000, 5, '.'}, - { 'O', 0x98000000, 8, 'g'}, - { 'O', 0x99c00000, 10, '-'}, - { 'O', 0x9a000000, 7, 'd'}, - { 'O', 0x9c000000, 6, 'c'}, - { 'O', 0xa0000000, 4, 'p'}, - { 'O', 0xb0000000, 4, 'l'}, - { 'O', 0xc0000000, 5, ' '}, - { 'O', 0xc8000000, 7, 'a'}, - { 'O', 0xcb200000, 11, 'A'}, - { 'O', 0xcb600000, 11, 'C'}, - { 'O', 0xcc000000, 6, 'x'}, - { 'O', 0xd0000000, 4, '\''}, - { 'O', 0xe0000000, 3, 'n'}, - { 'P', 0x00000000, 3, 'i'}, - { 'P', 0x20000000, 4, 'h'}, - { 'P', 0x31100000, 12, 'G'}, - { 'P', 0x31400000, 10, 'y'}, - { 'P', 0x32000000, 8, 'D'}, - { 'P', 0x33540000, 16, ESCAPE}, - { 'P', 0x33580000, 13, 'J'}, - { 'P', 0x33600000, 12, 'A'}, - { 'P', 0x33800000, 9, ','}, - { 'P', 0x34000000, 7, 'C'}, - { 'P', 0x36000000, 10, 'E'}, - { 'P', 0x36400000, 10, '\''}, - { 'P', 0x36900000, 12, 'F'}, - { 'P', 0x36a00000, 13, 'f'}, - { 'P', 0x36a80000, 13, 'R'}, - { 'P', 0x36b00000, 14, 'Y'}, - { 'P', 0x37000000, 8, 's'}, - { 'P', 0x38000000, 7, '.'}, - { 'P', 0x3a000000, 7, ' '}, - { 'P', 0x3c000000, 6, 'u'}, - { 'P', 0x40000000, 3, 'e'}, - { 'P', 0x60000000, 3, 'l'}, - { 'P', 0x80000000, 3, 'o'}, - { 'P', 0xa0000000, 3, 'r'}, - { 'P', 0xc0000000, 2, 'a'}, - { 'Q', 0x40000000, 5, 'a'}, - { 'Q', 0x4b000000, 8, '&'}, - { 'Q', 0x50000000, 4, '.'}, - { 'Q', 0x60000000, 3, ' '}, - { 'Q', 0x80000000, 1, 'u'}, - { 'R', 0x10000000, 6, ' '}, - { 'R', 0x15000000, 9, 'F'}, - { 'R', 0x16000000, 8, '.'}, - { 'R', 0x17000000, 10, 'N'}, - { 'R', 0x17c00000, 10, 'H'}, - { 'R', 0x18000000, 5, 'E'}, - { 'R', 0x20000000, 5, 'h'}, - { 'R', 0x28000000, 6, 'y'}, - { 'R', 0x2d800000, 9, 'n'}, - { 'R', 0x2e000000, 8, 'S'}, - { 'R', 0x2f800000, 9, 'A'}, - { 'R', 0x30000000, 4, 'u'}, - { 'R', 0x40000000, 2, 'a'}, - { 'R', 0x80000000, 3, 'i'}, - { 'R', 0xa0000000, 3, 'e'}, - { 'R', 0xc0000000, 2, 'o'}, - { 'S', 0x00000000, 4, 'a'}, - { 'S', 0x10000000, 5, 'p'}, - { 'S', 0x18000000, 5, ','}, - { 'S', 0x20000000, 4, 'h'}, - { 'S', 0x30000000, 5, 'L'}, - { 'S', 0x38000000, 7, 'w'}, - { 'S', 0x3a000000, 8, 'q'}, - { 'S', 0x3b000000, 9, 'P'}, - { 'S', 0x3b800000, 10, 'A'}, - { 'S', 0x3bc40000, 16, 'G'}, - { 'S', 0x3bc60000, 15, '}'}, - { 'S', 0x3be00000, 12, 'S'}, - { 'S', 0x3c000000, 6, 'k'}, - { 'S', 0x40000000, 5, 'i'}, - { 'S', 0x48000000, 5, 'u'}, - { 'S', 0x50000000, 5, 'o'}, - { 'S', 0x58000000, 5, 'c'}, - { 'S', 0x60000000, 5, 'e'}, - { 'S', 0x69000000, 8, 'n'}, - { 'S', 0x6a000000, 7, ' '}, - { 'S', 0x6c000000, 8, 'l'}, - { 'S', 0x6d100000, 14, 'O'}, - { 'S', 0x6d140000, 16, '-'}, - { 'S', 0x6d160000, 15, 'B'}, - { 'S', 0x6d180000, 13, ESCAPE}, - { 'S', 0x6d200000, 11, '.'}, - { 'S', 0x6d4c0000, 16, '3'}, - { 'S', 0x6d4e8000, 17, 's'}, - { 'S', 0x6d500000, 12, 'E'}, - { 'S', 0x6d600000, 12, 'v'}, - { 'S', 0x6d700000, 14, 'z'}, - { 'S', 0x6d740000, 15, 'H'}, - { 'S', 0x6d780000, 13, 'g'}, - { 'S', 0x6d800000, 9, 'y'}, - { 'S', 0x6e000000, 7, 'm'}, - { 'S', 0x70000000, 4, 't'}, - { 'S', 0x80000000, 1, ']'}, - { 'T', 0x00000000, 1, 'h'}, - { 'T', 0x80000000, 3, 'o'}, - { 'T', 0xa0000000, 4, 'V'}, - { 'T', 0xb0000000, 4, 'w'}, - { 'T', 0xc0000000, 4, 'r'}, - { 'T', 0xd0000000, 5, 'a'}, - { 'T', 0xd8000000, 5, 'i'}, - { 'T', 0xe0000000, 5, 'u'}, - { 'T', 0xe8000000, 7, 'H'}, - { 'T', 0xea000000, 8, ' '}, - { 'T', 0xeb000000, 8, 'y'}, - { 'T', 0xec000000, 7, 'W'}, - { 'T', 0xee000000, 10, 'S'}, - { 'T', 0xee400000, 11, 'A'}, - { 'T', 0xee680000, 13, '-'}, - { 'T', 0xee800000, 9, 'M'}, - { 'T', 0xef000000, 12, '.'}, - { 'T', 0xef140000, 14, '4'}, - { 'T', 0xef200000, 11, 's'}, - { 'T', 0xef400000, 13, 'C'}, - { 'T', 0xef480000, 14, 'O'}, - { 'T', 0xef4c0000, 15, 'E'}, - { 'T', 0xef540000, 15, '\''}, - { 'T', 0xef580000, 13, 'c'}, - { 'T', 0xef800000, 9, 'x'}, - { 'T', 0xf0000000, 4, 'e'}, - { 'U', 0x00000000, 2, 'K'}, - { 'U', 0x40000000, 6, 'g'}, - { 'U', 0x44000000, 8, 'k'}, - { 'U', 0x45000000, 8, 't'}, - { 'U', 0x46000000, 8, 'E'}, - { 'U', 0x47000000, 8, '-'}, - { 'U', 0x48000000, 8, 'F'}, - { 'U', 0x4ac00000, 11, 'b'}, - { 'U', 0x4b800000, 9, 'Z'}, - { 'U', 0x4c000000, 8, '2'}, - { 'U', 0x4d000000, 10, 'i'}, - { 'U', 0x4d800000, 10, 'a'}, - { 'U', 0x4e000000, 10, '.'}, - { 'U', 0x50000000, 5, 's'}, - { 'U', 0x58000000, 5, 'r'}, - { 'U', 0x60000000, 3, 'S'}, - { 'U', 0x80000000, 2, 'n'}, - { 'U', 0xc0000000, 3, 'p'}, - { 'U', 0xe0000000, 6, ' '}, - { 'U', 0xe4000000, 7, 'm'}, - { 'U', 0xe8000000, 5, 'R'}, - { 'U', 0xf0000000, 4, 'l'}, - { 'V', 0x00000000, 3, '.'}, - { 'V', 0x20000000, 3, 'a'}, - { 'V', 0x40000000, 2, ' '}, - { 'V', 0x81000000, 8, '1'}, - { 'V', 0x84780000, 13, '8'}, - { 'V', 0x91000000, 9, 'D'}, - { 'V', 0x91800000, 9, 'u'}, - { 'V', 0x94000000, 10, ';'}, - { 'V', 0x94400000, 11, ESCAPE}, - { 'V', 0x94780000, 13, 'W'}, - { 'V', 0x94800000, 9, ','}, - { 'V', 0x95000000, 8, '\''}, - { 'V', 0x96000000, 8, ':'}, - { 'V', 0x97000000, 8, 'l'}, - { 'V', 0x98000000, 5, 'o'}, - { 'V', 0xa0000000, 3, 'e'}, - { 'V', 0xc0000000, 2, 'i'}, - { 'W', 0x00000000, 2, 'h'}, - { 'W', 0x40000000, 4, 'r'}, - { 'W', 0x50800000, 9, '.'}, - { 'W', 0x51000000, 10, '\''}, - { 'W', 0x51800000, 11, '2'}, - { 'W', 0x51a00000, 11, ':'}, - { 'W', 0x52000000, 7, ' '}, - { 'W', 0x54000000, 7, 'y'}, - { 'W', 0x56000000, 9, 'I'}, - { 'W', 0x56b40000, 16, ESCAPE}, - { 'W', 0x56b80000, 13, 'u'}, - { 'W', 0x56c00000, 11, 'V'}, - { 'W', 0x57000000, 9, 'W'}, - { 'W', 0x58000000, 5, 'O'}, - { 'W', 0x60000000, 3, 'a'}, - { 'W', 0x80000000, 2, 'i'}, - { 'W', 0xc0000000, 3, 'o'}, - { 'W', 0xe0000000, 3, 'e'}, - { 'X', 0x00000000, 3, 'a'}, - { 'X', 0x43000000, 10, ')'}, - { 'X', 0x50000000, 5, '-'}, - { 'X', 0x6a000000, 7, '.'}, - { 'X', 0x70000000, 4, 't'}, - { 'X', 0x80000000, 1, ' '}, - { 'Y', 0x00000000, 2, 'e'}, - { 'Y', 0x40000000, 3, 'u'}, - { 'Y', 0x60000000, 5, 'a'}, - { 'Y', 0x6e000000, 13, '-'}, - { 'Y', 0x6e380000, 13, ','}, - { 'Y', 0x6f000000, 8, 'i'}, - { 'Y', 0x78000000, 5, ' '}, - { 'Y', 0x80000000, 1, 'o'}, - { 'Z', 0x08000000, 5, 'Z'}, - { 'Z', 0x10000000, 5, ' '}, - { 'Z', 0x18000000, 5, 'u'}, - { 'Z', 0x20000000, 4, 'z'}, - { 'Z', 0x30000000, 4, 'i'}, - { 'Z', 0x03400000, 10, '-'}, - { 'Z', 0x40000000, 2, 'a'}, - { 'Z', 0x80000000, 2, 'e'}, - { 'Z', 0xc0000000, 2, 'o'}, - { '[', 0x00000000, 4, '2'}, - { '[', 0x10000000, 11, 'J'}, - { '[', 0x10800000, 9, 'C'}, - { '[', 0x11000000, 9, 'f'}, - { '[', 0x14000000, 6, 'n'}, - { '[', 0x1c000000, 11, 'L'}, - { '[', 0x1c240000, 15, ESCAPE}, - { '[', 0x1c280000, 13, 'D'}, - { '[', 0x1c400000, 10, 'T'}, - { '[', 0x1c800000, 9, 'c'}, - { '[', 0x30000000, 4, '1'}, - { '[', 0x40000000, 2, 'A'}, - { '[', 0x80000000, 1, 'S'}, - { '\'', 0x00000000, 4, 'l'}, - { '\'', 0x10000000, 6, 'n'}, - { '\'', 0x14000000, 6, '.'}, - { '\'', 0x18000000, 6, 'C'}, - { '\'', 0x1c000000, 8, 'S'}, - { '\'', 0x1d000000, 9, 'f'}, - { '\'', 0x1d800000, 9, 'g'}, - { '\'', 0x1e000000, 10, 'o'}, - { '\'', 0x1e400000, 10, 'K'}, - { '\'', 0x1e840000, 14, '0'}, - { '\'', 0x1e900000, 12, 'W'}, - { '\'', 0x1ea00000, 11, '?'}, - { '\'', 0x1ec00000, 10, 'a'}, - { '\'', 0x1f000000, 8, 'p'}, - { '\'', 0x20000000, 3, 't'}, - { '\'', 0x40000000, 3, ' '}, - { '\'', 0x60000000, 6, 'B'}, - { '\'', 0x64000000, 9, 'F'}, - { '\'', 0x64800000, 9, 'h'}, - { '\'', 0x65000000, 8, 'D'}, - { '\'', 0x66000000, 11, 'E'}, - { '\'', 0x66400000, 10, 'u'}, - { '\'', 0x66800000, 9, 'H'}, - { '\'', 0x67900000, 12, ':'}, - { '\'', 0x67b40000, 16, ESCAPE}, - { '\'', 0x67b80000, 13, 'y'}, - { '\'', 0x68000000, 5, 'r'}, - { '\'', 0x70000000, 7, 'd'}, - { '\'', 0x72400000, 10, 'I'}, - { '\'', 0x72800000, 9, 'R'}, - { '\'', 0x73800000, 9, 'T'}, - { '\'', 0x74000000, 6, 'A'}, - { '\'', 0x78000000, 7, 'v'}, - { '\'', 0x7a000000, 10, 'w'}, - { '\'', 0x7a400000, 10, 'b'}, - { '\'', 0x7a800000, 9, 'G'}, - { '\'', 0x7b000000, 8, 'i'}, - { '\'', 0x7c000000, 8, 'c'}, - { '\'', 0x7d000000, 8, 'm'}, - { '\'', 0x7e000000, 13, '6'}, - { '\'', 0x7e100000, 12, 'q'}, - { '\'', 0x7e220000, 15, 'U'}, - { '\'', 0x7e300000, 12, 'M'}, - { '\'', 0x7e400000, 10, 'e'}, - { '\'', 0x7e800000, 9, 'L'}, - { '\'', 0x7f000000, 8, ','}, - { '\'', 0x80000000, 1, 's'}, - { ']', 0x04000000, 6, ','}, - { ']', 0x20000000, 3, '.'}, - { ']', 0x40000000, 2, ' '}, - { ']', 0x80000000, 1, STOP}, - { 'a', 0x00000000, 4, 'm'}, - { 'a', 0x10000000, 6, 'p'}, - { 'a', 0x14000000, 7, 'w'}, - { 'a', 0x16000000, 9, ','}, - { 'a', 0x16800000, 9, '\''}, - { 'a', 0x17000000, 8, 'z'}, - { 'a', 0x18000000, 5, 'd'}, - { 'a', 0x20000000, 3, 'r'}, - { 'a', 0x40000000, 2, 'n'}, - { 'a', 0x80000000, 5, 'i'}, - { 'a', 0x88000000, 6, 'u'}, - { 'a', 0x8c000000, 6, 'v'}, - { 'a', 0x90000000, 4, 's'}, - { 'a', 0xa0000000, 3, 't'}, - { 'a', 0xc0000000, 5, 'y'}, - { 'a', 0xc8000000, 8, '.'}, - { 'a', 0xc9000000, 11, 'a'}, - { 'a', 0xc9200000, 11, '-'}, - { 'a', 0xc9400000, 12, 'q'}, - { 'a', 0xc9500000, 14, '!'}, - { 'a', 0xc9550000, 17, 'J'}, - { 'a', 0xc9560000, 16, ';'}, - { 'a', 0xc9570000, 16, ')'}, - { 'a', 0xc9580000, 18, 'R'}, - { 'a', 0xc9590000, 16, '/'}, - { 'a', 0xc95c0000, 14, '?'}, - { 'a', 0xc9600000, 11, 'j'}, - { 'a', 0xc9800000, 9, 'e'}, - { 'a', 0xca000000, 11, ':'}, - { 'a', 0xca200000, 11, 'o'}, - { 'a', 0xca400000, 10, 'x'}, - { 'a', 0xca800000, 9, 'h'}, - { 'a', 0xcb000000, 8, 'f'}, - { 'a', 0xcc000000, 6, 'g'}, - { 'a', 0xd0000000, 5, 'c'}, - { 'a', 0xd8000000, 6, 'b'}, - { 'a', 0xdc000000, 6, 'k'}, - { 'a', 0xe0000000, 4, ' '}, - { 'a', 0xf0000000, 4, 'l'}, - { 'b', 0x00000000, 2, 'e'}, - { 'b', 0x40000000, 3, 'u'}, - { 'b', 0x60000000, 3, 'a'}, - { 'b', 0x80000000, 3, 'y'}, - { 'b', 0xa0000000, 3, 'o'}, - { 'b', 0xc0000000, 4, 'l'}, - { 'b', 0xd0000000, 6, 's'}, - { 'b', 0xd4000000, 9, 'j'}, - { 'b', 0xd4800000, 13, '?'}, - { 'b', 0xd4880000, 14, 'f'}, - { 'b', 0xd48c0000, 16, '/'}, - { 'b', 0xd4900000, 13, 'v'}, - { 'b', 0xd4984000, 19, ESCAPE}, - { 'b', 0xd4a00000, 11, ':'}, - { 'b', 0xd4c00000, 10, '\''}, - { 'b', 0xd5000000, 8, 'c'}, - { 'b', 0xd6000000, 9, ','}, - { 'b', 0xd6800000, 9, '.'}, - { 'b', 0xd7000000, 11, 'w'}, - { 'b', 0xd7200000, 11, 'd'}, - { 'b', 0xd7400000, 11, 'h'}, - { 'b', 0xd7600000, 11, '&'}, - { 'b', 0xd7800000, 12, 'm'}, - { 'b', 0xd7900000, 12, 'n'}, - { 'b', 0xd7a00000, 11, '-'}, - { 'b', 0xd7c00000, 10, 't'}, - { 'b', 0xd8000000, 6, ' '}, - { 'b', 0xdc000000, 6, 'b'}, - { 'b', 0xe0000000, 4, 'r'}, - { 'b', 0xf0000000, 4, 'i'}, - { 'c', 0x00000000, 2, 'o'}, - { 'c', 0x40000000, 4, 'i'}, - { 'c', 0x50000000, 4, 'l'}, - { 'c', 0x60000000, 3, 'a'}, - { 'c', 0x80000000, 3, 'e'}, - { 'c', 0xa0000000, 5, 'u'}, - { 'c', 0xa8000000, 5, 'r'}, - { 'c', 0xb0000000, 4, 'k'}, - { 'c', 0xc0000000, 3, 'h'}, - { 'c', 0xe0000000, 5, ' '}, - { 'c', 0xe8000000, 7, 'y'}, - { 'c', 0xea000000, 7, 'c'}, - { 'c', 0xec000000, 12, ':'}, - { 'c', 0xec100000, 15, 'b'}, - { 'c', 0xec120000, 15, ESCAPE}, - { 'c', 0xec1b0000, 16, 'V'}, - { 'c', 0xec1c0000, 14, 'E'}, - { 'c', 0xec200000, 11, 'n'}, - { 'c', 0xec400000, 10, 'G'}, - { 'c', 0xec800000, 13, 'N'}, - { 'c', 0xec900000, 12, '-'}, - { 'c', 0xeca00000, 12, 'A'}, - { 'c', 0xecb00000, 14, '?'}, - { 'c', 0xecb80000, 15, ';'}, - { 'c', 0xecba0000, 17, 'U'}, - { 'c', 0xecc00000, 11, 'D'}, - { 'c', 0xece00000, 12, 'L'}, - { 'c', 0xecf00000, 12, '\''}, - { 'c', 0xed000000, 8, 's'}, - { 'c', 0xee000000, 8, '.'}, - { 'c', 0xef000000, 11, 'K'}, - { 'c', 0xef200000, 12, 'd'}, - { 'c', 0xef300000, 14, 'M'}, - { 'c', 0xef380000, 13, 'F'}, - { 'c', 0xef400000, 12, 'q'}, - { 'c', 0xef500000, 12, 'I'}, - { 'c', 0xef600000, 11, 'C'}, - { 'c', 0xef800000, 9, ','}, - { 'c', 0xf0000000, 4, 't'}, - { 'd', 0x00000000, 1, ' '}, - { 'd', 0x80000000, 8, 'h'}, - { 'd', 0x81000000, 8, ':'}, - { 'd', 0x82000000, 8, 'm'}, - { 'd', 0x83000000, 11, '!'}, - { 'd', 0x83300000, 12, ')'}, - { 'd', 0x83400000, 12, 'k'}, - { 'd', 0x83500000, 12, ';'}, - { 'd', 0x83600000, 15, 'z'}, - { 'd', 0x83640000, 16, ESCAPE}, - { 'd', 0x83660000, 15, 'q'}, - { 'd', 0x836c0000, 14, 'j'}, - { 'd', 0x83700000, 12, '/'}, - { 'd', 0x83800000, 9, 'f'}, - { 'd', 0x84000000, 6, 'd'}, - { 'd', 0x88000000, 5, '.'}, - { 'd', 0x90000000, 8, 'w'}, - { 'd', 0x91000000, 8, 'n'}, - { 'd', 0x92000000, 7, '-'}, - { 'd', 0x94000000, 6, 'l'}, - { 'd', 0x98000000, 5, 'o'}, - { 'd', 0xa0000000, 3, 'e'}, - { 'd', 0xc0000000, 4, 'a'}, - { 'd', 0xd0000000, 6, 'u'}, - { 'd', 0xd4000000, 11, 'p'}, - { 'd', 0xd4200000, 11, 't'}, - { 'd', 0xd4400000, 10, '?'}, - { 'd', 0xd4800000, 10, 'b'}, - { 'd', 0xd4c00000, 10, 'c'}, - { 'd', 0xd5000000, 8, '\''}, - { 'd', 0xd6000000, 7, 'v'}, - { 'd', 0xd8000000, 5, 'r'}, - { 'd', 0xe0000000, 4, 'i'}, - { 'd', 0xf0000000, 7, 'g'}, - { 'd', 0xf2000000, 7, ','}, - { 'd', 0xf4000000, 6, 'y'}, - { 'd', 0xf8000000, 5, 's'}, - { 'e', 0x00000000, 4, 'd'}, - { 'e', 0x10000000, 5, 'c'}, - { 'e', 0x18000000, 6, 'x'}, - { 'e', 0x1c000000, 7, 'f'}, - { 'e', 0x1e000000, 8, '-'}, - { 'e', 0x1f000000, 8, 'h'}, - { 'e', 0x20000000, 6, 'v'}, - { 'e', 0x24000000, 6, 'i'}, - { 'e', 0x28000000, 6, 'y'}, - { 'e', 0x2c000000, 8, 'k'}, - { 'e', 0x2d000000, 10, ')'}, - { 'e', 0x2d400000, 10, 'q'}, - { 'e', 0x2d800000, 9, ':'}, - { 'e', 0x2e000000, 7, 'b'}, - { 'e', 0x30000000, 4, 'a'}, - { 'e', 0x40000000, 3, 's'}, - { 'e', 0x60000000, 5, 'e'}, - { 'e', 0x68000000, 5, 'w'}, - { 'e', 0x70000000, 6, 'm'}, - { 'e', 0x74000000, 7, ','}, - { 'e', 0x76000000, 8, '\''}, - { 'e', 0x77000000, 11, 'z'}, - { 'e', 0x77240000, 14, '4'}, - { 'e', 0x77280000, 14, 'B'}, - { 'e', 0x772c0000, 16, ESCAPE}, - { 'e', 0x772d4000, 18, 'G'}, - { 'e', 0x772f4000, 21, '2'}, - { 'e', 0x77300000, 13, '/'}, - { 'e', 0x77380000, 14, ']'}, - { 'e', 0x773c0000, 14, ';'}, - { 'e', 0x77400000, 10, '?'}, - { 'e', 0x77800000, 10, 'u'}, - { 'e', 0x77c00000, 11, '!'}, - { 'e', 0x77e00000, 12, STOP}, - { 'e', 0x77f00000, 12, 'j'}, - { 'e', 0x78000000, 5, 't'}, - { 'e', 0x80000000, 2, ' '}, - { 'e', 0xc0000000, 3, 'r'}, - { 'e', 0xe0000000, 5, 'l'}, - { 'e', 0xe8000000, 6, '.'}, - { 'e', 0xec000000, 7, 'p'}, - { 'e', 0xee000000, 8, 'g'}, - { 'e', 0xef000000, 8, 'o'}, - { 'e', 0xf0000000, 4, 'n'}, - { 'f', 0x00000000, 2, 'o'}, - { 'f', 0x40000000, 3, 'i'}, - { 'f', 0x60000000, 5, 't'}, - { 'f', 0x68000000, 8, 's'}, - { 'f', 0x69000000, 8, 'y'}, - { 'f', 0x6a000000, 10, '?'}, - { 'f', 0x6a400000, 12, 'm'}, - { 'f', 0x6a500000, 16, 'h'}, - { 'f', 0x6a560000, 16, ';'}, - { 'f', 0x6a600000, 11, ':'}, - { 'f', 0x6a800000, 11, '\''}, - { 'f', 0x6aa00000, 11, 'g'}, - { 'f', 0x6ac00000, 10, ','}, - { 'f', 0x6b000000, 9, '.'}, - { 'f', 0x6b800000, 12, ESCAPE}, - { 'f', 0x6b980000, 14, ')'}, - { 'f', 0x6b9c0000, 14, 'w'}, - { 'f', 0x6bb00000, 12, 'n'}, - { 'f', 0x6bc00000, 10, '-'}, - { 'f', 0x6c000000, 6, 'l'}, - { 'f', 0x70000000, 4, 'a'}, - { 'f', 0x80000000, 2, ' '}, - { 'f', 0xc0000000, 3, 'r'}, - { 'f', 0xe0000000, 4, 'e'}, - { 'f', 0xf0000000, 5, 'u'}, - { 'f', 0xf8000000, 5, 'f'}, - { 'g', 0x00000000, 3, 'a'}, - { 'g', 0x20000000, 9, 'd'}, - { 'g', 0x20800000, 10, '?'}, - { 'g', 0x20c00000, 10, 'm'}, - { 'g', 0x21000000, 8, '\''}, - { 'g', 0x22000000, 8, '-'}, - { 'g', 0x23000000, 8, ':'}, - { 'g', 0x24000000, 6, ','}, - { 'g', 0x28000000, 6, 'n'}, - { 'g', 0x2c000000, 7, 'y'}, - { 'g', 0x2e000000, 13, 'k'}, - { 'g', 0x2e080000, 14, ')'}, - { 'g', 0x2e0c0000, 14, '"'}, - { 'g', 0x2e100000, 12, ';'}, - { 'g', 0x2e200000, 11, '!'}, - { 'g', 0x2e400000, 13, 'p'}, - { 'g', 0x2e480000, 16, ESCAPE}, - { 'g', 0x2e4e0000, 15, '/'}, - { 'g', 0x2e600000, 11, 'f'}, - { 'g', 0x2e800000, 9, 'b'}, - { 'g', 0x2f000000, 9, 't'}, - { 'g', 0x2f800000, 9, 'w'}, - { 'g', 0x30000000, 4, 'u'}, - { 'g', 0x40000000, 3, 'h'}, - { 'g', 0x60000000, 4, 'r'}, - { 'g', 0x70000000, 5, 'l'}, - { 'g', 0x78000000, 6, 'g'}, - { 'g', 0x7c000000, 6, '.'}, - { 'g', 0x80000000, 4, 'i'}, - { 'g', 0x90000000, 5, 's'}, - { 'g', 0x98000000, 5, 'o'}, - { 'g', 0xa0000000, 3, 'e'}, - { 'g', 0xc0000000, 2, ' '}, - { 'h', 0x00000000, 1, 'e'}, - { 'h', 0x80000000, 3, 'o'}, - { 'h', 0xa0000000, 3, 'i'}, - { 'h', 0xc0000000, 3, ' '}, - { 'h', 0xe0000000, 9, 'd'}, - { 'h', 0xe0880000, 15, 'p'}, - { 'h', 0xe08a0000, 15, ';'}, - { 'h', 0xe08c0000, 15, '/'}, - { 'h', 0xe0900000, 12, 'c'}, - { 'h', 0xe0a00000, 13, 'h'}, - { 'h', 0xe0a80000, 13, 'k'}, - { 'h', 0xe0b00000, 12, '?'}, - { 'h', 0xe0c00000, 10, 'w'}, - { 'h', 0xe1000000, 8, 'y'}, - { 'h', 0xe2000000, 9, 's'}, - { 'h', 0xe2800000, 10, '\''}, - { 'h', 0xe2c00000, 10, '-'}, - { 'h', 0xe3000000, 8, 'l'}, - { 'h', 0xe4000000, 6, 'r'}, - { 'h', 0xe8000000, 8, '.'}, - { 'h', 0xe9000000, 8, 'n'}, - { 'h', 0xea000000, 9, ','}, - { 'h', 0xea800000, 12, '!'}, - { 'h', 0xea910000, 17, ESCAPE}, - { 'h', 0xea940000, 14, 'g'}, - { 'h', 0xea980000, 13, 'f'}, - { 'h', 0xeaa00000, 11, 'm'}, - { 'h', 0xeac00000, 11, ':'}, - { 'h', 0xeae00000, 11, 'b'}, - { 'h', 0xeb000000, 8, 'u'}, - { 'h', 0xec000000, 6, 't'}, - { 'h', 0xf0000000, 4, 'a'}, - { 'i', 0x00000000, 3, 't'}, - { 'i', 0x20000000, 5, 'a'}, - { 'i', 0x28000000, 6, 'p'}, - { 'i', 0x2c000000, 7, 'z'}, - { 'i', 0x2e000000, 9, '-'}, - { 'i', 0x2e800000, 9, 'x'}, - { 'i', 0x2f000000, 8, 'b'}, - { 'i', 0x30000000, 4, 'l'}, - { 'i', 0x40000000, 3, 's'}, - { 'i', 0x60000000, 5, 'm'}, - { 'i', 0x68000000, 5, 'd'}, - { 'i', 0x70000000, 5, 'v'}, - { 'i', 0x78000000, 6, 'f'}, - { 'i', 0x7c000000, 7, ' '}, - { 'i', 0x7e000000, 8, 'k'}, - { 'i', 0x7f000000, 10, 'u'}, - { 'i', 0x7f400000, 11, '.'}, - { 'i', 0x7f600000, 15, '/'}, - { 'i', 0x7f622000, 19, 'C'}, - { 'i', 0x7f624000, 19, ESCAPE}, - { 'i', 0x7f627000, 20, ';'}, - { 'i', 0x7f640000, 14, ':'}, - { 'i', 0x7f680000, 13, 'i'}, - { 'i', 0x7f700000, 12, 'w'}, - { 'i', 0x7f800000, 10, 'q'}, - { 'i', 0x7fc00000, 11, ','}, - { 'i', 0x7fe00000, 14, 'h'}, - { 'i', 0x7fe50000, 18, ')'}, - { 'i', 0x7fe80000, 13, 'j'}, - { 'i', 0x7ff00000, 12, '\''}, - { 'i', 0x80000000, 2, 'n'}, - { 'i', 0xc0000000, 4, 'o'}, - { 'i', 0xd0000000, 4, 'c'}, - { 'i', 0xe0000000, 5, 'g'}, - { 'i', 0xe8000000, 5, 'r'}, - { 'i', 0xf0000000, 4, 'e'}, - { 'j', 0x00000000, 1, 'o'}, - { 'j', 0x80000000, 5, 'i'}, - { 'j', 0x88800000, 11, 'n'}, - { 'j', 0x88a00000, 13, ESCAPE}, - { 'j', 0x8a000000, 7, ' '}, - { 'j', 0x90000000, 4, 'e'}, - { 'j', 0xa0000000, 3, 'a'}, - { 'j', 0xc0000000, 2, 'u'}, - { 'k', 0x00000000, 3, 's'}, - { 'k', 0x20000000, 4, '.'}, - { 'k', 0x30000000, 6, '\''}, - { 'k', 0x34000000, 6, 'a'}, - { 'k', 0x38000000, 6, 'p'}, - { 'k', 0x3c000000, 6, ','}, - { 'k', 0x40000000, 7, '/'}, - { 'k', 0x42000000, 10, 'r'}, - { 'k', 0x42800000, 10, '?'}, - { 'k', 0x42c00000, 11, 'j'}, - { 'k', 0x42e00000, 12, ')'}, - { 'k', 0x43000000, 10, 't'}, - { 'k', 0x43400000, 10, 'g'}, - { 'k', 0x43800000, 9, 'b'}, - { 'k', 0x44000000, 7, '-'}, - { 'k', 0x46000000, 7, 'o'}, - { 'k', 0x48000000, 5, 'y'}, - { 'k', 0x50000000, 6, 'l'}, - { 'k', 0x54000000, 6, 'f'}, - { 'k', 0x58000000, 6, 'n'}, - { 'k', 0x5c000000, 9, 'w'}, - { 'k', 0x5c800000, 9, 'm'}, - { 'k', 0x5d000000, 8, ':'}, - { 'k', 0x5e000000, 9, 'h'}, - { 'k', 0x5e800000, 12, ';'}, - { 'k', 0x5e900000, 12, 'c'}, - { 'k', 0x5eb00000, 13, '!'}, - { 'k', 0x5ec00000, 10, 'd'}, - { 'k', 0x5f000000, 9, 'u'}, - { 'k', 0x5f800000, 9, 'k'}, - { 'k', 0x60000000, 3, 'i'}, - { 'k', 0x80000000, 2, ' '}, - { 'k', 0xc0000000, 2, 'e'}, - { 'l', 0x00000000, 4, 'u'}, - { 'l', 0x10000000, 4, 'd'}, - { 'l', 0x20000000, 4, 'y'}, - { 'l', 0x30000000, 6, '.'}, - { 'l', 0x34000000, 7, 'v'}, - { 'l', 0x36000000, 10, 'r'}, - { 'l', 0x36400000, 10, 'h'}, - { 'l', 0x36800000, 9, ':'}, - { 'l', 0x37000000, 8, 'c'}, - { 'l', 0x38000000, 6, 't'}, - { 'l', 0x3c000000, 7, 'f'}, - { 'l', 0x3e000000, 8, '-'}, - { 'l', 0x3f000000, 10, 'n'}, - { 'l', 0x3f400000, 10, 'g'}, - { 'l', 0x3f800000, 9, 'b'}, - { 'l', 0x40000000, 3, 'a'}, - { 'l', 0x60000000, 3, 'i'}, - { 'l', 0x80000000, 3, 'l'}, - { 'l', 0xa0000000, 5, 's'}, - { 'l', 0xa8000000, 7, 'm'}, - { 'l', 0xaa000000, 7, 'k'}, - { 'l', 0xac000000, 7, 'p'}, - { 'l', 0xae000000, 9, '\''}, - { 'l', 0xae800000, 11, '?'}, - { 'l', 0xaea80000, 15, ';'}, - { 'l', 0xaeaa0000, 17, '@'}, - { 'l', 0xaeaa8000, 17, 'j'}, - { 'l', 0xaeab0000, 16, ESCAPE}, - { 'l', 0xaeac0000, 14, '/'}, - { 'l', 0xaeb00000, 13, 'z'}, - { 'l', 0xaeb80000, 15, 'E'}, - { 'l', 0xaebc0000, 16, ')'}, - { 'l', 0xaec00000, 10, 'w'}, - { 'l', 0xaf000000, 8, ','}, - { 'l', 0xb0000000, 4, 'o'}, - { 'l', 0xc0000000, 3, 'e'}, - { 'l', 0xe0000000, 3, ' '}, - { 'm', 0x00000000, 2, 'a'}, - { 'm', 0x40000000, 2, 'e'}, - { 'm', 0x80000000, 5, '.'}, - { 'm', 0x88000000, 5, 's'}, - { 'm', 0x90000000, 4, 'p'}, - { 'm', 0xa0000000, 7, ','}, - { 'm', 0xa3000000, 9, ':'}, - { 'm', 0xa3800000, 11, '?'}, - { 'm', 0xa3a00000, 11, '!'}, - { 'm', 0xa3c00000, 10, 'r'}, - { 'm', 0xa4000000, 6, 'y'}, - { 'm', 0xa8000000, 7, '/'}, - { 'm', 0xaa000000, 9, '\''}, - { 'm', 0xaa800200, 23, STOP}, - { 'm', 0xaaa00000, 11, 'w'}, - { 'm', 0xaac00000, 10, 'f'}, - { 'm', 0xab000000, 10, 'l'}, - { 'm', 0xab400000, 14, ')'}, - { 'm', 0xab440000, 14, ESCAPE}, - { 'm', 0xab490000, 17, 'k'}, - { 'm', 0xab498000, 17, 'z'}, - { 'm', 0xab4c0000, 14, 'd'}, - { 'm', 0xab500000, 13, 't'}, - { 'm', 0xab600000, 11, 'h'}, - { 'm', 0xab800000, 10, 'n'}, - { 'm', 0xabc00000, 11, '-'}, - { 'm', 0xabf00000, 13, ';'}, - { 'm', 0xabf80000, 13, 'c'}, - { 'm', 0xac000000, 6, 'b'}, - { 'm', 0xb0000000, 4, 'o'}, - { 'm', 0xc0000000, 4, 'i'}, - { 'm', 0xd0000000, 5, 'u'}, - { 'm', 0xd8000000, 5, 'm'}, - { 'm', 0xe0000000, 3, ' '}, - { 'n', 0x00000000, 4, 's'}, - { 'n', 0x10000000, 8, 'm'}, - { 'n', 0x11000000, 11, 'p'}, - { 'n', 0x11200000, 13, '/'}, - { 'n', 0x11300000, 12, ';'}, - { 'n', 0x11400000, 10, 'z'}, - { 'n', 0x11800000, 9, 'w'}, - { 'n', 0x12000000, 7, 'u'}, - { 'n', 0x14000000, 8, 'l'}, - { 'n', 0x15000000, 8, '-'}, - { 'n', 0x16000000, 7, 'v'}, - { 'n', 0x18000000, 7, 'f'}, - { 'n', 0x1a000000, 10, 'h'}, - { 'n', 0x1a400000, 13, ESCAPE}, - { 'n', 0x1a480000, 14, 'B'}, - { 'n', 0x1a500000, 12, ')'}, - { 'n', 0x1a600000, 11, 'x'}, - { 'n', 0x1a800000, 9, ':'}, - { 'n', 0x1b000000, 10, 'b'}, - { 'n', 0x1b400000, 10, 'j'}, - { 'n', 0x1b800000, 10, 'r'}, - { 'n', 0x1bc00000, 12, '!'}, - { 'n', 0x1bd00000, 12, 'q'}, - { 'n', 0x1be00000, 11, '?'}, - { 'n', 0x1c000000, 6, '.'}, - { 'n', 0x20000000, 3, 't'}, - { 'n', 0x40000000, 2, ' '}, - { 'n', 0x80000000, 3, 'g'}, - { 'n', 0xa0000000, 4, 'a'}, - { 'n', 0xb0000000, 5, 'c'}, - { 'n', 0xb8000000, 7, 'k'}, - { 'n', 0xba000000, 7, '\''}, - { 'n', 0xbc000000, 6, 'n'}, - { 'n', 0xc0000000, 5, 'i'}, - { 'n', 0xc8000000, 7, 'y'}, - { 'n', 0xca000000, 7, ','}, - { 'n', 0xcc000000, 6, 'o'}, - { 'n', 0xd0000000, 4, 'e'}, - { 'n', 0xe0000000, 3, 'd'}, - { 'o', 0x00000000, 4, 'l'}, - { 'o', 0x10000000, 5, 'v'}, - { 'o', 0x18000000, 6, 'k'}, - { 'o', 0x1c000000, 6, 'i'}, - { 'o', 0x20000000, 3, 'u'}, - { 'o', 0x40000000, 5, 's'}, - { 'o', 0x48000000, 5, 'p'}, - { 'o', 0x50000000, 6, 'g'}, - { 'o', 0x54000000, 9, '-'}, - { 'o', 0x54800000, 9, ','}, - { 'o', 0x55000000, 8, 'h'}, - { 'o', 0x56000000, 7, 'e'}, - { 'o', 0x58000000, 7, 'y'}, - { 'o', 0x5a000000, 7, 'a'}, - { 'o', 0x5c000000, 6, 'c'}, - { 'o', 0x60000000, 3, ' '}, - { 'o', 0x80000000, 3, 'r'}, - { 'o', 0xa0000000, 5, 't'}, - { 'o', 0xa8000000, 5, 'o'}, - { 'o', 0xb0000000, 8, '.'}, - { 'o', 0xb1000000, 13, '!'}, - { 'o', 0xb10d0000, 16, ';'}, - { 'o', 0xb10e0000, 16, 'G'}, - { 'o', 0xb10ff000, 20, 'C'}, - { 'o', 0xb1100000, 12, '?'}, - { 'o', 0xb1200000, 11, ':'}, - { 'o', 0xb1400000, 10, '\''}, - { 'o', 0xb1800000, 14, '/'}, - { 'o', 0xb1840000, 14, ')'}, - { 'o', 0xb1880000, 13, 'q'}, - { 'o', 0xb1900000, 12, 'j'}, - { 'o', 0xb1a00000, 11, 'z'}, - { 'o', 0xb1c00000, 10, 'x'}, - { 'o', 0xb2000000, 7, 'b'}, - { 'o', 0xb4000000, 6, 'd'}, - { 'o', 0xb8000000, 5, 'w'}, - { 'o', 0xc0000000, 4, 'm'}, - { 'o', 0xd0000000, 4, 'f'}, - { 'o', 0xe0000000, 3, 'n'}, - { 'p', 0x00000000, 4, 'p'}, - { 'p', 0x10000000, 8, '-'}, - { 'p', 0x11200000, 11, 'f'}, - { 'p', 0x11400000, 11, 'k'}, - { 'p', 0x11600000, 11, '!'}, - { 'p', 0x11800000, 9, '?'}, - { 'p', 0x12000000, 7, 'd'}, - { 'p', 0x14000000, 6, 'm'}, - { 'p', 0x18000000, 5, 't'}, - { 'p', 0x20000000, 3, 'l'}, - { 'p', 0x40000000, 3, ' '}, - { 'p', 0x60000000, 3, 'o'}, - { 'p', 0x80000000, 5, 'u'}, - { 'p', 0x88000000, 5, 'h'}, - { 'p', 0x90000000, 5, 's'}, - { 'p', 0x98000000, 17, ESCAPE}, - { 'p', 0x98080000, 13, 'g'}, - { 'p', 0x98100000, 12, '/'}, - { 'p', 0x98200000, 11, 'c'}, - { 'p', 0x98400000, 11, 'n'}, - { 'p', 0x98600000, 11, 'w'}, - { 'p', 0x98800000, 9, ':'}, - { 'p', 0x99000000, 10, '\''}, - { 'p', 0x99c00000, 10, 'b'}, - { 'p', 0x9a000000, 7, 'y'}, - { 'p', 0x9c000000, 7, '.'}, - { 'p', 0x9e000000, 7, ','}, - { 'p', 0xa0000000, 3, 'r'}, - { 'p', 0xc0000000, 4, 'a'}, - { 'p', 0xd0000000, 4, 'i'}, - { 'p', 0xe0000000, 3, 'e'}, - { 'q', 0x00000000, 3, ','}, - { 'q', 0x20000000, 3, '.'}, - { 'q', 0x44000000, 6, 'a'}, - { 'q', 0x60000000, 3, ' '}, - { 'q', 0x80000000, 1, 'u'}, - { 'r', 0x00000000, 3, 'a'}, - { 'r', 0x20000000, 3, 'o'}, - { 'r', 0x40000000, 4, 's'}, - { 'r', 0x50000000, 4, 't'}, - { 'r', 0x60000000, 7, 'f'}, - { 'r', 0x62018000, 17, 'Z'}, - { 'r', 0x62040000, 16, 'x'}, - { 'r', 0x62050000, 16, ESCAPE}, - { 'r', 0x62080000, 13, ';'}, - { 'r', 0x62100000, 12, 'q'}, - { 'r', 0x62200000, 12, 'j'}, - { 'r', 0x62400000, 11, '!'}, - { 'r', 0x62600000, 12, '/'}, - { 'r', 0x62740000, 14, 'z'}, - { 'r', 0x62780000, 13, ')'}, - { 'r', 0x62800000, 9, ':'}, - { 'r', 0x63000000, 8, '\''}, - { 'r', 0x64000000, 7, ','}, - { 'r', 0x66000000, 7, 'v'}, - { 'r', 0x68000000, 6, 'u'}, - { 'r', 0x6c000000, 6, 'm'}, - { 'r', 0x70000000, 5, 'd'}, - { 'r', 0x78000000, 8, '-'}, - { 'r', 0x79000000, 8, 'b'}, - { 'r', 0x7a000000, 9, 'w'}, - { 'r', 0x7a800000, 10, '?'}, - { 'r', 0x7ac00000, 10, 'h'}, - { 'r', 0x7b000000, 8, 'p'}, - { 'r', 0x7c000000, 6, 'k'}, - { 'r', 0x80000000, 3, 'i'}, - { 'r', 0xa0000000, 5, 'n'}, - { 'r', 0xa8000000, 5, 'y'}, - { 'r', 0xb0000000, 7, 'c'}, - { 'r', 0xb2000000, 7, 'g'}, - { 'r', 0xb4000000, 6, 'l'}, - { 'r', 0xb8000000, 6, '.'}, - { 'r', 0xbc000000, 6, 'r'}, - { 'r', 0xc0000000, 3, ' '}, - { 'r', 0xe0000000, 3, 'e'}, - { 's', 0x00000000, 1, ' '}, - { 's', 0x80000000, 4, '.'}, - { 's', 0x90000000, 10, '!'}, - { 's', 0x90400000, 10, 'g'}, - { 's', 0x90800000, 9, 'b'}, - { 's', 0x91000000, 8, 'n'}, - { 's', 0x92000000, 9, 'f'}, - { 's', 0x92800000, 10, 'r'}, - { 's', 0x92c00000, 12, '/'}, - { 's', 0x92d00000, 12, ')'}, - { 's', 0x92e20000, 15, '"'}, - { 's', 0x92e58000, 17, '@'}, - { 's', 0x92e60000, 15, 'z'}, - { 's', 0x92e80000, 13, 'v'}, - { 's', 0x92f00000, 12, STOP}, - { 's', 0x93000000, 8, 'm'}, - { 's', 0x94000000, 6, 'c'}, - { 's', 0x98000000, 5, ','}, - { 's', 0xa0000000, 3, 't'}, - { 's', 0xc0000000, 5, 'o'}, - { 's', 0xc8000000, 5, 's'}, - { 's', 0xd0000000, 6, 'u'}, - { 's', 0xd4000000, 8, 'y'}, - { 's', 0xd5000000, 9, 'w'}, - { 's', 0xd5800000, 10, '?'}, - { 's', 0xd5c00000, 10, '-'}, - { 's', 0xd6000000, 8, ':'}, - { 's', 0xd7000000, 12, ']'}, - { 's', 0xd7100000, 12, ';'}, - { 's', 0xd7200000, 11, 'd'}, - { 's', 0xd7400000, 10, 'q'}, - { 's', 0xd7800000, 9, '\''}, - { 's', 0xd8000000, 6, 'p'}, - { 's', 0xdc000000, 8, 'l'}, - { 's', 0xdd000000, 8, 'k'}, - { 's', 0xde000000, 7, 'a'}, - { 's', 0xe0000000, 4, 'e'}, - { 's', 0xf0000000, 5, 'h'}, - { 's', 0xf8000000, 5, 'i'}, - { 't', 0x00000000, 3, 'i'}, - { 't', 0x20000000, 4, 'a'}, - { 't', 0x30000000, 5, 'u'}, - { 't', 0x38000000, 9, 'n'}, - { 't', 0x38800000, 11, '!'}, - { 't', 0x38a00000, 13, 'g'}, - { 't', 0x38a80000, 13, ';'}, - { 't', 0x38b94000, 19, 'j'}, - { 't', 0x38ba0000, 16, 'E'}, - { 't', 0x38bc0000, 14, ')'}, - { 't', 0x38c00000, 10, '?'}, - { 't', 0x39000000, 8, '-'}, - { 't', 0x3a000000, 7, 'c'}, - { 't', 0x3c000000, 6, '.'}, - { 't', 0x40000000, 3, 'o'}, - { 't', 0x60000000, 3, 'e'}, - { 't', 0x80000000, 2, 'h'}, - { 't', 0xc0000000, 8, 'v'}, - { 't', 0xc1000000, 8, 'm'}, - { 't', 0xc2000000, 7, 'l'}, - { 't', 0xc4000000, 6, 't'}, - { 't', 0xc8000000, 5, 'r'}, - { 't', 0xd0000000, 6, 'y'}, - { 't', 0xd4000000, 11, 'z'}, - { 't', 0xd4300000, 13, 'p'}, - { 't', 0xd4380000, 14, '/'}, - { 't', 0xd43c0000, 14, 'k'}, - { 't', 0xd4400000, 10, 'b'}, - { 't', 0xd4800000, 10, ':'}, - { 't', 0xd4c00000, 11, 'd'}, - { 't', 0xd4e00000, 11, 'f'}, - { 't', 0xd5000000, 8, 'w'}, - { 't', 0xd6000000, 8, ','}, - { 't', 0xd7000000, 8, '\''}, - { 't', 0xd8000000, 5, 's'}, - { 't', 0xe0000000, 3, ' '}, - { 'u', 0x00000000, 5, 'b'}, - { 'u', 0x08000000, 5, ' '}, - { 'u', 0x10000000, 4, 'd'}, - { 'u', 0x20000000, 4, 'e'}, - { 'u', 0x30000000, 5, 'i'}, - { 'u', 0x38000000, 7, 'y'}, - { 'u', 0x3a000000, 8, 'z'}, - { 'u', 0x3b000000, 11, 'w'}, - { 'u', 0x3b200000, 12, 'q'}, - { 'u', 0x3b300000, 13, 'j'}, - { 'u', 0x3b380000, 15, 'u'}, - { 'u', 0x3b3a0000, 15, '?'}, - { 'u', 0x3b400000, 10, '-'}, - { 'u', 0x3b800000, 10, 'o'}, - { 'u', 0x3bc00000, 11, ':'}, - { 'u', 0x3be00000, 12, 'h'}, - { 'u', 0x3bf00000, 12, 'v'}, - { 'u', 0x3c000000, 8, '\''}, - { 'u', 0x3d000000, 9, ','}, - { 'u', 0x3d800000, 10, '.'}, - { 'u', 0x3dc00000, 10, 'x'}, - { 'u', 0x3e000000, 8, 'f'}, - { 'u', 0x3f000000, 8, 'k'}, - { 'u', 0x40000000, 5, 'a'}, - { 'u', 0x48000000, 5, 'g'}, - { 'u', 0x50000000, 4, 'l'}, - { 'u', 0x60000000, 3, 't'}, - { 'u', 0x80000000, 4, 'p'}, - { 'u', 0x90000000, 5, 'c'}, - { 'u', 0x98000000, 5, 'm'}, - { 'u', 0xa0000000, 3, 'n'}, - { 'u', 0xc0000000, 3, 's'}, - { 'u', 0xe0000000, 3, 'r'}, - { 'v', 0x00000000, 3, 'a'}, - { 'v', 0x20000000, 9, 'u'}, - { 'v', 0x20b00000, 12, 'v'}, - { 'v', 0x20c00000, 11, ','}, - { 'v', 0x20e40000, 15, 't'}, - { 'v', 0x20e78000, 18, ESCAPE}, - { 'v', 0x20f00000, 12, 'l'}, - { 'v', 0x21000000, 8, '\''}, - { 'v', 0x22000000, 9, 's'}, - { 'v', 0x22800000, 10, 'r'}, - { 'v', 0x22c00000, 11, 'n'}, - { 'v', 0x22e00000, 12, '@'}, - { 'v', 0x22f00000, 12, ':'}, - { 'v', 0x23000000, 8, 'y'}, - { 'v', 0x24000000, 6, ' '}, - { 'v', 0x28000000, 5, '.'}, - { 'v', 0x30000000, 4, 'o'}, - { 'v', 0x40000000, 2, 'i'}, - { 'v', 0x80000000, 1, 'e'}, - { 'w', 0x00000000, 2, 'i'}, - { 'w', 0x40000000, 5, '.'}, - { 'w', 0x50000000, 4, 'a'}, - { 'w', 0x60000000, 3, 'e'}, - { 'w', 0x80000000, 3, ' '}, - { 'w', 0xa0000000, 3, 's'}, - { 'w', 0xc0000000, 3, 'h'}, - { 'w', 0xe0000000, 5, 'n'}, - { 'w', 0xe8000000, 11, 'f'}, - { 'w', 0xe8200000, 11, ']'}, - { 'w', 0xe8400000, 11, '!'}, - { 'w', 0xe8680000, 13, 'u'}, - { 'w', 0xe8700000, 12, 'g'}, - { 'w', 0xe8800000, 10, ':'}, - { 'w', 0xe8c00000, 12, '?'}, - { 'w', 0xe8d00000, 12, 't'}, - { 'w', 0xe8e00000, 11, 'k'}, - { 'w', 0xe9000000, 9, 'c'}, - { 'w', 0xe9800000, 10, 'm'}, - { 'w', 0xe9c00000, 10, '\''}, - { 'w', 0xea000000, 8, ','}, - { 'w', 0xeb000000, 8, 'l'}, - { 'w', 0xec000000, 7, 'r'}, - { 'w', 0xee000000, 10, 'd'}, - { 'w', 0xee400000, 11, '-'}, - { 'w', 0xee640000, 14, 'j'}, - { 'w', 0xee800000, 9, 'b'}, - { 'w', 0xef000000, 8, 'y'}, - { 'w', 0xf0000000, 4, 'o'}, - { 'x', 0x00000000, 4, 'i'}, - { 'x', 0x10000000, 5, 'u'}, - { 'x', 0x18000000, 6, 'f'}, - { 'x', 0x1c000000, 7, ','}, - { 'x', 0x1e000000, 7, 'm'}, - { 'x', 0x20000000, 4, 'a'}, - { 'x', 0x30b00000, 12, '/'}, - { 'x', 0x30c00000, 10, '?'}, - { 'x', 0x32000000, 7, 'y'}, - { 'x', 0x34000000, 6, 'o'}, - { 'x', 0x38000000, 5, 'e'}, - { 'x', 0x40000000, 2, 'p'}, - { 'x', 0x80000000, 4, 'c'}, - { 'x', 0x90000000, 6, '.'}, - { 'x', 0x94000000, 9, ':'}, - { 'x', 0x94800000, 10, 'l'}, - { 'x', 0x94e00000, 11, 'b'}, - { 'x', 0x95000000, 8, '\''}, - { 'x', 0x97000000, 9, 'h'}, - { 'x', 0x97800000, 10, 'w'}, - { 'x', 0x97d80000, 13, ';'}, - { 'x', 0x97e00000, 11, ')'}, - { 'x', 0x98000000, 5, '-'}, - { 'x', 0xa0000000, 3, ' '}, - { 'x', 0xc0000000, 2, 't'}, - { 'y', 0x00000000, 3, 'o'}, - { 'y', 0x20000000, 7, 'w'}, - { 'y', 0x22000000, 11, ')'}, - { 'y', 0x222a0000, 15, 'x'}, - { 'y', 0x22300000, 12, 'k'}, - { 'y', 0x22400000, 10, ';'}, - { 'y', 0x22c00000, 12, ESCAPE}, - { 'y', 0x22e00000, 11, '/'}, - { 'y', 0x23000000, 8, 'b'}, - { 'y', 0x24000000, 6, 'a'}, - { 'y', 0x28000000, 6, 'i'}, - { 'y', 0x2c000000, 6, 'd'}, - { 'y', 0x30000000, 4, 's'}, - { 'y', 0x40000000, 8, '?'}, - { 'y', 0x41000000, 8, 'r'}, - { 'y', 0x42000000, 8, 'p'}, - { 'y', 0x43000000, 8, 'f'}, - { 'y', 0x44000000, 6, 'n'}, - { 'y', 0x48000000, 5, ','}, - { 'y', 0x50000000, 4, '.'}, - { 'y', 0x60000000, 5, 'e'}, - { 'y', 0x68000000, 7, 't'}, - { 'y', 0x6a000000, 7, 'm'}, - { 'y', 0x6c000000, 6, ':'}, - { 'y', 0x70000000, 5, '\''}, - { 'y', 0x78000000, 10, 'h'}, - { 'y', 0x78400000, 10, '!'}, - { 'y', 0x78810000, 16, 'T'}, - { 'y', 0x78830000, 16, 'P'}, - { 'y', 0x78880000, 13, '"'}, - { 'y', 0x78900000, 12, STOP}, - { 'y', 0x78a00000, 11, ']'}, - { 'y', 0x78c00000, 10, 'g'}, - { 'y', 0x79000000, 8, 'c'}, - { 'y', 0x7a000000, 7, '-'}, - { 'y', 0x7c000000, 6, 'l'}, - { 'y', 0x80000000, 1, ' '}, - { 'z', 0x04000000, 7, '\''}, - { 'z', 0x07000000, 8, 't'}, - { 'z', 0x08000000, 6, ','}, - { 'z', 0x0c000000, 6, '.'}, - { 'z', 0x10000000, 4, 'l'}, - { 'z', 0x20000000, 3, 'a'}, - { 'z', 0x40000000, 4, 'y'}, - { 'z', 0x50000000, 5, 'o'}, - { 'z', 0x5c800000, 11, 's'}, - { 'z', 0x5cc00000, 12, 'h'}, - { 'z', 0x5d000000, 8, 'm'}, - { 'z', 0x5e000000, 9, '-'}, - { 'z', 0x5e800000, 9, 'u'}, - { 'z', 0x5f100000, 14, 'q'}, - { 'z', 0x5f140000, 14, 'n'}, - { 'z', 0x5f180000, 13, 'v'}, - { 'z', 0x5f800000, 9, 'b'}, - { 'z', 0x60000000, 3, 'z'}, - { 'z', 0x80000000, 2, 'e'}, - { 'z', 0xc0000000, 3, ' '}, - { 'z', 0xe0000000, 3, 'i'}, - { '}', 0x0819c000, 18, STOP} -}; diff --git a/src/sectionsd/Makefile.am b/src/sectionsd/Makefile.am deleted file mode 100644 index 813ed0596..000000000 --- a/src/sectionsd/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/src/zapit/include \ - -I$(top_srcdir)/lib/libconfigfile \ - -I$(top_srcdir)/lib/connection \ - -I$(top_srcdir)/lib/libeventserver \ - -I$(top_srcdir)/lib/xmltree - -if BOXTYPE_COOL -INCLUDES += -I$(top_srcdir)/lib/libcoolstream -endif -if BOXTYPE_TRIPLE -INCLUDES += -I$(top_srcdir)/lib/libtriple -endif - -AM_CPPFLAGS = -D DO_NOT_INCLUDE_STUFF_NOT_NEEDED_FOR_SECTIONSD - -noinst_LIBRARIES = libsectionsd.a -libsectionsd_a_SOURCES = sectionsd.cpp dmxapi.cpp debug.cpp dmx.cpp SIsections.cpp SIevents.cpp SIutils.cpp SIlanguage.cpp edvbstring.cpp diff --git a/src/sectionsd/SIbouquets.hpp b/src/sectionsd/SIbouquets.hpp deleted file mode 100644 index 42b8414c0..000000000 --- a/src/sectionsd/SIbouquets.hpp +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef SIBOUQUETS_HPP -#define SIBOUQUETS_HPP -// -// $Id: SIbouquets.hpp,v 1.2 2006/02/08 21:15:50 houdini Exp $ -// -// classes SIservices and SIservices (dbox-II-project) -// -// Homepage: http://dbox2.elxsi.de -// -// Copyright (C) 2001 fnbrd (fnbrd@gmx.de), -// 2002 thegoodguy (thegoodguy@berlios.de) -// -// 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. -// - - -#include -#include - -#include - -// forward references -class SIservice; -class SIevent; -class SIbouquet; - -struct loop_len { -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned reserved_future_use : 4; - unsigned descriptors_loop_length_hi : 4; -#else - unsigned descriptors_loop_length_hi : 4; - unsigned reserved_future_use : 4; -#endif - unsigned descriptors_loop_length_lo : 8; -} __attribute__ ((packed)) ; // 2 Bytes - -struct bat_service { - - unsigned transport_stream_id_hi : 8; - unsigned transport_stream_id_lo : 8; - unsigned original_network_id_hi : 8; - unsigned original_network_id_lo : 8; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned reserved_future_use : 4; - unsigned descriptors_loop_length_hi : 4; -#else - unsigned descriptors_loop_length_hi : 4; - unsigned reserved_future_use : 4; -#endif - unsigned descriptors_loop_length_lo : 8; - -} __attribute__ ((packed)) ; // 6 Bytes - - - -class SIbouquet { -public: - SIbouquet(const t_bouquet_id _bouquet_id) { - - bouquet_id = _bouquet_id; - transport_stream_id = 0; - original_network_id = 0; - service_id = 0; - serviceTyp = 0; -// position = 0; - bouquetName = ""; - } - - // Um einen service zum Suchen zu erstellen - SIbouquet(const t_bouquet_id _bouquet_id, const t_service_id _service_id, const t_original_network_id _original_network_id, const t_transport_stream_id _transport_stream_id) - { - service_id = _service_id; - original_network_id = _original_network_id; - transport_stream_id = _transport_stream_id; - serviceTyp = 0; -// position = 0; - } - // Std-Copy - SIbouquet(const SIbouquet &s) { - - service_id = s.service_id; - original_network_id = s.original_network_id; - transport_stream_id = s.transport_stream_id; - bouquet_id = s.bouquet_id; - bouquetName = s.bouquetName; - serviceTyp = s.serviceTyp; - position = s.position; - } - - t_bouquet_id bouquet_id; // This is because of wrong design of sectionsd. Normally we would parse only tables instead of sections... - std::string bouquetName; // This is because of wrong design of sectionsd. Normally we would parse only tables instead of sections... - t_original_network_id original_network_id; - t_transport_stream_id transport_stream_id; - t_service_id service_id; - uint16_t position; - unsigned char serviceTyp; - bool operator < (const SIbouquet& s) const { - return uniqueKey() < s.uniqueKey(); - } - - t_bouquetentry_id uniqueKey(void) const { - return CREATE_BOUQUETENTRY_ID(bouquet_id, (uint16_t) serviceTyp, position, service_id); - } - - void dump(void) const { - - printf("Bouquet-ID: %hu\n", bouquet_id); - printf("Original-Network-ID: %hu\n", original_network_id); - printf("Transport-Stream-ID: %hu\n", transport_stream_id); - printf("Service-ID: %hu\n", service_id); - printf("Service-Typ: %hhu\n", serviceTyp); - if(bouquetName.length()) - printf("Bouquet-Name: %s\n", bouquetName.c_str()); - } -}; - -// Fuer for_each -struct printSIbouquet : public std::unary_function -{ - void operator() (const SIbouquet &s) { s.dump();} -}; - -// Als Klasse, da ich nicht weiss, wie man eine Forward-Referenz auf ein typedef macht -class SIbouquets : public std::set > -{ -}; - -#endif // SIBOUQUETS_HPP diff --git a/src/sectionsd/SIevents.cpp b/src/sectionsd/SIevents.cpp deleted file mode 100644 index 136e134c2..000000000 --- a/src/sectionsd/SIevents.cpp +++ /dev/null @@ -1,595 +0,0 @@ -// -// $Id: SIevents.cpp,v 1.35 2008/08/16 19:23:18 seife Exp $ -// -// classes SIevent and SIevents (dbox-II-project) -// -// Homepage: http://dbox2.elxsi.de -// -// Copyright (C) 2001 fnbrd (fnbrd@gmx.de) -// -// 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. -// -// - -#include -#include -#include - -#include -#include -#include -#include // fuer poll() - -#include -#include -#include - -#include "SIlanguage.hpp" -#include "SIutils.hpp" -#include "SIservices.hpp" -#include "SIevents.hpp" -#ifdef UPDATE_NETWORKS -#include "SIbouquets.hpp" -#include "SInetworks.hpp" -#endif -#include "SIsections.hpp" -#include "dmxapi.h" - -const std::string languangeOFF = "OFF"; - -SIevent::SIevent(const struct eit_event *e) -{ - eventID = (e->event_id_hi << 8) | e->event_id_lo; - time_t start_time = changeUTCtoCtime(((const unsigned char *)e) + 2); - unsigned long duration = 0; - - if (!((e->duration_hi == 0xff) && (e->duration_mid == 0xff) && (e->duration_lo == 0xff))) - duration = ((e->duration_hi)>>4)*10*3600L + ((e->duration_hi)&0x0f)*3600L + - ((e->duration_mid)>>4)*10*60L + ((e->duration_mid)&0x0f)*60L + - ((e->duration_lo)>>4)*10 + ((e->duration_lo)&0x0f); - - if (start_time && duration) - times.insert(SItime(start_time, duration)); - - running = (int)e->running_status; - - table_id = 0xFF; /* not set */ - version = 0xFF; - service_id = 0; - original_network_id = 0; - transport_stream_id = 0; -} - -SIevent::SIevent(const t_original_network_id _original_network_id, const t_transport_stream_id _transport_stream_id, const t_service_id _service_id, - const unsigned short _event_id) -{ - original_network_id = _original_network_id; - transport_stream_id = _transport_stream_id; - service_id = _service_id; - eventID = _event_id; - table_id = 0xFF; /* not set */ - version = 0xFF; - running = 0; - /* contentClassification = ""; - userClassification = ""; - itemDescription = ""; - item = ""; - extendedText = "";*/ -} - -// Std-Copy -SIevent::SIevent(const SIevent &e) -{ - eventID=e.eventID; - langName=e.langName; - langText=e.langText; -// startzeit=e.startzeit; -// dauer=e.dauer; - times=e.times; - service_id = e.service_id; - original_network_id = e.original_network_id; - transport_stream_id = e.transport_stream_id; - itemDescription=e.itemDescription; - item=e.item; - langExtendedText=e.langExtendedText; - contentClassification=e.contentClassification; - userClassification=e.userClassification; - components=e.components; - ratings=e.ratings; - linkage_descs=e.linkage_descs; - running=e.running; - vps = e.vps; - table_id = e.table_id; - version = e.version; -} - -int SIevent::saveXML(FILE *file, const char *serviceName) const -{ - if(saveXML0(file)) - return 1; - if(serviceName) { - if(fprintf(file, " ")<0) - return 2; - saveStringToXMLfile(file, serviceName); - if(fprintf(file, "\n")<0) - return 3; - } - return saveXML2(file); -} - -char SIevent::getFSK() const -{ - for (SIparentalRatings::iterator it = ratings.begin(); it != ratings.end(); ++it) - { - if (it->countryCode == "DEU") - { - if ((it->rating >= 0x01) && (it->rating <= 0x0F)) - return (it->rating + 3); // 0x01 to 0x0F minimum age = rating + 3 years - else - return (it->rating == 0 ? 0 : 18); // return FSK 18 for : 0x10 to 0xFF defined by the broadcaster - } - } - if (!ratings.empty()) - { - if ((ratings.begin()->rating >= 0x01) && (ratings.begin()->rating <= 0x0F)) - return (ratings.begin()->rating + 3); - else - return (ratings.begin()->rating == 0 ? 0 : 18); - } - - return 0x00; // 0x00 undefined -} - -int SIevent::saveXML0(FILE *file) const -{ - if(fprintf(file, "\t\t\n", eventID)<0) - return 1; - return 0; -} - -int SIevent::saveXML2(FILE *file) const -{ - for (std::map::const_iterator - i = langName.begin() ; - i != langName.end() ; - i++) { - if (i->second.length()) { - fprintf(file, "\t\t\tfirst.c_str()); - saveStringToXMLfile(file, i->second.c_str()); - fprintf(file, "\"/>\n"); - } - } - for (std::map::const_iterator - i = langText.begin() ; - i != langText.end() ; - i++) { - if (i->second.length()) { - fprintf(file, "\t\t\tfirst.c_str()); - saveStringToXMLfile(file, i->second.c_str()); - fprintf(file, "\"/>\n"); - } - } - if(item.length()) { - fprintf(file, "\t\t\t\n"); - } - if(itemDescription.length()) { - fprintf(file, "\t\t\t\n"); - } - for (std::map::const_iterator - i = langExtendedText.begin() ; - i != langExtendedText.end() ; - i++) { - if (i->second.length()) { - fprintf(file, "\t\t\tfirst.c_str()); - saveStringToXMLfile(file, i->second.c_str()); - fprintf(file, "\"/>\n"); - } - } - for_each(times.begin(), times.end(), saveSItimeXML(file)); - for(unsigned i=0; i\n", contentClassification[i], userClassification[i]); - for_each(components.begin(), components.end(), saveSIcomponentXML(file)); - for_each(ratings.begin(), ratings.end(), saveSIparentalRatingXML(file)); - for_each(linkage_descs.begin(), linkage_descs.end(), saveSIlinkageXML(file)); - fprintf(file, "\t\t\n"); - return 0; -} - -std::string SIevent::getName() const -{ - if (CSectionsdClient::LANGUAGE_MODE_OFF == SIlanguage::getMode()) { - std::map::const_iterator it = langName.begin() ; - if (it != langName.end()) return it->second; - else return(""); - } else { - std::string retval; - SIlanguage::filter(langName, 1, retval); - return retval; - } -} - -void SIevent::setName(const std::string &lang, const std::string &name) -{ - std::string tmp = name; - std::replace(tmp.begin(), tmp.end(), '\n', ' '); -//printf("setName: lang %s text %s\n", lang.c_str(), name.c_str()); - if (CSectionsdClient::LANGUAGE_MODE_OFF == SIlanguage::getMode()) { - langName[languangeOFF] = tmp; //name; - } else { - langName[lang] = tmp; //name; - } -} - -std::string SIevent::getText() const -{ - if (CSectionsdClient::LANGUAGE_MODE_OFF == SIlanguage::getMode()) { - std::map::const_iterator it = langText.begin() ; - if (it != langText.end()) return it->second; - else return(""); - } else { - std::string retval; - SIlanguage::filter(langText, 0, retval); - return retval; - } -} - -void SIevent::setText(const std::string &lang, const std::string &text) -{ -//printf("setText: lang %s text %s\n", lang.c_str(), text.c_str()); - if (CSectionsdClient::LANGUAGE_MODE_OFF == SIlanguage::getMode()) { - langText[languangeOFF] = text; - } else { - langText[lang] = text; - } -} - -std::string SIevent::getExtendedText() const -{ - if (CSectionsdClient::LANGUAGE_MODE_OFF == SIlanguage::getMode()) { - std::map::const_iterator it = langExtendedText.begin() ; - if (it != langExtendedText.end()) return it->second; - else return(""); - } else { - std::string retval; - SIlanguage::filter(langExtendedText, 0, retval); - return retval; - } -} - -void SIevent::appendExtendedText(const std::string &lang, const std::string &text) -{ - if (CSectionsdClient::LANGUAGE_MODE_OFF == SIlanguage::getMode()) { - langExtendedText[languangeOFF] += text; - } else { - langExtendedText[lang] += text; - } -} - -void SIevent::setExtendedText(const std::string &lang, const std::string &text) -{ -//printf("setExtendedText: lang %s text %s\n", lang.c_str(), text.c_str()); - if (CSectionsdClient::LANGUAGE_MODE_OFF == SIlanguage::getMode()) { - langExtendedText[languangeOFF] = text; - } else { - langExtendedText[lang] = text; - } -} - -void SIevent::dump(void) const -{ - printf("Unique key: %llx\n", uniqueKey()); - if(original_network_id) - printf("Original-Network-ID: %hu\n", original_network_id); - if (service_id) - printf("Service-ID: %hu\n", service_id); - printf("Event-ID: %hu\n", eventID); - if(item.length()) - printf("Item: %s\n", item.c_str()); - if(itemDescription.length()) - printf("Item-Description: %s\n", itemDescription.c_str()); - - for (std::map::const_iterator it = langName.begin() ; - it != langName.end() ; ++it) - printf("Name (%s): %s\n", it->first.c_str(), it->second.c_str()); - for (std::map::const_iterator it = langText.begin() ; - it != langText.end() ; ++it) - printf("Text (%s): %s\n", it->first.c_str(), it->second.c_str()); - for (std::map::const_iterator it = langExtendedText.begin() ; - it != langExtendedText.end() ; ++it) - printf("Extended-Text (%s): %s\n", it->first.c_str(), it->second.c_str()); - - if(contentClassification.length()) { - printf("Content classification:"); - for(unsigned i=0; i::const_iterator it = langName.begin() ; - it != langName.end() ; ++it) - printf("Name (%s): %s\n", it->first.c_str(), it->second.c_str()); - for (std::map::const_iterator it = langText.begin() ; - it != langText.end() ; ++it) - printf("Text (%s): %s\n", it->first.c_str(), it->second.c_str()); - for (std::map::const_iterator it = langExtendedText.begin() ; - it != langExtendedText.end() ; ++it) - printf("Extended-Text (%s): %s\n", it->first.c_str(), it->second.c_str()); - /* - if(startzeit) - printf("Startzeit: %s", ctime(&startzeit)); - if(dauer) - printf("Dauer: %02u:%02u:%02u (%umin, %us)\n", dauer/3600, (dauer%3600)/60, dauer%60, dauer/60, dauer); - */ - for_each(times.begin(), times.end(), printSItime()); - for_each(ratings.begin(), ratings.end(), printSIparentalRating()); - for_each(linkage_descs.begin(), linkage_descs.end(), printSIlinkage()); -} -#endif -/* -// Liest n Bytes aus einem Socket per read -inline int readNbytes(int fd, char *buf, int n) -{ -int j; -for(j=0; jservice_id == serviceID) - for (SItimes::iterator t = k->times.begin(); t != k->times.end(); ++t) - if ((t->startzeit <= zeit) && (zeit <= (long)(t->startzeit+t->dauer))) { - close(fd); - return SIevent(*k); - } - } - - else { - delete[] buf; - } - - } while (time(NULL) < szeit + (long)timeoutInSeconds); - - close(fd); - return evt; -} - -void SIevents::removeOldEvents(long seconds) -{ - time_t current_time = time(NULL); - - for(SIevents::iterator it = begin(); it != end(); ) - { - // "it->times.erase(kt);": - // passing `const SItimes' as `this' argument of `void set,allocator >::erase(_Rb_tree_iterator)' discards qualifiers - - // hence we have to modify a copy - - SIevent copy_of_event(*it); - bool copy_has_changed = false; - - for (SItimes::iterator jt = copy_of_event.times.begin(); jt != copy_of_event.times.end(); ) - { - if ((jt->startzeit) + (int)(jt->dauer) < current_time - seconds) - { - copy_of_event.times.erase(jt++); - copy_has_changed = true; - } - else - ++jt; - } - if (copy_has_changed) - { - erase(it++); - - // Set has the important property that inserting a new element into a set does not - // invalidate iterators that point to existing elements. - if (!copy_of_event.times.empty()) -#ifdef DEBUG - assert((++insert(it, copy_of_event)) == it); -#else - insert(it, copy_of_event); // it is the hint where to insert (I hope that doesn't invalidate it) -// insert(copy_of_event); // alternative method without hint -#endif - - } - else - ++it; - } -} - -// Entfernt anhand der Services alle time shifted events (ohne Text, -// mit service-id welcher im nvod steht) -// und sortiert deren Zeiten in die Events mit dem Text ein. -void SIevents::mergeAndRemoveTimeShiftedEvents(const SIservices &services) -{ - // Wir gehen alle services durch, suchen uns die services mit nvods raus - // und fuegen dann die Zeiten der Events mit der service-id eines nvods - // in das entsprechende Event mit der service-id das die nvods hat ein. - // die 'nvod-events' werden auch geloescht - -// SIevents eventsToDelete; // Hier rein kommen Events die geloescht werden sollen - for(SIservices::iterator k=services.begin(); k!=services.end(); ++k) - if(k->nvods.size()) { - // NVOD-Referenzen gefunden - // Zuerst mal das Event mit dem Text holen - iterator e; - for(e=begin(); e!=end(); ++e) - if(e->service_id == k->service_id) - break; - if(e!=end()) { - // *e == event mit dem Text - SIevent newEvent(*e); // Kopie des Events - // Jetzt die nvods druchgehen und deren Uhrzeiten in obiges Event einfuegen - for(SInvodReferences::iterator n=k->nvods.begin(); n!=k->nvods.end(); ++n) { - // Alle druchgehen und deren Events suchen - for(iterator en=begin(); en!=end(); en++) { - if(en->service_id==n->getServiceID()) { - newEvent.times.insert(en->times.begin(), en->times.end()); -// newEvent.times.insert(SItime(en->startzeit, en->dauer)); -// eventsToDelete.insert(SIevent(*en)); - } - } - } - erase(e); // Altes Event loeschen -> iterator (e) ungültig - insert(newEvent); // und das erweiterte Event wieder einfuegen - } - } - - // - // delete all events with serviceID that have a service type 0 - // - for (iterator it = begin(); it != end(); ) - { - SIservices::iterator s = services.find(SIservice(it->service_id, it->original_network_id, it->transport_stream_id)); - if ((s != services.end()) && (s->serviceTyp == 0)) - { - // Set is a Sorted Associative Container - // Erasing an element from a set also does not invalidate any iterators, - // except, of course, for iterators that actually point to the element - // that is being erased. - erase(it++); - } - else - ++it; - } -} -#endif diff --git a/src/sectionsd/SIevents.hpp b/src/sectionsd/SIevents.hpp deleted file mode 100644 index 962da26b2..000000000 --- a/src/sectionsd/SIevents.hpp +++ /dev/null @@ -1,489 +0,0 @@ -#ifndef SIEVENTS_HPP -#define SIEVENTS_HPP -// -// $Id: SIevents.hpp,v 1.29 2008/08/16 19:23:18 seife Exp $ -// -// classes SIevent and SIevents (dbox-II-project) -// -// Homepage: http://dbox2.elxsi.de -// -// Copyright (C) 2001 fnbrd (fnbrd@gmx.de) -// -// 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. -// - -#include -#include -#include - -#include -#include "edvbstring.h" -//#include "SIutils.hpp" - -// forward references -class SIservice; -class SIservices; -class SIbouquets; - -struct eit_event { - unsigned event_id_hi : 8; - unsigned event_id_lo : 8; - unsigned start_time_hi : 8; - unsigned start_time_hi2 : 8; - unsigned start_time_mid : 8; - unsigned start_time_lo2 : 8; - unsigned start_time_lo : 8; - unsigned duration_hi : 8; - unsigned duration_mid : 8; - unsigned duration_lo : 8; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned running_status : 3; - unsigned free_CA_mode : 1; - unsigned descriptors_loop_length_hi : 4; -#else - unsigned descriptors_loop_length_hi : 4; - unsigned free_CA_mode : 1; - unsigned running_status : 3; -#endif - unsigned descriptors_loop_length_lo : 8; -} __attribute__ ((packed)) ; - - -struct descr_component_header { - unsigned descriptor_tag : 8; - unsigned descriptor_length : 8; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned reserved_future_use : 4; - unsigned stream_content : 4; -#else - unsigned stream_content : 4; - unsigned reserved_future_use : 4; -#endif - unsigned component_type : 8; - unsigned component_tag : 8; - unsigned iso_639_2_language_code_hi : 8; - unsigned iso_639_2_language_code_mid : 8; - unsigned iso_639_2_language_code_lo : 8; -} __attribute__ ((packed)) ; - -struct descr_linkage_header { - unsigned descriptor_tag : 8; - unsigned descriptor_length : 8; - unsigned transport_stream_id_hi : 8; - unsigned transport_stream_id_lo : 8; - unsigned original_network_id_hi : 8; - unsigned original_network_id_lo : 8; - unsigned service_id_hi : 8; - unsigned service_id_lo : 8; - unsigned linkage_type : 8; -} __attribute__ ((packed)) ; - -struct descr_pdc_header { - unsigned descriptor_tag : 8; - unsigned descriptor_length : 8; - unsigned pil0 : 8; - unsigned pil1 : 8; - unsigned pil2 : 8; -} __attribute__ ((packed)) ; - -class SIlinkage { -public: - SIlinkage(const struct descr_linkage_header *link) { - linkageType = link->linkage_type; - transportStreamId = (link->transport_stream_id_hi << 8) | link->transport_stream_id_lo; - originalNetworkId = (link->original_network_id_hi << 8) | link->original_network_id_lo; - serviceId = (link->service_id_hi << 8) | link->service_id_lo; - if (link->descriptor_length > sizeof(struct descr_linkage_header) - 2) - //name = std::string(((const char *)link) + sizeof(struct descr_linkage_header), link->descriptor_length - (sizeof(struct descr_linkage_header) - 2)); - name = convertDVBUTF8(((const char *)link)+sizeof(struct descr_linkage_header), link->descriptor_length-(sizeof(struct descr_linkage_header)-2), 0, 0); - } - - // Std-copy - SIlinkage(const SIlinkage &l) { - linkageType = l.linkageType; - transportStreamId = l.transportStreamId; - originalNetworkId = l.originalNetworkId; - serviceId = l.serviceId; - name = l.name; - } - - // default - SIlinkage(void) { - linkageType = 0; - transportStreamId = 0; - originalNetworkId = 0; - serviceId = 0; -// name = ; - } - - // Der Operator zum sortieren - bool operator < (const SIlinkage& l) const { - return name < l.name; - } - - void dump(void) const { - printf("Linakge Type: 0x%02hhx\n", linkageType); - if (name.length()) - printf("Name: %s\n", name.c_str()); - printf("Transport Stream Id: 0x%04hhx\n", transportStreamId); - printf("Original Network Id: 0x%04hhx\n", originalNetworkId); - printf("Service Id: 0x%04hhx\n", serviceId); - } - - int saveXML(FILE *file) const { - fprintf(file, "\t\t\t\n", transportStreamId, originalNetworkId, serviceId); -// %s, , name.c_str())<0) -// return 1; - return 0; - } - - unsigned char linkageType; // Linkage Descriptor - std::string name; // Text aus dem Linkage Descriptor - t_transport_stream_id transportStreamId; // Linkage Descriptor - t_original_network_id originalNetworkId; // Linkage Descriptor - t_service_id serviceId; // Linkage Descriptor -}; - -// Fuer for_each -struct printSIlinkage : public std::unary_function -{ - void operator() (const SIlinkage &l) { l.dump();} -}; - -// Fuer for_each -struct saveSIlinkageXML : public std::unary_function -{ - FILE *f; - saveSIlinkageXML(FILE *fi) { f=fi;} - void operator() (const SIlinkage &l) { l.saveXML(f);} -}; - -//typedef std::multiset > SIlinkage_descs; -typedef std::vector SIlinkage_descs; - -class SIcomponent { - public: - SIcomponent(const struct descr_component_header *comp) { - streamContent=comp->stream_content; - componentType=comp->component_type; - componentTag=comp->component_tag; - if(comp->descriptor_length>sizeof(struct descr_component_header)-2) - //component=std::string(((const char *)comp)+sizeof(struct descr_component_header), comp->descriptor_length-(sizeof(struct descr_component_header)-2)); - component=convertDVBUTF8(((const char *)comp)+sizeof(struct descr_component_header), comp->descriptor_length-(sizeof(struct descr_component_header)-2), 0, 0); - } - // Std-copy - SIcomponent(const SIcomponent &c) { - streamContent=c.streamContent; - componentType=c.componentType; - componentTag=c.componentTag; - component=c.component; - } - - SIcomponent(void) { - streamContent=0; - componentType=0; - componentTag=0; - } - // Der Operator zum sortieren - bool operator < (const SIcomponent& c) const { - return streamContent < c.streamContent; -// return component < c.component; - } - void dump(void) const { - if(component.length()) - printf("Component: %s\n", component.c_str()); - printf("Stream Content: 0x%02hhx\n", streamContent); - printf("Component type: 0x%02hhx\n", componentType); - printf("Component tag: 0x%02hhx\n", componentTag); - } - int saveXML(FILE *file) const { - fprintf(file, "\t\t\t\n"); -// %s -// return 1; -// saveStringToXMLfile(file, component.c_str()); -// fprintf(file, "\"/>\n"); - return 0; - } - std::string component; // Text aus dem Component Descriptor - unsigned char componentType; // Component Descriptor - unsigned char componentTag; // Component Descriptor - unsigned char streamContent; // Component Descriptor -}; - -// Fuer for_each -struct printSIcomponent : public std::unary_function -{ - void operator() (const SIcomponent &c) { c.dump();} -}; - -// Fuer for_each -struct saveSIcomponentXML : public std::unary_function -{ - FILE *f; - saveSIcomponentXML(FILE *fi) { f=fi;} - void operator() (const SIcomponent &c) { c.saveXML(f);} -}; - -typedef std::multiset > SIcomponents; - -class SIparentalRating { - public: - SIparentalRating(const std::string &cc, unsigned char rate) { - rating=rate; - countryCode=cc; - } - // Std-Copy - SIparentalRating(const SIparentalRating &r) { - rating=r.rating; - countryCode=r.countryCode; - } - // Der Operator zum sortieren - bool operator < (const SIparentalRating& c) const { - return countryCode < c.countryCode; - } - void dump(void) const { - printf("Rating: %s %hhu (+3)\n", countryCode.c_str(), rating); - } - int saveXML(FILE *file) const { - if(fprintf(file, "\t\t\t\n", countryCode.c_str(), rating)<0) - return 1; - return 0; - } - std::string countryCode; - unsigned char rating; // Bei 1-16 -> Minumim Alter = rating +3 -}; - -// Fuer for_each -struct printSIparentalRating : public std::unary_function -{ - void operator() (const SIparentalRating &r) { r.dump();} -}; - -// Fuer for_each -struct saveSIparentalRatingXML : public std::unary_function -{ - FILE *f; - saveSIparentalRatingXML(FILE *fi) { f=fi;} - void operator() (const SIparentalRating &r) { r.saveXML(f);} -}; - -typedef std::set > SIparentalRatings; - -class SItime { - public: - SItime(time_t s, unsigned d) { - startzeit=s; - dauer=d; // in Sekunden, 0 -> time shifted (cinedoms) - } - // Std-Copy - SItime(const SItime &t) { - startzeit=t.startzeit; - dauer=t.dauer; - } - // Der Operator zum sortieren - bool operator < (const SItime& t) const { - return startzeit < t.startzeit; - } - void dump(void) const { - printf("Startzeit: %s", ctime(&startzeit)); - printf("Dauer: %02u:%02u:%02u (%umin, %us)\n", dauer/3600, (dauer%3600)/60, dauer%60, dauer/60, dauer); - } - int saveXML(FILE *file) const { // saves the time - // Ist so noch nicht in Ordnung, das sollte untergliedert werden, - // da sonst evtl. time,date,duration,time,date,... auftritt - // und eine rein sequentielle Ordnung finde ich nicht ok. - /* - struct tm *zeit=localtime(&startzeit); - fprintf(file, "\t\t\t\t\t\n", zeit->tm_hour, zeit->tm_min, zeit->tm_sec); - fprintf(file, "\t\t\t\t\t%02d.%02d.%04d\n", zeit->tm_mday, zeit->tm_mon+1, zeit->tm_year+1900); - fprintf(file, "\t\t\t\t\t%u\n", dauer); - */ - fprintf(file, "\t\t\t