diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale
index f7769be5b..9df964e96 100644
--- a/data/locale/deutsch.locale
+++ b/data/locale/deutsch.locale
@@ -594,7 +594,7 @@ keybindingmenu.poweroff Umschalter
keybindingmenu.quickzap Schnellumschaltung
keybindingmenu.remotecontrol_hardware Hardware
keybindingmenu.remotecontrol_hardware_coolstream Coolstream
-keybindingmenu.remotecontrol_hardware_dbox dbox
+keybindingmenu.remotecontrol_hardware_dbox d-box Nokia (alt)
keybindingmenu.remotecontrol_hardware_msg_part1 Die Fernbedienung wurde von '
keybindingmenu.remotecontrol_hardware_msg_part2 ' auf '
keybindingmenu.remotecontrol_hardware_msg_part3 ' geändert.\nIst dies korrekt?\nBitte die Auswahl innerhalb 15 Sekunden mit der neuen Fernbedienung\nbestätigen. Ansonsten wird die Auswahl zurückgesetzt.
diff --git a/data/locale/english.locale b/data/locale/english.locale
index ac95b7d87..0eff7ef9d 100644
--- a/data/locale/english.locale
+++ b/data/locale/english.locale
@@ -595,7 +595,7 @@ keybindingmenu.poweroff Power toggle
keybindingmenu.quickzap Quickzap
keybindingmenu.remotecontrol_hardware Hardware
keybindingmenu.remotecontrol_hardware_coolstream Coolstream
-keybindingmenu.remotecontrol_hardware_dbox dbox
+keybindingmenu.remotecontrol_hardware_dbox d-box Nokia (old)
keybindingmenu.remotecontrol_hardware_msg_part1 The remote control has been changed from '
keybindingmenu.remotecontrol_hardware_msg_part2 ' to '
keybindingmenu.remotecontrol_hardware_msg_part3 ' \nIs this correct?\nPlease confirm the selection within 15 seconds by using the new remote control.\nOtherwise the selection will be reverted.
diff --git a/data/satellites.xml b/data/satellites.xml
index cff4d3a29..bcd66a36a 100755
--- a/data/satellites.xml
+++ b/data/satellites.xml
@@ -1368,7 +1368,7 @@
-
+
@@ -1384,7 +1384,7 @@
-
+
@@ -1400,7 +1400,7 @@
-
+
@@ -1571,11 +1571,15 @@
+
+
+
+
@@ -1583,7 +1587,8 @@
-
+
+
@@ -1595,7 +1600,6 @@
-
diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp
index 0092df048..3399d7b0b 100644
--- a/src/daemonc/remotecontrol.cpp
+++ b/src/daemonc/remotecontrol.cpp
@@ -505,9 +505,11 @@ void CRemoteControl::processAPIDnames()
if(!strstr(current_PIDs.APIDs[count].desc, " (AC3)"))
strncat(current_PIDs.APIDs[count].desc, " (AC3)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[count].desc));
has_ac3 = true;
- if((strlen( current_PIDs.APIDs[count].desc ) == 3) && g_settings.audio_DolbyDigital && (ac3_found < 0))
+ if(g_settings.audio_DolbyDigital && (ac3_found < 0))
ac3_found = count;
}
+ else if (current_PIDs.APIDs[count].is_aac && !strstr(current_PIDs.APIDs[count].desc, " (AAC)"))
+ strncat(current_PIDs.APIDs[count].desc, " (AAC)", DESC_MAX_LEN - strlen(current_PIDs.APIDs[count].desc));
}
if ( has_unresolved_ctags )
diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp
index c4f8b25e6..985af7f92 100644
--- a/src/driver/screenshot.cpp
+++ b/src/driver/screenshot.cpp
@@ -197,6 +197,7 @@ bool CScreenShot::SavePng()
{
printf("CScreenShot::SavePng: %s save error\n", filename.c_str());
png_destroy_write_struct(&png_ptr, &info_ptr);
+ free(row_pointers);
fclose(fd);
return false;
}
diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp
index 7eeff4335..62774d385 100644
--- a/src/gui/bouquetlist.cpp
+++ b/src/gui/bouquetlist.cpp
@@ -57,7 +57,6 @@
#include
extern CBouquetManager *g_bouquetManager;
-extern int g_channel_list_changed;
CBouquetList::CBouquetList(const char * const Name)
{
@@ -381,7 +380,7 @@ int CBouquetList::show(bool bShowChannelList)
else if ( msg == CRCInput::RC_setup) {
int ret = doMenu();
if(ret > 0) {
- g_channel_list_changed = true;
+ CNeutrinoApp::getInstance ()->g_channel_list_changed = true;
res = -4;
loop = false;
} else if(ret < 0)
diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp
index f83e606c1..26ad63770 100644
--- a/src/gui/channellist.cpp
+++ b/src/gui/channellist.cpp
@@ -85,7 +85,6 @@ extern CBouquetList * RADIOallList;
//extern t_channel_id rec_channel_id;
extern bool autoshift;
-extern int g_channel_list_changed;
extern CBouquetManager *g_bouquetManager;
void sectionsd_getChannelEvents(CChannelEventList &eList, const bool tv_mode, t_channel_id *chidlist, int clen);
@@ -663,8 +662,8 @@ int CChannelList::show()
else if ( msg == CRCInput::RC_setup) {
old_b_id = bouquetList->getActiveBouquetNumber();
fader.Stop();
- g_channel_list_changed = doChannelMenu();
- if(g_channel_list_changed) {
+ CNeutrinoApp::getInstance ()->g_channel_list_changed = doChannelMenu();
+ if(CNeutrinoApp::getInstance ()->g_channel_list_changed) {
res = -4;
loop = false;
} else {
diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp
index 4587b47d7..abb70d9b9 100644
--- a/src/gui/keybind_setup.cpp
+++ b/src/gui/keybind_setup.cpp
@@ -33,6 +33,19 @@
#include
#endif
+#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
+/* define constants instead of #ifdef'ing the corresponding code.
+ * the compiler will optimize it away anyway, but the syntax is
+ * still checked */
+#define RC_HW_SELECT true
+#else
+#define RC_HW_SELECT false
+#ifdef HAVE_COOL_HARDWARE
+#warning header coolstream/nevis_ir.h not found
+#warning you probably have an old driver installation
+#warning you´ll be missing the remotecontrol selection feature!
+#endif
+#endif
#include "gui/keybind_setup.h"
@@ -218,7 +231,8 @@ int CKeybindSetup::showKeySetup()
keySetupNotifier->changeNotify(NONEXISTANT_LOCALE, NULL);
keySettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_RC));
- keySettings->addItem(new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE, &g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true));
+ if (RC_HW_SELECT)
+ keySettings->addItem(new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE, &g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true));
keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, keySettings_repeatBlocker));
keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, keySettings_repeat_genericblocker));
diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp
index 5df2aac8f..adcb33ca4 100644
--- a/src/gui/mediaplayer.cpp
+++ b/src/gui/mediaplayer.cpp
@@ -36,6 +36,7 @@
#include
#include
#include
+#include
#include "gui/movieplayer.h"
#include "gui/pictureviewer.h"
@@ -48,7 +49,8 @@
#include
#include
-
+#include
+extern cVideo * videoDecoder;
CMediaPlayerMenu::CMediaPlayerMenu()
{
@@ -101,6 +103,28 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
return menu_return::RETURN_REPAINT;
}
+ else if (actionKey == "movieplayer")
+ {
+#if 0 //Is it really necessary to lock here? Moviebrowser got its own configurable parental lock.
+ bool show = true;
+ if ((g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_ONSIGNAL) || (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED)) {
+ CZapProtection zapProtection( g_settings.parentallock_pincode, 0x100 );
+ show = zapProtection.check();
+ }
+
+ if(show){
+#endif
+ int mode = CNeutrinoApp::getInstance()->getMode();
+ if( mode == NeutrinoMessages::mode_radio )
+ videoDecoder->StopPicture();
+ CMoviePlayerGui::getInstance().exec(NULL, "tsmoviebrowser");
+ if( mode == NeutrinoMessages::mode_radio )
+ videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg");
+#if 0
+ }
+#endif
+ return menu_return::RETURN_REPAINT;;
+ }
int res = initMenuMedia();
@@ -216,9 +240,8 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p)
//show movieplayer submenu with selectable items for moviebrowser or filebrowser
void CMediaPlayerMenu::showMoviePlayer(CMenuWidget *moviePlayer, CPersonalizeGui *p)
{
- CMoviePlayerGui *movieplayer_gui = &CMoviePlayerGui::getInstance();
- CMenuForwarder *fw_mbrowser = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, movieplayer_gui, "tsmoviebrowser", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
- CMenuForwarder *fw_file = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, movieplayer_gui, "fileplayback", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
+ CMenuForwarder *fw_mbrowser = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, this, "movieplayer", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
+ CMenuForwarder *fw_file = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, &CMoviePlayerGui::getInstance(), "fileplayback", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
p->addIntroItems(moviePlayer);
diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp
index 32096482a..ad0ed9b8f 100644
--- a/src/gui/scan_setup.cpp
+++ b/src/gui/scan_setup.cpp
@@ -248,6 +248,7 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey)
g_Zapit->reinitChannels();
if (reloadhintBox)
reloadhintBox->hide();
+ CNeutrinoApp::getInstance ()->SDTreloadChannels = false;
return res;
}
else if(actionKey=="satsetup")
diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp
index bf01a8d44..9e8bddfbf 100644
--- a/src/gui/widget/messagebox.cpp
+++ b/src/gui/widget/messagebox.cpp
@@ -42,49 +42,69 @@
CMessageBox::CMessageBox(const neutrino_locale_t Caption, const char * const Text, const int Width, const char * const Icon, const CMessageBox::result_ Default, const uint32_t ShowButtons) : CHintBoxExt(Caption, Text, Width, Icon)
{
- returnDefaultOnTimeout = false;
-
- m_height += (m_fheight << 1);
-
- result = Default;
-
- showbuttons = ShowButtons;
-
- int MaxButtonTextWidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_MESSAGEBOX_CANCEL), true); // UTF-8
- int ButtonWidth = 20 + 33 + MaxButtonTextWidth + 5;
- int num = 0;
- if (showbuttons & mbYes)
- num++;
- if (showbuttons & mbNo)
- num++;
- if (showbuttons & (mbCancel | mbBack | mbOk))
- num++;
- int new_width = 15 + num*ButtonWidth;
- if(new_width > m_width)
- m_width = new_width;
+ Init(Default, ShowButtons);
}
CMessageBox::CMessageBox(const neutrino_locale_t Caption, ContentLines& Lines, const int Width, const char * const Icon, const CMessageBox::result_ Default, const uint32_t ShowButtons) : CHintBoxExt(Caption, Lines, Width, Icon)
{
+ Init(Default, ShowButtons);
+}
+
+void CMessageBox::Init(const CMessageBox::result_ Default, const uint32_t ShowButtons)
+{
+#define BtnCount 3
returnDefaultOnTimeout = false;
+ ButtonSpacing = 15;
+ int w = 0, h = 0, ih = 0;
+ i_maxw = 0;
+ std::string Btns[BtnCount] = {NEUTRINO_ICON_BUTTON_RED, NEUTRINO_ICON_BUTTON_GREEN, NEUTRINO_ICON_BUTTON_HOME};
+ for (int i = 0; i < BtnCount; i++) {
+ CFrameBuffer::getInstance()->getIconSize(Btns[i].c_str(), &w, &h);
+ ih = std::max(h, ih);
+ i_maxw = std::max(w, i_maxw);
+ }
+ fh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
+ b_height = std::max(fh, ih) + 8 + (RADIUS_LARGE / 2);
+ bb_height = b_height + fh/2 + ButtonSpacing;
+ m_height += bb_height;
+ result = Default;
+ b_width = getButtonWidth();
+ if (ShowButtons & CMessageBox::mbBtnAlignCenter1)
+ mbBtnAlign = CMessageBox::mbBtnAlignCenter1; // centered, large distances
+ else if (ShowButtons & CMessageBox::mbBtnAlignCenter2)
+ mbBtnAlign = CMessageBox::mbBtnAlignCenter2; // centered, small distances
+ else if (ShowButtons & CMessageBox::mbBtnAlignLeft)
+ mbBtnAlign = CMessageBox::mbBtnAlignLeft;
+ else if (ShowButtons & CMessageBox::mbBtnAlignRight)
+ mbBtnAlign = CMessageBox::mbBtnAlignRight;
+ else
+ mbBtnAlign = CMessageBox::mbBtnAlignCenter1; // or g_settings.mbBtnAlign? ;-)
+ showbuttons = ShowButtons & 0xFF;
- m_height += (m_fheight << 1);
+ ButtonCount = 0;
+ if (showbuttons & mbYes) {
+ Buttons[ButtonCount].icon = NEUTRINO_ICON_BUTTON_RED;
+ Buttons[ButtonCount].text = g_Locale->getText(LOCALE_MESSAGEBOX_YES);
+ ButtonCount++;
+ }
+ if (showbuttons & mbNo) {
+ Buttons[ButtonCount].icon = NEUTRINO_ICON_BUTTON_GREEN;
+ Buttons[ButtonCount].text = g_Locale->getText(LOCALE_MESSAGEBOX_NO);
+ ButtonCount++;
+ }
+ if (showbuttons & (mbCancel | mbBack | mbOk)) {
+ Buttons[ButtonCount].icon = NEUTRINO_ICON_BUTTON_HOME;
+ Buttons[ButtonCount].text = g_Locale->getText((showbuttons & mbCancel) ? LOCALE_MESSAGEBOX_CANCEL : (showbuttons & mbOk) ? LOCALE_MESSAGEBOX_OK : LOCALE_MESSAGEBOX_BACK);
+ ButtonCount++;
+ }
- result = Default;
-
- showbuttons = ShowButtons;
- int MaxButtonTextWidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_MESSAGEBOX_CANCEL), true); // UTF-8
- int ButtonWidth = 20 + 33 + MaxButtonTextWidth + 5;
- int num = 0;
- if (showbuttons & mbYes)
- num++;
- if (showbuttons & mbNo)
- num++;
- if (showbuttons & (mbCancel | mbBack | mbOk))
- num++;
- int new_width = 15 + num*ButtonWidth;
- if(new_width > m_width)
- m_width = new_width;
+ ButtonDistance = ButtonSpacing;
+ bb_width = b_width * ButtonCount + ButtonDistance * (ButtonCount - 1);
+ if(bb_width > m_width)
+ m_width = bb_width;
+ else
+ if (mbBtnAlign == CMessageBox::mbBtnAlignCenter1)
+ ButtonDistance = (m_width - b_width * ButtonCount) / (ButtonCount + 1);
}
void CMessageBox::returnDefaultValueOnTimeout(bool returnDefault)
@@ -92,86 +112,62 @@ void CMessageBox::returnDefaultValueOnTimeout(bool returnDefault)
returnDefaultOnTimeout = returnDefault;
}
+int CMessageBox::getButtonWidth()
+{
+#define localeMsgCount 5
+ neutrino_locale_t localeMsg[localeMsgCount] = {LOCALE_MESSAGEBOX_YES, LOCALE_MESSAGEBOX_NO, LOCALE_MESSAGEBOX_CANCEL, LOCALE_MESSAGEBOX_OK, LOCALE_MESSAGEBOX_BACK};
+ int MaxButtonTextWidth = 0;
+ for (int i = 0; i < localeMsgCount; i++)
+ MaxButtonTextWidth = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(localeMsg[i]), true), MaxButtonTextWidth);
+ return MaxButtonTextWidth + i_maxw + 36 + (RADIUS_LARGE / 2);
+}
+
void CMessageBox::paintButtons()
{
- uint8_t color;
+ fb_pixel_t color;
fb_pixel_t bgcolor;
+ int iw, ih, i;
- m_window->paintBoxRel(0, m_height - (m_fheight << 1) - RADIUS_LARGE, m_width, (m_fheight << 1) + RADIUS_LARGE, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
+ int xpos = (m_width - bb_width) / 2;
+ if (mbBtnAlign == CMessageBox::mbBtnAlignCenter1)
+ xpos = ButtonDistance;
+ else if (mbBtnAlign == CMessageBox::mbBtnAlignCenter2)
+ xpos = (m_width - bb_width) / 2;
+ else if (mbBtnAlign == CMessageBox::mbBtnAlignLeft)
+ xpos = ButtonSpacing;
+ else if (mbBtnAlign == CMessageBox::mbBtnAlignRight)
+ xpos = m_width - bb_width - ButtonSpacing;
- //irgendwann alle vergleichen - aber cancel ist sicher der l�ngste
- int MaxButtonTextWidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_MESSAGEBOX_CANCEL), true); // UTF-8
+ int ypos = (m_height - bb_height) + fh/2;
- int ButtonWidth = 20 + 33 + MaxButtonTextWidth;
+ m_window->paintBoxRel(0, m_height - bb_height, m_width, bb_height, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
- int ButtonSpacing = (m_width - 20 - (ButtonWidth * 3)) / 2;
- if(ButtonSpacing <= 5) ButtonSpacing = 5;
-
- int xpos = 10;
- int iw, ih;
- int fh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
- const int noname = 20;
- if (showbuttons & mbYes)
- {
- if (result == mbrYes)
- {
- color = COL_MENUCONTENTSELECTED;
- bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
- }
- else
- {
- color = COL_INFOBAR_SHADOW;
- bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
- }
- CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_BUTTON_RED, &iw, &ih);
- m_window->paintBoxRel(xpos, m_height - m_fheight - noname, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, RADIUS_LARGE);//round
- //m_window->paintIcon(NEUTRINO_ICON_BUTTON_RED, xpos + 14, m_height - m_fheight - 15);
- //m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, m_height-m_fheight+4, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_YES), (CFBWindow::color_t)color, 0, true); // UTF-8
- m_window->paintIcon(NEUTRINO_ICON_BUTTON_RED, xpos + 14, m_height - m_fheight - noname, m_fheight);
- m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, (m_height - noname)-(m_fheight-fh)/2, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_YES), (CFBWindow::color_t)color, 0, true); // UTF-8
- xpos += ButtonWidth + ButtonSpacing;
+ i = 0;
+ if (showbuttons & mbYes) {
+ Buttons[i].def = (result == mbrYes) ? true : false;
+ i++;
}
-
- if (showbuttons & mbNo)
- {
- if (result == mbrNo)
- {
- color = COL_MENUCONTENTSELECTED;
- bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
- }
- else
- {
- color = COL_INFOBAR_SHADOW;
- bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
- }
-
- m_window->paintBoxRel(xpos, m_height-m_fheight-noname, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, RADIUS_LARGE);//round
- //m_window->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, xpos+14, m_height-m_fheight-15);
- m_window->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, xpos+14, m_height-m_fheight - noname, m_fheight);
- m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, (m_height - noname)-(m_fheight-fh)/2, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_NO), (CFBWindow::color_t)color, 0, true); // UTF-8
- xpos += ButtonWidth + ButtonSpacing;
+ if (showbuttons & mbNo) {
+ Buttons[i].def = (result == mbrNo) ? true : false;
+ i++;
}
-
-
if (showbuttons & (mbCancel | mbBack | mbOk))
- {
- if (result >= mbrCancel)
- {
+ Buttons[i].def = (result >= mbrCancel) ? true : false;
+
+ for (i = 0; i < ButtonCount; i++) {
+ if (Buttons[i].def) {
color = COL_MENUCONTENTSELECTED;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
- }
- else
- {
+ } else {
color = COL_INFOBAR_SHADOW;
bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
}
-
- m_window->paintBoxRel(xpos, m_height-m_fheight-noname, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, RADIUS_LARGE);//round
- //m_window->paintIcon(NEUTRINO_ICON_BUTTON_HOME, xpos+10, m_height-m_fheight-19);
- m_window->paintIcon(NEUTRINO_ICON_BUTTON_HOME, xpos+14, m_height-m_fheight - noname, m_fheight);
- m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, (m_height - noname)-(m_fheight-fh)/2, ButtonWidth- 53,
- g_Locale->getText((showbuttons & mbCancel) ? LOCALE_MESSAGEBOX_CANCEL : (showbuttons & mbOk) ? LOCALE_MESSAGEBOX_OK : LOCALE_MESSAGEBOX_BACK),
- (CFBWindow::color_t)color, 0, true); // UTF-8
+ CFrameBuffer::getInstance()->getIconSize(Buttons[i].icon, &iw, &ih);
+ m_window->paintBoxRel(xpos, ypos, b_width, b_height, (CFBWindow::color_t)bgcolor, RADIUS_LARGE);
+ m_window->paintIcon(Buttons[i].icon, xpos + ((b_height - ih) / 2), ypos + ((b_height - ih) / 2), ih);
+ m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + iw + 17, ypos + fh + ((b_height - fh) / 2),
+ b_width - (iw + 21), Buttons[i].text, (CFBWindow::color_t)color, 0, true);
+ xpos += b_width + ButtonDistance;
}
}
diff --git a/src/gui/widget/messagebox.h b/src/gui/widget/messagebox.h
index 54e94f5f8..67e063e0a 100644
--- a/src/gui/widget/messagebox.h
+++ b/src/gui/widget/messagebox.h
@@ -38,15 +38,29 @@
#include
#include
+#define MaxButtons 3
class CMessageBox : public CHintBoxExt
{
private:
+ struct mbButtons
+ {
+ bool def;
+ const char* icon;
+ const char* text;
+ };
+ struct mbButtons Buttons[MaxButtons];
int showbuttons;
bool returnDefaultOnTimeout;
+ int mbBtnAlign;
+ int ButtonSpacing, ButtonDistance;
+ int fh, i_maxw;
+ int b_height, b_width, bb_height, bb_width;
+ int ButtonCount;
void paintButtons();
+ int getButtonWidth();
public:
enum result_
@@ -60,12 +74,16 @@ class CMessageBox : public CHintBoxExt
enum buttons_
{
- mbYes= 0x01,
- mbNo = 0x02,
- mbCancel = 0x04,
- mbAll = 0x07,
- mbBack = 0x08,
- mbOk = 0x10
+ mbYes = 0x01,
+ mbNo = 0x02,
+ mbCancel = 0x04,
+ mbAll = 0x07,
+ mbBack = 0x08,
+ mbOk = 0x10,
+ mbBtnAlignCenter1 = 0x0100, /* centered, large distances */
+ mbBtnAlignCenter2 = 0x0200, /* centered, small distances */
+ mbBtnAlignLeft = 0x0400,
+ mbBtnAlignRight = 0x0800
} buttons;
// Text & Caption are always UTF-8 encoded
@@ -75,6 +93,9 @@ class CMessageBox : public CHintBoxExt
int exec(int timeout = -1);
void returnDefaultValueOnTimeout(bool returnDefault);
+
+ private:
+ void Init(const CMessageBox::result_ Default, const uint32_t ShowButtons);
};
// Text is always UTF-8 encoded
diff --git a/src/neutrino.cpp b/src/neutrino.cpp
index 3e142eb7c..9970cf152 100644
--- a/src/neutrino.cpp
+++ b/src/neutrino.cpp
@@ -150,8 +150,6 @@ extern cAudio * audioDecoder;
cPowerManager *powerManager;
cCpuFreqManager * cpuFreq;
-int g_channel_list_changed;
-
void stop_daemons(bool stopall = true);
// uncomment if you want to have a "test" menue entry (rasc)
@@ -2148,21 +2146,8 @@ INFO("cCA::GetInstance()->Ready\n");
media->exec(NULL, "");
}
else if( msg == CRCInput::RC_video || msg == CRCInput::RC_play ) {
- bool show = true;
- if ((g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_ONSIGNAL) || (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED)) {
- CZapProtection* zapProtection = new CZapProtection( g_settings.parentallock_pincode, 0x100 );
- show = zapProtection->check();
- delete zapProtection;
- }
- if(show) {
- //StopSubtitles();
- if( mode == mode_radio )
- videoDecoder->StopPicture();
- CMoviePlayerGui::getInstance().exec(NULL, "tsmoviebrowser");
- if( mode == mode_radio )
- videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg");
- //StartSubtitles();
- }
+ //open moviebrowser via media player menu object
+ CMediaPlayerMenu::getInstance()->exec(NULL,"movieplayer");
}
else if (CRCInput::isNumeric(msg) && g_RemoteControl->director_mode ) {
g_RemoteControl->setSubChannel(CRCInput::getNumericValue(msg));
diff --git a/src/neutrino.h b/src/neutrino.h
index 79b2100cd..117a7ae90 100644
--- a/src/neutrino.h
+++ b/src/neutrino.h
@@ -130,7 +130,6 @@ private:
// bool fromflash;
bool init_cec_setting;
int lastChannelMode;
- bool SDTreloadChannels;
struct timeval standby_pressed_at;
CZapitClient::responseGetLastChannel firstchannel;
@@ -229,6 +228,8 @@ public:
void SelectSubtitles();
void showInfo(void);
CConfigFile* getConfigFile() {return &configfile;};
+ bool SDTreloadChannels;
+ bool g_channel_list_changed;
};
#endif