From e76b3720319861aac4b0bc8dc75b0176434372a9 Mon Sep 17 00:00:00 2001 From: seife Date: Sun, 26 Dec 2010 11:34:13 +0000 Subject: [PATCH] neutrino: make big EPG window run-time configurable This was configurable with "-DUSE_SPACE_EFFICIENTLY" but can easily be integrated into the OSD menu. TODO: better locale texts could probably be found. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@967 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- data/locale/deutsch.locale | 1 + data/locale/english.locale | 1 + src/gui/epgview.cpp | 14 ++++++-------- src/gui/osd_setup.cpp | 2 +- src/neutrino.cpp | 2 ++ src/system/locals.h | 1 + src/system/locals_intern.h | 1 + src/system/settings.h | 1 + 8 files changed, 14 insertions(+), 9 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 4b0e74b06..81bf9cf46 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -257,6 +257,7 @@ extra.volume_pos Lautstärkeanzeige extra.chadded Der aktuelle Kanal wird dem selektierten Bouquet hinzugefügt...\n extra.chalreadyinbq Der aktuelle Kanal ist bereits im selektierten Bouquet...\n extra.clear_log Logdatei löschen +extra.bigwindows Große Fenster extra.dboxinfo Box-Info extra.east Osten extra.fec_1_2 1/2 S1_QPSK diff --git a/data/locale/english.locale b/data/locale/english.locale index 57790542c..ef6772e34 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -983,6 +983,7 @@ videomenu.sharpness Sharpness videomenu.saturation Saturation videomenu.hue Hue zaptotimer.announce Zapto timer in one minute +extra.bigwindows Big Windows extra.dboxinfo Box Info extra.scan_mode Scan mode extra.start_tostandby Startup to standby diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 7fd3d9614..c8aae52a9 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -123,17 +123,15 @@ CEpgData::CEpgData() void CEpgData::start() { - /* if you want usably sized epg windows, compile with "-DUSE_SPACE_EFFICIENTLY" */ -#ifndef USE_SPACE_EFFICIENTLY -#define EPGWIN_SCALE_FACTOR BIG_FONT_FAKTOR -#else -#define EPGWIN_SCALE_FACTOR 1 -#endif /* This defines the size of the EPG window. We use 90% of the screen width and * 90% of the screen height. It adjusts itself to the "visible screen" settings */ - ox = (frameBuffer->getScreenWidth() / 20 * 18) / (bigFonts ? 1 : EPGWIN_SCALE_FACTOR); - oy = (frameBuffer->getScreenHeight() / 20 * 18) / (bigFonts ? 1 : EPGWIN_SCALE_FACTOR); + float epgwin_scale_factor = BIG_FONT_FAKTOR; /* stupid useless use of float */ + if (g_settings.big_windows) + epgwin_scale_factor = 1; + + ox = (frameBuffer->getScreenWidth() / 20 * 18) / (bigFonts ? 1 : epgwin_scale_factor); + oy = (frameBuffer->getScreenHeight() / 20 * 18) / (bigFonts ? 1 : epgwin_scale_factor); sx = getScreenStartX(ox); sy = getScreenStartY(oy); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index f640687c6..fdbd301a0 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -268,8 +268,8 @@ void COsdSetup::showOsdSetup() osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true)); osd_menu->addItem(new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true)); osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true )); + osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_BIGWINDOWS, &g_settings.big_windows, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - osd_menu->exec(NULL, ""); osd_menu->hide(); delete osd_menu; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index d05e6cf6a..6b19174f3 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -744,6 +744,7 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings g_settings.screen_height = configfile.getInt32("screen_height", 0); g_settings.bigFonts = configfile.getInt32("bigFonts", 0); + g_settings.big_windows = configfile.getInt32("big_windows", 0); strcpy(g_settings.repeat_blocker, configfile.getString("repeat_blocker", "150").c_str()); strcpy(g_settings.repeat_genericblocker, configfile.getString("repeat_genericblocker", "100").c_str()); @@ -1339,6 +1340,7 @@ void CNeutrinoApp::saveSetup(const char * fname) } configfile.setInt32("bigFonts", g_settings.bigFonts); + configfile.setInt32("big_windows", g_settings.big_windows); #if 0 configfile.setInt32("pip_x", g_settings.pip_x); configfile.setInt32("pip_y", g_settings.pip_y); diff --git a/src/system/locals.h b/src/system/locals.h index 9fffe2e84..3f45d1e3b 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1255,6 +1255,7 @@ typedef enum { LOCALE_ZAPIT_SCANTYPE_TV, LOCALE_ZAPIT_SCANTYPE_TVRADIO, LOCALE_ZAPTOTIMER_ANNOUNCE, + LOCALE_EXTRA_BIGWINDOWS, LOCALE_DBOXINFO, LOCALE_EXTRA_SCANMODE, LOCALE_EXTRA_STARTSTANDBY, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 87c3d88b1..eeaf4fb02 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1255,6 +1255,7 @@ const char *locale_real_names[] = { "zapit.scantype.tv", "zapit.scantype.tvradio", "zaptotimer.announce", + "extra.bigwindows", "extra.dboxinfo", "extra.scan_mode", "extra.start_tostandby", diff --git a/src/system/settings.h b/src/system/settings.h index a2639efc2..b98be8733 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -314,6 +314,7 @@ struct SNeutrinoSettings int pip_x; int pip_y; int bigFonts; + int big_windows; int channellist_epgtext_align_right; int channellist_extended;