Thread: [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)
+#de...
[truncated message content] |