From 7c5d29a687fc0b9808962fbbbc855fc5d923988b Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Fri, 21 Feb 2014 00:00:37 +0100 Subject: [PATCH 01/23] hddmenu: Support ext4 for formating disk - Support ext4 for formating disk (require /sbin/mkfs.ext4) - Support ext4 for check disk (require /sbin/fsck.ext4 or /sbin/e2fsck) - Display disk format in menu (require /sbin/blkid) - 'ext4' and 'display disk format' disabled when required files not present --- data/locale/deutsch.locale | 6 +- data/locale/english.locale | 6 +- src/gui/hdd_menu.cpp | 127 +++++++++++++++++++++++++++++-------- src/gui/hdd_menu.h | 7 ++ src/system/locals.h | 4 +- src/system/locals_intern.h | 4 +- 6 files changed, 118 insertions(+), 36 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 7fb113b8b..7364b7a54 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -611,18 +611,17 @@ hdd_60min 60 min. hdd_activate Übernehmen hdd_check Dateisystemprüfung hdd_check_failed Festplattenprüfung fehlgeschlagen -hdd_ext3 ext3 +hdd_check_format_bad Überprüfung von Datenträgern mit Format %s wird nicht unterstützt. hdd_extended_settings Erweiterte Festplatteneinstellungen hdd_fast Schnell hdd_format Formatiere Festplatte hdd_format_failed Formatierung fehlgeschlagen hdd_format_warn Formatierung wird gestartet -hdd_fs Dateisystem +hdd_fs Dateisystem zum formatieren hdd_manage Laufwerke verwalten hdd_middle Mittel hdd_noise Akustikkontrolle (AAM) hdd_not_found Keine Festplatte -hdd_reiser ReiserFS hdd_removable_device Wechseldatenträger hdd_settings Laufwerke hdd_sleep Ausschalten nach... @@ -862,6 +861,7 @@ menu.hint_games Zeige Liste der installierten Spiele menu.hint_hdd Formatierung und Prüfung der Datenträger 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_sleep Dieser Wert definiert, nach wieviel Minuten die Festplatte bei Inaktivität in den Sleep-Modus geschaltet wird diff --git a/data/locale/english.locale b/data/locale/english.locale index c3b65d989..689ef1bf5 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -611,18 +611,17 @@ hdd_60min 60 min. hdd_activate Apply settings hdd_check Check filesystem hdd_check_failed HDD-check failed! -hdd_ext3 ext3 +hdd_check_format_bad Checking of disks with format %s is not supported. hdd_extended_settings Extended HDD-Settings hdd_fast Fast hdd_format Formating drive... hdd_format_failed Formating failed! hdd_format_warn Start format... -hdd_fs Filesystem +hdd_fs Filesystem used to format hdd_manage Manage drives hdd_middle Mid hdd_noise Acoustic-control (AAM) hdd_not_found No HDD found -hdd_reiser ReiserFS hdd_removable_device Removable device hdd_settings Hard Disk Drive/USB hdd_sleep Switch off after... @@ -862,6 +861,7 @@ menu.hint_games Show list of installed games menu.hint_hdd Format / check hard disk drive menu.hint_hdd_apply Apply sleep/noise parameters menu.hint_hdd_check Check filesystem (fsck) +menu.hint_hdd_fmt Select the disk format menu.hint_hdd_format Create HDD partition and format it menu.hint_hdd_noise Set Automatic Acoustic Management\nnot all drives support this menu.hint_hdd_sleep Select time to stop hdd on inactivity diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 9c3dd1852..0087c5219 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -55,6 +55,13 @@ #include #include +#define e2fsckBinary "/sbin/e2fsck" +#define ext3FsckBinary "/sbin/fsck.ext3" +#define ext4FsckBinary "/sbin/fsck.ext4" +#define ext3MkfsBinary "/sbin/mkfs.ext3" +#define ext4MkfsBinary "/sbin/mkfs.ext4" +#define blkidBinary "/sbin/blkid" + #define HDD_NOISE_OPTION_COUNT 4 const CMenuOptionChooser::keyval HDD_NOISE_OPTIONS[HDD_NOISE_OPTION_COUNT] = { @@ -64,12 +71,11 @@ const CMenuOptionChooser::keyval HDD_NOISE_OPTIONS[HDD_NOISE_OPTION_COUNT] = { 254, LOCALE_HDD_FAST } }; -#define HDD_FILESYS_OPTION_COUNT 3 -const CMenuOptionChooser::keyval HDD_FILESYS_OPTIONS[HDD_FILESYS_OPTION_COUNT] = +#define HDD_FILESYS_OPTION_COUNT 2 +const CMenuOptionChooser::keyval_ext HDD_FILESYS_OPTIONS[HDD_FILESYS_OPTION_COUNT] = { - { 0, LOCALE_HDD_EXT3 }, - { 1, LOCALE_HDD_REISER }, - { 2, LOCALE_OPTIONS_OFF } + { fs_ext3, NONEXISTANT_LOCALE, "ext3" }, + { fs_ext4, NONEXISTANT_LOCALE, "ext4" } }; #define HDD_SLEEP_OPTION_COUNT 6 const CMenuOptionChooser::keyval HDD_SLEEP_OPTIONS[HDD_SLEEP_OPTION_COUNT] = @@ -90,6 +96,27 @@ static int my_filter(const struct dirent * dent) return 0; } +std::string getFmtType(const char* name, int num) +{ + pid_t pid; + std::string ret = ""; + std::string pcmd = blkidBinary + (std::string)" -s TYPE /dev/" + (std::string)name + to_string(num); + dprintf(DEBUG_INFO, ">>>>>[%s #%d] pcmd: %s\n", __func__, __LINE__, pcmd.c_str()); + FILE* f = my_popen(pid, pcmd.c_str(), "r"); + if (f != NULL) { + char buff[512]; + fgets(buff, sizeof(buff), f); + fclose(f); + ret = buff; + std::string search = "TYPE=\""; + size_t pos = ret.find(search); + ret = ret.substr(pos + search.length()); + pos = ret.find("\""); + ret = ret.substr(0, pos); + } + return ret; +} + CHDDMenuHandler::CHDDMenuHandler() { width = w_max (58, 10); @@ -117,6 +144,9 @@ int CHDDMenuHandler::doMenu () struct stat s; int root_dev = -1; + bool ext4MkfsBinaryExist = (!access(ext4MkfsBinary, X_OK)); + bool blkidBinaryExist = (!access(blkidBinary, X_OK)); + bool hdd_found = 0; int n = scandir("/sys/block", &namelist, my_filter, alphasort); @@ -226,12 +256,27 @@ int CHDDMenuHandler::doMenu () bool enabled = !CNeutrinoApp::getInstance()->recordingstatus && !removable && !isroot; - snprintf(str, sizeof(str), "%s %s %ld %s", vendor, model, (long)(megabytes < 10000 ? megabytes : megabytes/1000), megabytes < 10000 ? "MB" : "GB"); + std::string fmt_type = ""; + if (blkidBinaryExist) + fmt_type = getFmtType(namelist[i]->d_name, 1); + std::string tmpType = (fmt_type == "") ? "" : " (" + fmt_type + (std::string)")"; + + snprintf(str, sizeof(str), "%s %s %ld %s%s", vendor, model, (long)(megabytes < 10000 ? megabytes : megabytes/1000), megabytes < 10000 ? "MB" : "GB", tmpType.c_str()); printf("HDD: %s\n", str); tmp_str[i]=str; tempMenu[i] = new CMenuWidget(str, NEUTRINO_ICON_SETTINGS); tempMenu[i]->addIntroItems(); - //tempMenu->addItem( new CMenuOptionChooser(LOCALE_HDD_FS, &g_settings.hdd_fs, HDD_FILESYS_OPTIONS, HDD_FILESYS_OPTION_COUNT, true)); + if (fmt_type == "ext3") + g_settings.hdd_fs = fs_ext3; + else if (fmt_type == "ext4") + g_settings.hdd_fs = fs_ext4; + else + g_settings.hdd_fs = fs_ext3; + if (!ext4MkfsBinaryExist) + g_settings.hdd_fs = fs_ext3; + mc = new CMenuOptionChooser(LOCALE_HDD_FS, &g_settings.hdd_fs, HDD_FILESYS_OPTIONS, HDD_FILESYS_OPTION_COUNT, ext4MkfsBinaryExist); + mc->setHint("", LOCALE_MENU_HINT_HDD_FMT); + tempMenu[i]->addItem(mc); mf = new CMenuForwarder(LOCALE_HDD_FORMAT, true, "", &fmtexec, namelist[i]->d_name); mf->setHint("", LOCALE_MENU_HINT_HDD_FORMAT); @@ -412,11 +457,11 @@ int CHDDFmtExec::exec(CMenuTarget* /*parent*/, const std::string& key) //sleep(1); switch(g_settings.hdd_fs) { - case 0: - snprintf(cmd, sizeof(cmd), "/sbin/mkfs.ext3 -T largefile -m0 %s", src); + case fs_ext3: + snprintf(cmd, sizeof(cmd), "%s -T largefile -m0 %s", ext3MkfsBinary, src); break; - case 1: - snprintf(cmd, sizeof(cmd), "/sbin/mkreiserfs -f -f %s", src); + case fs_ext4: + snprintf(cmd, sizeof(cmd), "%s -T largefile -m0 %s", ext4MkfsBinary, src); break; default: return 0; @@ -506,13 +551,13 @@ _remount: delete progress; switch(g_settings.hdd_fs) { - case 0: + case fs_ext3: safe_mkdir(dst); res = mount(src, dst, "ext3", 0, NULL); break; - case 1: + case fs_ext4: safe_mkdir(dst); - res = mount(src, dst, "reiserfs", 0, NULL); + res = mount(src, dst, "ext4", 0, NULL); break; default: break; @@ -558,6 +603,26 @@ int CHDDChkExec::exec(CMenuTarget* /*parent*/, const std::string& key) int oldpass = 0, pass, step, total; int percent = 0, opercent = 0; + bool ext4FsckBinaryExist = (!access(ext4FsckBinary, X_OK)); + bool e2fsckBinaryExist = (!access(e2fsckBinary, X_OK)); + bool blkidBinaryExist = (!access(blkidBinary, X_OK)); + + if (blkidBinaryExist) { + std::string fmt_type = getFmtType(key.c_str(), 1); + if (((fmt_type != "ext2") && (fmt_type != "ext3") && (fmt_type != "ext4")) || + ((fmt_type == "ext4") && (!ext4FsckBinaryExist) && (!e2fsckBinaryExist))) { + + char msg1[512], msg2[512]; + snprintf(msg1, sizeof(msg1)-1, "%s", g_Locale->getText(LOCALE_HDD_CHECK_FORMAT_BAD)); + snprintf(msg2, sizeof(msg2)-1, msg1, fmt_type.c_str()); + hintbox = new CHintBox(LOCALE_HDD_CHECK, msg2); + hintbox->paint(); + sleep(3); + delete hintbox; + return menu_return::RETURN_REPAINT; + } + } + snprintf(src, sizeof(src), "/dev/%s1", key.c_str()); snprintf(dst, sizeof(dst), "/media/%s1", key.c_str()); @@ -576,15 +641,25 @@ printf("CHDDChkExec: key %s\n", key.c_str()); return menu_return::RETURN_REPAINT; } - switch(g_settings.hdd_fs) { - case 0: - snprintf(cmd, sizeof(cmd), "/sbin/fsck.ext3 -C 1 -f -y %s", src); - break; - case 1: - snprintf(cmd, sizeof(cmd), "/sbin/reiserfsck --fix-fixable %s", src); - break; - default: - return 0; + if (e2fsckBinaryExist) { + snprintf(cmd, sizeof(cmd), "%s -C 1 -f -y %s", e2fsckBinary, src); + } else { + snprintf(cmd, sizeof(cmd), "%s -C 1 -f -y %s", ext3FsckBinary, src); + if ((ext4FsckBinaryExist) && (g_settings.hdd_fs == fs_ext4)) + snprintf(cmd, sizeof(cmd), "%s -C 1 -f -y %s", ext4FsckBinary, src); + +#if 0 + switch(g_settings.hdd_fs) { + case fs_ext3: + snprintf(cmd, sizeof(cmd), "%s -C 1 -f -y %s", ext3FsckBinary, src); + break; + case fs_ext4: + snprintf(cmd, sizeof(cmd), "%s -C 1 -f -y %s", ext4FsckBinary, src); + break; + default: + return 0; + } +#endif } printf("CHDDChkExec: Executing %s\n", cmd); @@ -636,13 +711,13 @@ printf("CHDDChkExec: key %s\n", key.c_str()); ret1: switch(g_settings.hdd_fs) { - case 0: + case fs_ext3: safe_mkdir(dst); res = mount(src, dst, "ext3", 0, NULL); break; - case 1: + case fs_ext4: safe_mkdir(dst); - res = mount(src, dst, "reiserfs", 0, NULL); + res = mount(src, dst, "ext4", 0, NULL); break; default: break; diff --git a/src/gui/hdd_menu.h b/src/gui/hdd_menu.h index ce80e7470..cd91e8ac9 100644 --- a/src/gui/hdd_menu.h +++ b/src/gui/hdd_menu.h @@ -28,6 +28,13 @@ using namespace std; +enum { + fs_ext3, + fs_ext4, + + fs_max +}; + class CHDDDestExec : public CMenuTarget { public: diff --git a/src/system/locals.h b/src/system/locals.h index 3e94dbda8..0525619d2 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -638,7 +638,7 @@ typedef enum LOCALE_HDD_ACTIVATE, LOCALE_HDD_CHECK, LOCALE_HDD_CHECK_FAILED, - LOCALE_HDD_EXT3, + LOCALE_HDD_CHECK_FORMAT_BAD, LOCALE_HDD_EXTENDED_SETTINGS, LOCALE_HDD_FAST, LOCALE_HDD_FORMAT, @@ -649,7 +649,6 @@ typedef enum LOCALE_HDD_MIDDLE, LOCALE_HDD_NOISE, LOCALE_HDD_NOT_FOUND, - LOCALE_HDD_REISER, LOCALE_HDD_REMOVABLE_DEVICE, LOCALE_HDD_SETTINGS, LOCALE_HDD_SLEEP, @@ -889,6 +888,7 @@ typedef enum LOCALE_MENU_HINT_HDD, LOCALE_MENU_HINT_HDD_APPLY, LOCALE_MENU_HINT_HDD_CHECK, + LOCALE_MENU_HINT_HDD_FMT, LOCALE_MENU_HINT_HDD_FORMAT, LOCALE_MENU_HINT_HDD_NOISE, LOCALE_MENU_HINT_HDD_SLEEP, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index cdfab817f..50df4d51a 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -638,7 +638,7 @@ const char * locale_real_names[] = "hdd_activate", "hdd_check", "hdd_check_failed", - "hdd_ext3", + "hdd_check_format_bad", "hdd_extended_settings", "hdd_fast", "hdd_format", @@ -649,7 +649,6 @@ const char * locale_real_names[] = "hdd_middle", "hdd_noise", "hdd_not_found", - "hdd_reiser", "hdd_removable_device", "hdd_settings", "hdd_sleep", @@ -889,6 +888,7 @@ const char * locale_real_names[] = "menu.hint_hdd", "menu.hint_hdd_apply", "menu.hint_hdd_check", + "menu.hint_hdd_fmt", "menu.hint_hdd_format", "menu.hint_hdd_noise", "menu.hint_hdd_sleep", From c4bff391a5b5520f3bb340988a71ebe06fa0fd71 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Fri, 21 Feb 2014 00:00:45 +0100 Subject: [PATCH 02/23] CComponentsButton: Incrase height for btn font --- src/gui/components/cc_frm_button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 37ea6c3d7..005455d5a 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -167,7 +167,7 @@ void CComponentsButton::initCaption() //set properties to label object if (cc_btn_capt_obj){ int cap_w = width - 2*fr_thickness - face_w; - int cap_h = height - 2*fr_thickness - 2*H_SPACE; + int cap_h = height - 2*fr_thickness - H_SPACE; if (cc_btn_icon_obj){ cc_btn_icon_obj->setXPos(cap_x); cap_x += face_w + H_SPACE; From 3f0400a23ebfee9d712dbbf8c0180c78f7ceb3fe Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Fri, 21 Feb 2014 00:00:51 +0100 Subject: [PATCH 03/23] Fix compiler warnings (-Wfloat-equal) --- src/gui/color.cpp | 8 ++++++-- src/gui/luainstance.cpp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/color.cpp b/src/gui/color.cpp index 7bc2ec4d0..5fa46f4ec 100644 --- a/src/gui/color.cpp +++ b/src/gui/color.cpp @@ -35,7 +35,11 @@ #include #include +#include +#ifndef FLT_EPSILON +#define FLT_EPSILON 1E-5 +#endif int convertSetupColor2RGB(const unsigned char r, const unsigned char g, const unsigned char b) { @@ -145,7 +149,7 @@ void Hsv2Rgb(HsvColor *hsv, RgbColor *rgb) float f_H = hsv->h; float f_S = hsv->s; float f_V = hsv->v; - if (f_S == 0) { + if (fabsf(f_S) < FLT_EPSILON) { rgb->r = (uint8_t)(f_V * 255); rgb->g = (uint8_t)(f_V * 255); rgb->b = (uint8_t)(f_V * 255); @@ -204,7 +208,7 @@ void Rgb2Hsv(RgbColor *rgb, HsvColor *hsv) float f_H = 0; float f_S = 0; - if (delta == 0) { //gray + if (fabsf(delta) < FLT_EPSILON) { //gray f_S = 0; f_H = 0; } else { diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 96a9f0aa1..c8c476899 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -667,7 +667,7 @@ bool CLuaMenuChangeObserver::changeNotify(lua_State *L, const std::string &luaAc lua_pcall(L, 2 /* two args */, 1 /* one result */, 0); double res = lua_isnumber(L, -1) ? lua_tonumber(L, -1) : 0; lua_pop(L, 2); - return ((res == menu_return::RETURN_REPAINT) || (res == menu_return::RETURN_EXIT_REPAINT)); + return (((int)res == menu_return::RETURN_REPAINT) || ((int)res == menu_return::RETURN_EXIT_REPAINT)); } void CLuaInstance::MenuRegister(lua_State *L) From 6475e77a843fd58b521713d167ecab4106aed1f4 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Fri, 21 Feb 2014 00:00:56 +0100 Subject: [PATCH 04/23] CLuaInstance: Add function getRenderWidth() --- src/gui/luainstance.cpp | 19 +++++++++++++++++++ src/gui/luainstance.h | 1 + 2 files changed, 20 insertions(+) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index c8c476899..0a0c7bb1c 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -340,6 +340,7 @@ const luaL_Reg CLuaInstance::methods[] = { "PaintIcon", CLuaInstance::PaintIcon }, { "GetInput", CLuaInstance::GetInput }, { "FontHeight", CLuaInstance::FontHeight }, + { "getRenderWidth", CLuaInstance::getRenderWidth }, { "GetSize", CLuaInstance::GetSize }, { "DisplayImage", CLuaInstance::DisplayImage }, { "Blit", CLuaInstance::Blit }, @@ -555,6 +556,24 @@ int CLuaInstance::RenderString(lua_State *L) return 1; } +int CLuaInstance::getRenderWidth(lua_State *L) +{ + int f; + const char *text; + DBG("CLuaInstance::%s %d\n", __func__, lua_gettop(L)); + + CLuaData *W = CheckData(L, 1); + if (!W) + return 0; + f = luaL_checkint(L, 2); /* font number, use FONT['xxx'] for FONT_TYPE_xxx in the script */ + text = luaL_checkstring(L, 3); /* text */ + if (f >= SNeutrinoSettings::FONT_TYPE_COUNT || f < 0) + f = SNeutrinoSettings::FONT_TYPE_MENU; + + lua_pushinteger(L, (int)g_Font[f]->getRenderWidth(text, true)); + return 1; +} + int CLuaInstance::GetInput(lua_State *L) { int numargs = lua_gettop(L); diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index 74c155fe0..911192282 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -155,6 +155,7 @@ private: static int PaintBox(lua_State *L); static int PaintIcon(lua_State *L); static int RenderString(lua_State *L); + static int getRenderWidth(lua_State *L); static int FontHeight(lua_State *L); static int GetInput(lua_State *L); static int GCWindow(lua_State *L); From cc7e1136ec3f97acdf89b426541e11550f52e8f4 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Fri, 21 Feb 2014 00:00:59 +0100 Subject: [PATCH 05/23] CLuaInstance: Add various CComponentsText fuctions - Added: new, paint, hide, scroll --- src/gui/luainstance.cpp | 149 ++++++++++++++++++++++++++++++++++++++++ src/gui/luainstance.h | 16 +++++ 2 files changed, 165 insertions(+) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 0a0c7bb1c..e6037f135 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -388,6 +388,7 @@ void CLuaInstance::registerFunctions() HintboxRegister(lua); MessageboxRegister(lua); CWindowRegister(lua); + ComponentsTextRegister(lua); SignalBoxRegister(lua); } @@ -1442,3 +1443,151 @@ int CLuaInstance::SignalBoxDelete(lua_State *L) } // -------------------------------------------------------------------------------- + +CLuaComponentsText *CLuaInstance::ComponentsTextCheck(lua_State *L, int n) +{ + return *(CLuaComponentsText **) luaL_checkudata(L, n, "componentstext"); +} + +void CLuaInstance::ComponentsTextRegister(lua_State *L) +{ + luaL_Reg meth[] = { + { "new", CLuaInstance::ComponentsTextNew }, + { "paint", CLuaInstance::ComponentsTextPaint }, + { "hide", CLuaInstance::ComponentsTextHide }, + { "scroll", CLuaInstance::ComponentsTextScroll }, + { "__gc", CLuaInstance::ComponentsTextDelete }, + { NULL, NULL } + }; + + luaL_newmetatable(L, "componentstext"); + luaL_setfuncs(L, meth, 0); + lua_pushvalue(L, -1); + lua_setfield(L, -1, "__index"); + lua_setglobal(L, "componentstext"); +} + +int CLuaInstance::ComponentsTextNew(lua_State *L) +{ + lua_assert(lua_istable(L,1)); + + int x=10, y=10, dx=100, dy=100; + std::string text = ""; + std::string tmpMode = ""; + int mode = CTextBox::AUTO_WIDTH; + int font_text = SNeutrinoSettings::FONT_TYPE_MENU; + lua_Integer color_text = (lua_Integer)COL_MENUCONTENT_TEXT; + lua_Integer color_frame = (lua_Integer)COL_MENUCONTENT_PLUS_6; + lua_Integer color_body = (lua_Integer)COL_MENUCONTENT_PLUS_0; + lua_Integer color_shadow = (lua_Integer)COL_MENUCONTENTDARK_PLUS_0; + std::string tmp1 = "false"; + + tableLookup(L, "x" , x); + tableLookup(L, "y" , y); + tableLookup(L, "dx" , dx); + tableLookup(L, "dy" , dy); + tableLookup(L, "text" , text); + tableLookup(L, "mode" , tmpMode); + tableLookup(L, "font_text" , font_text); + if (font_text >= SNeutrinoSettings::FONT_TYPE_COUNT || font_text < 0) + font_text = SNeutrinoSettings::FONT_TYPE_MENU; + tableLookup(L, "has_shadow" , tmp1); + bool has_shadow = (tmp1 == "true" || tmp1 == "1" || tmp1 == "yes"); + tableLookup(L, "color_text" , color_text); + tableLookup(L, "color_frame" , color_frame); + tableLookup(L, "color_body" , color_body); + tableLookup(L, "color_shadow", color_shadow); + + if (!tmpMode.empty()) { + table_key txt_align[] = { + { "ALIGN_AUTO_WIDTH", CTextBox::AUTO_WIDTH }, + { "ALIGN_AUTO_HIGH", CTextBox::AUTO_HIGH }, + { "ALIGN_SCROLL", CTextBox::SCROLL }, + { "ALIGN_CENTER", CTextBox::CENTER }, + { "ALIGN_RIGHT", CTextBox::RIGHT }, + { "ALIGN_TOP", CTextBox::TOP }, + { "ALIGN_BOTTOM", CTextBox::BOTTOM }, + { "ALIGN_NO_AUTO_LINEBREAK", CTextBox::NO_AUTO_LINEBREAK }, + { NULL, 0 } + }; + mode = 0; + for (int i = 0; txt_align[i].name; i++) { + if (tmpMode.find(txt_align[i].name) != std::string::npos) + mode |= txt_align[i].code; + } + } + + CLuaComponentsText **udata = (CLuaComponentsText **) lua_newuserdata(L, sizeof(CLuaComponentsText *)); + *udata = new CLuaComponentsText(); + (*udata)->ct = new CComponentsText(x, y, dx, dy, text, mode, g_Font[font_text], has_shadow, (fb_pixel_t)color_text, (fb_pixel_t)color_frame, (fb_pixel_t)color_body, (fb_pixel_t)color_shadow); + luaL_getmetatable(L, "componentstext"); + lua_setmetatable(L, -2); + return 1; +} + +int CLuaInstance::ComponentsTextPaint(lua_State *L) +{ + lua_assert(lua_istable(L,1)); + std::string tmp = "true"; + tableLookup(L, "do_save_bg", tmp); + bool do_save_bg = (tmp == "true" || tmp == "1" || tmp == "yes"); + + CLuaComponentsText *m = ComponentsTextCheck(L, 1); + if (!m) + return 0; + + m->ct->paint(do_save_bg); + return 0; +} + +int CLuaInstance::ComponentsTextHide(lua_State *L) +{ + lua_assert(lua_istable(L,1)); + std::string tmp = "false"; + tableLookup(L, "no_restore", tmp); + bool no_restore = (tmp == "true" || tmp == "1" || tmp == "yes"); + + CLuaComponentsText *m = ComponentsTextCheck(L, 1); + if (!m) + return 0; + + m->ct->hide(no_restore); + return 0; +} + +int CLuaInstance::ComponentsTextScroll(lua_State *L) +{ + lua_assert(lua_istable(L,1)); + std::string tmp = "true"; + tableLookup(L, "dir", tmp); + bool scrollDown = (tmp == "down" || tmp == "1"); + + CLuaComponentsText *m = ComponentsTextCheck(L, 1); + if (!m) + return 0; + + //get the textbox instance from lua object and use CTexBbox scroll methods + CTextBox* ctb = m->ct->getCTextBoxObject(); + if (ctb) { + ctb->enableBackgroundPaint(true); + if (scrollDown) + ctb->scrollPageDown(1); + else + ctb->scrollPageUp(1); + ctb->enableBackgroundPaint(false); + } + return 0; +} + +int CLuaInstance::ComponentsTextDelete(lua_State *L) +{ + CLuaComponentsText *m = ComponentsTextCheck(L, 1); + if (!m) + return 0; + + m->ct->kill(); + delete m; + return 0; +} + +// -------------------------------------------------------------------------------- diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index 911192282..48c0afcfd 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -134,6 +134,14 @@ class CLuaSignalBox ~CLuaSignalBox() { delete s; } }; +class CLuaComponentsText +{ + public: + CComponentsText *ct; + CLuaComponentsText() { ct = NULL; } + ~CLuaComponentsText() { delete ct; } +}; + /* inspired by Steve Kemp http://www.steve.org.uk/ */ class CLuaInstance @@ -198,6 +206,14 @@ private: static int SignalBoxPaint(lua_State *L); static int SignalBoxDelete(lua_State *L); + static CLuaComponentsText *ComponentsTextCheck(lua_State *L, int n); + static void ComponentsTextRegister(lua_State *L); + static int ComponentsTextNew(lua_State *L); + static int ComponentsTextPaint(lua_State *L); + static int ComponentsTextHide(lua_State *L); + static int ComponentsTextScroll(lua_State *L); + static int ComponentsTextDelete(lua_State *L); + static bool tableLookup(lua_State*, const char*, std::string&); static bool tableLookup(lua_State*, const char*, int&); }; From a3d9bff44e39c2336e83d0aeb4c0d8d7cab2f6c5 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Fri, 21 Feb 2014 00:01:04 +0100 Subject: [PATCH 06/23] CLuaInstance: Add various CComponentsWindow fuctions - Added: color buttons for footer, header_height --- src/gui/luainstance.cpp | 50 ++++++++++++++++++++++++++++++++++++++--- src/gui/luainstance.h | 1 + 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index e6037f135..699b2ba21 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -1291,12 +1291,10 @@ void CLuaInstance::CWindowRegister(lua_State *L) { "new", CLuaInstance::CWindowNew }, { "paint", CLuaInstance::CWindowPaint }, { "hide", CLuaInstance::CWindowHide }, + { "header_height", CLuaInstance::CWindowGetHeaderHeight }, { "__gc", CLuaInstance::CWindowDelete }, { NULL, NULL } }; -#if 0 - { "exec", CLuaInstance::CWindowExec }, -#endif luaL_newmetatable(L, "cwindow"); luaL_setfuncs(L, meth, 0); @@ -1310,6 +1308,10 @@ int CLuaInstance::CWindowNew(lua_State *L) lua_assert(lua_istable(L,1)); std::string name, icon = std::string(NEUTRINO_ICON_INFO); + std::string btnRed = ""; + std::string btnGreen = ""; + std::string btnYellow = ""; + std::string btnBlue = ""; int x = 100, y = 100, dx = 450, dy = 250; tableLookup(L, "x", x); tableLookup(L, "y", y); @@ -1317,10 +1319,38 @@ int CLuaInstance::CWindowNew(lua_State *L) tableLookup(L, "dy", dy); tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name); tableLookup(L, "icon", icon); + tableLookup(L, "btnRed", btnRed); + tableLookup(L, "btnGreen", btnGreen); + tableLookup(L, "btnYellow", btnYellow); + tableLookup(L, "btnBlue", btnBlue); CLuaCWindow **udata = (CLuaCWindow **) lua_newuserdata(L, sizeof(CLuaCWindow *)); *udata = new CLuaCWindow(); (*udata)->w = new CComponentsWindow(x, y, dx, dy, name.c_str(), icon.c_str()); + + CComponentsFooter* footer = (*udata)->w->getFooterObject(); + if (footer) { + int btnCount = 0; + if (btnRed != "") btnCount++; + if (btnGreen != "") btnCount++; + if (btnYellow != "") btnCount++; + if (btnBlue != "") btnCount++; + if (btnCount) { + fb_pixel_t col = footer->getColorBody(); + int btnw = (dx-20) / btnCount; + int btnh = footer->getHeight(); + int start = 10; + if (btnRed != "") + footer->addCCItem(new CComponentsButtonRed(start, CC_CENTERED, btnw, btnh, btnRed, false , true, false, col, col)); + if (btnGreen != "") + footer->addCCItem(new CComponentsButtonGreen(start+=btnw, CC_CENTERED, btnw, btnh, btnGreen, false , true, false, col, col)); + if (btnYellow != "") + footer->addCCItem(new CComponentsButtonYellow(start+=btnw, CC_CENTERED, btnw, btnh, btnYellow, false , true, false, col, col)); + if (btnBlue != "") + footer->addCCItem(new CComponentsButtonBlue(start+=btnw, CC_CENTERED, btnw, btnh, btnBlue, false , true, false, col, col)); + } + } + luaL_getmetatable(L, "cwindow"); lua_setmetatable(L, -2); return 1; @@ -1361,6 +1391,20 @@ int CLuaInstance::CWindowHide(lua_State *L) return 0; } +int CLuaInstance::CWindowGetHeaderHeight(lua_State *L) +{ + CLuaCWindow *m = CWindowCheck(L, 1); + if (!m) + return 0; + + CComponentsHeader* header = m->w->getHeaderObject(); + int hh = 0; + if (header) + hh = header->getHeight(); + lua_pushinteger(L, hh); + return 1; +} + int CLuaInstance::CWindowDelete(lua_State *L) { CLuaCWindow *m = CWindowCheck(L, 1); diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index 48c0afcfd..093fda100 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -198,6 +198,7 @@ private: static CLuaCWindow *CWindowCheck(lua_State *L, int n); static int CWindowPaint(lua_State *L); static int CWindowHide(lua_State *L); + static int CWindowGetHeaderHeight(lua_State *L); static int CWindowDelete(lua_State *L); static CLuaSignalBox *SignalBoxCheck(lua_State *L, int n); From a48d8306ec9f0661451eff6a6a64dfa141af66a5 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 21 Feb 2014 14:04:35 +0100 Subject: [PATCH 07/23] scan.cpp cam_menu.cpp fix Werror=format --- src/gui/cam_menu.cpp | 2 +- src/gui/scan.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 94224436c..5df3bcd01 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -472,7 +472,7 @@ int CCAMMenuHandler::doMenu(int slot, CA_SLOT_TYPE slotType) g_Locale->getText(slotType == CA_SLOT_TYPE_CI ? LOCALE_CI_WAITING : LOCALE_SC_WAITING)); g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd); - printf("CCAMMenuHandler::doMenu: msg %x data %x\n", msg, data); + printf("CCAMMenuHandler::doMenu: msg %lx data %lx\n", msg, data); if (msg == CRCInput::RC_timeout) { printf("CCAMMenuHandler::doMenu: menu timeout\n"); hideHintBox(); diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index f553be1a4..995076fc0 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -365,7 +365,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) break; case NeutrinoMessages::EVT_SCAN_NUM_TRANSPONDERS: - sprintf(buffer, "%u", data); + sprintf(buffer, "%lu", data); paintLine(xpos2, ypos_transponder, w - (8*fw), buffer); total = data; snprintf(str, sizeof(buffer), "scan: %d/%d", done, total); @@ -383,7 +383,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCY: freqready = 1; - sprintf(buffer, "%u", data); + sprintf(buffer, "%lu", data); xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true)+2; paintLine(xpos2, ypos_frequency, xpos_frequency, buffer); paintRadar(); @@ -411,22 +411,22 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) break; case NeutrinoMessages::EVT_SCAN_NUM_CHANNELS: - sprintf(buffer, " = %u", data); + sprintf(buffer, " = %lu", data); paintLine(xpos1 + 3 * (6*fw), ypos_service_numbers + mheight, width - 3 * (6*fw) - 10, buffer); break; case NeutrinoMessages::EVT_SCAN_FOUND_TV_CHAN: - sprintf(buffer, "%u", data); + sprintf(buffer, "%lu", data); paintLine(xpos1, ypos_service_numbers + mheight, (6*fw), buffer); break; case NeutrinoMessages::EVT_SCAN_FOUND_RADIO_CHAN: - sprintf(buffer, "%u", data); + sprintf(buffer, "%lu", data); paintLine(xpos1 + (6*fw), ypos_service_numbers + mheight, (6*fw), buffer); break; case NeutrinoMessages::EVT_SCAN_FOUND_DATA_CHAN: - sprintf(buffer, "%u", data); + sprintf(buffer, "%lu", data); paintLine(xpos1 + 2 * (6*fw), ypos_service_numbers + mheight, (6*fw), buffer); break; From 8bad5565e07bdb31fea5a8045728ea8cc2151c77 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 21 Feb 2014 17:01:43 +0100 Subject: [PATCH 08/23] Revert "scan.cpp cam_menu.cpp fix Werror=format" This reverts commit a48d8306ec9f0661451eff6a6a64dfa141af66a5. --- src/gui/cam_menu.cpp | 2 +- src/gui/scan.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 5df3bcd01..94224436c 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -472,7 +472,7 @@ int CCAMMenuHandler::doMenu(int slot, CA_SLOT_TYPE slotType) g_Locale->getText(slotType == CA_SLOT_TYPE_CI ? LOCALE_CI_WAITING : LOCALE_SC_WAITING)); g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd); - printf("CCAMMenuHandler::doMenu: msg %lx data %lx\n", msg, data); + printf("CCAMMenuHandler::doMenu: msg %x data %x\n", msg, data); if (msg == CRCInput::RC_timeout) { printf("CCAMMenuHandler::doMenu: menu timeout\n"); hideHintBox(); diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 995076fc0..f553be1a4 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -365,7 +365,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) break; case NeutrinoMessages::EVT_SCAN_NUM_TRANSPONDERS: - sprintf(buffer, "%lu", data); + sprintf(buffer, "%u", data); paintLine(xpos2, ypos_transponder, w - (8*fw), buffer); total = data; snprintf(str, sizeof(buffer), "scan: %d/%d", done, total); @@ -383,7 +383,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCY: freqready = 1; - sprintf(buffer, "%lu", data); + sprintf(buffer, "%u", data); xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true)+2; paintLine(xpos2, ypos_frequency, xpos_frequency, buffer); paintRadar(); @@ -411,22 +411,22 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) break; case NeutrinoMessages::EVT_SCAN_NUM_CHANNELS: - sprintf(buffer, " = %lu", data); + sprintf(buffer, " = %u", data); paintLine(xpos1 + 3 * (6*fw), ypos_service_numbers + mheight, width - 3 * (6*fw) - 10, buffer); break; case NeutrinoMessages::EVT_SCAN_FOUND_TV_CHAN: - sprintf(buffer, "%lu", data); + sprintf(buffer, "%u", data); paintLine(xpos1, ypos_service_numbers + mheight, (6*fw), buffer); break; case NeutrinoMessages::EVT_SCAN_FOUND_RADIO_CHAN: - sprintf(buffer, "%lu", data); + sprintf(buffer, "%u", data); paintLine(xpos1 + (6*fw), ypos_service_numbers + mheight, (6*fw), buffer); break; case NeutrinoMessages::EVT_SCAN_FOUND_DATA_CHAN: - sprintf(buffer, "%lu", data); + sprintf(buffer, "%u", data); paintLine(xpos1 + 2 * (6*fw), ypos_service_numbers + mheight, (6*fw), buffer); break; From c081733739d830407b6d9f431046e15b4e426672 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Sun, 16 Feb 2014 13:23:03 +0400 Subject: [PATCH 09/23] locals: add locale for 'other' font size group and subtitle font size --- data/locale/english.locale | 4 +++- src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/data/locale/english.locale b/data/locale/english.locale index 689ef1bf5..78cdbba0c 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -570,6 +570,7 @@ fontmenu.gamelist Gamelist fontmenu.head Font settings fontmenu.infobar Infobar fontmenu.menu Menu +fontmenu.other Other fontmenu.scaling Global Font Zoom Factor fontmenu.scaling_x Horizontal (in %) fontmenu.scaling_x_hint2 Horizontal (in %) min 50 / max 200 @@ -598,10 +599,11 @@ fontsize.infobar_channame Channel name fontsize.infobar_info info fontsize.infobar_number Number fontsize.infobar_small Small -fontsize.menu Menutext +fontsize.menu Menu text fontsize.menu_hint Menu hints fontsize.menu_info Menu Info fontsize.menu_title Menu Title +fontsize.subtitles Text subtitles hdd_10min 10 min. hdd_1min 1 min. hdd_20min 20 min. diff --git a/src/system/locals.h b/src/system/locals.h index 0525619d2..95503e2ff 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -597,6 +597,7 @@ typedef enum LOCALE_FONTMENU_HEAD, LOCALE_FONTMENU_INFOBAR, LOCALE_FONTMENU_MENU, + LOCALE_FONTMENU_OTHER, LOCALE_FONTMENU_SCALING, LOCALE_FONTMENU_SCALING_X, LOCALE_FONTMENU_SCALING_X_HINT2, @@ -629,6 +630,7 @@ typedef enum LOCALE_FONTSIZE_MENU_HINT, LOCALE_FONTSIZE_MENU_INFO, LOCALE_FONTSIZE_MENU_TITLE, + LOCALE_FONTSIZE_SUBTITLES, LOCALE_HDD_10MIN, LOCALE_HDD_1MIN, LOCALE_HDD_20MIN, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 50df4d51a..5d09b0ac3 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -597,6 +597,7 @@ const char * locale_real_names[] = "fontmenu.head", "fontmenu.infobar", "fontmenu.menu", + "fontmenu.other", "fontmenu.scaling", "fontmenu.scaling_x", "fontmenu.scaling_x_hint2", @@ -629,6 +630,7 @@ const char * locale_real_names[] = "fontsize.menu_hint", "fontsize.menu_info", "fontsize.menu_title", + "fontsize.subtitles", "hdd_10min", "hdd_1min", "hdd_20min", From 29617ba843dd9c9cb77a4691ed7b851c0fc99771 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Sun, 16 Feb 2014 13:23:51 +0400 Subject: [PATCH 10/23] gui/osd_setup.cpp: add 'other' font sizes group, add subtitles font size setup --- src/gui/osd_setup.cpp | 23 +++++++++++++++-------- src/system/settings.h | 1 + 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 019ccaeba..42506d333 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -134,23 +134,29 @@ const SNeutrinoSettings::FONT_TYPES gamelist_font_sizes[2] = SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMSMALL }; -const SNeutrinoSettings::FONT_TYPES other_font_sizes[5] = +const SNeutrinoSettings::FONT_TYPES menu_font_sizes[4] = { SNeutrinoSettings::FONT_TYPE_MENU_TITLE, SNeutrinoSettings::FONT_TYPE_MENU, SNeutrinoSettings::FONT_TYPE_MENU_INFO, - SNeutrinoSettings::FONT_TYPE_MENU_HINT, + SNeutrinoSettings::FONT_TYPE_MENU_HINT +}; +const SNeutrinoSettings::FONT_TYPES other_font_sizes[2] = +{ + SNeutrinoSettings::FONT_TYPE_SUBTITLES, SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM }; -font_sizes_groups font_sizes_groups[6] = +#define FONT_GROUP_COUNT 7 +font_sizes_groups font_sizes_groups[FONT_GROUP_COUNT] = { - {LOCALE_FONTMENU_MENU , 5, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS }, + {LOCALE_FONTMENU_MENU , 4, menu_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS }, {LOCALE_FONTMENU_CHANNELLIST, 5, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS }, {LOCALE_FONTMENU_EVENTLIST , 5, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS }, {LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS }, {LOCALE_FONTMENU_INFOBAR , 4, infobar_font_sizes , "fontsize.dinf", LOCALE_MENU_HINT_INFOBAR_FONTS }, - {LOCALE_FONTMENU_GAMELIST , 2, gamelist_font_sizes , "fontsize.dgam", LOCALE_MENU_HINT_GAMELIST_FONTS } + {LOCALE_FONTMENU_GAMELIST , 2, gamelist_font_sizes , "fontsize.dgam", LOCALE_MENU_HINT_GAMELIST_FONTS }, + {LOCALE_FONTMENU_OTHER , 2, other_font_sizes , "fontsize.dgam", LOCALE_MENU_HINT_GAMELIST_FONTS } }; font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] = @@ -179,7 +185,8 @@ font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] = {LOCALE_FONTSIZE_INFOBAR_INFO , 20, CNeutrinoFonts::FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_INFOBAR_SMALL , 14, CNeutrinoFonts::FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_FILEBROWSER_ITEM , 16, CNeutrinoFonts::FONT_STYLE_BOLD , 1}, - {LOCALE_FONTSIZE_MENU_HINT , 16, CNeutrinoFonts::FONT_STYLE_REGULAR, 0} + {LOCALE_FONTSIZE_MENU_HINT , 16, CNeutrinoFonts::FONT_STYLE_REGULAR, 0}, + {LOCALE_FONTSIZE_SUBTITLES , 25, CNeutrinoFonts::FONT_STYLE_BOLD , 0} }; int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) @@ -325,7 +332,7 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) return res; } else if(strncmp(actionKey.c_str(), "fontsize.d", 10) == 0) { - for (int i = 0; i < 6; i++) { + for (int i = 0; i < FONT_GROUP_COUNT; i++) { if (actionKey == font_sizes_groups[i].actionkey) { for (unsigned int j = 0; j < font_sizes_groups[i].count; j++) { SNeutrinoSettings::FONT_TYPES k = font_sizes_groups[i].content[j]; @@ -774,7 +781,7 @@ void COsdSetup::showOsdFontSizeSetup(CMenuWidget *menu_fonts) //fontSettings->addItem( new CMenuForwarder(LOCALE_EPGPLUS_SELECT_FONT_NAME, true, NULL, this, "select_font")); mn_widget_id_t w_index = MN_WIDGET_ID_OSDSETUP_FONTSIZE_MENU; - for (int i = 0; i < 6; i++) + for (int i = 0; i < FONT_GROUP_COUNT; i++) { CMenuWidget *fontSettingsSubMenu = new CMenuWidget(LOCALE_FONTMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, w_index); diff --git a/src/system/settings.h b/src/system/settings.h index b84dbe163..b2354cbdc 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -553,6 +553,7 @@ struct SNeutrinoSettings FONT_TYPE_INFOBAR_SMALL, FONT_TYPE_FILEBROWSER_ITEM, FONT_TYPE_MENU_HINT, + FONT_TYPE_SUBTITLES, FONT_TYPE_COUNT }; From d93dafed84eba2329f46a824c40b3a3d81055a1d Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Sun, 16 Feb 2014 14:34:12 +0400 Subject: [PATCH 11/23] gui/movieplayer.cpp: use subtitles font for text subtitles, convert non-utf8 subtitle text from latin1 to utf, auto-select external subtitles, if they was started --- src/gui/movieplayer.cpp | 25 ++++++++++++++++++++----- src/gui/movieplayer.h | 1 + 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 45b037fa7..b58632531 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -145,6 +145,7 @@ void CMoviePlayerGui::Init(void) max_x = 0; min_y = 0; max_y = 0; + ext_subs = false; } void CMoviePlayerGui::cutNeutrino() @@ -584,6 +585,15 @@ void CMoviePlayerGui::PlayFile(void) playback->SetSpeed(1); } } + if (is_file_player && ext_subs) { + playback->FindAllSubs(spids, sub_supported, &numsubs, slanguage); + for (unsigned count = 0; count < numsubs; count++) { + if (spids[count] == 0x1FFF) { + currentspid = spids[count]; + playback->SelectSubtitles(currentspid); + } + } + } CAudioMute::getInstance()->enableMuteIcon(true); InfoClock->enableInfoClock(true); @@ -1377,9 +1387,12 @@ void CMoviePlayerGui::selectSubtitle() printf("CMoviePlayerGui::selectSubtitle: selected %d (%x) current %x\n", select, (select >= 0) ? spids[select] : -1, currentspid); if((select >= 0) && (select < numsubs) && (currentspid != spids[select])) { currentspid = spids[select]; + /* external subtitles pid is 0x1FFF */ + ext_subs = (currentspid == 0x1FFF); playback->SelectSubtitles(currentspid); printf("[movieplayer] spid changed to %d\n", currentspid); } else if ( select > 0) { + ext_subs = false; currentspid = -1; playback->SelectSubtitles(currentspid); printf("[movieplayer] spid changed to %d\n", currentspid); @@ -1505,17 +1518,19 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data) start = end + 2; } subtext.push_back(str.substr(start)); - } } - for (unsigned i = 0; i < subtext.size(); i++) + for (unsigned i = 0; i < subtext.size(); i++) { + if (!isUTF8(subtext[i])) + subtext[i] = convertLatin1UTF8(subtext[i]); printf("subtext %d: [%s]\n", i, subtext[i].c_str()); + } printf("********************************************************************\n"); if (!subtext.empty()) { int sh = frameBuffer->getScreenHeight(); int sw = frameBuffer->getScreenWidth(); - int h = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); + int h = g_Font[SNeutrinoSettings::FONT_TYPE_SUBTITLES]->getHeight(); int height = h*subtext.size(); clearSubtitle(); @@ -1523,7 +1538,7 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data) int x[subtext.size()]; int y[subtext.size()]; for (unsigned i = 0; i < subtext.size(); i++) { - int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (subtext[i].c_str(), true); + int w = g_Font[SNeutrinoSettings::FONT_TYPE_SUBTITLES]->getRenderWidth (subtext[i].c_str(), true); x[i] = (sw - w) / 2; y[i] = sh - height + h*(i + 1); min_x = std::min(min_x, x[i]); @@ -1535,7 +1550,7 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data) frameBuffer->paintBoxRel(min_x, min_y, max_x - min_x, max_y-min_y, COL_MENUCONTENT_PLUS_0); for (unsigned i = 0; i < subtext.size(); i++) - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x[i], y[i], sw, subtext[i].c_str(), COL_MENUCONTENT_TEXT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_SUBTITLES]->RenderString(x[i], y[i], sw, subtext[i].c_str(), COL_MENUCONTENT_TEXT, 0, true); end_time = sub->end_display_time + time_monotonic_ms(); } diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index b4e705da7..c4068ef5e 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -95,6 +95,7 @@ class CMoviePlayerGui : public CMenuTarget int currentspid; int min_x, min_y, max_x, max_y; time_t end_time; + bool ext_subs; /* playback from MB */ bool isMovieBrowser; From 64688db9c4ac102c9160d99d97fcaa48c6d6a776 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 18 Feb 2014 14:20:09 +0400 Subject: [PATCH 12/23] gui/movieplayer.cpp: try to select file play audio lang from audio preferences --- src/gui/movieplayer.cpp | 49 +++++++++++++++++++++++++++++++++-------- src/gui/movieplayer.h | 1 + 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index b58632531..3f98b1c95 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -585,15 +585,8 @@ void CMoviePlayerGui::PlayFile(void) playback->SetSpeed(1); } } - if (is_file_player && ext_subs) { - playback->FindAllSubs(spids, sub_supported, &numsubs, slanguage); - for (unsigned count = 0; count < numsubs; count++) { - if (spids[count] == 0x1FFF) { - currentspid = spids[count]; - playback->SelectSubtitles(currentspid); - } - } - } + if (is_file_player) + selectAutoLang(); CAudioMute::getInstance()->enableMuteIcon(true); InfoClock->enableInfoClock(true); @@ -1557,3 +1550,41 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data) avsubtitle_free(sub); delete sub; } + +void CMoviePlayerGui::selectAutoLang() +{ + if (ext_subs) { + playback->FindAllSubs(spids, sub_supported, &numsubs, slanguage); + for (unsigned count = 0; count < numsubs; count++) { + if (spids[count] == 0x1FFF) { + currentspid = spids[count]; + playback->SelectSubtitles(currentspid); + } + } + } + if(g_settings.auto_lang) { + int pref_idx = -1; + + playback->FindAllPids(apids, ac3flags, &numpida, language); + for(int i = 0; i < 3; i++) { + for (unsigned j = 0; j < numpida; j++) { + std::map::const_iterator it; + for(it = iso639.begin(); it != iso639.end(); ++it) { + if (g_settings.pref_lang[i] == it->second && strncasecmp(language[j].c_str(), it->first.c_str(), 3) == 0) { + pref_idx = j; + break; + } + } + if (pref_idx >= 0) + break; + } + if (pref_idx >= 0) + break; + } + if (pref_idx >= 0) { + currentapid = apids[pref_idx]; + currentac3 = ac3flags[pref_idx]; + playback->SetAPid(currentapid, currentac3); + } + } +} diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index c4068ef5e..7a2144951 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -141,6 +141,7 @@ class CMoviePlayerGui : public CMenuTarget void showSubtitle(neutrino_msg_data_t data); void clearSubtitle(); void selectChapter(); + void selectAutoLang(); void Cleanup(); static void *ShowStartHint(void *arg); From 0207d59a12088d94f4d05241156335a39aaae870 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 11:50:28 +0400 Subject: [PATCH 13/23] locals: add locale for titles/chapters menu separators --- data/locale/english.locale | 2 ++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/data/locale/english.locale b/data/locale/english.locale index 78cdbba0c..96e24a83d 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1466,10 +1466,12 @@ movieplayer.bookmark Bookmarks movieplayer.bookmarkname Bookmarkname movieplayer.bookmarkname_hint1 Enter a name for your new bookmark movieplayer.bookmarkname_hint2 +movieplayer.chapters Chapters movieplayer.defplugin Start-Plugin movieplayer.fileplayback File play movieplayer.head Movieplayer movieplayer.starting Starting playback... +movieplayer.titles Titles movieplayer.toomanybookmarks There are too many bookmarks.\nYou need to delete one of them first. movieplayer.tshelp1 Stop movieplayer.tshelp10 approx. 10 minutes back diff --git a/src/system/locals.h b/src/system/locals.h index 95503e2ff..c190d8946 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1493,10 +1493,12 @@ typedef enum LOCALE_MOVIEPLAYER_BOOKMARKNAME, LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT1, LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT2, + LOCALE_MOVIEPLAYER_CHAPTERS, LOCALE_MOVIEPLAYER_DEFPLUGIN, LOCALE_MOVIEPLAYER_FILEPLAYBACK, LOCALE_MOVIEPLAYER_HEAD, LOCALE_MOVIEPLAYER_STARTING, + LOCALE_MOVIEPLAYER_TITLES, LOCALE_MOVIEPLAYER_TOOMANYBOOKMARKS, LOCALE_MOVIEPLAYER_TSHELP1, LOCALE_MOVIEPLAYER_TSHELP10, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 5d09b0ac3..df36700af 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1493,10 +1493,12 @@ const char * locale_real_names[] = "movieplayer.bookmarkname", "movieplayer.bookmarkname_hint1", "movieplayer.bookmarkname_hint2", + "movieplayer.chapters", "movieplayer.defplugin", "movieplayer.fileplayback", "movieplayer.head", "movieplayer.starting", + "movieplayer.titles", "movieplayer.toomanybookmarks", "movieplayer.tshelp1", "movieplayer.tshelp10", From 628de1f68c8295fe34ee1a45f36971fb5f00316c Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 11:51:34 +0400 Subject: [PATCH 14/23] gui/filebrowser.cpp: return directory in player mode (Hide_records is true) if BDMV/index.bdmv found in dir --- src/gui/filebrowser.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index f5d21d53e..c571e29a3 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -980,7 +980,13 @@ bool CFileBrowser::exec(const char * const dirname) std::string filename = filelist[selected].Name; if ( filename.length() > 1 ) { - if((!Multi_Select) && S_ISDIR(filelist[selected].Mode) && !Dir_Mode) + bool return_dir = false; + if (Hide_records && S_ISDIR(filelist[selected].Mode)) { + std::string bdmv = filename + "/BDMV/index.bdmv"; + if (access(bdmv.c_str(), F_OK) == 0) + return_dir = true; + } + if(!return_dir && (!Multi_Select) && S_ISDIR(filelist[selected].Mode) && !Dir_Mode) { #ifdef ENABLE_INTERNETRADIO if (m_Mode == ModeSC) From d2c5fc8604e8e37449328c66bf295d8da19a3a8c Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 12:09:56 +0400 Subject: [PATCH 15/23] libcoolstream2/playback_cs.h: update apollo header --- lib/libcoolstream2/playback_cs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libcoolstream2/playback_cs.h b/lib/libcoolstream2/playback_cs.h index 04dc7b45a..df92cf58b 100644 --- a/lib/libcoolstream2/playback_cs.h +++ b/lib/libcoolstream2/playback_cs.h @@ -70,6 +70,8 @@ public: bool SelectSubtitles(int pid); void GetChapters(std::vector &positions, std::vector &titles); void RequestAbort(); + void GetTitles(std::vector &playlists, std::vector &titles, int ¤t); + void SetTitle(int title); }; #endif // __PLAYBACK_CS_H_ From 3507431fd656c1e7a1c1c88784700af9159f40a1 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 12:10:27 +0400 Subject: [PATCH 16/23] gui/movieplayer.cpp: add title selection to bookmarks/chapters menu --- src/gui/movieplayer.cpp | 42 ++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 3f98b1c95..9522df8ff 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1322,25 +1322,53 @@ void CMoviePlayerGui::selectChapter() std::vector positions; std::vector titles; playback->GetChapters(positions, titles); - if (positions.empty()) + + std::vector playlists; std::vector ptitles; + int current; + playback->GetTitles(playlists, ptitles, current); + + if (positions.empty() && playlists.empty()) return; CMenuWidget ChSelector(LOCALE_MOVIEBROWSER_MENU_MAIN_BOOKMARKS, NEUTRINO_ICON_AUDIO); - ChSelector.addIntroItems(); + //ChSelector.addIntroItems(); + ChSelector.addItem(GenericMenuCancel); + + int pselect = -1; + CMenuSelectorTarget * pselector = new CMenuSelectorTarget(&pselect); int select = -1; CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); + char cnt[5]; - for (unsigned i = 0; i < positions.size(); i++) { - sprintf(cnt, "%d", i); - CMenuForwarder * item = new CMenuForwarder(titles[i].c_str(), true, NULL, selector, cnt, CRCInput::convertDigitToKey(i + 1)); - ChSelector.addItem(item, position > positions[i]); + if (!playlists.empty()) { + ChSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEPLAYER_TITLES)); + for (unsigned i = 0; i < playlists.size(); i++) { + sprintf(cnt, "%d", i); + CMenuForwarder * item = new CMenuForwarder(ptitles[i].c_str(), current != playlists[i], NULL, pselector, cnt); + ChSelector.addItem(item); + } + } + + if (!positions.empty()) { + ChSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEPLAYER_CHAPTERS)); + for (unsigned i = 0; i < positions.size(); i++) { + sprintf(cnt, "%d", i); + CMenuForwarder * item = new CMenuForwarder(titles[i].c_str(), true, NULL, selector, cnt, CRCInput::convertDigitToKey(i + 1)); + ChSelector.addItem(item, position > positions[i]); + } } ChSelector.exec(NULL, ""); delete selector; + delete pselector; printf("CMoviePlayerGui::selectChapter: selected %d (%d)\n", select, (select >= 0) ? positions[select] : -1); - if(select >= 0) + printf("CMoviePlayerGui::selectChapter: pselected %d (%d)\n", pselect, (pselect >= 0) ? playlists[pselect] : -1); + if(select >= 0) { playback->SetPosition(positions[select], true); + } else if (pselect >= 0) { + numsubs = numpida = 0; + playback->SetTitle(playlists[pselect]); + } } void CMoviePlayerGui::selectSubtitle() From 71b550b04b05b1a3ff40b2af7407d9e380a53f50 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 13:06:59 +0400 Subject: [PATCH 17/23] libcoolstream2: sync headers --- lib/libcoolstream2/audio_cs.h | 4 ++-- lib/libcoolstream2/ca_cs.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libcoolstream2/audio_cs.h b/lib/libcoolstream2/audio_cs.h index 0574eb588..77ff55715 100644 --- a/lib/libcoolstream2/audio_cs.h +++ b/lib/libcoolstream2/audio_cs.h @@ -116,8 +116,8 @@ public: void *GetHandle(void); void *GetDSP(void); - void HandleAudioMessage(int Event, void *pData); - void HandlePcmMessage(int Event, void *pData); + void HandleAudioMessage(void *Handle, int Event, void *pData); + void HandlePcmMessage(void *Handle, int Event, void *pData); /* shut up */ int mute(void); int unmute(void); diff --git a/lib/libcoolstream2/ca_cs.h b/lib/libcoolstream2/ca_cs.h index ffb92dfac..3618281ef 100644 --- a/lib/libcoolstream2/ca_cs.h +++ b/lib/libcoolstream2/ca_cs.h @@ -11,6 +11,7 @@ #define __CA_CS_H_ #include +#include #include #include "cs_types.h" @@ -114,6 +115,7 @@ class cCA : public OpenThreads::Thread { private: /// Static instance of the CA module static cCA *inst; + static OpenThreads::Mutex lock; /// Private constructor (singleton method) cCA(void); /// Private data for the CA module @@ -160,7 +162,7 @@ public: /// Notify the module with our answer (choice nr) void MenuAnswer(enum CA_SLOT_TYPE, u32 Slot, u32 choice); /// Notify the module with our answer (binary) - void InputAnswer(enum CA_SLOT_TYPE, u32 Slot, u8 * Data, int Len); + void InputAnswer(enum CA_SLOT_TYPE, u32 Slot, u8 * Data, int Len, bool Cancelled = false); /// Notify the module we closed the menu void MenuClose(enum CA_SLOT_TYPE, u32 Slot); /// Get the supported CAIDs From b100766c97ef55c33d125a5259dc6ffa1be86cbb Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 16:56:04 +0400 Subject: [PATCH 18/23] gui/movieplayer.cpp: fix audio/subtitle pid reset on title change --- src/gui/movieplayer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 9522df8ff..6a93a36f1 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1367,6 +1367,8 @@ void CMoviePlayerGui::selectChapter() playback->SetPosition(positions[select], true); } else if (pselect >= 0) { numsubs = numpida = 0; + currentspid = -1; + currentapid = 0; playback->SetTitle(playlists[pselect]); } } @@ -1599,7 +1601,12 @@ void CMoviePlayerGui::selectAutoLang() std::map::const_iterator it; for(it = iso639.begin(); it != iso639.end(); ++it) { if (g_settings.pref_lang[i] == it->second && strncasecmp(language[j].c_str(), it->first.c_str(), 3) == 0) { - pref_idx = j; + bool enabled = true; + // TODO: better check of supported + std::string audioname; + addAudioFormat(j, audioname, enabled); + if (enabled) + pref_idx = j; break; } } From 31f6c79edf08a9f18c637d96826383e7ab128651 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 16:57:25 +0400 Subject: [PATCH 19/23] lib/libcoolstream/playback_cs.h: update nevis header --- lib/libcoolstream/playback_cs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libcoolstream/playback_cs.h b/lib/libcoolstream/playback_cs.h index 0a8359389..21f440efd 100644 --- a/lib/libcoolstream/playback_cs.h +++ b/lib/libcoolstream/playback_cs.h @@ -69,6 +69,8 @@ public: bool SelectSubtitles(int pid); void GetChapters(std::vector &positions, std::vector &titles); void RequestAbort(); + void GetTitles(std::vector &playlists, std::vector &titles, int ¤t); + void SetTitle(int title); }; #endif // __PLAYBACK_CS_H_ From 5f84fb9fa1f8a8cc40f015bb5b45cb06070cc436 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 18:12:41 +0400 Subject: [PATCH 20/23] gui/movieplayer.cpp: fix subtitles menu: stop button for stop item only; current pid disabled, current item is 'back' if no selected pid, else stop --- src/gui/movieplayer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 6a93a36f1..f8c09872d 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1389,8 +1389,8 @@ void CMoviePlayerGui::selectSubtitle() char cnt[5]; unsigned int count; for (count = 0; count < numsubs; count++) { - bool enabled = sub_supported[count]; - bool defpid = currentspid >= 0 ? (currentspid == spids[count]) : (count == 0); + bool enabled = sub_supported[count] && (currentspid != spids[count]); + std::string title = slanguage[count]; if (title.empty()) { char pidnumber[20]; @@ -1399,11 +1399,10 @@ void CMoviePlayerGui::selectSubtitle() } sprintf(cnt, "%d", count); CMenuForwarder * item = new CMenuForwarder(title.c_str(), enabled, NULL, selector, cnt, CRCInput::convertDigitToKey(count + 1)); - item->setItemButton(NEUTRINO_ICON_BUTTON_STOP, false); - APIDSelector.addItem(item, defpid); + APIDSelector.addItem(item); } sprintf(cnt, "%d", count); - APIDSelector.addItem(new CMenuForwarder(LOCALE_SUBTITLES_STOP, true, NULL, selector, cnt, CRCInput::RC_stop), currentspid < 0); + APIDSelector.addItem(new CMenuForwarder(LOCALE_SUBTITLES_STOP, true, NULL, selector, cnt, CRCInput::RC_stop, NEUTRINO_ICON_BUTTON_STOP), currentspid > 0); APIDSelector.exec(NULL, ""); delete selector; From 70f61217f7a39e78a0cf0977baf9f40785846244 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 21 Feb 2014 23:59:45 +0100 Subject: [PATCH 21/23] - personalizing: show menuhints in plugin type selection menu --- data/locale/deutsch.locale | 4 ++++ data/locale/english.locale | 4 ++++ src/gui/personalize.cpp | 21 +++++++++++++++++---- src/system/locals.h | 4 ++++ src/system/locals_intern.h | 4 ++++ 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 7364b7a54..98cb8aac8 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1023,6 +1023,10 @@ menu.hint_pictureviewer_defdir Wählen Sie das Startverzeichnis für den Bildbet menu.hint_pictureviewer_scaling Stellen Sie die Bildauflösung ein menu.hint_pictureviewer_slide_time Ändern Sie den Diashow-Intervall.\nStandardmäßig sind 10 Sekunden eingstellt menu.hint_picview Bilder anzeigen +menu.hint_plugin_type_games Legt fest, ob Spiele 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_plugin_type_scripts Legt fest, ob Skripte im Benutzermenü unter der Rubrik 'Plugin-Typen' gezeigt werden sollen +menu.hint_plugin_type_lua Legt fest, ob Plugins im Benutzermenü unter der Rubrik 'Plugin-Typen' gezeigt werden sollen menu.hint_plugins_hdd_dir Auswahl des Verzeichnisses zum Laden der Plugins von einem externen Datenträger 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 diff --git a/data/locale/english.locale b/data/locale/english.locale index 96e24a83d..f12ce722a 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1025,6 +1025,10 @@ menu.hint_pictureviewer_defdir Default picture viewer directory menu.hint_pictureviewer_scaling Picture scaling algorithm menu.hint_pictureviewer_slide_time Slideshow interval, in seconds menu.hint_picview View pictures +menu.hint_plugin_type_games Show games in usermenu at selection 'Plugin types' +menu.hint_plugin_type_tools Show tools in usermenu at selection 'Plugin types' +menu.hint_plugin_type_scripts Show scripts in usermenu at selection 'Plugin types' +menu.hint_plugin_type_lua Show plugins in usermenu at selection 'Plugin types' menu.hint_plugins_hdd_dir Select directory to load\nplugins from menu.hint_power_leds Configure power-button LEDs behavior menu.hint_pref_lang Select preferred audio and EPG language\nselect 'none' to disable diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index 887cf60b4..b36f2044f 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -457,10 +457,23 @@ void CPersonalizeGui::ShowUserMenu(CMenuWidget* p_widget, vectoraddIntroItems(LOCALE_MAINMENU_SETTINGS); - pluginSelectionMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_GAMES, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_GAMES], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - pluginSelectionMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_TOOLS, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_TOOLS], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - pluginSelectionMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_SCRIPTS, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_SCRIPTS], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - pluginSelectionMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_LUA, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_LUA], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + + CMenuOptionChooser * /*oc = NULL;*/ + oc = new CMenuOptionChooser(LOCALE_MAINMENU_GAMES, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_GAMES], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + oc->setHint(NEUTRINO_ICON_HINT_PERSONALIZE, LOCALE_MENU_HINT_PLUGIN_TYPE_GAMES); + pluginSelectionMenu->addItem(oc); + + oc = new CMenuOptionChooser(LOCALE_MAINMENU_TOOLS, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_TOOLS], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + oc->setHint(NEUTRINO_ICON_HINT_PERSONALIZE, LOCALE_MENU_HINT_PLUGIN_TYPE_TOOLS); + pluginSelectionMenu->addItem(oc); + + oc = new CMenuOptionChooser(LOCALE_MAINMENU_SCRIPTS, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_SCRIPTS], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + oc->setHint(NEUTRINO_ICON_HINT_PERSONALIZE, LOCALE_MENU_HINT_PLUGIN_TYPE_SCRIPTS); + pluginSelectionMenu->addItem(oc); + + oc = new CMenuOptionChooser(LOCALE_MAINMENU_LUA, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_LUA], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + oc->setHint(NEUTRINO_ICON_HINT_PERSONALIZE, LOCALE_MENU_HINT_PLUGIN_TYPE_LUA); + pluginSelectionMenu->addItem(oc); p_widget->addItem(new CMenuForwarder(LOCALE_PERSONALIZE_USERMENU_PLUGIN_TYPES, true, NULL, pluginSelectionMenu)); } diff --git a/src/system/locals.h b/src/system/locals.h index c190d8946..a26be137f 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1052,6 +1052,10 @@ typedef enum LOCALE_MENU_HINT_PICTUREVIEWER_SCALING, LOCALE_MENU_HINT_PICTUREVIEWER_SLIDE_TIME, LOCALE_MENU_HINT_PICVIEW, + LOCALE_MENU_HINT_PLUGIN_TYPE_GAMES, + LOCALE_MENU_HINT_PLUGIN_TYPE_TOOLS, + LOCALE_MENU_HINT_PLUGIN_TYPE_SCRIPTS, + LOCALE_MENU_HINT_PLUGIN_TYPE_LUA, LOCALE_MENU_HINT_PLUGINS_HDD_DIR, LOCALE_MENU_HINT_POWER_LEDS, LOCALE_MENU_HINT_PREF_LANG, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index df36700af..6b0817caf 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1052,6 +1052,10 @@ const char * locale_real_names[] = "menu.hint_pictureviewer_scaling", "menu.hint_pictureviewer_slide_time", "menu.hint_picview", + "menu.hint_plugin_type_games", + "menu.hint_plugin_type_tools", + "menu.hint_plugin_type_scripts", + "menu.hint_plugin_type_lua", "menu.hint_plugins_hdd_dir", "menu.hint_power_leds", "menu.hint_pref_lang", From c42de5f8274f9fe00754c6067a221fc1f370ab21 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Sat, 22 Feb 2014 15:37:00 +0100 Subject: [PATCH 22/23] Update slovak.locle (THX EnoSat) --- data/locale/Makefile.am | 4 +- data/locale/{unmaintained => }/slovak.locale | 113 ++++++++++++++++--- src/nhttpd/web/languages/Slovak | 10 +- 3 files changed, 108 insertions(+), 19 deletions(-) rename data/locale/{unmaintained => }/slovak.locale (94%) diff --git a/data/locale/Makefile.am b/data/locale/Makefile.am index 1ba27fe77..3da75d75f 100644 --- a/data/locale/Makefile.am +++ b/data/locale/Makefile.am @@ -3,7 +3,8 @@ installdir = $(DATADIR)/neutrino/locale locale = \ nederlands.locale \ deutsch.locale \ - english.locale + english.locale \ + slovak.locale locale_unmaintained = \ unmaintained/bayrisch.locale \ @@ -16,7 +17,6 @@ locale_unmaintained = \ unmaintained/polski.locale \ unmaintained/portugues.locale \ unmaintained/russkij.locale \ - unmaintained/slovak.locale \ unmaintained/suomi.locale \ unmaintained/svenska.locale diff --git a/data/locale/unmaintained/slovak.locale b/data/locale/slovak.locale similarity index 94% rename from data/locale/unmaintained/slovak.locale rename to data/locale/slovak.locale index a060cfc9e..504c834ec 100644 --- a/data/locale/unmaintained/slovak.locale +++ b/data/locale/slovak.locale @@ -96,6 +96,7 @@ GENRE.TRAVEL_HOBBIES.5 varenie GENRE.TRAVEL_HOBBIES.6 inzertovanie/nakupovanie GENRE.TRAVEL_HOBBIES.7 záhradkárstvo GENRE.UNKNOWN neznáme +adzap *AdZap* apidselector.head Výber jazyka audio.srs_algo Režim audio.srs_algo_heavy Hrubý @@ -200,6 +201,12 @@ bouquetname.hdtv HD programy bouquetname.new Nové programy bouquetname.other Neznámy poskytovateľ bouquetname.removed Odstránené programy +buildinfo.compiled_on Kompilované na: +buildinfo.compiled_with Verzia kompilera: +buildinfo.compiler_flags Príkazy kompilera: +buildinfo.creator Tvorca: +buildinfo.kernel Verzia jadra: +buildinfo.menu Build Informácie: cablesetup.provider Káblový poskytovateľ channellist.additional Rozšírené informácie channellist.additional_off VYP @@ -233,8 +240,10 @@ channellist.nonefound Nenájdený zoznam kanálov!\nVykonaj vyhľadanie kanálov channellist.numeric_adjust Zadanie čísla na prepnutie channellist.provs Poskytovatelia channellist.recording_not_possible Nahrávanie nedostupné! -channellist.reset_flags Resetovať označenie "nový" +channellist.reset_all Odstrániť značku "Nový" pre všetky kanály +channellist.reset_flags Odstrániť na kanály značku "Nový" channellist.sats Satelity +channellist.show_channellogo Zobraziť logo stanice channellist.since od channellist.start spúšťa ci.clock CI taktovanie (MHz) @@ -249,6 +258,9 @@ ci.reset_standby Resetovať po spustení ci.settings Podmienený prístup ci.timeout Čas čakania uplynul,\nvraciam sa do menu ci.waiting Čakám na odpoveď +clock_background Zobraziť pozadie +clock_seconds Zobraziť sekundy +clock_size_height Výška zobrazenia clock_switch_off Skryť hodiny clock_switch_on Zobraziť hodiny colorchooser.alpha Priehľadnosť @@ -256,6 +268,7 @@ colorchooser.blue Modrý colorchooser.green Zelený colorchooser.red Červený colormenu.background Pozadie +colormenu.clock_textcolor Farba čílic colormenu.contrast_fonts Kontrast písma colormenu.fade Miznúce menu colormenu.font Výber písma @@ -320,7 +333,9 @@ epgviewer.length Dĺžka (min.) epgviewer.nodetailed Detailné informácie sú nedostupné epgviewer.notfound Nenájdené programové informácie (EPG) eventfinder.head Hľadaj v EPG +eventfinder.history Hľadať históriu eventfinder.keyword Slovo +eventfinder.max_history Max. počet výsledkov eventfinder.search hľadaj eventfinder.search_all_epg Všade eventfinder.search_within_epg Hľadaj v EPG @@ -336,7 +351,6 @@ extra.add_to_bouquet Pridanie do buketu extra.audio_run_player Stlačenie AUDIO spustí prehrávač extra.auto_delete Auto-mazanie extra.auto_timeshift Auto-nahrávanie, sec (0=vypnuté) -extra.bigwindows Veľké okná extra.cache_txt Zachytávanie teletextu extra.chadded Aktuálny kanál bol pridaný do vybraného buketu....\n extra.chalreadyinbq Aktuálny kanál sa už nachádza vo vybranom bukete....\n @@ -466,6 +480,16 @@ flashupdate.cantopenfile Otvorenie súboru nemožné flashupdate.cantopenmtd Otvorenie MTD-zariadenia nemožné flashupdate.checkupdate_internet Skontrolovať aktualizácie on-line flashupdate.checkupdate_local Lokálna aktualizácia +flashupdate.createimage Uložiť Image +flashupdate.createimage_add_env Pridať "env" +flashupdate.createimage_add_kernel Pridať "kernel" +flashupdate.createimage_add_spare Pridať "spare" +flashupdate.createimage_add_u_boot Pridať "u-boot" +flashupdate.createimage_add_uldr Pridať "uldr" +flashupdate.createimage_menu Uložiť aktuálny softvér +flashupdate.createimage_options Nastavenia +flashupdate.createimage_other Vytvorenie Image pre %s STB +flashupdate.createimage_warning Bude vytvorený Image pre %s STB.\nTento Image bude možné spustiť iba na %s STB!\n \nSkutočne pokračovať ? flashupdate.currentversion_sep Aktuálna verzia flashupdate.currentversiondate Dátum flashupdate.currentversiontime Hodina @@ -486,11 +510,22 @@ flashupdate.md5check Kontrola IMAGE flashupdate.md5sumerror IMAGE má chyby flashupdate.menu_apply_kernel Nahranie jadra (kernelu) flashupdate.menu_apply_settings Povoliť aplikovanie nastavení +flashupdate.mkfs_create_image Vytvoriť Image +flashupdate.mkfs_preparing_files Pripraviť súbory a adresáre +flashupdate.mkfs_using_sumtool Použiť "sumtool" flashupdate.msgbox Zistený nový súbor:\nDátum: %s, %s\nBaseImage: %s\nTyp: %s\n\nNaozaj prevziať a nainštalovať\ntento súbor? flashupdate.msgbox_manual Zistený nový súbor:\nDátum: %s, %s\nBaseImage: %s\nTyp IMAGE: %s\n\nNaozaj nainštalovať\ntento súbor? flashupdate.mtdselector Výber partície +flashupdate.namemode1 Názov súboru nastavení +flashupdate.namemode1_default +settings.img +flashupdate.namemode1_hostname_time +<Čas>+settings.img +flashupdate.namemode1_orgname_time +<Čas>+settings.img +flashupdate.namemode2 Zálohovanie súboru +flashupdate.namemode2_default +<Čas>.img +flashupdate.namemode2_hostname_time +<Čas>+.img flashupdate.new_found Nájdený nový IMAGE ! flashupdate.new_notfound Žiadny nový IMAGE +flashupdate.noversion Kontrola verzie je momentálne podporovaná len pri aktualizácii cez web.\nSkutočne chcet inštalovať tento IMAGE? flashupdate.programmingflash Programovanie pamäte FLASH flashupdate.proxypassword Heslo flashupdate.proxypassword_hint1 Vloženie hesla servera proxy @@ -502,6 +537,9 @@ flashupdate.proxyserver_sep Server proxy flashupdate.proxyusername Užívateľ flashupdate.proxyusername_hint1 Vloženie mena uživateľa servera proxy flashupdate.proxyusername_hint2 Prázdne pole znamená nepoužite autorizácie +flashupdate.read_directory_not_exist Zálohovací adresár %s \nneexistuje! +flashupdate.read_no_available_space Maximálna dostupná veľkosť miesta v %s \nje %d KB, potrebné sú ale %d KB.\n \nOperácia sa zruší, vyberte iný disk! +flashupdate.read_volume_error Veľkosť disku %s \nnie je možné zistiť! flashupdate.readflash Načítanie celého IMAGE z pamäte FLASH flashupdate.readflashmtd Uloženie jednej partície flashupdate.ready Hotovo. @@ -509,7 +547,6 @@ flashupdate.reallyflashmtd Naozaj vykonať programovanie?\n\nV prípade výskytu flashupdate.savesuccess IMAGE bol úspešne uložený \nako %s. flashupdate.selectimage Dostupné súbory flashupdate.settings Aktualizácia nastavení -flashupdate.squashfs.noversion Kontrola SquashFS verzií je podporovaná len počas aktualizácie cez internet.\nSkutočne nainštalovať tento súbor? flashupdate.titlereadflash Načítanie pamäte FLASH flashupdate.titlewriteflash Zapísanie pamäte FLASH flashupdate.update_with_settings_del_skipped Adresár [%s] nebol vymazaný. Zadanie je preskočené. @@ -682,6 +719,7 @@ lcdmenu.dim_brightness Jas po zhasnutí lcdmenu.dim_time Čas zhasnutia lcdmenu.head Nastavenie VFD lcdmenu.lcdcontroler Jas +lcdmenu.scroll Povoliť pohyb textu lcdmenu.statusline Stavový riadok lcdmenu.statusline.both hlasitosť/odohratý čas lcdmenu.statusline.playtime odohratý čas @@ -699,9 +737,11 @@ ledcontroler.on.all Led1 a Led2 zap. ledcontroler.on.led1 Led1 zap. ledcontroler.on.led2 Led2 zap. mainmenu.audioplayer Prehrávač hudby +mainmenu.channels Zoznam kanálov mainmenu.clearsectionsd Vyčistenie EPG zachytávania mainmenu.games Hry mainmenu.head Hlavné menu +mainmenu.lua Doplnky mainmenu.media Média mainmenu.movieplayer Prehrávač filmov mainmenu.pausesectionsd Načítavanie EPG @@ -715,7 +755,10 @@ mainmenu.scripts Skripty mainmenu.service Služby mainmenu.settings Nastavenia mainmenu.shutdown Vypnúť +mainmenu.shutdown_menu Nastavenie vypnutia mainmenu.sleeptimer Časovač vypnutia +mainmenu.standby Pohotovostný stav +mainmenu.tools Nástroje mainmenu.tvmode TV mainmenu.tvradio_switch Prepnutie TV-Rádio mainsettings.audio Zvuk @@ -762,7 +805,7 @@ menu.hint_back Návrat do predchádzajúcej položky.\nStlačenie MENU klávesy menu.hint_backlight Nastavenie podsvietených tlačidiel menu.hint_backup Záloha konfigurácií a kanálov do vybraného adresára menu.hint_bedit Úprava obľúbených a buketov -menu.hint_bigwindows Zoznam kanálov, programové informácie, prehrávač hudby a niektoré ďaľšie okná budú zobrazované na celej obrazovke +menu.hint_buildinfo Informácie o kompileroch, kompilácii, jadre menu.hint_cache_txt Spustenie zachytávania teletextu po prepnutí kanála menu.hint_cec_mode CEC režim menu.hint_cec_standby Ováldanie externými CEC príkazami v pripravenosti @@ -774,7 +817,14 @@ menu.hint_channellist_extended Grafické zobrazenie aktuálnej udalosti menu.hint_channellist_fonts Zmena veľkosti písma zoznamu kanálov menu.hint_channellist_foot Zobrazenie ďaľších informácií\nv dolnom boxe menu.hint_channellist_setup Konfigurácia GUI volieb zonamu kanálov +menu.hint_channellist_show_channellogo Zobrazenie loga staníc v zozname kanálov +menu.hint_channels Otvorí zoznam kanálov menu.hint_ci Nastavovacie menu podmieneného pristupu\npre váš CI CAM or vloženú Conax kartu +menu.hint_clock_background Zobrazenie hodín s farbami témy vzhľadu +menu.hint_clock_mode Zapnutie alebo vypnutie zobrazenia hodín +menu.hint_clock_seconds Zobraenie formátu času so sekundami +menu.hint_clock_size Nastavenie veľkosti informačných hodín. +menu.hint_clock_textcolor Nastavenie ferieb číslic menu.hint_colors Konfigurácia farieb GUI menu.hint_content_back Zmena farby podkladu GUI okna menu.hint_content_textcolor Zmena farby textu GUI okna @@ -839,6 +889,7 @@ menu.hint_infobar_sat Zobrazenie aktuálneho satelitného alebo káblového posk menu.hint_infobar_setup Nastavenie vlastností informačnej lišty menu.hint_infobar_textcolor Zmena farby textu informačnej lišty menu.hint_infobar_tuner Zobrazenie číselnej ikony aktívneho tunera +menu.hint_infoclock_setup Konfigurácia GUI nastavení informačných hodín menu.hint_keep_numbers Zachovať čísla kanálov po nasledujúcom vyhľadávaní\na úprave buketov menu.hint_key_addrecord Priradenie klávesy pre pridanie nahrávania časovača\nz programového sprievodcu menu.hint_key_addremind Priradenie klávesy pre pridanie prepnutia časovača\nz programového sprievodcu @@ -905,6 +956,7 @@ menu.hint_leds_record Stav LED počas nahrávania menu.hint_leds_standby Stav LED v režime pripravenosti menu.hint_leds_tv Funkčný stav LED menu.hint_load Nahranie GUI nastavení zo súboru +menu.hint_lua Spustenie doplnkov menu.hint_make_hdlist Automaticky vytvorí HD zoznam kanálov na základe\ntypu kanála a názvu menu.hint_make_newlist Vytvorí zoznam nedávno pridaných kanálov menu.hint_make_removedlist Vytvorí zoznam nedávno odstránených kanálov @@ -950,17 +1002,21 @@ menu.hint_net_setupnow Použitie aktuálnych nastavení menu.hint_net_setuponstartup Spustenie siete v čase spúštania príjmača menu.hint_net_show Zobrazenie aktuálneho sieťového nastavenia menu.hint_net_ssid Zadanie SSID wireless siete\npre pripojenie sa k +menu.hint_net_ssid_scan Vyhľadanie dostupných WLAN sietí menu.hint_net_telnet Použitie telnet prihlásenia do vášho príjmača menu.hint_net_test Test sieťového pripojenia: ping brány,\n názov servera a externé IP menu.hint_net_ushare Zdielanie pripojeného HDD cez uPnp +menu.hint_net_xupnpd Zdielanie "Živých kanálov" cez uPnp menu.hint_network IP adresa, brána, DNS, Synch. času\nSieťové zdielanie a služby menu.hint_new_zap_mode Povoliť prepnutie kanála počas prehliadania\n(prepnuť režim s 'MUTE' v zozname kanálov) menu.hint_numeric_adjust Nastavenie režimu zoznamu kanálov na číselné prepnutie menu.hint_osd Farby, písma, veľkosť obrazu\nvzhľad a možnosti GUI menu.hint_osd_language Výber OSD jazyka menu.hint_osd_preset Prekonfigurovanie okrajov obrazovky pre CRT a LCD TV +menu.hint_osd_timing Po tejto dobe OSD zmizne menu.hint_parentallock_changepin Zmena PIN kódu menu.hint_parentallock_lockage Výber povoleného veku pre sledovanie +menu.hint_parentallock_menu Zamknutie ponúk s pin kódom menu.hint_parentallock_prompt Konfigurácia keď sa Neutrino-HD opýta na PIN kód menu.hint_personalize Povolenie/zakázanie alebo Položky menu zabezpečenia\nKonfigurácia farebných tlačítok uživateľských ponúk menu.hint_pictureviewer_defdir Východzí adresár prehliadača obrázkov @@ -990,6 +1046,7 @@ menu.hint_record_data_vtxt Nahrá pid/stream s teletextom menu.hint_record_dir Výber adresára pre ukladanie nahrávok menu.hint_record_end Zastaviť nahrávanie po max. čase alebo\npo čase ukončenia aktuálnej udalosti menu.hint_record_slow_warn Zobrazenie upozornenia, ak nahrávací buffer je blízko k preplneniu +menu.hint_record_startstop_msg Zobrazenie správy o začatí/ukončení nahrávania pri začatí alebo ukončení menu.hint_record_tdir Výber adresára pre uloženie nahrávok časového posunu\nv režime dočasného časového posunu menu.hint_record_time Čas nahrávania do konca ak\nsa použije nahrávanie s tlačitkom nahrávania (REC) menu.hint_record_timeafter Zastavenie nahrávania po ukonční udalosti\nv minútach @@ -1090,16 +1147,20 @@ menu.hint_settings Konfigurácia Neutrino-HD, sieť, zvuk, obraz, OSD a iné menu.hint_show_mute_icon Zobrazenie ikony umlčania, ak nastavenie hlasitosťi bude 0 menu.hint_shutdown Prepne váš príjmač do spánku\nBez potvrdzovania menu.hint_shutdown_count Čas prepnutia príjmača do spánku\nz režimu pripravenosti +menu.hint_shutdown_menu Prepne Váš príjmač do pohotovstného alebo hlbokého spánku, nastaví časovač vypnutia menu.hint_shutdown_rcdelay Použije režim spánku, ak tlačítko zapnutia\nje stlačené viac ako 1 sekundu menu.hint_shutdown_real Použije režim pripravenosti\nAk sa nepoužije, tlačítko zapnutia prepne príjmač do spánku menu.hint_sleeptimer Nastavenie časovača pre prechod vašeho príjmača\ndo režimu pripravenosti +menu.hint_sleeptimer_min Prednastavené nastavenia pre časovač vypnutia menu.hint_soft_restart Reštartovanie Neutrino-HD bez rebootu menu.hint_softupdate_check Kontrola dostupných aktualizácií, stiahnutie a naprogramovanie firmware menu.hint_softupdate_check_local Výber a programovanie firmware z lokálneho súboru +menu.hint_softupdate_createimage_menu Zálohovanie aktuálneho firmware vrátane všetkých nastavení menu.hint_softupdate_expert Oddelené partície z pamäte, čítanie/zapisovanie do pamäte menu.hint_softupdate_expert_read Načítanie oddelených partícií z pamäte (U-Boot 512kB, Kernel 4MB, SystemFS 28MB) menu.hint_softupdate_expert_write Zápis oddelených partícií do pamäte (U-Boot 512kB, Kernel 4MB, SystemFS 28MB, SystemFS+nastavenia) menu.hint_softupdate_settings Adresár lokálnej aktualizácie a konfiguračný súbor pre nastavenie +menu.hint_standby Prepne príjmač do pohotovostného režimu menu.hint_start_tostandby Zostane v režime pripravenosti po spustení menu.hint_streaminfo Aktuálna informácia kanála: pidy, signál a kvalita,\nBitrate graf menu.hint_subchannel_pos Pozícia menu výberu sub-kanálov @@ -1108,6 +1169,7 @@ menu.hint_theme Výber prednastavených farebných vzhľadov\nUloženie alebo na menu.hint_timeouts Konfigurácia času zmiznutia GUI okien\nv sekundách menu.hint_timers Pridanie/Odstránenie/Upravenie plánovaného\nnahrávania, pripomienky atď. menu.hint_timezone Výber časového pásma +menu.hint_tools Spustenie nástrojov menu.hint_tvmode Prepne príjmač do TV režimu menu.hint_tvradio_switch Prepínanie medzi TV a Rádio režimom menu.hint_vfd LED-ky predného panelu, VFD voľby @@ -1119,6 +1181,7 @@ menu.hint_vfd_brightnessstandby Jas v režime pripravenosti menu.hint_vfd_defaults Obnoví prednastavené hodnoty jasu menu.hint_vfd_dimtime Čas automatického stmavnutia, v sekundách menu.hint_vfd_infoline Vybrať si zobrazenie na hlavnom riadku VFD +menu.hint_vfd_scroll Povolí alebo zakáže pohyb textu na VFD menu.hint_vfd_statusline Vybrať si krátke zobrazenie na \nstavovom riadku VFD menu.hint_video Obrazový výstup, rozlíšenie, formát\nPomer strán, voľby režimu rýchleho prepnutia menu.hint_video_43mode Režim obrazovky pre 4:3 obsah na 16:9 TV @@ -1137,6 +1200,7 @@ menu.hint_volume Konfigurácia volieb okna hlasitosti menu.hint_volume_digits Číselné zobrazenie ukazovateľa hlasitosti ZAP/VYP menu.hint_volume_pos Výber pozície indikátora hlasitosti menu.hint_volume_size Výber výšky indikátora hlasitosti +menu.hint_window_size Zoznam kanálov, EPG-Infp a niektoré iné okná sú zmenšené týmto faktorom menu.hint_ytplay Prehranie vybraných youtube videí menu.hint_zap_cycle Pri prepínaní kanálov zotrvať v aktuálnom bukete menu.next ďaľej (MENU ukončí) @@ -1172,6 +1236,8 @@ miscsettings.epg_old_events_hint2 Nastavenie v hodinách. miscsettings.epg_save Ulož/Obnov EPG po reštarte miscsettings.epg_save_standby Ulož EPG pri soft standby miscsettings.epg_scan Prehľadávanie EPG +miscsettings.epg_scan_bq buket +miscsettings.epg_scan_fav favoritné miscsettings.general Hlavné nastavenia miscsettings.head Rôzne nastavenia miscsettings.infobar Inforiadok @@ -1195,6 +1261,7 @@ miscsettings.infobar_show_res Zobraziť rozlišenie v stavovom riadku miscsettings.infobar_show_res_simple jednoduché miscsettings.infobar_show_sysfs_hdd Zaplnenie (sysFS & HDD) miscsettings.infobar_show_tuner Zobraziť aktívny tuner +miscsettings.infoclock Informačné hodiny miscsettings.progressbar Ukazovateľ miscsettings.progressbar_color Farba miscsettings.progressbar_design Vzhľad @@ -1214,6 +1281,7 @@ miscsettings.shutdown_count_hint2 do hlbokého spánku (0=vypnuté) miscsettings.shutdown_real Umožnenie pripravenosti miscsettings.shutdown_real_rcdelay Oneskorenie vypnutia miscsettings.sleeptimer Čas vypnutia pri neaktivite +miscsettings.sleeptimer_min Prednastavený časovač vypnutia miscsettings.volume Hlasitosť miscsettings.zapto_pre_time Korekcia času pred prepnutím (minuty) motorcontrol.calc_positions Prepočítaj pozície @@ -1375,22 +1443,23 @@ moviebrowser.use_movie_dir Použi adresár filmov moviebrowser.use_rec_dir Použi adresár nahrávania moviebrowser.yt_concurrent_connections Súbežné spojenia moviebrowser.yt_error Chyba načítania youtube videa +moviebrowser.yt_history Hľadať históriu +moviebrowser.yt_max_history Maximálna veľkosť hľadania histórie moviebrowser.yt_max_results Dosiahnuté maximum výsledkov -moviebrowser.yt_most_discussed Najdiskutovanejšie -moviebrowser.yt_most_popular Najpopulárnejšie -moviebrowser.yt_most_resent Najodmietanejšie -moviebrowser.yt_most_responded Najodpovedajšie -moviebrowser.yt_most_shared Najzdielanejšie +moviebrowser.yt_most_popular Najpopulárnejšie dnes +moviebrowser.yt_most_popular_all_time Najpopulárnejšie moviebrowser.yt_next_results Ďaľšie výsledky -moviebrowser.yt_on_the_web Trendové videá +moviebrowser.yt_orderby Triediť podľa +moviebrowser.yt_orderby.published dátum zverejnenia +moviebrowser.yt_orderby.rating obľúbenosť +moviebrowser.yt_orderby.relevance závažnosť +moviebrowser.yt_orderby.viewcount sledovanosť moviebrowser.yt_pref_quality Preferovaná kvalita moviebrowser.yt_prev_results Predchádzájúce výsledky moviebrowser.yt_recently_featured Nedávno odporúčané moviebrowser.yt_region Región moviebrowser.yt_related Podobné videá moviebrowser.yt_search Hľadať slovo -moviebrowser.yt_top_favorites Najobľúbenejšie -moviebrowser.yt_top_rated Najhodnotnejšie movieplayer.bookmark Záložky movieplayer.bookmarkname Názov záložky movieplayer.bookmarkname_hint1 Vloženie názvu @@ -1398,6 +1467,7 @@ movieplayer.bookmarkname_hint2 novej záložky? movieplayer.defplugin Spustenie doplnku movieplayer.fileplayback Súbor cez VLC movieplayer.head Prehrávač filmov +movieplayer.starting Spúšťa sa prehrávanie... movieplayer.toomanybookmarks Veľa záložiek.\nJe potrebné vymazať jednu najprv. movieplayer.tshelp1 Zastavenie movieplayer.tshelp10 asi 10 min dozadu @@ -1453,6 +1523,9 @@ networkmenu.setupnow Použi nastavenia siete networkmenu.setuponstartup Nastavenie siete pri štarte networkmenu.show Zobrazenie sieťového nastavenia networkmenu.ssid Názov siete (SSID) +networkmenu.ssid_scan Hľadanie WLAN sietí +networkmenu.ssid_scan_error Nenájdené WLAN siete +networkmenu.ssid_scan_wait Prebieha hľadanie WLAN sietí networkmenu.test Otestovanie siete neutrino_starting Spustenie Neutrina... nfs.alreadymounted Adresár je už pripojený @@ -1504,6 +1577,7 @@ parentallock.lockage16 od 16 rokov parentallock.lockage18 od 18 rokov parentallock.lockedchannel Kanál zamknutý... parentallock.lockedprogram Program zamknutý (od %d rokov) +parentallock.menu Bezpečnosť parentallock.never nikdy parentallock.onsignal pri zistení zámku parentallock.parentallock Rodičovský zámok @@ -1538,6 +1612,7 @@ personalize.pinhint Zadanie osobného PIN kódu personalize.pinprotect Áno personalize.pinstatus vyžadujú PIN personalize.plugins Doplnky +personalize.usermenu_plugin_types Výber Doplnku pre zobrazenie personalize.usermenu_preferred_buttons Priradenie preferovaných kláves personalize.usermenu_show_cancel Zobraziť "Zrušiť" kláves personalize.visible Viditeľné @@ -1591,6 +1666,7 @@ rclock.title Zamknutie Diaľkového Ovládača rclock.unlockmsg Ovládač opäť funkčný. recording.is_running Tento kanál sa nahráva. Spustiť nové nahrávanie? recording.start Spustenie nahrávania, prosím čakajte...! +recording.startstop_msg Správa pri spustení alebo ukončení nahrávania recording.stop Zastavenie nahrávania, prosím čakajte...! recording.time_hour hodina recording.time_hours hodín @@ -1626,8 +1702,6 @@ recordingmenu.vcr videomagnetofón recordingmenu.vtxt_pid Nahraj teletext recordingmenu.zap_on_announce Informuj o zapnutí nahrávania recordtimer.announce Začatie nahrávania za pár minút. -repeatblocker.hint_1 Doba spozdenia (ms) medzi dvoma stlačeniami klávesy -repeatblocker.hint_2 0 = vypnutie blokovania (červené tlačítko) reset_all Továrenské nastavenie reset_channels Zmazanie všetkych kanálov reset_confirm Skutočne? @@ -1877,9 +1951,18 @@ timing.infobar_radio Stavový riadok (rádio mód) timing.menu Menu timing.numericzap Prepínanie číslami timing.volumebar Ukazovateľ hlasitosti +two.infoviewer_ecm_info Zobrazovač ECM-infa +two.infoviewer_ecm_info_options_0 Vyp +two.infoviewer_ecm_info_options_1 Malé +two.infoviewer_ecm_info_options_2 Veľké unicable.lnb Vstup Unicable unicable.qrg Kmitočet Unicable unicable.scr SCR Unicable +unit.decimal . +unit.short.hour h +unit.short.millisecond ms +unit.short.minute min +unit.short.second s upnpbrowser.head UPnP prehliadač upnpbrowser.noservers Nenájdený UPnP server upnpbrowser.rescan Znova hľadať @@ -1892,6 +1975,7 @@ usermenu.head Uživateľské menu usermenu.item_bar --- Lemovanie --- usermenu.item_epg_misc Funkcie EPG usermenu.item_none Nič +usermenu.item_plugin_types Typy doplnku usermenu.item_vtxt Teletext usermenu.msg_info_is_empty Nenadefinovaný názov pre toto menu!\nPoužije sa prednastavený názov:\n usermenu.msg_warning_name Máte viac ako jednu položku vytvorené pro toto menu,\nale žiadny definovaný nový názov pro toto menu.\nDoporučujem vytvoriť nový názov! @@ -1950,6 +2034,7 @@ videomenu.videoformat_149 14:9 videomenu.videoformat_169 16:9 videomenu.videoformat_43 4:3 videomenu.videomode Obrazový režim +window_size Veľkosť okna v % wizard.initial_settings Najdené ininicializačné nastavenia wizard.install_settings Chcete inštalovať kanály pre Astra 19.2°E? wizard.setup Úvodná inštalácia diff --git a/src/nhttpd/web/languages/Slovak b/src/nhttpd/web/languages/Slovak index 0625c854e..dd984399d 100644 --- a/src/nhttpd/web/languages/Slovak +++ b/src/nhttpd/web/languages/Slovak @@ -1,7 +1,7 @@ # yWeb language file (Slovensky) by EnoSat -# language version: 1.1 -# $Date: 2013-08-03 20:20:20 +0100 (so, 3 Augusta 2013) $ -# $Revision: 212 $ +# language version: 1.2 +# $Date: 2014-02-22 17:17:17 +0100 (so, 22 Februára 2014) $ +# $Revision: 213 $ #========= Hlavné / Celkové nastavenie global.no_iframes=Váš prehliadač nepodporuje I-rámce. clear=vyčistiť @@ -99,6 +99,8 @@ bc.menue.switch_to_radio=prepnúť do Rádio bc.menue.webinf_slavebox=Webinterface pre podriadené zariadenie bc.menue.volumen_display=zobrazenie hlasitosti +bc.menue.signal=Sila signálu + #========= Ovládanie bc.control.freemem=Voľná pamäť bc.control.lock=zamknuté @@ -197,6 +199,8 @@ epg.si.onid=Originálny sieťový ID (ONID) epg.si.sid=Služba ID (SID) epg.si.tsid=Transpondér stream ID (TID) epg.si.vpid=Obrazový PID +epg.si.pmtpid=Program Map Table PID +epg.si.pcrpid=Program Clock Reference PID epg.si.apid=Zvukový PID epg.si.vtxtpid=TeleText PID epg.si.crypt=Kodovací systém From 0aaf3cd3696de914f0cb3e350f9be9b85f2968a4 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Sat, 22 Feb 2014 16:47:45 +0100 Subject: [PATCH 23/23] Update and sort locales --- data/locale/deutsch.locale | 8 ++++++-- data/locale/english.locale | 4 ++-- data/locale/slovak.locale | 4 ---- src/system/locals.h | 4 ++-- src/system/locals_intern.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 98cb8aac8..fbc619da5 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -570,6 +570,7 @@ fontmenu.gamelist Spiele-Liste fontmenu.head Schrift fontmenu.infobar Infobar fontmenu.menu Menü +fontmenu.other Andere fontmenu.scaling Schriftgrössenfaktor fontmenu.scaling_x Horizontal (in %) fontmenu.scaling_x_hint2 Horizontal (in %) min 50 / max 200 @@ -602,6 +603,7 @@ fontsize.menu Menütext fontsize.menu_hint Menü-Hilfe fontsize.menu_info Menüinfo fontsize.menu_title Menütitel +fontsize.subtitles Text Untertitel hdd_10min 10 min. hdd_1min 1 min. hdd_20min 20 min. @@ -1024,9 +1026,9 @@ menu.hint_pictureviewer_scaling Stellen Sie die Bildauflösung ein menu.hint_pictureviewer_slide_time Ändern Sie den Diashow-Intervall.\nStandardmäßig sind 10 Sekunden eingstellt menu.hint_picview Bilder anzeigen menu.hint_plugin_type_games Legt fest, ob Spiele 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_plugin_type_scripts Legt fest, ob Skripte im Benutzermenü unter der Rubrik 'Plugin-Typen' gezeigt werden sollen 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_hdd_dir Auswahl des Verzeichnisses zum Laden der Plugins von einem externen Datenträger 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 @@ -1468,10 +1470,12 @@ movieplayer.bookmark Bookmarks movieplayer.bookmarkname Bookmark Name movieplayer.bookmarkname_hint1 Geben Sie den Namen für das neue Lesezeichen ein movieplayer.bookmarkname_hint2 +movieplayer.chapters Kapitel movieplayer.defplugin Start-Plugin movieplayer.fileplayback Abspielen (Multiformat) movieplayer.head Movieplayer movieplayer.starting Wiedergabe starten... +movieplayer.titles Titel movieplayer.toomanybookmarks Sie haben bereits zu viele Lesezeichen angelegt.\nEs muß erst ein anderes gelöscht werden. movieplayer.tshelp1 Stopp movieplayer.tshelp10 ca. 10 Minuten zurück diff --git a/data/locale/english.locale b/data/locale/english.locale index f12ce722a..ec15f61b5 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1026,9 +1026,9 @@ menu.hint_pictureviewer_scaling Picture scaling algorithm menu.hint_pictureviewer_slide_time Slideshow interval, in seconds menu.hint_picview View pictures menu.hint_plugin_type_games Show games in usermenu at selection 'Plugin types' -menu.hint_plugin_type_tools Show tools in usermenu at selection 'Plugin types' -menu.hint_plugin_type_scripts Show scripts 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_hdd_dir Select directory to load\nplugins from menu.hint_power_leds Configure power-button LEDs behavior menu.hint_pref_lang Select preferred audio and EPG language\nselect 'none' to disable diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index 504c834ec..de11ee7c4 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -1951,10 +1951,6 @@ timing.infobar_radio Stavový riadok (rádio mód) timing.menu Menu timing.numericzap Prepínanie číslami timing.volumebar Ukazovateľ hlasitosti -two.infoviewer_ecm_info Zobrazovač ECM-infa -two.infoviewer_ecm_info_options_0 Vyp -two.infoviewer_ecm_info_options_1 Malé -two.infoviewer_ecm_info_options_2 Veľké unicable.lnb Vstup Unicable unicable.qrg Kmitočet Unicable unicable.scr SCR Unicable diff --git a/src/system/locals.h b/src/system/locals.h index a26be137f..c6ac6e6df 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1053,9 +1053,9 @@ typedef enum LOCALE_MENU_HINT_PICTUREVIEWER_SLIDE_TIME, LOCALE_MENU_HINT_PICVIEW, LOCALE_MENU_HINT_PLUGIN_TYPE_GAMES, - LOCALE_MENU_HINT_PLUGIN_TYPE_TOOLS, - LOCALE_MENU_HINT_PLUGIN_TYPE_SCRIPTS, LOCALE_MENU_HINT_PLUGIN_TYPE_LUA, + LOCALE_MENU_HINT_PLUGIN_TYPE_SCRIPTS, + LOCALE_MENU_HINT_PLUGIN_TYPE_TOOLS, LOCALE_MENU_HINT_PLUGINS_HDD_DIR, LOCALE_MENU_HINT_POWER_LEDS, LOCALE_MENU_HINT_PREF_LANG, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 6b0817caf..f17d1f15d 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1053,9 +1053,9 @@ const char * locale_real_names[] = "menu.hint_pictureviewer_slide_time", "menu.hint_picview", "menu.hint_plugin_type_games", - "menu.hint_plugin_type_tools", - "menu.hint_plugin_type_scripts", "menu.hint_plugin_type_lua", + "menu.hint_plugin_type_scripts", + "menu.hint_plugin_type_tools", "menu.hint_plugins_hdd_dir", "menu.hint_power_leds", "menu.hint_pref_lang",