[Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-84-g48f0523
Tuxbox Sources
Brought to you by:
dbt1
|
From: Thilo G. <tux...@ne...> - 2013-04-04 08:49:20
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 48f0523f8f08aa559c0b32159a875248d0ac3721 (commit)
via f87a2f7007916baf089cfc1fd8386728ab314950 (commit)
via 294d7fc3773a2fb2f66cbd2b90ef3a1cbaaac676 (commit)
via aaaa235ac2f7113e047f89631bf84c34e7f57d80 (commit)
via d55b2c57052a0e560da9fd352611589b5c54e9cc (commit)
via c04ce058e4b64fdfe2c74072be861a579324ded0 (commit)
via 32a52d7fe15b3d09cdfe2e33783fd8b374f324f1 (commit)
via 782fbb88514b258334cfd99676d6bb5dca8450d9 (commit)
via d48495ced0fb71c06c5e1f93a1eeee23aeee325f (commit)
via e83d957e4555d8cf47359aeb1bc31ebb7feb9fae (commit)
via 6d05b78afb254a54659d8b26f401e372150247e2 (commit)
via cbb38ce3f9968ed9035725743277e05787ecc646 (commit)
via 38adb0c12c2a4d21c2fe29b84cf132c3a89c2961 (commit)
via 970baf22101354be1ce7ea5636c47794430ef939 (commit)
via 87c371d4bbec173d24c94ecc30ff3a07a98047a0 (commit)
via 266cf7735b558caffdab88af77314377bf792611 (commit)
via ad450de365d980a7ec05dbdb04324399bf33355d (commit)
via cb48498e8632b30477e31080e891ff8d18526ca4 (commit)
via 8c04fadc5ff7229f3f737011a2c6689fe02a37bd (commit)
from d1d728263e78e1bbb10797adc44a380dc6162368 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 48f0523f8f08aa559c0b32159a875248d0ac3721
Author: GetAway <get...@t-...>
Date: Wed Apr 3 22:37:21 2013 +0200
neutrino: port save bigFonts code in epgview from N-HD
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp
index 9ed2678..aff3f07 100644
--- a/tuxbox/neutrino/src/gui/epgview.cpp
+++ b/tuxbox/neutrino/src/gui/epgview.cpp
@@ -433,6 +433,11 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
GetEPGData(channel_id, id, &startzeit );
if (doLoop)
{
+ if (!bigFonts && g_settings.bigFonts) {
+ g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR / 10);
+ g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR / 10);
+ }
+ bigFonts = g_settings.bigFonts;
evtlist = g_Sectionsd->getEventsServiceKey(channel_id);
// Houdini added for Private Premiere EPG start sorted by start date/time
sort(evtlist.begin(),evtlist.end(),sortByDateTime);
@@ -767,6 +772,11 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
loop = false;
else
{
+ if (!bigFonts && g_settings.bigFonts) {
+ g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR / 10);
+ g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR / 10);
+ }
+ bigFonts = g_settings.bigFonts;
show(channel_id, id, &startzeit, false);
showPos = 0;
}
@@ -784,6 +794,7 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * 10 / BIG_FONT_FAKTOR);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * 10 / BIG_FONT_FAKTOR);
}
+ g_settings.bigFonts = bigFonts;
show(channel_id, id, &startzeit, false);
showPos=0;
break;
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index 9536fbb..904126f 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -375,6 +375,9 @@ int CNeutrinoApp::loadSetup()
g_settings.epg_max_events = configfile.getString("epg_max_events", "6000");
g_settings.epg_dir = configfile.getString("epg_dir", "");
+ // EPG-View
+ g_settings.bigFonts = configfile.getInt32("bigFonts", 0);
+
// NTP-Server for sectionsd
g_settings.network_ntpserver = configfile.getString("network_ntpserver", "130.60.7.42");
g_settings.network_ntprefresh = configfile.getString("network_ntprefresh", "30" );
@@ -978,6 +981,9 @@ void CNeutrinoApp::saveSetup()
configfile.setString("epg_max_events" ,g_settings.epg_max_events );
configfile.setString("epg_dir" ,g_settings.epg_dir);
+ // EPG-View
+ configfile.setInt32("bigFonts", g_settings.bigFonts);
+
//misc
configfile.setBool("standby_save_power" , g_settings.standby_save_power);
configfile.setBool("shutdown_real" , g_settings.shutdown_real);
diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h
index c61a93f..9b961ff 100644
--- a/tuxbox/neutrino/src/system/settings.h
+++ b/tuxbox/neutrino/src/system/settings.h
@@ -68,6 +68,7 @@ struct SNeutrinoSettings
int progressbar_color;
int infobar_show;
int show_mute_icon;
+ int bigFonts;
int channellist_additional;
int channellist_epgtext_align_right;
int channellist_extended;
commit f87a2f7007916baf089cfc1fd8386728ab314950
Author: GetAway <get...@t-...>
Date: Wed Apr 3 20:33:24 2013 +0200
zapit: check ModifiedFlag before save controld.conf
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/dvb/zapit/src/controld.cpp b/dvb/zapit/src/controld.cpp
index e3446dd..7c90eed 100644
--- a/dvb/zapit/src/controld.cpp
+++ b/dvb/zapit/src/controld.cpp
@@ -340,7 +340,8 @@ void controldSaveSettings()
{
/* does not really belong here? */
controldconfig->setInt32("volume_type", settings.volume_type);
- controldconfig->saveConfig(CONF_FILE);
+ if (controldconfig->getModifiedFlag())
+ controldconfig->saveConfig(CONF_FILE);
}
void shutdownBox()
@@ -951,7 +952,7 @@ void setAviaChip()
void controld_main(void)
{
/* load configuration */
- controldconfig = new CConfigFile(',');
+ controldconfig = new CConfigFile(',', false);
if (!controldconfig->loadConfig(CONF_FILE))
{
commit 294d7fc3773a2fb2f66cbd2b90ef3a1cbaaac676
Author: Christian Schuett <Gau...@ho...>
Date: Tue Apr 2 21:32:28 2013 +0200
Neutrino: use {w,h}_max() and getScreenStart{X,Y}() if possible
also remove some unnecessary if-clauses when using these functions
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/alphasetup.cpp b/tuxbox/neutrino/src/gui/alphasetup.cpp
index 37de8b0..2fe47ab 100644
--- a/tuxbox/neutrino/src/gui/alphasetup.cpp
+++ b/tuxbox/neutrino/src/gui/alphasetup.cpp
@@ -69,7 +69,7 @@ CAlphaSetup::CAlphaSetup(const neutrino_locale_t Name)
width = w_max (360, 100);
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
- height = hheight+ mheight*3;
+ height = h_max (hheight + mheight * 3, 0);
x = getScreenStartX (width);
y = getScreenStartY (height);
diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp
index 29f3d8e..bf51ed9 100644
--- a/tuxbox/neutrino/src/gui/audioplayer.cpp
+++ b/tuxbox/neutrino/src/gui/audioplayer.cpp
@@ -46,6 +46,7 @@
#include <driver/encoding.h>
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
+#include <driver/screen_max.h>
#include <driver/audioplay.h>
#include <driver/audiometadata.h>
@@ -249,12 +250,8 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &)
m_current = 0;
m_selected = 0;
- m_width = 710;
- if((g_settings.screen_EndX - g_settings.screen_StartX) < m_width+ConnectLineBox_Width)
- m_width=(g_settings.screen_EndX - g_settings.screen_StartX) - ConnectLineBox_Width;
- m_height = 570;
- if((g_settings.screen_EndY - g_settings.screen_StartY) < m_height)
- m_height = (g_settings.screen_EndY - g_settings.screen_StartY);
+ m_width = w_max(710, ConnectLineBox_Width);
+ m_height = h_max(570, 0);
m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
m_buttonHeight = std::min(25, m_sheight);
m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
@@ -264,9 +261,8 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &)
m_listmaxshow = (m_height - m_info_height - m_title_height - m_theight - 2*m_buttonHeight) / (m_fheight);
m_height = m_theight + m_info_height + m_title_height + 2*m_buttonHeight + m_listmaxshow * m_fheight; // recalc height
- m_x = (((g_settings.screen_EndX - g_settings.screen_StartX) - (m_width + ConnectLineBox_Width)) / 2)
- + g_settings.screen_StartX + ConnectLineBox_Width;
- m_y = (((g_settings.screen_EndY- g_settings.screen_StartY) - m_height)/ 2) + g_settings.screen_StartY;
+ m_x = getScreenStartX(m_width + ConnectLineBox_Width) + ConnectLineBox_Width;
+ m_y = getScreenStartY(m_height);
m_idletime=time(NULL);
m_screensaver=false;
@@ -791,8 +787,8 @@ int CAudioPlayerGui::show()
/* show a hint box with current char (too slow at the moment?)*/
// char selectedKey[1];
// sprintf(selectedKey,"%c",smsKey);
-// int x1=(g_settings.screen_EndX- g_settings.screen_StartX)/2 + g_settings.screen_StartX-50;
-// int y1=(g_settings.screen_EndY- g_settings.screen_StartY)/2 + g_settings.screen_StartY;
+// int x1 = getScreenStartX(0) - 50;
+// int y1 = getScreenStartY(0);
// int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight();
// int w = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(selectedKey);
// m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6);
@@ -2330,8 +2326,8 @@ void CAudioPlayerGui::GetMetaData(CAudiofileExt &File)
bool CAudioPlayerGui::getNumericInput(neutrino_msg_t& msg, int& val) {
neutrino_msg_data_t data;
- int x1 = (g_settings.screen_EndX - g_settings.screen_StartX) / 2 + g_settings.screen_StartX - 50;
- int y1 = (g_settings.screen_EndY - g_settings.screen_StartY) / 2 + g_settings.screen_StartY;
+ int x1 = getScreenStartX(0) - 50;
+ int y1 = getScreenStartY(0);
char str[11];
do
{
diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
index 099dc37..6f311af 100644
--- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
+++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
@@ -228,10 +228,8 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent)
frameBuffer = CFrameBuffer::getInstance();
visible = false;
selected = 0;
- // Max
+
width = w_max (720, 30);
- if(g_settings.screen_EndX-g_settings.screen_StartX < width)
- width=g_settings.screen_EndX-g_settings.screen_StartX-10;
int iconw = 0, iconh = 0;
frameBuffer->getIconSize(NEUTRINO_ICON_BOOKMARKMANAGER, &iconw, &iconh);
diff --git a/tuxbox/neutrino/src/gui/drive_setup.cpp b/tuxbox/neutrino/src/gui/drive_setup.cpp
index aaa6b4d..5666ba7 100644
--- a/tuxbox/neutrino/src/gui/drive_setup.cpp
+++ b/tuxbox/neutrino/src/gui/drive_setup.cpp
@@ -203,7 +203,7 @@ CDriveSetup::CDriveSetup():configfile('\t')
width = w_max (600, 50);
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
- height = hheight+13*mheight+ 10;
+ height = h_max (hheight+13*mheight+10, 0);
selected_main = -1;
x = getScreenStartX (width);
y = getScreenStartY (height);
diff --git a/tuxbox/neutrino/src/gui/epgplus.cpp b/tuxbox/neutrino/src/gui/epgplus.cpp
index b7f258c..426de17 100644
--- a/tuxbox/neutrino/src/gui/epgplus.cpp
+++ b/tuxbox/neutrino/src/gui/epgplus.cpp
@@ -610,8 +610,8 @@ EpgPlus::EpgPlus()
// this->usableScreenWidth = 580;
// this->usableScreenHeight = 480;
- usableScreenWidth = w_max(g_settings.screen_EndX, 4);
- usableScreenHeight = h_max(g_settings.screen_EndY, 4);
+ usableScreenWidth = w_max(720, 4);
+ usableScreenHeight = h_max(576, 4);
selectedChannelEntry = NULL;
init();
@@ -832,14 +832,14 @@ void EpgPlus::init()
entryHeight = ChannelEntry::getUsedHeight();
int footerHeight = Footer::getUsedHeight();
- usableScreenWidth = w_max(g_settings.screen_EndX, 4);
- usableScreenHeight = h_max(g_settings.screen_EndY, 4);
+ usableScreenWidth = w_max(720, 4);
+ usableScreenHeight = h_max(576, 4);
maxNumberOfDisplayableEntries = (usableScreenHeight - headerHeight - timeLineHeight - horGap1Height - horGap2Height - footerHeight) / entryHeight;
usableScreenHeight = headerHeight + timeLineHeight + horGap1Height + maxNumberOfDisplayableEntries * entryHeight + horGap2Height + footerHeight; // recalc deltaY
- usableScreenX = ((g_settings.screen_EndX - g_settings.screen_StartX - usableScreenWidth) / 2) + g_settings.screen_StartX;
- usableScreenY = ((g_settings.screen_EndY - g_settings.screen_StartY - usableScreenHeight) / 2) + g_settings.screen_StartY;
+ usableScreenX = getScreenStartX(usableScreenWidth);
+ usableScreenY = getScreenStartY(usableScreenHeight);
headerX = usableScreenX;
headerY = usableScreenY;
diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp
index 0fa1464..a1c3571 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -41,6 +41,7 @@
#include <gui/widget/messagebox.h>
#include <driver/encoding.h>
+#include <driver/screen_max.h>
#include <algorithm>
#include <iostream>
@@ -62,8 +63,6 @@
#include <curl/easy.h>
#endif
-#include <driver/encoding.h>
-
#include <xmltree/xmlinterface.h>
#ifdef __USE_FILE_OFFSET64
@@ -382,11 +381,11 @@ void CFileBrowser::commonInit()
selected = 0;
selections.clear();
- x = g_settings.screen_StartX + 20;
- y = g_settings.screen_StartY + 20;
+ width = w_max(720, 40);
+ height = h_max(576, 40);
- width = (g_settings.screen_EndX - g_settings.screen_StartX - 40);
- height = (g_settings.screen_EndY - g_settings.screen_StartY - 40);
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
theight = fnt_title->getHeight();
fheight = fnt_item->getHeight();
diff --git a/tuxbox/neutrino/src/gui/motorcontrol.cpp b/tuxbox/neutrino/src/gui/motorcontrol.cpp
index 8fc3b5c..1cc6328 100644
--- a/tuxbox/neutrino/src/gui/motorcontrol.cpp
+++ b/tuxbox/neutrino/src/gui/motorcontrol.cpp
@@ -67,8 +67,8 @@ CMotorControl::CMotorControl()
width = w_max (550, 30);
height = h_max (head_height + status_height + menue_height, 30);
- x = ((720 - width) >> 1);
- y = (576 - height) >> 1;
+ x = getScreenStartX (width);
+ y = getScreenStartY (height);
stepSize = 1; //default: 1 step
stepMode = STEP_MODE_TIMED;
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index e3b411d..e00ea28 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -58,6 +58,7 @@
#include <algorithm>
#include <stdlib.h>
+#include <driver/screen_max.h>
#include <gui/moviebrowser.h>
#include <gui/movieplayer.h>
#include <gui/filebrowser.h>
@@ -147,11 +148,11 @@ const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_
{ 99, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_ALWAYS }
};
-#define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX - 40)
-#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40)
+#define MAX_WINDOW_WIDTH (w_max(720, 40))
+#define MAX_WINDOW_HEIGHT (h_max(576, 40))
-#define MIN_WINDOW_WIDTH ((g_settings.screen_EndX - g_settings.screen_StartX)>>1)
-#define MIN_WINDOW_HEIGHT 200
+#define MIN_WINDOW_WIDTH (w_max(720, 0) >> 1)
+#define MIN_WINDOW_HEIGHT 200
#define TITLE_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUHEAD_PLUS_0)
#define TITLE_FONT_COLOR ((CFBWindow::color_t)COL_MENUHEAD)
@@ -589,8 +590,6 @@ void CMovieBrowser::initGlobalSettings(void)
}
/***** Browser List **************/
- m_settings.browserFrameHeight = g_settings.screen_EndY - g_settings.screen_StartY - 20 - ((g_settings.screen_EndY - g_settings.screen_StartY - 20)>>1) - (INTER_FRAME_SPACE>>1);
-
m_settings.browserFrameHeight = 250;
m_settings.browserRowNr = 6;
@@ -622,10 +621,10 @@ void CMovieBrowser::initGlobalSettings(void)
void CMovieBrowser::initFrames(void)
{
//TRACE("[mb]->initFrames\r\n");
- m_cBoxFrame.iX = g_settings.screen_StartX + 10;
- m_cBoxFrame.iY = g_settings.screen_StartY + 10;
- m_cBoxFrame.iWidth = g_settings.screen_EndX - g_settings.screen_StartX - 20;
- m_cBoxFrame.iHeight = g_settings.screen_EndY - g_settings.screen_StartY - 20;
+ m_cBoxFrame.iWidth = w_max(720, 20);
+ m_cBoxFrame.iHeight = h_max(720, 20);
+ m_cBoxFrame.iX = getScreenStartX(m_cBoxFrame.iWidth);
+ m_cBoxFrame.iY = getScreenStartY(m_cBoxFrame.iHeight);
m_cBoxFrameTitleRel.iX = 0;
m_cBoxFrameTitleRel.iY = 0;
diff --git a/tuxbox/neutrino/src/gui/pictureviewer.cpp b/tuxbox/neutrino/src/gui/pictureviewer.cpp
index 1ecaa4a..b4c578a 100644
--- a/tuxbox/neutrino/src/gui/pictureviewer.cpp
+++ b/tuxbox/neutrino/src/gui/pictureviewer.cpp
@@ -122,11 +122,7 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & /*actionKey
struct stat sFileInfo;
selected = 0;
width = w_max (710, 30);
- if((g_settings.screen_EndX- g_settings.screen_StartX) < width)
- width=(g_settings.screen_EndX- g_settings.screen_StartX);
- height = 570;
- if((g_settings.screen_EndY- g_settings.screen_StartY) < height)
- height=(g_settings.screen_EndY- g_settings.screen_StartY);
+ height = h_max (570, 0);
sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
buttonHeight = std::min(25, sheight);
diff --git a/tuxbox/neutrino/src/gui/pluginlist.cpp b/tuxbox/neutrino/src/gui/pluginlist.cpp
index 342f005..cc46e71 100644
--- a/tuxbox/neutrino/src/gui/pluginlist.cpp
+++ b/tuxbox/neutrino/src/gui/pluginlist.cpp
@@ -75,22 +75,6 @@ CPluginList::CPluginList(const neutrino_locale_t Name, const uint listtype)
name = Name;
pluginlisttype = listtype;
selected = 0;
- width = w_max (500, 100);
- if(width>(g_settings.screen_EndX-g_settings.screen_StartX))
- width=(g_settings.screen_EndX-g_settings.screen_StartX);
- height = 526;
- if((height+50)>(g_settings.screen_EndY-g_settings.screen_StartY))
- height=(g_settings.screen_EndY-g_settings.screen_StartY) - 50; // 2*25 pixel frei
- theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
- //
- fheight1 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMLARGE]->getHeight();
- fheight2 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMSMALL]->getHeight();
- fheight = fheight1 + fheight2 + 2;
- //
- listmaxshow = (height-theight-0)/fheight;
- height = theight+0+listmaxshow*fheight; // recalc height
- x = getScreenStartX (width);
- y = getScreenStartY (height);
liststart = 0;
}
@@ -302,11 +286,13 @@ void CPluginList::paint()
{
hide();
width = w_max (500, 100);
- if(width>(g_settings.screen_EndX-g_settings.screen_StartX))
- width=(g_settings.screen_EndX-g_settings.screen_StartX);
- height = 526;
- if((height+50)>(g_settings.screen_EndY-g_settings.screen_StartY))
- height=(g_settings.screen_EndY-g_settings.screen_StartY) - 50; // 2*25 pixel frei
+ height = h_max (526, 50);
+ theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
+ //
+ fheight1 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMLARGE]->getHeight();
+ fheight2 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMSMALL]->getHeight();
+ fheight = fheight1 + fheight2 + 2;
+ //
listmaxshow = (height-theight-0)/fheight;
height = theight+0+listmaxshow*fheight; // recalc height
x = getScreenStartX (width);
diff --git a/tuxbox/neutrino/src/gui/scan.cpp b/tuxbox/neutrino/src/gui/scan.cpp
index b1d7bc1..e896052 100644
--- a/tuxbox/neutrino/src/gui/scan.cpp
+++ b/tuxbox/neutrino/src/gui/scan.cpp
@@ -75,9 +75,9 @@ CScanTs::CScanTs()
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
width = w_max (500, 100);
- height = hheight + (9 * mheight); //9 lines
+ height = h_max (hheight + 9 * mheight, 0); //9 lines
x = getScreenStartX (width);
- y = (576 - height) >> 1;
+ y = getScreenStartY (height);
radar = 0;
xpos_radar = x + 420;
ypos_radar = y + hheight + (mheight >> 1);
diff --git a/tuxbox/neutrino/src/gui/streaminfo.cpp b/tuxbox/neutrino/src/gui/streaminfo.cpp
index f5e541d..4e947b0 100644
--- a/tuxbox/neutrino/src/gui/streaminfo.cpp
+++ b/tuxbox/neutrino/src/gui/streaminfo.cpp
@@ -40,7 +40,7 @@ CStreamInfo::CStreamInfo()
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
width = w_max (400, 50);
- height = hheight+14*mheight+ 10;
+ height = h_max (hheight + 14 * mheight + 10, 0);
x = getScreenStartX (width);
y = getScreenStartY (height);
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index 977584b..3fd11c8 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -254,10 +254,6 @@ CTimerList::CTimerList()
frameBuffer = CFrameBuffer::getInstance();
visible = false;
selected = 0;
- width = w_max (600, 50);
-
- x = getScreenStartX (width);
- y = getScreenStartY (height+INFO_HEIGHT);
liststart = 0;
Timer = new CTimerdClient();
skipEventID=0;
@@ -417,6 +413,7 @@ void CTimerList::updateEvents(void)
}
sort(timerlist.begin(), timerlist.end());
+ width = w_max(600, 50);
height = h_max(576, INFO_HEIGHT+50);
listmaxshow = (height-theight-0)/(fheight*2);
height = theight+0+listmaxshow*fheight*2; // recalc height
diff --git a/tuxbox/neutrino/src/gui/upnpbrowser.cpp b/tuxbox/neutrino/src/gui/upnpbrowser.cpp
index d718bea..06d7ff2 100644
--- a/tuxbox/neutrino/src/gui/upnpbrowser.cpp
+++ b/tuxbox/neutrino/src/gui/upnpbrowser.cpp
@@ -46,6 +46,7 @@
#include <driver/encoding.h>
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
+#include <driver/screen_max.h>
#include <driver/audioplay.h>
#include <driver/audiofile.h>
#include <driver/audiometadata.h>
@@ -133,12 +134,8 @@ int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/
// set zapit in standby mode
g_Zapit->setStandby(true);
- m_width = 710;
- if((g_settings.screen_EndX - g_settings.screen_StartX) < m_width+ConnectLineBox_Width)
- m_width=(g_settings.screen_EndX - g_settings.screen_StartX) - ConnectLineBox_Width;
- m_height = 570;
- if((g_settings.screen_EndY - g_settings.screen_StartY) < m_height)
- m_height = (g_settings.screen_EndY - g_settings.screen_StartY);
+ m_width = w_max(710, ConnectLineBox_Width);
+ m_height = h_max(570, 0);
m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
m_buttonHeight = std::min(25, m_sheight);
m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
@@ -149,9 +146,8 @@ int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/
m_listmaxshow = (m_height - m_info_height - m_title_height - m_theight - 2*m_buttonHeight) / (m_fheight);
m_height = m_theight + m_info_height + m_title_height + 2*m_buttonHeight + m_listmaxshow * m_fheight; // recalc height
- m_x = (((g_settings.screen_EndX - g_settings.screen_StartX) - (m_width + ConnectLineBox_Width)) / 2)
- + g_settings.screen_StartX + ConnectLineBox_Width;
- m_y = (((g_settings.screen_EndY- g_settings.screen_StartY) - m_height)/ 2) + g_settings.screen_StartY;
+ m_x = getScreenStartX(m_width + ConnectLineBox_Width) + ConnectLineBox_Width;
+ m_y = getScreenStartY(m_height);
// Stop sectionsd
g_Sectionsd->setPauseScanning(true);
diff --git a/tuxbox/neutrino/src/gui/widget/colorchooser.cpp b/tuxbox/neutrino/src/gui/widget/colorchooser.cpp
index 9275ebe..ed57401 100644
--- a/tuxbox/neutrino/src/gui/widget/colorchooser.cpp
+++ b/tuxbox/neutrino/src/gui/widget/colorchooser.cpp
@@ -40,6 +40,7 @@
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
+#include <driver/screen_max.h>
#include <gui/color.h>
#include <gui/widget/messagebox.h>
@@ -71,10 +72,10 @@ CColorChooser::CColorChooser(const neutrino_locale_t Name, unsigned char *R, uns
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
observer = Observer;
name = Name;
- width = 360;
- height = hheight + mheight * 4 + 4;
- x=((720-width) >> 1) -20;
- y=(576-height)>>1;
+ width = w_max(360, 0);
+ height = h_max(hheight + mheight * 4 + 4, 0);
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
value[VALUE_R] = R;
value[VALUE_G] = G;
diff --git a/tuxbox/neutrino/src/gui/widget/hintbox.cpp b/tuxbox/neutrino/src/gui/widget/hintbox.cpp
index 810de05..9cda7f4 100644
--- a/tuxbox/neutrino/src/gui/widget/hintbox.cpp
+++ b/tuxbox/neutrino/src/gui/widget/hintbox.cpp
@@ -40,7 +40,7 @@
#include <neutrino.h>
#include <driver/screen_max.h>
-#define HINTBOX_MAX_HEIGHT 420
+#define HINTBOX_MAX_HEIGHT (h_max(420, 0))
CHintBox::CHintBox(const neutrino_locale_t Caption, const char * const Text, const int Width, const char * const Icon)
@@ -135,8 +135,8 @@ void CHintBox::paint(void)
return;
}
- window = new CFBWindow((((g_settings.screen_EndX- g_settings.screen_StartX) - width ) >> 1) + g_settings.screen_StartX,
- (((g_settings.screen_EndY- g_settings.screen_StartY) - height) >> 2) + g_settings.screen_StartY,
+ window = new CFBWindow(getScreenStartX(width),
+ ((g_settings.screen_EndY - g_settings.screen_StartY - height) >> 2) + g_settings.screen_StartY,
width + SHADOW_OFFSET,
height + SHADOW_OFFSET);
refresh();
diff --git a/tuxbox/neutrino/src/gui/widget/hintboxext.cpp b/tuxbox/neutrino/src/gui/widget/hintboxext.cpp
index 6502a51..023b108 100644
--- a/tuxbox/neutrino/src/gui/widget/hintboxext.cpp
+++ b/tuxbox/neutrino/src/gui/widget/hintboxext.cpp
@@ -191,6 +191,8 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c
if (nw > m_width)
m_width = nw;
+ m_width = w_max(m_width, SHADOW_OFFSET);
+
m_window = NULL;
}
@@ -207,8 +209,8 @@ void CHintBoxExt::paint(void)
return;
}
- m_window = new CFBWindow((((g_settings.screen_EndX- g_settings.screen_StartX) - m_width ) >> 1) + g_settings.screen_StartX,
- (((g_settings.screen_EndY- g_settings.screen_StartY) - m_height) >> 2) + g_settings.screen_StartY,
+ m_window = new CFBWindow(getScreenStartX(m_width),
+ ((g_settings.screen_EndY - g_settings.screen_StartY - m_height) >> 2) + g_settings.screen_StartY,
m_width + SHADOW_OFFSET,
m_height + SHADOW_OFFSET);
refresh();
diff --git a/tuxbox/neutrino/src/gui/widget/keychooser.cpp b/tuxbox/neutrino/src/gui/widget/keychooser.cpp
index 7965af6..f45b291 100644
--- a/tuxbox/neutrino/src/gui/widget/keychooser.cpp
+++ b/tuxbox/neutrino/src/gui/widget/keychooser.cpp
@@ -38,6 +38,8 @@
#include <global.h>
#include <neutrino.h>
+#include <driver/screen_max.h>
+
#include <gui/color.h>
@@ -154,10 +156,10 @@ void CKeyChooserItem::paint()
int hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
int mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
- width = 350;
- height = hheight + 2 * mheight;
- x = ((720-width) >> 1) -20;
- y = (576-height) >> 1;
+ width = w_max(350, 0);
+ height = h_max(hheight + 2 * mheight, 0);
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
CFrameBuffer * frameBuffer = CFrameBuffer::getInstance();
diff --git a/tuxbox/neutrino/src/gui/widget/lcdcontroler.cpp b/tuxbox/neutrino/src/gui/widget/lcdcontroler.cpp
index 0de8ad5..b0ccb48 100644
--- a/tuxbox/neutrino/src/gui/widget/lcdcontroler.cpp
+++ b/tuxbox/neutrino/src/gui/widget/lcdcontroler.cpp
@@ -37,6 +37,7 @@
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
+#include <driver/screen_max.h>
#include <gui/color.h>
#include <gui/widget/messagebox.h>
@@ -57,10 +58,10 @@ CLcdControler::CLcdControler(const neutrino_locale_t Name, CChangeObserver* Obse
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
observer = Observer;
name = Name;
- width = 390;
- height = hheight+ mheight* 4+ +mheight/2;
- x=((720-width) >> 1) -20;
- y=(576-height)>>1;
+ width = w_max(390, 0);
+ height = h_max(hheight + mheight * 4 + mheight / 2, 0);
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
contrast = CLCD::getInstance()->getContrast();
brightness = CLCD::getInstance()->getBrightness();
diff --git a/tuxbox/neutrino/src/gui/widget/listbox.cpp b/tuxbox/neutrino/src/gui/widget/listbox.cpp
index e022c0e..8111d98 100644
--- a/tuxbox/neutrino/src/gui/widget/listbox.cpp
+++ b/tuxbox/neutrino/src/gui/widget/listbox.cpp
@@ -40,7 +40,7 @@ CListBox::CListBox(const char * const Caption)
liststart = 0;
selected = 0;
width = w_max (400, 100);
- height = 420;
+ height = h_max (420, 0);
ButtonHeight = 25;
modified = false;
theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
diff --git a/tuxbox/neutrino/src/gui/widget/listframe.cpp b/tuxbox/neutrino/src/gui/widget/listframe.cpp
index 2e345cc..d786f82 100644
--- a/tuxbox/neutrino/src/gui/widget/listframe.cpp
+++ b/tuxbox/neutrino/src/gui/widget/listframe.cpp
@@ -50,6 +50,7 @@
#include "stdlib.h"
#include "listframe.h"
+#include <driver/screen_max.h>
#include <gui/widget/icons.h>
#define TEXT_BORDER_WIDTH 8
@@ -57,11 +58,11 @@
#define SCROLL_FRAME_WIDTH 10
#define SCROLL_MARKER_BORDER 2
-#define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX - 40)
-#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40)
+#define MAX_WINDOW_WIDTH (w_max(720, 40))
+#define MAX_WINDOW_HEIGHT (h_max(576, 40))
-#define MIN_WINDOW_WIDTH ((g_settings.screen_EndX - g_settings.screen_StartX)>>1)
-#define MIN_WINDOW_HEIGHT 40
+#define MIN_WINDOW_WIDTH (w_max(720, 0) >> 1)
+#define MIN_WINDOW_HEIGHT 40
#define TITLE_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUHEAD_PLUS_0)
#define HEADER_LIST_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUCONTENT_PLUS_0)
@@ -248,10 +249,10 @@ void CListFrame::initVar(void)
m_nCurrentPage = 0;
m_nSelectedLine = 0;
- m_cFrame.iX = g_settings.screen_StartX + ((g_settings.screen_EndX - g_settings.screen_StartX - MIN_WINDOW_WIDTH) >>1);
m_cFrame.iWidth = MIN_WINDOW_WIDTH;
- m_cFrame.iY = g_settings.screen_StartY + ((g_settings.screen_EndY - g_settings.screen_StartY - MIN_WINDOW_HEIGHT) >>1);
m_cFrame.iHeight = MIN_WINDOW_HEIGHT;
+ m_cFrame.iX = getScreenStartX(m_cFrame.iWidth);
+ m_cFrame.iY = getScreenStartY(m_cFrame.iHeight);
m_nMaxHeight = MAX_WINDOW_HEIGHT;
m_nMaxWidth = MAX_WINDOW_WIDTH;
diff --git a/tuxbox/neutrino/src/gui/widget/msgbox.cpp b/tuxbox/neutrino/src/gui/widget/msgbox.cpp
index 5da5679..2c97da5 100644
--- a/tuxbox/neutrino/src/gui/widget/msgbox.cpp
+++ b/tuxbox/neutrino/src/gui/widget/msgbox.cpp
@@ -55,6 +55,7 @@
#include "msgbox.h"
+#include <driver/screen_max.h>
#include <gui/widget/icons.h>
#include <neutrino.h>
@@ -62,11 +63,11 @@
#define ADD_FOOT_HEIGHT 14
#define TEXT_BORDER_WIDTH 8
-#define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX )
-#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40)
+#define MAX_WINDOW_WIDTH (w_max(720, 0))
+#define MAX_WINDOW_HEIGHT (h_max(576, 40))
-#define MIN_WINDOW_WIDTH (MAX_WINDOW_WIDTH>>1)
-#define MIN_WINDOW_HEIGHT 40
+#define MIN_WINDOW_WIDTH (MAX_WINDOW_WIDTH >> 1)
+#define MIN_WINDOW_HEIGHT 40
#define DEFAULT_TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]
#define DEFAULT_FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]
@@ -140,8 +141,8 @@ CMsgBox::CMsgBox(const char *text,
if(_mode & CENTER)
{
- m_cBoxFrame.iX = g_settings.screen_StartX + ((g_settings.screen_EndX - g_settings.screen_StartX - m_cBoxFrame.iWidth) >>1);
- m_cBoxFrame.iY = g_settings.screen_StartY + ((g_settings.screen_EndY - g_settings.screen_StartY - m_cBoxFrame.iHeight) >>2);
+ m_cBoxFrame.iX = getScreenStartX(m_cBoxFrame.iWidth);
+ m_cBoxFrame.iY = g_settings.screen_StartY + ((g_settings.screen_EndY - g_settings.screen_StartY - m_cBoxFrame.iHeight) >> 2);
}
m_nResult = default_result;
@@ -236,10 +237,10 @@ void CMsgBox::initVar(void)
m_nWindowFrameBorderWidth = 0;
// set the main frame to default
- m_cBoxFrame.iX = g_settings.screen_StartX + ((g_settings.screen_EndX - g_settings.screen_StartX - MIN_WINDOW_WIDTH) >>1);
m_cBoxFrame.iWidth = MIN_WINDOW_WIDTH;
- m_cBoxFrame.iY = g_settings.screen_StartY + ((g_settings.screen_EndY - g_settings.screen_StartY - MIN_WINDOW_HEIGHT) >>2);
m_cBoxFrame.iHeight = MIN_WINDOW_HEIGHT;
+ m_cBoxFrame.iX = getScreenStartX(m_cBoxFrame.iWidth);
+ m_cBoxFrame.iY = g_settings.screen_StartY + ((g_settings.screen_EndY - g_settings.screen_StartY - m_cBoxFrame.iHeight) >> 2);
m_pcWindow = NULL;
@@ -772,8 +773,8 @@ bool CMsgBox::setText(const std::string* newText)
// since the frames size has changed, we have to recenter the window again */
if(m_nMode & CENTER)
{
- m_cBoxFrame.iX = g_settings.screen_StartX + ((g_settings.screen_EndX - g_settings.screen_StartX - m_cBoxFrame.iWidth) >>1);
- m_cBoxFrame.iY = g_settings.screen_StartY + ((g_settings.screen_EndY - g_settings.screen_StartY - m_cBoxFrame.iHeight) >>1);
+ m_cBoxFrame.iX = getScreenStartX(m_cBoxFrame.iWidth);
+ m_cBoxFrame.iY = g_settings.screen_StartY + ((g_settings.screen_EndY - g_settings.screen_StartY - m_cBoxFrame.iHeight) >> 2);
}
}
}
@@ -852,11 +853,13 @@ int ShowMsg2UTF( const char * const Title,
//CMsgBox::CENTER |
//CMsgBox::AUTO_WIDTH |
//CMsgBox::AUTO_HIGH;
- CBox position ( g_settings.screen_StartX+30,
- g_settings.screen_StartY+30,
- g_settings.screen_EndX - g_settings.screen_StartX-60,
- g_settings.screen_EndY - g_settings.screen_StartY-60);
-
+
+ int width = w_max(720, 60);
+ int height = h_max(576, 60);
+ int x = getScreenStartX(width);
+ int y = getScreenStartY(height);
+ CBox position(x, y, width, height);
+
int oldfontsize = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize();
bool bigfonts = false;
int ret, res;
diff --git a/tuxbox/neutrino/src/gui/widget/progresswindow.cpp b/tuxbox/neutrino/src/gui/widget/progresswindow.cpp
index e0a27b8..a00c60e 100644
--- a/tuxbox/neutrino/src/gui/widget/progresswindow.cpp
+++ b/tuxbox/neutrino/src/gui/widget/progresswindow.cpp
@@ -34,6 +34,7 @@
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
+#include <driver/screen_max.h>
#include <gui/color.h>
@@ -43,14 +44,14 @@ CProgressWindow::CProgressWindow()
frameBuffer = CFrameBuffer::getInstance();
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
- width = 500;
- height = hheight+5*mheight+20;
+ width = w_max(500, 0);
+ height = h_max(hheight + 5 * mheight + 20, 0);
global_progress = local_progress = 101;
statusText = "";
- x= ( ( ( g_settings.screen_EndX- g_settings.screen_StartX ) - width ) >> 1 ) + g_settings.screen_StartX;
- y=(576-height)>>1;
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
progressbar_x = x + 10;
progressbar_h = 16;
diff --git a/tuxbox/neutrino/src/gui/widget/rgbcsynccontroler.cpp b/tuxbox/neutrino/src/gui/widget/rgbcsynccontroler.cpp
index 9d57c72..54aa9b2 100644
--- a/tuxbox/neutrino/src/gui/widget/rgbcsynccontroler.cpp
+++ b/tuxbox/neutrino/src/gui/widget/rgbcsynccontroler.cpp
@@ -37,6 +37,7 @@
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
+#include <driver/screen_max.h>
#include <gui/color.h>
#include <gui/widget/messagebox.h>
@@ -57,10 +58,10 @@ CRGBCSyncControler::CRGBCSyncControler(const neutrino_locale_t Name, unsigned ch
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight() + 6;
observer = Observer;
name = Name;
- width = 390;
- height = hheight+ mheight* 1+ +mheight/2;
- x=((720-width) >> 1) -20;
- y=(576-height)>>1;
+ width = w_max(390, 0);
+ height = h_max(hheight + mheight * 1 + mheight / 2, 0);
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
csync=Csync;
}
diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp
index 90a7402..1adff4b 100644
--- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp
+++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp
@@ -37,6 +37,7 @@
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
+#include <driver/screen_max.h>
#include <gui/color.h>
@@ -124,8 +125,8 @@ void CStringInput::init()
height += iheight;
}
- x = ((720-width)>>1);
- y = ((500-height)>>1);
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
}
void CStringInput::NormalKeyPressed(const neutrino_msg_t key)
diff --git a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
index 8394197..3d94ccb 100644
--- a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
+++ b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
@@ -37,6 +37,7 @@
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
+#include <driver/screen_max.h>
#include <gui/color.h>
@@ -70,8 +71,8 @@ CExtendedInput::CExtendedInput(const neutrino_locale_t Name, char* Value, const
// if (hint_2 != NULL)
height += iheight;
- x = ((720-width)>>1);
- y = ((500-height)>>1);
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
}
CExtendedInput::~CExtendedInput()
@@ -115,8 +116,8 @@ void CExtendedInput::calculateDialog()
// if (hint_2 != NULL)
height += iheight;
- x = ((720-width)>>1);
- y = ((500-height)>>1);
+ x = getScreenStartX(width);
+ y = getScreenStartY(height);
}
diff --git a/tuxbox/neutrino/src/gui/widget/textbox.cpp b/tuxbox/neutrino/src/gui/widget/textbox.cpp
index b28fa90..663f2c2 100644
--- a/tuxbox/neutrino/src/gui/widget/textbox.cpp
+++ b/tuxbox/neutrino/src/gui/widget/textbox.cpp
@@ -55,17 +55,18 @@
#endif
#include "textbox.h"
+#include <driver/screen_max.h>
#include <gui/widget/icons.h>
#define TEXT_BORDER_WIDTH 8
#define SCROLL_FRAME_WIDTH 15
#define SCROLL_MARKER_BORDER 2
-#define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX - 40)
-#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40)
+#define MAX_WINDOW_WIDTH (w_max(720, 40))
+#define MAX_WINDOW_HEIGHT (h_max(576, 40))
-#define MIN_WINDOW_WIDTH ((g_settings.screen_EndX - g_settings.screen_StartX)>>1)
-#define MIN_WINDOW_HEIGHT 40
+#define MIN_WINDOW_WIDTH (w_max(720, 0) >> 1)
+#define MIN_WINDOW_HEIGHT 40
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
@@ -218,10 +219,10 @@ void CTextBox::initVar(void)
m_nCurrentLine = 0;
m_nCurrentPage = 0;
- m_cFrame.iX = g_settings.screen_StartX + ((g_settings.screen_EndX - g_settings.screen_StartX - MIN_WINDOW_WIDTH) >>1);
m_cFrame.iWidth = MIN_WINDOW_WIDTH;
- m_cFrame.iY = g_settings.screen_StartY + ((g_settings.screen_EndY - g_settings.screen_StartY - MIN_WINDOW_HEIGHT) >>1);
m_cFrame.iHeight = MIN_WINDOW_HEIGHT;
+ m_cFrame.iX = getScreenStartX(m_cFrame.iWidth);
+ m_cFrame.iY = getScreenStartY(m_cFrame.iHeight);
m_nMaxHeight = MAX_WINDOW_HEIGHT;
m_nMaxWidth = MAX_WINDOW_WIDTH;
commit aaaa235ac2f7113e047f89631bf84c34e7f57d80
Author: Christian Schuett <Gau...@ho...>
Date: Tue Apr 2 20:34:55 2013 +0200
Neutrino locale: remove newline from the end of lines
this avoids paragraph sign in movieplayer help
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale
index e09d288..41ad21c 100644
--- a/tuxbox/neutrino/data/locale/deutsch.locale
+++ b/tuxbox/neutrino/data/locale/deutsch.locale
@@ -952,7 +952,7 @@ movieplayer.toomanybookmarks Sie haben bereits zu viele Bookmarks angelegt.\nEs
movieplayer.tshelp1 Stop
movieplayer.tshelp10 ca. 10 Minuten zurück
movieplayer.tshelp11 ca. 10 Minuten vor
-movieplayer.tshelp12 Hilfe: http://www.giggo.de/dbox2/movieplayer.html\n
+movieplayer.tshelp12 Hilfe: http://www.giggo.de/dbox2/movieplayer.html
movieplayer.tshelp13 Springe zu ...
movieplayer.tshelp14 Springe zum Filmanfang
movieplayer.tshelp15 Springe zum Filmende
@@ -977,7 +977,7 @@ movieplayer.vcdplayback (S)VCD
movieplayer.vlchelp1 Stop
movieplayer.vlchelp10 ca. 10 Minuten zurück
movieplayer.vlchelp11 ca. 10 Minuten vor
-movieplayer.vlchelp12 Hilfe: http://www.giggo.de/dbox2/movieplayer.html\n
+movieplayer.vlchelp12 Hilfe: http://www.giggo.de/dbox2/movieplayer.html
movieplayer.vlchelp13 Springe zu ...
movieplayer.vlchelp14 Technische Informationen
movieplayer.vlchelp15 Nächste Datei in Playlist
diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale
index 7f92551..3627fa3 100644
--- a/tuxbox/neutrino/data/locale/english.locale
+++ b/tuxbox/neutrino/data/locale/english.locale
@@ -952,7 +952,7 @@ movieplayer.toomanybookmarks There are too many bookmarks.\nYou need to delete o
movieplayer.tshelp1 Stop
movieplayer.tshelp10 approx. 10 minutes back
movieplayer.tshelp11 skip approx. 10 minutes
-movieplayer.tshelp12 Help: http://www.giggo.de/dbox2/movieplayer.html\n
+movieplayer.tshelp12 Help: http://www.giggo.de/dbox2/movieplayer.html
movieplayer.tshelp13 skip to ...
movieplayer.tshelp14 skip to beginning
movieplayer.tshelp15 skip to end
@@ -977,7 +977,7 @@ movieplayer.vcdplayback (S)VCD
movieplayer.vlchelp1 Stop
movieplayer.vlchelp10 approx. 10 minutes back
movieplayer.vlchelp11 skip approx. 10 minutes
-movieplayer.vlchelp12 Help: http://www.giggo.de/dbox2/movieplayer.html\n
+movieplayer.vlchelp12 Help: http://www.giggo.de/dbox2/movieplayer.html
movieplayer.vlchelp13 skip to ...
movieplayer.vlchelp14 Technical information
movieplayer.vlchelp15 Next item in playlist
commit d55b2c57052a0e560da9fd352611589b5c54e9cc
Author: Stefan Seyfried <se...@tu...>
Date: Mon Apr 1 22:43:40 2013 +0200
libconfigfile: update config file atomically when saving
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/misc/libs/libconfigfile/configfile.cpp b/misc/libs/libconfigfile/configfile.cpp
index c8bdb47..d3a6640 100644
--- a/misc/libs/libconfigfile/configfile.cpp
+++ b/misc/libs/libconfigfile/configfile.cpp
@@ -29,6 +29,8 @@
#include <sstream>
#include <string>
#include <cstdlib> // atoi...
+#include <cerrno>
+#include <cstring>
#include <sys/stat.h>
@@ -90,7 +92,9 @@ bool CConfigFile::loadConfig(const std::string & filename)
bool CConfigFile::saveConfig(const char * const filename)
{
- std::fstream configFile(filename);
+ std::string tmpname = std::string(filename) + ".tmp";
+ unlink(tmpname.c_str());
+ std::fstream configFile(tmpname.c_str(), std::ios::out);
if (configFile != NULL)
{
@@ -99,17 +103,21 @@ bool CConfigFile::saveConfig(const char * const filename)
{
configFile << it->first << "=" << it->second << std::endl;
}
+
configFile.sync();
configFile.close();
- chmod(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ chmod(tmpname.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ /* TODO: check available space? */
+ rename(tmpname.c_str(), filename);
modifiedFlag = false;
return true;
}
else
{
- std::cerr << "[ConfigFile] Unable to open file " << filename << " for writing." << std::endl;
+ std::cerr << "[ConfigFile] Unable to open file " << tmpname << " for writing: "
+ << strerror(errno) << std::endl;
return false;
}
}
@@ -399,7 +407,7 @@ void CConfigFile::setInt32Vector(const std::string & key, const std::vector<int3
if (it == vec.end())
break;
s << (*it);
- it++;
+ ++it;
if (it == vec.end())
break;
s << delimiter;
@@ -424,7 +432,7 @@ void CConfigFile::setStringVector(const std::string & key, const std::vector<std
if (it == vec.end())
break;
newVal += *it;
- it++;
+ ++it;
if (it == vec.end())
break;
newVal += delimiter;
commit c04ce058e4b64fdfe2c74072be861a579324ded0
Author: Stefan Seyfried <se...@tu...>
Date: Mon Apr 1 21:13:30 2013 +0200
configfile: do a partial sync() after saving
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/misc/libs/libconfigfile/configfile.cpp b/misc/libs/libconfigfile/configfile.cpp
index 9f96ac0..c8bdb47 100644
--- a/misc/libs/libconfigfile/configfile.cpp
+++ b/misc/libs/libconfigfile/configfile.cpp
@@ -90,15 +90,16 @@ bool CConfigFile::loadConfig(const std::string & filename)
bool CConfigFile::saveConfig(const char * const filename)
{
- std::ofstream configFile(filename);
+ std::fstream configFile(filename);
if (configFile != NULL)
{
- for (ConfigDataMap::const_iterator it = configData.begin(); it != configData.end(); it++)
+ std::cout << "[ConfigFile] saving " << filename << std::endl;
+ for (ConfigDataMap::const_iterator it = configData.begin(); it != configData.end(); ++it)
{
configFile << it->first << "=" << it->second << std::endl;
}
-
+ configFile.sync();
configFile.close();
chmod(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
commit 32a52d7fe15b3d09cdfe2e33783fd8b374f324f1
Author: Christian Schuett <Gau...@ho...>
Date: Sun Mar 31 21:55:24 2013 +0200
Neutrino timer list: use h_max() for height calculation
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index e28cfd8..977584b 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -417,7 +417,7 @@ void CTimerList::updateEvents(void)
}
sort(timerlist.begin(), timerlist.end());
- height = (g_settings.screen_EndY-g_settings.screen_StartY)-(INFO_HEIGHT+50);
+ height = h_max(576, INFO_HEIGHT+50);
listmaxshow = (height-theight-0)/(fheight*2);
height = theight+0+listmaxshow*fheight*2; // recalc height
if(timerlist.size() < listmaxshow)
commit 782fbb88514b258334cfd99676d6bb5dca8450d9
Author: Christian Schuett <Gau...@ho...>
Date: Sun Mar 31 21:27:13 2013 +0200
Neutrino bookmark manager: remove duplicate code and use h_max()
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
index 084a7df..099dc37 100644
--- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
+++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
@@ -237,12 +237,9 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent)
frameBuffer->getIconSize(NEUTRINO_ICON_BOOKMARKMANAGER, &iconw, &iconh);
theight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight());
fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
- x = getScreenStartX (width);
- y = getScreenStartY (height + info_height);
- listmaxshow = (height-theight-0)/(fheight*2);
liststart = 0;
- height = (g_settings.screen_EndY-g_settings.screen_StartY)-(info_height+50);
+ height = h_max(576, info_height+50);
listmaxshow = (height-theight-0)/(fheight*2);
height = theight+0+listmaxshow*fheight*2; // recalc height
if(bookmarks.size() < listmaxshow)
commit d48495ced0fb71c06c5e1f93a1eeee23aeee325f
Author: Christian Schuett <Gau...@ho...>
Date: Sun Mar 31 17:06:56 2013 +0200
Neutrino: fix width and height calculation in image and stream info
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/imageinfo.cpp b/tuxbox/neutrino/src/gui/imageinfo.cpp
index b08ac3f..177a9f9 100644
--- a/tuxbox/neutrino/src/gui/imageinfo.cpp
+++ b/tuxbox/neutrino/src/gui/imageinfo.cpp
@@ -77,15 +77,15 @@ CImageInfo::CImageInfo()
iheight = g_Font[font_info]->getHeight();
sheight = g_Font[font_small]->getHeight();
ssheight = g_Font[font_small_text]->getHeight();
+
+ width = w_max(720, 10);
+ height = h_max(572, 10);
- startX = 45; //mainwindow position
- startY = 35;
- endX = 720-startX;
- endY = 572-startY;
-
- width = endX-startX;
- height = endY-startY;
-
+ startX = getScreenStartX(width); //mainwindow position
+ startY = getScreenStartY(height);
+ endX = startX + width;
+ endY = startY + height;
+
#if defined BOXMODEL_DM500 || defined HAVE_IPBOX_HARDWARE
pigw = 180;
pigh = 144;
diff --git a/tuxbox/neutrino/src/gui/streaminfo2.cpp b/tuxbox/neutrino/src/gui/streaminfo2.cpp
index ef9bb75..fa6c992 100644
--- a/tuxbox/neutrino/src/gui/streaminfo2.cpp
+++ b/tuxbox/neutrino/src/gui/streaminfo2.cpp
@@ -56,7 +56,6 @@ CStreamInfo2::CStreamInfo2()
pig = new CPIG (0);
frameBuffer = CFrameBuffer::getInstance();
-
font_head = SNeutrinoSettings::FONT_TYPE_MENU_TITLE;
font_info = SNeutrinoSettings::FONT_TYPE_MENU;
font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
@@ -65,13 +64,13 @@ CStreamInfo2::CStreamInfo2()
iheight = g_Font[font_info]->getHeight();
sheight = g_Font[font_small]->getHeight();
- x = 60; //mainwindow position
- y = 45;
- endX = 720-x;
- endY = 572-y;
-
- width = endX-x-10;
- height = endY-y;
+ width = w_max(SCREEN_X, 10);
+ height = h_max(SCREEN_Y, 10);
+
+ x = getScreenStartX(width); //mainwindow position
+ y = getScreenStartY(height);
+ endX = x + width;
+ endY = y + height;
max_height = SCREEN_Y-1;
max_width = SCREEN_X-1;
commit e83d957e4555d8cf47359aeb1bc31ebb7feb9fae
Author: Christian Schuett <Gau...@ho...>
Date: Sun Mar 31 16:40:16 2013 +0200
Neutrino channel list: fix height calculation
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index 0af4288..3f2013e 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -145,8 +145,6 @@ void CChannelList::calcSize()
else
width = full_width;
- height = h_max(576 / 20 * 16, 0);
-
/* assuming all color icons must have same size */
int icol_w, icol_h;
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icol_w, &icol_h);
@@ -161,9 +159,11 @@ void CChannelList::calcSize()
if (fheight == 0)
fheight = 1; /* avoid crash on invalid font */
+ info_height = 2*fheight + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight() + 10;
+ height = h_max(576, info_height);
+
listmaxshow = (height - theight - footerHeight -0)/fheight;
height = theight + footerHeight + listmaxshow * fheight;
- info_height = 2*fheight + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight() + 10;
x = getScreenStartX(full_width);
y = getScreenStartY(height + info_height);
commit 6d05b78afb254a54659d8b26f401e372150247e2
Author: Christian Schuett <Gau...@ho...>
Date: Sun Mar 31 16:01:18 2013 +0200
Neutrino channel list: repaint head after scrolling
to update sat name and time
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index cc71257..0af4288 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -495,6 +495,7 @@ int CChannelList::show()
msg == (g_settings.key_channelList_pageup | CRCInput::RC_Release) ||
msg == (g_settings.key_channelList_pagedown | CRCInput::RC_Release) )
{
+ paintHead();
paintButtonBar();
paintDetails(selected);
}
commit cbb38ce3f9968ed9035725743277e05787ecc646
Author: Christian Schuett <Gau...@ho...>
Date: Sat Mar 30 20:21:08 2013 +0100
Neutrino: only paint PIG in TV mode
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/imageinfo.cpp b/tuxbox/neutrino/src/gui/imageinfo.cpp
index be603d2..b08ac3f 100644
--- a/tuxbox/neutrino/src/gui/imageinfo.cpp
+++ b/tuxbox/neutrino/src/gui/imageinfo.cpp
@@ -65,6 +65,7 @@ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
CImageInfo::CImageInfo()
{
+ pig = new CPIG (0);
frameBuffer = CFrameBuffer::getInstance();
font_head = SNeutrinoSettings::FONT_TYPE_MENU_TITLE;
@@ -90,7 +91,7 @@ CImageInfo::CImageInfo()
pigh = 144;
#else
pigw = 215;
- pigh = 170;
+ pigh = 190;
#endif
x = endX - pigw -16;
@@ -120,8 +121,11 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
paint();
- pig = new CPIG (0);
- paint_pig( x, y, pigw, pigh);
+ // paint PIG
+ if (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv)
+ {
+ paint_pig(x, y, pigw, pigh);
+ }
neutrino_msg_t msg;
@@ -170,7 +174,6 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
}
hide();
- delete pig;
return menu_return::RETURN_REPAINT;
}
@@ -193,6 +196,7 @@ void CImageInfo::paint_pig(int xPig, int yPig, int w, int h)
#else
frameBuffer->paintBoxRel(xPig, yPig, w, h, COL_MENUCONTENT_PLUS_0);
#endif
+ pig->set_coord(0, 0, 0, 0);
pig->show (xPig, yPig, w, h);
}
diff --git a/tuxbox/neutrino/src/gui/streaminfo2.cpp b/tuxbox/neutrino/src/gui/streaminfo2.cpp
index ab1dffe..ef9bb75 100644
--- a/tuxbox/neutrino/src/gui/streaminfo2.cpp
+++ b/tuxbox/neutrino/src/gui/streaminfo2.cpp
@@ -296,6 +296,7 @@ void CStreamInfo2::paint_pig(int _x, int _y, int w, int h)
#else
frameBuffer->paintBoxRel(_x, _y, w, h, COL_BLACK); //black
#endif
+ pig->set_coord(0, 0, 0, 0);
pig->show(_x, _y, w, h);
}
@@ -464,12 +465,15 @@ void CStreamInfo2::paint(int/*mode*/)
ypos = y+hheight+8;
// paint PIG
+ if (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv)
+ {
#if defined BOXMODEL_DM500 || defined HAVE_IPBOX_HARDWARE
- // the dm500 seems to like only half / quarter resolution...
- paint_pig(pigboxes_x + 60, ypos, 180, 144);
+ // the dm500 seems to like only half / quarter resolution...
+ paint_pig(pigboxes_x + 60, ypos, 180, 144);
#else
- paint_pig( pigboxes_x, ypos , 240, 190);
+ paint_pig(pigboxes_x, ypos, 240, 190);
#endif
+ }
// Info Output
paint_techinfo ( xpos, ypos );
commit 38adb0c12c2a4d21c2fe29b84cf132c3a89c2961
Author: GetAway <get...@t-...>
Date: Sat Mar 30 19:35:35 2013 +0100
Neutrino: improved channellist, speedup scrolling!
there is no need to update events while scrolling
now update responds at key release
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index 1608a05..cc71257 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -319,7 +319,6 @@ void CChannelList::updateSelection(unsigned int newpos)
paintItem(prev_selected - liststart);
paintItem(selected - liststart);
}
- paintDetails(selected);
}
}
@@ -342,10 +341,11 @@ int CChannelList::show()
calcSize();
paintHead();
-// paintButtonBar(); // remove to re-paint buttons
+ paintButtonBar();
// updateEvents();
paintItemDetailsBox();
paint();
+ paintDetails(selected);
int oldselected = selected;
int zapOnExit = false;
@@ -436,9 +436,10 @@ int CChannelList::show()
{
displayList = 1;
paintHead();
- //paintButtonBar(); // remove to re-paint buttons
+ paintButtonBar();
paintItemDetailsBox();
paint();
+ paintDetails(selected);
}
}
else if ( ( msg == CRCInput::RC_yellow ) &&
@@ -449,10 +450,9 @@ int CChannelList::show()
}
else if ( msg == CRCInput::RC_blue )
{
- paintHead(); // update button bar when lines marked to "remove to re-paint buttons" are removed
+ paintHead();
if (g_settings.channellist_additional) {
displayList = !displayList;
- paintButtonBar();
if (!displayList)
showdescription(selected);
else
@@ -461,7 +461,9 @@ int CChannelList::show()
else {
displayNext = !displayNext;
paint();
+ paintDetails(selected);
}
+ paintButtonBar();
}
else if ( msg == CRCInput::RC_help )
{
@@ -483,9 +485,18 @@ int CChannelList::show()
displayList = 1;
paintHead();
- //paintButtonBar(); // remove to re-paint buttons
+ paintButtonBar();
paintItemDetailsBox();
paint();
+ paintDetails(selected);
+ }
+ else if (msg == (CRCInput::RC_up | CRCInput::RC_Release) ||
+ msg == (CRCInput::RC_down | CRCInput::RC_Release) ||
+ msg == (g_settings.key_channelList_pageup | CRCInput::RC_Release) ||
+ msg == (g_settings.key_channelList_pagedown | CRCInput::RC_Release) )
+ {
+ paintButtonBar();
+ paintDetails(selected);
}
else
{
@@ -1259,7 +1270,6 @@ void CChannelList::paintItem(int pos)
int c_rad_small;
uint8_t color;
fb_pixel_t bgcolor;
- bool paintbuttons = false;
unsigned int curr = liststart + pos;
if (curr == selected)
@@ -1268,7 +1278,6 @@ void CChannelList::paintItem(int pos)
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
paintItem2DetailsLine(pos);
c_rad_small = RADIUS_SMALL;
- paintbuttons = true;
}
else
{
@@ -1303,10 +1312,6 @@ void CChannelList::paintItem(int pos)
p_event = &chan->currentEvent;
}
- //paint buttons
- if (paintbuttons)
- paintButtonBar();
-
//number
int numpos = x+5+numwidth- g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(tmp);
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(numpos,ypos+fheight, numwidth+5, tmp, color, fheight);
@@ -1404,9 +1409,8 @@ void CChannelList::paintItem(int pos)
// name
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x + 5 + numwidth + 10 + prg_offset, ypos + fheight, width - numwidth - 20 - 12 - prg_offset, nameAndDescription, color);
- if (curr == selected) // at last LCD and Infobox
+ if (curr == selected) // at last LCD
{
- //paintDetails(curr);
CLCD::getInstance()->showMenuText(0, chan->name.c_str(), -1, true); // UTF-8
CLCD::getInstance()->showMenuText(1, p_event->description.c_str());
}
@@ -1459,8 +1463,6 @@ void CChannelList::paintHead()
if (gotTime){
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + full_width - 10 - timestr_len, y + theight + 2, timestr_len + 1, timestr, COL_MENUHEAD, 0, true); // UTF-8
}
-
- // paintFoot(); // activate to re-paint buttons
}
struct button_label CChannelListButtons[] =
@@ -1547,8 +1549,6 @@ void CChannelList::paint()
{
paintItem(count);
}
-
- paintDetails(selected); // at last reduce flickering of listing
}
void CChannelList::paint_pig (int _x, int _y, int w, int h)
commit 970baf22101354be1ce7ea5636c47794430ef939
Author: GetAway <get...@t-...>
Date: Sat Mar 30 19:20:57 2013 +0100
Neutrino: add MiniTV to Channellist
this patch includes resize of channellist
channellist with additional eventlist/MiniTV
additionally selectable next event for infobox
additionally selectable Tuning-Parameters for infobox
reorder painting of modules
redesign of DetailsItemline
yellow Button for Bouquets
blue-button to switch between description and eventlist
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale
index 98f3eb2..e09d288 100644
--- a/tuxbox/neutrino/data/locale/deutsch.locale
+++ b/tuxbox/neutrino/data/locale/deutsch.locale
@@ -218,9 +218,17 @@ bouqueteditor.switchmode TV/Radio
bouquetlist.bouquetselect Bouquet auswählen
bouquetlist.head Bouquets
cablesetup.provider Kabelanbieter
+channellist.additional Zusatzinformatio...
[truncated message content] |