diff --git a/.gitignore b/.gitignore
index 1443eff76..1ab909897 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,9 +26,9 @@ INSTALL
.*.swp
### editor crap
-*.orig
-*.rej
-*~
+#*.orig
+#*.rej
+#*~
### binaries that fall out of the build
lib/sectionsdclient/sectionsdcontrol
@@ -50,3 +50,4 @@ local_build_config.h
.directory
# kate
*-swp
+compile
diff --git a/configure.ac b/configure.ac
index b0651c6a8..eb5e2f2a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,6 +282,8 @@ src/nhttpd/web/images/Makefile
src/nhttpd/web/scripts/Makefile
src/nhttpd/web/languages/Makefile
src/nhttpd/web/styles/Makefile
+src/nhttpd/web/jquery/Makefile
+src/nhttpd/web/info/Makefile
src/nhttpd/tuxboxapi/Makefile
src/nhttpd/yhttpd_core/Makefile
src/nhttpd/yhttpd_mods/Makefile
@@ -302,6 +304,7 @@ src/system/mtdutils/lib/Makefile
data/Makefile
data/fonts/Makefile
data/icons/Makefile
+data/icons/screensaver/Makefile
data/inetradio/Makefile
data/initial/Makefile
data/iso-codes/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index ef9881b5e..a1ac6379a 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,4 +1,5 @@
-SUBDIRS = fonts icons inetradio initial iso-codes license locale scripts themes neutrino-scripts
+#SUBDIRS = fonts icons inetradio initial iso-codes license locale scripts themes neutrino-scripts //NI
+SUBDIRS = fonts icons inetradio iso-codes license locale scripts themes neutrino-scripts
if BOXTYPE_TRIPLE
SUBDIRS += lcd
@@ -7,5 +8,8 @@ endif
configdir = $(CONFIGDIR)
config_DATA = cables.xml satellites.xml encoding.conf tobackup.conf providermap.xml settingsupdate.conf terrestrial.xml bad_package_pattern.list.sample
+#NI
+config_DATA += epglanguages.conf webtv_usr.xml
+
install-data-hook:
$(INSTALL) -d $(DESTDIR)/$(CONFIGDIR)/zapit
diff --git a/data/epglanguages.conf b/data/epglanguages.conf
new file mode 100644
index 000000000..cbe98b8a6
--- /dev/null
+++ b/data/epglanguages.conf
@@ -0,0 +1,6 @@
+FIRST_ALL
+deu
+ger
+eng
+fra
+fre
diff --git a/data/fonts/Makefile.am b/data/fonts/Makefile.am
index 7f822c6b1..36d1092fe 100644
--- a/data/fonts/Makefile.am
+++ b/data/fonts/Makefile.am
@@ -1,16 +1,17 @@
installdir = $(FONTDIR)
install_DATA = \
- md_khmurabi_10.ttf \
micron_bold.ttf \
- micron_italic.ttf \
micron.ttf \
neutrino.ttf \
pakenham.ttf \
DejaVuLGCSansMono-Bold.ttf \
- tuxtxt.ttf \
tuxtxt.otb
if BOXMODEL_APOLLO
-install_DATA += UnDotum.ttf
+#install_DATA += UnDotum.ttf
endif
+
+#NI
+install-data-hook:
+ cd $(DESTDIR)$(FONTDIR) && ln -sf neutrino.ttf tuxtxt.ttf
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index d1bbad31a..7dc716d5b 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,3 +1,6 @@
+#NI
+SUBDIRS = screensaver
+
installdir = $(ICONSDIR)
locale = \
@@ -21,7 +24,7 @@ locale_unmaintained = \
locale/unmaintained/svenska.png
install_DATA = $(locale)
-install_DATA += $(locale_unmaintained)
+#install_DATA += $(locale_unmaintained)
install_DATA += \
0.png \
@@ -58,6 +61,7 @@ install_DATA += \
ca2.png \
ca2_gray.png \
checkmark.png \
+ clock_face.png \
colors.png \
conax_green.png \
conax_white.png \
@@ -91,6 +95,7 @@ install_DATA += \
hint_audio.png \
hint_back.png \
hint_bedit.png \
+ hint_blank_screen.png \
hint_ci.png \
hint_dboxinfo.png \
hint_delete.png \
@@ -98,11 +103,18 @@ install_DATA += \
hint_fileplay.png \
hint_games.png \
hint_hdd.png \
+ hint_hdd_info.png \
+ hint_iconsPKG0.png \
+ hint_iconsPKG1.png \
+ hint_iconsPKG2.png \
+ hint_iconsPKG3.png \
hint_imageinfo.png \
+ hint_imagelogo.png \
hint_inetradio.png \
hint_info.png \
hint_keys.png \
hint_language.png \
+ hint_lcd4linux.png \
hint_manage.png \
hint_mb.png \
hint_media.png \
@@ -133,6 +145,7 @@ install_DATA += \
hint_tvradio_switch.png \
hint_vfd.png \
hint_video.png \
+ hint_vtxt.png \
hint_ytplay.png \
home.png \
icon_green.png \
@@ -167,14 +180,6 @@ install_DATA += \
mp_play_repeat_track.png \
mp3.jpg \
mp3.png \
- mp3-0.jpg \
- mp3-1.jpg \
- mp3-2.jpg \
- mp3-3.jpg \
- mp3-4.jpg \
- mp3-5.jpg \
- mp3-6.jpg \
- mp3-7.jpg \
multimedia.png \
mute.png \
mute_small.png \
@@ -197,6 +202,9 @@ install_DATA += \
powervu_green.png \
powervu_white.png \
powervu_yellow.png \
+ progressbar.png \
+ progressbar_inactive_passive.png \
+ progressbar_passive.png \
radar.pal \
radar_red.pal \
radar0.raw \
@@ -244,6 +252,8 @@ install_DATA += \
shell.png \
shutdown.jpg \
softupdate.png \
+ stars.png \
+ stars_bg.png \
star-off.png \
star-on.png \
start.jpg \
@@ -263,6 +273,8 @@ install_DATA += \
via_yellow.png \
video.png \
volume.png \
+ volumebar.png \
+ volumebar_passive.png \
volumebody.png \
volumeslider2.png \
volumeslider2alpha.png \
@@ -277,3 +289,13 @@ install_DATA += \
x_yellow.png \
zap.png
+# NI Infoicons
+install_DATA += \
+ info0_off.png \
+ info0_on.png \
+ info1_off.png \
+ info1_on.png \
+ info2_off.png \
+ info2_on.png \
+ info3_off.png \
+ info3_on.png
diff --git a/data/icons/clock_face.png b/data/icons/clock_face.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_blank_screen.png b/data/icons/hint_blank_screen.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_hdd_info.png b/data/icons/hint_hdd_info.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_iconsPKG0.png b/data/icons/hint_iconsPKG0.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_iconsPKG1.png b/data/icons/hint_iconsPKG1.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_iconsPKG2.png b/data/icons/hint_iconsPKG2.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_iconsPKG3.png b/data/icons/hint_iconsPKG3.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_imagelogo.png b/data/icons/hint_imagelogo.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_lcd4linux.png b/data/icons/hint_lcd4linux.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/hint_vtxt.png b/data/icons/hint_vtxt.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/info0_off.png b/data/icons/info0_off.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/info0_on.png b/data/icons/info0_on.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/info1_off.png b/data/icons/info1_off.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/info1_on.png b/data/icons/info1_on.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/info2_off.png b/data/icons/info2_off.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/info2_on.png b/data/icons/info2_on.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/info3_off.png b/data/icons/info3_off.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/info3_on.png b/data/icons/info3_on.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/progressbar.png b/data/icons/progressbar.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/progressbar_inactive_passive.png b/data/icons/progressbar_inactive_passive.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/progressbar_passive.png b/data/icons/progressbar_passive.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/screensaver/Makefile.am b/data/icons/screensaver/Makefile.am
new file mode 100644
index 000000000..ac90de4f6
--- /dev/null
+++ b/data/icons/screensaver/Makefile.am
@@ -0,0 +1,4 @@
+installdir = $(ICONSDIR)/screensaver
+
+install_DATA = \
+ black.jpg
diff --git a/data/icons/screensaver/black.jpg b/data/icons/screensaver/black.jpg
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/stars.png b/data/icons/stars.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/stars_bg.png b/data/icons/stars_bg.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/volumebar.png b/data/icons/volumebar.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/icons/volumebar_passive.png b/data/icons/volumebar_passive.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/data/inetradio/Makefile.am b/data/inetradio/Makefile.am
index d700fbc1c..a9aa4a6dd 100644
--- a/data/inetradio/Makefile.am
+++ b/data/inetradio/Makefile.am
@@ -1,3 +1,3 @@
installdir = $(CONFIGDIR)
-install_DATA = radio-stations.xml
\ No newline at end of file
+install_DATA = radio-stations.xml radio-favorites.xml
diff --git a/data/inetradio/radio-favorites.xml b/data/inetradio/radio-favorites.xml
new file mode 100644
index 000000000..6b6ad38d1
--- /dev/null
+++ b/data/inetradio/radio-favorites.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
diff --git a/data/iso-codes/iso-639.tab b/data/iso-codes/iso-639.tab
index f549adf82..57d5c20da 100644
--- a/data/iso-codes/iso-639.tab
+++ b/data/iso-codes/iso-639.tab
@@ -21,45 +21,189 @@
## Please translate Bøkmal using a-ring (U+00E5)
## Please translate Proveçal using c-cedilla (U+00E7)
##
+aar aar aa Afar
+abk abk ab Abkhazian
+afr afr af Afrikaans
+aka aka ak Akan
+akk akk ak Akkadian
alb sqi sq Albanian
+amh amh am Amharic
ara ara ar Arabic
+arg arg an Aragonese
arm hye hy Armenian
+asm asm as Assamese
+ava ava av Avaric
+ave ave ae Avestan
+aym aym ay Aymara
aze aze az Azerbaijani
+bak bak ba Bashkir
+bam bam bm Bambara
+baq eus eu Basque
bel bel be Belarusian
+ben ben bn Bengali
+bih bih bh Bihari
+bis bis bi Bislama
+bos bos bs Bosnian
+bre bre br Breton
bul bul bg Bulgarian
+bur mya my Burmese
+cat cat ca Catalan
+cha cha ch Chamorro
+che che ce Chechen
chi zho zh Chinese
+chv chv cv Chuvash
+cor cor kw Cornish
+cos cos co Corsican
+cre cre cr Cree
cze ces cs Czech
dan dan da Danish
+div div dv Divehi
dut nld nl Dutch
+dzo dzo dz Dzongkha
eng eng en English
+epo epo eo Esperanto
est est et Estonian
+ewe ewe ee Ewe
+fao fao fo Faroese
+fij fij fj Fijian
fin fin fi Finnish
fre fra fr French
+fry fry fy Frisian
+ful ful ff Fulah
+gaa gaa ga Ga
geo kat ka Georgian
ger deu de German
+gla gla gd Gaelic
+gle gle ga Irish
+glg glg gl Gallegan
+glv glv gv Manx
gre ell el Greek
+grn grn gn Guarani
+guj guj gu Gujarati
+hat hat ht Haitian
+hau hau ha Hausa
heb heb he Hebrew
+her her hz Herero
hin hin hi Hindi
+hmo hmo ho Hiri
hun hun hu Hungarian
+ibo ibo ig Igbo
+ice isl is Icelandic
+ido ido io Ido
+iii iii ii Sichuan Yi
+iku iku iu Inuktitut
+ile ile ie Interlingue
+ina ina ia Interlingua
+ind ind id Indonesian
+ipk ipk ik Inupiaq
ita ita it Italian
+jav jav jv Javanese
jpn jpn ja Japanese
+kal kal kl Greenlandic
+kan kan kn Kannada
+kas kas ks Kashmiri
+kau kau kr Kanuri
+kaz kaz kk Kazakh
+khm khm km Khmer
+kik kik ki Kikuyu
+kin kin rw Kinyarwanda
+kir kir ky Kirghiz
+kom kom kv Komi
+kon kon kg Kongo
kor kor ko Korean
+kua kua kj Kuanyama
+kur kur ku Kurdish
+lao lao lo Lao
+lat lat la Latin
lav lav lv Latvian
+lim lim li Limburgian
+lin lin ln Lingala
lit lit lt Lithuanian
+ltz ltz lb Luxembourgish
+lub lub lu Luba-Katanga
+lug lug lg Ganda
mac mkd mk Macedonian
+mah mah mh Marshallese
+mal mal ml Malayalam
+mao mri mi Maori
+mar mar mr Marathi
+may msa ms Malay
+mlg mlg mg Malagasy
+mlt mlt mt Maltese
mol mol mo Moldavian
+mon mon mn Mongolian
+nau nau na Nauru
+nav nav nv Navaho
+nbl nbl nr Ndebele
+nde nde nd Ndebele
+ndo ndo ng Ndonga
+nep nep ne Nepali
+nno nno nn Norwegian
+nob nob nb Norwegian
nor nor no Norwegian
+nya nya ny Chewa
+oci oci oc Occitan
+oji oji oj Ojibwa
+ori ori or Oriya
+orm orm om Oromo
+oss oss os Ossetian
+pan pan pa Panjabi
per fas fa Persian
+pli pli pi Pali
pol pol pl Polish
por por pt Portuguese
+pus pus ps Pushto
+que que qu Quechua
+roh roh rm Raeto-Romance
rum ron ro Romanian
+run run rn Rundi
rus rus ru Russian
+sag sag sg Sango
+san san sa Sanskrit
scc srp sr Serbian
scr hrv hr Croatian
+sin sin si Sinhalese
slo slk sk Slovak
slv slv sl Slovenian
-spa spa es Spanish (Castilian)
+sme sme se Northern Sami
+smo smo sm Samoan
+sna sna sn Shona
+snd snd sd Sindhi
+som som so Somali
+sot sot st Sotho
+spa spa es Spanish
+srd srd sc Sardinian
+ssw ssw ss Swati
+sun sun su Sundanese
+swa swa sw Swahili
swe swe sv Swedish
+tah tah ty Tahitian
+tam tam ta Tamil
+tao tso ts Tsonga
+tat tat tt Tatar
+tel tel te Telugu
+tgk tgk tg Tajik
+tgl tgl tl Tagalog
+tha tha th Thai
+tib bod bo Tibetan
+tir tir ti Tigrinya
+ton ton to Tonga
+tsn tsn tn Tswana
tuk tuk tk Turkmen
tur tur tr Turkish
+twi twi tw Twi
+uig uig ug Uighur
ukr ukr uk Ukrainian
+urd urd ur Urdu
+uzb uzb uz Uzbek
+ven ven ve Venda
+vie vie vi Vietnamese
+vol vol vo Volapuk
+wel cym cy Welsh
+wln wln wa Walloon
+wol wol wo Wolof
+xho xho xh Xhosa
+yid yid yi Yiddish
+yor yor yo Yoruba
+zha zha za Chuang
+zul zul zu Zulu
diff --git a/data/license/Makefile.am b/data/license/Makefile.am
index 1946a99bc..d8d198554 100644
--- a/data/license/Makefile.am
+++ b/data/license/Makefile.am
@@ -2,5 +2,4 @@ installdir = $(DATADIR)/neutrino/license
install_DATA = \
deutsch.license \
- english.license \
- slovak.license
+ english.license
diff --git a/data/locale/Makefile.am b/data/locale/Makefile.am
index 95e3a1165..356885ce2 100644
--- a/data/locale/Makefile.am
+++ b/data/locale/Makefile.am
@@ -1,12 +1,12 @@
installdir = $(LOCALEDIR)
locale = \
- nederlands.locale \
deutsch.locale \
- english.locale \
- slovak.locale
+ english.locale
locale_unmaintained = \
+ nederlands.locale \
+ slovak.locale \
unmaintained/bayrisch.locale \
unmaintained/bosanski.locale \
unmaintained/ch-baslerdeutsch.locale \
@@ -21,7 +21,7 @@ locale_unmaintained = \
unmaintained/svenska.locale
install_DATA = $(locale)
-install_DATA += $(locale_unmaintained)
+#install_DATA += $(locale_unmaintained)
if MAINTAINER_MODE
diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale
index 42fb6169a..ec31499de 100644
--- a/data/locale/deutsch.locale
+++ b/data/locale/deutsch.locale
@@ -1,4 +1,4 @@
-AUDIOSelectMenue.head Auswahl der Tonspur
+AUDIOSelectMenue.head Tonoptionen
EPGMenu.epgplus Vorschauübersicht
EPGMenu.eventinfo Info zur Sendung
EPGMenu.eventlist Vorschau aktuelles Programm
@@ -199,6 +199,7 @@ audioplayer.shuffle Zufällig
audioplayer.spectrum LCD Skala
audioplayer.stop Stopp
audioplayer.title_artist Titel, Interpret
+blank_screen Blanker Bildschirm
bookmarkmanager.delete Löschen
bookmarkmanager.name Bookmarks
bookmarkmanager.rename Umbenennen
@@ -232,7 +233,30 @@ buildinfo.compiler_flags Compiler Flags
buildinfo.creator Ersteller
buildinfo.kernel Kernel Version
buildinfo.menu Build Informationen
+ca_init Aktives CA-System
+ca_init_0 Conax-Karte
+ca_init_1 CI-Modul
+ca_init_2 Conax-Karte und CI-Modul
cablesetup.provider Kabelanbieter
+camd_control camd-Steuerung
+camd_item_cs2gbox_hint cs2gbox - Newcamd Bridge
+camd_item_cs2gbox_name cs2gbox
+camd_item_doscam_hint DOSCam - Softcam und Emulator
+camd_item_doscam_name doscam
+camd_item_gbox_hint GBox - Softcam und Emulator
+camd_item_gbox_name gbox
+camd_item_mgcamd_hint MGCamd - Emulator
+camd_item_mgcamd_name mgcamd
+camd_item_newcs_hint NewCS - Softcam
+camd_item_newcs_name newcs
+camd_item_oscam_hint OSCam - Softcam
+camd_item_oscam_name oscam
+camd_item_osemu_hint OSEmu - Emulator
+camd_item_osemu_name osemu
+camd_msg_reset camd wird neu gestartet
+camd_msg_start camd wird gestartet
+camd_msg_stop camd wird gestoppt
+camd_reset camd neu starten
channellist.additional Zusatzinformationen
channellist.additional_off aus
channellist.additional_on ein
@@ -339,7 +363,7 @@ colorthememenu.head Theme auswählen
colorthememenu.head2 Themes laden
colorthememenu.menu_hints Hinweisfenster
colorthememenu.name Themename
-colorthememenu.neutrino_theme Neutrino Theme
+colorthememenu.neutrino_theme NI-Neutrino-HD Theme
colorthememenu.question Aktuelles Theme beibehalten?
colorthememenu.save aktuelles Theme speichern
colorthememenu.select1 Benutzer Theme
@@ -348,6 +372,10 @@ cpu.freq CPU Frequenz
cpu.freq_default Standard Frequenz
cpu.freq_normal Normale Frequenz
cpu.freq_standby Standby Frequenz
+crossteam.hint_settings_teams Einstellungen sichern und wiederherstellen,\ndie zu teilnehmenden Team-Images kompatibel sind.
+crossteam.hint_settings_teams_backup Teamübergreifende Einstellungen sichern
+crossteam.hint_settings_teams_help Hilfe zu teamübergreifenden Einstellungen
+crossteam.hint_settings_teams_restore Teamübergreifende Einstellungen wiederherstellen
date.Apr Apr
date.Aug Aug
date.Dec Dez
@@ -372,6 +400,10 @@ debug.level Stufe
debug.level_1 normal
debug.level_2 informativ
debug.level_3 ausführlich
+ecminfo ECM-Info
+ecminfo_null ECM-Info nicht vorhanden
+ecminfo_show ECM-Info anzeigen
+empty
epg.saving Speichere EPG
epgextended.actors Darsteller
epgextended.director Regie
@@ -622,6 +654,7 @@ flashupdate.createimage_warning Nachfolgend wird ein Image für die %s STB erste
flashupdate.currentversion_sep Installierte Version
flashupdate.currentversiondate Datum
flashupdate.currentversiontime Uhrzeit
+flashupdate.enter_flash_script Stoppe laufende Dienste und Softcams ...
flashupdate.erasefailed Flash löschen fehlgeschlagen
flashupdate.erasing lösche Flash
flashupdate.experimentalimage Sie haben einen Snapshot ausgewählt, bitte beachten Sie,\ndass diese Version ungetestet ist und u.U. Ihre Box\nnach dem Update nicht mehr funktionsfähig ist.\n\nSoll diese Version wirklich installiert werden?
@@ -656,6 +689,7 @@ flashupdate.namemode2_default +.img
flashupdate.namemode2_hostname_time ++.img
flashupdate.new_found Updates verfügbar!
flashupdate.new_notfound Keine Updates verfügbar!
+flashupdate.ng_noflash USB-Image aktiv, Update nicht möglich!
flashupdate.noversion Bei Updates werden Versionsüberprüfungen derzeit nur über Web-Updates unterstützt.\nWollen Sie das ausgewählte Image wirklich installieren?
flashupdate.programmingflash programmiere Flash
flashupdate.proxypassword Passwort
@@ -700,6 +734,7 @@ fontmenu.eventlist Event-Liste
fontmenu.head Schrift
fontmenu.infobar Infobar
fontmenu.menu Menü
+fontmenu.moviebrowser Moviebrowser
fontmenu.other Andere
fontmenu.scaling Schriftgrößenfaktor
fontmenu.scaling_x Horizontal (in %)
@@ -724,6 +759,7 @@ fontsize.eventlist_title Titel
fontsize.filebrowser_item Dateibrowsereinträge
fontsize.hint Schriftart wird initialisiert,\nbitte warten...
fontsize.infobar_channame Kanalname
+fontsize.infobar_ecminfo ECM-Info
fontsize.infobar_info Info
fontsize.infobar_number Nummer
fontsize.infobar_small Klein
@@ -731,6 +767,9 @@ fontsize.menu Menütext
fontsize.menu_hint Menü-Hilfe
fontsize.menu_info Menüinfo
fontsize.menu_title Menütitel
+fontsize.moviebrowser_head Überschriften
+fontsize.moviebrowser_info Info-Fenster
+fontsize.moviebrowser_list Listen-Einträge
fontsize.subtitles Text Untertitel
fsk.all aus
fsk.from_12 ab 12
@@ -747,35 +786,53 @@ hdd_30min 30 min.
hdd_5min 5 min.
hdd_60min 60 min.
hdd_activate Übernehmen
+hdd_allow_set_recdir Erlaube sofort Aufnahmen
hdd_check Dateisystemprüfung
hdd_check_failed Datenträgerprüfung fehlgeschlagen
hdd_check_format_bad Überprüfung von Datenträgern mit Format %s wird nicht unterstützt.
-hdd_extended_settings Erweiterte Festplatteneinstellungen
+hdd_extended_settings Erweiterte Datenträgereinstellungen
hdd_fast Schnell
hdd_format Formatiere Datenträger
hdd_format_failed Formatierung fehlgeschlagen! Stellen Sie sicher, dass der Datenträger nicht in Verwendung ist und versuchen Sie es erneut.
+hdd_format_on_mount_failed Formatieren bei Einhänge-Fehler
hdd_format_warn Alle Daten auf dem Datenträger werden gelöscht! Formatierung starten?
hdd_fs Dateisystem zum formatieren
hdd_fs_unknown unbekannt
-hdd_manage Laufwerke verwalten
+hdd_info_capacity Kapazität
+hdd_info_firmware Firmware
+hdd_info_head HDD Info
+hdd_info_info Ausgelesen mit smartctl
+hdd_info_model Modell
+hdd_info_model_family Modellreihe
+hdd_info_rotation_rate Rotationsrate
+hdd_info_sata_version SATA-Version
+hdd_info_sector_size Sektorengröße
+hdd_info_serial Seriennummer
+hdd_info_temperature Temperatur
+hdd_info_unknown unbekannt
+hdd_manage Datenträger verwalten
hdd_middle Mittel
hdd_mount Mount
-hdd_mount_failed Fehler! Überprüfen Sie ihre Laufwerkseinstellungen.
-hdd_mount_ok Laufwerk bereit
+hdd_mount_failed Fehler! Überprüfen Sie ihre Datenträgereinstellungen.
+hdd_mount_ok Datenträger bereit
hdd_mount_umount Mount/Unmount
hdd_noise Akustikkontrolle (AAM)
hdd_not_found Kein Datenträger
+hdd_power Interne HDD-Stromversorgung
hdd_removable_device Wechseldatenträger
hdd_set_recdir Diesen Datenträger für die Aufnahme nutzen?
-hdd_settings Laufwerke
+hdd_settings Datenträger
hdd_sleep Ausschalten nach...
hdd_slow Langsam
hdd_statfs Füllstandsabfrage
hdd_statfs_always immer
hdd_statfs_recording nur während Aufnahme
hdd_umount Aushängen
-hdd_umount_warn Laufwerk aushängen
-hdd_umounted Laufwerk entfernt
+hdd_umount_warn Datenträger aushängen
+hdd_umounted Datenträger entfernt
+hdd_wakeup Interne Aufweckfunktion
+hdd_wakeup_msg Aufweckfunktion mit Nachricht
+hdd_wakeup_start Aufweckfunktion wird gestartet
imageinfo.creator Ersteller:
imageinfo.date Datum:
imageinfo.dokumentation Dokus:
@@ -787,9 +844,41 @@ imageinfo.kernel Kernel:
imageinfo.license Lizenz
imageinfo.vcs Git:
imageinfo.version Version:
+imdb.info IMDb-Info
+imdb.info_save Bild speichern
inetradio.name Internetradio
+inetradio_autostart Internetradio Auto-Start
+infoicons_background Hintergrund anzeigen
+infoicons_flag_all Alle zurücksetzen
+infoicons_flag_del Benachrichtigungsdatei wird gelöscht
+infoicons_flag_del_head Benachrichtigungen zurücksetzen
+infoicons_flag_delall Benachrichtigungsdateien werden gelöscht
+infoicons_flag_head Benachrichtigungsdatei einstellen
+infoicons_flag_name0 E-Mail Eingang
+infoicons_flag_name1 Anrufbeantworter
+infoicons_flag_name2 Serververbindung
+infoicons_flag_name3 Benutzerdefiniert
+infoicons_flag_name4 Benutzerdefiniert
+infoicons_flag_name5 Benutzerdefiniert
+infoicons_flag_name6 Benutzerdefiniert
+infoicons_flag_name7 Benutzerdefiniert
+infoicons_head Infoicons Einstellungen
+infoicons_infoviewer mit Infoviewer
+infoicons_modeicon Infoicons
+infoicons_msg_start Infoicons werden gestartet
+infoicons_msg_stop Infoicons werden gestoppt
+infoicons_popup nur bei Statusänderungen
+infoicons_skin Anzeige der Infoicons
+infoicons_static permanent
+infoicons_switch_off Infoicons ausblenden
+infoicons_switch_on Infoicons einblenden
infoviewer.epgnotload Informationen noch nicht geladen...
infoviewer.epgwait Warte auf EPG-Informationen...
+infoviewer.iconset Iconset
+infoviewer.iconset_pkg0 Original
+infoviewer.iconset_pkg1 NI-Dark
+infoviewer.iconset_pkg2 NI-Bright
+infoviewer.iconset_pkg3 NI-Flat
infoviewer.motor_moving Antennenpositionierung
infoviewer.next Später
infoviewer.nocurrent Keine Info zu laufendem Programm
@@ -860,7 +949,21 @@ keychoosermenu.setnone Keine Taste
languagesetup.head Sprache und Zeitzonen
languagesetup.osd Menüsprache
languagesetup.select Sprache
-lcd_info_line Zeige in Infozeile
+lcd4l_clock_a Analog-Uhr im Standby-Modus
+lcd4l_logodir Senderlogo-Verzeichnis
+lcd4l_skin Display-Style
+lcd4l_skin_0 Standard
+lcd4l_skin_1 Groß
+lcd4l_skin_2 Klein (SysInfo)
+lcd4l_skin_3 d-box2
+lcd4l_skin_4 Benutzer
+lcd4l_skin_radio Radio-Style aktivieren
+lcd4l_support LCD4Linux-Unterstützung
+lcd4l_support_auto automatisch
+lcd4l_support_off aus
+lcd4l_support_on ein
+lcd4l_weather Wetter im Standby-Modus
+lcd_info_line Zeige in Infozeile
lcd_info_line_channel Kanalname
lcd_info_line_clock Uhrzeit
lcdcontroler.brightness normale
@@ -985,8 +1088,12 @@ menu.hint_back_brief Zurück zum vorherigen Menü.
menu.hint_backlight Konfigurieren Sie die Hintergrundbeleuchtung der Buttons
menu.hint_backup Sichern von Konfigurationen und Kanallisten
menu.hint_bedit Bearbeiten ihrer Favoriten und der Bouquets
+menu.hint_blank_screen Schaltet den VideoDecoder bis zum nächsten Event (Tastendruck, Timer o.ä.) ab
menu.hint_buildinfo Informationen über Compiler, Compilerflags, Kernel
+menu.hint_ca_init Konfiguration der CA-Systemhardware, CA-Modul und Kartenschächte
menu.hint_cache_txt Startet das Zwischenspeichern des Teletextes nach einem Kanalwechsel
+menu.hint_camd Softcam und Emulator Einstellungen\nStart, Stop, Versionsinfo
+menu.hint_camd_reset Aktive Softcam und/oder Emulator neu starten
menu.hint_cec_mode CEC-Modus
menu.hint_cec_standby CEC-Standby
menu.hint_cec_view_on CEC view ON
@@ -1051,14 +1158,20 @@ menu.hint_font_ttx Wählen Sie die Schriftart für den Teletext
menu.hint_fonts Konfigurieren Sie die Schriftart und die Schriftgrößen für die Menüs
menu.hint_games Zeige Liste der installierten Spiele
menu.hint_hdd Formatierung und Prüfung der Datenträger
+menu.hint_hdd_allow_set_recdir Erlaubt das sofortige Einstellen des neuen Datenträgers als Aufnahmemedium
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_fmt Wählen Sie das Datenträgerformat aus
menu.hint_hdd_format Erstellt eine Partition auf dem Datenträger und formatiert diese
-menu.hint_hdd_noise Setzen Sie Parameter für das Automatic Acoustic Management.\nNicht alle Laufwerke unterstützen diese Funktion
+menu.hint_hdd_format_on_mount_failed Soll der Datenträger formatiert werden, wenn das Einhängen fehlschlägt?
+menu.hint_hdd_info Datenträger-Informationen über Kapazität, Temperatur und mehr
+menu.hint_hdd_noise Setzen Sie Parameter für das Automatic Acoustic Management.\nNicht alle Datenträger unterstützen diese Funktion
+menu.hint_hdd_power Interne HDD-Stromversorgung für die Coolstream HD1 Boxen aktivieren.
menu.hint_hdd_sleep Dieser Wert definiert, nach wieviel Minuten die Festplatte bei Inaktivität in den Sleep-Modus geschaltet wird
menu.hint_hdd_statfs Legen Sie fest, wann die Aufnahmeverzeichnis-Füllstandsanzeige im InfoViewer (und ggf. am VFD-Display) aktualisiert werden darf
menu.hint_hdd_tools Formatieren Sie die gefundenen Datenträger bzw. überprüfen Sie deren Dateisystem
+menu.hint_hdd_wakeup Schaltet die internen Aufweckfunktionen für Festplatten ein oder aus
+menu.hint_hdd_wakeup_msg Schaltet die Benachrichtigung über den Start der Aufweckfunktion ein oder aus
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
@@ -1066,7 +1179,9 @@ menu.hint_inact_timer Ausschalten der Box nach Inaktivität in Minuten.\nDie Box
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_inetradio_autostart Spielt automatisch den ersten Eintrag der Favoriten-Liste ab
menu.hint_info Informationen über das Image, CPU, Arbeitsspeicher und Stream und mehr
+menu.hint_infobar_analogclock Zeigt eine Analoguhr anstatt der digitalen Anzeige der Zeit
menu.hint_infobar_back Ändern Sie die Hintergrundfarbe für die Infobar
menu.hint_infobar_buttons_usertitle Erzwingt die benutzerdefinierten Titel der Farbtasten
menu.hint_infobar_casys ein: zeigt alle Aktiven farbig, Mini: einzelnes Symbol ob gesperrt, Diskret: alle Aktiven CA-Systeme
@@ -1074,8 +1189,10 @@ menu.hint_infobar_casys_color Ändern Sie die Hintergrundfarbe für die CA-Syste
menu.hint_infobar_casys_dotmatrix ein: CA-Systemanzeige mit Punktematrix im Hintergrund
menu.hint_infobar_casys_frame ein: CA-Systemanzeige mit Rahmen
menu.hint_infobar_dd Zeigt ein Dolby Digital Icon bei Verfügbarkeit
+menu.hint_infobar_ecminfo Anzeigen der ECM-Info, während die Infobar eingeblendet ist
menu.hint_infobar_filesys Zeigen den vom Flash- und einer HDD verwendeten Speicherplatz
menu.hint_infobar_fonts Ändern Sie die Schriftgrößen in der Infobar
+menu.hint_infobar_iconset Auswahl der Iconsets für die CA-Anzeige
menu.hint_infobar_logo Logo-, Kanalnummer- und Signal-Anzeige; Optionen in [Klammern] erscheinen in der kleinen Infobox
menu.hint_infobar_logo_dir Wählen Sie das Verzeichnis für die Senderlogos
menu.hint_infobar_on_epg Zeigt einen Hinweis bei EPG-Änderungen
@@ -1086,6 +1203,21 @@ menu.hint_infobar_setup Wählen Sie die Anzeigeoptionen für die Infobar aus
menu.hint_infobar_textcolor Ändern Sie die Textfarbe für die Infobar
menu.hint_infobar_tuner Zeigt den aktiven Tuner als Nummernicon
menu.hint_infoclock_setup Wählen Sie die Anzeigeoptionen für die Info Uhr
+menu.hint_infoicons_background Legt fest, ob die Infoicons mit oder ohne Hintergrund gezeigt werden sollen
+menu.hint_infoicons_flag_all Alle Benachrichtigungen zurücksetzen
+menu.hint_infoicons_flag_del_head Einzelne oder alle Benachrichtigungen der Infoicons zurücksetzen
+menu.hint_infoicons_flag_head Benachrichtigungsdatei der Infoicons bearbeiten
+menu.hint_infoicons_flag_name0 Eintrag der Benachrichtigungsdatei
+menu.hint_infoicons_flag_name1 Eintrag der Benachrichtigungsdatei
+menu.hint_infoicons_flag_name2 Eintrag der Benachrichtigungsdatei
+menu.hint_infoicons_flag_name3 Eintrag der Benachrichtigungsdatei
+menu.hint_infoicons_flag_name4 Eintrag der Benachrichtigungsdatei
+menu.hint_infoicons_flag_name5 Eintrag der Benachrichtigungsdatei
+menu.hint_infoicons_flag_name6 Eintrag der Benachrichtigungsdatei
+menu.hint_infoicons_flag_name7 Eintrag der Benachrichtigungsdatei
+menu.hint_infoicons_head Konfiguration der Infoicons
+menu.hint_infoicons_modeicon Infoicons aktivieren/deaktivieren
+menu.hint_infoicons_skin Anzeigeverhalten der Infoicons
menu.hint_keep_numbers Mit der Aktivierung werden den Sendern feste/dauerhafte Kanalnummern zugewiesen
menu.hint_key_addrecord Weisen Sie eine Taste für das Starten und Markieren von Aufnahmen im EPG zu
menu.hint_key_addremind Weisen Sie eine Taste für das Umschalten im EPG über den Timer zu
@@ -1150,6 +1282,12 @@ menu.hint_language Menü-Sprache, Zeitzone, bevorzugte Tonspuren, Untertitel-Spr
menu.hint_last_radio Wählen Sie den Start-Sender im Radio-Modus
menu.hint_last_tv Wählen Sie den Start-Sender im TV-Modus
menu.hint_last_use Speichert den aktuellen Kanal beim Herunterfahren der Box
+menu.hint_lcd4l_clock_a Zeigt im Standby-Betrieb eine Analog-Uhr anstatt einer Digital-Uhr
+menu.hint_lcd4l_logodir Verzeichnis für Senderlogos\nBei ungültigem Eintrag Fallback auf Standard-Logoverzeichnis
+menu.hint_lcd4l_skin Auswahl der verfügbaren Darstellungsarten\nStandard, Groß, SysInfo, d-box2, Benutzerdefiniert
+menu.hint_lcd4l_skin_radio Wechselt die Darstellungsart, wenn der Radio-Modus aktiviert wird
+menu.hint_lcd4l_support LCD4Linux aktivieren/deaktivieren\nUnterstützte Displays: Pearl DPF
+menu.hint_lcd4l_weather Zeigt im Standby-Betrieb die entsprechenden Daten des ersten Favoriteneintrags von tuxwetter auf dem Display an
menu.hint_leds_blink Die Power-LEDs blinken, wenn sich der Receiver im 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 sollen, wenn eine Aufnahme aktiv ist
@@ -1168,6 +1306,7 @@ menu.hint_mbkey_cover Weisen Sie eine Taste zu, um Filmcover während der Wieder
menu.hint_media Abspielen von Musik, Internetradio und Filmen; Betrachten Sie Bilder
menu.hint_menu_fonts Ändern Sie die Schriftgrößen im Menü
menu.hint_menu_hints Zeigt Ihnen Hinweise zu den Menüpunkten an. Sie erreichen das auch jederzeit mit der Taste 'Hilfe'
+menu.hint_menu_hints_line Aktiviert/deaktiviert die Linie vom Menü zu diesen Hinweisen
menu.hint_menu_pos Legen Sie die Anzeigeposition der Menüs fest
menu.hint_menus Wählen Sie die Anzeigeoptionen für die Menüs
menu.hint_misc_cec HDMI-CEC Optionen
@@ -1178,6 +1317,7 @@ menu.hint_misc_filebrowser Dateisystem, Dateirechte anzeigen im Dateibrowser, St
menu.hint_misc_general Standby-, Teletext- und Rotor-Einstellungen, Pluginverzeichnis auf externem Datenträger
menu.hint_misc_zapit Verwaltung der Start-Kanäle für den TV/Radio-Modus
menu.hint_movie Wiedergabe von Filmen
+menu.hint_moviebrowser_fonts Ändern Sie die Schriftgrößen im Moviebrowser (Meine Aufnahmen)
menu.hint_moviebrowser_setup Legen Sie Auswahl- und Anzeigeoptionen des MovieBrowsers fest
menu.hint_movieplayer_plugin Wählen Sie ein Plugin, das mit einer Schnellstart-Taste im Movieplayer-Modus gestartet wird
menu.hint_net_broadcast Ändern Sie die Broadcast-Adresse.\nWenn Sie unsicher sind, verwenden Sie zuletzt .255
@@ -1195,6 +1335,7 @@ menu.hint_net_netmask Geben Sie eine Netzwerkmaske ein\nStandart ist 255.255.255
menu.hint_net_nfs_mount Bearbeiten Sie die Netzwerkfreigaben und deren Einhängepunkte
menu.hint_net_nfs_umount Hängen Sie eingehängte Netzwerkfreigaben wieder aus
menu.hint_net_ntp Ändern Sie den Zeitserver für die Zeitsynchronisation via Internet
+menu.hint_net_ntpatboot Aktiviert die Zeitsynchronisierung via NTP beim Hochfahren der Box
menu.hint_net_ntpenable Aktiviert die Zeitsynchronisierung via NTP.\nWenn das NTP nicht erfolgreich ist, verwenden Sie DVB
menu.hint_net_ntprefresh Stellen Sie den Interval zur Zeitsynchronisation ein
menu.hint_net_ntpserver Geben Sie den NTP-Server ein
@@ -1213,10 +1354,19 @@ menu.hint_net_telnet Aktiviert Telnet auf Ihrer Box
menu.hint_net_test Testet die Netzwerkverbindung:\nPing auf Gateway, Name-Server und externe IP-Adressen
menu.hint_net_ushare Freigabe verbundener Datenträger über UPnP
menu.hint_net_xupnpd Freigabe von Live Channels über UPNP
+menu.hint_netfs_automount_write automount Einträge speichern und %s schreiben
+menu.hint_netfs_fstab_domount fstab Einträge einhängen
+menu.hint_netfs_fstab_doumount fstab Einträge aushängen
+menu.hint_netfs_fstab_write fstab Einstellungen speichern und %s schreiben
+menu.hint_netfs_menu_main_automount Bearbeiten der automounter Einträge
+menu.hint_netfs_menu_main_fstab Bearbeiten der fstab Einträge
+menu.hint_netfs_menu_main_head Konfiguration von fstab und automounter
+menu.hint_netfs_mounts NetFS Eintrag
menu.hint_network IP-Adresse, Gateway, DNS, Zeit-Sync, Netzwerk-Freigaben, Dienste und mehr
menu.hint_new_zap_mode Aktiviert Quickzap in der Kanalliste. Nach Betätigen der Mute-Taste wird mit den Hoch/Runter-Tasten direkt umgeschalten
menu.hint_next Weiter zum nächsten Menü.\nDie Taste 'Menü' schließt alle Menüs
menu.hint_next_brief Weiter zum nächsten Menü
+menu.hint_nimenu Konfiguration von Softcams, Plugins, Tools und mehr
menu.hint_numeric_adjust Bei numerischer Programmwahl die Kanalliste am neu gewählten Programm ausrichten
menu.hint_opkg Software-Pakete installieren oder vorhandene aktualisieren
menu.hint_opkg_feed_addresses_edit Bearbeiten von Feed-Adressen
@@ -1241,7 +1391,9 @@ menu.hint_plugin_type_games Legt fest, ob Spiele im Benutzermenü unter der Rubr
menu.hint_plugin_type_lua Legt fest, ob Plugins im Benutzermenü unter der Rubrik 'Plugin-Typen' gezeigt werden sollen
menu.hint_plugin_type_scripts Legt fest, ob Skripte im Benutzermenü unter der Rubrik 'Plugin-Typen' gezeigt werden sollen
menu.hint_plugin_type_tools Legt fest, ob Werkzeuge im Benutzermenü unter der Rubrik 'Plugin-Typen' gezeigt werden sollen
+menu.hint_plugins_control Verwaltung von installierten Plugins und Diensten
menu.hint_plugins_hdd_dir Auswahl des Verzeichnisses zum Laden der Plugins von einem externen Datenträger
+menu.hint_plugins_hide Integrierte Plugins oder Plugins in den Benutzermenüs verstecken oder anzeigen
menu.hint_power_leds Konfiguriert das Verhalten der LEDs an der Power-Taste
menu.hint_pref_lang Wählen Sie ihre bevorzugte Tonspur 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
@@ -1270,6 +1422,7 @@ menu.hint_record_data_vtxt Teletext-Spur zu Aufnahme hinzufügen
menu.hint_record_dir Wählen Sie das Aufnahmeverzeichnis
menu.hint_record_end Wählen Sie zwischen maximaler Aufnahmezeit oder einem Aufnahmeende anhand der EPG-Daten
menu.hint_record_filename_template Vorlagemuster für den Dateinamen bearbeiten
+menu.hint_record_fill_warn Zeige Warnung, wenn das Aufnahmemedium zu voll wird
menu.hint_record_slow_warn Zeige Warnung, wenn der Aufnahmepuffer zu überlaufen droht
menu.hint_record_startstop_msg Schaltet die Meldung bei Aufnahmestart/ende ein oder aus.
menu.hint_record_tdir Wählen Sie ein Verzeichnis für Ihre Timeshift-Aufnahmen im temporären Timeshift-Modus
@@ -1289,6 +1442,7 @@ menu.hint_recording Aufnahme-, Timeshift- und Timer-Optionen, Einstellung von au
menu.hint_reload_channels Kanallisten neu laden, um Änderungen wirksam zu machen
menu.hint_reload_plugins Plugins neu laden, um Änderungen wirksam zu machen
menu.hint_reset Zurücksetzen von Neutrino-HD-Einstellungen auf Standardwerte. Tuner-Einstellungen und Kanäle bleiben erhalten
+menu.hint_restart_tuner Führen Sie einen Neustart des internen Tuners durch. Das kann Empfangsprobleme beheben.
menu.hint_restore Wiederherstellen von vorher erstellten Sicherungen
menu.hint_rotor_swap Tauschen der Rotordrehrichtung Ost/West in den Motor-Einstellungen
menu.hint_rounded_corners Aktiviert die Darstellung abgerundeter Ecken für die Menüs
@@ -1365,6 +1519,7 @@ menu.hint_scan_usals USALS Optionen
menu.hint_scan_usals_repeat Geben Sie die USALS-Wiederholungen für den Rotor ein
menu.hint_scan_usalsall Verwenden Sie USALS für alle Satelliten an diesem Tuner
menu.hint_scan_useusals Verwenden Sie USALS für diesen Satelliten,\nwenn aktiv, wird Rotorposition ignoriert
+menu.hint_scart_osd_fix Anzeigefix für ältere Monitore\nPAL bzw. PAL-Breitbild Auflösung
menu.hint_scrambled_message Bei aktivierter Option erscheint eine Meldung, wenn ein verschlüsselter Sender nicht entschlüsselt werden kann
menu.hint_screen_setup Konfigurieren Sie den Bildschirmbereich für die Menüanzeige
menu.hint_screensaver_delay Legen sie die Zeit (in Minuten) fest, nach der der Bildschirmschoner starten soll oder schaltet ihn aus
@@ -1450,6 +1605,7 @@ menu.hint_volume_digits Zifferndarstellung der Lautstärkeanzeige ein- oder auss
menu.hint_volume_pos Wählen Sie die Position der Lautstärkeanzeige aus
menu.hint_volume_size Wählen Sie die Höhe der Lautstärkeanzeige
menu.hint_webtv_setup Hier konfigurierte WebTV-Kanäle finden Sie in der Kanalverwaltung.
+menu.hint_webtv_xml_auto Lädt automatisch alle XML-Dateien aus %s/
menu.hint_window_size Kanalliste, EPG-Infos und einige andere Fenster werden mit diesem Faktor skaliert
menu.hint_ytplay Wiedergabe von ausgewählten Youtube Feeds
menu.hint_ytplay_setup Konfigurieren Sie YouTube-spezifische Optionen wie maximale Ergebnisse bei Suchen oder Cache-Verzeichnis
@@ -1459,6 +1615,7 @@ messagebox.back Zurück
messagebox.cancel Abbruch
messagebox.discard Wollen Sie die Änderungen verwerfen?
messagebox.error Fehler
+messagebox.exit Beenden
messagebox.feature_not_supported Funktion wird nicht unterstützt. Bitte wenden Sie sich an Ihren Firmware-Anbieter!
messagebox.info Information
messagebox.no Nein
@@ -1503,6 +1660,7 @@ miscsettings.epg_scan_standby Im Standby Modus
miscsettings.general Allgemein
miscsettings.head Erweitert
miscsettings.infobar Infobar
+miscsettings.infobar_analogclock Analoguhr
miscsettings.infobar_buttons_usertitle Benutzertitel für Farbtasten
miscsettings.infobar_casystem_display CA-Systemanzeige
miscsettings.infobar_casystem_dotmatrix CA-Anzeige mit Punktematrix
@@ -1537,6 +1695,7 @@ miscsettings.progressbar_design_1 vertikale Balken
miscsettings.progressbar_design_2 horizontale Balken
miscsettings.progressbar_design_3 Farbverlauf
miscsettings.progressbar_design_4 monochrom
+miscsettings.progressbar_design_5 grafisch
miscsettings.progressbar_design_long Design
miscsettings.progressbar_gradient 3D-Effekt
miscsettings.progressbar_infobar_position Position
@@ -1670,6 +1829,7 @@ moviebrowser.hint_movieend Filmende in 5 Sekunden\n'0' zum Weitersehen
moviebrowser.hint_newbook_backward Neue Wiederholung gestartet.\n'%s' bestimmt die Endposition, '0' bricht ab.
moviebrowser.hint_newbook_forward Neuer Werbesprung gestartet.\n'%s' bestimmt die Endposition, '0' bricht ab.
moviebrowser.hint_truncate Entfernt den Filmteil hinter der Filmende-Markierung
+moviebrowser.imdb_data Lade IMDb-Daten
moviebrowser.info_audio Audio
moviebrowser.info_channel Kanal
moviebrowser.info_file Datei
@@ -1723,7 +1883,7 @@ moviebrowser.menu_truncate Film kürzen
moviebrowser.option_browser Anzeigeoptionen
moviebrowser.reload_at_start Filminfos neu laden bei Start
moviebrowser.remount_at_start Filmdepot verbinden bei Start
-moviebrowser.scan_for_movies Suche Filme ...
+moviebrowser.scan_for_movies Filminfos neu laden
moviebrowser.serie_auto_create Serien automatisch zuordnen
moviebrowser.serie_head Serie
moviebrowser.serie_name Name ändern
@@ -1754,7 +1914,7 @@ moviebrowser.truncate Film kürzen?
moviebrowser.truncate_failed Fehler beim Kürzen des Films
moviebrowser.truncate_failed_playing Kürzen des Films während der Wiedergabe nicht möglich.
moviebrowser.truncating Kürze Film, bitte warten ...
-moviebrowser.ts_only Nur Aufnahmen zeigen
+moviebrowser.ts_only Alle Videoformate zeigen
moviebrowser.update_if_dest_empty_only Übernehmen nur wenn Ziel leer
moviebrowser.use_dir Verzeichnis verwenden
moviebrowser.use_movie_dir Wiedergabeverzeichnis verwenden
@@ -1824,6 +1984,26 @@ mpkey.rewind Rücklauf
mpkey.stop Stopp
mpkey.subtitle Untertitel
mpkey.time Zeitanzeige
+netfs.active_onoff Eintrag aktiv
+netfs.automount_head NetFS Einstellungen
+netfs.automount_intro Einträge für auto.net
+netfs.automount_intro_mounts NetFS-Mounts bearbeiten
+netfs.automount_write Einstellungen speichern und auto.net schreiben
+netfs.automount_write_info auto.net wurde geschrieben
+netfs.dump Dump
+netfs.fstab_domount NetFS-Verzeichnisse anhängen (mount)
+netfs.fstab_domount_info '/etc/init.d/fstab start_netfs' wird ausgeführt
+netfs.fstab_doumount NetFS-Verzeichnisse aushängen (umount)
+netfs.fstab_doumount_info '/etc/init.d/fstab stop_netfs' wird ausgeführt
+netfs.fstab_head NetFS Einstellungen
+netfs.fstab_intro Einträge für fstab
+netfs.fstab_intro_mounts NetFS-Mounts bearbeiten
+netfs.fstab_write Einstellungen speichern und fstab schreiben
+netfs.fstab_write_info fstab wurde geschrieben
+netfs.menu_main_edit Einträge bearbeiten
+netfs.menu_main_head NetFS Einstellungen
+netfs.menu_main_intro Konfiguration von fstab und auto.net
+netfs.pass Pass
networkmenu.apply_settings Änderungen werden übernommen...
networkmenu.apply_settings_now Änderungen jetzt zuweisen?
networkmenu.broadcast Broadcast
@@ -1838,6 +2018,7 @@ networkmenu.ipaddress IP
networkmenu.mount Netzwerkfreigaben bearbeiten
networkmenu.nameserver Nameserver
networkmenu.netmask Netzmaske
+networkmenu.ntpatboot Zeit beim Booten synchr.
networkmenu.ntpenable Zeit per INet synchronisieren
networkmenu.ntprefresh NTP/DVB-Aktualisierung
networkmenu.ntprefresh_hint1 NTP/DVB-Time-Sync [min]
@@ -1858,7 +2039,7 @@ networkmenu.ssid_scan WLAN-Netzwerke suchen
networkmenu.ssid_scan_error Keine WLAN-Netzwerke gefunden.
networkmenu.ssid_scan_wait WLAN-Netzwerke werden gesucht...
networkmenu.test Netzwerk testen
-neutrino_starting Neutrino-HD wird gestartet...
+neutrino_starting NI \o/
nfs.alreadymounted Verzeichnis bereits gemountet.
nfs.automount Beim Start mounten
nfs.dir Verzeichnis/Freigabe
@@ -1882,6 +2063,8 @@ nfs.umount Netzwerk Verzeichnis unmounten
nfs.umounterror Umount-Fehler
nfs.username Benutzername
nfsmenu.head NFS/CIFS/FTPFS Einstellungen
+nimenu.head NI-Einstellungen
+nimenu.head_special Extra-Einstellungen
nvod.percentage (%d%% vorbei)
nvod.starting (Beginn in %d min)
nvodselector.directormode Bildregie-Modus
@@ -1920,6 +2103,8 @@ options.off aus
options.on ein
options.on.without_messages ohne Msg
options.serial seriell
+options.start starten
+options.stop stoppen
parentallock.bouquetmode Bouquets sind standardmässig
parentallock.changepin PIN-Code festlegen
parentallock.changepin_hint1 Geben Sie hier Ihren neuen PIN-Code ein!
@@ -2000,7 +2185,7 @@ pictureviewer.help6 vorheriges Bild
pictureviewer.help7 nächstes Bild
pictureviewer.help8 Modus verlassen
pictureviewer.help9 Anzeige-Modus
-pictureviewer.resize.color_average aufwendig
+pictureviewer.resize.color_average aufwändig
pictureviewer.resize.none keine
pictureviewer.resize.simple einfach
pictureviewer.scaling Skalierung
@@ -2015,7 +2200,35 @@ ping.socket ist nicht erreichbar (Socket-Fehler)
ping.unreachable ist nicht erreichbar (unerreichbar)
pinprotection.head PIN-Abfrage
pinprotection.wrongcode Geben Sie den Code nocheinmal ein!
+plugin.hide_no Anzeigen
+plugin.hide_yes Verstecken
+plugin.item_crond_desc cron Daemon kann zeitgesteuerte Aufgaben ausführen
+plugin.item_crond_name crond
+plugin.item_djmount_desc UPnP AV Client kann den Inhalt von Media-Servern mounten
+plugin.item_djmount_name djmount
+plugin.item_dropbear_desc SSH2 Server und Client
+plugin.item_dropbear_name Dropbear
+plugin.item_emmremind_desc Zeigt eine Änderung der EMM's in den Infoicons an
+plugin.item_emmremind_name EMM-Änderungsbenachrichtigung
+plugin.item_fcm_desc Zeigt die Anrufliste der FRITZ!Box und noch vieles mehr ...
+plugin.item_fcm_name FritzCallMonitor
+plugin.item_inadyn_desc DynDNS Client
+plugin.item_inadyn_name Inadyn
+plugin.item_nfsserver_desc NFS Kernel Server
+plugin.item_nfsserver_name NFS-Server
+plugin.item_sambaserver_desc Server-Message-Block-Protokoll (SMB) Implementierung
+plugin.item_sambaserver_name Samba-Server
+plugin.item_tuxcald_desc Kalenderplugin
+plugin.item_tuxcald_name TuxCal
+plugin.item_tuxmaild_desc Mailplugin (IMAP/SMTP)
+plugin.item_tuxmaild_name TuxMail
+plugin.item_ushare_desc A/V und DLNA Medienserver
+plugin.item_ushare_name uShare
+plugin.item_xupnpd_desc eXtensible UPnP agent - DLNA Medienserver für IPTV
+plugin.item_xupnpd_name xupnpd
+plugins.control Plugins und Services verwalten
plugins.hdd_dir Externes Plugin-Verz.
+plugins.hide Plugins verstecken oder anzeigen
plugins.no_plugin Kein Plugin
plugins.result Pluginausgabe
plugintype.disabled Deaktiviert
@@ -2027,6 +2240,9 @@ rclock.locked Gesperrt
rclock.lockmsg Die Fernbedienung wird gesperrt.\nUm die Sperre aufzuheben, bitte\n[rot] gefolgt von [%s]\nauf der Fernbedienung drücken.
rclock.title Fernbedienung sperren
rclock.unlockmsg Fernbedienung reaktiviert
+recording.end Aufnahmeende festlegen
+recording.end_text Soll die Aufnahme zum Ende der aktuellen Sendung stoppen?
+recording.fill_text Das Aufnahmemedium ist zu %d%% gefüllt. Trotzdem aufnehmen?
recording.is_running Folgende Aufnahme läuft bereits! Neue Aufnahme starten?
recording.start Starte Aufnahme, bitte warten...!
recording.startstop_msg Meldung bei Aufnahme Start/Ende
@@ -2049,6 +2265,7 @@ recordingmenu.file Direkt (Datei)
recordingmenu.filename_template Vorlage für Dateiname
recordingmenu.filename_template_hint Platzhalter werden durch folgende Werte ersetzt:
recordingmenu.filename_template_hint2 %C = Kanal, %T = Titel, %I = Info, %d = Datum, %t = Zeit
+recordingmenu.fill_warn Warnung bei einem Füllstand von
recordingmenu.help Aufnahmegeräte:\n-----------------------\nServer:\nauf PC mit Hilfe eines Streaming-Programmes\n\n(analoger) Videorekorder:\nüber VCR-Ausgang\n\nDirekt (Datei):\nauf ein per NFS gemountetes Verzeichnis\noder eine interne Festplatte\nTS: SPTS-Mode Treiber laden(dbox2)\nPES: SPTS-Mode Treiber nicht laden(dbox2)\n\n\nMaximale Dateigröße:\n----------------------\nNFS V2: 2 GB (2048 MB)\nNFS V3: fast unendlich (0 MB)\nFAT: 2 GB (2048 MB)\nFAT32: 4 GB (4096 MB)
recordingmenu.multimenu.ask_stop_all Wirklich alle %d Aufnahmen beenden?
recordingmenu.multimenu.info_stop_all %d von %d Aufnahmen werden beendet.
@@ -2074,9 +2291,9 @@ reset_channels Lösche Kanäle
reset_confirm Sind Sie sich sicher?
reset_removed Entferne gelöschte Kanäle
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.auto_scan Automatischer Scan (%s)
+satsetup.auto_scan_all Automatischer Scan (alle Satelliten)
+satsetup.cable Erweiterter Kabel-Scan
satsetup.cable_nid Netzwerk ID
satsetup.comm_input Committed Input
satsetup.diseqc DiSEqC
@@ -2185,6 +2402,7 @@ scants.select_tp Wählen Sie einen Transponder
scants.startnow Kanalsuche starten
scants.test Empfangstest
scants.transponders Transponder:
+scart_osd_fix CRT SCART OSD-Fix
scrambled_channel Verschlüsselung aktiv
screensaver.delay Verzögerung
screensaver.dir Verzeichnis
@@ -2218,12 +2436,15 @@ servicemenu.reload_hint Kanallisten werden neu geladen,\nbitte warten...
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.restart_tuner Tuner neu starten
+servicemenu.restarting_tuner Tuner wird neu gestartet
servicemenu.scants Kanalsuche
servicemenu.update Software-Aktualisierung
-settings.backup Image-Einstellungen: Sichern
+settings.backup NI-Backup: Sichern
settings.backup_failed Sicherung fehlgeschlagen!
settings.help Hilfe
settings.menu_hints Hinweise anzeigen
+settings.menu_hints_line Zeige Linie zu den Menü-Hinweisen
settings.menu_pos Position
settings.menus Menüs
settings.missingoptionsconffile Die Neutrino-HD Einstellungen wurden erweitert.\nDie neuen Werte werden auf Standard gesetzt.
@@ -2236,8 +2457,16 @@ settings.pos_higher_center höher zentriert
settings.pos_top_center oben zentriert
settings.pos_top_left oben links
settings.pos_top_right oben rechts
-settings.restore Image-Einstellungen: Wiederherstellen
+settings.restore NI-Backup: Wiederherstellen
settings.restore_warn Alle Settings werden ersetzt.\nDie Box wird neu gestartet.\nWeiter?
+settings.teams Team-übergreifende Einstellungen
+settings.teams.backup Sichern
+settings.teams.backup_failed Sicherung fehlgeschlagen!
+settings.teams.backup_to Sichern nach
+settings.teams.help Hilfe
+settings.teams.help_text In diesem Menü können Einstellungen gesichert und\nwiederhergestellt werden, die zu folgenden Team-Images\nkompatibel sind:\n \n - BluePeer HD\n - NI CS-Image\n \nGesichert werden:\n \n * Kanallisten\n * Timer und Timer-Einstellungen\n * Netzwerkeinstellungen (LAN und WLAN)
+settings.teams.restore Wiederherstellen
+settings.teams.restore_warn Team-übergreifende Einstellungen werden ersetzt.\nDie Box wird neu gestartet.\nWeiter?
shutdown.recording_query Aufnahme läuft. Trotzdem beenden?
shutdowntimer.announce Die Box wird in 1 Min. heruntergefahren.\nShutdown abbrechen?
sleeptimerbox.announce Die Box wird in 1 Min. in Standby-Betrieb gehen.\nStandby-Betrieb abbrechen?
@@ -2257,13 +2486,13 @@ streaminfo.framerate_unknown unbekannt
streaminfo.head Tech. Information
streaminfo.not_available nicht verfügbar
streaminfo.resolution Auflösung
-streaminfo.signal Empfangssignal
+streaminfo.signal Signal
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.overflow Aufnahme-Puffer Überlauf! Bitte ggf. einige Aufnahmen beenden.
streaming.slow System oder Datenträger zu langsam! Bitte ggf. einige Aufnahmen beenden.
streaming.write_error Die Aufnahme wurde leider abgebrochen,\nda ein Fehler beim Schreiben der Daten auftrat.
-stringinput.backspace Rücklöschen
+stringinput.backspace Rücktaste
stringinput.caps Groß / Klein
stringinput.clear Alles löschen
stringinput.insert Einfügen
@@ -2451,6 +2680,7 @@ videomenu.videomode Videosystem
webtv.head WebTV
webtv.xml WebTV-XML-Dateien
webtv.xml.add XML-Datei hinzufügen
+webtv.xml.auto XML-Dateien automatisch laden
webtv.xml.del XML-Datei entfernen
window_size Fenstergröße in %
wizard.initial_settings Grundeinstellungen gefunden
@@ -2460,8 +2690,8 @@ wizard.setup_advanced Erweitert
wizard.setup_easy Einfach
wizard.setup_type Installationstyp
wizard.setup_type_hint Wählen Sie einfache Grundeinstellungen oder erweiterte Auswahlmöglichkeiten für die Installation
-wizard.welcome_head Willkommen zur Ersteinrichtung Ihres Receivers!
-wizard.welcome_text Wir gratulieren Ihnen zum Kauf Ihrer CST. 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 CST 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.\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?
+wizard.welcome_head Willkommen beim NI-Setup-Assistenten!
+wizard.welcome_text NI-Image Info:\nIhre CST Set-Top-Box lässt sich bequem per Webinterface\nsteuern fuer z.B. Timer-Verwaltung oder Live-TV im Web-Browser.\nEin root-Passwort ist noch nicht gesetzt!\nDies sollte so bald wie möglich durch den Befehl "passwd"\nvia Telnet nachgeholt werden um Fremdzugriffe auf den Receiver zu verhindern.\nNächster Schritt?
word.from ab
word.in in
zapit.scantype Service-Auswahl
diff --git a/data/locale/english.locale b/data/locale/english.locale
index 77a3b7a87..b869e8be7 100644
--- a/data/locale/english.locale
+++ b/data/locale/english.locale
@@ -199,6 +199,7 @@ audioplayer.shuffle shuffle
audioplayer.spectrum lcd a-spectrum
audioplayer.stop Stop
audioplayer.title_artist Title, Artist
+blank_screen Blank screen
bookmarkmanager.delete delete
bookmarkmanager.name bookmarks
bookmarkmanager.rename rename
@@ -232,7 +233,30 @@ buildinfo.compiler_flags Compiler flags
buildinfo.creator Creator
buildinfo.kernel Kernel version
buildinfo.menu Build information
+ca_init active CA-System
+ca_init_0 Conax-Card
+ca_init_1 CI module
+ca_init_2 Conax-Card and CI module
cablesetup.provider cable provider
+camd_setup camd control
+camd_item_cs2gbox_hint cs2gbox - Newcamd bridge
+camd_item_cs2gbox_name cs2gbox
+camd_item_doscam_hint DOSCam - Softcam and emulator
+camd_item_doscam_name doscam
+camd_item_gbox_hint GBox - Softcam and emulator
+camd_item_gbox_name gbox
+camd_item_mgcamd_hint MGCamd - Emulator
+camd_item_mgcamd_name mgcamd
+camd_item_newcs_hint NewCS - Softcam
+camd_item_newcs_name newcs
+camd_item_oscam_hint OSCam - Softcam
+camd_item_oscam_name oscam
+camd_item_osemu_hint OSEmu - Emulator
+camd_item_osemu_name osemu
+camd_msg_reset camd will be restarted
+camd_msg_start camd will be started
+camd_msg_stop camd will be stopped
+camd_reset camd restart
channellist.additional Additional informations
channellist.additional_off off
channellist.additional_on on
@@ -339,7 +363,7 @@ colorthememenu.head Select theme
colorthememenu.head2 Load themes
colorthememenu.menu_hints Hint box
colorthememenu.name Theme name
-colorthememenu.neutrino_theme Neutrino Theme
+colorthememenu.neutrino_theme NI-Neutrino-HD Theme
colorthememenu.question Use selected theme?
colorthememenu.save Save current theme
colorthememenu.select1 User Theme
@@ -348,6 +372,10 @@ cpu.freq CPU frequency
cpu.freq_default Default frequency
cpu.freq_normal Normal frequency
cpu.freq_standby Standby frequency
+crossteam.hint_settings_teams Save and restore settings, which\nare compatible with participating Team-Images.
+crossteam.hint_settings_teams_backup Save cross-team settings
+crossteam.hint_settings_teams_help Help about cross-team settings
+crossteam.hint_settings_teams_restore Restore cross-team settings
date.Apr Apr
date.Aug Aug
date.Dec Dec
@@ -372,6 +400,10 @@ debug.level Level
debug.level_1 normal
debug.level_2 informative
debug.level_3 verbose
+ecminfo ECM-Info
+ecminfo_null ECM-Info not available
+ecminfo_show Show ECM-Info
+empty
epg.saving Saving EPG
epgextended.actors Actors
epgextended.director Director
@@ -622,6 +654,7 @@ flashupdate.createimage_warning Now an image for the %s STB is created.\nThis im
flashupdate.currentversion_sep Current version
flashupdate.currentversiondate Date
flashupdate.currentversiontime Time
+flashupdate.enter_flash_script Stopping services and softcams ...
flashupdate.erasefailed erasure of flash failed
flashupdate.erasing erasing flash
flashupdate.experimentalimage The image you have selected is an untested version, this means\nyour box maybe fail to boot after update.\n\nDo you really want to update to this version?
@@ -656,6 +689,7 @@ flashupdate.namemode2_default +.img
flashupdate.namemode2_hostname_time ++.img
flashupdate.new_found New image found !
flashupdate.new_notfound No new images found
+flashupdate.ng_noflash USB-Image active, update canceled!
flashupdate.noversion Version checks are currently only supported when updating over the web.\nAre you sure that you wish to install this image?
flashupdate.programmingflash programming flash
flashupdate.proxypassword Password
@@ -700,6 +734,7 @@ fontmenu.eventlist Eventlist
fontmenu.head Font settings
fontmenu.infobar Infobar
fontmenu.menu Menu
+fontmenu.moviebrowser Moviebrowser
fontmenu.other Other
fontmenu.scaling Global Font Zoom Factor
fontmenu.scaling_x Horizontal (in %)
@@ -724,6 +759,7 @@ fontsize.eventlist_title Title
fontsize.filebrowser_item Filebrowser items
fontsize.hint Initialising font,\nplease wait...
fontsize.infobar_channame Channel name
+fontsize.infobar_ecminfo ECM-Info
fontsize.infobar_info info
fontsize.infobar_number Number
fontsize.infobar_small Small
@@ -731,6 +767,9 @@ fontsize.menu Menu text
fontsize.menu_hint Menu hints
fontsize.menu_info Menu Info
fontsize.menu_title Menu Title
+fontsize.moviebrowser_head Headers
+fontsize.moviebrowser_info Info window
+fontsize.moviebrowser_list List items
fontsize.subtitles Text subtitles
fsk.all off
fsk.from_12 from 12
@@ -747,16 +786,30 @@ hdd_30min 30 min.
hdd_5min 5 min.
hdd_60min 60 min.
hdd_activate Apply settings
+hdd_allow_set_recdir Allow recordings immediately
hdd_check Check filesystem
-hdd_check_failed HDD-check failed!
+hdd_check_failed Device-check failed!
hdd_check_format_bad Checking of disks with format %s is not supported.
-hdd_extended_settings Extended HDD-Settings
+hdd_extended_settings Extended Device-Settings
hdd_fast Fast
hdd_format Format device
hdd_format_failed Formating failed! Make sure device not in use, reboot and try again
+hdd_format_on_mount_failed Format device when mount failed
hdd_format_warn All data on device will be lost ! Continue with format ?
hdd_fs Filesystem used to format
hdd_fs_unknown unknown
+hdd_info_capacity Capacity
+hdd_info_firmware Firmware
+hdd_info_head HDD Info
+hdd_info_info Sampled with smartctl
+hdd_info_model Model
+hdd_info_model_family Model family
+hdd_info_rotation_rate Rotation rate
+hdd_info_sata_version SATA-version
+hdd_info_sector_size Sector size
+hdd_info_serial Serial
+hdd_info_temperature Temperature
+hdd_info_unknown unknown
hdd_manage Manage device
hdd_middle Mid
hdd_mount Mount
@@ -764,7 +817,8 @@ hdd_mount_failed Failed to mount.
hdd_mount_ok Device ready to use.
hdd_mount_umount Mount/Unmount
hdd_noise Acoustic-control (AAM)
-hdd_not_found No HDD found
+hdd_not_found No device found
+hdd_power Internal HDD-power
hdd_removable_device Removable device
hdd_set_recdir Use device for recording ?
hdd_settings Data Storage
@@ -776,20 +830,55 @@ hdd_statfs_recording while recording only
hdd_umount Unmount
hdd_umount_warn unmount device
hdd_umounted Device removed
+hdd_wakeup Internal wakeup function
+hdd_wakeup_msg wakeup function with message
+hdd_wakeup_start wakeup starting
imageinfo.creator Creator:
imageinfo.date Date:
imageinfo.dokumentation Docs:
imageinfo.forum Forum:
-imageinfo.head Image info:
+imageinfo.head Image informations
imageinfo.homepage Home page:
imageinfo.image Image:
imageinfo.kernel Kernel:
imageinfo.license License
imageinfo.vcs Git:
imageinfo.version Version:
+imdb.info IMDb-Info
+imdb.info_save save Cover
inetradio.name Internetradio
+inetradio_autostart Internetradio auto-start
+infoicons_background Show background
+infoicons_flag_all Reset all
+infoicons_flag_del Flagfile deleted
+infoicons_flag_del_head Reset Flagfiles
+infoicons_flag_delall All Flagfiles are deleted
+infoicons_flag_head Customize Flagfiles
+infoicons_flag_name0 E-Mail Receipt
+infoicons_flag_name1 Answering Device
+infoicons_flag_name2 Serverconnection
+infoicons_flag_name3 Custom
+infoicons_flag_name4 Custom
+infoicons_flag_name5 Custom
+infoicons_flag_name6 Custom
+infoicons_flag_name7 Custom
+infoicons_head Infoicons Settings
+infoicons_infoviewer with Infoviewer
+infoicons_modeicon Infoicons
+infoicons_msg_start starting Infoicons
+infoicons_msg_stop stopping Infoicons
+infoicons_popup only on state changes
+infoicons_skin Infoicons skin
+infoicons_static permanent
+infoicons_switch_off Infoicons off
+infoicons_switch_on Infoicons on
infoviewer.epgnotload EPG not loaded....
infoviewer.epgwait waiting for EPG...
+infoviewer.iconset Iconset
+infoviewer.iconset_pkg0 Original
+infoviewer.iconset_pkg1 NI-Dark
+infoviewer.iconset_pkg2 NI-Bright
+infoviewer.iconset_pkg3 NI-Flat
infoviewer.motor_moving Antenna positioning
infoviewer.next next
infoviewer.nocurrent No info for current program available
@@ -860,6 +949,20 @@ keychoosermenu.setnone no key
languagesetup.head Language / Timezone
languagesetup.osd OSD Language
languagesetup.select OSD Language
+lcd4l_clock_a Analog clock in Standby-Mode
+lcd4l_logodir Channellogo-Directory
+lcd4l_skin Display-Style
+lcd4l_skin_0 Standard
+lcd4l_skin_1 Large
+lcd4l_skin_2 Small (SysInfo)
+lcd4l_skin_3 d-box2
+lcd4l_skin_4 User
+lcd4l_skin_radio Activate Radio-Style
+lcd4l_support LCD4Linux-Support
+lcd4l_support_auto automatic
+lcd4l_support_off off
+lcd4l_support_on on
+lcd4l_weather Weather in Standby-Mode
lcd_info_line show in infoline
lcd_info_line_channel Channelname
lcd_info_line_clock clock
@@ -985,8 +1088,12 @@ menu.hint_back_brief Return to previous menu
menu.hint_backlight Configure buttons backlight
menu.hint_backup Backup configs and channels to selected dir
menu.hint_bedit Edit favorites and bouquets
+menu.hint_blank_screen Turn off VideoDecoder until next event (keypress, timer etc.)
menu.hint_buildinfo Information about compilers, compiler flags, kernel
+menu.hint_ca_init Configuration of CA-system hardware, CA-module and card slots
menu.hint_cache_txt Start teletext caching after channel switch
+menu.hint_camd Softcam and emulator settings\nStart, stop, version info
+menu.hint_camd_reset Restart the active softcam and/or emulator
menu.hint_cec_mode CEC mode
menu.hint_cec_standby CEC standby
menu.hint_cec_view_on CEC view ON
@@ -1051,14 +1158,20 @@ menu.hint_font_ttx Select font file to use for teletext
menu.hint_fonts Configure GUI fonts and font sizes
menu.hint_games Show list of installed games
menu.hint_hdd Format / check data storage
+menu.hint_hdd_allow_set_recdir Allow to set new connected devices as a record medium
menu.hint_hdd_apply Apply sleep/noise parameters
menu.hint_hdd_check Check filesystem (fsck)
menu.hint_hdd_fmt Select the data storage format
menu.hint_hdd_format Create HDD partition and format it
+menu.hint_hdd_format_on_mount_failed Format HDD device when mount failed?
+menu.hint_hdd_info Device information about capacity, temperature and more...
menu.hint_hdd_noise Set Automatic Acoustic Management\nnot all drives support this
+menu.hint_hdd_power Activate internal HDD power for Coolstream HD1 boxes
menu.hint_hdd_sleep Select time to stop hdd on inactivity
menu.hint_hdd_statfs Specify when the recording directory fill level in infoviewer and, if available, on VFD, may be updated
menu.hint_hdd_tools Initialize HDD, check filesystem
+menu.hint_hdd_wakeup Turns the internal wakeup functions for connected drives on or off
+menu.hint_hdd_wakeup_msg Turns the messages while starting the wakeup function on or off
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
@@ -1066,7 +1179,9 @@ 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_inetradio_autostart Start play of first entry from favorites automatically
menu.hint_info Information about image, box cpu and storage,\nstream information
+menu.hint_infobar_analogclock Shows an analog clock instead of the digital display of the time
menu.hint_infobar_back Change infobar background color
menu.hint_infobar_buttons_usertitle Forces userdefined titles for the color keys
menu.hint_infobar_casys On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-systems
@@ -1074,8 +1189,10 @@ menu.hint_infobar_casys_color Change CA-System background color
menu.hint_infobar_casys_dotmatrix on: CA-System with dot matrix in background
menu.hint_infobar_casys_frame on: CA-System with frame
menu.hint_infobar_dd Show DD icon
+menu.hint_infobar_ecminfo Show ecm-info while infobar is displayed
menu.hint_infobar_filesys Show flash and HDD used space levels
menu.hint_infobar_fonts Change infobar font sizes
+menu.hint_infobar_iconset Iconset selection for CA-Bar
menu.hint_infobar_logo Logo, channelnumber and signal display; Options in [brackets] will be displayed in small infobox
menu.hint_infobar_logo_dir Select directory to search for channels logo
menu.hint_infobar_on_epg Show infobar on current EPG event change
@@ -1086,6 +1203,21 @@ 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_infoclock_setup Configure info clock GUI options
+menu.hint_infoicons_background Determines whether the Infoicons should be shown with or without background
+menu.hint_infoicons_flag_all Reset all flagfiles
+menu.hint_infoicons_flag_del_head Reset several/all flagfiles for Infoicons
+menu.hint_infoicons_flag_head Change Flagfile
+menu.hint_infoicons_flag_name0 Flagfile entry
+menu.hint_infoicons_flag_name1 Flagfile entry
+menu.hint_infoicons_flag_name2 Flagfile entry
+menu.hint_infoicons_flag_name3 Flagfile entry
+menu.hint_infoicons_flag_name4 Flagfile entry
+menu.hint_infoicons_flag_name5 Flagfile entry
+menu.hint_infoicons_flag_name6 Flagfile entry
+menu.hint_infoicons_flag_name7 Flagfile entry
+menu.hint_infoicons_head Configuration of Infoicons
+menu.hint_infoicons_modeicon Activate/deactivate Infoicons
+menu.hint_infoicons_skin Infoicons modes
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
@@ -1150,6 +1282,12 @@ menu.hint_language OSD language, timezone\nPreffered audio and subtitles languag
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_lcd4l_clock_a Shows an analog clock instead of a digital clock on display at standby
+menu.hint_lcd4l_logodir Logo directory.\nFallback to default on invalid entry.
+menu.hint_lcd4l_skin Switch between modes\nDefault, Big, SysInfo, d-box2, User Defined
+menu.hint_lcd4l_skin_radio Switch the mode, when Radio-Mode is activated
+menu.hint_lcd4l_support Activate/deactivate LCD4Linux\nsupported display: Pearl DPF
+menu.hint_lcd4l_weather Shows first tuxwetter favorite on display at standby
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
@@ -1168,6 +1306,7 @@ menu.hint_mbkey_cover Assign button to create movie cover while playback or dele
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_hints_line Activate/deactivate the line from the menu to this hints
menu.hint_menu_pos Select menu position
menu.hint_menus Configure menu options
menu.hint_misc_cec HDMI-CEC Options
@@ -1178,6 +1317,7 @@ menu.hint_misc_filebrowser Filesystem encoding, file rights\ndeny directory leav
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_moviebrowser_fonts Change moviebrowser (My recordings) font sizes
menu.hint_moviebrowser_setup Set selection and display options.
menu.hint_movieplayer_plugin Choose a plugin that's executed with the one touch key in movieplayer mode
menu.hint_net_broadcast Enter broadcast address\nif unsure, use IP address with last .255
@@ -1195,6 +1335,7 @@ 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_ntpatboot Enable time sync using NTP protocol while booting
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
@@ -1213,10 +1354,19 @@ 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_net_xupnpd Share live channels over UPNP
+menu.hint_netfs_automount_write Save automount entries and write /etc/auto.net
+menu.hint_netfs_fstab_domount Mount fstab entries
+menu.hint_netfs_fstab_doumount Umount fstab entries
+menu.hint_netfs_fstab_write Save fstab entries and write /etc/fstab
+menu.hint_netfs_menu_main_automount Configure automount entries
+menu.hint_netfs_menu_main_fstab Configure fstab entries
+menu.hint_netfs_menu_main_head Fstab and automount configuration
+menu.hint_netfs_mounts NetFS entry
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_next Continue to next menu\nPress menu key to close all menus
menu.hint_next_brief Continue to next menu
+menu.hint_nimenu Configuration of softcams, plugins, tools and more
menu.hint_numeric_adjust Adjust channel list mode on numeric zap
menu.hint_opkg Install or update software packages
menu.hint_opkg_feed_addresses_edit Edit feed addresses
@@ -1241,7 +1391,9 @@ menu.hint_plugin_type_games Show games in usermenu at selection 'Plugin types'
menu.hint_plugin_type_lua Show plugins in usermenu at selection 'Plugin types'
menu.hint_plugin_type_scripts Show scripts in usermenu at selection 'Plugin types'
menu.hint_plugin_type_tools Show tools in usermenu at selection 'Plugin types'
+menu.hint_plugins_control Configuration of installed plugins and services
menu.hint_plugins_hdd_dir Select directory to load\nplugins from
+menu.hint_plugins_hide Hide or show integrated plugins or plugins in user menus
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
@@ -1270,6 +1422,7 @@ menu.hint_record_data_vtxt VideoText stream
menu.hint_record_dir Select directory to store recordings
menu.hint_record_end Stop direct record after maximal time or after current event end time
menu.hint_record_filename_template edit filename template
+menu.hint_record_fill_warn Show warning, when record medium is nearly full
menu.hint_record_slow_warn Show warning, when record buffer is close to overflow
menu.hint_record_startstop_msg Turns the message when recording start/end on or off.
menu.hint_record_tdir Select directory to save timeshift recordings\nin temporary timeshift mode
@@ -1289,6 +1442,7 @@ menu.hint_recording Recording and timeshift options\nTimers safety, audio pids o
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_restart_tuner Restart the internal tuner. This may help if you're experiencing reception problems
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
@@ -1365,6 +1519,7 @@ menu.hint_scan_usals USALS options
menu.hint_scan_usals_repeat Repeat usals move rotor commands\nif you expirience unstable rotor move
menu.hint_scan_usalsall Use USALS for all satellites on this frontend
menu.hint_scan_useusals Use USALS for this satellite,\nif ON, rotor position ignored
+menu.hint_scart_osd_fix Screen-fix for some older TVs\nPAL/PAL widescreen resolution
menu.hint_scrambled_message Show scrambled message, when channel cannot be decoded
menu.hint_screen_setup Configure screen margins
menu.hint_screensaver_delay Set the time (in minutes) after which the screensaver has to start or turn it off
@@ -1450,6 +1605,7 @@ menu.hint_volume_digits Numeric display of the volumebar on/off
menu.hint_volume_pos Select volume indicator position
menu.hint_volume_size Select volume indicator height
menu.hint_webtv_setup WebTV channels configured here will be available in the standard channel lists.
+menu.hint_webtv_xml_auto Auto-load all existing XML files from %s/
menu.hint_window_size Channellist, EPG-infos and some other windows are scaled by this factor
menu.hint_ytplay Play selected youtube feeds
menu.hint_ytplay_setup Configure YouTube-specific options, e.g. an upper limit for search results
@@ -1459,6 +1615,7 @@ messagebox.back Back
messagebox.cancel Cancel
messagebox.discard Discard changes?
messagebox.error Error
+messagebox.exit Exit
messagebox.feature_not_supported Feature is not supported. Please contact your firmware provider!
messagebox.info Information
messagebox.no No
@@ -1503,6 +1660,7 @@ miscsettings.epg_scan_standby Standby
miscsettings.general General
miscsettings.head Extended settings
miscsettings.infobar Infobar
+miscsettings.infobar_analogclock Analog clock
miscsettings.infobar_buttons_usertitle Usertitles for color keys
miscsettings.infobar_casystem_display CA-System display
miscsettings.infobar_casystem_dotmatrix CA display with dot matrix
@@ -1537,6 +1695,7 @@ miscsettings.progressbar_design_1 colored vertical lines
miscsettings.progressbar_design_2 colored horizontal lines
miscsettings.progressbar_design_3 colored bar
miscsettings.progressbar_design_4 monochrome
+miscsettings.progressbar_design_5 graphical
miscsettings.progressbar_design_long Design
miscsettings.progressbar_gradient 3D effect
miscsettings.progressbar_infobar_position Position
@@ -1670,6 +1829,7 @@ moviebrowser.hint_movieend Film end in 5 seconds\n'0' to cancel
moviebrowser.hint_newbook_backward New jump back started\n'%s' to define endposition, '0' to cancel
moviebrowser.hint_newbook_forward New jump forward started\n'%s' to define endposition, '0' to cancel
moviebrowser.hint_truncate Truncating all data beyond the end-bookmark
+moviebrowser.imdb_data Get IMDb data
moviebrowser.info_audio Audio
moviebrowser.info_channel Channel
moviebrowser.info_file File
@@ -1754,7 +1914,7 @@ moviebrowser.truncate Truncate movie?
moviebrowser.truncate_failed Truncate failed.
moviebrowser.truncate_failed_playing Impossible to truncate playing movie.
moviebrowser.truncating Truncating movie, please wait ...
-moviebrowser.ts_only Show recordings only
+moviebrowser.ts_only Show all video formats
moviebrowser.update_if_dest_empty_only Copy if destination is empty only
moviebrowser.use_dir Use directory
moviebrowser.use_movie_dir Use movie directory
@@ -1824,6 +1984,26 @@ mpkey.rewind Rewind
mpkey.stop Stop
mpkey.subtitle Subtitles
mpkey.time Show time
+netfs.active_onoff Entry active
+netfs.automount_head NetFS settings
+netfs.automount_intro /etc/auto.net entries
+netfs.automount_intro_mounts edit NetFS mounts
+netfs.automount_write save settings and write auto.net
+netfs.automount_write_info auto.net written
+netfs.dump dump
+netfs.fstab_domount mount NetFS directory
+netfs.fstab_domount_info Running '/etc/init.d/fstab start_netfs'
+netfs.fstab_doumount unmount NetFS directory
+netfs.fstab_doumount_info Running '/etc/init.d/fstab stop_netfs'
+netfs.fstab_head NetFS settings
+netfs.fstab_intro /etc/fstab entries
+netfs.fstab_intro_mounts Edit NetFS mounts
+netfs.fstab_write save settings and write fstab
+netfs.fstab_write_info fstab written
+netfs.menu_main_edit Edit entries
+netfs.menu_main_head NetFS settings
+netfs.menu_main_intro Configuration of fstab and auto.net
+netfs.pass pass
networkmenu.apply_settings Changes are applied...
networkmenu.apply_settings_now Do you want to apply settings now?
networkmenu.broadcast Broadcast
@@ -1838,6 +2018,7 @@ networkmenu.ipaddress IP address
networkmenu.mount Edit network shares
networkmenu.nameserver Name server
networkmenu.netmask Netmask
+networkmenu.ntpatboot Sync time while booting
networkmenu.ntpenable Syncronisation via
networkmenu.ntprefresh NTP/DVB-Refresh
networkmenu.ntprefresh_hint1 NTP/DVB-Time-Sync in minutes
@@ -1858,7 +2039,7 @@ networkmenu.ssid_scan WLAN network scan
networkmenu.ssid_scan_error No WLAN networks are found.
networkmenu.ssid_scan_wait WLAN network scan in progress...
networkmenu.test Test network now
-neutrino_starting Neutrino-HD starting...
+neutrino_starting NI \o/
nfs.alreadymounted directory already mounted
nfs.automount Mount on startup
nfs.dir directory/share
@@ -1882,6 +2063,8 @@ nfs.umount Umount Network volume
nfs.umounterror error umounting volume
nfs.username username
nfsmenu.head NFS/CIFS/FTPFS settings
+nimenu.head NI-Settings
+nimenu.head_special Special settings
nvod.percentage (%d%% over)
nvod.starting (starting in %d min)
nvodselector.directormode Director mode
@@ -1920,6 +2103,8 @@ options.off off
options.on on
options.on.without_messages Without msg
options.serial serial
+options.start start
+options.stop stop
parentallock.bouquetmode Bouquets are default
parentallock.changepin change PIN code
parentallock.changepin_hint1 Enter your new parental lock pin code here!
@@ -2015,7 +2200,35 @@ ping.socket is unreachable (socket error)
ping.unreachable is unreachable
pinprotection.head Enter PIN code
pinprotection.wrongcode PIN-Code was wrong! Try again.
+plugin.hide_no Show
+plugin.hide_yes Hide
+plugin.item_crond_desc Cron daemon allows scheduled tasks
+plugin.item_crond_name crond
+plugin.item_djmount_desc UPnP AV Client allows to mount media-servers
+plugin.item_djmount_name djmount
+plugin.item_dropbear_desc SSH2 server und client
+plugin.item_dropbear_name Dropbear
+plugin.item_emmremind_desc Display different EMM's to the Infoicons
+plugin.item_emmremind_name EMM-Change Notification
+plugin.item_fcm_desc Shows FRITZ!Box call list and much more ...
+plugin.item_fcm_name FritzCallMonitor
+plugin.item_inadyn_desc DynDNS client
+plugin.item_inadyn_name Inadyn
+plugin.item_nfsserver_desc NFS kernel server
+plugin.item_nfsserver_name NFS-Server
+plugin.item_sambaserver_desc Server-Message-Block-Protokoll (SMB) implementation
+plugin.item_sambaserver_name Samba-Server
+plugin.item_tuxcald_desc Calender-plugin
+plugin.item_tuxcald_name TuxCal
+plugin.item_tuxmaild_desc Mailplugin (IMAP/SMTP)
+plugin.item_tuxmaild_name TuxMail
+plugin.item_ushare_desc A/V and DLNA Mediaserver
+plugin.item_ushare_name uShare
+plugin.item_xupnpd_desc eXtensible UPnP agent - DLNA Mediaserver for IPTV
+plugin.item_xupnpd_name xupnpd
+plugins.control Control plugins and services
plugins.hdd_dir Plugin HDD dir.
+plugins.hide Hide or show plugins
plugins.no_plugin No plugin
plugins.result plugin output
plugintype.disabled Disabled
@@ -2027,6 +2240,9 @@ rclock.locked Locked
rclock.lockmsg Remote control will be locked.\nTo unlock, press\n[red] followed by [%s]\non your remote control.
rclock.title Lock remote control
rclock.unlockmsg Remote control unlocked
+recording.end Set record end
+recording.end_text Stop this record at the end of current show?
+recording.fill_text Record medium is filled up to %d%%. Nevertheless start record?
recording.is_running This channel already recording. Start new record?
recording.start Start recording, please wait...!
recording.startstop_msg Message when recording is start/stop
@@ -2049,6 +2265,7 @@ recordingmenu.file direct (file)
recordingmenu.filename_template filename template
recordingmenu.filename_template_hint wildcards will be replaced
recordingmenu.filename_template_hint2 %C = channel, %T = title, %I = info, %d = date, %t = time
+recordingmenu.fill_warn Show fill warning at
recordingmenu.help Recording devices:\n--------------------------\nserver:\nusing streaming software on a PC\n\n(analog) vcr:\nusing the vcr outlet\n\ndirect (file):\ndirectly into an NFS mounted directory\nor onto an internal hard drive\nTS: use spts mode(dbox2)\nPES: do not use spts mode(dbox2)\n\n\nMax. file size:\n---------------------\nNFS V2: 2 GB (2048 MB)\nNFS V3: almost unlimited (0 MB)\nFAT: 2 GB (2048 MB)\nFAT32: 4 GB (4096 MB)
recordingmenu.multimenu.ask_stop_all really stop all %d recordings?
recordingmenu.multimenu.info_stop_all %d of %d recordings will be stopped.
@@ -2185,6 +2402,7 @@ scants.select_tp Select transponder
scants.startnow start scan
scants.test Test signal
scants.transponders Transponders:
+scart_osd_fix CRT SCART OSD-Fix
scrambled_channel Scrambled channel
screensaver.delay Delay
screensaver.dir Directory
@@ -2218,12 +2436,15 @@ servicemenu.reload_hint Reloading channel lists,\nplease be patient.
servicemenu.restart Soft restart
servicemenu.restart_hint Restarting, please wait
servicemenu.restart_refused_recording Cant restart, recording in progress
+servicemenu.restart_tuner Restart tuner
+servicemenu.restarting_tuner Restarting tuner
servicemenu.scants Servicescan
servicemenu.update Software Update
-settings.backup Image-Settings: Backup
+settings.backup NI-Backup: save
settings.backup_failed Backup failed!
settings.help Help
settings.menu_hints Show menu hints
+settings.menu_hints_line Show line to menu hints
settings.menu_pos Menu position
settings.menus Menus
settings.missingoptionsconffile The Neutrino-HD settings have been updated.\nNew Options will be set to default.
@@ -2236,8 +2457,16 @@ settings.pos_higher_center higher center
settings.pos_top_center top center
settings.pos_top_left top left
settings.pos_top_right top right
-settings.restore Image-Settings: Restore
+settings.restore NI-Backup: restore
settings.restore_warn This will replace all settings and reboot\nContinue ?
+settings.teams Cross-Team Settings
+settings.teams.backup Save
+settings.teams.backup_failed Backup failed!
+settings.teams.backup_to Saving to
+settings.teams.help Help
+settings.teams.help_text In this menu, settings can be saved and restored,\nwhich are compatible with these Team-Images:\n \n - BluePeer HD\n - NI CS-Image\n \nSaved will be:\n \n * Channellists\n * Timer and Timer-Settings\n * Network-Settings (LAN and WLAN)
+settings.teams.restore Restore
+settings.teams.restore_warn This will replace all cross-team settings and reboot\nContinue ?
shutdown.recording_query You really want to to stop record ?
shutdowntimer.announce Box will shutdown in 1 min.\nCancel Shutdown ?
sleeptimerbox.announce Box will standby in 1 min.\nCancel Standby ?
@@ -2257,7 +2486,7 @@ streaminfo.framerate_unknown unknown
streaminfo.head Stream-Information
streaminfo.not_available not available
streaminfo.resolution Resolution
-streaminfo.signal Receipt signal
+streaminfo.signal Signal
streaming.busy One or several recording processes are active.\nIf you encounter this message and no recording is active, please restart Neutrino-HD.
streaming.dir_not_writable The recording directory is not writable.\nRecording will not work.
streaming.overflow Record buffer overflow, consider to stop some records
@@ -2451,6 +2680,7 @@ videomenu.videomode Digital video mode
webtv.head WebTV
webtv.xml WebTV XML files
webtv.xml.add Add XML file
+webtv.xml.auto Auto-load XML files
webtv.xml.del Remove XML file
window_size Window size in %
wizard.initial_settings Initial settings found
@@ -2460,8 +2690,8 @@ wizard.setup_advanced Advanced
wizard.setup_easy Easy
wizard.setup_type Installation type
wizard.setup_type_hint Easy to setup for CanalDigitaal/TéléSAT/TV Vlaanderen providers or simple cable scan
-wizard.welcome_head Welcome to the Setup Wizard
-wizard.welcome_text Next steps will guide you through initial installation of the device.\nImportant: Your CST set-top box can be conveniently controlled\nwith the web interface for timer management or live TV on the Web browser.\nDo not make it accessible to untrusted networks!\nDo you want to continue?
+wizard.welcome_head Welcome to the NI-Setup-Wizard
+wizard.welcome_text NI-Image Info:\nYour CST set-top box can be conveniently controlled\nwith the web interface for timer management or live TV on the Web browser.\nA root-password is not yet set!\nYou should catch up this by using the command "passwd" via telnet asap.\nDo you want to continue?
word.from from
word.in in
zapit.scantype scan for services
diff --git a/data/neutrino-scripts/Makefile.am b/data/neutrino-scripts/Makefile.am
index 4083e81f3..da7ce1a02 100644
--- a/data/neutrino-scripts/Makefile.am
+++ b/data/neutrino-scripts/Makefile.am
@@ -2,5 +2,22 @@
installdir = $(CONFIGDIR)
install_DATA = flash.start
+#NI
+install_DATA += \
+ ni-migration.sh \
+ movieplayer.start \
+ movieplayer.end \
+ recording.start \
+ recording.end \
+ standby.on \
+ standby.off
+
install-data-hook:
chmod 0755 $(DESTDIR)$(CONFIGDIR)/flash.start
+ chmod 0755 $(DESTDIR)$(CONFIGDIR)/ni-migration.sh
+ chmod 0755 $(DESTDIR)$(CONFIGDIR)/movieplayer.start
+ chmod 0755 $(DESTDIR)$(CONFIGDIR)/movieplayer.end
+ chmod 0755 $(DESTDIR)$(CONFIGDIR)/recording.start
+ chmod 0755 $(DESTDIR)$(CONFIGDIR)/recording.end
+ chmod 0755 $(DESTDIR)$(CONFIGDIR)/standby.on
+ chmod 0755 $(DESTDIR)$(CONFIGDIR)/standby.off
diff --git a/data/neutrino-scripts/flash.start b/data/neutrino-scripts/flash.start
index 253e06d70..40799d93a 100755
--- a/data/neutrino-scripts/flash.start
+++ b/data/neutrino-scripts/flash.start
@@ -1,17 +1,10 @@
#!/bin/sh
-if pidof vsftpd > /dev/null; then
- echo "Kill vsftpd"
- killall vsftpd
-fi
+## kill neutrino start-script first ########
+killall start_neutrino
-if pidof ushare > /dev/null; then
- echo "Kill ushare"
- trap "" INT
- kill -INT `pidof ushare`
-fi
+## create flagfile #########################
+touch /tmp/.${0##*/}
-if [ -e /var/etc/.djmount ]; then
- echo "Kill djmount"
- fusermount -u /media/00upnp
-fi
+## run shutdown routine ####################
+/etc/init.d/rcK
diff --git a/data/neutrino-scripts/movieplayer.end b/data/neutrino-scripts/movieplayer.end
new file mode 100644
index 000000000..d58c78279
--- /dev/null
+++ b/data/neutrino-scripts/movieplayer.end
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+service tuxcald start
+service tuxmaild start
diff --git a/data/neutrino-scripts/movieplayer.start b/data/neutrino-scripts/movieplayer.start
new file mode 100644
index 000000000..baab37761
--- /dev/null
+++ b/data/neutrino-scripts/movieplayer.start
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+service tuxcald stop
+service tuxmaild stop
diff --git a/data/neutrino-scripts/ni-migration.sh b/data/neutrino-scripts/ni-migration.sh
new file mode 100644
index 000000000..46175d716
--- /dev/null
+++ b/data/neutrino-scripts/ni-migration.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cd /var/tuxbox/config
+if [ -e neutrino.conf ]; then
+ sed -i 's|ng_netfs_\(.*\)|netfs_\1|' neutrino.conf
+
+ sort neutrino.conf > neutrino.sort
+ mv neutrino.sort neutrino.conf
+fi
diff --git a/data/neutrino-scripts/recording.end b/data/neutrino-scripts/recording.end
new file mode 100644
index 000000000..d58c78279
--- /dev/null
+++ b/data/neutrino-scripts/recording.end
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+service tuxcald start
+service tuxmaild start
diff --git a/data/neutrino-scripts/recording.start b/data/neutrino-scripts/recording.start
new file mode 100644
index 000000000..baab37761
--- /dev/null
+++ b/data/neutrino-scripts/recording.start
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+service tuxcald stop
+service tuxmaild stop
diff --git a/data/neutrino-scripts/standby.off b/data/neutrino-scripts/standby.off
new file mode 100644
index 000000000..d58c78279
--- /dev/null
+++ b/data/neutrino-scripts/standby.off
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+service tuxcald start
+service tuxmaild start
diff --git a/data/neutrino-scripts/standby.on b/data/neutrino-scripts/standby.on
new file mode 100644
index 000000000..baab37761
--- /dev/null
+++ b/data/neutrino-scripts/standby.on
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+service tuxcald stop
+service tuxmaild stop
diff --git a/data/scripts/Makefile.am b/data/scripts/Makefile.am
index 9b1482f2e..3bcb0c0bd 100644
--- a/data/scripts/Makefile.am
+++ b/data/scripts/Makefile.am
@@ -3,9 +3,21 @@ installdir = $(bindir)
install_DATA = \
backup.sh \
restore.sh \
+ wakeup.sh \
install.sh
+if BOXMODEL_APOLLO
+install_DATA += \
+ backup_flash.sh \
+ restore_flash.sh
+endif
+
install-data-hook:
chmod 0755 $(DESTDIR)$(bindir)/backup.sh
chmod 0755 $(DESTDIR)$(bindir)/restore.sh
+ chmod 0755 $(DESTDIR)$(bindir)/wakeup.sh
chmod 0755 $(DESTDIR)$(bindir)/install.sh
+if BOXMODEL_APOLLO
+ chmod 0755 $(DESTDIR)$(bindir)/backup_flash.sh
+ chmod 0755 $(DESTDIR)$(bindir)/restore_flash.sh
+endif
diff --git a/data/scripts/backup.sh b/data/scripts/backup.sh
index 2ab6bcf7e..30bcb19ef 100755
--- a/data/scripts/backup.sh
+++ b/data/scripts/backup.sh
@@ -1,17 +1,46 @@
#!/bin/sh
-DATE=$(date +%Y-%m-%d_%H-%M-%S)
+. /etc/init.d/globals
+
+DATE=$(hostname)_$(date +%Y-%m-%d_%H-%M-%S)
USRF="/var/tuxbox/config/tobackup.conf"
+BAKF="$1/settings_$DATE.tar.gz"
+
+TOBACKUP="\
+ /share/tuxbox/neutrino/flex/flex_eigene_scripte.conf \
+ /var/tuxbox/config/FritzCallMonitor.addr \
+ /var/tuxbox/config/FritzCallMonitor.cfg \
+ /var/tuxbox/config/radio-favorites.xml \
+ /var/tuxbox/config/timerd.conf \
+ /var/tuxbox/config/tuxcal/ \
+ /var/tuxbox/config/tuxmail/ \
+ /var/tuxbox/config/zapit/ \
+ /var/tuxbox/config/doscam.* \
+ /var/tuxbox/config/neutrino.conf \
+ /var/tuxbox/config/oscam.* \
+ /var/tuxbox/config/oscammon.conf \
+ /var/tuxbox/config/scan.conf \
+ /var/bin/ \
+ /var/etc/ \
+ /var/keys/ \
+ /etc/auto.net \
+ /etc/exports \
+ /etc/fstab \
+ /etc/hostname \
+ /etc/resolv.conf \
+ /etc/profile.local \
+ /etc/network/interfaces \
+ /etc/wpa_supplicant.conf \
+ /etc/passwd \
+"
+
+SHOWINFO "backup to ${BAKF} ..."
if [ -e "${USRF}" ]; then
-# read user-files from $USRF
- TOBACKUP="${USRF}"
+ TOBACKUP="$TOBACKUP ${USRF}"
while read i
do [ "${i:0:1}" = "#" ] || TOBACKUP="$TOBACKUP ${i%%#*}"
done < $USRF
-
-else
- TOBACKUP="/var/tuxbox/config/"
fi
# check existence
@@ -22,6 +51,6 @@ for i in $TOBACKUP
TOBACKUP=$(echo $RES)
-echo Backup to $1/settings_$DATE.tar
+tar -czf "${BAKF}" $TOBACKUP 2>&1 >/dev/null
-tar -cf $1/settings_$DATE.tar $TOBACKUP 2>&1 >/dev/null
+SHOWINFO "done."
diff --git a/data/scripts/backup_flash.sh b/data/scripts/backup_flash.sh
new file mode 100644
index 000000000..026efa9a6
--- /dev/null
+++ b/data/scripts/backup_flash.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+. /etc/init.d/globals
+
+RES=""
+VAR="/var/"
+USRF="/var/tuxbox/config/tobackup.conf"
+BAKF="/var/backup_flash.tar.gz"
+
+TOBACKUP="/etc/auto.net*"
+
+SHOWINFO "backup to ${BAKF} ..."
+
+if [ -e "${USRF}" ]; then
+ TOBACKUP="$TOBACKUP ${USRF}"
+ while read i
+ do [ "${i:0:1}" = "#" ] || TOBACKUP="$TOBACKUP ${i%%#*}"
+ done < $USRF
+fi
+
+# check existence and skip files in /var
+for i in $TOBACKUP; do
+ if [ -e "$i" -a ${i:0:${#VAR}} != ${VAR} ]; then
+ SHOWINFO "add $i"
+ RES="$RES $i"
+ else
+ SHOWINFO "skip $i"
+ fi
+done
+
+TOBACKUP=$(echo $RES)
+
+tar -czf "${BAKF}" $TOBACKUP 2>&1 >/dev/null
+
+SHOWINFO "done."
diff --git a/data/scripts/restore.sh b/data/scripts/restore.sh
index 59bccff4b..6fff22dad 100755
--- a/data/scripts/restore.sh
+++ b/data/scripts/restore.sh
@@ -1,14 +1,19 @@
#!/bin/sh
-echo Restore settings from $1
-tar t -f $1 | grep ^config/ > /dev/null
-if [ $? -eq 0 ]; then
- cd /var/tuxbox
-else
- cd /
-fi
+. /etc/init.d/globals
+
+BAKF="$1"
+E=0
-tar xf $1
sync
+sleep 2
+killall start_neutrino; E=$(($E+$?))
+killall neutrino; E=$(($E+$?))
+sleep 3
+
+SHOWINFO "restore settings from "${BAKF}""
+cd / && tar -xzf "${BAKF}"
sync
-reboot -f
+SHOWINFO "done."
+
+test $E -eq 0 && reboot || reboot -f
diff --git a/data/scripts/restore_flash.sh b/data/scripts/restore_flash.sh
new file mode 100644
index 000000000..a6bc9a4e2
--- /dev/null
+++ b/data/scripts/restore_flash.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. /etc/init.d/globals
+
+BAKF="/var/backup_flash.tar.gz"
+
+if [ -e ${BAKF} ]; then
+ SHOWINFO "restore settings from ${BAKF} ..."
+ cd / && tar -xzf "${BAKF}"
+ sync
+ rm -rf "${BAKF}"
+ SHOWINFO "done."
+else
+ SHOWINFO "${BAKF} not found. nothing to restore!"
+fi
diff --git a/data/scripts/wakeup.sh b/data/scripts/wakeup.sh
new file mode 100644
index 000000000..0cab585d5
--- /dev/null
+++ b/data/scripts/wakeup.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+. /etc/init.d/globals
+
+test $1 || { SHOWINFO "error"; exit 1; }
+
+directory="$(echo ${@%/})"
+timestamp="$(date +%Y%m%d%H%M%S)"
+flag="${directory}/.wakeUp_${timestamp}"
+
+SHOWINFO "try to wake up \"${directory}\" ..."
+touch "${flag}" 2>/dev/null && rm -f "${flag}"
diff --git a/data/settingsupdate.conf b/data/settingsupdate.conf
index 5234dc041..07653e999 100644
--- a/data/settingsupdate.conf
+++ b/data/settingsupdate.conf
@@ -29,26 +29,43 @@
#---------------------------------------------------------------------------
-#-------------
-## Sicherungen
-#-------------
+#-------------------------
+## NI Standard-Sicherungen
+#-------------------------
+/var/tuxbox/config/tobackup.conf
+/var/tuxbox/config/settingsupdate.conf
+
+/var/tuxbox/config/cables.xml
+/var/tuxbox/config/FritzCallMonitor.addr
+/var/tuxbox/config/FritzCallMonitor.cfg
+/var/tuxbox/config/radio-favorites.xml
+/var/tuxbox/config/radio-stations.xml
+/var/tuxbox/config/timerd.conf
+/var/tuxbox/config/satellites.xml
+/var/tuxbox/config/tuxcal/
+/var/tuxbox/config/tuxmail/
+/var/tuxbox/config/zapit/
+/var/tuxbox/config/oscam.*
+/var/tuxbox/config/oscammon.conf
+/var/tuxbox/config/scan.conf
+/var/tuxbox/config/srv.conf
+/var/tuxbox/config/flex/flex_eigene_scripte.conf
+/var/bin/
+/var/keys/
+/etc/auto.net*
+/etc/exports
+/etc/fstab
/etc/hostname
/etc/hosts
-/etc/network
/etc/resolv.conf
+/etc/profile.local
+/etc/network/interfaces
/etc/wpa_supplicant.conf
-/var/etc
-/var/tuxbox/config
+/etc/passwd
+
+## Persnliche Sicherungen
#----------------------------------------------------------------------------------------
## von der Sicherung auszuschlieende Dateien, gekennzeichnet durch ein vorangestelltes -
#----------------------------------------------------------------------------------------
--/var/etc/update.urls
--/var/tuxbox/config/cables.xml
--/var/tuxbox/config/encoding.conf
--/var/tuxbox/config/providermap.xml
--/var/tuxbox/config/radio-stations.xml
--/var/tuxbox/config/satellites.xml
--/var/tuxbox/config/settingsupdate.conf
--/var/tuxbox/config/tobackup.conf
diff --git a/data/themes/DarkOrange.theme b/data/themes/DarkOrange.theme
new file mode 100644
index 000000000..0d52d82b6
--- /dev/null
+++ b/data/themes/DarkOrange.theme
@@ -0,0 +1,67 @@
+clock_Digit_alpha=0
+clock_Digit_blue=44
+clock_Digit_green=44
+clock_Digit_red=44
+colored_events_alpha=0
+colored_events_blue=44
+colored_events_channellist=2
+colored_events_green=44
+colored_events_infobar=2
+colored_events_red=44
+infobar_Text_alpha=0
+infobar_Text_blue=100
+infobar_Text_green=100
+infobar_Text_red=100
+infobar_alpha=10
+infobar_blue=12
+infobar_casystem_alpha=8
+infobar_casystem_blue=12
+infobar_casystem_green=12
+infobar_casystem_red=12
+infobar_gradient_body=0
+infobar_gradient_body_direction=1
+infobar_gradient_bottom=3
+infobar_gradient_bottom_direction=1
+infobar_gradient_top=4
+infobar_gradient_top_direction=1
+infobar_green=12
+infobar_red=12
+menu_ButtonBar_gradient=3
+menu_ButtonBar_gradient_direction=1
+menu_Content_Selected_Text_alpha=0
+menu_Content_Selected_Text_blue=0
+menu_Content_Selected_Text_green=0
+menu_Content_Selected_Text_red=0
+menu_Content_Selected_alpha=10
+menu_Content_Selected_blue=7
+menu_Content_Selected_green=43
+menu_Content_Selected_red=99
+menu_Content_Text_alpha=0
+menu_Content_Text_blue=100
+menu_Content_Text_green=100
+menu_Content_Text_red=100
+menu_Content_alpha=10
+menu_Content_blue=12
+menu_Content_green=12
+menu_Content_inactive_Text_alpha=0
+menu_Content_inactive_Text_blue=44
+menu_Content_inactive_Text_green=44
+menu_Content_inactive_Text_red=44
+menu_Content_inactive_alpha=10
+menu_Content_inactive_blue=12
+menu_Content_inactive_green=12
+menu_Content_inactive_red=12
+menu_Content_red=12
+menu_Head_Text_alpha=0
+menu_Head_Text_blue=7
+menu_Head_Text_green=43
+menu_Head_Text_red=99
+menu_Head_alpha=10
+menu_Head_blue=0
+menu_Head_gradient=4
+menu_Head_gradient_direction=1
+menu_Head_green=0
+menu_Head_red=0
+menu_Hint_gradient=4
+menu_Hint_gradient_direction=1
+menu_Separator_gradient_enable=1
diff --git a/data/themes/Gray.theme b/data/themes/Gray.theme
index 4abf37e83..97ea189ab 100644
--- a/data/themes/Gray.theme
+++ b/data/themes/Gray.theme
@@ -33,9 +33,9 @@ menu_Content_alpha=0
menu_Content_blue=40
menu_Content_green=30
menu_Content_inactive_Text_alpha=0
-menu_Content_inactive_Text_blue=100
-menu_Content_inactive_Text_green=100
-menu_Content_inactive_Text_red=100
+menu_Content_inactive_Text_blue=65
+menu_Content_inactive_Text_green=65
+menu_Content_inactive_Text_red=65
menu_Content_inactive_alpha=0
menu_Content_inactive_blue=40
menu_Content_inactive_green=30
diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
index 8914d5b0e..573df4d65 100644
--- a/data/themes/Makefile.am
+++ b/data/themes/Makefile.am
@@ -7,6 +7,7 @@ install_DATA = \
DVB2000.theme \
DarkBlue.theme \
DarkBrown.theme \
+ DarkOrange.theme \
Gray.theme \
Grey-Blue.theme \
MonoChrom.theme \
diff --git a/data/tobackup.conf b/data/tobackup.conf
index 4b5522b45..6a5761f74 100644
--- a/data/tobackup.conf
+++ b/data/tobackup.conf
@@ -3,4 +3,3 @@
#
# /var/etc/rcS.local # an example for a single file
# /var/tuxbox/config/tuxtxt/ # an example for a complete directory
-/var/tuxbox/config/ # old default
diff --git a/data/webtv_usr.xml b/data/webtv_usr.xml
new file mode 100644
index 000000000..2e017daac
--- /dev/null
+++ b/data/webtv_usr.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/lib/libdvbsub/dvbsub.cpp b/lib/libdvbsub/dvbsub.cpp
index a0f061202..3af6d17fe 100644
--- a/lib/libdvbsub/dvbsub.cpp
+++ b/lib/libdvbsub/dvbsub.cpp
@@ -49,7 +49,7 @@ static void clear_queue();
int dvbsub_init() {
int trc;
- sub_debug.set_level(3);
+ sub_debug.set_level(0); //NI
reader_running = true;
dvbsub_stopped = 1;
diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp
index d480f6299..48127fe66 100644
--- a/lib/libdvbsub/dvbsubtitle.cpp
+++ b/lib/libdvbsub/dvbsubtitle.cpp
@@ -32,7 +32,7 @@ extern "C" {
#endif
// Set these to 'true' for debug output:
-static bool DebugConverter = true;
+static bool DebugConverter = false; //NI
#define dbgconverter(a...) if (DebugConverter) sub_debug.print(Debug::VERBOSE, a)
diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp
index 91722ee88..f0eace48e 100644
--- a/lib/libtuxtxt/tuxtxt.cpp
+++ b/lib/libtuxtxt/tuxtxt.cpp
@@ -179,6 +179,10 @@ int toptext_getnext(int startpage, int up, int findgroup)
nextgrp = nextblk = 0;
current = startpage;
+ //NI
+ if (startpage == 0)
+ return 0;
+
do {
if (up)
tuxtxt_next_dec(¤t);
diff --git a/lib/libtuxtxt/tuxtxt.h b/lib/libtuxtxt/tuxtxt.h
index 9fcaed9e2..6a46e1fc7 100644
--- a/lib/libtuxtxt/tuxtxt.h
+++ b/lib/libtuxtxt/tuxtxt.h
@@ -105,7 +105,7 @@ int tv_pip_y;
#define TOPMENUINDENTGRP 1
#define TOPMENUINDENTDEF 2
#define TOPMENUSPC 0
-#define TOPMENUCHARS (TOPMENUINDENTDEF+12+TOPMENUSPC+4)
+#define TOPMENUCHARS (TOPMENUINDENTDEF+12+TOPMENUSPC+3) //NI
#define FLOFSIZE 4
diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h
index 6607b589e..bd7e15fa8 100644
--- a/lib/libtuxtxt/tuxtxt_common.h
+++ b/lib/libtuxtxt/tuxtxt_common.h
@@ -599,7 +599,7 @@ void *tuxtxt_CacheThread(void * /*arg*/)
continue;
/* read packet */
- ssize_t readcnt;
+ ssize_t readcnt = 0; //NI
readcnt = dmx->Read(pes_packet, sizeof (pes_packet), 1000);
//if (readcnt != sizeof(pes_packet))
diff --git a/src/Makefile.am b/src/Makefile.am
index 1a30813fc..36725b473 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -156,8 +156,6 @@ if BOXMODEL_APOLLO
neutrino_LDADD += -liconv
endif
-bin_PROGRAMS += drivertool
-drivertool_SOURCES = drivertool.c
bin_PROGRAMS += dt
dt_SOURCES = dt.c
bin_PROGRAMS += rcsim
diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp
index e7c7ad682..9bb6d9911 100644
--- a/src/driver/framebuffer.cpp
+++ b/src/driver/framebuffer.cpp
@@ -161,7 +161,7 @@ void CFrameBuffer::waitForIdle(const char* func)
//fprintf(stderr, "%s: read %02x, expected %02x\n", __FUNCTION__, cfg, _mark);
} while(++count < 2048); /* don't deadlock here if there is an error */
- if (count > 512) /* more than 100 are unlikely, */{
+ if (count > 1024) /* more than 100 are unlikely, */{ //NI
if (func != NULL)
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%04u) [%s]!\n", count, func);
else
@@ -200,6 +200,7 @@ CFrameBuffer::CFrameBuffer()
backgroundFilename = "";
fd = 0;
tty = 0;
+ locked = false; //NI
m_transparent_default = CFrameBuffer::TM_BLACK; // TM_BLACK: Transparency when black content ('pseudo' transparency)
// TM_NONE: No 'pseudo' transparency
// TM_INI: Transparency depends on g_settings.infobar_alpha ???
@@ -382,16 +383,20 @@ nolfb:
lfb=0;
}
-
-CFrameBuffer::~CFrameBuffer()
+//NI
+void CFrameBuffer::clearIconCache()
{
std::map::iterator it;
-
for(it = icon_cache.begin(); it != icon_cache.end(); ++it) {
/* printf("FB: delete cached icon %s: %x\n", it->first.c_str(), (int) it->second.data); */
cs_free_uncached(it->second.data);
}
icon_cache.clear();
+}
+
+CFrameBuffer::~CFrameBuffer()
+{
+ clearIconCache(); //NI
if (background) {
delete[] background;
@@ -819,7 +824,7 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int
return;
if (dx == 0 || dy == 0) {
- dprintf(DEBUG_NORMAL, "[CFrameBuffer] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __FUNCTION__, __LINE__, radius, x, y, x+dx, y+dy);
+ //NI dprintf(DEBUG_NORMAL, "[CFrameBuffer] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __FUNCTION__, __LINE__, radius, x, y, x+dx, y+dy);
return;
}
@@ -1937,13 +1942,26 @@ void * CFrameBuffer::convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, uns
return int_convertRGB2FB(rgbbuff, x, y, 0, true);
}
-void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool /*transp*/)
+//NI
+void CFrameBuffer::blit2FB_unscaled(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t unscaled_w, uint32_t unscaled_h, uint32_t xp, uint32_t yp, bool transp)
+{
+ return blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp, unscaled_w, unscaled_h);
+}
+
+//NI
+void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool /*transp*/, uint32_t unscaled_w, uint32_t unscaled_h)
{
int xc, yc;
xc = (width > xRes) ? xRes : width;
yc = (height > yRes) ? yRes : height;
+ //NI
+ if(unscaled_w != 0 && (int)unscaled_w < xc)
+ xc = unscaled_w;
+ if(unscaled_h != 0 && (int)unscaled_h < yc)
+ yc = unscaled_h;
+
#if defined(FB_HW_ACCELERATION)
if(!(width%4)) {
fb_image image;
@@ -1953,10 +1971,10 @@ void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32
image.height = yc;
image.cmap.len = 0;
image.depth = 32;
-#if 1
+ if(unscaled_w == 0 && unscaled_h == 0) { //NI #if 1
image.data = (const char*)fbbuff;
ioctl(fd, FBIO_IMAGE_BLT, &image);
-#else
+ } else { //NI #else
for (int count = 0; count < yc; count++ ) {
fb_pixel_t* data = (fb_pixel_t *) fbbuff;
fb_pixel_t *pixpos = &data[(count + yp) * width];
@@ -1965,7 +1983,7 @@ void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32
image.height = 1;
ioctl(fd, FBIO_IMAGE_BLT, &image);
}
-#endif
+ } //NI #endif
//printf("\033[34m>>>>\033[0m [%s:%s:%d] FB_HW_ACCELERATION (image) x: %d, y: %d, w: %d, h: %d\n", __file__, __func__, __LINE__, xoff, yoff, xc, yc);
return;
}
@@ -1983,7 +2001,6 @@ void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32
_write_gxa(gxa_base, GXA_BMP1_TYPE_REG, (3 << 16) | width);
_write_gxa(gxa_base, GXA_BMP1_ADDR_REG, (unsigned int) uKva);
-
_write_gxa(gxa_base, cmd, GXA_POINT(xoff, yoff)); /* destination pos */
_write_gxa(gxa_base, cmd, GXA_POINT(xc, yc)); /* source width, FIXME real or adjusted xc, yc ? */
_write_gxa(gxa_base, cmd, GXA_POINT(xp, yp)); /* source pos */
diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h
index 9ed2ca839..5150b17de 100644
--- a/src/driver/framebuffer.h
+++ b/src/driver/framebuffer.h
@@ -273,9 +273,14 @@ class CFrameBuffer : public sigc::trackable
void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, int transp = 0xFF);
void* convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y);
void displayRGB(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb = true, int transp = 0xFF);
- void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
+ //NI void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
+ //NI
+ void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false, uint32_t unscaled_w = 0, uint32_t unscaled_h = 0);
+ void blit2FB_unscaled(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t unscaled_w = 0, uint32_t unscaled_h = 0, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
+ void clearIconCache();
+
enum
{
TM_EMPTY = 0,
diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp
index 7c81ef2ed..79e9deae1 100644
--- a/src/driver/pictureviewer/pictureviewer.cpp
+++ b/src/driver/pictureviewer/pictureviewer.cpp
@@ -636,6 +636,30 @@ bool CPictureViewer::DisplayImage(const std::string & name, int posx, int posy,
return false;
}
+//NI
+bool CPictureViewer::DisplayImage_unscaled(const std::string & name, int posx, int posy, int width, int height, int transp)
+{
+ int fb_w = width;
+ int fb_h = height;
+
+ CFrameBuffer* frameBuffer = CFrameBuffer::getInstance();
+ if (transp > CFrameBuffer::TM_EMPTY)
+ frameBuffer->SetTransparent(transp);
+
+ /* TODO: cache or check for same */
+ fb_pixel_t * data = getIcon(name, &width, &height);
+
+ if (transp > CFrameBuffer::TM_EMPTY)
+ frameBuffer->SetTransparentDefault();
+
+ if(data) {
+ frameBuffer->blit2FB_unscaled(data, width, height, posx, posy, fb_w, fb_h);
+ cs_free_uncached(data);
+ return true;
+ }
+ return false;
+}
+
fb_pixel_t * CPictureViewer::int_getImage(const std::string & name, int *width, int *height, bool GetImage)
{
if (access(name.c_str(), R_OK) == -1)
diff --git a/src/driver/pictureviewer/pictureviewer.h b/src/driver/pictureviewer/pictureviewer.h
index 8183f1943..232dce5fc 100644
--- a/src/driver/pictureviewer/pictureviewer.h
+++ b/src/driver/pictureviewer/pictureviewer.h
@@ -75,6 +75,9 @@ class CPictureViewer
void rescaleImageDimensions(int *width, int *height, const int max_width, const int max_height, bool upscale=false);
void getSupportedImageFormats(std::vector& erw);
+ //NI
+ bool DisplayImage_unscaled(const std::string & name, int posx, int posy, int width, int height, int transp=CFrameBuffer::TM_EMPTY);
+
private:
CFormathandler *fh_root;
ScalingMode m_scaling;
diff --git a/src/driver/record.cpp b/src/driver/record.cpp
index 0592347ff..ebca39f52 100644
--- a/src/driver/record.cpp
+++ b/src/driver/record.cpp
@@ -49,6 +49,7 @@
#include
#include
#include
+#include
#include
@@ -136,12 +137,15 @@ void CRecordInstance::WaitRecMsg(time_t StartTime, time_t WaitTime)
usleep(100000);
}
+//NI
+#if 0
int CRecordInstance::GetStatus()
{
if (record)
return record->GetStatus();
return 0;
}
+#endif
record_error_msg_t CRecordInstance::Start(CZapitChannel * channel)
{
@@ -150,7 +154,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel)
if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg)
hintBox.paint();
- wakeup_hdd(Directory.c_str());
+ //NI wakeup_hdd(Directory.c_str());
std::string tsfile = std::string(filename) + ".ts";
printf("%s: file %s vpid %x apid %x\n", __FUNCTION__, tsfile.c_str(), allpids.PIDs.vpid, apids[0]);
@@ -273,7 +277,7 @@ bool CRecordInstance::Stop(bool remove_event)
CCamManager::getInstance()->Stop(channel_id, CCamManager::RECORD);
if((autoshift && g_settings.auto_delete) /* || autoshift_delete*/) {
- snprintf(buf,sizeof(buf), "nice -n 20 rm -f \"%s.ts\" &", filename);
+ snprintf(buf,sizeof(buf), "nice -n 20 rm -f \"%s.ts\"", filename); //NI
my_system(3, "/bin/sh", "-c", buf);
snprintf(buf,sizeof(buf), "%s.xml", filename);
//autoshift_delete = false;
@@ -649,11 +653,11 @@ record_error_msg_t CRecordInstance::MakeFileName(CZapitChannel * channel)
std::string ext_channel_name;
unsigned int pos;
- safe_mkdir(Directory.c_str());
+ //NI safe_mkdir(Directory.c_str());
if(check_dir(Directory.c_str())) {
/* check if Directory and network_nfs_recordingdir the same */
if(g_settings.network_nfs_recordingdir != Directory) {
- safe_mkdir(g_settings.network_nfs_recordingdir.c_str());
+ //NI safe_mkdir(g_settings.network_nfs_recordingdir.c_str());
/* not the same, check network_nfs_recordingdir and return error if not ok */
if(check_dir(g_settings.network_nfs_recordingdir.c_str()))
return RECORD_INVALID_DIRECTORY;
@@ -706,6 +710,26 @@ record_error_msg_t CRecordInstance::MakeFileName(CZapitChannel * channel)
MakeExtFileName(channel, ext_file_name);
strcpy(&(filename[pos]), UTF8_TO_FILESYSTEM_ENCODING(ext_file_name.c_str()));
+ //NI auto change record filename
+ std::string tsfile = std::string(filename) + ".ts";
+ if (access(tsfile, F_OK) == 0) {
+ printf("CRecordInstance::%s: ts file already found: %s\n", __func__, tsfile.c_str());
+ char newname[FILENAMEBUFFERSIZE] = {0};
+ bool changed = false;
+ for (unsigned int i = 2; i < 1000; i++) {
+ snprintf(newname, sizeof(newname), "%s_%03d", filename, i);
+ tsfile = std::string(newname) + ".ts";
+ if (access(tsfile, F_OK) != 0) {
+ snprintf(filename, sizeof(filename), "%s", newname);
+ changed = true;
+ printf("CRecordInstance::%s: ts file changed to: %s\n", __func__, tsfile.c_str());
+ break;
+ }
+ }
+ if (!changed)
+ printf("CRecordInstance::%s: can't change ts file: %s\n", __func__, tsfile.c_str());
+ }
+
if(autoshift)
strncat(filename, "_temp",FILENAMEBUFFERSIZE - strlen(filename)-1);
@@ -778,7 +802,7 @@ void CRecordInstance::GetRecordString(std::string &str, std::string &dur)
return;
}
char stime[15];
- int err = GetStatus();
+ //NI int err = GetStatus();
strftime(stime, sizeof(stime), "%H:%M:%S ", localtime(&start_time));
time_t duration = (time(0) - start_time) / 60;
char dtime[20];
@@ -786,7 +810,7 @@ void CRecordInstance::GetRecordString(std::string &str, std::string &dur)
int m = duration - (h * 60);
snprintf(dtime, sizeof(dtime), "(%d %s %02d %s)", h, h == 1 ? g_Locale->getText(LOCALE_RECORDING_TIME_HOUR) : g_Locale->getText(LOCALE_RECORDING_TIME_HOURS),
m, g_Locale->getText(LOCALE_RECORDING_TIME_MIN));
- str = stime + channel->getName() + ": " + GetEpgTitle() + ((err & REC_STATUS_OVERFLOW) ? " [!] " : " ");
+ str = stime + channel->getName() + ": " + GetEpgTitle(); //NI
dur = dtime;
}
@@ -806,9 +830,12 @@ CRecordManager::CRecordManager()
durations.clear();
autoshift = false;
shift_timer = 0;
+//NI
+#if 0
check_timer = 0;
error_display = true;
warn_display = true;
+#endif
}
CRecordManager::~CRecordManager()
@@ -1036,12 +1063,15 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons
mutex.unlock();
if (error_msg == RECORD_OK) {
+//NI
+#if 0
if (check_timer == 0)
check_timer = g_RCInput->addTimer(5*1000*1000, false);
/* set flag to show record error if any */
error_display = true;
warn_display = true;
+#endif
return true;
}
@@ -1247,8 +1277,11 @@ void CRecordManager::StopPostProcess()
RestoreNeutrino();
StartNextRecording();
RunStopScript();
+//NI
+#if 0
if(!RecordingStatus())
g_RCInput->killTimer(check_timer);
+#endif
}
bool CRecordManager::Update(const t_channel_id channel_id)
@@ -1282,6 +1315,8 @@ int CRecordManager::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
StartAutoRecord();
return messages_return::handled;
}
+//NI
+#if 0
else if(data == check_timer) {
if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby) {
mutex.lock();
@@ -1303,6 +1338,7 @@ int CRecordManager::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
return messages_return::handled;
}
}
+#endif
}
return messages_return::unhandled;
}
@@ -1389,6 +1425,28 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey )
tostart = (ShowMsg(LOCALE_RECORDING_IS_RUNNING, title.c_str(),
CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes);
}
+ //NI
+ if (g_settings.recording_startstop_msg) {
+ int ret = ShowMsg(LOCALE_RECORDING_END, g_Locale->getText(LOCALE_RECORDING_END_TEXT),
+ g_settings.recording_epg_for_end ? CMessageBox::mbrYes : CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo | CMessageBox::mbCancel, NULL, 450, 20, true);
+ if (ret == CMessageBox::mbrCancel)
+ return menu_return::RETURN_EXIT_ALL;
+ else
+ g_settings.recording_epg_for_end = (ret == CMessageBox::mbrYes);
+
+ cHddStat::getInstance()->statOnce();
+ if (cHddStat::getInstance()->getPercent() > g_settings.recording_fill_warning)
+ {
+ printf("[neutrino] fill is %d%% (warn %d%%)\n", cHddStat::getInstance()->getPercent(), g_settings.recording_fill_warning);
+ char txt[1024];
+ snprintf(txt, sizeof(txt)-1, g_Locale->getText(LOCALE_RECORDING_FILL_TEXT), cHddStat::getInstance()->getPercent());
+
+ ret = ShowMsg(LOCALE_HDD_STATFS, txt,
+ CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 20, true);
+ if (ret == CMessageBox::mbrNo)
+ return menu_return::RETURN_EXIT_ALL;
+ }
+ }
if (tostart) {
CRecordManager::getInstance()->Record(live_channel_id);
@@ -1554,6 +1612,10 @@ bool CRecordManager::RunStartScript(void)
if(RecordingStatus())
return false;
+ //NI
+ printf("CRecordManager::%s: wakeup hdd...\n", __func__);
+ wakeup_hdd(g_settings.network_nfs_recordingdir.c_str(),true);
+
puts("[neutrino.cpp] executing " NEUTRINO_RECORDING_START_SCRIPT ".");
if (my_system(NEUTRINO_RECORDING_START_SCRIPT) != 0) {
perror(NEUTRINO_RECORDING_START_SCRIPT " failed");
@@ -1847,7 +1909,7 @@ bool CRecordManager::LinkTimeshift()
char buf[512];
autoshift = false;
sprintf(buf, "ln %s/* %s", timeshiftDir, g_settings.network_nfs_recordingdir);
- system(buf);
+ my_system(3, "/bin/sh", "-c", buf); //NI
autoshift_delete = true;
}
}
diff --git a/src/driver/record.h b/src/driver/record.h
index d5d5c4495..4cb21b809 100644
--- a/src/driver/record.h
+++ b/src/driver/record.h
@@ -129,7 +129,10 @@ class CRecordInstance
bool Timeshift() { return autoshift; };
int tshift_mode;
void SetStopMessage(const char* text) {rec_stop_msg = text;} ;
+//NI
+#if 0
int GetStatus();
+#endif
CFrontend * frontend;
};
@@ -158,9 +161,12 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/
int last_mode;
bool autoshift;
uint32_t shift_timer;
+//NI
+#if 0
uint32_t check_timer;
bool error_display;
bool warn_display;
+#endif
OpenThreads::Mutex mutex;
static OpenThreads::Mutex sm;
diff --git a/src/driver/scanepg.cpp b/src/driver/scanepg.cpp
index 24c6e3d33..39b9040d3 100644
--- a/src/driver/scanepg.cpp
+++ b/src/driver/scanepg.cpp
@@ -332,6 +332,10 @@ void CEpgScan::EnterStandby()
if (standby) {
CZapit::getInstance()->SetCurrentChannelID(live_channel_id);
CNeutrinoApp::getInstance()->standbyToStandby();
+
+ //NI
+ if (g_settings.epg_save && g_settings.epg_save_standby)
+ CNeutrinoApp::getInstance()->saveEpg(false); //false CVFD::MODE_STANDBY
}
}
diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp
index 7af3a18f0..5134d562e 100644
--- a/src/driver/vfd.cpp
+++ b/src/driver/vfd.cpp
@@ -429,6 +429,8 @@ void CVFD::showVolume(const char vol, const bool force_update)
return;
volume = vol;
+ if(g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 2 /* off */) return; //NI
+
bool allowed_mode = (mode == MODE_TVRADIO || mode == MODE_AUDIO || mode == MODE_MENU_UTF8);
if (!allowed_mode)
return;
@@ -464,6 +466,8 @@ void CVFD::showPercentOver(const unsigned char perc, const bool /*perform_update
percentOver = perc;
+ if(g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 2 /* off */) return; //NI
+
if (mode == MODE_AUDIO && origin != MODE_AUDIO) // exclusive access for audio mode
return;
diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp
index 91e6b0dfa..532b61a0c 100644
--- a/src/eitd/sectionsd.cpp
+++ b/src/eitd/sectionsd.cpp
@@ -1248,7 +1248,9 @@ static void commandWriteSI2XML(int connfd, char *data, const unsigned dataLength
data[dataLength] = '\0';
+ xprintf("[sectionsd] writeEventsToFile started\n"); //NI
writeEventsToFile(data);
+ xprintf("[sectionsd] writeEventsToFile finished\n"); //NI
eventServer->sendEvent(CSectionsdClient::EVT_WRITE_SI_FINISHED, CEventServer::INITID_SECTIONSD);
}
diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp
index 6748e14f5..23a73d4ff 100644
--- a/src/eitd/xmlutil.cpp
+++ b/src/eitd/xmlutil.cpp
@@ -577,6 +577,8 @@ void writeEventsToFile(const char *epgdir)
tmpname = (std::string)epgdir + "/index.tmp";
+ printf("[sectionsd] Try to open file: %s\n", tmpname.c_str()); //NI
+
if (!(indexfile = fopen(tmpname.c_str(), "w"))) {
printf("[sectionsd] unable to open %s for writing\n", tmpname.c_str());
return;
diff --git a/src/global.h b/src/global.h
index 94e5a781c..1df06dec0 100644
--- a/src/global.h
+++ b/src/global.h
@@ -24,6 +24,7 @@
*/
#include
+#include //NI
#ifndef NEUTRINO_CPP
#define NEUTRINO_CPP extern
@@ -42,10 +43,12 @@
#define MOVIEPLAYER_START_SCRIPT CONFIGDIR "/movieplayer.start"
#define MOVIEPLAYER_END_SCRIPT CONFIGDIR "/movieplayer.end"
#define NEUTRINO_ENTER_FLASH_SCRIPT CONFIGDIR "/flash.start"
+#define NEUTRINO_NI_MIGRATION_SCRIPT CONFIGDIR "/ni-migration.sh" //NI
#define NEUTRINO_SCAN_SETTINGS_FILE CONFIGDIR "/scan.conf"
#define NEUTRINO_PARENTALLOCKED_FILE DATADIR "/neutrino/.plocked"
+#define FONTDIR_VAR "/var/tuxbox/fonts/" //NI
#define ICONSDIR_VAR "/var/tuxbox/icons/"
#define LOCALEDIR_VAR "/var/tuxbox/locale"
#define THEMESDIR_VAR "/var/tuxbox/themes"
diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
index d9cb6931e..ac22f2c8a 100644
--- a/src/gui/Makefile.am
+++ b/src/gui/Makefile.am
@@ -6,8 +6,9 @@ version.h:
echo '#define BUILT_DATE "'`date`'"' > $@
@if test -d $(top_srcdir)/.git ; then \
pushd $(top_srcdir) ; \
+ GITTAG=$$(git tag -l "NG-*" | tail -n1); \
GITBRANCH=$$(git rev-parse --abbrev-ref HEAD) ; \
- GITDESCRIBE=$$(git describe --always --tags --dirty || echo 'VCS failed') ; \
+ GITDESCRIBE=$$(git describe --always --dirty --tags --match $$GITTAG || echo 'VCS failed') ; \
popd ; \
echo '#define VCS "'$${GITDESCRIBE} [$${GITBRANCH}]'"' >> $@ ; \
fi
@@ -59,11 +60,13 @@ libneutrino_gui_a_SOURCES = \
eventlist.cpp \
favorites.cpp \
filebrowser.cpp \
- imageinfo.cpp \
+ imageinfo_ni.cpp \
+ imdb.cpp \
info_menue.cpp \
infoviewer.cpp \
infoviewer_bb.cpp \
keybind_setup.cpp \
+ lcd4l.cpp \
mediaplayer.cpp \
mediaplayer_setup.cpp \
miscsettings_menu.cpp \
@@ -73,6 +76,7 @@ libneutrino_gui_a_SOURCES = \
network_service.cpp \
network_setup.cpp \
nfs.cpp \
+ ni_menu.cpp \
opkg_manager.cpp \
osd_progressbar_setup.cpp \
osd_setup.cpp \
@@ -84,6 +88,7 @@ libneutrino_gui_a_SOURCES = \
pipsetup.cpp \
pluginlist.cpp \
plugins.cpp \
+ plugins_hide.cpp \
proxyserver_setup.cpp \
rc_lock.cpp \
record_setup.cpp \
@@ -92,6 +97,7 @@ libneutrino_gui_a_SOURCES = \
screensaver.cpp \
screensetup.cpp \
settings_manager.cpp \
+ settings_manager_teams.cpp \
sleeptimer.cpp \
start_wizard.cpp \
streaminfo2.cpp \
@@ -119,9 +125,13 @@ endif
libneutrino_gui2_a_SOURCES = \
cam_menu.cpp \
color.cpp \
+ hdd_info.cpp \
hdd_menu.cpp \
infoclock.cpp \
- motorcontrol.cpp
+ infoicons.cpp \
+ infoicons_setup.cpp \
+ motorcontrol.cpp \
+ netfs_setup.cpp
if ENABLE_UPNP
libneutrino_gui2_a_SOURCES += \
diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp
index 4d1e9ccc6..25333a8ac 100644
--- a/src/gui/audioplayer.cpp
+++ b/src/gui/audioplayer.cpp
@@ -101,8 +101,10 @@ extern cVideo * videoDecoder;
#define AUDIOPLAYER_START_SCRIPT CONFIGDIR "/audioplayer.start"
#define AUDIOPLAYER_END_SCRIPT CONFIGDIR "/audioplayer.end"
#define DEFAULT_RADIOSTATIONS_XMLFILE CONFIGDIR "/radio-stations.xml"
+#define DEFAULT_RADIOFAVORITES_XMLFILE CONFIGDIR "/radio-favorites.xml" //NI
const char RADIO_STATION_XML_FILE[] = {DEFAULT_RADIOSTATIONS_XMLFILE};
+const char RADIO_FAVORITES_XML_FILE[] = {DEFAULT_RADIOFAVORITES_XMLFILE}; //NI
CAudiofileExt::CAudiofileExt()
: CAudiofile(), firstChar('\0')
@@ -294,7 +296,11 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey)
CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_audio );
// Stop sectionsd
- g_Sectionsd->setPauseScanning(true);
+ //NI g_Sectionsd->setPauseScanning(true);
+
+ //NI
+ printf("[audioplayer.cpp] wakeup_hdd(%s)\n", g_settings.network_nfs_audioplayerdir.c_str());
+ wakeup_hdd(g_settings.network_nfs_audioplayerdir.c_str(),true);
puts("[audioplayer.cpp] executing " AUDIOPLAYER_START_SCRIPT ".");
if (my_system(AUDIOPLAYER_START_SCRIPT) != 0)
@@ -315,7 +321,7 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey)
//g_Zapit->unlockPlayBack();
CZapit::getInstance()->EnablePlayback(true);
// Start Sectionsd
- g_Sectionsd->setPauseScanning(false);
+ //NI g_Sectionsd->setPauseScanning(false);
m_frameBuffer->stopFrame();
CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , m_LastMode );
g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR, 0 );
@@ -344,6 +350,20 @@ int CAudioPlayerGui::show()
bool clear_before_update = false;
m_key_level = 0;
+ //NI auto-load favorites
+ if ((m_inetmode) && (m_playlist.empty()))
+ {
+ if (access(RADIO_FAVORITES_XML_FILE, F_OK) == 0)
+ scanXmlFile(RADIO_FAVORITES_XML_FILE);
+ }
+
+ //NI auto-play first entry from favorites
+ if (g_settings.inetradio_autostart)
+ {
+ if ((m_inetmode) && (!m_playlist.empty()))
+ play(m_selected);
+ }
+
while (loop)
{
updateMetaData();
@@ -407,6 +427,22 @@ int CAudioPlayerGui::show()
else
loop=false;
}
+ //NI - add RC_favorites for internetradio
+ else if ((msg == CRCInput::RC_favorites) && (m_inetmode))
+ {
+ if (m_key_level == 0)
+ {
+ // clear playlist and load RADIO_FAVORITES_XML_FILE
+ if (access(RADIO_FAVORITES_XML_FILE, F_OK) == 0)
+ {
+ if (!m_playlist.empty())
+ clearPlaylist();
+ scanXmlFile(RADIO_FAVORITES_XML_FILE);
+ clear_before_update = true;
+ update = true;
+ }
+ }
+ }
else if (msg == CRCInput::RC_left)
{
if (m_key_level == 1)
diff --git a/src/gui/audioplayer_setup.cpp b/src/gui/audioplayer_setup.cpp
index ed10615c5..c55bd75d6 100644
--- a/src/gui/audioplayer_setup.cpp
+++ b/src/gui/audioplayer_setup.cpp
@@ -140,6 +140,14 @@ int CAudioPlayerSetup::showAudioPlayerSetup()
mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_SC_METADATA);
audioplayerSetup->addItem(mc);
+ //NI
+ audioplayerSetup->addItem(GenericMenuSeparator);
+
+ //NI internetradio autostart first entry from favorites
+ mc = new CMenuOptionChooser(LOCALE_INETRADIO_AUTOSTART, &g_settings.inetradio_autostart, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL);
+ mc->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INETRADIO_AUTOSTART);
+ audioplayerSetup->addItem(mc);
+
int res = audioplayerSetup->exec (NULL, "");
delete audioplayerSetup;
return res;
diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp
index 37320e3df..c1e60833d 100644
--- a/src/gui/bouquetlist.cpp
+++ b/src/gui/bouquetlist.cpp
@@ -54,6 +54,10 @@
#include
#include
+//NI lcd4l-support
+#include "gui/lcd4l.h"
+extern CLCD4l *LCD4l;
+
extern CBouquetManager *g_bouquetManager;
CBouquetList::CBouquetList(const char * const Name)
@@ -588,6 +592,9 @@ int CBouquetList::show(bool bShowChannelList)
}
hide();
+ //NI lcd4l-support
+ LCD4l->RemoveFile("/tmp/lcd/menu");
+
fader.StopFade();
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
@@ -632,6 +639,9 @@ void CBouquetList::paintItem(int pos)
frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, RADIUS_LARGE);
if(npos < (int) Bouquets.size())
CVFD::getInstance()->showMenuText(0, lname, -1, true);
+ //NI lcd4l-support
+ if(g_settings.lcd4l_support)
+ LCD4l->CreateFile("/tmp/lcd/menu", lname);
} else {
if(!favonly && (npos < (int) Bouquets.size()))
iscurrent = !Bouquets[npos]->channelList->isEmpty();
diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp
index da9c5723a..7934a87e1 100644
--- a/src/gui/cam_menu.cpp
+++ b/src/gui/cam_menu.cpp
@@ -54,6 +54,18 @@
#include
#include
+//NI CA init
+extern Zapit_config zapitCfg;
+
+//NI
+const CMenuOptionChooser::keyval OPTIONS_CA_INIT_OPTIONS[] =
+{
+ { 0, LOCALE_CA_INIT_0 },
+ { 1, LOCALE_CA_INIT_1 },
+ { 2, LOCALE_CA_INIT_2 }
+};
+#define OPTIONS_CA_INIT_OPTION_COUNT (sizeof(OPTIONS_CA_INIT_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
+
void CCAMMenuHandler::init(void)
{
hintBox = NULL;
@@ -108,6 +120,14 @@ int CCAMMenuHandler::doMainMenu()
CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS);
cammenu->addIntroItems();
+
+ //NI CA init CI|CARD|BOTH
+ CZapit::getInstance()->GetConfig(zapitCfg);
+ CMenuOptionChooser *ca_init = new CMenuOptionChooser(LOCALE_CA_INIT, (int *)&zapitCfg.cam_ci, OPTIONS_CA_INIT_OPTIONS, OPTIONS_CA_INIT_OPTION_COUNT, true, NULL);
+ ca_init->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_CA_INIT);
+ cammenu->addItem(ca_init);
+ cammenu->addItem(GenericMenuSeparator);
+
#ifdef BOXMODEL_APOLLO
int fecount = CFEManager::getInstance()->getFrontendCount();
char fename[fecount+1][255];
@@ -204,6 +224,10 @@ int CCAMMenuHandler::doMainMenu()
ret = cammenu->exec(NULL, "");
delete cammenu;
in_menu = false;
+
+ //NI CA init
+ CZapit::getInstance()->SetConfig(&zapitCfg);
+
return ret;
}
diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp
index 428fdb19e..b1cc1a1b4 100644
--- a/src/gui/channellist.cpp
+++ b/src/gui/channellist.cpp
@@ -79,6 +79,10 @@
#include
+//NI lcd4l-support
+#include "gui/lcd4l.h"
+extern CLCD4l *LCD4l;
+
extern CBouquetList * bouquetList; /* neutrino.cpp */
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
extern CBouquetList * AllFavBouquetList;
@@ -473,7 +477,7 @@ void CChannelList::calcSize()
pig_on_win = ( (g_settings.channellist_additional == 2) /* with miniTV */ && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) );
// calculate width
- full_width = pig_on_win ? (frameBuffer->getScreenWidth()-2*ConnectLineBox_Width) : frameBuffer->getScreenWidthRel();
+ full_width = frameBuffer->getScreenWidthRel(); //NI
if (g_settings.channellist_additional)
width = full_width / 3 * 2;
@@ -485,7 +489,7 @@ void CChannelList::calcSize()
info_height = 2*fheight + fdescrheight + 10;
else
info_height = 0;
- height = pig_on_win ? frameBuffer->getScreenHeight(): frameBuffer->getScreenHeightRel();
+ height = frameBuffer->getScreenHeightRel(); //NI
height = height - info_height;
// calculate x position
@@ -742,7 +746,7 @@ int CChannelList::show()
else if (!empty && (msg == CRCInput::RC_up || (int)msg == g_settings.key_pageup ||
msg == CRCInput::RC_down || (int)msg == g_settings.key_pagedown))
{
- displayList = 1;
+ //NI displayList = 1;
int new_selected = UpDownKey((*chanlist), msg, listmaxshow, selected);
if (new_selected >= 0)
actzap = updateSelection(new_selected);
@@ -848,10 +852,17 @@ int CChannelList::show()
if (move_state != beMoving)
renameChannel();
} else {
+ //NI
+ if (g_settings.channellist_additional && !displayNext)
+ displayList = !displayList;
+ if (displayList)
+ displayNext = !displayNext;
+#if 0
if (g_settings.channellist_additional)
displayList = !displayList;
else
displayNext = !displayNext;
+#endif
paint();
}
@@ -923,6 +934,9 @@ int CChannelList::show()
if (edit_state)
editMode(false);
+ //NI lcd4l-support
+ LCD4l->RemoveFile("/tmp/lcd/menu");
+
if(!dont_hide){
if (new_zap_mode && (g_settings.channellist_new_zap_mode != new_zap_mode))
g_settings.channellist_new_zap_mode = new_zap_mode;
@@ -944,7 +958,7 @@ int CChannelList::show()
if(zapOnExit)
res = selected;
- printf("CChannelList::show *********** res %d\n", res);
+ //NI printf("CChannelList::show *********** res %d\n", res);
return(res);
}
@@ -963,8 +977,7 @@ void CChannelList::hide()
delete CChannelLogo;
CChannelLogo = NULL;
}
-
- frameBuffer->paintBackgroundBoxRel(x, y, full_width, height + info_height);
+ frameBuffer->paintBackground(); //NI clear whole screen
clearItem2DetailsLine();
CInfoClock::getInstance()->enableInfoClock(!CInfoClock::getInstance()->isBlocked());
}
@@ -1777,10 +1790,13 @@ void CChannelList::paintButtonBar(bool is_current)
if (i == 3) {
//manage now/next button
if (g_settings.channellist_additional) {
- if (displayList)
+ //NI
+ if (displayNext)
+ Button[bcnt].locale = LOCALE_INFOVIEWER_NOW;
+ else if (displayList)
Button[bcnt].locale = LOCALE_FONTSIZE_CHANNELLIST_DESCR;
else
- Button[bcnt].locale = LOCALE_FONTMENU_EVENTLIST;
+ Button[bcnt].locale = LOCALE_INFOVIEWER_NEXT;
} else {
if (displayNext)
Button[bcnt].locale = LOCALE_INFOVIEWER_NOW;
@@ -1863,8 +1879,8 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
}
else if (getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber() && new_zap_mode != 2/*active*/)
{
- color = !displayNext ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT;
- bgcolor = !displayNext ? COL_MENUCONTENT_PLUS_1 : COL_MENUCONTENTINACTIVE_PLUS_0;
+ color = COL_MENUCONTENT_TEXT; //NI
+ bgcolor = COL_MENUCONTENT_PLUS_1; //NI
c_rad_small = RADIUS_LARGE;
} else {
color = iscurrent ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT;
@@ -2032,13 +2048,28 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
else {
if(g_settings.channellist_progressbar_design != CProgressBar::PB_OFF) {
pb.setValues(0, pb_max);
+ if (g_settings.progressbar_design == CProgressBar::PB_GRAPHIC) //NI graphic
+ pb.setGraphic("progressbar_inactive");
pb.paint();
}
//name
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10+prg_offset, ypos+ fheight, width- numwidth- 40- 15-prg_offset, nameAndDescription, color);
}
+
+ //NI do update VFD only when cursor on live channel
+ if ((curr == selected) && (getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber())) { //NI
+ if (!(chan->currentEvent.description.empty())) {
+ snprintf(nameAndDescription, sizeof(nameAndDescription), "%s - %s",
+ chan->getName().c_str(), p_event->description.c_str());
+ CVFD::getInstance()->showMenuText(0, nameAndDescription, -1, true); // UTF-8
+ } else
+ CVFD::getInstance()->showMenuText(0, chan->getName().c_str(), -1, true); // UTF-8
+ }
if (!firstpaint && curr == selected)
updateVfd();
+ //NI lcd4l-support
+ if(g_settings.lcd4l_support)
+ LCD4l->CreateFile("/tmp/lcd/menu", chan->getName().c_str());
}
}
@@ -2162,8 +2193,11 @@ void CChannelList::paintBody()
frameBuffer->paintBoxRel(x, y+theight, width, height-footerHeight-theight, COL_MENUCONTENT_PLUS_0);
if (g_settings.channellist_additional)
{
+//NI
+#if 0
// disable displayNext
displayNext = false;
+#endif
// paint background for right box
frameBuffer->paintBoxRel(x+width,y+theight+pig_height,infozone_width,infozone_height,COL_MENUCONTENT_PLUS_0);
}
diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp
index 561f698a2..9a8ee234d 100644
--- a/src/gui/components/cc_detailsline.cpp
+++ b/src/gui/components/cc_detailsline.cpp
@@ -87,6 +87,9 @@ CComponentsDetailLine::~CComponentsDetailLine()
//paint details line with current parameters
void CComponentsDetailLine::paint(bool do_save_bg)
{
+ //NI
+ if (!g_settings.show_menu_hints_line) return;
+
cc_save_bg = do_save_bg;
hide();
diff --git a/src/gui/components/cc_item_infobox.h b/src/gui/components/cc_item_infobox.h
index 189dbb42c..87ee03290 100644
--- a/src/gui/components/cc_item_infobox.h
+++ b/src/gui/components/cc_item_infobox.h
@@ -41,7 +41,7 @@ InfoBox has been originally intended for displaying text information or menue hi
but is also usable like each other CCItems.
*/
-#define INFO_BOX_Y_OFFSET 2
+#define INFO_BOX_Y_OFFSET SHADOW_OFFSET //NI
class CComponentsInfoBox : public CComponentsText
{
private:
diff --git a/src/gui/components/cc_item_progressbar.cpp b/src/gui/components/cc_item_progressbar.cpp
index 1221f31dc..cd7273176 100644
--- a/src/gui/components/cc_item_progressbar.cpp
+++ b/src/gui/components/cc_item_progressbar.cpp
@@ -39,6 +39,12 @@
#define GREEN 0x00FF00
#define YELLOW 0xFFFF00
+//NI graphic
+#include
+#include
+#include
+extern CPictureViewer * g_PicViewer;
+
CProgressBar::CProgressBar( const int x_pos,
const int y_pos,
const int w,
@@ -80,6 +86,8 @@ CProgressBar::CProgressBar( const int x_pos,
pb_value = 0;
pb_max_value = 0;
+ graphic_file = "progressbar"; //NI graphic
+
// init start positions x/y active bar
pb_x = x + fr_thickness;
pb_y = y + fr_thickness;
@@ -463,13 +471,23 @@ void CProgressBar::paintProgress(bool do_save_bg)
//progress
bool pb_invert = (pb_type == PB_REDRIGHT) || ((pb_type == PB_TIMESCALE) && g_settings.progressbar_timescale_invert);
-
if (cc_allow_paint){
if (!is_painted || (pb_active_width != pb_last_width)) {
+ //NI start
+ if(pb_type == PB_STARBAR) {
+ paintStarBar();
+ is_painted = true;
+ }
+ else if(*pb_design == PB_GRAPHIC) {
+ paintGraphic();
+ is_painted = true;
+ }
+ else {
CProgressBarCache *pbc = CProgressBarCache::pbcLookup(pb_height, pb_max_width, pb_active_col, pb_passive_col, *pb_design, pb_invert, *pb_gradient, pb_red, pb_yellow, pb_green);
if (pbc)
pbc->pbcPaint(pb_x, pb_y, pb_active_width, pb_passive_width);
is_painted = true;
+ }
}
}
@@ -486,6 +504,73 @@ void CProgressBar::paintProgress(bool do_save_bg)
}
+//NI graphic
+void CProgressBar::paintGraphic()
+{
+ std::ostringstream buf;
+
+ buf.str("");
+ buf << ICONSDIR_VAR << "/" << graphic_file << ".png";
+ if (access(buf.str().c_str(), F_OK) != 0) {
+ buf.str("");
+ buf << ICONSDIR << "/" << graphic_file << ".png";
+ }
+ std::string pb_active_graphic(buf.str());
+
+ buf.str("");
+ buf << ICONSDIR_VAR << "/" << graphic_file << "_passive.png";
+ if (access(buf.str().c_str(), F_OK) != 0) {
+ buf.str("");
+ buf << ICONSDIR << "/" << graphic_file << "_passive.png";
+ }
+ std::string pb_passive_graphic(buf.str());
+
+ //printf("**** %04d::%04d: pb_last_width: %d, pb_active_width: %d, pb_max_width %d\n", pb_x, pb_y, pb_last_width, pb_active_width, pb_max_width);
+
+ if (pb_last_width == -1 ) {
+ if (pb_active_width <= pb_max_width && pb_passive_width > 0)
+ g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
+ }
+
+ if (pb_active_width > pb_last_width) {
+ // we have to paint the passive graphic in all cases to satisfy the CProgresswindow
+ if (pb_passive_width > 0)
+ g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
+ if (pb_active_width > 0)
+ g_PicViewer->DisplayImage(pb_active_graphic, pb_x, pb_y, pb_active_width, pb_height); // active bar
+ }
+ else if (pb_active_width <= pb_max_width && pb_passive_width > 0)
+ g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
+}
+
+//NI starbar
+void CProgressBar::paintStarBar()
+{
+ std::ostringstream buf;
+ graphic_file = "stars";
+
+ buf.str("");
+ buf << ICONSDIR_VAR << "/" << graphic_file << ".png";
+ if (access(buf.str().c_str(), F_OK) != 0) {
+ buf.str("");
+ buf << ICONSDIR << "/" << graphic_file << ".png";
+ }
+ std::string pb_active_graphic(buf.str());
+
+ buf.str("");
+ buf << ICONSDIR_VAR << "/" << graphic_file << "_bg.png";
+ if (access(buf.str().c_str(), F_OK) != 0) {
+ buf.str("");
+ buf << ICONSDIR << "/" << graphic_file << "_bg.png";
+ }
+ std::string pb_passive_graphic(buf.str());
+
+ int stars_w = 0, stars_h = 0;
+ g_PicViewer->getSize(pb_passive_graphic.c_str(), &stars_w, &stars_h);
+ g_PicViewer->DisplayImage(pb_passive_graphic, pb_x, pb_y, stars_w, stars_h); // background
+ g_PicViewer->DisplayImage_unscaled(pb_active_graphic, pb_x, pb_y, pb_active_width, stars_h); // aktiv bar
+}
+
void CProgressBar::paint(bool do_save_bg)
{
paintProgress(do_save_bg);
diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h
index c3bcb40b5..607d0d9a5 100644
--- a/src/gui/components/cc_item_progressbar.h
+++ b/src/gui/components/cc_item_progressbar.h
@@ -79,6 +79,8 @@ class CProgressBar : public CComponentsItem
///to evaluate values, these will be convert to the graph
int pb_value, pb_max_value;
+ std::string graphic_file; //NI graphic
+
int *pb_design, *pb_gradient;
int pb_type;
@@ -86,6 +88,8 @@ class CProgressBar : public CComponentsItem
///paints graph
void paintProgress(bool do_save_bg = CC_SAVE_SCREEN_NO);
+ void paintGraphic(); //NI graphic
+ void paintStarBar(); //NI starbar
public:
///parameters:
@@ -131,6 +135,9 @@ class CProgressBar : public CComponentsItem
const int w, const int h,
const int val, const int max_val){x=x_pos; y=y_pos; width=w; height=h; pb_value=val; pb_max_value=max_val;}
+ //NI graphic
+ void setGraphic(std::string graphic = "progressbar"){graphic_file = graphic;};
+
///force update on next paint
void reset() { pb_last_width = -1; }
void paint(bool do_save_bg = CC_SAVE_SCREEN_NO);
@@ -141,13 +148,15 @@ class CProgressBar : public CComponentsItem
PB_MATRIX, /* 0 */
PB_LINES_V, /* 1 */
PB_LINES_H, /* 2 */
- PB_COLOR /* 3 */
+ PB_COLOR, /* 3 */
+ PB_GRAPHIC /* 4 */ //NI graphic
};
enum pb_type_t {
PB_REDLEFT = 0,
PB_REDRIGHT,
- PB_TIMESCALE
+ PB_TIMESCALE,
+ PB_STARBAR, //NI starbar
};
void setType(pb_type_t type);
diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp
index d9351a9c3..31e89ce5e 100644
--- a/src/gui/dboxinfo.cpp
+++ b/src/gui/dboxinfo.cpp
@@ -52,7 +52,7 @@
#include
#include
-#include
+//NI #include
#include
#include
@@ -360,11 +360,14 @@ void CDBoxInfoWidget::paint()
title += ": ";
title + cpuinfo["machine"];
}
+//NI
+#if 0
char ss[17];
sprintf(ss, "%016llx", cs_get_serial());
title += ", S/N ";
title += ss;
width = max(width, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(title, true) + 50);
+#endif
x = getScreenStartX(width);
if (!header)
@@ -453,12 +456,14 @@ void CDBoxInfoWidget::paint()
unsigned int h = cpuload_y1 - cpuload_y0;
cpuload_y0 += y;
cpuload_y1 += y;
- frameBuffer->paintBoxRel(x + offsetw, cpuload_y0, pbw, h, COL_MENUCONTENT_PLUS_2);
+ //NI frameBuffer->paintBoxRel(x + offsetw, cpuload_y0, pbw, h, COL_MENUCONTENT_PLUS_2);
+ frameBuffer->paintBoxRel(x + offsetw, cpuload_y0, pbw, h, COL_MENUHEAD_PLUS_0); //NI
int off = std::max(0, (int)sysload->data_avail - pbw);
for (unsigned int i = 0; i < sysload->data_avail - off; i++) {
if ((sysload->data[i + off] * h / 1000) > 0)
- frameBuffer->paintVLine(x+offsetw + i, cpuload_y1 - sysload->data[i + off] * h / 1000, cpuload_y1, COL_MENUCONTENT_PLUS_7);
+ //NI frameBuffer->paintVLine(x+offsetw + i, cpuload_y1 - sysload->data[i + off] * h / 1000, cpuload_y1, COL_MENUCONTENT_PLUS_7);
+ frameBuffer->paintVLine(x+offsetw + i, cpuload_y1 - sysload->data[i + off] * h / 1000, cpuload_y1, COL_MENUHEAD_TEXT); //NI
}
}
diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp
index e3e35faf8..2ac2942bd 100644
--- a/src/gui/epgview.cpp
+++ b/src/gui/epgview.cpp
@@ -56,6 +56,9 @@
#include
#include
+//NI
+#include
+
extern CPictureViewer * g_PicViewer;
#define ICON_LARGE_WIDTH 26
@@ -122,6 +125,11 @@ CEpgData::CEpgData()
frameBuffer = CFrameBuffer::getInstance();
tmdbtoggle = false;
header = NULL;
+ //NI
+ imdb = CIMDB::getInstance();
+ imdb_activ = false;
+ poster_w = 0;
+ poster_h = 0;
}
CEpgData::~CEpgData()
@@ -180,6 +188,11 @@ void CEpgData::processTextToArray(std::string text, int screening, bool has_cove
text += ' ';
char* text_= (char*) text.c_str();
+ //NI IMDb
+ int poster_offset = 0;
+ if (imdb_activ)
+ poster_offset += poster_w+35;
+
while (*text_!=0)
{
if ( (*text_==' ') || (*text_=='\n') || (*text_=='-') || (*text_=='.') )
@@ -192,7 +205,8 @@ void CEpgData::processTextToArray(std::string text, int screening, bool has_cove
// check the wordwidth - add to this line if size ok
int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(aktWord);
- if ((aktWordWidth+aktWidth)<(ox - 20 - 15 - (has_cover? (std::min((sb-10)*342/513,342)) :0)))
+ //NI if ((aktWordWidth+aktWidth)<(ox - 20 - 15 - (has_cover? (std::min((sb-10)*342/513,342)) :0)))
+ if ((aktWordWidth+aktWidth)<(ox - 20 - 15 - (has_cover? (std::min((sb-10)*342/513,342)) : poster_offset))) //NI IMDb
{//space ok, add
aktWidth += aktWordWidth;
aktLine += aktWord;
@@ -242,6 +256,13 @@ void CEpgData::showText(int startPos, int ypos, bool cover, bool fullClear)
int offset = 0, count = 0;
int max_mon_w = 0, max_wday_w = 0;
int digi = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth("29..");
+
+ //NI IMDb
+ int poster_offset = cover_offset;
+ if(imdb_activ){
+ poster_offset += poster_w+35;
+ }
+
for(int i = 0; i < 12;i++){
max_mon_w = std::max(max_mon_w, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getMonth(i))) + " "));
if(i > 6)
@@ -253,7 +274,8 @@ void CEpgData::showText(int startPos, int ypos, bool cover, bool fullClear)
if (cover) {
if (!g_PicViewer->DisplayImage("/tmp/tmdb.jpg",sx+3,y+3+((sb-cover_height)/2),cover_width,cover_height, CFrameBuffer::TM_NONE)) {
- cover_offset = 0;
+ //NI cover_offset = 0;
+ cover_offset = poster_offset = 0; //NI
frameBuffer->paintBoxRel(sx, y, ox-15, sb, COL_MENUCONTENT_PLUS_0); // background of the text box
}
}
@@ -298,7 +320,8 @@ void CEpgData::showText(int startPos, int ypos, bool cover, bool fullClear)
count = 0;
}
else{
- g_Font[( i< info1_lines ) ?SNeutrinoSettings::FONT_TYPE_EPG_INFO1:SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+cover_offset, y+medlineheight, ox- 15- 15, epgText[i].first, COL_MENUCONTENT_TEXT);
+ //NI g_Font[( i< info1_lines ) ?SNeutrinoSettings::FONT_TYPE_EPG_INFO1:SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+cover_offset, y+medlineheight, ox- 15- 15, epgText[i].first, COL_MENUCONTENT_TEXT);
+ g_Font[( i< info1_lines ) ?SNeutrinoSettings::FONT_TYPE_EPG_INFO1:SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+poster_offset, y+medlineheight, ox- 15- 15 -poster_offset, epgText[i].first, COL_MENUCONTENT_TEXT); //NI IMDb
}
}
@@ -789,6 +812,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
CNeutrinoApp::getInstance()->handleMsg(msg, data);
break;
case CRCInput::RC_left:
+ //NI
+ if(imdb_activ)
+ imdb_activ = false;
+
if ((prev_id != 0) && !call_fromfollowlist)
{
frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1);
@@ -800,6 +827,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
break;
case CRCInput::RC_right:
+ //NI
+ if(imdb_activ)
+ imdb_activ = false;
+
if ((next_id != 0) && !call_fromfollowlist)
{
frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1);
@@ -811,6 +842,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
break;
case CRCInput::RC_down:
+ //NI
+ if(imdb_activ)
+ break;
+
if (showPos+scrollCount 0) {
showPos -= scrollCount;
if (showPos < 0)
@@ -929,8 +968,15 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
printf("timerd not available\n");
}
break;
+#if 0
case CRCInput::RC_info:
{
+ if (imdb_activ) {
+ imdb_activ = false;
+ showTimerEventBar (true); //show buttons
+ epgText = epgText_saved;
+ textCount = epgText.size();
+ }
showPos = 0;
if (!tmdbtoggle) {
cTmdb* tmdb = new cTmdb(epgData.title);
@@ -955,7 +1001,38 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
}
break;
}
+#endif
+ case CRCInput::RC_green: //NI
+ {
+#if 0
+ if (tmdbtoggle) {
+ tmdbtoggle = false;
+ epgText = epgText_saved;
+ textCount = epgText.size();
+ stars=0;
+ }
+#endif
+ if(!imdb_activ)
+ {
+ //show IMDb info
+ showIMDb(sy + toph, true); //show splashscreen only
+ imdb->getIMDb(epgData.title);
+ showIMDb(sy + toph);
+ showTimerEventBar (true); //show buttons
+ timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]);
+ }
+ else
+ {
+ imdb_activ = false;
+ std::string filename = imdb->getFilename(channel, epgData.eventID);
+ if (File_copy(imdb->posterfile.c_str(), filename.c_str()))
+ showTimerEventBar (true); //show buttons
+ else
+ perror( "IMDb: error copy file" );
+ }
+ break;
+ }
// 31.05.2002 dirch zapto timer
case CRCInput::RC_yellow:
{
@@ -963,6 +1040,15 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
{
CAdZapMenu::getInstance()->exec(NULL, "enable");
loop = false;
+
+ //NI
+ std::string tmp_msg;
+ tmp_msg = g_Locale->getText(LOCALE_ADZAP);
+ tmp_msg += " in ";
+ tmp_msg += to_string(g_settings.adzap_zapBackPeriod / 60);
+ tmp_msg += " ";
+ tmp_msg += g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
+ ShowMsg(tmp_msg, "", CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO);
}
//CTimerdClient timerdclient;
else if (g_Timerd->isTimerdAvailable())
@@ -981,6 +1067,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
}
case CRCInput::RC_blue:
{
+ //NI
+ if(imdb_activ)
+ imdb_activ = false;
+
if(!followlist.empty() && !call_fromfollowlist){
hide();
time_t tmp_sZeit = epgData.epg_times.startzeit;
@@ -1024,6 +1114,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
showPos=0;
break;
+ case CRCInput::RC_info: //NI
case CRCInput::RC_ok:
case CRCInput::RC_timeout:
if(fader.StartFadeOut()) {
@@ -1083,6 +1174,10 @@ void CEpgData::hide()
frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy);
showTimerEventBar (false);
+
+ //NI
+ imdb_activ = false;
+ imdb->cleanup();
}
void CEpgData::GetEPGData(const t_channel_id channel_id, uint64_t id, time_t* startzeit, bool clear )
@@ -1227,11 +1322,16 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
// -- 2002-05-13 rasc
//
-const struct button_label EpgButtons[] =
+//NI const struct button_label EpgButtons[] =
+struct button_label EpgButtons[] = //NI
{
{ NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERBAR_RECORDEVENT },
+ { NEUTRINO_ICON_BUTTON_GREEN , LOCALE_IMDB_INFO }, //NI
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH },
+//NI
+#if 0
{ NEUTRINO_ICON_BUTTON_INFO_SMALL , LOCALE_CHANNELLIST_ADDITIONAL },
+#endif
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT }
};
@@ -1258,6 +1358,7 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap)
frameBuffer->paintBoxRel(sx,y,ox,h, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM);//round
/* 2 * ICON_LARGE_WIDTH for potential 16:9 and DD icons */
int aw = ox - 20 - 2 * (ICON_LARGE_WIDTH + 2);
+ EpgButtons[1].locale = imdb_activ ? LOCALE_IMDB_INFO_SAVE : LOCALE_IMDB_INFO; //NI
std::string adzap_button;
if (adzap)
{
@@ -1266,9 +1367,9 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap)
adzap_button += g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
}
if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF)
- ::paintButtons(x, y, 0, (has_follow_screenings && !call_fromfollowlist) ? 4:3, EpgButtons, aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, adzap ? adzap_button.c_str() : NULL, 1);
+ ::paintButtons(x, y, 0, (has_follow_screenings && !call_fromfollowlist) ? 4:3, EpgButtons, aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, adzap ? adzap_button.c_str() : NULL, 2); //NI
else
- ::paintButtons(x, y, 0, (has_follow_screenings && !call_fromfollowlist) ? 3:2, &EpgButtons[1], aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, adzap ? adzap_button.c_str() : NULL, 0);
+ ::paintButtons(x, y, 0, (has_follow_screenings && !call_fromfollowlist) ? 3:2, &EpgButtons[1], aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, adzap ? adzap_button.c_str() : NULL, 1); //NI
#if 0
// Button: Timer Record & Channelswitch
@@ -1285,6 +1386,93 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap)
#endif
}
+//NI start
+int CEpgData::showIMDb(int ypos, bool splash)
+{
+ fontIMDb = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1];
+ std::string txt;
+
+ int y = ypos;
+ int stars_w = 0, stars_h = 0;
+
+ frameBuffer->paintBoxRel(sx, y, ox /*- 15*/, sb, COL_MENUCONTENT_PLUS_0);
+ if (splash)
+ {
+ fontIMDb->RenderString(sx+20, y+medlineheight, ox-20, "IMDb: Daten werden geladen ...", COL_MENUCONTENT_TEXT, 0, true); // UTF-8
+ return 0;
+ }
+
+ //titel
+ std::string title = "Title";
+ imdb->getIMDbElement(title);
+
+ if(((title.find("IMDb: URL (Seite) nicht gefunden")) != std::string::npos))
+ return 1;
+
+ //poster size
+ g_PicViewer->getSize(imdb->posterfile.c_str(), &poster_w, &poster_h);
+ if ((poster_w != 0) && (poster_h != 0))
+ {
+ int poster_max_w = ox/4; // max 25%
+ int poster_max_h = ((medlinecount-2)*medlineheight);
+ imdb_activ = true;
+
+ g_PicViewer->rescaleImageDimensions(&poster_w, &poster_h, poster_max_w, poster_max_h);
+ }
+
+ // calculate positions
+ int sx_h = sx+20+poster_w+(poster_w != 0 ? 20 : 0); // startpos
+ int ox_h = ox-20-poster_w-(poster_w != 0 ? 20 : 0)-20; // width
+
+ // clear epg array and add some blank lines
+ epgText_saved = epgText;
+ epgText.clear();
+ processTextToArray("\n");
+ processTextToArray(" "); //must be a space here
+
+ //data
+ txt.clear();
+ imdb->getIMDbData(txt);
+ processTextToArray(txt);
+ showText(0, y);
+
+ //paint title
+ fontIMDb->RenderString(sx+20, y+medlineheight, ox-20, title, COL_MENUCONTENT_TEXT, 0, true);
+
+ //rating
+ txt = "imdbRating";
+ imdb->getIMDbElement(txt);
+
+ std::string pgvalue = txt;
+ if(txt == "N/A"){
+ pgvalue = "0";
+ txt = "Keine Bewertung";
+ }
+ else
+ txt += "/10";
+
+ size_t pos = pgvalue.find_first_of(",.");
+ if(pos!= std::string::npos)
+ pgvalue.replace(pos,1,""); // change 8,1 or 8.1 to 81
+
+ g_PicViewer->getSize(imdb->stars_bg.c_str(), &stars_w, &stars_h);
+ int aktiv = stars_w * atoi(pgvalue.c_str()) / (atoi(pgvalue.c_str())<10?10.0:100.0);
+
+ g_PicViewer->DisplayImage(imdb->stars_bg.c_str(), sx_h, y+(2*medlineheight)+((medlineheight/2)-(stars_h/2)), stars_w, stars_h);
+ if(pgvalue != "0")
+ g_PicViewer->DisplayImage_unscaled(imdb->stars.c_str(), sx_h, y+(2*medlineheight)+((medlineheight/2)-(stars_h/2)), aktiv, stars_h);
+
+ fontIMDb->RenderString(sx_h+stars_w+20, y+(3*medlineheight), ox_h-stars_w-20, txt, COL_MENUCONTENT_TEXT, 0, true); // UTF-8
+
+ //paint poster
+ if ((poster_w != 0) && (poster_h != 0))
+ {
+ g_PicViewer->DisplayImage(imdb->posterfile.c_str(), sx+20, y+(2*medlineheight), poster_w, poster_h, /*No 'pseudo' transparency*/frameBuffer->TM_NONE);
+ }
+
+ return 0;
+}
+
// -- EPG Data Viewer Menu Handler Class
// -- to be used for calls from Menue
// -- (2004-03-06 rasc)
diff --git a/src/gui/epgview.h b/src/gui/epgview.h
index 4375eebc5..b33ec8fc6 100644
--- a/src/gui/epgview.h
+++ b/src/gui/epgview.h
@@ -38,6 +38,7 @@
#include
#include
+#include //NI
#include
#include "widget/menue.h"
@@ -57,6 +58,8 @@ class CEpgData
CChannelEventList followlist;
CEPGData epgData;
CComponentsShapeSquare* header;
+ CIMDB *imdb; //NI
+
std::string epg_date;
std::string epg_start;
std::string epg_end;
@@ -93,6 +96,13 @@ class CEpgData
void showTimerEventBar(bool show, bool adzap = false);
bool isCurrentEPG(const t_channel_id channel_id);
+ //NI
+ bool imdb_activ;
+ std::string epg_title;
+ int showIMDb(int ypos, bool splash = false);
+ int poster_w, poster_h;
+ Font *fontIMDb;
+
public:
CEpgData();
diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp
index 22246ca31..b041c74ed 100644
--- a/src/gui/eventlist.cpp
+++ b/src/gui/eventlist.cpp
@@ -839,6 +839,14 @@ void CEventList::paintDescription(int index)
else
CEitManager::getInstance()->getActualEPGServiceKey(evtlist[index].channelID, &epgData );
+ //NI
+ infozone_text = "";
+ if (!epgData.info1.empty() && !epgData.info2.empty() && (epgData.info2.find(epgData.info1) != 0)) {
+ infozone_text += epgData.info1;
+ infozone_text += "\n";
+ infozone_text += epgData.info2;
+ }
+ else
if(!epgData.info2.empty()){
infozone_text = epgData.info2;
}
@@ -958,7 +966,7 @@ void CEventList::showFunctionBar (bool show, t_channel_id channel_id)
CColorKeyHelper keyhelper; //user_menue.h
neutrino_msg_t dummy = CRCInput::RC_nokey;
const char * icon = NULL;
- struct button_label buttons[5];
+ struct button_label buttons[6]; //NI
int btn_cnt = 0;
int tID = -1; //any value, not NULL
@@ -1016,6 +1024,11 @@ void CEventList::showFunctionBar (bool show, t_channel_id channel_id)
btn_cnt++;
}
+ //NI timerlist button
+ buttons[btn_cnt].button = NEUTRINO_ICON_BUTTON_0;
+ buttons[btn_cnt].locale = LOCALE_TIMERLIST_NAME;
+ btn_cnt++;
+
::paintButtons(bx, by, bw, btn_cnt, buttons, bw, bh);
}
diff --git a/src/gui/hdd_info.cpp b/src/gui/hdd_info.cpp
new file mode 100644
index 000000000..36dcee741
--- /dev/null
+++ b/src/gui/hdd_info.cpp
@@ -0,0 +1,462 @@
+/*
+ hdd_info
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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
+
+static int my_filter(const struct dirent * dent)
+{
+ if(dent->d_name[0] == 's' && dent->d_name[1] == 'd')
+ return 1;
+ return 0;
+}
+
+static char *trim(char *txt)
+{
+ register int l;
+ register char *p1, *p2;
+
+ if (*txt==' ')
+ {
+ for (p1=p2=txt;
+ (*p1==' ') || (*p1=='\t') || (*p1=='\n') || (*p1=='\r');
+ p1++){};
+ while (*p1)
+ *p2++=*p1++;
+ *p2='\0';
+ }
+ if ((l=strlen(txt))>0)
+ for (p1=txt+l-1;
+ (*p1==' ') || (*p1=='\t') || (*p1=='\n') || (*p1=='\r');
+ *p1--='\0'){};
+ return(txt);
+}
+
+CHDDInfoMenu::CHDDInfoMenu()
+{
+ width = 35;
+}
+
+CHDDInfoMenu::~CHDDInfoMenu()
+{
+
+}
+
+int CHDDInfoMenu::exec(CMenuTarget* parent, const std::string &actionKey)
+{
+ printf("[HDDInfo] exec ationKey %s\n",actionKey.c_str());
+ int res = menu_return::RETURN_REPAINT;
+
+ if (parent)
+ parent->hide();
+
+ if (actionKey!="")
+ {
+ COSDFader fader(g_settings.theme.menu_Content_alpha);
+ fader.StartFadeIn();
+
+ CHDDInfoWidget::paint(actionKey);
+
+ //int res = g_RCInput->messageLoop();
+ neutrino_msg_t msg;
+ neutrino_msg_data_t data;
+
+ bool doLoop = true;
+
+ int timeout = g_settings.timing[SNeutrinoSettings::TIMING_MENU];
+
+ uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout == 0 ? 0xFFFF : timeout);
+
+ while (doLoop)
+ {
+ g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
+
+ if((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) {
+ if(fader.FadeDone()) {
+ doLoop = false;
+ }
+ }
+ else if ( ( msg == CRCInput::RC_timeout ) ||
+ ( msg == CRCInput::RC_home ) ||
+ ( msg == CRCInput::RC_ok ) ) {
+ if(fader.StartFadeOut()) {
+ timeoutEnd = CRCInput::calcTimeoutEnd( 1 );
+ msg = 0;
+ } else
+ doLoop = false;
+ }
+ else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites)) {
+ }
+ else
+ {
+ int mr = CNeutrinoApp::getInstance()->handleMsg( msg, data );
+
+ if ( mr & messages_return::cancel_all )
+ {
+ res = menu_return::RETURN_EXIT_ALL;
+ doLoop = false;
+ }
+ else if ( mr & messages_return::unhandled )
+ {
+ if ((msg <= CRCInput::RC_MaxRC) &&
+ (data == 0)) /* <- button pressed */
+ {
+ timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
+ }
+ }
+ }
+ }
+
+ CHDDInfoWidget::hide();
+ fader.StopFade();
+
+ return res;
+ }
+ res = show();
+ return res;
+}
+
+int CHDDInfoMenu::show()
+{
+ FILE * f;
+ struct dirent **namelist;
+ bool hdd_found = 0;
+ int n = scandir("/sys/block", &namelist, my_filter, alphasort);
+ std::ostringstream buf;
+
+ //menue init
+ CMenuWidget* HDDInfo = new CMenuWidget(LOCALE_HDD_INFO_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_HDD_INFO);
+ HDDInfo->addIntroItems();
+
+ for(int i = 0; i < n;i++)
+ {
+ char model[128]="unbekannt";
+
+ buf.str("");
+ buf << "/sys/block/" << namelist[i]->d_name << "/device/model";
+
+ f = fopen(buf.str().c_str(), "r");
+ if(f) {
+ fscanf(f, "%127[^\n]", (char *) &model);
+ fclose(f);
+ }
+ else
+ printf("Cant open %s\n", buf.str().c_str());
+
+ buf.str("");
+ buf << trim(model) << " (" << namelist[i]->d_name << ")";
+
+ HDDInfo->addItem(new CMenuForwarder(buf.str().c_str(), true, NULL, this, namelist[i]->d_name));
+
+ hdd_found = 1;
+ free(namelist[i]);
+ }
+ if (n >= 0)
+ free(namelist);
+
+ if(!hdd_found)
+ HDDInfo->addItem(new CMenuForwarder(LOCALE_HDD_NOT_FOUND, false));
+
+ int res = HDDInfo->exec(NULL, "");
+ HDDInfo->hide();
+ delete HDDInfo;
+ return res;
+}
+
+// ----------------------------------------------------------------------------
+
+CHDDInfoWidget::CHDDInfoWidget()
+{
+
+}
+
+CHDDInfoWidget::~CHDDInfoWidget()
+{
+
+}
+
+#define locale_itemsCount 9
+static const neutrino_locale_t locale_items[locale_itemsCount] =
+{
+ LOCALE_HDD_INFO_MODEL_FAMILY ,
+ LOCALE_HDD_INFO_MODEL ,
+ LOCALE_HDD_INFO_SERIAL ,
+ LOCALE_HDD_INFO_FIRMWARE ,
+ LOCALE_HDD_INFO_CAPACITY ,
+ LOCALE_HDD_INFO_SECTOR_SIZE ,
+ LOCALE_HDD_INFO_ROTATION_RATE ,
+ LOCALE_HDD_INFO_SATA_VERSION ,
+ LOCALE_HDD_INFO_TEMPERATURE
+};
+
+void CHDDInfoWidget::paint(const std::string &Key)
+{
+ frameBuffer = CFrameBuffer::getInstance();
+
+ int hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
+ int mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
+ int sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
+
+ int offset = 20;
+ int bheight = offset + locale_itemsCount*mheight + offset; // body height
+ int fheight = sheight + offset/2; // footer height
+
+ width = frameBuffer->getScreenWidth() / 100 * 50;
+ height = hheight + bheight + fheight;
+
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
+
+ FILE *pipe_reader;
+ char *buffer;
+ ssize_t read;
+ size_t len;
+ char *found;
+ std::string str_capacity;
+ unsigned long long mb;
+ std::ostringstream buf;
+
+ char model_family[128] = "";
+ char model[128] = "";
+ char serial[128] = "";
+ char firmware[128] = "";
+ char capacity[128] = "";
+ char sector_size[128] = "";
+ char rotation_rate[128] = "";
+ char sata_version[128] = "";
+ char temperature[128] = "";
+
+ buf << "smartctl --all /dev/" << Key;
+
+ buffer=NULL;
+
+ if((pipe_reader = popen(buf.str().c_str(), "r")))
+ {
+ while ((read = getline(&buffer, &len, pipe_reader)) != -1)
+ {
+ if ((found = strstr(buffer, "Model Family:")))
+ sscanf(found+18, "%127[^\n]", (char *) &model_family);
+ else if ((found = strstr(buffer, "Device Model:")))
+ sscanf(found+18, "%127[^\n]", (char *) &model);
+ else if ((found = strstr(buffer, "Serial Number:")))
+ sscanf(found+18, "%127[^\n]", (char *) &serial);
+ else if ((found = strstr(buffer, "Firmware Version:")))
+ sscanf(found+18, "%127[^\n]", (char *) &firmware);
+ else if ((found = strstr(buffer, "User Capacity:")))
+ sscanf(found+18, "%127[^\n]", (char *) &capacity);
+ else if ((found = strstr(buffer, "Sector Size:")))
+ sscanf(found+18, "%127[^\n]", (char *) §or_size);
+ else if ((found = strstr(buffer, "Rotation Rate:")))
+ sscanf(found+18, "%127[^\n]", (char *) &rotation_rate);
+ else if ((found = strstr(buffer, "SATA Version is:")))
+ sscanf(found+18, "%127[^\n]", (char *) &sata_version);
+ else if ((found = strstr(buffer, "Temperature_Celsius")))
+ sscanf(found+83, "%3[^\n]", (char *) &temperature);
+ }
+ pclose(pipe_reader);
+ }
+ else
+ printf("[read_smartctl] popen error\n" );
+
+ if(buffer)
+ free(buffer);
+
+ // manipulating capacity
+ str_capacity = capacity;
+ str_capacity.erase(std::remove(str_capacity.begin(), str_capacity.end(), ','), str_capacity.end());
+ mb = strtoull(str_capacity.c_str(),NULL,0)/1000000;
+ buf.str("");
+ if (mb != 0)
+ {
+ if (mb < 1000)
+ buf << mb << " MB";
+ else
+ buf << mb/1000 << " GB";
+ }
+ snprintf(capacity, sizeof(capacity), "%s", buf.str().c_str());
+
+ // manipulating temperature
+ buf.str("");
+ if (strcmp(temperature, "") != 0)
+ {
+ buf << trim(temperature) << " Grad Celsius";
+ snprintf(temperature, sizeof(temperature), "%s", buf.str().c_str());
+ }
+
+ // calculate max width of used LOCALES
+ int locwidth = 0;
+ for (int i = 0; i < locale_itemsCount; i++) {
+ int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(locale_items[i]));
+ locwidth = std::max(locwidth, w);
+ }
+
+ // calculate width of separator
+ std::string separator = " : ";
+ int sepwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(separator);
+
+ // calculate max width of data
+ int datwidth = 0, w = 0;
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(model_family));
+ datwidth = std::max(datwidth, w);
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(model));
+ datwidth = std::max(datwidth, w);
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(serial));
+ datwidth = std::max(datwidth, w);
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(firmware));
+ datwidth = std::max(datwidth, w);
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(capacity));
+ datwidth = std::max(datwidth, w);
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(sector_size));
+ datwidth = std::max(datwidth, w);
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(rotation_rate));
+ datwidth = std::max(datwidth, w);
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(sata_version));
+ datwidth = std::max(datwidth, w);
+ w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(trim(temperature));
+ datwidth = std::max(datwidth, w);
+
+ // recalculate width and xpos
+ width = std::max(width, offset + locwidth + sepwidth + datwidth + offset);
+ if (width > (int) frameBuffer->getScreenWidth())
+ {
+ // should only happen with very big fonts
+ width = frameBuffer->getScreenWidth();
+ datwidth = width - offset - locwidth - sepwidth - offset;
+ }
+ x = getScreenStartX(width);
+
+ fprintf(stderr, "CHDDInfoWidget::CHDDInfoWidget() x = %d, y = %d, width = %d, height = %d\n", x, y, width, height);
+
+ // paint backgrounds
+ frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
+ frameBuffer->paintBoxRel(x, y+ hheight, width, bheight, COL_MENUCONTENT_PLUS_0);
+ frameBuffer->paintBoxRel(x, y+ hheight+ bheight, width, fheight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM);
+
+ // header
+ int xpos = x + offset/2;
+ int ypos = y + hheight;
+ int icol_w = 0, icol_h = 0, icol_o = 0;
+
+ frameBuffer->getIconSize(NEUTRINO_ICON_SETTINGS, &icol_w, &icol_h);
+ if ( (icol_w) && (icol_h) )
+ {
+ frameBuffer->paintIcon(NEUTRINO_ICON_SETTINGS, xpos, y, hheight);
+ icol_o = icol_w + offset/2;
+ }
+
+ buf.str("");
+ buf << g_Locale->getText(LOCALE_HDD_INFO_HEAD) << " (" << Key << ")";
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(xpos + icol_o, ypos, width - offset - icol_o, buf.str(), COL_MENUHEAD_TEXT);
+
+ // locale
+ xpos = x + offset;
+ ypos += offset;
+ for (int i = 0; i < locale_itemsCount; i++) {
+ ypos += mheight;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, locwidth, g_Locale->getText(locale_items[i]), COL_MENUCONTENTINACTIVE_TEXT);
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos + locwidth, ypos, sepwidth, separator, COL_MENUCONTENTINACTIVE_TEXT);
+ }
+
+ // footer with centered content
+ int wtmp = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_HDD_INFO_INFO));
+ xpos = x + width/2 - wtmp/2;
+ ypos = y + hheight + bheight + offset/4 + sheight;
+ g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(xpos, ypos, wtmp, g_Locale->getText(LOCALE_HDD_INFO_INFO), COL_MENUCONTENTINACTIVE_TEXT);
+
+ // finally paint data
+ xpos = x + offset + locwidth + sepwidth;
+ ypos = y + hheight + offset;
+
+ ypos += mheight;
+ buf.str("");
+ buf << model_family;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(model_family, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+
+ ypos += mheight;
+ buf.str("");
+ buf << model;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(model, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+
+ ypos += mheight;
+ buf.str("");
+ buf << serial;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(serial, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+
+ ypos += mheight;
+ buf.str("");
+ buf << firmware;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(firmware, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+
+ ypos += mheight;
+ buf.str("");
+ buf << capacity;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(capacity, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+
+ ypos += mheight;
+ buf.str("");
+ buf << sector_size;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(sector_size, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+
+ ypos += mheight;
+ buf.str("");
+ buf << rotation_rate;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(rotation_rate, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+
+ ypos += mheight;
+ buf.str("");
+ buf << sata_version;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(sata_version, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+
+ ypos += mheight;
+ buf.str("");
+ buf << temperature;
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(xpos, ypos, datwidth, (!strcmp(temperature, "") ? g_Locale->getText(LOCALE_HDD_INFO_UNKNOWN) : buf.str().c_str()), COL_MENUCONTENT_TEXT);
+}
+
+void CHDDInfoWidget::hide()
+{
+ frameBuffer->paintBackgroundBoxRel(x, y, width, height);
+}
diff --git a/src/gui/hdd_info.h b/src/gui/hdd_info.h
new file mode 100644
index 000000000..f6a2e755c
--- /dev/null
+++ b/src/gui/hdd_info.h
@@ -0,0 +1,60 @@
+/*
+ hdd_info
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 __hdd_info__
+#define __hdd_info__
+
+#include
+#include
+
+#include
+
+class CHDDInfoWidget
+{
+ private:
+ CFrameBuffer *frameBuffer;
+ int x, y, width, height;
+
+ public:
+ CHDDInfoWidget();
+ ~CHDDInfoWidget();
+ void hide();
+ void paint(const std::string &Key);
+};
+
+// ----------------------------------------------------------------------------
+
+class CHDDInfoMenu : public CMenuTarget, CHDDInfoWidget
+{
+ private:
+ int width;
+ int show();
+
+ public:
+ CHDDInfoMenu();
+ ~CHDDInfoMenu();
+ int exec(CMenuTarget* parent, const std::string & actionKey);
+};
+
+#endif
diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp
index 5b3cf5730..949e29e80 100644
--- a/src/gui/hdd_menu.cpp
+++ b/src/gui/hdd_menu.cpp
@@ -44,6 +44,8 @@
#include
#include "hdd_menu.h"
+#include //NI
+#include //NI
#include
#include
#include
@@ -61,7 +63,12 @@
#define BLKID_BIN "/sbin/blkid"
#define EJECT_BIN "/bin/eject"
+//NI
+#ifdef BOXMODEL_APOLLO
#define MDEV_MOUNT "/lib/mdev/fs/mount"
+#else
+#define MDEV_MOUNT "/etc/mdev/mdev-mount.sh"
+#endif
#define MOUNT_BASE "/media/"
#define HDD_NOISE_OPTION_COUNT 4
@@ -425,6 +432,10 @@ int CHDDMenuHandler::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t dat
if (added && !mounted && tmp != "sr") {
std::string message = dev + ": " + g_Locale->getText(LOCALE_HDD_MOUNT_FAILED);
+ //NI
+ if (!g_settings.hdd_format_on_mount_failed)
+ showHint(message);
+ else {
message += std::string(" ") + g_Locale->getText(LOCALE_HDD_FORMAT) + std::string(" ?");
int res = ShowMsg(LOCALE_MESSAGEBOX_INFO, message, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo);
if(res == CMessageBox::mbrYes) {
@@ -435,12 +446,13 @@ int CHDDMenuHandler::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t dat
return messages_return::handled | messages_return::cancel_all;
}
}
+ }
} else {
std::string message = dev + ": " + (added ?
g_Locale->getText(mounted ? LOCALE_HDD_MOUNT_OK : LOCALE_HDD_MOUNT_FAILED)
: g_Locale->getText(LOCALE_HDD_UMOUNTED));
showHint(message);
- if (added && tmp != "sr")
+ if (added && tmp != "sr" && g_settings.hdd_allow_set_recdir) //NI
setRecordPath(dev);
}
if (in_menu && !lock_refresh) {
@@ -720,6 +732,32 @@ _show_menu:
hddmenu->addItem(mc);
}
+ //NI
+ hddmenu->addItem(new CMenuSeparator());
+ if (cs_get_revision() < 8) {
+ //NI HDD power (HD1/BSE only)
+ int flag_hddpower = file_exists(FLAG_DIR ".hddpower");
+
+ CNITouchFileNotifier * hddpowerNotifier = new CNITouchFileNotifier("hddpower");
+ mc = new CMenuOptionChooser(LOCALE_HDD_POWER, &flag_hddpower, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, hddpowerNotifier, CRCInput::RC_yellow);
+ mc->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_HDD_POWER);
+ hddmenu->addItem(mc);
+ hddmenu->addItem(new CMenuSeparator());
+ }
+ mc = new CMenuOptionChooser(LOCALE_HDD_FORMAT_ON_MOUNT_FAILED, &g_settings.hdd_format_on_mount_failed, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
+ mc->setHint("", LOCALE_MENU_HINT_HDD_FORMAT_ON_MOUNT_FAILED);
+ hddmenu->addItem(mc);
+ mc = new CMenuOptionChooser(LOCALE_HDD_WAKEUP, &g_settings.hdd_wakeup, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
+ mc->setHint("", LOCALE_MENU_HINT_HDD_WAKEUP);
+ hddmenu->addItem(mc);
+ mc = new CMenuOptionChooser(LOCALE_HDD_WAKEUP_MSG, &g_settings.hdd_wakeup_msg, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
+ mc->setHint("", LOCALE_MENU_HINT_HDD_WAKEUP_MSG);
+ hddmenu->addItem(mc);
+ hddmenu->addItem(new CMenuSeparator());
+ mc = new CMenuOptionChooser(LOCALE_HDD_ALLOW_SET_RECDIR, &g_settings.hdd_allow_set_recdir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
+ mc->setHint("", LOCALE_MENU_HINT_HDD_ALLOW_SET_RECDIR);
+ hddmenu->addItem(mc);
+
hddmenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_HDD_MANAGE));
for (std::map::iterator it = devtitle.begin(); it != devtitle.end(); ++it) {
@@ -813,7 +851,7 @@ int CHDDMenuHandler::formatDevice(std::string dev)
if(res != CMessageBox::mbrYes)
return menu_return::RETURN_REPAINT;
- bool srun = my_system(3, "killall", "-9", "smbd");
+ //NI bool srun = my_system(3, "killall", "-9", "smbd");
res = umount_all(dev);
printf("CHDDMenuHandler::formatDevice: umount res %d\n", res);
@@ -994,7 +1032,7 @@ _remount:
}
}
_return:
- if (!srun) my_system(1, "smbd");
+ //NI if (!srun) my_system(1, "smbd");
if (show_menu)
return menu_return::RETURN_EXIT_ALL;
@@ -1022,7 +1060,7 @@ int CHDDMenuHandler::checkDevice(std::string dev)
std::string cmd = devtool->fsck + " " + devtool->fsck_options + " " + devname;
printf("fsck cmd: [%s]\n", cmd.c_str());
- bool srun = my_system(3, "killall", "-9", "smbd");
+ //NI bool srun = my_system(3, "killall", "-9", "smbd");
res = true;
if (is_mounted(dev.c_str()))
@@ -1087,7 +1125,7 @@ ret1:
res = mount_dev(dev);
printf("CHDDMenuHandler::checkDevice: mount res %d\n", res);
- if (!srun) my_system(1, "smbd");
+ //NI if (!srun) my_system(1, "smbd");
return menu_return::RETURN_REPAINT;
}
diff --git a/src/gui/imageinfo_ni.cpp b/src/gui/imageinfo_ni.cpp
new file mode 100644
index 000000000..8131971a3
--- /dev/null
+++ b/src/gui/imageinfo_ni.cpp
@@ -0,0 +1,861 @@
+/*
+ imageinfo_ni
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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
+
+extern cVideo * videoDecoder;
+
+extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
+
+#include
+extern CPictureViewer * g_PicViewer;
+
+#include
+static unsigned long time2ms (const struct timeval *tv)
+{
+ return (tv->tv_sec * 1000) + ((tv->tv_usec + 500) / 1000);
+}
+
+long delta_time (struct timeval *tv, struct timeval *last_tv)
+{
+ return time2ms (tv) - time2ms (last_tv);
+}
+
+CImageInfoNI::CImageInfoNI()
+{
+ Init();
+}
+
+static const neutrino_locale_t info_items[8] =
+{
+ LOCALE_IMAGEINFO_IMAGE,
+ LOCALE_IMAGEINFO_DATE,
+ LOCALE_IMAGEINFO_VERSION,
+ LOCALE_IMAGEINFO_CREATOR,
+ LOCALE_IMAGEINFO_HOMEPAGE,
+ LOCALE_IMAGEINFO_DOKUMENTATION,
+ LOCALE_IMAGEINFO_FORUM,
+ LOCALE_IMAGEINFO_LICENSE
+};
+
+void CImageInfoNI::Init(void)
+{
+ frameBuffer = CFrameBuffer::getInstance();
+
+ font_head = SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME;;
+ font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
+ font_info = SNeutrinoSettings::FONT_TYPE_MENU;
+
+ hheight = g_Font[font_head]->getHeight();
+ iheight = g_Font[font_info]->getHeight();
+ sheight = g_Font[font_small]->getHeight();
+ swidth = g_Font[font_small]->getWidth();
+
+ max_width = frameBuffer->getScreenWidth(true);
+ max_height = frameBuffer->getScreenHeight(true);
+
+ width = frameBuffer->getScreenWidth() - 10;
+ height = frameBuffer->getScreenHeight() - 10;
+ x = getScreenStartX( width );
+ y = getScreenStartY( height );
+
+ systemfs = 0;
+ old_x = 0;
+ old_y = 0;
+ InfoThread = 0;
+ read_old = 0;
+ write_old = 0;
+ net_best = 0;
+ xcpu = width - width/3 - 10;
+ ycpu = y + 10 + (height/3 /* pig-box height */) + (2 * iheight);
+ max_text_width = xcpu - x - 2*10;
+
+ offset = 0;
+ for (int i = 0; i < 8; i++) {
+ int tmpoffset = g_Font[font_info]->getRenderWidth(g_Locale->getText (info_items[i]));
+ if (tmpoffset > offset) {
+ offset = tmpoffset;
+ }
+ }
+ offset = offset + 15;
+}
+
+CImageInfoNI::~CImageInfoNI()
+{
+ StopInfoThread();
+ videoDecoder->Pig(-1, -1, -1, -1);
+}
+
+int CImageInfoNI::exec(CMenuTarget* parent, const std::string &)
+{
+ int res = menu_return::RETURN_REPAINT;
+ if (parent)
+ parent->hide();
+
+ neutrino_msg_t msg;
+ _stat cpu;
+
+ cpu.usr = 0;
+ cpu.nice = 0;
+ cpu.system = 0;
+ cpu.idle = 0;
+ sigBox_pos = 0;
+
+ paint();
+ paint_pig (xcpu, y + 10, width/3, height/3);
+ StartInfoThread();
+
+ while (1)
+ {
+ neutrino_msg_data_t data;
+ uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS(100);
+ g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
+
+ if(msg == CRCInput::RC_setup) {
+ res = menu_return::RETURN_EXIT_ALL;
+ break;
+ }
+ else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites)) {
+ g_RCInput->postMsg (msg, 0);
+ res = menu_return::RETURN_EXIT_ALL;
+ break;
+ }
+ else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
+ CNeutrinoApp::getInstance ()->handleMsg (msg, data);
+ continue;
+ }
+ else if (msg <= CRCInput::RC_MaxRC)
+ {
+ break;
+ }
+
+ if ( msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_timeout)
+ {
+ CNeutrinoApp::getInstance()->handleMsg( msg, data );
+ }
+
+ Stat_Info(&cpu);
+ paint_CPU_Percent(CPU_Percent(&cpu));
+ }
+
+ StopInfoThread();
+ hide();
+
+ return res;
+}
+
+void CImageInfoNI::hide()
+{
+ frameBuffer->paintBackground();
+ videoDecoder->Pig(-1, -1, -1, -1);
+}
+
+void CImageInfoNI::paint_pig(int px, int py, int w, int h)
+{
+ frameBuffer->paintBoxRel(px-10,py-10,w+20,h+20, COL_INFOBAR_PLUS_0);
+ g_PicViewer->DisplayImage(ICONSDIR "/start.jpg", px, py, w, h, frameBuffer->TM_NONE);
+}
+
+void CImageInfoNI::paintLine(int xpos, int font, const char* text)
+{
+ g_Font[font]->RenderString(xpos, ypos, max_text_width, text, COL_INFOBAR_TEXT);
+}
+
+void CImageInfoNI::clearLine(int xpos, int font)
+{
+ int font_height = g_Font[font]->getHeight();
+ frameBuffer->paintBoxRel(xpos, ypos - font_height, max_text_width , font_height, COL_BLUE/*INFOBAR_PLUS_0*/);
+}
+
+void CImageInfoNI::paint()
+{
+ const char * head_string;
+ int xpos = x+10;
+
+ std::ostringstream imageversion;
+ std::ostringstream commits;
+
+ ypos = y;
+
+ head_string = g_Locale->getText(LOCALE_IMAGEINFO_HEAD);
+ CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, head_string);
+
+ //background
+ frameBuffer->paintBoxRel(0, 0, max_width, max_height, COL_INFOBAR_PLUS_0);
+
+ ypos += hheight;
+ g_Font[font_head]->RenderString(xpos, ypos, max_text_width, head_string, COL_MENUHEAD_TEXT);
+
+ ypos += iheight/2;
+
+ CConfigFile config('\t');
+ config.loadConfig("/.version");
+
+ const char * imagename = config.getString("imagename", "NI-Neutrino-HD").c_str();
+ const char * homepage = config.getString("homepage", "www.neutrino-images.de").c_str();
+ const char * creator = config.getString("creator", "NI-Team").c_str();
+ const char * version = config.getString("version", "no version").c_str();
+ const char * origin_commit = config.getString("origin-commit", "no commit").c_str();
+ const char * remote_commit = config.getString("remote-commit", "no commit").c_str();
+ const char * builddate = config.getString("builddate", "no builddate").c_str();
+
+ static CFlashVersionInfo versionInfo(version);
+ const char * releaseCycle = versionInfo.getReleaseCycle();
+
+ struct utsname uts_info;
+
+ imageversion << releaseCycle << " (" << versionInfo.getType() << ")";
+ commits << "NI: " << origin_commit << ", CST: " << remote_commit;
+
+ ypos += iheight;
+ paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_IMAGE));
+ paintLine(xpos+offset, font_info, imagename);
+
+ ypos += iheight;
+ paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION));
+ paintLine(xpos+offset, font_info, imageversion.str().c_str());
+
+ ypos += iheight;
+ paintLine(xpos , font_info, "Commits:");
+ paintLine(xpos+offset, font_info, commits.str().c_str());
+
+ ypos += iheight;
+ paintLine(xpos , font_info, "Kernel:");
+ paintLine(xpos+offset, font_info, uname(&uts_info) < 0 ? "n/a" : uts_info.release);
+
+ ypos += iheight;
+
+ paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_DATE));
+ paintLine(xpos+offset, font_info, builddate );
+
+ ypos += iheight;
+ paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_CREATOR));
+ paintLine(xpos+offset, font_info, creator);
+
+ ypos += iheight;
+ paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_HOMEPAGE));
+ paintLine(xpos+offset, font_info, homepage);
+
+ ypos += iheight;
+
+ ypos += sheight;
+
+ get_MTD_Info();
+ //paint_MTD_Info(xpos);
+ //ypos+= sheight;
+
+ paint_DF_Info(xpos);
+
+ ypos+= sheight;
+
+ paint_Stat_Info_Box(xcpu, ycpu, width/3, height/3);
+
+ if (access(ICONSDIR "/astrasat.png", F_OK) == 0) {
+ int logoBox_x = xcpu;
+ int logoBox_y = ycpu + height/3 + sheight;
+ int logoBox_w = width/3;
+ int logoBox_h = height - logoBox_y;
+ CComponentsPicture *logoBox = new CComponentsPicture(logoBox_x, logoBox_y, logoBox_w, logoBox_h, ICONSDIR "/astrasat.png");
+ int logo_w = 0, logo_h = 0;
+ logoBox->getSize(&logo_w, &logo_h);
+ if (logo_w < logoBox_w)
+ logoBox->setXPos(logoBox_x + (logoBox_w/2) - (logo_w/2));
+ logoBox->setColorBody(COL_INFOBAR_PLUS_0);
+ logoBox->paint(CC_SAVE_SCREEN_NO);
+ }
+}
+
+void* CImageInfoNI::InfoProc(void *arg)
+{
+ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
+ pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS,0);
+
+ CImageInfoNI *imageInfo = (CImageInfoNI*) arg;
+
+ while(1) {
+ imageInfo->paint_MEM_Info(imageInfo->x+10, imageInfo->ypos);
+ imageInfo->paint_NET_Info(imageInfo->x+10, imageInfo->ypos);
+ sleep(1);
+ }
+ return 0;
+}
+
+void CImageInfoNI::StartInfoThread()
+{
+ if(!InfoThread) {
+ printf("CImageInfoNI::StartInfoThrea\n");
+ pthread_create (&InfoThread, NULL, InfoProc, (void*) this) ;
+ pthread_detach(InfoThread);
+ }
+}
+
+void CImageInfoNI::StopInfoThread()
+{
+ if(InfoThread) {
+ printf("CImageInfoNI::StopInfoThread\n");
+ pthread_cancel(InfoThread);
+ InfoThread = 0;
+ }
+}
+
+string CImageInfoNI::get_systemRoot()
+{
+ fstream fh;
+ string s;
+ string root ="";
+ const string file = "/proc/cmdline";
+ const string str = "root=mtd:";
+
+ fh.open(file.c_str(), ios::in);
+
+ if(!fh.is_open())
+ {
+ return root;
+ }
+
+ while (!fh.eof())
+ {
+ getline(fh, s);
+
+ string::size_type begin = s.find(str) + str.length();
+ string::size_type end = s.find(' ', begin);
+ root = s.substr(begin, end - begin);
+
+ if(!root.empty())
+ break;
+ }
+ fh.close();
+ return root;
+}
+
+int CImageInfoNI::get_MTD_Info()
+{
+ FILE *fh;
+ char *buffer;
+ ssize_t read;
+ size_t len;
+ int i = 0;
+
+ memset(&mtd_info, 0, sizeof(mtd_info));
+
+ buffer=NULL;
+ if (!(fh=fopen("/proc/mtd", "r")))
+ return false;
+
+#ifdef BOXMODEL_APOLLO
+ std::string sysfs = get_systemRoot();
+#else
+ std::string sysfs = "systemFS";
+#endif
+
+ while ((read = getline(&buffer, &len, fh)) != -1)
+ {
+ S_MTD_INFO entry;
+
+ if (strstr(buffer, "mtd") != 0)
+ {
+ sscanf(buffer, "%7[^:]: %8s %8s \"%39[^\"]",
+ entry.dev,
+ entry.size,
+ entry.erasesize,
+ entry.name);
+ mtd_info.push_back(entry);
+
+ if (strstr(mtd_info[i].name, sysfs.c_str()))
+ systemfs=i;
+ i++;
+ }
+ }
+ fclose(fh);
+ if(buffer)
+ free(buffer);
+ return 0;
+}
+
+#if 0
+void CImageInfoNI::paint_MTD_Info(int posx)
+{
+ for (int i=0; i<(int)mtd_info.size(); i++)
+ {
+ char buf[(strlen(mtd_info[i].dev)+strlen(mtd_info[i].name)+3)];
+
+ sprintf((char*) buf, "%s: %s", mtd_info[i].dev, mtd_info[i].name);
+ paintLine(posx, font_small, buf);
+ ypos+= sheight;
+ }
+}
+#endif
+
+int CImageInfoNI::Stat_Info(_stat *stat_info)
+{
+ FILE *fh;
+ char *ptr;
+ char *buffer;
+ ssize_t read;
+ size_t len;
+
+ stat_info->old_usr = stat_info->usr;
+ stat_info->old_nice = stat_info->nice;
+ stat_info->old_system = stat_info->system;
+ stat_info->old_idle = stat_info->idle;
+
+ buffer=NULL;
+ if (!(fh = fopen("/proc/stat", "r")))
+ return false;
+
+ while ((read = getline(&buffer, &len, fh)) != -1)
+ {
+ if ((ptr = strstr(buffer, "cpu")))
+ {
+ sscanf(ptr+3, "%lu %i %lu %lu", &stat_info->usr, &stat_info->nice, &stat_info->system, &stat_info->idle);
+ break;
+ }
+ }
+ fclose(fh);
+ if(buffer)
+ free(buffer);
+ return true;
+}
+
+int CImageInfoNI::CPU_Percent(_stat *cpu)
+{
+ long unsigned int sys_old = cpu->old_usr + cpu->old_nice + cpu->old_system;
+ long unsigned int total_old = cpu->old_usr + cpu->old_nice + cpu->old_system + cpu->old_idle;
+
+ long unsigned int sys_new = cpu->usr + cpu->nice + cpu->system;
+ long unsigned int total_new = cpu->usr + cpu->nice + cpu->system + cpu->idle;
+
+ long unsigned int sys_diff = sys_new - sys_old;
+ long unsigned int total_diff = total_new - total_old;
+
+ long unsigned int percent = ((float) sys_diff / (float) total_diff) * 100;
+
+ if (sys_diff > 1 || total_diff > 1)
+ return(percent);
+ else
+ return(0);
+}
+
+void CImageInfoNI::paint_Stat_Info_Box(int InfoB_x, int InfoB_y, int InfoB_w, int InfoB_h)
+{
+ frameBuffer->paintBoxRel(InfoB_x-10,InfoB_y-10,InfoB_w+20,InfoB_h+20, COL_INFOBAR_PLUS_0);
+ g_Font[font_info]->RenderString(InfoB_x, InfoB_y, InfoB_w, "CPU-Load", COL_INFOBAR_TEXT);
+
+ sigBox_x = InfoB_x;
+ sigBox_y = InfoB_y;
+ sigBox_w = InfoB_w;
+ sigBox_h = InfoB_h;
+
+ frameBuffer->paintBoxRel(sigBox_x,sigBox_y,sigBox_w,sigBox_h, COL_BLACK);
+}
+
+void CImageInfoNI::paint_CPU_Percent(int percent)
+{
+ int x_now = sigBox_pos;
+ int sigBox_pos_t = sigBox_pos;
+ int yd;
+
+ sigBox_pos = (++sigBox_pos_t) % sigBox_w;
+
+ frameBuffer->paintVLine(sigBox_x+sigBox_pos, sigBox_y, sigBox_y+sigBox_h, COL_WHITE);
+ frameBuffer->paintVLine(sigBox_x+x_now, sigBox_y, sigBox_y+sigBox_h, COL_BLACK);
+
+ yd = y_cpu_pixel(percent, 100, sigBox_h);
+
+ if ((old_x == 0 && old_y == 0) || sigBox_pos == 1)
+ {
+ old_x = sigBox_x+x_now;
+ old_y = sigBox_y+sigBox_h-yd;
+ }
+ else
+ {
+ frameBuffer->paintLine(old_x, old_y, sigBox_x+x_now, sigBox_y+sigBox_h-yd, COL_RED);
+ old_x = sigBox_x+x_now;
+ old_y = sigBox_y+sigBox_h-yd;
+ }
+}
+
+int CImageInfoNI::y_cpu_pixel(int value, int max_value, int max_y)
+{
+ int l;
+
+ if (!max_value) max_value = 1;
+
+ l = (max_y * value ) / max_value;
+ if (l > max_y) l = max_y;
+
+ return l;
+}
+
+void CImageInfoNI::get_DF_Info()
+{
+ FILE *pipe_reader;
+ char *ptr;
+ char *buffer;
+ ssize_t read;
+ size_t len;
+
+ memset(&image_size, 0, sizeof(image_size));
+
+ buffer=NULL;
+ if (!(pipe_reader = popen ("df", "r")))
+ printf("[read_df] popen error\n" );
+
+#ifdef BOXMODEL_APOLLO
+ strcpy(mtd_info[systemfs].dev,"mtd:root0");
+#endif
+
+ while ((read = getline(&buffer, &len, pipe_reader)) != -1)
+ {
+ if ((ptr = strstr(buffer, mtd_info[systemfs].dev))) {
+ sscanf(ptr+strlen(mtd_info[systemfs].dev), "%ld\t%ld\t%ld\t%i",
+ &image_size.blocks,
+ &image_size.used,
+ &image_size.available,
+ &image_size.percent);
+ }
+ }
+ pclose(pipe_reader);
+ if(buffer)
+ free(buffer);
+}
+
+void CImageInfoNI::paint_DF_Info(int posx)
+{
+ std::ostringstream buf;
+ int boxH = sheight-4;
+ int boxW = swidth*8;
+ int boxX = posx+width/3-boxW;
+ int boxY = ypos-sheight+2;
+
+ get_DF_Info();
+
+ buf << "Imagesize (" << image_size.percent << " Percent):";
+ paintLine(posx, font_small, buf.str().c_str());
+
+ CProgressBar pb(boxX, boxY, boxW, boxH);
+ pb.setFrameThickness(0);
+ pb.setRgb(70, 100, 90);
+ pb.setType(CProgressBar::PB_REDRIGHT);
+ pb.setValues(image_size.percent, 100);
+ pb.paint(false);
+
+ buf.str("");
+ buf.precision(2);
+ buf << fixed;
+
+ if (image_size.blocks > 1024)
+ {
+ if (image_size.used > 1024)
+ buf << "Total: " << (image_size.blocks/1024.0) << " MB Used: " << (image_size.used/1024.0) << " MB";
+ else
+ buf << "Total: " << (image_size.blocks/1024.0) << " MB Used: " << image_size.used << " KB";
+ }
+ else
+ {
+ if (image_size.used > 1024)
+ buf << "Total: " << image_size.blocks << " KB Used: " << (image_size.used/1024.0) << " MB";
+ else
+ buf << "Total: " << image_size.blocks << " KB Used: " << image_size.used << " KB";
+ }
+
+ ypos+= sheight;
+ paintLine(posx, font_small, buf.str().c_str());
+
+ buf.str("");
+ if (image_size.available > 1024)
+ buf << "Free: " << (image_size.available/1024.0) << " MB";
+ else
+ buf << "Free: " << image_size.available << " KB";
+
+ ypos += sheight;
+ paintLine(posx, font_small, buf.str().c_str());
+}
+
+int CImageInfoNI::get_MEM_Info()
+{
+ FILE *fh;
+ char *ptr;
+ char *buffer;
+ ssize_t read;
+ size_t len;
+
+ memset(&mem_info, 0, sizeof(mem_info));
+
+ buffer=NULL;
+ if (!(fh = fopen("/proc/meminfo", "r")))
+ return false;
+
+ while ((read = getline(&buffer, &len, fh)) != -1)
+ {
+ if ((ptr = strstr(buffer, "MemTotal:")))
+ sscanf(ptr+10, "%i", &mem_info.total);
+ else if ((ptr = strstr(buffer, "MemFree:")))
+ sscanf(ptr+9, "%i", &mem_info.free);
+ else if ((ptr = strstr(buffer, "Buffers:")))
+ sscanf(ptr+9, "%i", &mem_info.buffers);
+ else if ((ptr = strstr(buffer, "Cached:"))) {
+ sscanf(ptr+8, "%i", &mem_info.cached);
+ break;
+ }
+ }
+ fclose(fh);
+ if(buffer)
+ free(buffer);
+
+ mem_info.tfree = mem_info.free + mem_info.buffers + mem_info.cached;
+ mem_info.used = mem_info.total - mem_info.tfree;
+
+ return true;
+}
+
+int CImageInfoNI::get_MEM_Percent(int total, int used)
+{
+ return ((used*200 + total) / 2 / total); //this is CST style ;)
+}
+
+void CImageInfoNI::paint_MEM_Info(int posx, int posy)
+{
+ std::ostringstream buf;
+
+ posy += sheight/2;
+
+ int boxH = sheight-4;
+ int boxW = swidth*8;
+ int boxX = posx+width/3-boxW;
+ int boxY = posy-sheight+2;
+
+ get_MEM_Info();
+ int mem_percent = get_MEM_Percent(mem_info.total, mem_info.used);
+
+ buf << "Memory (" << mem_percent << " Percent):";
+ // progressbar ist in same line - so we not can use max_text_width
+ frameBuffer->paintBoxRel(posx-10,posy-sheight,boxX-posx+10,sheight, COL_INFOBAR_PLUS_0);
+ g_Font[font_small]->RenderString(posx, posy, boxX-posx, buf.str().c_str(), COL_INFOBAR_TEXT);
+
+ CProgressBar pb(boxX, boxY, boxW, boxH);
+ pb.setFrameThickness(0);
+ pb.setRgb(70, 100, 90);
+ pb.setType(CProgressBar::PB_REDRIGHT);
+ pb.setValues(mem_percent, 100);
+ pb.paint(false);
+
+ posy+= sheight;
+ buf.str("");
+ buf.precision(2);
+ buf << fixed << "Total: " << (mem_info.total/1024.0) << " MB Used: " << (mem_info.used/1024.0) << " MB";
+ frameBuffer->paintBoxRel(posx-10,posy-sheight,max_text_width+10,sheight, COL_INFOBAR_PLUS_0);
+ g_Font[font_small]->RenderString(posx, posy, max_text_width, buf.str().c_str(), COL_INFOBAR_TEXT);
+
+ posy+= sheight;
+ buf.str("");
+ buf << "Free: " << (mem_info.tfree < 1024 ? mem_info.tfree : (mem_info.tfree/1024.0))
+ << (mem_info.tfree < 1024?" KB ":" MB ")
+ << "(Buffers: " << (mem_info.buffers < 1024 ? mem_info.buffers : (mem_info.buffers/1024.0))
+ << (mem_info.buffers < 1024?" KB, ":" MB, ")
+ << "Cached: " << (mem_info.cached < 1024 ? mem_info.cached : (mem_info.cached/1024.0))
+ << (mem_info.cached < 1024?" KB":" MB)");
+
+ frameBuffer->paintBoxRel(posx-10,posy-sheight,max_text_width+10,sheight, COL_INFOBAR_PLUS_0);
+ g_Font[font_small]->RenderString(posx, posy, max_text_width, buf.str().c_str(), COL_INFOBAR_TEXT);
+}
+
+void CImageInfoNI::get_NET_Info(uint64_t *read_akt, long *read_packet, long *dummy, uint64_t *write_akt, long *write_packet)
+{
+ FILE *file = NULL;
+ char *ptr;
+ char *line_buffer = NULL;
+ char interface[20] = "eth0";
+ long *packet_ptr[3] = {read_packet, write_packet, dummy};
+ uint64_t *byte_ptr[2] = {read_akt, write_akt};
+ ssize_t read;
+ size_t len;
+
+ if ((file = fopen("/proc/net/dev","r"))==NULL)
+ {
+ printf("Open Proc-File Failure\n"); fflush(stdout);
+ }
+ else
+ {
+ while ((read = getline(&line_buffer, &len, file)) != -1)
+ {
+ if((ptr = strstr(line_buffer, interface))!=NULL)
+ {
+ dprintf(DEBUG_INFO, "Procline = %s",line_buffer);
+
+ sscanf(ptr+strlen(interface)+1,"%llu%ld%ld%ld%ld%ld%ld%ld%llu%ld",
+ (long long unsigned int*)byte_ptr[0],
+ (long*)packet_ptr[0],
+ (long *)packet_ptr[2],
+ (long *)packet_ptr[2],
+ (long *)packet_ptr[2],
+ (long *)packet_ptr[2],
+ (long *)packet_ptr[2],
+ (long *)packet_ptr[2],
+ (long long unsigned int*)byte_ptr[1],
+ (long*)packet_ptr[1]);
+ }
+ }
+ fclose (file);
+ }
+ if(line_buffer)
+ free(line_buffer);
+}
+
+void CImageInfoNI::paint_NET_Info(int posx, int posy)
+{
+ if (g_settings.ifname != "eth0")
+ return;
+
+ uint64_t read_akt =0;
+ uint64_t write_akt =0;
+ uint64_t delta_read =0;
+ uint64_t delta_write =0;
+ long read_packet =0;
+ long write_packet =0;
+ long dummy =0;
+ char temp_string[200] ="";
+
+ posy += sheight/2;
+ posy += 3*sheight + sheight/2; //height meminfo above that
+
+ int boxH = sheight-4;
+ int boxW = swidth*8;
+ int boxX = posx+width/3-boxW;
+ int boxY = posy-sheight+2;
+
+ /*
+ * write testing:
+ * dd if=/dev/zero of=/srv/netztest bs=8192 count=8192
+ * 8192+0 records in
+ * 8192+0 records out
+ * 67108864 bytes (64.0MB) copied, 8.658240 seconds, 7.4MB/s
+ *
+ * 1GB file read
+ * dd of=/dev/null if=/srv/netztest bs=8192 count=131072
+ */
+
+ gettimeofday (&tv, NULL);
+ get_NET_Info(&read_akt, &read_packet, &dummy, &write_akt, &write_packet);
+
+ long d_time_ms = delta_time(&tv, &last_tv);
+
+ if(read_old != 0 && read_akt > read_old)
+ delta_read = read_akt - read_old;
+ if(write_old != 0 && write_akt > write_old)
+ delta_write = write_akt - write_old;
+
+ uint64_t rbit_s = (((uint64_t) delta_read * 8000ULL) + ((uint64_t) d_time_ms / 2ULL)) / (uint64_t) d_time_ms;
+ uint64_t wbit_s = (((uint64_t) delta_write * 8000ULL) + ((uint64_t) d_time_ms / 2ULL)) / (uint64_t) d_time_ms;
+
+ if((rbit_s+wbit_s) > net_best)
+ net_best = rbit_s+wbit_s;
+
+ /*
+ * 100 MBit
+ * 12,5 MByte (MB)
+ * 12800 KByte (KB)
+ * 102400 KBit
+ * 13107200 Byte
+ * 104857600 Bit
+ */
+#ifdef BOXMODEL_APOLLO
+ int max_bit = 1073741824;
+#else
+ int max_bit = 104857600;
+#endif
+ int percent = ((rbit_s+wbit_s)*100/max_bit);
+
+ dprintf(DEBUG_INFO,"read byte = %llu - %llu\n",(long long unsigned int)read_akt,(long long unsigned int)read_old);
+ dprintf(DEBUG_INFO,"write byte = %llu - %llu\n",(long long unsigned int)write_akt,(long long unsigned int)write_old);
+ dprintf(DEBUG_INFO,"read_packet = %ld\n",read_packet);
+ dprintf(DEBUG_INFO,"write_packet= %ld\n",write_packet);
+ dprintf(DEBUG_INFO,"delta time = %10ld ms\n",d_time_ms);
+ dprintf(DEBUG_INFO,"read = %10llu bit/s\n",(long long unsigned int)rbit_s);
+ dprintf(DEBUG_INFO,"write = %10llu bit/s\n",(long long unsigned int)wbit_s);
+ dprintf(DEBUG_INFO,"total = %10llu bit/s (%d%%) / best %llu (%.2f MB/s) = (%d%%)\n\n",
+ (long long unsigned int)rbit_s+wbit_s,
+ percent,
+ (long long unsigned int)net_best,
+ net_best/(8.0*1024.0*1024.0),
+ (int)(net_best*100/max_bit)
+ );
+
+ sprintf(temp_string,"Interface eth0 (%d%%):",percent);
+ // progressbar ist in same line - so we not can use max_text_width
+ frameBuffer->paintBoxRel(posx-10,posy-sheight,boxX-posx+10,sheight, COL_INFOBAR_PLUS_0);
+ g_Font[font_small]->RenderString(posx, posy, boxX-posx, temp_string, COL_INFOBAR_TEXT);
+
+ CProgressBar pb(boxX, boxY, boxW, boxH);
+ pb.setFrameThickness(0);
+ pb.setRgb(70, 100, 90);
+ pb.setType(CProgressBar::PB_REDRIGHT);
+ pb.setValues(percent, 100);
+ pb.paint(false);
+
+ posy+= sheight;
+
+ sprintf(temp_string,"Receive: %llu bit/s Transmit: %llu bit/s",(long long unsigned int)rbit_s,(long long unsigned int)wbit_s);
+ frameBuffer->paintBoxRel(posx-10,posy-sheight,max_text_width+10,sheight, COL_INFOBAR_PLUS_0);
+ g_Font[font_small]->RenderString(posx, posy, max_text_width, temp_string, COL_INFOBAR_TEXT);
+
+ posy+= sheight;
+
+ sprintf(temp_string,"Maximal: %llu bit/s - %.2f MB/s (%d%%)",(long long unsigned int)net_best,net_best/(8.0*1024.0*1024.0),(int)((net_best*100)/max_bit));
+ frameBuffer->paintBoxRel(posx-10,posy-sheight,max_text_width+10,sheight, COL_INFOBAR_PLUS_0);
+ g_Font[font_small]->RenderString(posx, posy, max_text_width, temp_string, COL_INFOBAR_TEXT);
+
+ last_tv.tv_sec = tv.tv_sec;
+ last_tv.tv_usec = tv.tv_usec;
+ read_old = read_akt;
+ write_old = write_akt;
+}
diff --git a/src/gui/imageinfo_ni.h b/src/gui/imageinfo_ni.h
new file mode 100644
index 000000000..025e19230
--- /dev/null
+++ b/src/gui/imageinfo_ni.h
@@ -0,0 +1,152 @@
+/*
+ imageinfo_ni
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 __imageinfo_ni__
+#define __imageinfo_ni__
+
+#include
+
+#include
+#include
+#include
+
+class CImageInfoNI : public CMenuTarget
+{
+ private:
+ void Init(void);
+ CConfigFile * configfile;
+ CFrameBuffer *frameBuffer;
+ int x;
+ int y;
+ int ypos;
+ int xcpu;
+ int ycpu;
+ int width;
+ int height;
+ int hheight,iheight,sheight;
+ int swidth;
+
+ int max_height;
+ int max_width;
+ int max_text_width;
+
+ neutrino_locale_t name;
+ int offset;
+
+ int font_head;
+ int font_info;
+ int font_small;
+
+ void paint();
+ void paint_pig(int x, int y, int w, int h);
+ void paintLine(int xpos, int font, const char* text);
+ void clearLine(int xpos, int font);
+
+ typedef struct {
+ unsigned long usr;
+ unsigned int nice;
+ unsigned long system;
+ unsigned long idle;
+ unsigned long old_usr;
+ unsigned int old_nice;
+ unsigned long old_system;
+ unsigned long old_idle;
+ } _stat;
+
+ struct {
+ unsigned long blocks;
+ unsigned long used;
+ unsigned long available;
+ int percent;
+ } image_size;
+
+ struct {
+ int total;
+ int free;
+ int buffers;
+ int cached;
+ int tfree;
+ int used;
+ } mem_info;
+
+ struct S_MTD_INFO {
+ char dev[8];
+ char size[9];
+ char erasesize[9];
+ char name[40];
+ };
+ std::vector mtd_info;
+
+ struct timeval tv, last_tv;
+ uint64_t read_old;
+ uint64_t write_old;
+ uint64_t net_best;
+
+ pthread_t InfoThread;
+ static void* InfoProc(void *arg);
+ void StartInfoThread();
+ void StopInfoThread();
+
+ int systemfs;
+
+ int old_x;
+ int old_y;
+
+ int sigBox_pos;
+ int sigBox_x;
+ int sigBox_y;
+ int sigBox_w;
+ int sigBox_h;
+
+ std::string get_systemRoot();
+ int get_MTD_Info();
+#if 0
+ void paint_MTD_Info(int posx);
+#endif
+ void get_DF_Info();
+ void paint_DF_Info(int posx);
+
+ int get_MEM_Info();
+ int get_MEM_Percent(int total, int used);
+ void paint_MEM_Info(int posx, int posy);
+
+ int Stat_Info(_stat *stat_info);
+ void paint_Stat_Info_Box(int x, int y, int w, int h);
+ int CPU_Percent(_stat *cpu);
+ void paint_CPU_Percent(int percent);
+ int y_cpu_pixel(int value, int max_range, int max_y);
+
+ void get_NET_Info(uint64_t *read_akt, long *read_packet, long *dummy, uint64_t *write_akt, long *write_packet);
+ void paint_NET_Info(int posx, int posy);
+
+ public:
+
+ CImageInfoNI();
+ ~CImageInfoNI();
+
+ void hide();
+ int exec(CMenuTarget* parent, const std::string & actionKey);
+};
+
+#endif
diff --git a/src/gui/imdb.cpp b/src/gui/imdb.cpp
new file mode 100644
index 000000000..6738139e4
--- /dev/null
+++ b/src/gui/imdb.cpp
@@ -0,0 +1,693 @@
+/*
+ imdb
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 //bigFonts
+#include
+#include
+#include
+
+#include
+
+#include "imdb.h"
+
+
+CIMDB::CIMDB()
+{
+ frameBuffer = CFrameBuffer::getInstance();
+
+ surl = "http://www.google.de/search?q=";
+ soutfile = "/tmp/google.out";
+ IMDburl = "http://www.omdbapi.com/?plot=full&r=json&i=";
+ IMDbAPI = "/tmp/IMDb.json";
+ posterfile = "/tmp/poster.jpg";
+ stars_bg = ICONSDIR "/stars_bg.png";
+ stars = ICONSDIR "/stars.png";
+
+ cc_win = NULL;
+ cc_txt = NULL;
+
+ imdb_activ = false;
+
+ //initFrame(); /*not use for epginfo
+}
+
+CIMDB::~CIMDB()
+{
+ cleanup();
+
+ imdb_activ = false;
+ if(cc_win)
+ delete cc_win;
+}
+
+CIMDB* CIMDB::getInstance()
+{
+ static CIMDB* imdb = NULL;
+ if(!imdb)
+ imdb = new CIMDB();
+ return imdb;
+}
+
+std::string CIMDB::utf82url(std::string s)
+{
+ std::stringstream ss;
+ for (size_t i = 0; i < s.length(); ++i)
+ {
+ if (unsigned(s[i]) <= ' ') {
+ ss << '+';
+ }
+ else if (unsigned(s[i]) <= '\x27') {
+ ss << "%" << std::hex << unsigned(s[i]);
+ }
+ else {
+ ss << s[i];
+ }
+ }
+ return ss.str();
+}
+
+std::string CIMDB::parseString(std::string search1, std::string search2, std::string str)
+{
+ std::string ret, search;
+ size_t pos_wildcard, pos_firstline, pos_search1, pos_search2;
+ pos_wildcard = pos_firstline = pos_search1 = pos_search2 = std::string::npos;
+
+ if((pos_wildcard = search1.find('*')) != std::string::npos)
+ {
+ search = search1.substr(0, pos_wildcard);
+ //std::cout << "wildcard detected" << '\t' << "= " << search << "[*]" << search1.substr(pos_wildcard+1) << std::endl;
+ }
+ else
+ search = search1;
+
+ //std::cout << "search1" << "\t\t\t" << "= " << '"' << search << '"' << std::endl;
+ if((pos_search1 = str.find(search)) != std::string::npos)
+ {
+ //std::cout << "search1 found" << "\t\t" << "= " << '"' << search << '"' << " at pos "<< (int)(pos_search1) << " => " << str << std::endl;
+
+ pos_search1 += search.length();
+
+ if(pos_wildcard != std::string::npos)
+ {
+ size_t pos_wildcard_ext;
+ std::string wildcard_ext = search1.substr(pos_wildcard+1);
+
+ //std::cout << "wildcard_ext" << "\t\t" << "= " << '"' << wildcard_ext << '"' << std::endl;
+ if((pos_wildcard_ext = str.find(wildcard_ext,pos_wildcard+1)) != std::string::npos)
+ {
+ //std::cout << "wildcard_ext found" << "\t" << "= " << '"' << wildcard_ext << '"' << " at pos "<< (int)(pos_wildcard_ext) << " => " << str << std::endl;
+ pos_search1 = pos_wildcard_ext + wildcard_ext.length();
+ }
+ else
+ {
+ //std::cout << "wildcard_ext not found in line " << acc << " - exit" << std::endl;
+ return("");
+ }
+ }
+ }
+ else
+ {
+ //std::cout << "search1 not found in line " << acc << " - exit" << std::endl;
+ return("");
+ }
+
+ if(pos_search1 != std::string::npos)
+ {
+ //std::cout << "search2 " << "\t\t" << "= " << '"' << search2 << '"' << std::endl;
+
+ if(search2 == "\n")
+ {
+ ret = str.substr(pos_search1, str.length() - pos_search1);
+ return(ret);
+ }
+
+ if((pos_search2 = str.find(search2, pos_search1)) != std::string::npos)
+ {
+ if(search2.empty())
+ pos_search2 = str.length();
+
+ //std::cout << "search2" << "\t\t\t" << "= " << '"' << search2 << '"' << " found at "<< (int)(pos_search2) << " => " << str << std::endl;
+ ret = str.substr(pos_search1, pos_search2 - pos_search1);
+ }
+ //else
+ //std::cout << "search2 not found in line " << acc << " - exit" << std::endl;
+
+ }
+
+ return(ret);
+}
+
+std::string CIMDB::parseFile(std::string search1, std::string search2, const char* file, std::string firstline, int line_offset)
+{
+ int line = 0;
+ acc = 0;
+ std::ifstream fh;
+ std::string str, ret, search;
+ size_t pos_firstline, pos_search1, pos_search2;
+ pos_firstline = pos_search1 = pos_search2 = std::string::npos;
+
+ if(firstline.empty())
+ pos_firstline = 0;
+
+ fh.open(file, std::ios::in);
+ if(fh.is_open())
+ {
+ while (!fh.eof())
+ {
+ getline(fh, str);
+ acc++;
+
+ if(pos_firstline == std::string::npos)
+ {
+ if((pos_firstline = str.find(firstline)) != std::string::npos)
+ {
+ //std::cout << "firstline found " << str << std::endl;
+ }
+ continue;
+ }
+
+ if(line_offset /*&& pos_firstline != std::string::npos*/)
+ {
+ if(line+1 != line_offset)
+ {
+ line++;
+ continue;
+ }
+ }
+
+ ret = parseString(search1,search2,str);
+
+ if(!ret.empty())
+ break;
+ }
+ fh.close();
+ }
+
+ return(ret);
+}
+std::string CIMDB::googleIMDb(std::string searchStr)
+{
+ CHTTPTool httpTool;
+ std::string ret = "IMDb: google download fehlgeschlagen";
+ std::string httpString = "imdb+";
+ char* searchStr_ = (char*) searchStr.c_str();
+
+ while (*searchStr_!=0)
+ {
+ if ( (*searchStr_==' ') )
+ {
+ httpString += '+';
+ } else
+ {
+ httpString += *searchStr_;
+ }
+ searchStr_++;
+ }
+
+ std::string url = surl + "IMDb+" + utf82url(httpString);
+
+ if(httpTool.downloadFile(url, soutfile.c_str()))
+ {
+ ret = parseFile("http://www.imdb.com/title/", ">", soutfile.c_str());
+
+ if(ret.empty())
+ ret = parseFile("http://www.imdb.de/title/", ">", soutfile.c_str());
+
+ std::string delimiters = "/&;";
+ size_t next = ret.find_first_of(delimiters, 0);
+ ret = ret.substr(0, next);
+ }
+
+ return ret;
+}
+
+void CIMDB::initMap( std::map& my )
+{
+ Json::Value root;
+ Json::Reader reader;
+
+ std::ostringstream ss;
+ std::ifstream fh(IMDbAPI.c_str(),std::ifstream::in);
+ ss << fh.rdbuf();
+ std::string filedata = ss.str();
+
+ bool parsedSuccess = reader.parse(filedata,root,false);
+
+ if(!parsedSuccess)
+ {
+ std::cout << "Failed to parse JSON\n";
+ std::cout << reader.getFormattedErrorMessages() << std::endl;
+ }
+
+ for(Json::Value::iterator it = root.begin(); it !=root.end(); ++it)
+ {
+ Json::Value key = it.key();
+ Json::Value value = (*it);
+
+ std::string skey = key.asString();
+ std::string svalue = value.asString();
+ my[skey] = svalue;
+ }
+}
+
+int CIMDB::getIMDb(const std::string& epgTitle)
+{
+ CHTTPTool httpTool;
+ int ret = 0;
+
+ std::string imdb_ID = googleIMDb(epgTitle);
+
+ if(((imdb_ID.find("IMDb: ")) != std::string::npos))
+ return ret;
+
+ std::string url = IMDburl + imdb_ID;
+
+ if(httpTool.downloadFile(url, IMDbAPI.c_str()))
+ {
+ initMap(m);
+
+ //std::cout << "m now contains " << m.size() << " elements.\n";
+
+ if(m.empty() || m["Response"]!="True")
+ return 0;
+
+ //for (std::map::iterator it=m.begin(); it!=m.end(); ++it)
+ // std::cout << it->first << " => " << it->second << '\n';
+
+ //download Poster
+ if(httpTool.downloadFile(m["Poster"], posterfile.c_str()))
+ ret = 2;
+ else {
+ ret = 1;
+ if (access(posterfile.c_str(), F_OK) == 0)
+ unlink(posterfile.c_str());
+ }
+ }
+
+ return ret;
+}
+
+void CIMDB::getIMDbData(std::string& txt)
+{
+ txt += "Metascore: "+m["Metascore"]+"/100\n";
+ txt += "Stimmen: "+m["imdbVotes"]+"\n";
+ txt += "Datum: "+m["Released"]+" | "+m["Country"]+" | "+m["Runtime"]+"\n";
+ txt += "Genre: "+m["Genre"]+"\n";
+ txt += "Awards: "+m["Awards"]+"\n";
+ txt += "Regisseur: "+m["Director"]+"\n";
+ txt += "Drehbuch: "+m["Writer"]+"\n\n";
+ txt += "Darsteller: "+m["Actors"]+"\n";
+}
+
+std::string CIMDB::getFilename(CZapitChannel * channel, uint64_t id)
+{
+ char fname[512]; // UTF-8
+ char buf[256];
+ unsigned int pos = 0;
+
+ if(check_dir(g_settings.network_nfs_recordingdir.c_str()))
+ return ("");
+
+ snprintf(fname, sizeof(fname), "%s/", g_settings.network_nfs_recordingdir.c_str());
+ pos = strlen(fname);
+
+ // %C == channel, %T == title, %I == info1, %d == date, %t == time_t
+ std::string FilenameTemplate = g_settings.recording_filename_template;
+ if (FilenameTemplate.empty())
+ FilenameTemplate = "%C_%T_%d_%t";
+
+ StringReplace(FilenameTemplate,"%d","");
+ StringReplace(FilenameTemplate,"%t","");
+ StringReplace(FilenameTemplate,"__","_");
+
+ std::string channel_name = channel->getName();
+ if (!(channel_name.empty())) {
+ strcpy(buf, UTF8_TO_FILESYSTEM_ENCODING(channel_name.c_str()));
+ ZapitTools::replace_char(buf);
+ StringReplace(FilenameTemplate,"%C",buf);
+ }
+ else
+ StringReplace(FilenameTemplate,"%C","no_channel");
+
+ CShortEPGData epgdata;
+ if(CEitManager::getInstance()->getEPGidShort(id, &epgdata)) {
+ if (!(epgdata.title.empty())) {
+ strcpy(buf, epgdata.title.c_str());
+ ZapitTools::replace_char(buf);
+ StringReplace(FilenameTemplate,"%T",buf);
+ }
+ else
+ StringReplace(FilenameTemplate,"%T","no_title");
+
+ if (!(epgdata.info1.empty())) {
+ strcpy(buf, epgdata.info1.c_str());
+ ZapitTools::replace_char(buf);
+ StringReplace(FilenameTemplate,"%I",buf);
+ }
+ else
+ StringReplace(FilenameTemplate,"%I","no_info");
+ }
+
+ strcpy(&(fname[pos]), UTF8_TO_FILESYSTEM_ENCODING(FilenameTemplate.c_str()));
+
+ pos = strlen(fname);
+
+ strcpy(&(fname[pos]), ".jpg");
+
+ return (fname);
+}
+
+void CIMDB::StringReplace(std::string &str, const std::string search, const std::string rstr)
+{
+ std::string::size_type ptr = 0;
+ std::string::size_type pos = 0;
+ while((ptr = str.find(search,pos)) != std::string::npos){
+ str.replace(ptr,search.length(),rstr);
+ pos = ptr + rstr.length();
+ }
+}
+
+void CIMDB::cleanup()
+{
+ if (access(soutfile.c_str(), F_OK) == 0)
+ unlink(soutfile.c_str());
+ if (access(posterfile.c_str(), F_OK) == 0)
+ unlink(posterfile.c_str());
+ imdb_activ = false;
+}
+
+void CIMDB::initFrame()
+{
+ printf("[CIMDB::%s] \r\n", __FUNCTION__);
+
+ fontheight = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]->getHeight();
+ h_offset = 10;
+ v_offset = 10;
+
+ //create window object to get window positions
+ if (cc_win == NULL){
+ cc_win = new CComponentsWindow();
+
+ //recalc window
+ int w = frameBuffer->getScreenWidthRel();
+ int h = frameBuffer->getScreenHeightRel();
+ int x = getScreenStartX(w);
+ int y = getScreenStartY(h);
+
+ //set new dimensions;
+ cc_win->setDimensionsAll(x, y, w, h);
+ cc_win->Refresh();
+
+ //get window footer object
+ CComponentsFooter *winfooter = cc_win->getFooterObject();
+ winfooter = cc_win->getFooterObject();
+ h_footer = winfooter->getHeight();
+
+ //get window body object
+ CComponentsForm *winbody = cc_win->getBodyObject();
+ h_body = winbody->getHeight();
+ w_body = winbody->getWidth();
+ }
+
+ //calc button position
+ btn_start = 10;
+ btn_width = (cc_win->getWidth()-2*btn_start)/4;
+ btn_height = h_footer-(h_footer/4);
+}
+
+void CIMDB::showTextWindow(const std::string title, const std::string txt)
+{
+ if(cc_win == NULL){
+ initFrame();
+ }
+
+ printf("[CIMDB::%s] \r\n", __FUNCTION__);
+
+ bigFonts(true);
+
+ //set window header
+ cc_win->setWindowCaption(title);
+ cc_win->setWindowIcon(NEUTRINO_ICON_INFO);
+ cc_win->setWindowHeaderButtons(CComponentsHeader::CC_BTN_EXIT);
+
+ //create text item
+ if(cc_txt == NULL){
+ cc_txt = new CComponentsText();
+ }
+
+ cc_txt->setDimensionsAll(0, 0, w_body, h_body);
+ cc_txt->setTextBorderWidth(h_offset, 0);
+ cc_txt->setText(txt, CTextBox::TOP | CTextBox::SCROLL, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
+
+ /*add text item to window body object ...
+ * CComponentsForm *winbody = cc_win->getBodyObject();
+ * winbody->addCCItem(cc_txt);
+ *
+ *...or directly with addWindowItem(cc_txt);
+ */
+ cc_win->addWindowItem(cc_txt);
+
+ //get window footer object
+ CComponentsForm *winfooter = cc_win->getFooterObject();
+ winfooter->setColorBody(COL_INFOBAR_SHADOW_PLUS_1);
+
+ //create button items
+ CComponentsButtonGreen *cc_button_gn = new CComponentsButtonGreen(btn_start, CC_CENTERED, btn_width, btn_height, LOCALE_IMDB_INFO,
+ /*parent*/ NULL,
+ /*selected*/ false,
+ /*enabled*/ true,
+ /*has_shadow*/ false,
+ /*color_frame*/ winfooter->getColorBody(),
+ /*color_body*/ winfooter->getColorBody(),
+ /*color_shadow*/ COL_MENUCONTENTDARK_PLUS_0);
+ cc_button_gn->doPaintBg(false);
+ cc_button_gn->setButtonTextColor(COL_INFOBAR_SHADOW_TEXT);
+ cc_button_gn->setColBodyGradient(CC_COLGRAD_OFF);
+ cc_button_gn->setFrameThickness(0);
+
+ //add button object to window footer
+ winfooter->addCCItem(cc_button_gn);
+
+ //show window
+ cc_win->paint();
+
+ bigFonts(false);
+}
+
+void CIMDB::hideWindow(bool keep_active)
+{
+ if (!keep_active)
+ imdb_activ = false;
+
+ cc_win->kill();
+
+ //deallocate window object, dletes added cc_items also
+ if(cc_win)
+ delete cc_win;
+
+ cc_win = NULL;
+ cc_txt = NULL;
+}
+
+//scroll text
+void CIMDB::scroll(bool scrollDown)
+{
+ bigFonts(true);
+
+ //get the textbox instance and use CTexBbox scroll methods
+ CTextBox* ctb = NULL;
+ if (cc_txt)
+ ctb = cc_txt->getCTextBoxObject();
+ if (ctb)
+ {
+ ctb->enableBackgroundPaint(true);
+ if (scrollDown)
+ ctb->scrollPageDown(1);
+ else
+ ctb->scrollPageUp(1);
+ ctb->enableBackgroundPaint(false);
+ }
+
+ bigFonts(false);
+}
+
+void CIMDB::showIMDbWindow(const std::string title)
+{
+ if(cc_win == NULL){
+ initFrame();
+ }
+ printf("[CIMDB::%s] \r\n", __FUNCTION__);
+
+ bigFonts(true);
+
+ std::string print_buffer;
+ item_top = v_offset;
+ int h_imdbtitle = fontheight;
+ int left_offset = h_offset+ 20;
+ int w_poster_max = w_body/4; // max 25%
+ int h_poster_max = h_body- item_top- ((h_imdbtitle+ fontheight)*2 /*space from top to starbar*/);
+ int w_starbar = 160; //starbar picture width
+ int h_starbar = fontheight;
+ std::string pg_value = "0";
+ imdb_activ = true;
+
+ //show splash
+ cc_win->setWindowCaption("IMDb: Daten werden geladen ...");
+ cc_win->setWindowIcon(NEUTRINO_ICON_INFO);
+ cc_win->setWindowHeaderButtons(CComponentsHeader::CC_BTN_EXIT);
+ //get window footer object
+ CComponentsForm *winfooter = cc_win->getFooterObject();
+ winfooter->setColorBody(COL_INFOBAR_SHADOW_PLUS_1);
+ cc_win->paint();
+
+ //google, get IMDb-html and poster
+ getIMDb(title);
+
+ //get title from IMDb
+ print_buffer = "Title";
+ getIMDbElement(print_buffer);
+
+ //set window caption
+ cc_win->setWindowCaption(title);
+
+ //create title item
+ CComponentsText *cc_title = new CComponentsText();
+ cc_title->setDimensionsAll(left_offset, item_top, w_body-left_offset, h_imdbtitle);
+ cc_title->setText(print_buffer, CTextBox::TOP, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
+ //cc_title->setColorBody(COL_MENUCONTENTSELECTED_PLUS_0); /*display text body*/
+
+ //add title item to window object
+ cc_win->addWindowItem(cc_title);
+
+ item_top += h_imdbtitle+ fontheight;
+
+ //create poster item
+ CComponentsPicture *cc_pic = new CComponentsPicture(left_offset, item_top, w_poster_max, h_poster_max, posterfile);
+#if 0
+ cc_pic->setMaxWidth(w_poster_max);
+ cc_pic->setMaxHeight(h_poster_max);
+ cc_pic->setPictureAlign(CC_ALIGN_TOP | CC_ALIGN_LEFT);
+#endif
+ cc_pic->setColorBody(COL_MENUCONTENT_PLUS_0);
+
+ //get picture size
+ int w_pic = 0, h_pic = 0;
+ cc_pic->getSize(&w_pic, &h_pic);
+ printf("FIXME! cc_pic->getSize(&w_pic, &h_pic); *** w_pic = %i, h_pic = %i\n",w_pic, h_pic);
+ //the Fix
+ w_pic = 0;
+ h_pic = 0;
+ extern CPictureViewer * g_PicViewer;
+ g_PicViewer->getSize(posterfile.c_str(), &w_pic, &h_pic);
+ printf("THE FIX g_PicViewer->getSize(posterfile.c_str(), &w_pic, &h_pic); *** w_pic = %i, h_pic = %i\n",w_pic, h_pic);
+
+
+ //add poster item to window object
+ cc_win->addWindowItem(cc_pic);
+
+ //rating
+ print_buffer = "imdbRating";
+ getIMDbElement(print_buffer);
+
+ pg_value = print_buffer;
+ if(print_buffer == "N/A"){
+ pg_value = "1";
+ print_buffer = "Keine Bewertung\n";
+ }
+ else
+ print_buffer += "/10\n";
+
+ size_t pos = pg_value.find_first_of(",.");
+ if(pos!= std::string::npos)
+ pg_value.replace(pos,1,""); // change 8,1 or 8.1 to 81
+
+ //get IMDb text data
+ getIMDbData(print_buffer);
+
+ left_offset += w_pic+ (w_pic == 0 ? 0 : 30);
+
+ //create starbar item
+ CProgressBar *cc_starbar = new CProgressBar();
+ cc_starbar->setProgress(left_offset, item_top, w_starbar, h_starbar, atoi(pg_value.c_str()), 100);
+ cc_starbar->setType(CProgressBar::PB_STARBAR);
+ cc_starbar->setFrameThickness(0);
+
+ //add starbar item to window body object
+ cc_win->addWindowItem(cc_starbar);
+
+ item_top += h_starbar;
+ int h_txt = h_body- v_offset- h_imdbtitle- fontheight- h_starbar;
+
+ //create imdbtext item
+ if (cc_txt == NULL)
+ cc_txt = new CComponentsText();
+ cc_txt->setDimensionsAll(left_offset, item_top, w_body-left_offset, h_txt);
+ cc_txt->setText(print_buffer, CTextBox::TOP | CTextBox::SCROLL, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
+ //cc_imdbtext->setColorBody(COL_MENUCONTENTSELECTED_PLUS_0); /*display text body*/
+
+ //add imdbtext item to window body object
+ cc_win->addWindowItem(cc_txt);
+
+ //create button items
+ CComponentsButtonGreen *cc_button_gn = new CComponentsButtonGreen(btn_start, 0, btn_width, btn_height, "Bild speichern",
+ /*parent*/ NULL,
+ /*selected*/ false,
+ /*enabled*/ true,
+ /*has_shadow*/ false,
+ /*color_frame*/ winfooter->getColorBody(),
+ /*color_body*/ winfooter->getColorBody(),
+ /*color_shadow*/ COL_MENUCONTENTDARK_PLUS_0);
+ cc_button_gn->doPaintBg(false);
+ cc_button_gn->setButtonTextColor(COL_INFOBAR_SHADOW_TEXT);
+ cc_button_gn->setColBodyGradient(CC_COLGRAD_OFF);
+ cc_button_gn->setFrameThickness(0);
+
+ //add button object to window footer
+ winfooter->addCCItem(cc_button_gn);
+
+ cc_win->paint();
+
+ bigFonts(false);
+}
+
+void CIMDB::bigFonts(bool on)
+{
+ if (g_settings.bigFonts)
+ {
+ if (on)
+ g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR));
+ else
+ g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIG_FONT_FAKTOR));
+ }
+}
diff --git a/src/gui/imdb.h b/src/gui/imdb.h
new file mode 100644
index 000000000..164215ba4
--- /dev/null
+++ b/src/gui/imdb.h
@@ -0,0 +1,82 @@
+/*
+ imdb
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 __imdb__
+#define __imdb__
+
+#include
+
+class CIMDB
+{
+ public:
+ CIMDB();
+ ~CIMDB();
+ static CIMDB* getInstance();
+
+ CFrameBuffer *frameBuffer;
+ std::string surl;
+ std::string soutfile;
+ std::string IMDbAPI;
+ std::string posterfile;
+ std::string stars_bg;
+ std::string stars;
+
+ int getIMDb(const std::string& epgTitle);
+ std::string getFilename(CZapitChannel * channel, uint64_t id);
+ void StringReplace(std::string &str, const std::string search, const std::string rstr);
+ void cleanup();
+
+ void getIMDbData(std::string& txt);
+
+ void hideWindow(bool keep_active = false);
+ void showIMDbWindow(const std::string title);
+ void showTextWindow(const std::string title, const std::string txt);
+ void scroll(bool scrollDown);
+ bool isActive() { return imdb_activ; };
+
+ virtual void getIMDbElement(std::string& element) { element = m[element]; };
+
+ private:
+ int acc;
+ std::string IMDburl;
+ std::string googleIMDb(std::string searchStr);
+ std::string utf82url(std::string s);
+ std::string parseString(std::string search1, std::string search2, std::string str);
+ std::string parseFile(std::string search1, std::string search2, const char* file, std::string firstline="", int line_offset=0);
+ std::map m;
+
+ CComponentsWindow *cc_win;
+ CComponentsText *cc_txt;
+
+ int item_top, fontheight;
+ int h_body, w_body, h_offset, v_offset;
+ int h_footer;
+ int btn_start, btn_width, btn_height;
+ bool imdb_activ;
+ void initFrame();
+ void initMap(std::map& my);
+ void bigFonts(bool on);
+};
+
+#endif
diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp
index 79df911fd..bed3df55b 100644
--- a/src/gui/info_menue.cpp
+++ b/src/gui/info_menue.cpp
@@ -34,14 +34,16 @@
#include
#include
+#include //NI
+#include //NI
#include
-#include
+#include //NI
#include
#include
-
#if 0
#include
#endif
+#include //NI
#include
#include "gui/cam_menu.h"
@@ -50,20 +52,32 @@ extern CCAMMenuHandler * g_CamHandler;
CInfoMenu::CInfoMenu()
{
- width = 40;
+ width = 35; //NI
}
CInfoMenu::~CInfoMenu()
{
}
-int CInfoMenu::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
+int CInfoMenu::exec(CMenuTarget* parent, const std::string &actionKey) //NI
{
int res = menu_return::RETURN_REPAINT;
if (parent != NULL)
parent->hide();
+ //NI
+ if (actionKey == "info")
+ {
+ char str[1024];
+ sprintf(str, "cs_get_revision(): 0x%02X\n", cs_get_revision());
+#ifdef BOXMODEL_APOLLO
+ sprintf(str, "%scs_get_chip_type(): 0x%04X\n", str, cs_get_chip_type());
+#endif
+ ShowMsg(LOCALE_MESSAGEBOX_INFO, str, CMessageBox::mbrBack, CMessageBox::mbBack);
+ return res;
+ }
+
res = showMenu();
return res;
@@ -72,12 +86,13 @@ int CInfoMenu::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
int CInfoMenu::showMenu()
{
CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO, width, MN_WIDGET_ID_INFOMENUE);
+ info->addKey(CRCInput::RC_info, this, "info"); //NI
- CImageInfo imageinfo;
+ CImageInfoNI imageinfo; //NI
CDBoxInfoWidget boxinfo;
+ CHDDInfoMenu hddinfo; //NI
CStreamInfo2 streaminfo;
-
info->addIntroItems();
CMenuForwarder * mf = new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, &imageinfo, NULL, CRCInput::RC_red);
mf->setHint(NEUTRINO_ICON_HINT_IMAGEINFO, LOCALE_MENU_HINT_IMAGEINFO);
@@ -98,12 +113,17 @@ int CInfoMenu::showMenu()
info->addItem(mf);
#endif
- if (g_settings.easymenu) {
+ if (g_settings.easymenu) { //NI todo (remove blue button, we use it!)
mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler, NULL, CRCInput::RC_blue);
mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI);
info->addItem(mf);
}
+ //NI
+ mf = new CMenuForwarder(LOCALE_HDD_INFO_HEAD, true, NULL, &hddinfo, NULL, CRCInput::RC_blue);
+ mf->setHint(NEUTRINO_ICON_HINT_HDD_INFO, LOCALE_MENU_HINT_HDD_INFO);
+ info->addItem(mf);
+
//add I_TYPE_INFORMATION plugins
info->integratePlugins(CPlugins::I_TYPE_INFORMATION, 1);
diff --git a/src/gui/infoicons.cpp b/src/gui/infoicons.cpp
new file mode 100644
index 000000000..19a6812ec
--- /dev/null
+++ b/src/gui/infoicons.cpp
@@ -0,0 +1,331 @@
+/*
+ infoicons
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 "infoicons.h"
+
+#define STARTUPREFRESH 3
+
+typedef struct icon_data_t
+{
+ int last_stat;
+ int sizeW;
+ int sizeH;
+ int space;
+ const char * name;
+ const char * flag;
+} icon_data_struct;
+
+static icon_data_t icon[MODE_ICONS_NR_OF_ENTRIES]=
+{
+ {-1, 0, 0, 0, "info0", ""},
+ {-1, 0, 0, 2, "info1", ""},
+ {-1, 0, 0, 2, "info2", ""},
+ {-1, 0, 0, 2, "info3", ""},
+ {-1, 0, 0, 2, "info4", ""},
+ {-1, 0, 0, 2, "info5", ""},
+ {-1, 0, 0, 2, "info6", ""},
+ {-1, 0, 0, 2, "info7", ""}
+};
+
+CInfoIcons::CInfoIcons()
+{
+ frameBuffer = CFrameBuffer::getInstance();
+
+ x = 0;
+ y = 0;
+ width = 0;
+ height = 0;
+ offset = 0;
+ start_i = 0;
+ m_entries = MODE_ICONS_NR_OF_ENTRIES;
+ popup = 0;
+
+ thrTimer = 0;
+ status = false;
+
+ Init();
+}
+
+CInfoIcons::~CInfoIcons()
+{
+ if(thrTimer)
+ pthread_cancel(thrTimer);
+ thrTimer = 0;
+}
+
+CInfoIcons* CInfoIcons::getInstance()
+{
+ static CInfoIcons* InfoIcons = NULL;
+ if(!InfoIcons)
+ InfoIcons = new CInfoIcons();
+ return InfoIcons;
+}
+
+void CInfoIcons::Init()
+{
+ std::ostringstream buf;
+
+ x = frameBuffer->getScreenX() + 10;
+ y = frameBuffer->getScreenY();
+ offset = 10;
+
+ int icons_width = 0;
+ int icons_height = 0;
+
+ for (int i=0; i < m_entries; i++)
+ {
+ int icon_sizeW = 0;
+ int icon_sizeH = 0;
+ buf.str("");
+ buf << ICONSDIR << "/" << icon[i].name << "_on.png";
+ // we assume the _off-partner exist and has same dimensions
+ if (access(buf.str().c_str(), F_OK) == 0) {
+ buf.str("");
+ buf << icon[i].name << "_on";
+ frameBuffer->getIconSize(buf.str().c_str(), &icon_sizeW, &icon_sizeH);
+ }
+
+ if (icon_sizeW && icon_sizeH)
+ {
+ icons_width += icon[i].space;
+ icons_width += icon_sizeW;
+ icons_height = std::max(icons_height, icon_sizeH);
+ icon[i].sizeW = icon_sizeW;
+ icon[i].sizeH = icon_sizeH;
+ icon[i].flag = g_settings.mode_icons_flag[i].c_str();
+ icon[i].last_stat = file_exists(icon[i].flag);
+ }
+ else
+ {
+ m_entries = i;
+ break;
+ }
+ }
+
+ width = icons_width + 2*offset;
+ height = icons_height + 2*offset;
+
+ printf("CInfoIcons::Init() reports %i entries\n",m_entries);
+}
+
+void CInfoIcons::paintBackground()
+{
+ if (g_settings.mode_icons_background)
+ {
+ frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, height, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_SMALL);
+ frameBuffer->paintBoxRel(x, y, width, height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL);
+ }
+ else
+ {
+ frameBuffer->paintBackgroundBoxRel(x, y, width, height);
+ }
+}
+
+void CInfoIcons::paintIcons(bool first)
+{
+ std::ostringstream buf;
+ bool reload = false;
+ int startx = x + offset;
+ int starty = 0;
+ popup = (g_settings.mode_icons_skin == INFOICONS_POPUP) ? 1 : 0;
+
+ if(first)
+ {
+ if(!popup)
+ {
+ paintBackground();
+ reload = true;
+ }
+ else
+ {
+ FILE *fh=NULL;
+ if ((fh = fopen("/var/etc/infoicons","r"))!=NULL)
+ {
+ int i = 0;
+ int c;
+
+ while ((c = fgetc(fh)) != EOF && i < MODE_ICONS_NR_OF_ENTRIES)
+ {
+ if(c=='1')
+ icon[i].last_stat = 1;
+ else
+ icon[i].last_stat = 0;
+ i++;
+ }
+ fclose(fh);
+ unlink("/var/etc/infoicons");
+ }
+ }
+ }
+
+ if(!popup)
+ {
+ //FIXME check for reload while startup
+ if (!reload && (start_i < STARTUPREFRESH)) {
+ start_i++;
+ paintBackground();
+ reload = true;
+ }
+ }
+
+ //check for reload
+ if(!reload)
+ {
+ for (int i=0; i < m_entries; i++)
+ {
+ if (file_exists(icon[i].flag) != icon[i].last_stat)
+ {
+ printf("CInfoIcons::paintIcons: %s status change: %d ==> %d\n",icon[i].flag, icon[i].last_stat, file_exists(icon[i].flag));
+ reload = true;
+ break;
+ }
+ }
+ }
+
+ if(reload)
+ {
+ if(popup)
+ paintBackground();
+
+ for (int i=0; i < m_entries; i++)
+ {
+ startx += icon[i].space;
+ starty = y + ((height - icon[i].sizeH) / 2);
+
+ buf.str("");
+ if (file_exists(icon[i].flag))
+ {
+ buf << icon[i].name << "_on";
+ icon[i].last_stat = 1;
+ }
+ else
+ {
+ buf << icon[i].name << "_off";
+ icon[i].last_stat = 0;
+ }
+
+ //printf("CInfoIcons::paintIcons: %s\n",buf);
+ frameBuffer->paintIcon(buf.str().c_str(), startx, starty);
+
+ startx += icon[i].sizeW;
+ }
+ }
+}
+
+void CInfoIcons::hideIcons()
+{
+ frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET);
+}
+
+void* CInfoIcons::TimerProc(void *arg)
+{
+ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
+ pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS,0);
+
+ CInfoIcons *InfoIcons = (CInfoIcons*) arg;
+
+ InfoIcons->paintIcons(true);
+ while(1) {
+ sleep(5);
+ InfoIcons->paintIcons(false);
+ }
+ return 0;
+}
+
+void CInfoIcons::StartIcons(bool msg)
+{
+ if(!thrTimer) {
+ printf("CInfoIcons::StartIcons(%d)\n",msg);
+ pthread_create (&thrTimer, NULL, TimerProc, (void*) this) ;
+ pthread_detach(thrTimer);
+ status = true;
+
+ if(msg && popup)
+ ShowHint(LOCALE_MESSAGEBOX_INFO,g_Locale->getText(LOCALE_INFOICONS_MSG_START), 400, 3);
+ }
+}
+
+void CInfoIcons::StopIcons(bool msg)
+{
+ if(thrTimer) {
+ printf("CInfoIcons::StopIcons(%d)\n",msg);
+ pthread_cancel(thrTimer);
+ thrTimer = 0;
+ hideIcons();
+ status = false;
+
+ if(msg && popup)
+ ShowHint(LOCALE_MESSAGEBOX_INFO,g_Locale->getText(LOCALE_INFOICONS_MSG_STOP), 400, 3);
+ }
+}
+
+//switching Infoicons on or off depends of current displayed or not
+void CInfoIcons::switchInfoIconsOnOff()
+{
+ if(g_settings.mode_icons) {
+ StopIcons(true);
+ g_settings.mode_icons=false;
+ } else {
+ StartIcons(true);
+ g_settings.mode_icons=true;
+ }
+}
+
+void CInfoIcons::enableInfoIcons(bool enable)
+{
+ if (g_settings.mode_icons) {
+ if (enable)
+ StartIcons();
+ else
+ StopIcons();
+ }
+}
+
+void CInfoIcons::saveIconstate()
+{
+ std::ofstream file("/var/etc/infoicons");
+
+ if (file.is_open())
+ {
+ for (int i=0; i < m_entries; i++) {
+ file << icon[i].last_stat;
+ }
+ file.close();
+ }
+}
diff --git a/src/gui/infoicons.h b/src/gui/infoicons.h
new file mode 100644
index 000000000..849ea57c0
--- /dev/null
+++ b/src/gui/infoicons.h
@@ -0,0 +1,74 @@
+/*
+ infoicons
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 __infoicons__
+#define __infoicons__
+
+#include
+#include
+#include
+
+#include "gui/color.h"
+
+#include
+
+enum INFOICONS
+{
+ INFOICONS_STATIC = 0,
+ INFOICONS_INFOVIEWER = 1,
+ INFOICONS_POPUP = 2
+};
+
+class CInfoIcons
+{
+ private:
+ CFrameBuffer * frameBuffer;
+
+ pthread_t thrTimer;
+ int x, y, width, height, offset;
+ int start_i, m_entries, popup;
+ bool status;
+ static void CleanUpProc(void* arg);
+ static void* TimerProc(void *arg);
+
+ void Init();
+ void paintBackground();
+
+ public:
+ CInfoIcons();
+ ~CInfoIcons();
+ static CInfoIcons* getInstance();
+
+ void paintIcons(bool first);
+ void hideIcons();
+ void StartIcons(bool msg = false);
+ void StopIcons(bool msg = false);
+ void enableInfoIcons(bool enable);
+ void switchInfoIconsOnOff();
+ void saveIconstate();
+
+ bool getStatus(void) { return status; }
+};
+
+#endif
diff --git a/src/gui/infoicons_setup.cpp b/src/gui/infoicons_setup.cpp
new file mode 100644
index 000000000..e6f35e904
--- /dev/null
+++ b/src/gui/infoicons_setup.cpp
@@ -0,0 +1,215 @@
+/*
+ infoicons_setup
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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
+extern CInfoIcons *InfoIcons; /* neutrino.cpp */
+
+typedef struct menu_data_t
+{
+ neutrino_locale_t caption;
+ neutrino_locale_t caption_hint;
+ const char * action;
+} menu_data_struct;
+
+const menu_data_t menu_settings[MODE_ICONS_NR_OF_ENTRIES]=
+{
+ {LOCALE_INFOICONS_FLAG_NAME0, LOCALE_MENU_HINT_INFOICONS_FLAG_NAME0, "del_flag0"},
+ {LOCALE_INFOICONS_FLAG_NAME1, LOCALE_MENU_HINT_INFOICONS_FLAG_NAME1, "del_flag1"},
+ {LOCALE_INFOICONS_FLAG_NAME2, LOCALE_MENU_HINT_INFOICONS_FLAG_NAME2, "del_flag2"},
+ {LOCALE_INFOICONS_FLAG_NAME3, LOCALE_MENU_HINT_INFOICONS_FLAG_NAME3, "del_flag3"},
+ {LOCALE_INFOICONS_FLAG_NAME4, LOCALE_MENU_HINT_INFOICONS_FLAG_NAME4, "del_flag4"},
+ {LOCALE_INFOICONS_FLAG_NAME5, LOCALE_MENU_HINT_INFOICONS_FLAG_NAME5, "del_flag5"},
+ {LOCALE_INFOICONS_FLAG_NAME6, LOCALE_MENU_HINT_INFOICONS_FLAG_NAME6, "del_flag6"},
+ {LOCALE_INFOICONS_FLAG_NAME7, LOCALE_MENU_HINT_INFOICONS_FLAG_NAME7, "del_flag7"}
+};
+
+#define OPTIONS_INFOICONS_MODE_OPTION_COUNT 3
+const CMenuOptionChooser::keyval OPTIONS_INFOICONS_MODE_OPTIONS[OPTIONS_INFOICONS_MODE_OPTION_COUNT] =
+{
+ { INFOICONS_STATIC, LOCALE_INFOICONS_STATIC },
+ { INFOICONS_INFOVIEWER, LOCALE_INFOICONS_INFOVIEWER },
+ { INFOICONS_POPUP, LOCALE_INFOICONS_POPUP }
+};
+
+CInfoIconsSetup::CInfoIconsSetup()
+{
+ width = 40;
+}
+
+CInfoIconsSetup::~CInfoIconsSetup()
+{
+}
+
+int CInfoIconsSetup::exec(CMenuTarget* parent, const std::string &actionKey)
+{
+ std::string str;
+ int res = menu_return::RETURN_REPAINT;
+
+
+ if(parent != NULL)
+ parent->hide();
+
+ if (actionKey.empty())
+ {
+ res = menu();
+ }
+ else if(actionKey.substr(0,7)=="del_all")
+ {
+ for(int i=0 ; i < MODE_ICONS_NR_OF_ENTRIES; i++)
+ {
+ remove(g_settings.mode_icons_flag[i].c_str());
+ }
+ ShowHint(LOCALE_INFOICONS_FLAG_DEL_HEAD, g_Locale->getText(LOCALE_INFOICONS_FLAG_DELALL), 450,3);
+ res = menu_return::RETURN_EXIT;
+ }
+ else if(actionKey.substr(0,8)=="del_flag")
+ {
+ int i = atoi(actionKey.substr(8,1).c_str());
+ remove(g_settings.mode_icons_flag[i].c_str());
+ ShowHint(LOCALE_INFOICONS_FLAG_DEL_HEAD, g_Locale->getText(LOCALE_INFOICONS_FLAG_DEL), 450,3);
+ res = menu_return::RETURN_EXIT;
+ }
+ else if(actionKey.substr(0,18) == "infoicons_switch") {
+ InfoIcons->switchInfoIconsOnOff();
+ res = menu_return::RETURN_EXIT_ALL;
+ }
+
+ return res;
+}
+
+bool CInfoIconsSetup::changeNotify(const neutrino_locale_t OptionName, void *data)
+{
+ int val = 0;
+ if(data)
+ val = (*(int *)data);
+
+ if(ARE_LOCALES_EQUAL(OptionName, LOCALE_INFOICONS_SKIN))
+ {
+ if(val == INFOICONS_INFOVIEWER)
+ oj_modeicon->setActive(false);
+ else
+ oj_modeicon->setActive(true);
+ }
+ else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_INFOICONS_MODEICON))
+ {
+ if(val == 0) {
+ oj_skin->setActive(true);
+ printf("CInfoIconsSetup::changeNotify: stop InfoIcons\n");
+ }
+ else {
+ oj_skin->setActive(false);
+ printf("CInfoIconsSetup::changeNotify: start InfoIcons\n");
+ }
+ }
+
+ return true;
+}
+
+int CInfoIconsSetup::menu()
+{
+ int shortcut = 1;
+ int shortcut_delflag = 0;
+ int shortcut_flagname = 0;
+
+ CMenuWidget* infoiconsMenu = new CMenuWidget(LOCALE_INFOICONS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_INFOICONS);
+ infoiconsMenu->addIntroItems();
+
+ //FIXME if Iconbar is active, set selected from LOCALE_INFOICONS_SKIN to LOCALE_INFOICONS_MODEICON
+ if(g_settings.mode_icons && (infoiconsMenu->getSelected() == 4))
+ infoiconsMenu->setSelected(5);
+
+ oj_skin = new CMenuOptionChooser(LOCALE_INFOICONS_SKIN, &g_settings.mode_icons_skin, OPTIONS_INFOICONS_MODE_OPTIONS, OPTIONS_INFOICONS_MODE_OPTION_COUNT, !g_settings.mode_icons, this, CRCInput::convertDigitToKey(shortcut++));
+ oj_skin->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INFOICONS_SKIN);
+ infoiconsMenu->addItem(oj_skin);
+
+ oj_modeicon = new CMenuOptionChooser(LOCALE_INFOICONS_MODEICON, &g_settings.mode_icons, OPTIONS_START0_STOP1_OPTIONS, OPTIONS_START0_STOP1_OPTION_COUNT, g_settings.mode_icons_skin != INFOICONS_INFOVIEWER, this, CRCInput::convertDigitToKey(shortcut++));
+ oj_modeicon->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INFOICONS_MODEICON);
+ infoiconsMenu->addItem(oj_modeicon);
+
+ infoiconsMenu->addItem(GenericMenuSeparatorLine);
+
+ CMenuWidget* delFlagMenu = new CMenuWidget(LOCALE_INFOICONS_MODEICON, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_INFOICONS_DELFLAG);
+ delFlagMenu->addIntroItems(LOCALE_INFOICONS_FLAG_DEL_HEAD);
+
+ CMenuForwarder * mf = new CMenuForwarder(LOCALE_INFOICONS_FLAG_ALL, true, NULL, this , "del_all", CRCInput::RC_red);
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INFOICONS_FLAG_ALL);
+ delFlagMenu->addItem(mf);
+
+ for(int i=0 ; i < MODE_ICONS_NR_OF_ENTRIES; i++)
+ {
+ mf = new CMenuForwarder(menu_settings[i].caption, file_exists(g_settings.mode_icons_flag[i]), NULL, this , menu_settings[i].action, CRCInput::convertDigitToKey(shortcut_delflag++));
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, menu_settings[i].caption_hint);
+ delFlagMenu->addItem(mf);
+ }
+
+ mf = new CMenuForwarder(LOCALE_INFOICONS_FLAG_DEL_HEAD, true, NULL, delFlagMenu, "", CRCInput::convertDigitToKey(shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INFOICONS_FLAG_DEL_HEAD);
+ infoiconsMenu->addItem(mf);
+
+ for(int i=0 ; i < MODE_ICONS_NR_OF_ENTRIES; i++) {
+ flagchooser[i] = new CStringInputSMS(menu_settings[i].caption, &g_settings.mode_icons_flag[i], 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE,"abcdefghijklmnopqrstuvwxyz0123456789-_.:/ ");
+ }
+
+ CMenuWidget* flagMenu = new CMenuWidget(LOCALE_INFOICONS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_INFOICONS_SETFLAG);
+ flagMenu->addIntroItems(LOCALE_INFOICONS_FLAG_HEAD);
+
+ for(int i=0 ; i < MODE_ICONS_NR_OF_ENTRIES; i++)
+ {
+ mforwarder[i] = new CMenuForwarder(menu_settings[i].caption , true , g_settings.mode_icons_flag[i], flagchooser[i], "", CRCInput::convertDigitToKey(shortcut_flagname++));
+ mforwarder[i]->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, menu_settings[i].caption_hint);
+ flagMenu->addItem(mforwarder[i]);
+ }
+
+ mf = new CMenuForwarder(LOCALE_INFOICONS_FLAG_HEAD, true, NULL, flagMenu, "", CRCInput::convertDigitToKey(shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INFOICONS_FLAG_HEAD);
+ infoiconsMenu->addItem(mf);
+
+ infoiconsMenu->addItem(GenericMenuSeparatorLine);
+
+ CMenuOptionChooser *mc = new CMenuOptionChooser(LOCALE_INFOICONS_BACKGROUND, &g_settings.mode_icons_background, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::convertDigitToKey(shortcut++));
+ mc->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INFOICONS_BACKGROUND);
+ infoiconsMenu->addItem(mc);
+
+ int res = infoiconsMenu->exec(NULL,"");
+ infoiconsMenu->hide();
+ delete infoiconsMenu;
+ delete delFlagMenu;
+ delete flagMenu;
+ return res;
+}
diff --git a/src/gui/infoicons_setup.h b/src/gui/infoicons_setup.h
new file mode 100644
index 000000000..b09be654f
--- /dev/null
+++ b/src/gui/infoicons_setup.h
@@ -0,0 +1,50 @@
+/*
+ infoicons_setup
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 __infoicons_setup__
+#define __infoicons_setup__
+
+#include
+#include
+#include
+
+class CInfoIconsSetup : public CMenuTarget, CChangeObserver
+{
+ private:
+ int menu();
+ CStringInputSMS * flagchooser[MODE_ICONS_NR_OF_ENTRIES];
+ CMenuForwarder * mforwarder[MODE_ICONS_NR_OF_ENTRIES];
+ CMenuOptionChooser * oj_modeicon, * oj_skin;
+
+ protected:
+ int width;
+
+ public:
+ CInfoIconsSetup();
+ ~CInfoIconsSetup();
+ int exec(CMenuTarget* parent, const std::string & actionKey);
+ virtual bool changeNotify(const neutrino_locale_t OptionName, void *data);
+};
+
+#endif
diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp
index f0f52151c..4cf390af8 100644
--- a/src/gui/infoviewer.cpp
+++ b/src/gui/infoviewer.cpp
@@ -49,6 +49,8 @@
#include
#include
#include
+#include
+#include
#include
#include
@@ -75,6 +77,13 @@
#include
#include
+//NI
+#include
+
+//NI InfoIcons
+#include "gui/infoicons.h"
+extern CInfoIcons *InfoIcons; /* neutrino.cpp */
+
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
extern CBouquetList * bouquetList; /* neutrino.cpp */
extern CPictureViewer * g_PicViewer;
@@ -102,6 +111,9 @@ CInfoViewer::CInfoViewer ()
clock = NULL;
frameBuffer = CFrameBuffer::getInstance();
infoViewerBB = CInfoViewerBB::getInstance();
+
+ ecmInfoBox = NULL; //NI
+ md5_ecmInfo = "0"; //NI
InfoHeightY = 0;
ButtonWidth = 0;
rt_dx = 0;
@@ -217,6 +229,11 @@ void CInfoViewer::start ()
initClock();
time_height = max(ChanHeight / 2, clock->getHeight());
time_width = clock->getWidth();
+
+ //NI
+ analogclock_offset = !g_settings.infobar_analogclock ? 0 : 10 ;
+ analogclock_size = !g_settings.infobar_analogclock ? 0 : InfoHeightY - 2*analogclock_offset;
+ clock->setXPos(clock->getXPos() - analogclock_offset - analogclock_size);
}
void CInfoViewer::ResetPB()
@@ -342,7 +359,7 @@ void CInfoViewer::showRecordIcon (const bool show)
{
if (rec == NULL){ //TODO: full refactoring of this icon handler
rec = new CComponentsShapeSquare(box_x, box_y , box_w, box_h, NULL, CC_SHADOW_ON, COL_RED, COL_INFOBAR_PLUS_0);
- rec->setFrameThickness(2);
+ rec->setFrameThickness(0); //NI
rec->setShadowWidth(SHADOW_OFFSET/2);
rec->setCorner(RADIUS_MIN, CORNER_ALL);
}
@@ -589,8 +606,14 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe
paintBackground(COL_INFOBAR_PLUS_0);
bool show_dot = true;
+ //NI
if (timeset)
- clock->paint(CC_SAVE_SCREEN_NO);
+ {
+ if (g_settings.infobar_analogclock)
+ showAnalogClock(BoxEndX - analogclock_offset - analogclock_size/2, BoxEndY - analogclock_offset - analogclock_size/2, analogclock_size/2);
+ else
+ clock->paint(CC_SAVE_SCREEN_NO);
+ }
showRecordIcon (show_dot);
show_dot = !show_dot;
@@ -767,11 +790,21 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
paintBackground(col_NumBox);
bool show_dot = true;
+ //NI
if (timeset)
- clock->paint(CC_SAVE_SCREEN_NO);
+ {
+ if (g_settings.infobar_analogclock)
+ showAnalogClock(BoxEndX - analogclock_offset - analogclock_size/2, BoxEndY - analogclock_offset - analogclock_size/2, analogclock_size/2);
+ else
+ clock->paint(CC_SAVE_SCREEN_NO);
+ }
showRecordIcon (show_dot);
show_dot = !show_dot;
+ //NI InfoIcons
+ if (!g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_INFOVIEWER)
+ InfoIcons->paintIcons(true);
+
if (showButtonBar) {
infoViewerBB->paintshowButtonBar();
}
@@ -1014,6 +1047,21 @@ void CInfoViewer::loop(bool show_dot)
showLivestreamInfo();
+ //NI
+ if (msg == CRCInput::RC_help) {
+ if (g_settings.show_ecm_pos) {
+ if (g_settings.show_ecm) {
+ g_settings.show_ecm = 0;
+ ecmInfoBox_hide();
+ } else {
+ g_settings.show_ecm = 1;
+ infoViewerBB->showIcon_CA_Status(0);
+ }
+ }
+ g_RCInput->clearRCMsg();
+ setInfobarTimeout();
+ continue;
+ } else
#ifdef ENABLE_PIP
if ((msg == (neutrino_msg_t) g_settings.key_pip_close) ||
(msg == (neutrino_msg_t) g_settings.key_pip_setup) ||
@@ -1028,7 +1076,7 @@ void CInfoViewer::loop(bool show_dot)
} else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) {
g_RCInput->postMsg (msg, 0);
res = messages_return::cancel_info;
- } else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) {
+ } else if (msg == CRCInput::RC_info) { //NI
g_RCInput->postMsg (NeutrinoMessages::SHOW_EPG, 0);
res = messages_return::cancel_info;
} else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) {
@@ -1065,8 +1113,14 @@ void CInfoViewer::loop(bool show_dot)
hideIt = true;
} else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == sec_timer_id)) {
showSNR ();
+ //NI
if (timeset)
- clock->paint(CC_SAVE_SCREEN_NO);
+ {
+ if (g_settings.infobar_analogclock)
+ showAnalogClock(BoxEndX - analogclock_offset - analogclock_size/2, BoxEndY - analogclock_offset - analogclock_size/2, analogclock_size/2);
+ else
+ clock->paint(CC_SAVE_SCREEN_NO);
+ }
showRecordIcon (show_dot);
show_dot = !show_dot;
showInfoFile();
@@ -1075,6 +1129,16 @@ void CInfoViewer::loop(bool show_dot)
infoViewerBB->showIcon_16_9();
//infoViewerBB->showIcon_CA_Status(0);
+ //NI
+ if(file_exists("/tmp/ecm.info"))
+ {
+ std::string md5_tmp = filehash((char *)"/tmp/ecm.info");
+ //printf("CInfoViewer::loop() ecm.info.tmp = %s\nCInfoViewer::loop() ecm.info = %s\n",md5_ecmInfo.c_str(),md5_tmp.c_str());
+ if(md5_ecmInfo != md5_tmp) {
+ puts("CInfoViewer::loop() CA reload");
+ infoViewerBB->showIcon_CA_Status(0);
+ }
+ }
infoViewerBB->showIcon_Resolution();
} else if ((msg == NeutrinoMessages::EVT_RECORDMODE) &&
(CMoviePlayerGui::getInstance().timeshift) && (CRecordManager::getInstance()->GetRecordCount() == 1)) {
@@ -1293,6 +1357,11 @@ void CInfoViewer::killRadiotext()
frameBuffer->paintBackgroundBox(rt_x, rt_y, rt_w, rt_h);
rt_x = rt_y = rt_h = rt_w = 0;
CInfoClock::getInstance()->enableInfoClock(true);
+ //NI InfoIcons
+ if (!g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_INFOVIEWER)
+ InfoIcons->paintIcons(true);
+ else
+ InfoIcons->enableInfoIcons(true);
}
void CInfoViewer::showRadiotext()
@@ -1305,6 +1374,7 @@ void CInfoViewer::showRadiotext()
if (g_Radiotext->S_RtOsd) {
CInfoClock::getInstance()->enableInfoClock(false);
+ InfoIcons->enableInfoIcons(false); //NI InfoIcons
// dimensions of radiotext window
int /*yoff = 8,*/ ii = 0;
rt_dx = BoxEndX - BoxStartX;
@@ -1331,6 +1401,10 @@ void CInfoViewer::showRadiotext()
if ((lines) || (g_Radiotext->RT_PTY !=0)) {
sprintf(stext[0], g_Radiotext->RT_PTY == 0 ? "%s %s%s" : "%s (%s)%s", tr("Radiotext"), g_Radiotext->RT_PTY == 0 ? g_Radiotext->RDS_PTYN : g_Radiotext->ptynr2string(g_Radiotext->RT_PTY), ":");
+ //NI InfoIcons
+ if (!g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_INFOVIEWER)
+ InfoIcons->hideIcons();
+
// shadow
frameBuffer->paintBoxRel(rt_x+SHADOW_OFFSET, rt_y+SHADOW_OFFSET, rt_dx, rt_dy, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP);
frameBuffer->paintBoxRel(rt_x, rt_y, rt_dx, rt_dy, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_TOP);
@@ -1709,7 +1783,7 @@ void CInfoViewer::display_Info(const char *current, const char *next,
if (pb_pos > -1)
{
int pb_w = 112;
- int pb_startx = BoxEndX - pb_w - SHADOW_OFFSET;
+ int pb_startx = BoxEndX - pb_w; //NI
int pb_starty = ChanNameY - (pb_h + 10);
int pb_shadow = COL_INFOBAR_SHADOW_PLUS_0;
timescale->enableShadow(!g_settings.infobar_progressbar);
@@ -1717,6 +1791,7 @@ void CInfoViewer::display_Info(const char *current, const char *next,
if(g_settings.infobar_progressbar){
pb_startx = xStart;
pb_w = BoxEndX - 10 - xStart;
+ pb_w -= analogclock_size + analogclock_offset; //NI
pb_shadow = 0;
}
int tmpY = CurrInfoY - height - ChanNameY + header_height -
@@ -1759,7 +1834,9 @@ void CInfoViewer::display_Info(const char *current, const char *next,
if (nextDuration)
nextTimeW = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth(nextDuration)*2;
int currTimeX = BoxEndX - currTimeW - 10;
+ currTimeX -= analogclock_size + analogclock_offset; //NI
int nextTimeX = BoxEndX - nextTimeW - 10;
+ nextTimeX -= analogclock_size + analogclock_offset; //NI
//colored_events init
bool colored_event_C = (g_settings.theme.colored_events_infobar == 1);
@@ -2177,6 +2254,14 @@ void CInfoViewer::killTitle()
g_Radiotext->S_RtOsd = g_Radiotext->haveRadiotext() ? 1 : 0;
killRadiotext();
}
+
+ //NI show ecm.info
+ if (g_settings.show_ecm)
+ ecmInfoBox_hide();
+
+ //NI InfoIcons
+ if (!g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_INFOVIEWER)
+ InfoIcons->hideIcons();
}
showButtonBar = false;
CInfoClock::getInstance()->enableInfoClock();
@@ -2336,6 +2421,50 @@ void CInfoViewer::setUpdateTimer(uint64_t interval)
lcdUpdateTimer = g_RCInput->addTimer(interval, false);
}
+//NI
+void CInfoViewer::showAnalogClock(int posx,int posy,int dia)
+{
+ int ts,tm,th,sx,sy,mx,my,hx,hy;
+ double pi = 3.1415926535897932384626433832795, sAngleInRad, mAngleInRad, mAngleSave, hAngleInRad;
+
+ time_t now = time(0);
+ struct tm *tm_p = localtime(&now);
+
+ ts = tm_p->tm_sec;
+ tm = tm_p->tm_min;
+ th = tm_p->tm_hour;
+
+ sAngleInRad = ((6 * ts) * (2*pi / 360));
+ sAngleInRad -= pi/2;
+
+ sx = int((dia * 0.9 * cos(sAngleInRad)));
+ sy = int((dia * 0.9 * sin(sAngleInRad)));
+
+ mAngleInRad = ((6 * tm) * (2*pi / 360));
+ mAngleSave = mAngleInRad;
+ mAngleInRad -= pi/2;
+
+ mx = int((dia * 0.7 * cos(mAngleInRad)));
+ my = int((dia * 0.7 * sin(mAngleInRad)));
+
+ hAngleInRad = ((30 * th)* (2*pi / 360));
+ hAngleInRad += mAngleSave / 12;
+ hAngleInRad -= pi/2;
+
+ hx = int((dia * 0.6 * cos(hAngleInRad)));
+ hy = int((dia * 0.6 * sin(hAngleInRad)));
+
+ std::string clock_face = ICONSDIR_VAR "/clock_face.png";
+ if (access(clock_face.c_str(), F_OK) != 0)
+ clock_face = ICONSDIR "/clock_face.png";
+
+ g_PicViewer->DisplayImage(clock_face, posx-dia, posy-dia, 2*dia, 2*dia);
+
+ frameBuffer->paintLine(posx,posy,posx+hx,posy+hy,COL_MENUHEAD_TEXT);
+ frameBuffer->paintLine(posx,posy,posx+mx,posy+my,COL_MENUHEAD_TEXT);
+ frameBuffer->paintLine(posx,posy,posx+sx,posy+sy,COL_COLORED_EVENTS_TEXT);
+}
+
#if 0
int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & /*actionkey*/)
{
@@ -2375,3 +2504,82 @@ void CInfoViewer::ResetModules()
delete rec; rec = NULL;
infoViewerBB->ResetModules();
}
+
+//NI
+void CInfoViewer::ecmInfoBox_show(const char * txt, int w, int h, Font * font)
+{
+ if (ecmInfoBox != NULL)
+ ecmInfoBox_hide();
+
+ // manipulate title font
+ int storedSize = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getSize();
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->setSize((int)(font->getSize() * 150 / 100));
+
+ //create new window
+ ecmInfoBox = new CComponentsWindowMax(LOCALE_ECMINFO, NEUTRINO_ICON_INFO);
+
+ //calc available width (width of Infobar)
+ int max_w = BoxEndX - BoxStartX;
+ //calc available height (space between Top and Infobar)
+ int max_h = BoxStartY - frameBuffer->getScreenY() - 2*SHADOW_OFFSET;
+
+ //get window header object
+ CComponentsHeader* winheader = ecmInfoBox->getHeaderObject();
+ int h_header = winheader->getHeight();
+
+ //remove window footer object
+ ecmInfoBox->showFooter(false);
+
+ //set new window dimensions
+ int h_offset = 5;
+ int w_offset = 10;
+ ecmInfoBox->setWidth(min(max_w, w + 2*w_offset));
+ ecmInfoBox->setHeight(min(max_h, h_header + h + 2*h_offset));
+ ecmInfoBox->Refresh();
+
+ //calc window position
+ int pos_x;
+ switch (g_settings.show_ecm_pos) {
+ case 3: // right
+ pos_x = BoxEndX - ecmInfoBox->getWidth();
+ break;
+ case 1: // left
+ pos_x = BoxStartX;
+ break;
+ case 2: // center
+ default:
+ pos_x = frameBuffer->getScreenX() + (max_w/2) - (ecmInfoBox->getWidth()/2);
+ break;
+ }
+
+ int pos_y = frameBuffer->getScreenY() + (max_h/2) - (ecmInfoBox->getHeight()/2);
+ ecmInfoBox->setXPos(pos_x);
+ ecmInfoBox->setYPos(pos_y);
+
+ //get window body object
+ CComponentsForm* winbody = ecmInfoBox->getBodyObject();
+
+ // create textbox object
+ CComponentsText* ecmText = new CComponentsText(0, 0, winbody->getWidth(), winbody->getHeight());
+ ecmText->setTextBorderWidth(w_offset, h_offset);
+ ecmText->setText(txt, CTextBox::TOP | CTextBox::NO_AUTO_LINEBREAK, font);
+ ecmText->setCorner(RADIUS_LARGE, CORNER_BOTTOM);
+
+ // add textbox object to window
+ ecmInfoBox->addWindowItem(ecmText);
+ ecmInfoBox->enableShadow(CC_SHADOW_ON);
+ ecmInfoBox->paint(CC_SAVE_SCREEN_NO);
+
+ // restore title font
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->setSize(storedSize);
+}
+
+//NI
+void CInfoViewer::ecmInfoBox_hide()
+{
+ if (ecmInfoBox != NULL) {
+ ecmInfoBox->kill();
+ delete ecmInfoBox;
+ ecmInfoBox = NULL;
+ }
+}
diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h
index 44465c389..56fac8917 100644
--- a/src/gui/infoviewer.h
+++ b/src/gui/infoviewer.h
@@ -82,6 +82,8 @@ class CInfoViewer
int ChanWidth;
int ChanHeight;
int numbox_offset;
+ int analogclock_size; //NI
+ int analogclock_offset; //NI
CSectionsdClient::CurrentNextInfo info_CurrentNext;
CSectionsdClient::CurrentNextInfo oldinfo;
@@ -125,6 +127,7 @@ class CInfoViewer
const char *nextStart = NULL, const char *nextDuration = NULL,
bool update_current = true, bool update_next = true);
void initClock();
+ void showAnalogClock(int posx,int posy,int dia); //NI
void showRecordIcon(const bool show);
void showIcon_Tuner() const;
@@ -150,6 +153,8 @@ class CInfoViewer
void sendNoEpg(const t_channel_id channel_id);
bool showLivestreamInfo();
+ CComponentsWindowMax *ecmInfoBox; //NI
+
public:
bool chanready;
bool is_visible;
@@ -165,6 +170,11 @@ class CInfoViewer
bool showButtonBar;
bool isVolscale;
+ //NI
+ std::string md5_ecmInfo;
+ void ecmInfoBox_hide();
+ void ecmInfoBox_show(const char * txt, int w, int h, Font * font);
+
CInfoViewer();
~CInfoViewer();
diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp
index 9a68fe310..071152147 100644
--- a/src/gui/infoviewer_bb.cpp
+++ b/src/gui/infoviewer_bb.cpp
@@ -59,6 +59,7 @@
#include
#include
+#include //NI
#include
@@ -103,6 +104,22 @@ void CInfoViewerBB::Init()
fta = true;
minX = 0;
+ //NI init
+ DecEndx = 0;
+ decode = UNKNOWN;
+ camCI = false;
+ int CiSlots = cCA::GetInstance()->GetNumberCISlots();
+ int acc = 0;
+ while (acc < CiSlots && acc < 2) {
+ if (cCA::GetInstance()->ModulePresent(CA_SLOT_TYPE_CI, acc)) {
+ printf("CI: CAM found in Slot %i\n", acc);
+ camCI = true;
+ }
+ else
+ printf("CI: CAM not found\n");
+ acc++;
+ }
+
for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) {
tmp_bbButtonInfoText[i] = "";
bbButtonInfo[i].x = -1;
@@ -475,6 +492,10 @@ void CInfoViewerBB::paintshowButtonBar()
// Buttons
showBBButtons();
+ //NI
+ if (g_settings.infobar_casystem_display < 2)
+ paint_cam_icons();
+
// Icons, starting from right
showIcon_SubT();
showIcon_VTXT();
@@ -734,10 +755,10 @@ void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_o
int py = g_InfoViewer->BoxEndY + (g_settings.infobar_casystem_frame ? 4 : 2); /* hand-crafted, should be automatic */
int px = 0;
static map > icon_map;
- const int icon_space = 10, icon_number = 10;
+ const int icon_space = 10, icon_number = 11; //NI
- static int icon_offset[icon_number] = {0,0,0,0,0,0,0,0,0,0};
- static int icon_sizeW [icon_number] = {0,0,0,0,0,0,0,0,0,0};
+ static int icon_offset[icon_number] = {0,0,0,0,0,0,0,0,0,0,0}; //NI
+ static int icon_sizeW [icon_number] = {0,0,0,0,0,0,0,0,0,0,0}; //NI
static bool init_flag = false;
if (!init_flag) {
@@ -745,6 +766,7 @@ void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_o
int icon_sizeH = 0, index = 0;
map >::const_iterator it;
+ icon_map[0x0000] = std::make_pair(index++,"dec"); //NI
icon_map[0x0E00] = std::make_pair(index++,"powervu");
icon_map[0x4A00] = std::make_pair(index++,"d");
icon_map[0x2600] = std::make_pair(index++,"biss");
@@ -757,7 +779,7 @@ void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_o
icon_map[0x0900] = std::make_pair(index ,"nds");
for (it=icon_map.begin(); it!=icon_map.end(); ++it) {
- snprintf(buf, sizeof(buf), "%s_%s", (*it).second.second, icon);
+ snprintf(buf, sizeof(buf), "%s_%s", (*it).second.second, (*it).second.first==0 ? "na" : "white"); //NI
frameBuffer->getIconSize(buf, &icon_sizeW[(*it).second.first], &icon_sizeH);
}
@@ -785,7 +807,7 @@ void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_o
if ((px >= (endx-8)) || (px <= 0))
printf("#####[%s:%d] Error paint icon %s, px: %d, py: %d, endx: %d, icon_offset: %d\n",
__FUNCTION__, __LINE__, buf, px, py, endx, icon_offset[icon_map[caid].first]);
- else
+ else if (strstr(buf,"dec_white") == 0) //NI
frameBuffer->paintIcon(buf, px, py);
}
}
@@ -802,11 +824,16 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
return;
}
- int caids[] = { 0x900, 0xD00, 0xB00, 0x1800, 0x0500, 0x0100, 0x600, 0x2600, 0x4a00, 0x0E00 };
+ int caids[] = { 0x900, 0xD00, 0xB00, 0x1800, 0x0500, 0x0100, 0x600, 0x2600, 0x4a00, 0x0E00, 0x0000 }; //NI
+ const char *green = "green"; //NI
const char *white = "white";
const char *yellow = "yellow";
int icon_space_offset = 0;
+ //NI
+ const char *dec_icon_name[] = {"na","na","fta","int","card","net"};
+ decode = UNKNOWN;
+
if(!g_InfoViewer->chanready) {
if (g_settings.infobar_casystem_display == 2) {
fta = true;
@@ -838,20 +865,53 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
icon_space_offset = 0;
}
#endif
+ //NI - check ecm.info
+ int acaid = 0;
+ if (File_copy("/tmp/ecm.info", "/tmp/ecm.info.tmp")) {
+ g_InfoViewer->md5_ecmInfo = filehash((char *)"/tmp/ecm.info.tmp");
+ acaid = parse_ecmInfo("/tmp/ecm.info.tmp");
+ }
+ else
+ if(camCI)
+ decode = CARD;
+
+ //NI - map betacrypt to nagra
+ if((acaid & 0xFF00)== 0x1700 && (caids[3]& 0xFF00) == 0x1800)
+ acaid=0x1800;
+
for (int i = 0; i < (int)(sizeof(caids)/sizeof(int)); i++) {
+ //printf("caids[%i] = %X\n",i,caids[i]); //NI
+ bool dcaid = false; //NI
bool found = false;
for(casys_map_iterator_t it = channel->camap.begin(); it != channel->camap.end(); ++it) {
int caid = (*it) & 0xFF00;
if (caid == 0x1700)
caid = 0x0600;
if((found = (caid == caids[i])))
+ {
+ //NI
+ //printf(" ****** caid = %X - acaid = %X ******\n", caid, acaid & 0xFF00);
+ dcaid = ((caid) == (acaid & 0xFF00));
+ fta=false;
+
break;
+ }
}
+ //NI - decode info
+ if(i == (int)(sizeof(caids)/sizeof(int))-1) {
+ paint_ca_icons(caids[i], fta ? "fta" : dec_icon_name[decode], icon_space_offset);
+ continue;
+ }
+
if(g_settings.infobar_casystem_display == 0)
- paint_ca_icons(caids[i], (found ? yellow : white), icon_space_offset);
+ paint_ca_icons(caids[i], (found ? (dcaid ? green : yellow) : white), icon_space_offset); //NI
else if(found)
- paint_ca_icons(caids[i], yellow, icon_space_offset);
+ paint_ca_icons(caids[i], (dcaid ? green : yellow), icon_space_offset); //NI
}
+
+ //NI
+ if (camCI)
+ paint_cam_icons();
}
}
@@ -978,3 +1038,121 @@ void CInfoViewerBB::scrambledCheck(bool force)
scrambledNoSigSave = scrambledNoSig;
}
}
+
+//NI CA Anzeige
+void CInfoViewerBB::paint_cam_icons()
+{
+ std::ostringstream buf;
+ int emu_pic_startx = g_InfoViewer->ChanInfoX + (g_settings.infobar_casystem_frame ? 20 : 10);
+ int py = g_InfoViewer->BoxEndY + (g_settings.infobar_casystem_frame ? 4 : 2);
+ const char *icon_name[] = {"mgcamd","doscam","oscam","osemu","newcs","gbox"};
+ static int icon_space[] = {14,14,14,14,14,14};
+ int icon_sizeH = 0;
+ int icon_sizeW = 0;
+ bool useCI = CCamManager::getInstance()->getUseCI();
+ bool filter_channels = CCamManager::getInstance()->getChannelFilter();
+
+ for (int i=0; i < (int)(sizeof(icon_name)/sizeof(icon_name[0])); i++) {
+ if ( getpidof(icon_name[i]) ) {
+ buf.str("");
+ buf << icon_name[i] << "_green";
+ if(strstr(icon_name[i], "doscam")) {
+ if(camCI && useCI && filter_channels) {
+ buf.str("");
+ buf << icon_name[i] << "_yellow";
+ }
+ }
+ frameBuffer->paintIcon(buf.str().c_str(), emu_pic_startx, py );
+ frameBuffer->getIconSize(buf.str().c_str(), &icon_sizeW, &icon_sizeH);
+ emu_pic_startx += icon_space[i];
+ emu_pic_startx += icon_sizeW;
+ }
+ }
+
+ if (camCI) {
+ if (useCI)
+ frameBuffer->paintIcon("ci+_green", emu_pic_startx, py);
+ else
+ frameBuffer->paintIcon("ci+_grey", emu_pic_startx, py);
+ }
+}
+
+//NI ecm-Info
+int CInfoViewerBB::parse_ecmInfo(const char * file)
+{
+ int acaid = 0;
+ char *buffer;
+ ssize_t read;
+ size_t len;
+ std::string ecm_txt("");
+ FILE *fh;
+ int w = 0;
+ int ecm_width = 0;
+ int ecm_height = 0;
+ Font * ecm_font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_ECMINFO];
+ int font_height = ecm_font->getHeight();
+
+ buffer=NULL;
+ if((fh = fopen(file, "r")))
+ {
+ while ((read = getline(&buffer, &len, fh)) != -1)
+ {
+ if (g_settings.show_ecm)
+ {
+ w = ecm_font->getRenderWidth(buffer);
+ ecm_width = std::max(w, ecm_width);
+ ecm_height += font_height;
+ ecm_txt += buffer;
+ }
+
+ if ( !acaid && strstr(buffer, "0x") )
+ {
+ if(sscanf(buffer, "%*[^9-0]%x", &acaid ) == 1)
+ continue;
+ }
+ else if ( strstr(buffer, "source:") || //mgcamd
+ strstr(buffer, "decode:") || //gbox
+ strstr(buffer, "protocol:") || //doscam or oscam constcw
+ strstr(buffer, "from:")) //oscam
+ {
+ if ( strstr(buffer, "emu") || //mgcamd
+ strstr(buffer, "constcw") || //doscam or oscam constcw
+ strstr(buffer, "Internal")) //gbox
+ {
+ decode = LOCAL;
+ }
+ else if ( strstr(buffer, "slot") || //gbox
+ strstr(buffer, "local") || //oscam
+ strstr(buffer, "com"))
+ {
+ decode = CARD;
+ }
+ else if ( strstr(buffer, "net") || //mgcamd
+ strstr(buffer, "Network") || //gbox
+ strstr(buffer, ".")) //oscam
+ {
+ if ( strstr(buffer, "localhost") || strstr(buffer, "127.0.0.1"))
+ decode = CARD;
+ else
+ decode = REMOTE;
+ }
+ }
+ }
+ fclose(fh);
+ remove("/tmp/ecm.info.tmp");
+ if(buffer)
+ free(buffer);
+ }
+
+ if (g_settings.show_ecm)
+ {
+ if(decode == UNKNOWN || decode == NA || ecm_txt.empty()) {
+ g_InfoViewer->ecmInfoBox_hide();
+ }
+ else {
+ g_InfoViewer->ecmInfoBox_show(ecm_txt.c_str(), ecm_width, ecm_height, ecm_font);
+ }
+ }
+
+ return(acaid);
+}
diff --git a/src/gui/infoviewer_bb.h b/src/gui/infoviewer_bb.h
index 81961a018..e18b098c3 100644
--- a/src/gui/infoviewer_bb.h
+++ b/src/gui/infoviewer_bb.h
@@ -86,6 +86,14 @@ class CInfoViewerBB
bool active;
} bbButtonInfoStruct;
+ //NI
+ enum CAM_DECODE_NUM {UNKNOWN, NA, FTA, LOCAL, CARD, REMOTE};
+ void paint_cam_icons();
+ unsigned short int decode;
+ int DecEndx;
+ int parse_ecmInfo(const char * file);
+ bool camCI;
+
typedef struct
{
int x;
diff --git a/src/gui/lcd4l.cpp b/src/gui/lcd4l.cpp
new file mode 100644
index 000000000..d43abe40b
--- /dev/null
+++ b/src/gui/lcd4l.cpp
@@ -0,0 +1,838 @@
+/*
+ lcd4l
+
+ Copyright (C) 2012 'defans'
+ Homepage: http://www.bluepeercrew.us/
+
+ Copyright (C) 2012-2016 'vanhofen'
+ Homepage: http://www.neutrino-images.de/
+
+ 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 "lcd4l.h"
+
+#ifdef BP
+extern int bc_popup_icon;
+#endif
+
+extern CRemoteControl *g_RemoteControl;
+
+#define LCD_DATADIR "/tmp/lcd/"
+
+#ifdef BP
+#define LCD_ICONSDIR "/var/lcd/icons/"
+#else
+#define LCD_ICONSDIR "/share/lcd/icons/"
+#endif
+#define ICONSEXT ".png"
+
+#define LOGO_DUMMY LCD_ICONSDIR "blank.png"
+
+#define TUNER LCD_DATADIR "tuner"
+#define VOLUME LCD_DATADIR "volume"
+#define MODE_REC LCD_DATADIR "mode_rec"
+#define MODE_TSHIFT LCD_DATADIR "mode_tshift"
+#define MODE_TIMER LCD_DATADIR "mode_timer"
+#define MODE_ECM LCD_DATADIR "mode_ecm"
+#ifdef BP
+#define MODE_NEWS LCD_DATADIR "mode_news"
+#endif
+
+#define SERVICE LCD_DATADIR "service"
+#define CHANNELNR LCD_DATADIR "channelnr"
+#define LOGO LCD_DATADIR "logo"
+#define MODE_LOGO LCD_DATADIR "mode_logo"
+#define LAYOUT LCD_DATADIR "layout"
+
+#define EVENT LCD_DATADIR "event"
+#define PROGRESS LCD_DATADIR "progress"
+#define DURATION LCD_DATADIR "duration"
+#define START LCD_DATADIR "start"
+#define END LCD_DATADIR "end"
+
+#define FLAG_LCD4LINUX "/tmp/.lcd4linux"
+#define PIDFILE "/tmp/lcd4linux.pid"
+
+/* ----------------------------------------------------------------- */
+
+CLCD4l::CLCD4l()
+{
+ thrLCD4l = 0;
+}
+
+CLCD4l::~CLCD4l()
+{
+ if (thrLCD4l)
+ pthread_cancel(thrLCD4l);
+ thrLCD4l = 0;
+}
+
+/* ----------------------------------------------------------------- */
+
+void CLCD4l::InitLCD4l()
+{
+ if (thrLCD4l)
+ {
+ printf("[CLCD4l] %s: initializing\n", __FUNCTION__);
+ Init();
+ }
+}
+
+void CLCD4l::StartLCD4l()
+{
+ if (!thrLCD4l)
+ {
+ printf("[CLCD4l] %s: starting thread\n", __FUNCTION__);
+ pthread_create(&thrLCD4l, NULL, LCD4lProc, (void*) this);
+ pthread_detach(thrLCD4l);
+ }
+}
+
+void CLCD4l::StopLCD4l()
+{
+ if (thrLCD4l)
+ {
+ printf("[CLCD4l] %s: stopping thread\n", __FUNCTION__);
+ pthread_cancel(thrLCD4l);
+ thrLCD4l = 0;
+ }
+}
+
+void CLCD4l::SwitchLCD4l()
+{
+ if (thrLCD4l)
+ StopLCD4l();
+ else
+ StartLCD4l();
+}
+
+int CLCD4l::CreateFile(const char *file, std::string content, bool convert)
+{
+ // returns 0 = ok; 1 = can't create file; -1 = thread not found
+
+ int ret = 0;
+
+ if (thrLCD4l)
+ {
+ if (WriteFile(file, content, convert) == false)
+ ret = 1;
+ }
+ else
+ ret = -1;
+
+ return ret;
+}
+
+int CLCD4l::RemoveFile(const char *file)
+{
+ // returns 0 = ok; 1 = can't remove file;
+
+ int ret = 0;
+
+ if (access(file, F_OK) == 0) {
+ if (unlink(file) != 0)
+ ret = 1;
+ }
+
+ return ret;
+}
+
+/* ----------------------------------------------------------------- */
+
+void CLCD4l::Init()
+{
+ m_ParseID = 0;
+
+ m_Tuner = -1;
+ m_Volume = -1;
+ m_ModeRec = -1;
+ m_ModeTshift = -1;
+ m_ModeTimer = -1;
+ m_ModeEcm = -1;
+#ifdef BP
+ m_ModeNews = -1;
+#endif
+
+ m_Service = "n/a";
+ m_ChannelNr = -1;
+ m_Logo = "n/a";
+ m_ModeLogo = -1;
+
+ m_Layout = "n/a";
+
+ m_Event = "n/a";
+ m_Progress = -1;
+ for (int i = 0; i < (int)sizeof(m_Duration); i++)
+ m_Duration[i] = ' ';
+
+ if (!access(LCD_DATADIR, F_OK) == 0)
+ mkdir(LCD_DATADIR, 0755);
+}
+
+void* CLCD4l::LCD4lProc(void* arg)
+{
+ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, 0);
+ pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
+
+ CLCD4l *PLCD4l = static_cast(arg);
+
+ PLCD4l->Init();
+
+ sleep(5); //please wait !
+
+ static bool FirstRun = true;
+ uint64_t p_ParseID = 0;
+ bool NewParseID = false;
+
+ //printf("[CLCD4l] %s: starting loop\n", __FUNCTION__);
+ while(1)
+ {
+ if ( (!access(PIDFILE, F_OK) == 0) && (!FirstRun) )
+ {
+#ifdef NI
+ if (g_settings.lcd4l_support == 1) // automatic
+ {
+#endif
+ //printf("[CLCD4l] %s: waiting for lcd4linux\n", __FUNCTION__);
+ sleep(10);
+ continue;
+#ifdef NI
+ }
+#endif
+ }
+
+ for (int i = 0; i < 10; i++)
+ {
+ usleep(5 * 100 * 1000); // 0.5 sec
+ NewParseID = PLCD4l->CompareParseID(p_ParseID);
+ if (NewParseID || p_ParseID == MODE_AUDIO)
+ break;
+ }
+
+ //printf("[CLCD4l] %s: m_ParseID: %llx (NewParseID: %d)\n", __FUNCTION__, p_ParseID, NewParseID ? 1 : 0);
+ PLCD4l->ParseInfo(p_ParseID, NewParseID, FirstRun);
+
+ if (FirstRun)
+ {
+ PLCD4l->WriteFile(FLAG_LCD4LINUX);
+ FirstRun = false;
+ }
+ }
+ return 0;
+}
+
+void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
+{
+ int Tuner = 1 + CFEManager::getInstance()->getLiveFE()->getNumber();
+
+ if (m_Tuner != Tuner)
+ {
+ WriteFile(TUNER, Int2String(Tuner));
+ m_Tuner = Tuner;
+ }
+
+ /* ----------------------------------------------------------------- */
+
+ int Volume = g_settings.current_volume;
+
+ if (m_Volume != Volume)
+ {
+ WriteFile(VOLUME, Int2String(Volume));
+ m_Volume = Volume;
+ }
+
+ /* ----------------------------------------------------------------- */
+
+ int ModeRec = 0;
+ int ModeTshift = 0;
+
+ int RecordMode = CRecordManager::getInstance()->GetRecordMode();
+ switch (RecordMode)
+ {
+ case CRecordManager::RECMODE_REC_TSHIFT:
+ ModeRec = 1;
+ ModeTshift = 1;
+ break;
+ case CRecordManager::RECMODE_REC:
+ ModeRec = 1;
+ break;
+ case CRecordManager::RECMODE_TSHIFT:
+ ModeTshift = 1;
+ break;
+ default:
+ break;
+ }
+
+ if (m_ModeRec != ModeRec)
+ {
+ WriteFile(MODE_REC, ModeRec ? "on" : "off");
+ m_ModeRec = ModeRec;
+ }
+
+ if (m_ModeTshift != ModeTshift)
+ {
+ WriteFile(MODE_TSHIFT, ModeTshift ? "on" : "off");
+ m_ModeTshift = ModeTshift;
+ }
+
+ /* ----------------------------------------------------------------- */
+
+ int ModeTimer = 0;
+
+ CTimerd::TimerList timerList;
+ CTimerdClient TimerdClient;
+
+ timerList.clear();
+ TimerdClient.getTimerList(timerList);
+
+ CTimerd::TimerList::iterator timer = timerList.begin();
+
+ for (; timer != timerList.end(); timer++)
+ {
+ if (timer->alarmTime > time(NULL) && (timer->eventType == CTimerd::TIMER_ZAPTO || timer->eventType == CTimerd::TIMER_RECORD))
+ {
+ // Nur "true", wenn irgendein timer in der zukunft liegt
+ // und dieser vom typ TIMER_ZAPTO oder TIMER_RECORD ist
+ ModeTimer = 1;
+ break;
+ }
+ }
+
+ if (m_ModeTimer != ModeTimer)
+ {
+ WriteFile(MODE_TIMER, ModeTimer ? "on" : "off");
+ m_ModeTimer = ModeTimer;
+ }
+
+ /* ----------------------------------------------------------------- */
+
+ int ModeEcm = 0;
+
+ if (access("/tmp/ecm.info", F_OK) == 0)
+ {
+ struct stat buf;
+ stat("/tmp/ecm.info", &buf);
+ if (buf.st_size > 0)
+ ModeEcm = 1;
+ }
+
+ if (m_ModeEcm != ModeEcm)
+ {
+ WriteFile(MODE_ECM, ModeEcm ? "on" : "off");
+ m_ModeEcm = ModeEcm;
+ }
+
+ /* ----------------------------------------------------------------- */
+
+#ifdef BP
+ int ModeNews = 0;
+
+ if (bc_popup_icon)
+ ModeNews = 1;
+
+ if (m_ModeNews != ModeNews)
+ {
+ WriteFile(MODE_NEWS, ModeNews ? "on" : "off");
+ m_ModeNews = ModeNews;
+ }
+#endif
+
+ /* ----------------------------------------------------------------- */
+
+ if (newID || parseID == MODE_AUDIO || parseID == MODE_TS)
+ {
+ std::string Service = "";
+ int ChannelNr = 0;
+ std::string Logo = LOGO_DUMMY;
+ int ModeLogo = 0;
+
+ int ModeStandby = 0;
+
+ if (m_ModeChannel)
+ {
+ if (m_ModeChannel > 1)
+ Service = g_RemoteControl->subChannels[g_RemoteControl->selected_subchannel].subservice_name;
+ else
+ Service = g_RemoteControl->getCurrentChannelName();
+
+ GetLogoName(parseID, Service, Logo);
+
+ ChannelNr = CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber();
+ }
+ else if (parseID == MODE_AUDIO)
+ {
+ const CAudioMetaData meta = CAudioPlayer::getInstance()->getMetaData();
+ if ( (!meta.sc_station.empty()) && (CAudioPlayer::getInstance()->getState() != CBaseDec::STOP))
+ Service = meta.sc_station;
+ else
+ {
+ Service = g_Locale->getText(LOCALE_AUDIOPLAYER_NAME);
+
+ switch (CAudioPlayer::getInstance()->getState())
+ {
+ case CBaseDec::REV:
+ Logo = ICONSDIR "/" NEUTRINO_ICON_REW ICONSEXT;
+ break;
+ case CBaseDec::FF:
+ Logo = ICONSDIR "/" NEUTRINO_ICON_FF ICONSEXT;
+ break;
+ case CBaseDec::PAUSE:
+ Logo = ICONSDIR "/" NEUTRINO_ICON_PAUSE ICONSEXT;
+ break;
+ case CBaseDec::PLAY:
+ Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT;
+ break;
+ default:
+ ;
+ }
+ }
+ }
+ else if (parseID == MODE_PIC)
+ {
+ Service = g_Locale->getText(LOCALE_PICTUREVIEWER_HEAD);
+ }
+ else if (parseID == MODE_TS)
+ {
+ if (ModeTshift)
+ Service = g_Locale->getText(LOCALE_RECORDINGMENU_TIMESHIFT);
+ else
+ Service = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
+
+ switch (CMoviePlayerGui::getInstance().getState())
+ {
+ case 6: /* rewind */
+ Logo = ICONSDIR "/" NEUTRINO_ICON_REW ICONSEXT;
+ break;
+ case 5: /* fast forward */
+ Logo = ICONSDIR "/" NEUTRINO_ICON_FF ICONSEXT;
+ break;
+ case 4: /* pause */
+ Logo = ICONSDIR "/" NEUTRINO_ICON_PAUSE ICONSEXT;
+ break;
+ case 3: /* play */
+ if (ModeTshift) /* show channel-logo */
+ {
+ GetLogoName(
+ CMoviePlayerGui::getInstance().p_movie_info->epgId,
+ CMoviePlayerGui::getInstance().p_movie_info->epgChannel,
+ Logo);
+ }
+ else /* show play-icon */
+ Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT;
+
+ break;
+ default: /* show movieplayer-icon */
+ Logo = ICONSDIR "/" NEUTRINO_ICON_MOVIEPLAYER ICONSEXT;
+ }
+ }
+ else if (parseID == MODE_STANDBY)
+ {
+ Service = "STANDBY";
+ ModeStandby = 1;
+ }
+
+ /* --- */
+
+ if (m_Service.compare(Service))
+ {
+ WriteFile(SERVICE, Service, true);
+ m_Service = Service;
+ }
+
+ if (m_ChannelNr != ChannelNr)
+ {
+ WriteFile(CHANNELNR, Int2String(ChannelNr));
+ m_ChannelNr = ChannelNr;
+ }
+
+ if (m_Logo.compare(Logo))
+ {
+ WriteFile(LOGO, Logo);
+ m_Logo = Logo;
+ }
+
+ if (Logo != LOGO_DUMMY)
+ ModeLogo = 1;
+
+ if (m_ModeLogo != ModeLogo)
+ {
+ WriteFile(MODE_LOGO, Int2String(ModeLogo));
+ m_ModeLogo = ModeLogo;
+ }
+
+ /* --- */
+
+ std::string Layout;
+
+ if (ModeStandby)
+ {
+ Layout = "standby";
+ }
+#ifdef NI
+ else if ((g_settings.lcd4l_skin_radio) && (m_Mode == MODE_RADIO))
+ {
+ Layout = "radio";
+ }
+#endif
+ else
+ {
+ switch (g_settings.lcd4l_skin)
+ {
+#ifdef BP
+ case 5:
+ Layout = "user";
+ break;
+ case 4:
+ Layout = "oscam";
+ break;
+#endif
+#ifdef NI
+ case 4:
+ Layout = "user";
+ break;
+#endif
+ case 3:
+ Layout = "d-box2";
+ break;
+ case 2:
+ Layout = "small";
+ break;
+ case 1:
+ Layout = "large";
+ break;
+ default:
+ Layout = "standard";
+ }
+ }
+
+ if (m_Layout.compare(Layout))
+ {
+ WriteFile(LAYOUT, Layout);
+ m_Layout = Layout;
+#ifdef NI
+ if (!firstRun)
+ {
+ const char *buf = "service lcd4linux reload";
+
+ //printf("[CLCD4l] %s: executing '%s'\n", __FUNCTION__, buf);
+ if (my_system(3,"service", "lcd4linux", "reload") != 0)
+ printf("[CLCD4l] %s: executing '%s' failed\n", __FUNCTION__, buf);
+ }
+#endif
+ }
+ }
+
+ /* ----------------------------------------------------------------- */
+
+ std::string Event = "";
+ int Progress = 0;
+ char Duration[sizeof(m_Duration)] = {0};
+
+ char Start[6] = {0};
+ char End[6] = {0};
+
+ if (m_ModeChannel)
+ {
+ CSectionsdClient::CurrentNextInfo CurrentNext;
+ CEitManager::getInstance()->getCurrentNextServiceKey(parseID & 0xFFFFFFFFFFFFULL, CurrentNext);
+
+ if (CSectionsdClient::epgflags::has_current)
+ {
+ if (!CurrentNext.current_name.empty())
+ Event = CurrentNext.current_name;
+
+ if ((CurrentNext.current_zeit.dauer > 0) && (CurrentNext.current_zeit.dauer < 86400))
+ {
+ Progress = 100 * (time(NULL) - CurrentNext.current_zeit.startzeit) / CurrentNext.current_zeit.dauer;
+
+ int total = CurrentNext.current_zeit.dauer / 60;
+ int done = (abs(time(NULL) - CurrentNext.current_zeit.startzeit) + 30) / 60;
+ int todo = total - done;
+ if ((time(NULL) < CurrentNext.current_zeit.startzeit) && todo >= 0)
+ {
+ done = 0;
+ todo = CurrentNext.current_zeit.dauer / 60;
+ }
+#ifdef NI
+ snprintf(Duration, sizeof(Duration), "%d/%d", done, total);
+#else
+ snprintf(Duration, sizeof(Duration), "%d/%d", done, todo);
+#endif
+ }
+
+ tm_struct = localtime(&CurrentNext.current_zeit.startzeit);
+ snprintf(Start, sizeof(Start), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min);
+ }
+
+ if (CSectionsdClient::epgflags::has_next)
+ {
+ Event += "\n" + CurrentNext.next_name;
+ tm_struct = localtime(&CurrentNext.next_zeit.startzeit);
+ snprintf(End, sizeof(End), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min);
+ }
+ }
+ else if (parseID == MODE_AUDIO)
+ {
+ if (CAudioPlayer::getInstance()->getState() == CBaseDec::STOP)
+ {
+ Event = g_Locale->getText(LOCALE_AUDIOPLAYER_STOP);
+ //snprintf(Duration, sizeof(Duration), "-:--");
+ }
+ else
+ {
+ const CAudioMetaData meta = CAudioPlayer::getInstance()->getMetaData();
+ if ( !meta.artist.empty() )
+ Event += meta.artist;
+ if ( !meta.artist.empty() && !meta.title.empty() )
+ Event += " - ";
+ if ( !meta.title.empty() )
+ Event += meta.title;
+
+ time_t total = meta.total_time;
+ time_t done = CAudioPlayer::getInstance()->getTimePlayed();
+
+ if ( (total > 0) && (done > 0) )
+ {
+ Progress = 100 * done / total;
+ snprintf(Duration, sizeof(Duration), "%ld:%02ld/%ld:%02ld", done / 60, done % 60, total / 60, total % 60);
+ }
+ }
+
+ time_t sTime = time(NULL);
+ tm_struct = localtime(&sTime);
+
+ snprintf(Start, sizeof(Start), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min);
+ }
+ //else if (parseID == MODE_PIC)
+ //{
+ // TODO: Event = Bildname
+ //}
+ else if (parseID == MODE_TS)
+ {
+ if (!ModeTshift)
+ Progress = CMoviePlayerGui::getInstance().file_prozent;
+
+ if (CMoviePlayerGui::getInstance().p_movie_info)
+ {
+ Event = CMoviePlayerGui::getInstance().p_movie_info->epgTitle.c_str();
+
+ if (!ModeTshift)
+ {
+ int total = CMoviePlayerGui::getInstance().p_movie_info->length * (60 * 1000);
+ int done = total * Progress / 100;
+
+ snprintf(Duration, sizeof(Duration), "%d/%d", done / (60 * 1000), total / (60 * 1000));
+ }
+ }
+ else if (!CMoviePlayerGui::getInstance().file_name.empty())
+ {
+ Event = CMoviePlayerGui::getInstance().file_name;
+ // TODO: Duration, Start, End
+ }
+ else
+ Event = "MOVIE";
+
+ time_t sTime = time(NULL);
+ tm_struct = localtime(&sTime);
+
+ snprintf(Start, sizeof(Start), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min);
+ }
+
+ /* ----------------------------------------------------------------- */
+
+ Event += "\n"; // make sure we have at least two lines in event-file
+ if (m_Event.compare(Event))
+ {
+ WriteFile(EVENT, Event, true);
+ m_Event = Event;
+
+ WriteFile(START, (std::string)Start);
+
+ WriteFile(END, (std::string)End);
+ }
+
+ if (Progress > 100)
+ Progress = 100;
+
+ if (m_Progress != Progress)
+ {
+ WriteFile(PROGRESS, Int2String(Progress));
+ m_Progress = Progress;
+ }
+
+ if (strcmp(m_Duration, Duration))
+ {
+ WriteFile(DURATION, (std::string)Duration);
+ strcpy(m_Duration, Duration);
+ }
+}
+
+/* ----------------------------------------------------------------- */
+
+bool CLCD4l::WriteFile(const char *file, std::string content, bool convert)
+{
+ bool ret = true;
+
+ if (convert)
+ {
+ strReplace(content, "ä", "");
+ strReplace(content, "ö", "");
+ strReplace(content, "ü", "");
+ strReplace(content, "Ä", "Ae");
+ strReplace(content, "Ö", "Oe");
+ strReplace(content, "Ü", "Ue");
+ strReplace(content, "ß", "");
+ strReplace(content, "é", "e");
+ }
+
+ if (FILE *f = fopen(file, "w"))
+ {
+ //printf("[CLCD4l] %s: %s -> %s\n", __FUNCTION__, content.c_str(), file);
+ fprintf(f, "%s\n", content.c_str());
+ fclose(f);
+ }
+ else
+ {
+ ret = false;
+ printf("[CLCD4l] %s: %s failed!\n", __FUNCTION__, file);
+ }
+
+ return ret;
+}
+
+string CLCD4l::Int2String(int iConvert)
+{
+ std::stringstream strConvert;
+ strConvert << iConvert;
+ return strConvert.str();
+}
+
+uint64_t CLCD4l::GetParseID()
+{
+ uint64_t ID = CNeutrinoApp::getInstance()->getMode();
+ m_Mode = (int) ID;
+ m_ModeChannel = 0;
+
+ if (ID == MODE_TV || ID == MODE_RADIO)
+ {
+ if (!(g_RemoteControl->subChannels.empty()) && (g_RemoteControl->selected_subchannel > 0))
+ m_ModeChannel = 2;
+ else
+ m_ModeChannel = 1;
+
+ if (m_ModeChannel > 1)
+ ID = g_RemoteControl->subChannels[g_RemoteControl->selected_subchannel].getChannelID();
+ else
+ ID = CZapit::getInstance()->GetCurrentChannelID();
+ }
+ //printf("[CLCD4l] %s: %llx\n", __FUNCTION__, ID);
+ return ID;
+}
+
+bool CLCD4l::CompareParseID(uint64_t &i_ParseID)
+{
+ bool ret = false;
+
+ i_ParseID = GetParseID();
+ if (m_ParseID != i_ParseID)
+ {
+ //printf("[CLCD4l] %s: i_%llx <-> m_%llx\n", __FUNCTION__, i_ParseID, m_ParseID);
+ ret = true;
+ m_ParseID = i_ParseID;
+ }
+ return ret;
+}
+
+// stolen from gui/movieinfo.cpp
+void CLCD4l::strReplace(std::string & orig, const char *fstr, const std::string rstr)
+{
+ unsigned int index = 0;
+ unsigned int fstrlen = strlen(fstr);
+ int rstrlen = rstr.size();
+
+ while ((index = orig.find(fstr, index)) != std::string::npos)
+ {
+ orig.replace(index, fstrlen, rstr);
+ index += rstrlen;
+ }
+}
+
+bool CLCD4l::GetLogoName(uint64_t channel_id, std::string channel_name, std::string &logo)
+{
+ int h, i, j;
+ char str_channel_id[16];
+ char *upper_name, *lower_name, *p;
+
+ upper_name = strdup(channel_name.c_str());
+ for (p = upper_name; *p != '\0'; p++)
+ *p = (char) toupper(*p);
+
+ lower_name = strdup(channel_name.c_str());
+ for (p = lower_name; *p != '\0'; p++)
+ *p = (char) tolower(*p);
+
+ sprintf(str_channel_id, "%llx", channel_id & 0xFFFFFFFFFFFFULL);
+ // the directorys to search in
+ std::string strLogoDir[4] = { g_settings.lcd4l_logodir, LOGODIR_VAR, LOGODIR, g_settings.logo_hdd_dir };
+ // first the channelname, then the upper channelname, then the lower channelname, then the channel-id
+ std::string strLogoName[4] = { channel_name, (std::string)upper_name, (std::string)lower_name, (std::string)str_channel_id };
+ // first png, then jpg, then gif
+ std::string strLogoExt[3] = { ".png", ".jpg", ".gif" };
+
+ //printf("[CLCD4l] %s: ID: %s, Name: %s (u: %s, l: %s)\n", __FUNCTION__, str_channel_id, channel_name.c_str(), upper_name, lower_name);
+
+ for (h = 0; h < 4; h++)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ std::string tmp(strLogoDir[h] + "/" + strLogoName[i] + strLogoExt[j]);
+ if (access(tmp.c_str(), R_OK) != -1)
+ {
+ logo = tmp;
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+}
diff --git a/src/gui/lcd4l.h b/src/gui/lcd4l.h
new file mode 100644
index 000000000..f47b2b083
--- /dev/null
+++ b/src/gui/lcd4l.h
@@ -0,0 +1,111 @@
+/*
+ lcd4l
+
+ Copyright (C) 2012 'defans'
+ Homepage: http://www.bluepeercrew.us/
+
+ Copyright (C) 2012-2016 'vanhofen'
+ Homepage: http://www.neutrino-images.de/
+
+ 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 __lcd4l__
+#define __lcd4l__
+
+//#define BP
+#define NI
+
+#include
+
+class CLCD4l
+{
+ public:
+ CLCD4l();
+ ~CLCD4l();
+
+ // Functions
+ void InitLCD4l();
+ void StartLCD4l();
+ void StopLCD4l();
+ void SwitchLCD4l();
+
+ int CreateFile(const char *file, std::string content = "", bool convert = true);
+ int RemoveFile(const char *file);
+
+ private:
+ enum
+ {
+ MODE_UNKNOWN = -1,
+ MODE_TV = 1,
+ MODE_RADIO = 2,
+ MODE_SCART = 3,
+ MODE_STANDBY = 4,
+ MODE_AUDIO = 5,
+ MODE_PIC = 6,
+ MODE_TS = 7,
+ MODE_OFF = 8,
+ MODE_MASK = 0xFF,
+ NOREZAP = 0x100
+ };
+
+ pthread_t thrLCD4l;
+ static void* LCD4lProc(void *arg);
+
+ struct tm *tm_struct;
+
+ // Functions
+ void Init();
+ void ParseInfo(uint64_t parseID, bool newID, bool firstRun = false);
+
+ uint64_t GetParseID();
+ bool CompareParseID(uint64_t &i_ParseID);
+ bool GetLogoName(uint64_t channel_id, std::string channel_name, std::string & logo);
+
+ std::string Int2String(int iconvert);
+ void strReplace(std::string & orig, const char *fstr, const std::string rstr);
+ bool WriteFile(const char *file, std::string content = "", bool convert = false);
+
+ // Variables
+ uint64_t m_ParseID;
+ int m_Mode;
+ int m_ModeChannel;
+
+ int m_Tuner;
+ int m_Volume;
+ int m_ModeRec;
+ int m_ModeTshift;
+ int m_ModeTimer;
+ int m_ModeEcm;
+#ifdef BP
+ int m_ModeNews;
+#endif
+
+ std::string m_Service;
+ int m_ChannelNr;
+ std::string m_Logo;
+ int m_ModeLogo;
+
+ std::string m_Layout;
+
+ std::string m_Event;
+ int m_Progress;
+ char m_Duration[15];
+};
+
+#endif
diff --git a/src/gui/lua/lua_menue.cpp b/src/gui/lua/lua_menue.cpp
index 100056ba5..aec533ecb 100644
--- a/src/gui/lua/lua_menue.cpp
+++ b/src/gui/lua/lua_menue.cpp
@@ -442,7 +442,7 @@ int CLuaInstMenu::MenuAddItem(lua_State *L)
mi = new CMenuOptionStringChooser(b->name.c_str(), &b->str_val, enabled, D->observ, directkey, icon, pulldown);
} else if (type == "stringinput") {
b->str_val = value;
- std::string valid_chars = "abcdefghijklmnopqrstuvwxyz0123456789!\"$%&/()=?-. ";
+ std::string valid_chars = "abcdefghijklmnopqrstuvwxyz0123456789!\"§$%&/()=?-.@,_: "; //NI add '@,_:'
tableLookup(L, "valid_chars", valid_chars);
lua_Integer sms = 0; tableLookup(L, "sms", sms);
lua_Integer size = 30; tableLookup(L, "size", size);
diff --git a/src/gui/lua/lua_misc.cpp b/src/gui/lua/lua_misc.cpp
index c732c7d6d..52f01e7ce 100644
--- a/src/gui/lua/lua_misc.cpp
+++ b/src/gui/lua/lua_misc.cpp
@@ -28,6 +28,7 @@
#include
#include
#include
+#include //NI
#include
#include
#include
@@ -73,6 +74,7 @@ void CLuaInstMisc::LuaMiscRegister(lua_State *L)
{ "checkVersion", CLuaInstMisc::checkVersion },
{ "postMsg", CLuaInstMisc::postMsg },
{ "getTimeOfDay", CLuaInstMisc::getTimeOfDay },
+ { "FlashUpdate", CLuaInstMisc::FlashUpdate }, //NI
{ "__gc", CLuaInstMisc::MiscDelete },
{ NULL, NULL }
};
@@ -355,6 +357,20 @@ int CLuaInstMisc::getTimeOfDay(lua_State *L)
return 1;
}
+//NI
+int CLuaInstMisc::FlashUpdate(lua_State *L)
+{
+ CLuaMisc *D = MiscCheckData(L, 1);
+ if (!D) return 0;
+
+ const char *mode = luaL_checkstring(L, 2);
+
+ CFlashUpdate flash;
+ flash.exec(NULL, mode);
+
+ return 0;
+}
+
int CLuaInstMisc::MiscDelete(lua_State *L)
{
CLuaMisc *D = MiscCheckData(L, 1);
diff --git a/src/gui/lua/lua_misc.h b/src/gui/lua/lua_misc.h
index 56ea4023f..bce68c3ff 100644
--- a/src/gui/lua/lua_misc.h
+++ b/src/gui/lua/lua_misc.h
@@ -64,6 +64,7 @@ class CLuaInstMisc
static int checkVersion(lua_State *L);
static int postMsg(lua_State *L);
static int getTimeOfDay(lua_State *L);
+ static int FlashUpdate(lua_State *L); //NI
static int MiscDelete(lua_State *L);
static void miscFunctionDeprecated(lua_State *L, std::string oldFunc);
diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp
index 993aab273..116de0ff4 100644
--- a/src/gui/mediaplayer.cpp
+++ b/src/gui/mediaplayer.cpp
@@ -55,6 +55,10 @@
extern cVideo * videoDecoder;
+//NI InfoIcons
+#include
+extern CInfoIcons *InfoIcons;
+
CMediaPlayerMenu::CMediaPlayerMenu()
{
setMenuTitel();
@@ -109,6 +113,7 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
{
audiomute->enableMuteIcon(false);
CInfoClock::getInstance()->enableInfoClock(false);
+ InfoIcons->enableInfoIcons(false); //NI InfoIcons
int mode = CNeutrinoApp::getInstance()->getMode();
if( mode == NeutrinoMessages::mode_radio )
CFrameBuffer::getInstance()->stopFrame();
@@ -117,6 +122,7 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
CFrameBuffer::getInstance()->showFrame("radiomode.jpg");
audiomute->enableMuteIcon(true);
CInfoClock::getInstance()->enableInfoClock(true);
+ InfoIcons->enableInfoIcons(true); //NI InfoIcons
return res;
}
diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp
index 71729f51e..0ac78cc78 100644
--- a/src/gui/moviebrowser.cpp
+++ b/src/gui/moviebrowser.cpp
@@ -119,6 +119,13 @@ const CMenuOptionChooser::keyval MESSAGEBOX_YES_NO_OPTIONS[MESSAGEBOX_YES_NO_OPT
{ 1, LOCALE_MESSAGEBOX_YES }
};
+//NI
+const CMenuOptionChooser::keyval MESSAGEBOX_YES_NO_INVERTED_OPTIONS[MESSAGEBOX_YES_NO_OPTIONS_COUNT] =
+{
+ { 0, LOCALE_MESSAGEBOX_YES },
+ { 1, LOCALE_MESSAGEBOX_NO }
+};
+
#define MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT 3
const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCK_OPTIONS[MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT] =
{
@@ -519,6 +526,8 @@ void CMovieBrowser::init(void)
old_EpgId = 0;
m_doRefresh = false;
m_doLoadMovies = false;
+
+ imdb = CIMDB::getInstance(); //NI
}
void CMovieBrowser::initGlobalSettings(void)
@@ -826,6 +835,90 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey)
return showMovieCutMenu();
}
}
+ //NI
+ else if (actionKey == "get_imdb_data")
+ {
+ if (m_movieSelectionHandler != NULL)
+ {
+ size_t pos;
+ std::string element;
+
+ CHintBox hintBox(LOCALE_MOVIEBROWSER_HEAD, g_Locale->getText(LOCALE_MOVIEBROWSER_IMDB_DATA));
+ hintBox.paint();
+
+ std::string title = m_movieSelectionHandler->epgTitle;
+ imdb->getIMDb(title);
+
+#if 0
+ element = "Title";
+ imdb->getIMDbElement(element);
+ if (element.compare("Title") != 0)
+ {
+ printf("Title\n");
+ printf("* old: %s\n", m_movieSelectionHandler->epgTitle.c_str());
+ m_movieSelectionHandler->epgTitle = element;
+ printf("* new: %s\n", m_movieSelectionHandler->epgTitle.c_str());
+ }
+
+ element = "Genre";
+ imdb->getIMDbElement(element);
+ if (element.compare("Genre") != 0)
+ {
+ printf("Genre\n");
+ printf("* old: %s\n", m_movieSelectionHandler->epgInfo1.c_str());
+ m_movieSelectionHandler->epgInfo1 = element;
+ printf("* new: %s\n", m_movieSelectionHandler->epgInfo1.c_str());
+ }
+#endif
+
+ element = "Year";
+ imdb->getIMDbElement(element);
+ if (element.compare("Year") != 0)
+ {
+ printf("Year\n");
+ printf("* old: %d\n", m_movieSelectionHandler->productionDate);
+ m_movieSelectionHandler->productionDate = atoi(element);
+ printf("* new: %d\n", m_movieSelectionHandler->productionDate);
+ }
+
+ element = "Country";
+ imdb->getIMDbElement(element);
+ if (element.compare("Country") != 0)
+ {
+ printf("Country\n");
+ printf("* old: %s\n", m_movieSelectionHandler->productionCountry.c_str());
+ m_movieSelectionHandler->productionCountry = element;
+ printf("* new: %s\n", m_movieSelectionHandler->productionCountry.c_str());
+ }
+
+ element = "imdbRating";
+ imdb->getIMDbElement(element);
+ if (element.compare("imdbRating") != 0 && element.compare("N/A") != 0)
+ {
+ if ((pos = element.find_first_of(",.")) != std::string::npos)
+ element.replace(pos, 1, ""); // change 8,1 or 8.1 to 81
+
+ printf("Rating\n");
+ printf("* old: %d\n", m_movieSelectionHandler->rating);
+ m_movieSelectionHandler->rating = atoi(element);
+ printf("* new: %d\n", m_movieSelectionHandler->rating);
+ }
+
+ std::string poster;
+ if ((pos = m_movieSelectionHandler->file.Name.rfind(".")) != std::string::npos)
+ {
+ printf("Poster\n");
+ poster = m_movieSelectionHandler->file.Name.substr(0, pos);
+ poster += ".jpg";
+ File_copy(imdb->posterfile.c_str(), poster.c_str());
+ printf("* poster: %s\n", poster.c_str());
+ }
+
+ //m_movieInfo.saveMovieInfo(*m_movieSelectionHandler);
+ hintBox.hide();
+ }
+
+ }
else if (actionKey == "save_movie_info")
{
m_movieInfo.saveMovieInfo(*m_movieSelectionHandler);
@@ -898,6 +991,7 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey)
else if(actionKey == "show_menu")
{
showMenu(true);
+ saveSettings(&m_settings); //NI
}
else if(actionKey == "show_ytmenu")
{
@@ -1187,20 +1281,21 @@ int CMovieBrowser::paint(void)
//CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD));
- Font* font = NULL;
+ Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_LIST]; //NI
m_pcBrowser = new CListFrame(&m_browserListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE,
- &m_cBoxFrameBrowserList);
+ &m_cBoxFrameBrowserList, NULL,
+ g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_HEAD]); //NI
m_pcLastPlay = new CListFrame(&m_playListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE | CListFrame::TITLE,
&m_cBoxFrameLastPlayList, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_PLAYLIST),
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
+ g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_HEAD]); //NI
m_pcLastRecord = new CListFrame(&m_recordListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE | CListFrame::TITLE,
&m_cBoxFrameLastRecordList, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_RECORDLIST),
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
+ g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_HEAD]); //NI
m_pcFilter = new CListFrame(&m_FilterLines, font, CListFrame::SCROLL | CListFrame::TITLE,
&m_cBoxFrameFilter, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_FILTER),
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
- m_pcInfo = new CTextBox(" ", NULL, CTextBox::TOP | CTextBox::SCROLL, &m_cBoxFrameInfo);
+ g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_HEAD]); //NI
+ m_pcInfo = new CTextBox(" ", g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_INFO], CTextBox::TOP | CTextBox::SCROLL, &m_cBoxFrameInfo); //NI
if (m_pcBrowser == NULL || m_pcLastPlay == NULL ||
@@ -1442,6 +1537,8 @@ void CMovieBrowser::refreshMovieInfo(void)
m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, m_cBoxFrameInfo.iWidth - flogo_w - 24);
if (pic)
pic->paint(CC_SAVE_SCREEN_NO);
+
+ updateInfoSelection(); //NI
}
void CMovieBrowser::info_hdd_level(bool paint_hdd)
@@ -1929,12 +2026,12 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
else
{
showMenu();
- if (m_doLoadMovies)
+ //NI if (m_doLoadMovies)
loadMovies();
- if (m_doRefresh)
+ //NI if (m_doRefresh)
refresh();
}
-
+ saveSettings(&m_settings); //NI
}
else if (g_settings.sms_movie && (msg >= CRCInput::RC_1) && (msg <= CRCInput::RC_9))
{
@@ -2226,6 +2323,8 @@ bool CMovieBrowser::onButtonPressMovieInfoList(neutrino_msg_t msg)
else
result = false;
+ updateInfoSelection(); //NI
+
return (result);
}
@@ -2493,6 +2592,7 @@ void CMovieBrowser::onSetFocus(MB_FOCUS new_focus)
m_pcFilter->showSelection(true);
updateMovieSelection();
+ updateInfoSelection(); //NI
refreshFoot();
}
@@ -2844,6 +2944,16 @@ void CMovieBrowser::updateMovieSelection(void)
//TRACE("\n");
}
+//NI
+void CMovieBrowser::updateInfoSelection(void)
+{
+ fb_pixel_t frame = COL_MENUCONTENT_PLUS_0;
+ if (m_windowFocus == MB_FOCUS_MOVIE_INFO)
+ frame = COL_MENUCONTENTSELECTED_PLUS_0;
+
+ framebuffer->paintBoxFrame(m_cBoxFrameInfo.iX, m_cBoxFrameInfo.iY, m_cBoxFrameInfo.iWidth, m_cBoxFrameInfo.iHeight, 1, frame);
+}
+
void CMovieBrowser::updateFilterSelection(void)
{
//TRACE("[mb]->updateFilterSelection \n");
@@ -3065,6 +3175,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
movieInfoMenu.addIntroItems(LOCALE_MOVIEBROWSER_INFO_HEAD);
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_SAVE, true, NULL, this, "save_movie_info", CRCInput::RC_red));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_HEAD_UPDATE, true, NULL, &movieInfoMenuUpdate, NULL, CRCInput::RC_green));
+ movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_IMDB_DATA, true, NULL, this, "get_imdb_data", CRCInput::RC_yellow)); //NI
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_HEAD, true, NULL, &bookmarkMenu, NULL, CRCInput::RC_blue));
movieInfoMenu.addItem(GenericMenuSeparatorLine);
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_TITLE, true, movie_info->epgTitle, &titelUserInput,NULL, CRCInput::RC_1));
@@ -3215,7 +3326,7 @@ bool CMovieBrowser::showMenu(bool calledExternally)
optionsMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_HIDE_SERIES, (int*)(&m_settings.browser_serie_mode), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true));
optionsMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_SERIE_AUTO_CREATE, (int*)(&m_settings.serie_auto_create), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true));
int ts_only = m_settings.ts_only;
- optionsMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_TS_ONLY, (int*)(&m_settings.ts_only), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true ));
+ optionsMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_TS_ONLY, (int*)(&m_settings.ts_only), MESSAGEBOX_YES_NO_INVERTED_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true )); //NI
//optionsMenu.addItem(GenericMenuSeparator);
diff --git a/src/gui/moviebrowser.h b/src/gui/moviebrowser.h
index cf0bf36a0..071baa188 100644
--- a/src/gui/moviebrowser.h
+++ b/src/gui/moviebrowser.h
@@ -82,6 +82,7 @@
#include
#include
#include
+#include //NI
#define MAX_NUMBER_OF_BOOKMARK_ITEMS MI_MOVIE_BOOK_USER_MAX // we just use the same size as used in Movie info (MAX_NUMBER_OF_BOOKMARK_ITEMS is used for the number of menu items)
#define MOVIEBROWSER_SETTINGS_FILE CONFIGDIR "/moviebrowser.conf"
@@ -363,6 +364,7 @@ class CMovieBrowser : public CMenuTarget
void loadYTitles(int mode, std::string search = "", std::string id = "");
bool showYTMenu(bool calledExternally = false);
void refreshYTMenu();
+ CIMDB *imdb; //NI
public: // Functions //////////////////////////////////////////////////////////7
CMovieBrowser(); //P1
@@ -459,6 +461,7 @@ class CMovieBrowser : public CMenuTarget
bool isParentalLock(MI_MOVIE_INFO& movie_info);
bool getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM item, std::string* item_string);
void updateMovieSelection(void);
+ void updateInfoSelection(void); //NI
void updateFilterSelection(void);
void updateSerienames(void);
void autoFindSerie(void);
diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp
index 7b104ba5e..0c8818c0b 100644
--- a/src/gui/movieinfo.cpp
+++ b/src/gui/movieinfo.cpp
@@ -50,6 +50,7 @@
#include
#include
#include
+#include "gui/widget/hintbox.h" //NI
#include
#include
#include
@@ -68,6 +69,7 @@
************************************************************************/
CMovieInfo::CMovieInfo()
{
+ imdb = CIMDB::getInstance(); //NI
//TRACE("[mi] new\r\n");
}
@@ -505,8 +507,58 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info)
print_buffer += movie_info.file.Name;
print_buffer += "\n";
- ShowMsg2UTF(movie_info.epgTitle.empty()? movie_info.file.getFileName().c_str() : movie_info.epgTitle.c_str(), print_buffer.c_str(), CMsgBox::mbrBack, CMsgBox::mbBack); // UTF-8*/
+ //NI
+ imdb->showTextWindow(movie_info.epgTitle.empty() ? movie_info.file.getFileName() : movie_info.epgTitle, print_buffer);
+ while (1)
+ {
+ neutrino_msg_t msg;
+ neutrino_msg_data_t data;
+ uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS(100);
+ g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
+
+ if (msg == CRCInput::RC_home || msg == CRCInput::RC_ok || msg == CRCInput::RC_info) {
+ break;
+ }
+ else if (msg == CRCInput::RC_help) {
+ g_settings.bigFonts = !g_settings.bigFonts;
+ imdb->hideWindow(true /*keep_active*/);
+ if (imdb->isActive())
+ imdb->showIMDbWindow(movie_info.epgTitle);
+ else
+ imdb->showTextWindow(movie_info.epgTitle.empty() ? movie_info.file.getFileName() : movie_info.epgTitle, print_buffer);
+ g_RCInput->clearRCMsg();
+ continue;
+ }
+ else if ((msg == CRCInput::RC_up) || (msg == CRCInput::RC_page_up)) {
+ imdb->scroll(/*scrollUp*/ false);
+ }
+ else if ((msg == CRCInput::RC_down) || (msg == CRCInput::RC_page_down)) {
+ imdb->scroll(/*scrollDown*/ true);
+ }
+ else if (msg == CRCInput::RC_green)
+ {
+ if (imdb->isActive()) {
+ CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "Speichere Bild");
+ hintBox->paint();
+ size_t pos;
+ std::string picname;
+ if((pos = movie_info.file.Name.rfind(".")) != std::string::npos){
+ picname = movie_info.file.Name.substr(0, pos);
+ picname += ".jpg";
+ File_copy(imdb->posterfile.c_str(), picname.c_str());
+ printf(" picname = %s\n",picname.c_str());
+ }
+ sleep(2);
+ hintBox->hide();
+ }
+ else {
+ imdb->hideWindow();
+ imdb->showIMDbWindow(movie_info.epgTitle);
+ }
+ }
+ }
+ imdb->hideWindow();
}
/************************************************************************
diff --git a/src/gui/movieinfo.h b/src/gui/movieinfo.h
index c3dfc4040..368322c88 100644
--- a/src/gui/movieinfo.h
+++ b/src/gui/movieinfo.h
@@ -57,6 +57,8 @@
#include
#include "driver/file.h"
+#include //NI
+
/************************************************************************/
/************************************************************************/
/***************** CMovieInfo ********************************/
@@ -212,6 +214,9 @@ class CMovieInfo
bool loadFile(CFile& file, std::string &buffer);
bool saveFile(const CFile& file, std::string &buffer);
private:// variables
+
+ //NI
+ CIMDB *imdb;
};
#endif /*MOVIEINFO_H_*/
diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp
index f6576ed0e..67918d23f 100644
--- a/src/gui/movieplayer.cpp
+++ b/src/gui/movieplayer.cpp
@@ -76,6 +76,10 @@
#include
#include
+//NI InfoIcons
+#include
+extern CInfoIcons *InfoIcons;
+
extern cVideo * videoDecoder;
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
@@ -221,8 +225,8 @@ void CMoviePlayerGui::cutNeutrino()
return;
g_Zapit->lockPlayBack();
- if (!isWebTV)
- g_Sectionsd->setPauseScanning(true);
+ //NI if (!isWebTV)
+ //NI g_Sectionsd->setPauseScanning(true);
m_LastMode = (CNeutrinoApp::getInstance()->getMode() /*| NeutrinoMessages::norezap*/);
if (isWebTV)
@@ -245,7 +249,7 @@ void CMoviePlayerGui::restoreNeutrino()
//g_Zapit->unlockPlayBack();
CZapit::getInstance()->EnablePlayback(true);
- g_Sectionsd->setPauseScanning(false);
+ //NI g_Sectionsd->setPauseScanning(false);
printf("%s: restore mode %x\n", __func__, m_LastMode);fflush(stdout);
#if 0
@@ -272,6 +276,19 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
if (parent)
parent->hide();
+ //NI
+ if (actionKey == "fileplayback" || actionKey == "tsmoviebrowser")
+ {
+ if(actionKey == "fileplayback") {
+ printf("[movieplayer] wakeup_hdd(%s) for %s\n", g_settings.network_nfs_moviedir.c_str(), actionKey.c_str());
+ wakeup_hdd(g_settings.network_nfs_moviedir.c_str(),true);
+ }
+ else {
+ printf("[movieplayer] wakeup_hdd(%s) for %s\n", g_settings.network_nfs_recordingdir.c_str(), actionKey.c_str());
+ wakeup_hdd(g_settings.network_nfs_recordingdir.c_str(),true);
+ }
+ }
+
puts("[movieplayer.cpp] executing " MOVIEPLAYER_START_SCRIPT ".");
if (my_system(MOVIEPLAYER_START_SCRIPT) != 0)
perror(MOVIEPLAYER_START_SCRIPT " failed");
@@ -465,6 +482,7 @@ void CMoviePlayerGui::EnableClockAndMute(bool enable)
{
CAudioMute::getInstance()->enableMuteIcon(enable);
CInfoClock::getInstance()->enableInfoClock(enable);
+ InfoIcons->enableInfoIcons(enable); //NI InfoIcons
}
void CMoviePlayerGui::makeFilename()
@@ -544,7 +562,7 @@ bool CMoviePlayerGui::SelectFile()
Path_local = g_settings.network_nfs_moviedir;
printf("CMoviePlayerGui::SelectFile: isBookmark %d timeshift %d isMovieBrowser %d\n", isBookmark, timeshift, isMovieBrowser);
- wakeup_hdd(g_settings.network_nfs_recordingdir.c_str());
+ //NI wakeup_hdd(g_settings.network_nfs_recordingdir.c_str());
if (timeshift != TSHIFT_MODE_OFF) {
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
@@ -924,7 +942,22 @@ bool CMoviePlayerGui::getLiveUrl(const t_channel_id chan, const std::string &url
std::string _script = script;
if (_script.find("/") == std::string::npos)
- _script = g_settings.livestreamScriptPath + "/" + _script;
+ //NI
+ {
+ std::string _s = g_settings.livestreamScriptPath + "/" + _script;
+ printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str());
+ if (!file_exists(_s.c_str()))
+ {
+ _s = string(WEBTVDIR_VAR) + "/" + _script;
+ printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str());
+ }
+ if (!file_exists(_s.c_str()))
+ {
+ _s = string(WEBTVDIR) + "/" + _script;
+ printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str());
+ }
+ _script = _s;
+ }
size_t pos = _script.find(".lua");
if (!file_exists(_script.c_str()) || (pos == std::string::npos) || (_script.length()-pos != 4)) {
@@ -1339,7 +1372,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
videoDecoder->setBlank(false);
screensaver(false);
//ignore first keypress stop - just quit the screensaver and call infoviewer
- if (msg == CRCInput::RC_stop) {
+ if (msg <= CRCInput::RC_MaxRC) { //NI
g_RCInput->clearRCMsg();
callInfoViewer();
continue;
@@ -1350,7 +1383,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
if (msg == (neutrino_msg_t) g_settings.mpkey_plugin) {
g_PluginList->startPlugin_by_name(g_settings.movieplayer_plugin.c_str ());
- } else if (msg == (neutrino_msg_t) g_settings.mpkey_stop) {
+ } else if ((msg == (neutrino_msg_t) g_settings.mpkey_stop) || msg == CRCInput::RC_home) { //NI
playstate = CMoviePlayerGui::STOPPED;
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_STOP;
ClearQueue();
@@ -1441,7 +1474,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
playback->SetSpeed(speed);
}
updateLcd();
- if (timeshift == TSHIFT_MODE_OFF)
+ //NI if (timeshift == TSHIFT_MODE_OFF)
callInfoViewer();
} else if (msg == (neutrino_msg_t) g_settings.mpkey_bookmark) {
if (is_file_player)
@@ -1914,7 +1947,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
newComHintBox.movePosition(newx, newy);
return;
}
- else if (msg == (neutrino_msg_t) g_settings.mpkey_stop) {
+ else if ((msg == (neutrino_msg_t) g_settings.mpkey_stop) || msg == CRCInput::RC_home) { //NI
// if we have a movie information, try to save the stop position
printf("CMoviePlayerGui::handleMovieBrowser: stop, isMovieBrowser %d p_movie_info %x\n", isMovieBrowser, (int) p_movie_info);
if (isMovieBrowser && p_movie_info) {
@@ -2142,6 +2175,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
if (restore)
FileTime.kill();
CInfoClock::getInstance()->enableInfoClock(false);
+ InfoIcons->enableInfoIcons(false); //NI InfoIcons
if (isLuaPlay && haveLuaInfoFunc) {
int xres = 0, yres = 0, aspectRatio = 0, framerate = -1;
@@ -2157,6 +2191,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
cMovieInfo.showMovieInfo(*p_movie_info);
CInfoClock::getInstance()->enableInfoClock(true);
+ InfoIcons->enableInfoIcons(true); //NI InfoIcons
if (restore) {
FileTime.setMode(m_mode);
FileTime.update(position, duration);
diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h
index c2101cdf7..2a44f5f5e 100644
--- a/src/gui/movieplayer.h
+++ b/src/gui/movieplayer.h
@@ -101,7 +101,7 @@ class CMoviePlayerGui : public CMenuTarget
CFrameBuffer * frameBuffer;
int m_LastMode;
- std::string file_name;
+//NI std::string file_name;
std::string pretty_name;
std::string cookie_header;
std::string info_1, info_2;
@@ -154,7 +154,7 @@ class CMoviePlayerGui : public CMenuTarget
bool isYT;
bool showStartingHint;
static CMovieBrowser* moviebrowser;
- MI_MOVIE_INFO * p_movie_info;
+//NI MI_MOVIE_INFO * p_movie_info;
MI_MOVIE_INFO movie_info;
P_MI_MOVIE_LIST milist;
const static short MOVIE_HINT_BOX_TIMER = 5; // time to show bookmark hints in seconds
@@ -266,6 +266,11 @@ class CMoviePlayerGui : public CMenuTarget
void setLuaInfoFunc(lua_State* L, bool func) { luaState = L; haveLuaInfoFunc = func; };
void getLivestreamInfo(std::string *i1, std::string *i2) { *i1=livestreamInfo1; *i2=livestreamInfo2; };
bool getLiveUrl(const t_channel_id chan, const std::string &url, const std::string &script, std::string &realUrl, std::string &_pretty_name, std::string &info1, std::string &info2, std::string &header);
+
+ //NI
+ MI_MOVIE_INFO * p_movie_info;
+ std::string file_name;
+ int getState() { return playstate; };
};
#endif
diff --git a/src/gui/netfs_setup.cpp b/src/gui/netfs_setup.cpp
new file mode 100644
index 000000000..6082975d5
--- /dev/null
+++ b/src/gui/netfs_setup.cpp
@@ -0,0 +1,637 @@
+/*
+ netfs_setup
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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
+
+extern const char * mntRes2Str(CFSMounter::MountRes res);
+extern const char * mntRes2Str(CFSMounter::UMountRes res);
+
+CNETFSMountGui::CNETFSMountGui()
+{
+ // FIXME #warning move probing from exec() to fsmounter
+ m_nfs_sup = CFSMounter::FS_UNPROBED;
+ m_cifs_sup = CFSMounter::FS_UNPROBED;
+ m_lufs_sup = CFSMounter::FS_UNPROBED;
+
+ width = 50;
+
+ fstabPath = checkVarPath("/etc/fstab");
+ autoPath = checkVarPath("/etc/auto.net");
+}
+
+std::string CNETFSMountGui::checkVarPath(const string &file)
+{
+ std::string var = "/var" + file;
+ if(file_exists(var.c_str()))
+ return(var);
+ else
+ return(file);
+}
+
+std::string CNETFSMountGui::getEntryString(int mt, int i)
+{
+ std::string res;
+ switch(g_settings.netfs[mt][i].type) {
+ case CFSMounter::NFS: res = "NFS " + g_settings.netfs[mt][i].ip + ":"; break;
+ case CFSMounter::CIFS: res = "CIFS //" + g_settings.netfs[mt][i].ip + "/"; break;
+ case CFSMounter::LUFS: res = "FTPS " + g_settings.netfs[mt][i].ip + "/"; break;
+ }
+ if (g_settings.netfs[mt][i].dir.empty() || g_settings.netfs[mt][i].local_dir.empty())
+ return "";
+ return res
+ + FILESYSTEM_ENCODING_TO_UTF8(g_settings.netfs[mt][i].dir)
+ + " -> "
+ + FILESYSTEM_ENCODING_TO_UTF8(g_settings.netfs[mt][i].local_dir)
+ + " (auto: "
+ + g_Locale->getText(g_settings.netfs[mt][i].active ? LOCALE_MESSAGEBOX_YES : LOCALE_MESSAGEBOX_NO)
+ + ")";
+}
+
+int CNETFSMountGui::vinit(int mt)
+{
+ for(int i=0 ; i < NETFS_NR_OF_ENTRIES ; i++)
+ {
+ g_settings.netfs[mt][i].ip = "";
+ g_settings.netfs[mt][i].dir = "";
+ g_settings.netfs[mt][i].local_dir= "";
+ g_settings.netfs[mt][i].type = 0;
+ g_settings.netfs[mt][i].username = "";
+ g_settings.netfs[mt][i].password = "";
+ g_settings.netfs[mt][i].options1 = "soft";
+ g_settings.netfs[mt][i].options2 = "nolock";
+ g_settings.netfs[mt][i].active = 0;
+ g_settings.netfs[mt][i].dump = "0";
+ g_settings.netfs[mt][i].pass = "0";
+ }
+ return(0);
+}
+
+int CNETFSMountGui::read_config(int mt)
+{
+ FILE *fp;
+ int i = 0;
+ char *line_buffer;
+ ssize_t read;
+ size_t len;
+ std::string config_file = (mt == SNeutrinoSettings::FSTAB)?fstabPath:autoPath;
+
+ line_buffer=NULL;
+ if((fp = fopen(config_file.c_str(), "r")))
+ {
+ while ((read = getline(&line_buffer, &len, fp)) != -1)
+ {
+ if (line_buffer[0] == '#' && !strstr(line_buffer,"-fstype="))
+ continue;
+
+ char device[100] = "";
+ std::string device_dir = "";
+ char mountpt[100] = "";
+ char fstype[6] = "";
+ char options[200] = "";
+ char options1[31] = "";
+ char options2[171] = "";
+ char dump[3] = "";
+ char pass[3] = "";
+ char user[31] = "";
+ char passwd[31] = "";
+
+ if(mt == SNeutrinoSettings::FSTAB)
+ {
+ /*
+ # file system mount pt type options dump pass
+ 192.168.0.10:nfs /srv nfs rw,soft,nolock 0 0
+ //192.168.1.99/folder /mnt/folder cifs rw,soft,nolock,user=USER,password=PASSWD 0 0 */
+
+ sscanf(line_buffer,"%99s%99s%5s%199s%2s%2s", (char *) &device, (char *) &mountpt, (char *) &fstype, (char *) &options, (char *) &dump, (char *) &pass);
+ }
+ else
+ {
+ /*
+ # MountPoint Type, options NetFS
+ srv -fstype=nfs,soft,nolock 192.168.0.10:/nas/video
+ pictures -fstype=cifs,soft,user=USER,password=PASSWD //192.168.0.11/pictures */
+
+ sscanf((line_buffer[0]=='#')?line_buffer+1:line_buffer,"%99s%*[^-]-fstype=%5[^,],%199s%99s", (char *) &mountpt, (char *) &fstype, (char *) &options, (char *) &device);
+ }
+
+ if( strcmp( device, "" ) != 0 )
+ {
+ char * pch;
+ char * found;
+ int active = line_buffer[0] == '#' ? 0 : 1;
+ int y = 0;
+
+ pch = strtok (device,":/\\");
+ while (pch != NULL)
+ {
+ if (y==0)
+ {
+ strcpy(device,pch);
+ }
+ else
+ {
+ device_dir += "/";
+ device_dir += pch;
+ }
+ pch = strtok (NULL,":/\\");
+ y++;
+ }
+
+ pch = strtok (options,",");
+ while (pch != NULL)
+ {
+
+ if ((found = strstr(pch, "username="))) {
+ sscanf(found+9, "%30[^\n]", (char *) &user);
+ }
+ else if ((found = strstr(pch, "user="))) {
+ sscanf(found+5, "%30[^\n]", (char *) &user);
+ }
+ else if ((found = strstr(pch, "password="))) {
+ sscanf(found+9, "%30[^\n]", (char *) &passwd);
+ }
+ else if (strstr(pch, "noauto")) {
+ active = 0;
+ }
+ else if ((strlen(options1) + strlen(pch) + 1) <= 30)
+ {
+ if((strlen(options1)!=0))
+ strcat(options1,",");
+
+ strcat(options1,pch);
+
+ }
+ else if ( (strlen(options2) + strlen(pch) + 1) <= 170)
+ {
+ if((strlen(options2)!=0))
+ strcat(options2,",");
+
+ strcat(options2,pch);
+ }
+ pch = strtok (NULL, ",");
+ }
+
+ if(mt == SNeutrinoSettings::FSTAB)
+ {
+ printf("CNETFSMountGui::read_config fstab: %s:%s\t%s\t%s\t%s%s%s\t%s\t%s\n", device, device_dir.c_str(), mountpt, fstype, options1, ((strlen(options2)==0)? "":","), options2, dump, pass);
+ }
+ else
+ {
+ printf("CNETFSMountGui::read_config auto.net: \n%s\t-fstype=%s\t%s%s%s\t%s:%s\n", mountpt,fstype, options1,options2,((strlen(options2)==0)? "":","),device,device_dir.c_str());
+ }
+
+ g_settings.netfs[mt][i].ip = (strcmp(device,"0.0.0.0")==0) ? "" : device;
+ g_settings.netfs[mt][i].dir = ((device_dir=="/netfsDir") ? "" : device_dir.c_str());
+ g_settings.netfs[mt][i].local_dir = ((strcmp(mountpt,"mountPt")==0) ? "" : mountpt);
+ g_settings.netfs[mt][i].type = (strcmp(fstype,"nfs")==0) ? (int) CFSMounter::NFS : (int) CFSMounter::CIFS;
+ g_settings.netfs[mt][i].username = user;
+ g_settings.netfs[mt][i].password = passwd;
+ g_settings.netfs[mt][i].options1 = options1;
+ g_settings.netfs[mt][i].options2 = options2;
+ g_settings.netfs[mt][i].dump = dump;
+ g_settings.netfs[mt][i].pass = pass;
+ g_settings.netfs[mt][i].active = active;
+
+ if(i == NETFS_NR_OF_ENTRIES-1) {
+ //printf("CNG_NetfsMenu::read_config: to many entries in config file (max. %d)\n",NETFS_NR_OF_ENTRIES);
+ break;
+ }
+ else {
+ i++;
+ }
+ }
+
+ }
+ fclose(fp);
+ if(line_buffer)
+ free(line_buffer);
+ }
+ else
+ {
+ return(-1);
+ }
+ return(0);
+}
+
+int CNETFSMountGui::write_config(int mt)
+{
+ std::ofstream config_file((mt == SNeutrinoSettings::FSTAB)?fstabPath.c_str():autoPath.c_str());
+
+ if (config_file.is_open())
+ {
+ if(mt == SNeutrinoSettings::FSTAB)
+ {
+ config_file << "# /etc/fstab: static file system information (generated from NetFS setup).\n"
+ << "#\n"
+ << "# \n";
+
+ for(int i=0 ; i < NETFS_NR_OF_ENTRIES; i++)
+ {
+ if (g_settings.netfs[mt][i].type == (int) CFSMounter::NFS)
+ {
+ //"%s:%s\t%s\t\tnfs\t%s%s%s%s\t\t%s\t%s\n"
+ config_file << ((g_settings.netfs[mt][i].ip.empty()) ? "0.0.0.0" : g_settings.netfs[mt][i].ip) << ":"
+ << ((g_settings.netfs[mt][i].dir.empty()) ? "netfsDir": g_settings.netfs[mt][i].dir) << '\t'
+ << ((g_settings.netfs[mt][i].local_dir.empty()) ? "mountPt" : g_settings.netfs[mt][i].local_dir) << '\t'
+ << '\t' << "nfs" << '\t'
+ << (g_settings.netfs[mt][i].active ?"":"noauto,")
+ << g_settings.netfs[mt][i].options1
+ << ((g_settings.netfs[mt][i].options2.empty()) ? "" : ",")
+ << g_settings.netfs[mt][i].options2 << '\t' << '\t'
+ << g_settings.netfs[mt][i].dump << '\t'
+ << g_settings.netfs[mt][i].pass << '\n';
+ }
+ else
+ {
+ //"//%s%s%s\t%s\t\tcifs\t%susername=%s,password=%s%s%s%s%s\t%s\t%s\n"
+ config_file << "//"
+ << ((g_settings.netfs[mt][i].ip.empty()) ? "0.0.0.0" : g_settings.netfs[mt][i].ip)
+ << (((!g_settings.netfs[mt][i].dir.empty()) && g_settings.netfs[mt][i].dir[0]!='/') ? "/" : "")
+ << ((g_settings.netfs[mt][i].dir.empty()) ? "netfsDir": g_settings.netfs[mt][i].dir) << '\t'
+ << ((g_settings.netfs[mt][i].local_dir.empty()) ? "mountPt" : g_settings.netfs[mt][i].local_dir) << '\t'
+ << '\t' << "cifs" << '\t'
+ << (g_settings.netfs[mt][i].active ?"":"noauto,")
+ << "username=" << g_settings.netfs[mt][i].username << ",password=" << g_settings.netfs[mt][i].password
+ << (g_settings.netfs[mt][i].options1.empty() ? "" : ",")
+ << g_settings.netfs[mt][i].options1
+ << (g_settings.netfs[mt][i].options2.empty() ? "" : ",")
+ << g_settings.netfs[mt][i].options2 << '\t' << '\t'
+ << g_settings.netfs[mt][i].dump << '\t'
+ << g_settings.netfs[mt][i].pass << '\n';
+ }
+ }
+ }
+ else
+ {
+ config_file << "# /etc/auto.net: dynamic file system information (generated from NetFS setup).\n"
+ << "#\n"
+ << "# Every single mount point below will be available in /mnt/autofs during start\n"
+ << "# or possibly even later if you request it.\n"
+ << "#\n"
+ << "# -fstype=, \n";
+
+ for(int i=0 ; i < NETFS_NR_OF_ENTRIES; i++)
+ {
+ if (g_settings.netfs[mt][i].type == (int) CFSMounter::NFS)
+ {
+ //"%s%s\t-fstype=nfs,%s%s%s\t\t%s:%s\n"
+ config_file << (g_settings.netfs[mt][i].active ? "" : "#")
+ << ((g_settings.netfs[mt][i].local_dir.empty()) ? "mountPt" : g_settings.netfs[mt][i].local_dir) << '\t'
+ << "-fstype=nfs,"
+ << g_settings.netfs[mt][i].options1
+ << ((g_settings.netfs[mt][i].options2.empty()) ? "" : ",")
+ << g_settings.netfs[mt][i].options2 << '\t' << '\t'
+ << ((g_settings.netfs[mt][i].ip.empty()) ? "0.0.0.0" : g_settings.netfs[mt][i].ip) << ':'
+ << ((g_settings.netfs[mt][i].dir.empty()) ? "netfsDir": g_settings.netfs[mt][i].dir) << '\n';
+ }
+ else
+ {
+ //"%s%s\t-fstype=cifs,user=%s,password=%s%s%s%s%s\t\t\t//%s%s%s\n"
+ config_file << (g_settings.netfs[mt][i].active?"":"#")
+ << ((g_settings.netfs[mt][i].local_dir.empty()) ? "mountPt" : g_settings.netfs[mt][i].local_dir) << '\t'
+ << "-fstype=cifs,user=" << g_settings.netfs[mt][i].username << ",password=" << g_settings.netfs[mt][i].password
+ << (g_settings.netfs[mt][i].options1.empty() ? "" : ",")
+ << g_settings.netfs[mt][i].options1
+ << (g_settings.netfs[mt][i].options2.empty() ? "" : ",")
+ << g_settings.netfs[mt][i].options2 << '\t' << '\t'
+ << "//" << ((g_settings.netfs[mt][i].ip.empty()) ? "0.0.0.0" : g_settings.netfs[mt][i].ip)
+ << (((!g_settings.netfs[mt][i].dir.empty()) && g_settings.netfs[mt][i].dir[0]!='/') ? "/" : "")
+ << ((g_settings.netfs[mt][i].dir.empty()) ? "netfsDir" : g_settings.netfs[mt][i].dir) << '\n';
+ }
+ }
+ }
+ config_file.close();
+ }
+ else {
+ printf("CNETFSMountGui::write_config, error open %s\n", ((mt == SNeutrinoSettings::FSTAB)?fstabPath.c_str():autoPath.c_str()));
+ }
+ return(0);
+}
+
+int CNETFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey )
+{
+ printf("CNETFSMountGui exec: %s\n", actionKey.c_str());
+ int returnval = menu_return::RETURN_REPAINT;
+
+ if (m_nfs_sup == CFSMounter::FS_UNPROBED)
+ m_nfs_sup = CFSMounter::fsSupported(CFSMounter::NFS);
+
+ if (m_cifs_sup == CFSMounter::FS_UNPROBED)
+ m_cifs_sup = CFSMounter::fsSupported(CFSMounter::CIFS);
+
+ if (m_lufs_sup == CFSMounter::FS_UNPROBED)
+ m_lufs_sup = CFSMounter::fsSupported(CFSMounter::LUFS);
+
+ printf("SUPPORT: NFS: %d, CIFS: %d, LUFS: %d\n", m_nfs_sup, m_cifs_sup, m_lufs_sup);
+
+ if (actionKey.empty() || actionKey.substr(0,4)=="menu")
+ {
+ int mt = (actionKey.substr(5)=="fstab") ? SNeutrinoSettings::FSTAB : SNeutrinoSettings::AUTOMOUNT;
+ parent->hide();
+
+ vinit(mt);
+ read_config(mt);
+
+ for(int i=0 ; i < NETFS_NR_OF_ENTRIES; i++)
+ {
+ m_entry[i] = getEntryString(mt,i);
+ }
+ returnval = menu(mt);
+ }
+ else if(actionKey.substr(0,10)=="mountentry")
+ {
+ int mt = actionKey[10]-'0'; //convert char (49) to int (1)
+ int nr = actionKey[11]-'0';
+
+ parent->hide();
+ returnval = menuEntry(mt, nr);
+ for(int i=0 ; i < NETFS_NR_OF_ENTRIES; i++)
+ {
+ m_entry[i] = getEntryString(mt,i);
+ ISO_8859_1_entry[i] = ZapitTools::UTF8_to_Latin1(m_entry[i]);
+ }
+ }
+ else if(actionKey.substr(0,7)=="domount")
+ {
+ parent->hide();
+ if (actionKey.substr(8,5)=="start")
+ {
+ if (my_system(2, "/etc/init.d/fstab", "start_netfs") != 0)
+ perror("/etc/init.d/fstab failed");
+ }
+ else
+ {
+ if (my_system(2, "/etc/init.d/fstab", "stop_netfs") != 0)
+ perror("/etc/init.d/fstab failed");
+ }
+
+ ShowHint(LOCALE_NETFS_FSTAB_HEAD,g_Locale->getText((actionKey.substr(8,5)=="start")? LOCALE_NETFS_FSTAB_DOMOUNT_INFO : LOCALE_NETFS_FSTAB_DOUMOUNT_INFO),450,3);
+
+ for(int i=0 ; i < NETFS_NR_OF_ENTRIES ; i++)
+ {
+ if (CFSMounter::isMounted(g_settings.netfs[SNeutrinoSettings::FSTAB][i].local_dir))
+ {
+ mountMenuEntry[i]->iconName = NEUTRINO_ICON_MOUNTED;
+ } else
+ {
+ mountMenuEntry[i]->iconName = NEUTRINO_ICON_NOT_MOUNTED;
+ }
+ }
+ }
+ else if (actionKey.substr(0,12)=="write config")
+ {
+ int mt = actionKey[12]-'0';
+
+ parent->hide();
+ CNeutrinoApp::getInstance()->saveSetup(NEUTRINO_SETTINGS_FILE);
+ write_config(mt);
+
+ if(mt==SNeutrinoSettings::FSTAB)
+ {
+ ShowHint(LOCALE_NETFS_FSTAB_HEAD,g_Locale->getText(LOCALE_NETFS_FSTAB_WRITE_INFO),450,3);
+ }
+ else
+ {
+ if (my_system(2, "/etc/init.d/autofs", "restart") != 0)
+ perror("autofs failed");
+
+ //FIXME please wait ...
+ CHintBox * hintBox = new CHintBox(LOCALE_NETFS_AUTOMOUNT_HEAD,g_Locale->getText(LOCALE_AUDIOPLAYER_RECEIVING_LIST));
+ hintBox->paint();
+ sleep(3); //give automounter a few seconds
+
+ for(int i=0 ; i < NETFS_NR_OF_ENTRIES ; i++)
+ {
+ std::string localdir = "";
+ if(!g_settings.netfs[mt][i].local_dir.empty())
+ {
+ localdir = "/mnt/autofs/" + g_settings.netfs[mt][i].local_dir;
+ my_system(2, "ls", localdir.c_str()); //mount
+ }
+
+ if (CFSMounter::isMounted(localdir.c_str()))
+ {
+ mountMenuEntry[i]->iconName = NEUTRINO_ICON_MOUNTED;
+ } else
+ {
+ mountMenuEntry[i]->iconName = NEUTRINO_ICON_NOT_MOUNTED;
+ }
+ }
+ hintBox->hide();
+ delete hintBox;
+ }
+ returnval = menu_return::RETURN_REPAINT;
+ }
+ else if (actionKey.substr(0,3)=="dir")
+ {
+ int mt = actionKey[3]-'0';
+ int nr = actionKey[4]-'0';
+
+ parent->hide();
+ chooserDir(g_settings.netfs[mt][nr].local_dir, false, NULL);
+ returnval = menu_return::RETURN_REPAINT;
+ }
+ return returnval;
+}
+
+int CNETFSMountGui::menu(int mt)
+{
+ std::string hint = SNeutrinoSettings::FSTAB ? g_Locale->getText(LOCALE_MENU_HINT_NETFS_FSTAB_WRITE) : g_Locale->getText(LOCALE_MENU_HINT_NETFS_AUTOMOUNT_WRITE);
+ std::string txt;
+
+ CMenuWidget mountMenuW(mt == SNeutrinoSettings::FSTAB ? LOCALE_NETFS_FSTAB_HEAD : LOCALE_NETFS_AUTOMOUNT_HEAD, NEUTRINO_ICON_NETWORK, width, mt == SNeutrinoSettings::FSTAB ? MN_WIDGET_ID_NETFS_FSTAB : MN_WIDGET_ID_NETFS_AUTOMOUNT);
+ mountMenuW.addIntroItems();
+
+ if(mt==SNeutrinoSettings::FSTAB)
+ {
+ CMenuForwarder * mf = new CMenuForwarder(LOCALE_NETFS_FSTAB_WRITE, true, NULL, this , ("write config" + to_string(mt)).c_str(), CRCInput::RC_red);
+ txt = str_replace("%s", fstabPath, hint);
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, txt.c_str());
+ mountMenuW.addItem(mf);
+
+ mf = new CMenuForwarder(LOCALE_NETFS_FSTAB_DOMOUNT, true, NULL, this , "domount start", CRCInput::RC_green);
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_NETFS_FSTAB_DOMOUNT);
+ mountMenuW.addItem(mf);
+
+ mf = new CMenuForwarder(LOCALE_NETFS_FSTAB_DOUMOUNT, true, NULL, this , "domount stop", CRCInput::RC_yellow);
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_NETFS_FSTAB_DOUMOUNT);
+ mountMenuW.addItem(mf);
+ }
+ else
+ {
+ CMenuForwarder * mf = new CMenuForwarder(LOCALE_NETFS_AUTOMOUNT_WRITE, true, NULL, this , ("write config" + to_string(mt)).c_str(), CRCInput::RC_red);
+ txt = str_replace("%s", autoPath, hint);
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, txt.c_str());
+ mountMenuW.addItem(mf);
+ }
+
+ mountMenuW.addItem(GenericMenuSeparatorLine);
+
+ //FIXME please wait ...
+ CHintBox * hintBox = new CHintBox(LOCALE_NETFS_AUTOMOUNT_HEAD,g_Locale->getText(LOCALE_AUDIOPLAYER_RECEIVING_LIST));
+ hintBox->paint();
+
+ for(int i=0 ; i < NETFS_NR_OF_ENTRIES ; i++)
+ {
+ std::string s2 = "mountentry" + to_string(mt) + to_string(i);
+ ISO_8859_1_entry[i] = ZapitTools::UTF8_to_Latin1(m_entry[i]);
+ mountMenuEntry[i] = new CMenuForwarder("", true, ISO_8859_1_entry[i], this, s2.c_str());
+
+ std::string localdir = "";
+ if(!g_settings.netfs[mt][i].local_dir.empty())
+ {
+ if(mt == SNeutrinoSettings::AUTOMOUNT)
+ {
+ localdir = "/mnt/autofs/" + g_settings.netfs[mt][i].local_dir;
+ my_system(2, "ls", localdir.c_str()); //mount
+ } else
+ {
+ localdir = g_settings.netfs[mt][i].local_dir;
+ }
+ }
+
+ if (CFSMounter::isMounted(localdir.c_str()))
+ {
+ mountMenuEntry[i]->iconName = NEUTRINO_ICON_MOUNTED;
+ } else
+ {
+ mountMenuEntry[i]->iconName = NEUTRINO_ICON_NOT_MOUNTED;
+ }
+ mountMenuW.addItem(mountMenuEntry[i]);
+ }
+ hintBox->hide();
+ delete hintBox;
+
+ int ret=mountMenuW.exec(this,"");
+ return ret;
+}
+
+const CMenuOptionChooser::keyval NFS_TYPE_OPTIONS[] =
+{
+ { CFSMounter::NFS , LOCALE_NFS_TYPE_NFS },
+ { CFSMounter::CIFS, LOCALE_NFS_TYPE_CIFS } /*,
+ { CFSMounter::LUFS, LOCALE_NFS_TYPE_LUFS } */
+};
+#define NFS_TYPE_OPTION_COUNT (sizeof(NFS_TYPE_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
+
+int CNETFSMountGui::menuEntry(int mt, int nr)
+{
+ CMenuWidget mountMenuEntryW(mt == SNeutrinoSettings::FSTAB ? LOCALE_NETFS_FSTAB_HEAD : LOCALE_NETFS_AUTOMOUNT_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_NETFS_ENTRYS);
+ mountMenuEntryW.addIntroItems(mt == SNeutrinoSettings::FSTAB ? LOCALE_NETFS_FSTAB_INTRO_MOUNTS : LOCALE_NETFS_AUTOMOUNT_INTRO_MOUNTS);
+
+ CIPInput ipInput(LOCALE_NFS_IP, &g_settings.netfs[mt][nr].ip, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2);
+ CKeyboardInput dirInput(LOCALE_NFS_DIR, &g_settings.netfs[mt][nr].dir);
+ CKeyboardInput local_dirInput(LOCALE_NFS_LOCALDIR, &g_settings.netfs[mt][nr].local_dir);
+
+ CKeyboardInput userInput(LOCALE_NFS_USERNAME, &g_settings.netfs[mt][nr].username);
+ CMenuForwarder *username_fwd = new CMenuForwarder(LOCALE_NFS_USERNAME, (g_settings.netfs[mt][nr].type != (int)CFSMounter::NFS), g_settings.netfs[mt][nr].username, &userInput);
+
+ CKeyboardInput passwdInput(LOCALE_NFS_PASSWORD, &g_settings.netfs[mt][nr].password);
+ CMenuForwarder *password_fwd = new CMenuForwarder(LOCALE_NFS_PASSWORD, (g_settings.netfs[mt][nr].type != (int)CFSMounter::NFS), NULL, &passwdInput);
+
+ CKeyboardInput options1Input(LOCALE_NFS_MOUNT_OPTIONS, &g_settings.netfs[mt][nr].options1, 30);
+ CMenuForwarder *options1_fwd = new CMenuForwarder(LOCALE_NFS_MOUNT_OPTIONS, true, g_settings.netfs[mt][nr].options1, &options1Input);
+
+ CKeyboardInput options2Input(LOCALE_NFS_MOUNT_OPTIONS, &g_settings.netfs[mt][nr].options2);
+ CMenuForwarder *options2_fwd = new CMenuForwarder(LOCALE_NFS_MOUNT_OPTIONS, true, g_settings.netfs[mt][nr].options2, &options2Input);
+
+ CStringInputSMS dumpInput(LOCALE_NETFS_DUMP, &g_settings.netfs[mt][nr].dump, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
+ CMenuForwarder *dump_fwd = new CMenuForwarder(LOCALE_NETFS_DUMP, (mt == SNeutrinoSettings::FSTAB), g_settings.netfs[mt][nr].dump, &dumpInput);
+
+ CStringInputSMS passInput(LOCALE_NETFS_PASS, &g_settings.netfs[mt][nr].pass, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
+ CMenuForwarder *pass_fwd = new CMenuForwarder(LOCALE_NETFS_PASS, (mt == SNeutrinoSettings::FSTAB), g_settings.netfs[mt][nr].pass, &passInput);
+
+ CMenuOptionChooser *activeInput= new CMenuOptionChooser(LOCALE_NETFS_ACTIVE_ONOFF, &g_settings.netfs[mt][nr].active, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true);
+
+ COnOffNotifier notifier(CFSMounter::NFS);
+ notifier.addItem(username_fwd);
+ notifier.addItem(password_fwd);
+
+ mountMenuEntryW.addItem(new CMenuOptionChooser(LOCALE_NFS_TYPE, &g_settings.netfs[mt][nr].type, NFS_TYPE_OPTIONS, NFS_TYPE_OPTION_COUNT, true, ¬ifier));
+ mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_IP, true, g_settings.netfs[mt][nr].ip, &ipInput));
+ mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_DIR, true, g_settings.netfs[mt][nr].dir, &dirInput));
+
+ if(mt == SNeutrinoSettings::FSTAB)
+ mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_LOCALDIR, true, g_settings.netfs[mt][nr].local_dir, this, ("dir" + to_string(mt) + to_string(nr)).c_str()));
+ else
+ mountMenuEntryW.addItem(new CMenuForwarder(LOCALE_NFS_LOCALDIR, true, g_settings.netfs[mt][nr].local_dir, &local_dirInput));
+
+
+ mountMenuEntryW.addItem(username_fwd);
+ mountMenuEntryW.addItem(password_fwd);
+ mountMenuEntryW.addItem(options1_fwd);
+ mountMenuEntryW.addItem(options2_fwd);
+ mountMenuEntryW.addItem(dump_fwd);
+ mountMenuEntryW.addItem(pass_fwd);
+ mountMenuEntryW.addItem(activeInput);
+
+ int ret = mountMenuEntryW.exec(this,"");
+ return ret;
+}
+
+int CNETFSSetup::exec( CMenuTarget* parent, const std::string & actionKey )
+{
+ if (actionKey.empty())
+ {
+ CNETFSMountGui mountGui;
+
+ CMenuWidget sm_menu(LOCALE_NETFS_MENU_MAIN_HEAD, NEUTRINO_ICON_NETWORK, width, MN_WIDGET_ID_NETFS_MAIN);
+ sm_menu.addIntroItems(LOCALE_NETFS_MENU_MAIN_INTRO);
+
+ CMenuForwarder *fstab = new CMenuForwarder(LOCALE_NETFS_MENU_MAIN_EDIT, true, fstabPath, &mountGui, "menu fstab", CRCInput::RC_red);
+ CMenuForwarder *automount = new CMenuForwarder(LOCALE_NETFS_MENU_MAIN_EDIT, true, autoPath, &mountGui, "menu automount", CRCInput::RC_green);
+
+ fstab->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_NETFS_MENU_MAIN_FSTAB);
+ automount->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_NETFS_MENU_MAIN_AUTOMOUNT);
+
+ sm_menu.addItem(fstab);
+ sm_menu.addItem(automount);
+
+ return sm_menu.exec(parent, actionKey);
+ }
+
+ return menu_return::RETURN_REPAINT;
+}
diff --git a/src/gui/netfs_setup.h b/src/gui/netfs_setup.h
new file mode 100644
index 000000000..e45c1ee53
--- /dev/null
+++ b/src/gui/netfs_setup.h
@@ -0,0 +1,76 @@
+/*
+ netfs_setup
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 __netfs_setup__
+#define __netfs_setup__
+
+#include
+#include
+
+class CNETFSMountGui : public CMenuTarget
+{
+
+ private:
+ int menu(int mt);
+ int menuEntry(int mt, int nr);
+
+ std::string m_entry[NETFS_NR_OF_ENTRIES];
+ std::string ISO_8859_1_entry[NETFS_NR_OF_ENTRIES];
+
+ std::string getEntryString(int mt, int i);
+
+ CMenuForwarder* mountMenuEntry[NETFS_NR_OF_ENTRIES];
+
+ CFSMounter::FS_Support m_nfs_sup;
+ CFSMounter::FS_Support m_cifs_sup;
+ CFSMounter::FS_Support m_lufs_sup;
+
+ int vinit(int mt);
+ std::string checkVarPath(const std::string &file); /// returns path for persistent var partitions
+
+ protected:
+ int width;
+
+ public:
+ CNETFSMountGui();
+ int exec(CMenuTarget* parent, const std::string & actionKey);
+
+ int read_config(int mt);
+ int write_config(int mt);
+
+ std::string fstabPath;
+ std::string autoPath;
+};
+
+class CNETFSSetup : public CNETFSMountGui
+{
+ private:
+
+ public:
+ CNETFSSetup(){};
+ ~CNETFSSetup(){};
+ int exec( CMenuTarget* parent, const std::string & actionKey );
+};
+
+#endif
diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp
index 87097ae20..519a90e13 100644
--- a/src/gui/network_setup.cpp
+++ b/src/gui/network_setup.cpp
@@ -381,10 +381,13 @@ int CNetworkSetup::showNetworkSetup()
mf->setHint("", LOCALE_MENU_HINT_NET_PROXY);
networkSettings->addItem(mf);
+//NI
+#if 0
//services
mf = new CMenuForwarder(LOCALE_NETWORKMENU_SERVICES, true, NULL, &services, NULL, CRCInput::RC_1);
mf->setHint("", LOCALE_MENU_HINT_NET_SERVICES);
networkSettings->addItem(mf);
+#endif
}
int ret = 0;
@@ -415,15 +418,18 @@ 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 );
+ CMenuOptionChooser *ntp9 = new CMenuOptionChooser(LOCALE_NETWORKMENU_NTPATBOOT, &g_settings.network_ntpatboot, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); //NI
ntp1->setHint("", LOCALE_MENU_HINT_NET_NTPENABLE);
ntp2->setHint("", LOCALE_MENU_HINT_NET_NTPSERVER);
ntp3->setHint("", LOCALE_MENU_HINT_NET_NTPREFRESH);
+ ntp9->setHint("", LOCALE_MENU_HINT_NET_NTPATBOOT); //NI
menu_ntp->addIntroItems(LOCALE_NETWORKMENU_NTPTITLE);
menu_ntp->addItem( ntp1);
menu_ntp->addItem( ntp2);
menu_ntp->addItem( ntp3);
+ menu_ntp->addItem( ntp9); //NI
}
#ifdef ENABLE_GUI_MOUNT
@@ -778,6 +784,13 @@ void CNetworkSetup::testNetworkSettings()
text += std::string(g_Locale->getText(LOCALE_NETWORKMENU_NTPSERVER)) + ":\n";
text += offset + g_settings.network_ntpserver + " " + mypinghost(g_settings.network_ntpserver) + "\n";
}
+ //NI
+ if (pinghost(our_nameserver.c_str()) == 1)
+ {
+ //testsite (or defaultsite)
+ text += testsite + ":\n";
+ text += offset + "via DNS: " + mypinghost(testsite) + "\n";
+ }
//Wiki
text += wiki_URL + ":\n";
text += offset + "via IP (" + wiki_IP + "): " + mypinghost(wiki_IP) + "\n";
@@ -785,8 +798,10 @@ void CNetworkSetup::testNetworkSettings()
{
text += offset + "via DNS: " + mypinghost(wiki_URL) + "\n";
//testsite (or defaultsite)
+#if 0
text += testsite + ":\n";
text += offset + "via DNS: " + mypinghost(testsite) + "\n";
+#endif
}
}
diff --git a/src/gui/nfs.cpp b/src/gui/nfs.cpp
index acecb14a9..45c03d3d9 100644
--- a/src/gui/nfs.cpp
+++ b/src/gui/nfs.cpp
@@ -123,8 +123,8 @@ int CNFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey )
g_settings.network_nfs[i].type = 0;
g_settings.network_nfs[i].username = "";
g_settings.network_nfs[i].password = "";
- g_settings.network_nfs[i].mount_options1 = "ro,soft,udp";
- g_settings.network_nfs[i].mount_options2 = "nolock,rsize=8192,wsize=8192";
+ g_settings.network_nfs[i].mount_options1 = "soft"; //NI
+ g_settings.network_nfs[i].mount_options2 = "nolock"; //NI
g_settings.network_nfs[i].mac = "11:22:33:44:55:66";
m_entry[i] = getEntryString(i);
ISO_8859_1_entry[i] = ZapitTools::UTF8_to_Latin1(m_entry[i]);
diff --git a/src/gui/ni_menu.cpp b/src/gui/ni_menu.cpp
new file mode 100644
index 000000000..7eb1c458b
--- /dev/null
+++ b/src/gui/ni_menu.cpp
@@ -0,0 +1,565 @@
+/*
+ ni_menu
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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
+
+// lcd4l-support
+#include "gui/lcd4l.h"
+extern CLCD4l *LCD4l;
+
+const CMenuOptionChooser::keyval LCD4L_SUPPORT_OPTIONS[] =
+{
+ { 0, LOCALE_LCD4L_SUPPORT_OFF },
+ { 1, LOCALE_LCD4L_SUPPORT_AUTO },
+ { 2, LOCALE_LCD4L_SUPPORT_ON }
+};
+#define LCD4L_SUPPORT_OPTION_COUNT (sizeof(LCD4L_SUPPORT_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
+
+const CMenuOptionChooser::keyval LCD4L_SKIN_OPTIONS[] =
+{
+ { 0, LOCALE_LCD4L_SKIN_0 },
+ { 1, LOCALE_LCD4L_SKIN_1 },
+ { 2, LOCALE_LCD4L_SKIN_2 },
+ { 3, LOCALE_LCD4L_SKIN_3 },
+ { 4, LOCALE_LCD4L_SKIN_4 }
+};
+#define LCD4L_SKIN_OPTION_COUNT (sizeof(LCD4L_SKIN_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
+
+typedef struct emu_menu_data_t
+{
+ neutrino_locale_t name;
+ neutrino_locale_t hint;
+ const char * cam_name;
+ const char * cam_file;
+ int cam_exist;
+ int flag_exist;
+} emu_menu_data_struct;
+
+emu_menu_data_t emu_menu[]=
+{
+ {LOCALE_CAMD_ITEM_MGCAMD_NAME, LOCALE_CAMD_ITEM_MGCAMD_HINT, "MGCAMD", "mgcamd", 0, 0},
+ {LOCALE_CAMD_ITEM_DOSCAM_NAME, LOCALE_CAMD_ITEM_DOSCAM_HINT, "DOSCAM", "doscam", 0, 0},
+ {LOCALE_CAMD_ITEM_OSCAM_NAME, LOCALE_CAMD_ITEM_OSCAM_HINT, "OSCAM", "oscam", 0, 0},
+ {LOCALE_CAMD_ITEM_OSEMU_NAME, LOCALE_CAMD_ITEM_OSEMU_HINT, "OSEMU", "osemu", 0, 0},
+ {LOCALE_CAMD_ITEM_NEWCS_NAME, LOCALE_CAMD_ITEM_NEWCS_HINT, "NEWCS", "newcs", 0, 0},
+ {LOCALE_CAMD_ITEM_GBOX_NAME, LOCALE_CAMD_ITEM_GBOX_HINT, "GBOX.NET", "gbox", 0, 0},
+ {LOCALE_CAMD_ITEM_CS2GBOX_NAME, LOCALE_CAMD_ITEM_CS2GBOX_HINT, "CS2GBOX", "cs2gbox", 0, 0}
+};
+#define MAXEMU (sizeof(emu_menu)/sizeof(struct emu_menu_data_t))
+
+typedef struct plugin_menu_data_t
+{
+ neutrino_locale_t name;
+ neutrino_locale_t desc;
+ const char * icon;
+ const char * flag;
+ int plugin_exist;
+ int flag_exist;
+} plugin_menu_data_struct;
+
+plugin_menu_data_t plugin_menu[]=
+{
+ {LOCALE_PLUGIN_ITEM_FCM_NAME, LOCALE_PLUGIN_ITEM_FCM_DESC, NEUTRINO_ICON_HINT_FCM, "fritzcallmonitor", 0, 0},
+ {LOCALE_PLUGIN_ITEM_NFSSERVER_NAME, LOCALE_PLUGIN_ITEM_NFSSERVER_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "nfsd", 0, 0},
+ {LOCALE_PLUGIN_ITEM_SAMBASERVER_NAME, LOCALE_PLUGIN_ITEM_SAMBASERVER_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "samba", 0, 0},
+ {LOCALE_PLUGIN_ITEM_TUXCALD_NAME, LOCALE_PLUGIN_ITEM_TUXCALD_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "tuxcald", 0, 0},
+ {LOCALE_PLUGIN_ITEM_TUXMAILD_NAME, LOCALE_PLUGIN_ITEM_TUXMAILD_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "tuxmaild", 0, 0},
+ {LOCALE_PLUGIN_ITEM_EMMREMIND_NAME, LOCALE_PLUGIN_ITEM_EMMREMIND_DESC, NEUTRINO_ICON_HINT_EMMRD, "emmrd", 0, 0},
+ {LOCALE_PLUGIN_ITEM_INADYN_NAME, LOCALE_PLUGIN_ITEM_INADYN_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "inadyn", 0, 0},
+ {LOCALE_PLUGIN_ITEM_DROPBEAR_NAME, LOCALE_PLUGIN_ITEM_DROPBEAR_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "dropbear", 0, 0},
+ {LOCALE_PLUGIN_ITEM_DJMOUNT_NAME, LOCALE_PLUGIN_ITEM_DJMOUNT_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "djmount", 0, 0},
+ {LOCALE_PLUGIN_ITEM_USHARE_NAME, LOCALE_PLUGIN_ITEM_USHARE_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "ushare", 0, 0},
+ {LOCALE_PLUGIN_ITEM_XUPNPD_NAME, LOCALE_PLUGIN_ITEM_XUPNPD_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "xupnpd", 0, 0},
+ {LOCALE_PLUGIN_ITEM_CROND_NAME, LOCALE_PLUGIN_ITEM_CROND_DESC, NEUTRINO_ICON_HINT_IMAGELOGO, "crond", 0, 0}
+};
+#define MAXPLUGIN (sizeof(plugin_menu)/sizeof(struct plugin_menu_data_t))
+
+CNIMenu::CNIMenu()
+{
+ width = 40;
+}
+
+CNIMenu::~CNIMenu()
+{
+}
+
+CNIMenu* CNIMenu::getInstance()
+{
+ static CNIMenu* NIMenu = NULL;
+ if (!NIMenu)
+ NIMenu = new CNIMenu();
+ return NIMenu;
+}
+
+int CNIMenu::exec(CMenuTarget* parent, const std::string &actionkey)
+{
+ printf("CNIMenu::exec: actionkey %s\n", actionkey.c_str());
+ int res = menu_return::RETURN_REPAINT;
+ char *buffer;
+ ssize_t read;
+ size_t len;
+ FILE *fh;
+ std::ostringstream buf;
+
+ if (parent)
+ parent->hide();
+
+ if (actionkey == "camd_reset")
+ {
+ CHintBox * hintbox = new CHintBox(LOCALE_CAMD_CONTROL, g_Locale->getText(LOCALE_CAMD_MSG_RESET));
+ hintbox->paint();
+
+ buf.str("");
+ buf << EMU_START_SCRIPT << " restart";
+
+ printf("[ni_menu.cpp] executing %s\n", buf.str().c_str());
+ if (my_system(2, EMU_START_SCRIPT, "restart") != 0)
+ printf("[ni_menu.cpp] executing %s failed\n", buf.str().c_str());
+ sleep(1);
+ delete hintbox;
+
+ return menu_return::RETURN_EXIT_ALL;
+ }
+ else if(actionkey == "savesettings") {
+ CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_MAINSETTINGS_SAVESETTINGSNOW_HINT)); // UTF-8
+ hintBox->paint();
+ CNeutrinoApp::getInstance()->saveSetup(NEUTRINO_SETTINGS_FILE);
+ delete hintBox;
+ return res;
+ }
+ else if(actionkey == "ecmInfo") {
+
+ buffer=NULL;
+ if (File_copy("/tmp/ecm.info", "/tmp/ecm.info.tmp"))
+ {
+ if ((fh = fopen("/tmp/ecm.info.tmp", "r")))
+ {
+ std::string str = "";
+ while ((read = getline(&buffer, &len, fh)) != -1)
+ {
+ str += buffer;
+ }
+ fclose(fh);
+ remove("/tmp/ecm.info.tmp");
+ if(buffer)
+ free(buffer);
+ ShowHint(LOCALE_ECMINFO, str.c_str(), 450, 20);
+ }
+ }
+ else
+ ShowHint(LOCALE_ECMINFO, LOCALE_ECMINFO_NULL, 450, 20);
+
+ return menu_return::RETURN_EXIT_ALL;
+ }
+ else if (actionkey=="lcd4l_logodir") {
+ const char *action_str = "lcd4l_logodir";
+ chooserDir(g_settings.lcd4l_logodir, false, action_str);
+ return menu_return::RETURN_REPAINT;
+ }
+
+ res = show();
+
+ return res;
+}
+
+bool CNIMenu::changeNotify(const neutrino_locale_t OptionName, void * /*data*/)
+{
+#if 0
+ int val = 0;
+
+ if (data)
+ val = (*(int *)data);
+#endif
+
+ if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCD4L_SUPPORT))
+ {
+ LCD4l->StopLCD4l();
+ if (g_settings.lcd4l_support)
+ LCD4l->StartLCD4l();
+ }
+
+ return false;
+}
+
+bool CNITouchFileNotifier::changeNotify(const neutrino_locale_t, void * data)
+{
+ std::ostringstream buf;
+
+ buf << FLAG_DIR << "." << filename;
+ std::string flag = buf.str();
+
+ if ((*(int *)data) != 0)
+ {
+ FILE * fd = fopen(flag.c_str(), "w");
+ if (fd)
+ {
+ fclose(fd);
+ if (strstr(filename, "scart_osd_fix"))
+ {
+ //change to scart-osd-fix values
+ g_settings.screen_StartX_crt = 29;
+ g_settings.screen_StartY_crt = 43;
+ g_settings.screen_EndX_crt = 693;
+ g_settings.screen_EndY_crt = 535;
+ g_settings.screen_preset = 0;
+
+ //set values
+ g_settings.screen_StartX = g_settings.screen_preset ? g_settings.screen_StartX_lcd : g_settings.screen_StartX_crt;
+ g_settings.screen_StartY = g_settings.screen_preset ? g_settings.screen_StartY_lcd : g_settings.screen_StartY_crt;
+ g_settings.screen_EndX = g_settings.screen_preset ? g_settings.screen_EndX_lcd : g_settings.screen_EndX_crt;
+ g_settings.screen_EndY = g_settings.screen_preset ? g_settings.screen_EndY_lcd : g_settings.screen_EndY_crt;
+
+ CFrameBuffer::getInstance()->Clear();
+
+ g_settings.screen_height = 576;
+ g_settings.screen_width = 720;
+ g_settings.screen_xres = 100;
+ g_settings.screen_yres = 100;
+ }
+ else if (strstr(filename, "mgcamd") ||
+ strstr(filename, "newcs") ||
+ strstr(filename, "osemu") ||
+ strstr(filename, "doscam") ||
+ strstr(filename, "oscam") ||
+ strstr(filename, "cs2gbox") ||
+ strstr(filename, "gbox"))
+ {
+ CHintBox * hintbox = new CHintBox(LOCALE_CAMD_CONTROL, g_Locale->getText(LOCALE_CAMD_MSG_START));
+ hintbox->paint();
+
+ buf.str("");
+ buf << EMU_START_SCRIPT << " start " << filename;
+
+ printf("[ni_menu.cpp] executing %s\n", buf.str().c_str());
+ if (my_system(3, EMU_START_SCRIPT, "start", filename) != 0)
+ printf("[ni_menu.cpp] executing %s failed\n", buf.str().c_str());
+ sleep(1);
+ delete hintbox;
+ }
+ else if (strstr(filename, "lcd-weather"))
+ {
+ // do nothing
+ }
+ else if (strstr(filename, "lcd-clock_a"))
+ {
+ // do nothing
+ }
+ else if (strstr(filename, "hddpower"))
+ {
+ // do nothing
+ }
+ else
+ {
+ buf.str("");
+ buf << "service " << filename << " start";
+ printf("[ni_menu.cpp] executing %s\n", buf.str().c_str());
+
+ if (my_system(3, "service", filename, "start") != 0)
+ printf("[ni_menu.cpp] executing %s failed\n", buf.str().c_str());
+ }
+ }
+ }
+ else
+ {
+ buf.str("");
+ if (strstr(filename, "scart_osd_fix"))
+ {
+ //reset to defaults
+ g_settings.screen_StartX_crt = 60;
+ g_settings.screen_StartY_crt = 20;
+ g_settings.screen_EndX_crt = 1220;
+ g_settings.screen_EndY_crt = 560;
+
+ //set values
+ g_settings.screen_StartX = g_settings.screen_preset ? g_settings.screen_StartX_lcd : g_settings.screen_StartX_crt;
+ g_settings.screen_StartY = g_settings.screen_preset ? g_settings.screen_StartY_lcd : g_settings.screen_StartY_crt;
+ g_settings.screen_EndX = g_settings.screen_preset ? g_settings.screen_EndX_lcd : g_settings.screen_EndX_crt;
+ g_settings.screen_EndY = g_settings.screen_preset ? g_settings.screen_EndY_lcd : g_settings.screen_EndY_crt;
+
+ CFrameBuffer::getInstance()->Clear();
+
+ g_settings.screen_height = 720;
+ g_settings.screen_width = 1280;
+ g_settings.screen_xres = 112;
+ g_settings.screen_yres = 112;
+ }
+ else if (strstr(filename, "mgcamd") ||
+ strstr(filename, "newcs") ||
+ strstr(filename, "osemu") ||
+ strstr(filename, "doscam") ||
+ strstr(filename, "oscam") ||
+ strstr(filename, "cs2gbox") ||
+ strstr(filename, "gbox"))
+ {
+ CHintBox * hintbox = new CHintBox(LOCALE_CAMD_CONTROL, g_Locale->getText(LOCALE_CAMD_MSG_STOP));
+ hintbox->paint();
+
+ buf << EMU_START_SCRIPT << " stop " << filename;
+ printf("[ni_menu.cpp] executing %s\n", buf.str().c_str());
+ if (my_system(3, EMU_START_SCRIPT, "stop", filename) != 0)
+ printf("[ni_menu.cpp] executing %s failed\n", buf.str().c_str());
+ sleep(1);
+ delete hintbox;
+ }
+ else if (strstr(filename, "lcd-weather"))
+ {
+ // do nothing
+ }
+ else if (strstr(filename, "lcd-clock_a"))
+ {
+ // do nothing
+ }
+ else if (strstr(filename, "hddpower"))
+ {
+ // do nothing
+ }
+ else
+ {
+ buf << "service " << filename << " stop";
+ printf("[ni_menu.cpp] executing %s\n", buf.str().c_str());
+
+ if (my_system(3, "service", filename, "stop") != 0)
+ printf("[ni_menu.cpp] executing %s failed\n", buf.str().c_str());
+ }
+ remove(flag.c_str());
+ }
+ return menu_return::RETURN_REPAINT;
+}
+
+int CNIMenu::show()
+{
+ int shortcut = 1;
+ int cam_shortcut = 1;
+ int plugin_shortcut = 0;
+ int lcd4l_shortcut = 1;
+
+ std::ostringstream buf;
+ char *buffer;
+ ssize_t read;
+ size_t len;
+ FILE *fh;
+
+ CMenuWidget* ni_menu = new CMenuWidget(LOCALE_NIMENU_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_NI_MENU);
+ ni_menu->addIntroItems();
+
+ //apply settings
+ mf = new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "savesettings", CRCInput::RC_red);
+ mf->setHint(NEUTRINO_ICON_HINT_SAVE_SETTINGS, LOCALE_MENU_HINT_SAVE_SETTINGS);
+ ni_menu->addItem(mf);
+
+ // --- camd settings ---
+ ni_menu->addItem(new CMenuSeparator(CMenuSeparator::ALIGN_CENTER | CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_CAMD_CONTROL));
+
+ // camd reset
+ mf = new CMenuForwarder(LOCALE_CAMD_RESET, true, NULL, this, "camd_reset", CRCInput::convertDigitToKey(shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_CAMD_RESET);
+ ni_menu->addItem(mf);
+
+ // camd settings
+ CMenuWidget* emuMenu = new CMenuWidget(LOCALE_CAMD_CONTROL, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_CAMD_CONTROL);
+ emuMenu->addIntroItems();
+
+ for (unsigned int i = 0; i < MAXEMU; i++)
+ {
+ std::string vinfo = "";
+
+ buf.str("");
+ buf << "/var/bin/" << emu_menu[i].cam_file;
+
+ emu_menu[i].cam_exist = file_exists(buf.str().c_str());
+
+ if (emu_menu[i].cam_exist)
+ {
+ buf.str("");
+ buf << "vinfo " << emu_menu[i].cam_name << " /var/bin/" << emu_menu[i].cam_file;
+
+ buffer=NULL;
+ if ((fh = popen(buf.str().c_str(), "r")))
+ {
+ while ((read = getline(&buffer, &len, fh)) != -1)
+ vinfo += buffer;
+ pclose(fh);
+ if (buffer)
+ free(buffer);
+ }
+ else
+ printf("[vinfo] popen error\n" );
+ }
+
+ if (getpidof(emu_menu[i].cam_file))
+ emu_menu[i].flag_exist = 1;
+ else
+ emu_menu[i].flag_exist = 0;
+
+ //remove linebreaks from vinfo output
+ std::string::size_type spos = vinfo.find_first_of("\r\n");
+ while (spos != std::string::npos)
+ {
+ vinfo.replace(spos, 1, " ");
+ spos = vinfo.find_first_of("\r\n");
+ }
+
+
+ std::string hint(g_Locale->getText(emu_menu[i].hint));
+ hint.append("\nvinfo: " + vinfo);
+
+ mc = new CMenuOptionChooser(emu_menu[i].name, &emu_menu[i].flag_exist, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, emu_menu[i].cam_exist, new CNITouchFileNotifier(emu_menu[i].cam_file), CRCInput::convertDigitToKey(cam_shortcut++));
+ mc->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, hint);
+ emuMenu->addItem(mc);
+ }
+
+ mf = new CMenuForwarder(LOCALE_CAMD_CONTROL, true, NULL, emuMenu, "", CRCInput::convertDigitToKey(shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_CAMD);
+ ni_menu->addItem(mf);
+
+ // --- Special settings ---
+ ni_menu->addItem(new CMenuSeparator(CMenuSeparator::ALIGN_CENTER | CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_NIMENU_HEAD_SPECIAL));
+
+ // Infoicons Setup
+ CInfoIconsSetup infoicons_setup;
+ mf = new CMenuForwarder(LOCALE_INFOICONS_HEAD, true, NULL, &infoicons_setup, NULL, CRCInput::convertDigitToKey(shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INFOICONS_HEAD);
+ ni_menu->addItem(mf);
+
+ // NetFS Setup
+ CNETFSSetup netfs_setup;
+ mf = new CMenuForwarder(LOCALE_NETFS_MENU_MAIN_HEAD, true, NULL, &netfs_setup, NULL, CRCInput::convertDigitToKey(shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_NETFS_MENU_MAIN_HEAD);
+ ni_menu->addItem(mf);
+
+ // Plugin Menu
+ CMenuWidget* pluginMenu = new CMenuWidget(LOCALE_PLUGINS_CONTROL, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_PLUGINS_CONTROL);
+ pluginMenu->addIntroItems();
+
+ // Plugins for usermenu
+ CPluginsHideMenu pluginsHideMenu;
+ mf = new CMenuForwarder(LOCALE_PLUGINS_HIDE, true, NULL, &pluginsHideMenu, NULL, CRCInput::RC_blue);
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_PLUGINS_HIDE);
+ pluginMenu->addItem(mf);
+ pluginMenu->addItem(GenericMenuSeparatorLine);
+
+ // Plugin service
+ for (unsigned int i = 0; i < MAXPLUGIN; i++)
+ {
+ buf.str("");
+ buf << "/var/etc/." << plugin_menu[i].flag;
+
+ plugin_menu[i].flag_exist=file_exists(buf.str().c_str());
+ CNITouchFileNotifier * pluginFileNotifier = new CNITouchFileNotifier(plugin_menu[i].flag);
+
+ mc = new CMenuOptionChooser(plugin_menu[i].name, &plugin_menu[i].flag_exist, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, pluginFileNotifier, CRCInput::convertDigitToKey(plugin_shortcut++));
+ mc->setHint(plugin_menu[i].icon, plugin_menu[i].desc);
+ pluginMenu->addItem(mc);
+ }
+
+ mf = new CMenuForwarder(LOCALE_PLUGINS_CONTROL, true, NULL, pluginMenu, "", CRCInput::convertDigitToKey(shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_PLUGINS_CONTROL);
+ ni_menu->addItem(mf);
+
+ // lcd4l menu
+ CMenuWidget* lcd4lMenu = new CMenuWidget(LOCALE_LCD4L_SUPPORT, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_LCD4L_CONTROL);
+ lcd4lMenu->addIntroItems();
+
+ int temp_lcd4l_skin = g_settings.lcd4l_skin;
+ int flag_lcd4l_weather = file_exists(FLAG_DIR ".lcd-weather");
+ int flag_lcd4l_clock_a = file_exists(FLAG_DIR ".lcd-clock_a");
+
+ mc = new CMenuOptionChooser(LOCALE_LCD4L_SUPPORT, &g_settings.lcd4l_support, LCD4L_SUPPORT_OPTIONS, LCD4L_SUPPORT_OPTION_COUNT, true, this, CRCInput::RC_red);
+ mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_SUPPORT);
+ lcd4lMenu->addItem(mc);
+ lcd4lMenu->addItem(GenericMenuSeparatorLine);
+
+ mf = new CMenuForwarder(LOCALE_LCD4L_LOGODIR, true, g_settings.lcd4l_logodir, this, "lcd4l_logodir", CRCInput::convertDigitToKey(lcd4l_shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_LOGODIR);
+ lcd4lMenu->addItem(mf);
+
+ mc = new CMenuOptionChooser(LOCALE_LCD4L_SKIN, &temp_lcd4l_skin, LCD4L_SKIN_OPTIONS, LCD4L_SKIN_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(lcd4l_shortcut++));
+ mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_SKIN);
+ lcd4lMenu->addItem(mc);
+
+ mc = new CMenuOptionChooser(LOCALE_LCD4L_SKIN_RADIO, &g_settings.lcd4l_skin_radio, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(lcd4l_shortcut++));
+ mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_SKIN_RADIO);
+ lcd4lMenu->addItem(mc);
+
+ CNITouchFileNotifier * lcd_weatherFileNotifier = new CNITouchFileNotifier("lcd-weather");
+ mc = new CMenuOptionChooser(LOCALE_LCD4L_WEATHER, &flag_lcd4l_weather, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, (file_exists("/share/lcd/scripts/weather")), lcd_weatherFileNotifier, CRCInput::convertDigitToKey(lcd4l_shortcut++));
+ mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_WEATHER);
+ lcd4lMenu->addItem(mc);
+
+ CNITouchFileNotifier * lcd_clock_aFileNotifier = new CNITouchFileNotifier("lcd-clock_a");
+ mc = new CMenuOptionChooser(LOCALE_LCD4L_CLOCK_A, &flag_lcd4l_clock_a, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, lcd_clock_aFileNotifier, CRCInput::convertDigitToKey(lcd4l_shortcut++));
+ mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_CLOCK_A);
+ lcd4lMenu->addItem(mc);
+
+ mf = new CMenuForwarder(LOCALE_LCD4L_SUPPORT, true, NULL, lcd4lMenu, "", CRCInput::convertDigitToKey(shortcut++));
+ mf->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_SUPPORT);
+ ni_menu->addItem(mf);
+
+ //add I_TYPE_NI_MENU plugins
+ ni_menu->integratePlugins(CPlugins::I_TYPE_NI_MENU, shortcut);
+
+ int res = ni_menu->exec(NULL, "");
+
+ ni_menu->hide();
+ delete ni_menu;
+ delete emuMenu;
+ delete pluginMenu;
+ delete lcd4lMenu;
+
+ // the things to do on exit
+
+ if (g_settings.lcd4l_skin != temp_lcd4l_skin)
+ {
+ g_settings.lcd4l_skin = temp_lcd4l_skin;
+ LCD4l->InitLCD4l();
+ }
+
+ return res;
+}
diff --git a/src/gui/ni_menu.h b/src/gui/ni_menu.h
new file mode 100644
index 000000000..8ad6aa750
--- /dev/null
+++ b/src/gui/ni_menu.h
@@ -0,0 +1,62 @@
+/*
+ ni_menu
+
+ (C) 2009-2016 NG-Team
+ (C) 2016 NI-Team
+
+ 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 __ni_menu__
+#define __ni_menu__
+
+#include
+
+#define SCRIPT_DIR "/etc/init.d/"
+#define EMU_DIR "/var/bin/"
+#define FLAG_DIR "/var/etc/"
+#define EMU_START_SCRIPT SCRIPT_DIR "emu"
+
+using namespace std;
+
+class CNITouchFileNotifier : public CChangeObserver
+{
+ const char * filename;
+ public:
+ inline CNITouchFileNotifier(const char * file_name) { filename = file_name; };
+ bool changeNotify(const neutrino_locale_t, void * data);
+};
+
+class CNIMenu : public CMenuTarget, CChangeObserver
+{
+ private:
+ CMenuOptionChooser *mc;
+ CMenuForwarder * mf;
+
+ int width;
+ int show();
+
+ public:
+ CNIMenu();
+ ~CNIMenu();
+ static CNIMenu* getInstance();
+ int exec(CMenuTarget* parent, const std::string &actionkey);
+ virtual bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/);
+};
+
+#endif
diff --git a/src/gui/osd_progressbar_setup.cpp b/src/gui/osd_progressbar_setup.cpp
index 6f2dac976..a1c2c0dce 100644
--- a/src/gui/osd_progressbar_setup.cpp
+++ b/src/gui/osd_progressbar_setup.cpp
@@ -45,8 +45,9 @@
#define _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_2
#define _LOCALE_PROGRESSBAR_COLOR_FULL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_3
#define _LOCALE_PROGRESSBAR_COLOR_MONO LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_4
+#define _LOCALE_PROGRESSBAR_COLOR_GRAPHIC LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_5 //NI
-#define PROGRESSBAR_COLOR_OPTION_COUNT 6
+#define PROGRESSBAR_COLOR_OPTION_COUNT 7 //NI
const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPTION_COUNT] =
{
{ CProgressBar::PB_OFF, LOCALE_OPTIONS_OFF },
@@ -55,6 +56,7 @@ const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPT
{ CProgressBar::PB_LINES_V, _LOCALE_PROGRESSBAR_COLOR_VERTICAL },
{ CProgressBar::PB_LINES_H, _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL },
{ CProgressBar::PB_COLOR, _LOCALE_PROGRESSBAR_COLOR_FULL },
+ { CProgressBar::PB_GRAPHIC, _LOCALE_PROGRESSBAR_COLOR_GRAPHIC } //NI
};
#define PROGRESSBAR_TIMESCALE_INVERT_OPTION_COUNT 2
diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp
index 276302e5d..3c010c44c 100644
--- a/src/gui/osd_setup.cpp
+++ b/src/gui/osd_setup.cpp
@@ -47,6 +47,8 @@
#include