Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wla70:vdr_2.6.7
vdr
16_vdr_wareagleicon.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 16_vdr_wareagleicon.patch of Package vdr
--- vdr-2.3.8.orig/config.c +++ vdr-2.3.8/config.c @@ -376,6 +376,7 @@ cSetup::cSetup(void) strcpy(OSDLanguage, ""); // default is taken from environment strcpy(OSDSkin, "lcars"); strcpy(OSDTheme, "default"); + WarEagleIcons = 1; PrimaryDVB = 1; ShowInfoOnChSwitch = 1; TimeoutRequChInfo = 1; @@ -609,6 +610,7 @@ bool cSetup::Parse(const char *Name, con if (!strcasecmp(Name, "OSDLanguage")) { strn0cpy(OSDLanguage, Value, sizeof(OSDLanguage)); I18nSetLocale(OSDLanguage); } else if (!strcasecmp(Name, "OSDSkin")) Utf8Strn0Cpy(OSDSkin, Value, MaxSkinName); else if (!strcasecmp(Name, "OSDTheme")) Utf8Strn0Cpy(OSDTheme, Value, MaxThemeName); + else if (!strcasecmp(Name, "WarEagleIcons")) WarEagleIcons = atoi(Value); else if (!strcasecmp(Name, "PrimaryDVB")) PrimaryDVB = atoi(Value); else if (!strcasecmp(Name, "ShowInfoOnChSwitch")) ShowInfoOnChSwitch = atoi(Value); else if (!strcasecmp(Name, "TimeoutRequChInfo")) TimeoutRequChInfo = atoi(Value); @@ -746,6 +748,7 @@ bool cSetup::Save(void) Store("OSDLanguage", OSDLanguage); Store("OSDSkin", OSDSkin); Store("OSDTheme", OSDTheme); + Store("WarEagleIcons", WarEagleIcons); Store("PrimaryDVB", PrimaryDVB); Store("ShowInfoOnChSwitch", ShowInfoOnChSwitch); Store("TimeoutRequChInfo", TimeoutRequChInfo); --- vdr-2.3.8.orig/config.h +++ vdr-2.3.8/config.h @@ -258,6 +258,7 @@ public: char OSDLanguage[I18N_MAX_LOCALE_LEN]; char OSDSkin[MaxSkinName]; char OSDTheme[MaxThemeName]; + int WarEagleIcons; int PrimaryDVB; int ShowInfoOnChSwitch; int TimeoutRequChInfo; --- /dev/null +++ vdr-2.3.8/iconpatch.c @@ -0,0 +1,28 @@ + +#include "iconpatch.h" + +#include <langinfo.h> +#include <locale.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +bool IsLangUtf8(void) +{ + char *CodeSet = NULL; + if (setlocale(LC_CTYPE, "")) + CodeSet = nl_langinfo(CODESET); + else { + char *LangEnv = getenv("LANG"); // last resort in case locale stuff isn't installed + if (LangEnv) { + CodeSet = strchr(LangEnv, '.'); + if (CodeSet) + CodeSet++; // skip the dot + } + } + + if (CodeSet && strcasestr(CodeSet, "UTF-8") != 0) + return true; + + return false; +} --- /dev/null +++ vdr-2.3.8/iconpatch.h @@ -0,0 +1,74 @@ +/* + * iconpatch.h: Information of iconpatch + * + * Diese Datei ist die Übersichtsdatei für den Iconpatch. + * Hier werden kleine Infos abgelegt. + * Der Iconpatch ändert die Dateien: + * iconpatch.h + * menu.c + * recording.c + * fontosd.c + * + */ + +// Iconpatch-Variablen - Anfang +#define ICON_NUMBERSIGN "\x23" +#define ICON_ASTERISK "\x2A" +#define ICON_GREATER "\x3E" +#define ICON_EXCLAM "\x21" +#define ICON_PLUSMINUS "\xB1" + +#define ICON_RESUME "\x80" +#define ICON_DVD "\x81" +#define ICON_FOLDER "\x82" +#define ICON_BLANK "\x83" +#define ICON_CUTTING "\x84" +#define ICON_MOVE_FILE "\x85" +#define ICON_MOVE_FOLDER "\x86" +#define ICON_BAR_START "\x87" +#define ICON_BAR_FILLED "\x88" +#define ICON_BAR_CLEAR "\x89" +#define ICON_BAR_END "\x8A" +#define ICON_REC "\x8B" +#define ICON_CLOCK "\x8C" +#define ICON_TV_CRYPTED "\x8D" +#define ICON_RADIO "\x8E" +#define ICON_TV "\x8F" +#define ICON_NEW "\x90" +#define ICON_ARROW "\x91" +#define ICON_RUNNING "\x92" +#define ICON_VPS "\x93" +#define ICON_CLOCK_UH "\x94" +#define ICON_CLOCK_LH "\x95" +#define ICON_TIMER_INACT "\x96" + +// UTF-8 Icons +#define ICON_RESUME_UTF8 "\uE000" +#define ICON_DVD_UTF8 "\uE001" +#define ICON_FOLDER_UTF8 "\uE002" +#define ICON_BLANK_UTF8 "\uE003" +#define ICON_CUTTING_UTF8 "\uE004" +#define ICON_MOVE_FILE_UTF8 "\uE005" +#define ICON_MOVE_FOLDER_UTF8 "\uE006" +#define ICON_BAR_START_UTF8 "\uE007" +#define ICON_BAR_FILLED_UTF8 "\uE008" +#define ICON_BAR_EMPTY_UTF8 "\uE009" +#define ICON_BAR_CLOSE_UTF8 "\uE00A" +#define ICON_REC_UTF8 "\uE00B" +#define ICON_CLOCK_UTF8 "\uE00C" +#define ICON_TV_CRYPTED_UTF8 "\uE00D" +#define ICON_RADIO_UTF8 "\uE00E" +#define ICON_TV_UTF8 "\uE00F" +#define ICON_NEW_UTF8 "\uE010" +#define ICON_ARROW_UTF8 "\uE011" +#define ICON_RUNNING_UTF8 "\uE012" +#define ICON_VPS_UTF8 "\uE013" +#define ICON_CLOCK_UH_UTF8 "\uE014" +#define ICON_CLOCK_LH_UTF8 "\uE015" +#define ICON_TIMER_INACT_UTF8 "\uE016" + +// Iconpatch-Variablen - Ende + +bool IsLangUtf8(void); + + --- vdr-2.3.8.orig/menu.c +++ vdr-2.3.8/menu.c @@ -8,6 +8,7 @@ */ #include "menu.h" +#include "iconpatch.h" #include <ctype.h> #include <limits.h> #include <math.h> @@ -332,6 +333,14 @@ void cMenuChannelItem::Set(void) const char *R = !channel->Vpid() && (*channel->Apids() || *channel->Dpids()) ? "R" : ""; if (sortMode == csmProvider) buffer = cString::sprintf("%d\t%s%s\t%s - %s", channel->Number(), X, R, channel->Provider(), channel->Name()); + else if (Setup.WarEagleIcons) { + if (channel->Vpid() == 1 || channel->Vpid() == 0) + buffer = cString::sprintf("%d\t%s %-30s", channel->Number(), IsLangUtf8() ? ICON_RADIO_UTF8 : ICON_RADIO, channel->Name()); + else if (channel->Ca() == 0) + buffer = cString::sprintf("%d\t%s %-30s", channel->Number(), IsLangUtf8() ? ICON_TV_UTF8 : ICON_TV, channel->Name()); + else + buffer = cString::sprintf("%d\t%s %-30s", channel->Number(), IsLangUtf8() ? ICON_TV_CRYPTED_UTF8 : ICON_TV_CRYPTED, channel->Name()); + } else buffer = cString::sprintf("%d\t%s%s\t%s", channel->Number(), X, R, channel->Name()); } @@ -1560,7 +1569,15 @@ int cMenuScheduleItem::Compare(const cLi return r; } -static const char *TimerMatchChars = " tT iI"; +static const char *TimerMatchChars[18] = +{ + " ", "t", "T", + " ", "i", "I", + ICON_BLANK, ICON_CLOCK_UH, ICON_CLOCK, + ICON_BLANK, ICON_BLANK, ICON_TIMER_INACT, // Zeichen für leer, kleines i, grosses I + ICON_BLANK_UTF8, ICON_CLOCK_UH_UTF8, ICON_CLOCK_UTF8, + ICON_BLANK_UTF8, ICON_BLANK_UTF8, ICON_TIMER_INACT_UTF8 // Zeichen utf8 für leer, kleines i, grosses I +}; bool cMenuScheduleItem::Update(const cTimers *Timers, bool Force) { @@ -1570,17 +1587,17 @@ bool cMenuScheduleItem::Update(const cTi timerActive = Timer && Timer->HasFlags(tfActive); if (Force || timerMatch != OldTimerMatch || timerActive != OldTimerActive) { cString buffer; - char t = TimerMatchChars[timerMatch + (timerActive ? 0 : 3)]; - char v = event->Vps() && (event->Vps() - event->StartTime()) ? 'V' : ' '; - char r = event->SeenWithin(30) && event->IsRunning() ? '*' : ' '; + const char *t = Setup.WarEagleIcons ? IsLangUtf8() ? TimerMatchChars[timerMatch + (timerActive ? 12 : 15)] : TimerMatchChars[timerMatch + (timerActive ? 6 : 9)] : TimerMatchChars[timerMatch + (timerActive ? 0 : 3)]; + const char *v = event->Vps() && (event->Vps() - event->StartTime()) ? Setup.WarEagleIcons ? IsLangUtf8() ? ICON_VPS_UTF8 : ICON_VPS : "V" : " "; + const char *r = event->SeenWithin(30) && event->IsRunning() ? Setup.WarEagleIcons ? IsLangUtf8() ? ICON_RUNNING_UTF8 : ICON_RUNNING : "*" : " "; const char *csn = channel ? channel->ShortName(true) : NULL; cString eds = event->GetDateString(); if (channel && withDate) - buffer = cString::sprintf("%d\t%.*s\t%.*s\t%s\t%c%c%c\t%s", channel->Number(), Utf8SymChars(csn, 999), csn, Utf8SymChars(eds, 6), *eds, *event->GetTimeString(), t, v, r, event->Title()); + buffer = cString::sprintf("%d\t%.*s\t%.*s\t%s\t%s%s%s\t%s", channel->Number(), Utf8SymChars(csn, 999), csn, Utf8SymChars(eds, 6), *eds, *event->GetTimeString(), t, v, r, event->Title()); else if (channel) - buffer = cString::sprintf("%d\t%.*s\t%s\t%c%c%c\t%s", channel->Number(), Utf8SymChars(csn, 999), csn, *event->GetTimeString(), t, v, r, event->Title()); + buffer = cString::sprintf("%d\t%.*s\t%s\t%s%s%s\t%s", channel->Number(), Utf8SymChars(csn, 999), csn, *event->GetTimeString(), t, v, r, event->Title()); else - buffer = cString::sprintf("%.*s\t%s\t%c%c%c\t%s", Utf8SymChars(eds, 6), *eds, *event->GetTimeString(), t, v, r, event->Title()); + buffer = cString::sprintf("%.*s\t%s\t%s%s%s\t%s", Utf8SymChars(eds, 6), *eds, *event->GetTimeString(), t, v, r, event->Title()); SetText(buffer); return true; } @@ -3517,6 +3534,7 @@ void cMenuSetupOSD::Set(void) Add(new cMenuEditStraItem(tr("Setup.OSD$Skin"), &skinIndex, numSkins, skinDescriptions)); if (themes.NumThemes()) Add(new cMenuEditStraItem(tr("Setup.OSD$Theme"), &themeIndex, themes.NumThemes(), themes.Descriptions())); + Add(new cMenuEditBoolItem(tr("Setup.OSD$WarEagle icons"), &data.WarEagleIcons)); Add(new cMenuEditPrcItem( tr("Setup.OSD$Left (%)"), &data.OSDLeftP, 0.0, 0.5)); Add(new cMenuEditPrcItem( tr("Setup.OSD$Top (%)"), &data.OSDTopP, 0.0, 0.5)); Add(new cMenuEditPrcItem( tr("Setup.OSD$Width (%)"), &data.OSDWidthP, 0.5, 1.0)); --- vdr-2.3.8.orig/recording.c +++ vdr-2.3.8/recording.c @@ -8,6 +8,7 @@ */ #include "recording.h" +#include "iconpatch.h" #include <ctype.h> #include <dirent.h> #include <errno.h> @@ -1083,7 +1084,7 @@ const char *cRecording::Title(char Delimiter, bool NewIndicator, int Level) const { - const char *New = NewIndicator && IsNew() ? "*" : ""; + const char *New = NewIndicator && IsNew() ? Setup.WarEagleIcons ? IsLangUtf8() ? ICON_NEW_UTF8 : ICON_NEW : "*" : " "; const char *Err = NewIndicator && (info->Errors() > 0) ? "!" : ""; free(titleBuffer); titleBuffer = NULL; --- vdr-2.3.8.orig/Makefile +++ vdr-2.3.8/Makefile @@ -83,6 +83,8 @@ OBJS = args.o audio.o channels.o ci.o co skinclassic.o skinlcars.o skins.o skinsttng.o sourceparams.o sources.o spu.o status.o svdrp.o themes.o thread.o\ timers.o tools.o transfer.o vdr.o videodir.o +OBJS += iconpatch.o + DEFINES += $(CDEFINES) INCLUDES += $(CINCLUDES)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor