diff options
author | Andreas Brugger <brougs78@gmx.net> | 2006-12-03 17:45:17 +0100 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-06-03 04:13:49 +0200 |
commit | ac64ce03ec6b5766691ff2da3af6f51ed800792a (patch) | |
tree | 11acc2de3a055ff546a1bfa5e5cdad20ab1715c7 | |
parent | 165c14206aa2e06c33ac887f9b9d0f816573a5fe (diff) | |
download | vdr-plugin-text2skin-ac64ce03ec6b5766691ff2da3af6f51ed800792a.tar.gz vdr-plugin-text2skin-ac64ce03ec6b5766691ff2da3af6f51ed800792a.tar.bz2 |
2006-12-03: Version 1.1-cvs_ext-0.10 (vdr-text2skin-1.1-cvs_ext-0.10.diff)brougs78-extensions
- set EditableWidth. This is important for plugins like 'rotor' or
'extrecmenu'
- now setting the locale setting LC_TIME according to the language-selection
in VDR
-rw-r--r-- | HISTORY | 7 | ||||
-rw-r--r-- | common.c | 2 | ||||
-rw-r--r-- | display.c | 2 | ||||
-rw-r--r-- | i18n.c | 29 | ||||
-rw-r--r-- | render.c | 17 | ||||
-rw-r--r-- | text2skin.c | 2 |
6 files changed, 52 insertions, 7 deletions
@@ -1,6 +1,13 @@ VDR Plugin 'text2skin' Revision History --------------------------------------- +2006-12-03: Version 1.1-cvs_ext-0.10 (vdr-text2skin-1.1-cvs_ext-0.10.diff) + +- set EditableWidth. This is important for plugins like 'rotor' or + 'extrecmenu' +- now setting the locale setting LC_TIME according to the language-selection + in VDR + 2006-11-19: Version 1.1-cvs_ext-0.9a (vdr-text2skin-1.1-cvs_ext-0.9a.diff) - added APIVERSION to the Makefile for vdr-1.3.47 @@ -4,6 +4,7 @@ #include "common.h" #include <sstream> +#include <locale.h> #include <vdr/plugin.h> #include <vdr/device.h> #include <sys/ioctl.h> @@ -409,6 +410,7 @@ cxType TimeType(time_t Time, const std::string &Format) if (Time > 0) { if (Format.length() > 0) { + setlocale(LC_TIME, tr("en_US")); strftime(result, sizeof(result), Format.c_str(), tm); cxType r = result; @@ -1194,7 +1194,6 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token) : (cxType)false; } else if (mRecording) { // recording Info cRecordingInfo *recInfo = const_cast<cRecordingInfo*>(mRecording->Info()); - tChannelID chID = recInfo->ChannelID(); cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID(), true); return channel != NULL ? (cxType)ChannelName(channel, 0) @@ -1209,7 +1208,6 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token) : (cxType)false; } else if (mRecording) { // recording Info cRecordingInfo *recInfo = const_cast<cRecordingInfo*>(mRecording->Info()); - tChannelID chID = recInfo->ChannelID(); cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID(), true); return channel != NULL ? (cxType)ChannelShortName(channel, 0) @@ -329,8 +329,8 @@ const tI18nPhrase Phrases[] = { "", #endif }, - { "Show auxiliary infos of recordings", - "Zusatzinfos der Aufnahmen anzeigen", + { "Auxiliary infos in recordings/timers", + "Zusatzinfos bei Aufnahmen/Timer anzeigen", "", "", "", @@ -454,6 +454,31 @@ const tI18nPhrase Phrases[] = { "", #endif }, + { "en_US", + "de_DE", + "sl_SI", + "it_IT", + "nl_NL", + "pt_PT", + "fr_FR", + "no_NO", + "fi_FI", + "pl_PL", + "es_ES", + "el_GR", + "sv_SE", + "ro_RO", + "hu_HU", + "ca_AD", + "ru_RU", + "hr_HR", +#if VDRVERSNUM >= 10313 + "et_EE", +#endif +#if VDRVERSNUM >= 10316 + "da_DK", +#endif + }, { NULL } }; @@ -227,6 +227,7 @@ void cText2SkinRender::DrawObject(const cxObject *Object) uint itemheight = item->Size().h; uint maxitems = areasize.h / itemheight; uint yoffset = 0; + bool initialEditableWidthSet = false; mMenuScrollbar.maxItems = maxitems; SetMaxItems(maxitems); //Dprintf("setmaxitems %d\n", maxitems); @@ -262,13 +263,23 @@ void cText2SkinRender::DrawObject(const cxObject *Object) nexttab = GetTab(n); } + // set initial EditableWidth + // this is for plugins like 'extrecmenu' and 'rotor' + if ((obj.Type() == cxObject::text || obj.Type() == cxObject::marquee || obj.Type() == cxObject::blink) && !initialEditableWidthSet) { + initialEditableWidthSet = true; + SetEditableWidth(obj.Size().w); + } + if (t >= 0 && nexttab > 0 && nexttab < obj.mPos1.x + obj.Size().w - 1) // there is a "next tab" with text obj.mPos2.x = Object->mPos1.x + o->mPos1.x + nexttab; else { // there is no "next tab", use the rightmost edge obj.mPos2.x += Object->mPos1.x; - if (obj.Type() == cxObject::text && t == 1) { + /* not used anymore due to change to fontOsd + but could be usefull if someone uses a differnt font + + if ((obj.Type() == cxObject::text || obj.Type() == cxObject::marquee || obj.Type() == cxObject::blink) && t == 1) { // VDR assumes, that the font in the menu is fontOsd, // so the EditableWidth is not necessarily correct // for TTF @@ -278,7 +289,9 @@ void cText2SkinRender::DrawObject(const cxObject *Object) if (defFont != obj.Font()) editableWidth = (int)(editableWidth * defFont->Width(dummy) / (1.1 * obj.Font()->Width(dummy))); SetEditableWidth(editableWidth); - } + } */ + if ((obj.Type() == cxObject::text || obj.Type() == cxObject::marquee || obj.Type() == cxObject::blink) && t == 1) + SetEditableWidth(obj.Size().w); } obj.mPos2.y += Object->mPos1.y + yoffset; diff --git a/text2skin.c b/text2skin.c index 2f18e4d..dc41f15 100644 --- a/text2skin.c +++ b/text2skin.c @@ -14,7 +14,7 @@ #include "loader.h" #include "status.h" -const char *cText2SkinPlugin::VERSION = "1.1-cvs_ext-0.9a"; +const char *cText2SkinPlugin::VERSION = "1.1-cvs_ext-0.10"; const char *cText2SkinPlugin::SKINVERSION = "1.0"; const char *cText2SkinPlugin::DESCRIPTION = "Loader for text-based skins"; |