Project "Tuxbox-GIT: apps":

The branch, master has been updated
       via  3883256691d2c786e72622a986a6aa57a78c5e28 (commit)
       via  52d953a06edb764f8a73329b3bc9a0beb0fd0e6d (commit)
       via  3e53f31c031481add67f8484f6704a75a5f19ae7 (commit)
       via  12a97d0bcdfd9b4703d2a7f17d47cef199ba6898 (commit)
       via  4300b7db6bf17a10230723c7cb277896f7f5b863 (commit)
       via  95bf7f7b7f3dc8054165ee345c92d4a6d95ec2f7 (commit)
       via  e961d3770e829b666d94cd4e7dc3e56137b7400c (commit)
       via  f7903e090f5743c927be0c54cef1a1a21ecaab77 (commit)
       via  8905942068fdf9645fb7b8d0bd563730c2fb0b8b (commit)
       via  e37333358a0b7bd82a1f56c8e72c79be89917992 (commit)
       via  0017cdab90a45255cd02ef18baff2c8a40463d20 (commit)
       via  30f87328e9058060139c4951c07516278f5ccd41 (commit)
      from  51c9a02e9630fb0744eea7664b6772aca8b6d7f3 (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 3883256691d2c786e72622a986a6aa57a78c5e28
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Wed May 8 18:23:58 2013 +0200

    Neutrino filebrowser: calculate start pos after height recalculation
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp 
b/tuxbox/neutrino/src/gui/filebrowser.cpp
index 2f9ab35..cb5ccc3 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -384,9 +384,6 @@ void CFileBrowser::commonInit()
        width = w_max(720, 40);
        height = h_max(576, 40);
 
-       x = getScreenStartX(width);
-       y = getScreenStartY(height);
-
        theight = fnt_title->getHeight();
        fheight = fnt_item->getHeight();
        foheight = fnt_small->getHeight()+6; //initial height value for 
buttonbar; TODO get value from buttonbar
@@ -397,6 +394,9 @@ void CFileBrowser::commonInit()
        //recalc height
        height = theight + listmaxshow * fheight + 2 * foheight;
 
+       x = getScreenStartX(width);
+       y = getScreenStartY(height);
+
        m_SMSKeyInput.setTimeout(SMSKEY_TIMEOUT);
 }
 

commit 52d953a06edb764f8a73329b3bc9a0beb0fd0e6d
Author: Michael Liebmann <tuxcode....@gmail.com>
Date:   Sat May 4 21:53:05 2013 +0200

    Neutrino: paint event list alone after the list was sorted
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp 
b/tuxbox/neutrino/src/gui/eventlist.cpp
index 91edf50..148089d 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -355,7 +355,6 @@ int EventList::exec(const t_channel_id channel_id, const 
std::string& channelnam
                                sort_mode=0;
                                
sort(evtlist.begin(),evtlist.end(),sortByDateTime);
                        }
-
                        // find selected
                        for ( selected=0 ; selected < evtlist.size(); 
selected++ )
                        {
@@ -367,10 +366,7 @@ int EventList::exec(const t_channel_id channel_id, const 
std::string& channelnam
                                liststart=0;
                        else
                                liststart=(selected/listmaxshow)*listmaxshow;
-                       hide();
-                       paintHead();
                        paint();
-                       showFunctionBar(true);
                }
 
 //  -- I commented out the following part (code is working)
@@ -626,7 +622,6 @@ void EventList::paintItem(unsigned int pos)
        uint8_t    color;
        fb_pixel_t bgcolor;
        int ypos = y+ theight+0 + pos*fheight;
-       std::string datetime1_str, datetime2_str, duration_str;
        unsigned int curpos = liststart + pos;
        int c_rad_mid;
 
@@ -653,6 +648,8 @@ void EventList::paintItem(unsigned int pos)
 
        if (curpos < evtlist.size())
        {
+               std::string datetime1_str, datetime2_str, duration_str;
+
                if (evtlist[curpos].eventID != 0)
                {
                        char tmpstr[256];

commit 3e53f31c031481add67f8484f6704a75a5f19ae7
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Sat May 4 20:50:50 2013 +0200

    Neutrino CMenuWidget: consider rounded corners when calculating start pos
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp 
b/tuxbox/neutrino/src/gui/widget/menue.cpp
index bc30353..d73152c 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -606,7 +606,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const 
std::string &)
 
 void CMenuWidget::hide()
 {
-       frameBuffer->paintBackgroundBoxRel(x, y, width + 15 + SHADOW_OFFSET, 
height + CORNER_RADIUS_MID * 2 + 1 + SHADOW_OFFSET);
+       frameBuffer->paintBackgroundBoxRel(x, y, width + 15 + SHADOW_OFFSET, 
height + (CORNER_RADIUS_MID / 3 * 2) + SHADOW_OFFSET);
 
        /* x = -1 is a marker which prevents the item from being painted on 
setActive changes */
        for (unsigned int count = 0; count < items.size(); count++)
@@ -675,11 +675,11 @@ void CMenuWidget::paint()
        else
                sb_width=0;
 
+       int c_rad_mid = RADIUS_MID;
+
        x = getScreenStartX(width + sb_width);
-       y = getScreenStartY(height);
+       y = getScreenStartY(height + (c_rad_mid / 3 * 2));
 
-       int c_rad_mid = RADIUS_MID;
-       
        frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width + 
sb_width, height + (c_rad_mid / 3 * 2), COL_MENUCONTENTDARK_PLUS_0, c_rad_mid);
        frameBuffer->paintBoxRel(x, y + height - ((c_rad_mid * 2) + 1) + 
(c_rad_mid / 3 * 2), width + sb_width, ((c_rad_mid * 2) + 1), 
COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM);
        frameBuffer->paintBoxRel(x, y, width + sb_width, hheight, 
COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP);

commit 12a97d0bcdfd9b4703d2a7f17d47cef199ba6898
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Sat May 4 20:46:55 2013 +0200

    Neutrino OSD setup: repaint window if shape of corners changed
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/osd_setup.cpp 
b/tuxbox/neutrino/src/gui/osd_setup.cpp
index 70b1bf8..62d966e 100644
--- a/tuxbox/neutrino/src/gui/osd_setup.cpp
+++ b/tuxbox/neutrino/src/gui/osd_setup.cpp
@@ -122,6 +122,8 @@ COsdSetup::COsdSetup(const neutrino_locale_t title, const 
char * const IconName)
 
        fontsizenotifier = new CFontSizeNotifier;
 
+       osd_setup = NULL;
+
        menue_title = title;
        menue_icon = IconName;
 
@@ -242,7 +244,7 @@ const CMenuOptionChooser::keyval  
SHOW_MUTE_ICON_OPTIONS[SHOW_MUTE_ICON_OPTIONS_
 int COsdSetup::showOsdSetup()
 {
        //osd main settings
-       CMenuWidget *osd_setup          = new CMenuWidget(menue_title, 
menue_icon, width);
+       osd_setup = new CMenuWidget(menue_title, menue_icon, width);
        osd_setup->setPreselected(selected);
 
        //osd settings color sbubmenue
@@ -282,7 +284,7 @@ int COsdSetup::showOsdSetup()
        //osd mute icon options
        CMenuOptionChooser* osd_mute_icon_ch = new 
CMenuOptionChooser(LOCALE_OSDSETTINGS_SHOW_MUTE_ICON, 
&g_settings.show_mute_icon, SHOW_MUTE_ICON_OPTIONS, 
SHOW_MUTE_ICON_OPTIONS_COUNT, true);
        //osd corner chooser
-       CMenuOptionChooser* osd_corners_ch = new 
CMenuOptionChooser(LOCALE_OSDSETTINGS_ROUNDED_CORNERS, 
&g_settings.rounded_corners, COLORMENU_CORNERSETTINGS_TYPE_OPTIONS, 
COLORMENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true );
+       CMenuOptionChooser* osd_corners_ch = new 
CMenuOptionChooser(LOCALE_OSDSETTINGS_ROUNDED_CORNERS, 
&g_settings.rounded_corners, COLORMENU_CORNERSETTINGS_TYPE_OPTIONS, 
COLORMENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this);
 
        //osd main settings, intros
        osd_setup->addIntroItems(menue_title != LOCALE_MAINSETTINGS_OSD ? 
LOCALE_MAINSETTINGS_OSD : NONEXISTANT_LOCALE);
@@ -738,8 +740,13 @@ bool CFontSizeNotifier::changeNotify(const 
neutrino_locale_t OptionName, void *
 
 bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void *)
 {
+       if (ARE_LOCALES_EQUAL(OptionName, LOCALE_OSDSETTINGS_ROUNDED_CORNERS))
+       {
+               osd_setup->hide();
+               return true;
+       }
 #ifdef ENABLE_RADIOTEXT
-       if (ARE_LOCALES_EQUAL(OptionName, 
LOCALE_OSDSETTINGS_INFOVIEWER_RADIOTEXT))
+       else if (ARE_LOCALES_EQUAL(OptionName, 
LOCALE_OSDSETTINGS_INFOVIEWER_RADIOTEXT))
        {
                if (g_settings.radiotext_enable)
                {
diff --git a/tuxbox/neutrino/src/gui/osd_setup.h 
b/tuxbox/neutrino/src/gui/osd_setup.h
index 2e49dcd..ece029a 100644
--- a/tuxbox/neutrino/src/gui/osd_setup.h
+++ b/tuxbox/neutrino/src/gui/osd_setup.h
@@ -51,6 +51,8 @@ class COsdSetup : public CMenuTarget, CChangeObserver
                CColorSetupNotifier *colorSetupNotifier;
                CFontSizeNotifier *fontsizenotifier;
 
+               CMenuWidget *osd_setup;
+
                int width, selected;
 
                neutrino_locale_t menue_title;

commit 4300b7db6bf17a10230723c7cb277896f7f5b863
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Fri May 3 22:57:29 2013 +0200

    Neutrino: fix width of menu item captions
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp 
b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 71477c2..bc30353 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -138,7 +138,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, 
const int &item_height,
 
        //left text
        int stringstartposName = x + offx + 10;
-       
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y + 
item_height, dx - (stringstartposName - x), left_text, item_color, 0, true); // 
UTF-8
+       
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y + 
item_height, dx - (stringstartposName - x) - 10, left_text, item_color, 0, 
true); // UTF-8
 
        //right text
        if (right_text != NULL)
@@ -146,7 +146,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, 
const int &item_height,
                int stringwidth = 
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(right_text, 
right_text_is_utf8);
                int stringstartposOption = std::max(stringstartposName + 
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(left_text, true) + 10,
                                x + dx - stringwidth - 10); //+ offx
-               
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposOption, y 
+ item_height, dx - (stringstartposOption - x), right_text, item_color, 0, 
right_text_is_utf8);
+               
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposOption, y 
+ item_height, dx - (stringstartposOption - x) - 10, right_text, item_color, 0, 
right_text_is_utf8);
        }
 }
 
@@ -1277,7 +1277,7 @@ int CMenuSeparator::paint(bool /*selected*/)
                        if (type & LINE)
                                frameBuffer->paintBoxRel(stringstartposX - 5, 
y, stringwidth + 10, height, item_bgcolor);
 
-                       
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y + 
height, dx - (stringstartposX - x), l_text, item_color, 0, true); // UTF-8
+                       
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y + 
height, dx - (stringstartposX - x) - 10, l_text, item_color, 0, true); // UTF-8
 
                        if (type & SUB_HEAD)
                                
CLCD::getInstance()->setMode(CLCD::MODE_MENU_UTF8, l_text);

commit 95bf7f7b7f3dc8054165ee345c92d4a6d95ec2f7
Author: GetAway <get-a...@t-online.de>
Date:   Thu May 2 20:46:20 2013 +0200

    plugins.cpp removed a variable that was never used
    
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/plugins.cpp 
b/tuxbox/neutrino/src/gui/plugins.cpp
index 6d26494..14a0e46 100644
--- a/tuxbox/neutrino/src/gui/plugins.cpp
+++ b/tuxbox/neutrino/src/gui/plugins.cpp
@@ -201,11 +201,7 @@ bool CPlugins::parseCfg(plugin *plugin_data)
                getline(iss, cmd, '=');
                getline(iss, parm, '=');
 
-               if (cmd == "pluginversion")
-               {
-                       plugin_data->version = atoi(parm.c_str());
-               }
-               else if (cmd == "index")
+               if (cmd == "index")
                {
                        plugin_data->index = atoi(parm.c_str());
                }
diff --git a/tuxbox/neutrino/src/gui/plugins.h 
b/tuxbox/neutrino/src/gui/plugins.h
index 4c394f4..0cb6461 100644
--- a/tuxbox/neutrino/src/gui/plugins.h
+++ b/tuxbox/neutrino/src/gui/plugins.h
@@ -66,7 +66,6 @@ class CPlugins
                        std::string filename;
                        std::string cfgfile;
                        std::string pluginfile;
-                       int version;
                        std::string name;                // UTF-8 encoded
                        std::string description;         // UTF-8 encoded
                        std::string depend;

commit e961d3770e829b666d94cd4e7dc3e56137b7400c
Author: Thilo Graf <d...@novatux.de>
Date:   Thu May 2 20:33:54 2013 +0200

    CPlugins: add config parameter 'index' for plugins
    
    This allows (optional) to config an user definied sort for plugin via
    
    plugin.cfg.
    
    TODO: configuration via gui

diff --git a/tuxbox/neutrino/src/gui/plugins.cpp 
b/tuxbox/neutrino/src/gui/plugins.cpp
index 4f9e853..6d26494 100644
--- a/tuxbox/neutrino/src/gui/plugins.cpp
+++ b/tuxbox/neutrino/src/gui/plugins.cpp
@@ -156,6 +156,7 @@ void CPlugins::loadPlugins()
        number_of_plugins = 0;
        plugin_list.clear();
 
+       sindex = 100;
        scanDir(PLUGINDIR_MNT);
        scanDir(PLUGINDIR_VAR);
        scanDir(PLUGINDIR);
@@ -180,6 +181,7 @@ bool CPlugins::parseCfg(plugin *plugin_data)
 
        while(linecount < 20 && getline(inFile, line[linecount++])){};
 
+       plugin_data->index = sindex++;
        plugin_data->fb = false;
        plugin_data->rc = false;
        plugin_data->lcd = false;
@@ -203,6 +205,10 @@ bool CPlugins::parseCfg(plugin *plugin_data)
                {
                        plugin_data->version = atoi(parm.c_str());
                }
+               else if (cmd == "index")
+               {
+                       plugin_data->index = atoi(parm.c_str());
+               }
                else if (cmd == "name")
                {
                        plugin_data->name = parm;
diff --git a/tuxbox/neutrino/src/gui/plugins.h 
b/tuxbox/neutrino/src/gui/plugins.h
index a82a025..4c394f4 100644
--- a/tuxbox/neutrino/src/gui/plugins.h
+++ b/tuxbox/neutrino/src/gui/plugins.h
@@ -62,6 +62,7 @@ class CPlugins
 
                struct plugin
                {
+                       int index;
                        std::string filename;
                        std::string cfgfile;
                        std::string pluginfile;
@@ -82,13 +83,14 @@ class CPlugins
                        bool hide;
                        bool operator< (const plugin& a) const
                        {
-                               return this->filename < a.filename ;
+                               return this->index < a.index ;
                        }
                };
 
                int fb, rc, lcd, pid;
                int number_of_plugins;
 
+               int sindex;
                std::vector<plugin> plugin_list;
                std::string plugin_dir;
                std::string scriptOutput;
@@ -117,6 +119,8 @@ class CPlugins
                inline const std::string & getDescription      (const int 
number) const { return plugin_list[number].description       ; }
                inline       int           getType             (const int 
number) const { return plugin_list[number].type              ; }
                inline       bool          isHidden            (const int 
number) const { return plugin_list[number].hide              ; }
+               inline       int           getIndex            (const int 
number) const { return plugin_list[number].index             ; }
+
                inline       bool          isUsingLcd          (const int 
number) const { return plugin_list[number].lcd               ; }
 
                void startPlugin(int number, int param = 0, int param2 = 0);

commit f7903e090f5743c927be0c54cef1a1a21ecaab77
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Thu May 2 20:03:40 2013 +0200

    Neutrino: update some german locales in service scan menu
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/data/locale/deutsch.locale 
b/tuxbox/neutrino/data/locale/deutsch.locale
index 217ee0e..a4c2fe3 100644
--- a/tuxbox/neutrino/data/locale/deutsch.locale
+++ b/tuxbox/neutrino/data/locale/deutsch.locale
@@ -1290,13 +1290,13 @@ scantp.mod_qpsk QPSK
 scantp.pol Polarisation
 scantp.pol_h H
 scantp.pol_v V
-scantp.rate Symbol rate
-scantp.scan Scan Mode
+scantp.rate Symbolrate
+scantp.scan Scan-Modus
 scantp.scan_all_sats Alle Sats
 scantp.scan_complete Komplett
 scantp.scan_one_sat Einen Sat
 scantp.scan_one_tp Einen Transponder
-scantp.scanmode Schnell Scan
+scantp.scanmode Schnell-Scan
 scants.abort_body Soll die Suche wirklich abgebrochen werden?
 scants.abort_header Abbruch der Kanalsuche
 scants.actcable Kabel:
@@ -1335,7 +1335,7 @@ servicemenu.restart Neutrino neu starten
 servicemenu.restart_failed Neustart von Neutrino schlug fehl.
 servicemenu.restart_hint Neutrino wird neu gestartet...
 servicemenu.restart_refused_recording Aufnahme läuft. Restart nicht möglich.
-servicemenu.scanmodes Scan Modi
+servicemenu.scanmodes Scan-Modi
 servicemenu.scants Kanalsuche
 servicemenu.ucodecheck UCodes überprüfen
 servicemenu.update Software-Aktualisierung

commit 8905942068fdf9645fb7b8d0bd563730c2fb0b8b
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Wed May 1 21:37:55 2013 +0200

    Neutrino scan setup: fix showing current scan mode on cable boxes
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/scan_setup.cpp 
b/tuxbox/neutrino/src/gui/scan_setup.cpp
index ca73633..8f47229 100644
--- a/tuxbox/neutrino/src/gui/scan_setup.cpp
+++ b/tuxbox/neutrino/src/gui/scan_setup.cpp
@@ -565,24 +565,13 @@ void CScanSetup::initScanSettings()
        
 }
 
-typedef struct scan_mode_t
-{
-       const int scan_type;
-       const neutrino_locale_t locale;
-} scan_mode_struct_t;
-
-const scan_mode_struct_t scan_mode[SCANTS_SCAN_OPTION_COUNT] =
-{
-       {CScanTs::SCAN_COMPLETE , LOCALE_SCANTP_SCAN_ALL_SATS},
-       {CScanTs::SCAN_ONE_TP   , LOCALE_SCANTP_SCAN_ONE_TP},
-       {CScanTs::SCAN_ONE_SAT  , LOCALE_SCANTP_SCAN_ONE_SAT},
-};
-
 std::string CScanSetup::getScanModeString(const int& scan_type)
 {
        int st = scan_type;
-       return g_Locale->getText(scan_mode[st].locale);
-
+       if (g_info.delivery_system == DVB_S)
+               return g_Locale->getText(SCANTS_SCAN_OPTIONS[st].value);
+       else
+               return g_Locale->getText(SCANTS_CABLESCAN_OPTIONS[st].value);
 }
 
 bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * Data)
@@ -666,7 +655,10 @@ bool CTP_scanNotifier::changeNotify(const 
neutrino_locale_t, void *Data)
                        toDisable3[0]->setActive(true);
        }
 
-       *scan_mode_string = g_Locale->getText(scan_mode[tp_scan_mode].locale);
+       if (g_info.delivery_system == DVB_S)
+               *scan_mode_string = 
g_Locale->getText(SCANTS_SCAN_OPTIONS[tp_scan_mode].value);
+       else
+               *scan_mode_string = 
g_Locale->getText(SCANTS_CABLESCAN_OPTIONS[tp_scan_mode].value);
 
        return false;
 }

commit e37333358a0b7bd82a1f56c8e72c79be89917992
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Tue Apr 30 20:03:02 2013 +0200

    Neutrino CMenuOption*Chooser: only notify observer if value changed
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp 
b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 484efdf..71477c2 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -886,6 +886,7 @@ int CMenuOptionChooser::getOptionValue(void) const
 
 int CMenuOptionChooser::exec(CMenuTarget* parent)
 {
+       bool optionValueChanged = true;
        bool wantsRepaint = false;
        int ret = menu_return::RETURN_NONE;
 
@@ -909,6 +910,8 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
                ret = menu->exec(parent, "");
                if (select >= 0)
                        *optionValue = options[select].key;
+               else
+                       optionValueChanged = false;
                delete menu;
                delete selector;
        }
@@ -930,7 +933,7 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
                paint(true);
        }
 
-       if (observ)
+       if (observ && optionValueChanged)
                wantsRepaint = observ->changeNotify(optionName, optionValue);
 
        if (wantsRepaint)
@@ -1002,6 +1005,7 @@ void CMenuOptionStringChooser::addOption(const char * 
const value)
 
 int CMenuOptionStringChooser::exec(CMenuTarget* parent)
 {
+       bool optionValueChanged = true;
        bool wantsRepaint = false;
        int ret = menu_return::RETURN_NONE;
 
@@ -1025,6 +1029,8 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
                ret = menu->exec(parent, "");
                if (select >= 0)
                        strcpy(optionValue, options[select].c_str());
+               else
+                       optionValueChanged = false;
                delete menu;
                delete selector;
        }
@@ -1046,7 +1052,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
                paint(true);
        }
 
-       if (observ)
+       if (observ && optionValueChanged)
                wantsRepaint = observ->changeNotify(optionName, optionValue);
 
        if (wantsRepaint)

commit 0017cdab90a45255cd02ef18baff2c8a40463d20
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Tue Apr 30 19:48:22 2013 +0200

    Neutrino CMenuOptionStringChooser: use 1st option if options removed
    
    if options are removed 'optionValue' may not exist anymore, then use 1st
    available option
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp 
b/tuxbox/neutrino/src/gui/widget/menue.cpp
index db5eb73..484efdf 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -914,6 +914,7 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
        }
        else
        {
+               //select next value
                unsigned int count;
                for(count = 0; count < number_of_options; count++)
                {
@@ -1030,7 +1031,8 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
        else
        {
                //select next value
-               for(unsigned int count = 0; count < options.size(); count++)
+               unsigned int count;
+               for(count = 0; count < options.size(); count++)
                {
                        if ((strcmp(options[count].c_str(), optionValue) == 0) 
|| (optionValue[0] == '\0'))
                        {
@@ -1038,6 +1040,9 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
                                break;
                        }
                }
+               // if options are removed optionValue may not exist anymore -> 
use 1st available option
+               if ((count == options.size()) && !options.empty())
+                       strcpy(optionValue, options[0].c_str());
                paint(true);
        }
 

commit 30f87328e9058060139c4951c07516278f5ccd41
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Tue Apr 30 17:29:03 2013 +0200

    Neutrino CMenuOption*Chooser: simplify pulldown list code
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp 
b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 7c98c5c..db5eb73 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -891,14 +891,9 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
 
        if (pulldown)
        {
-               int menu_width = dx;
                int select = -1;
                char cnt[5];
-
-               if (parent)
-                       parent->hide();
-
-               CMenuWidget* menu = new CMenuWidget(optionNameString.c_str(), 
"", menu_width);
+               CMenuWidget* menu = new CMenuWidget(optionNameString.c_str(), 
"", dx);
                menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, 
CMenuWidget::BTN_TYPE_CANCEL);
                CMenuSelectorTarget * selector = new 
CMenuSelectorTarget(&select);
                for(unsigned int count = 0; count < number_of_options; count++)
@@ -911,8 +906,7 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
                        mn_option->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, 
true /*for selected item*/);
                        menu->addItem(mn_option, selected);
                }
-               menu->exec(NULL, "");
-               ret = menu_return::RETURN_REPAINT;
+               ret = menu->exec(parent, "");
                if (select >= 0)
                        *optionValue = options[select].key;
                delete menu;
@@ -1012,14 +1006,9 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
 
        if (pulldown)
        {
-               int menu_width = dx;
                int select = -1;
                char cnt[5];
-
-               if (parent)
-                       parent->hide();
-
-               CMenuWidget* menu = new CMenuWidget(optionName, "", menu_width);
+               CMenuWidget* menu = new CMenuWidget(optionName, "", dx);
                menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, 
CMenuWidget::BTN_TYPE_CANCEL);
                CMenuSelectorTarget * selector = new 
CMenuSelectorTarget(&select);
                for (unsigned int count = 0; count < options.size(); count++)
@@ -1032,8 +1021,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
                        mn_option->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, 
true /*for selected item*/);
                        menu->addItem(mn_option, selected);
                }
-               menu->exec(NULL, "");
-               ret = menu_return::RETURN_REPAINT;
+               ret = menu->exec(parent, "");
                if (select >= 0)
                        strcpy(optionValue, options[select].c_str());
                delete menu;

-----------------------------------------------------------------------

Summary of changes:
 tuxbox/neutrino/data/locale/deutsch.locale |    8 ++--
 tuxbox/neutrino/src/gui/eventlist.cpp      |    7 +---
 tuxbox/neutrino/src/gui/filebrowser.cpp    |    6 ++--
 tuxbox/neutrino/src/gui/osd_setup.cpp      |   13 +++++--
 tuxbox/neutrino/src/gui/osd_setup.h        |    2 +
 tuxbox/neutrino/src/gui/plugins.cpp        |    6 ++-
 tuxbox/neutrino/src/gui/plugins.h          |    7 +++-
 tuxbox/neutrino/src/gui/scan_setup.cpp     |   24 ++++---------
 tuxbox/neutrino/src/gui/widget/menue.cpp   |   51 +++++++++++++--------------
 9 files changed, 63 insertions(+), 61 deletions(-)


-- 
Tuxbox-GIT: apps

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Tuxbox-cvs-commits mailing list
Tuxbox-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits

Reply via email to