Merge branch 'bug_785_fix_rtl_group_epg' into experimental
authorghost <andreas.monzner@multimedia-labs.de>
Wed, 6 Jul 2011 09:17:13 +0000 (11:17 +0200)
committerghost <andreas.monzner@multimedia-labs.de>
Wed, 6 Jul 2011 09:17:13 +0000 (11:17 +0200)
20 files changed:
data/setup.xml
data/skin_default.xml
lib/base/thread.cpp
lib/dvb/sec.cpp
lib/python/Components/Converter/Makefile.am
lib/python/Components/Converter/ValueToPixmap.py [new file with mode: 0644]
lib/python/Components/Renderer/Pixmap.py
lib/python/Components/Scanner.py
lib/python/Components/Task.py
lib/python/Components/UsageConfig.py
lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py
lib/python/Plugins/SystemPlugins/Hotplug/plugin.py
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
lib/python/Screens/AudioSelection.py
lib/python/Screens/ChannelSelection.py
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/TaskView.py
lib/python/Screens/VirtualKeyBoard.py
lib/python/Tools/NumericalTextInput.py
lib/service/servicemp3.cpp

index 5f7cbf6..8620709 100755 (executable)
@@ -28,6 +28,7 @@
                        <item level="2" text="Load Length of Movies in Movielist">config.usage.load_length_of_movies_in_moviellist</item>
                        <item level="1" text="Show positioner movement">config.usage.showdish</item>
                        <item level="1" text="Enable multiple bouquets">config.usage.multibouquet</item>
+                       <item level="1" text="Multi-EPG bouquet selection">config.usage.multiepg_ask_bouquet</item>
                        <item level="1" text="Change bouquets in quickzap">config.usage.quickzap_bouquet_change</item>
                        <item level="1" text="Alternative radio mode">config.usage.e1like_radio_mode</item>
                        <item level="1" text="Action on long powerbutton press">config.usage.on_long_powerpress</item>
index 4826706..2dee1db 100755 (executable)
@@ -728,18 +728,18 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        <!-- Numerical help dialog -->
        <screen name="NumericalTextInputHelpDialog" position="190,400" zPosition="2" size="394,124" backgroundColor="#202020" flags="wfNoBorder">
                <eLabel position="0,0" size="392,122" backgroundColor="#c0c0c0" zPosition="-1" />
-               <widget name="key1" position="2,2" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key2" position="132,2" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key3" position="262,2" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key4" position="2,32" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key5" position="132,32" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key6" position="262,32" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key7" position="2,62" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key8" position="132,62" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key9" position="262,62" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="help1" position="2,92" size="130,30" font="Console;16" halign="center" valign="center" />
-               <widget name="key0" position="132,92" size="130,30" font="Console;12" halign="center" valign="center" />
-               <widget name="help2" position="262,92" size="130,30" font="Console;16" halign="center" valign="center" />
+               <widget name="key1" position="2,2" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key2" position="132,2" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key3" position="262,2" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key4" position="2,32" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key5" position="132,32" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key6" position="262,32" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key7" position="2,62" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key8" position="132,62" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key9" position="262,62" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="help1" position="2,92" size="130,30" font="Regular;18" halign="center" valign="center" />
+               <widget name="key0" position="132,92" size="130,30" font="Regular;14" halign="center" valign="center" />
+               <widget name="help2" position="262,92" size="130,30" font="Regular;18" halign="center" valign="center" />
        </screen>
        <!-- Parental control - editor -->
        <screen name="ParentalControlEditor" position="center,center" size="520,400" title="Parental control services Editor">
@@ -1151,10 +1151,13 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- VirtualKeyBoard -->
        <screen name="VirtualKeyBoard" position="center,center" size="560,350" zPosition="99" title="Virtual KeyBoard">
-               <ePixmap pixmap="skin_default/vkey_text.png" position="9,35" zPosition="-4" size="542,52" alphatest="on" />
-               <widget name="header" position="10,10" size="500,20" font="Regular;20" transparent="1" noWrap="1" />
-               <widget name="text" position="12,35" size="536,46" font="Regular;46" transparent="1" noWrap="1" halign="right" />
-               <widget name="list" position="10,100" size="540,225" selectionDisabled="1" transparent="1" />
+               <ePixmap pixmap="skin_default/vkey_text.png" position="9,45" zPosition="-4" size="542,52" alphatest="on" />
+               <widget source="country" render="Pixmap" position="490,0" size="60,40" alphatest="on" borderWidth="2" borderColor="yellow" >
+                       <convert type="ValueToPixmap">LanguageCode</convert>
+               </widget>
+               <widget name="header" position="10,20" size="500,20" font="Regular;20" transparent="1" noWrap="1" />
+               <widget name="text" position="12,45" size="536,46" font="Regular;46" transparent="1" noWrap="1" halign="right" />
+               <widget name="list" position="10,110" size="540,225" selectionDisabled="1" transparent="1" />
        </screen>
        <!-- FileBrowser -->
        <screen name="FileBrowser" position="center,center" size="520,430" title="DVD File Browser" >
index fa923de..1fda6a4 100644 (file)
@@ -58,7 +58,12 @@ int eThread::runAsync(int prio, int policy)
                pthread_attr_setschedpolicy(&attr, policy);
                pthread_attr_setschedparam(&attr, &p);
        }
-       
+
+       if (the_thread) {
+               eDebug("old thread joined %d", pthread_join(the_thread, 0));
+               the_thread = 0;
+       }
+
        if (pthread_create(&the_thread, &attr, wrapper, this))
        {
                pthread_attr_destroy(&attr);
@@ -69,7 +74,7 @@ int eThread::runAsync(int prio, int policy)
        
        pthread_attr_destroy(&attr);
        return 0;
-}                     
+}
 
 int eThread::run(int prio, int policy)
 {
index a2bc886..851e9b1 100644 (file)
@@ -324,6 +324,10 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        bool diseqc13V = voltage_mode == eDVBSatelliteSwitchParameters::HV_13;
                        bool is_unicable = lnb_param.SatCR_idx != -1;
 
+                       bool useGotoXX = false;
+                       int RotorCmd=-1;
+                       int send_mask = 0;
+
                        lnb_param.guard_offset = 0; //HACK
 
                        frontend.setData(eDVBFrontend::SATCR, lnb_param.SatCR_idx);
@@ -374,7 +378,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        if(!is_unicable)
                        {
                                // calc Frequency
-                               int local= abs(sat.frequency 
+                               int local= abs(sat.frequency
                                        - lof);
                                parm.FREQUENCY = ((((local * 2) / 125) + 1) / 2) * 125;
                                frontend.setData(eDVBFrontend::FREQ_OFFSET, sat.frequency - parm.FREQUENCY);
@@ -396,7 +400,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        }
                        else
                        {
-                               int tmp1 = abs(sat.frequency 
+                               int tmp1 = abs(sat.frequency
                                                -lof)
                                                + lnb_param.SatCRvco
                                                - 1400000
@@ -411,6 +415,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                eDebug("[prepare] UnicableTuningWord %#04x",lnb_param.UnicableTuningWord);
                                                eDebug("[prepare] guard_offset %d",lnb_param.guard_offset);
                                frontend.setData(eDVBFrontend::FREQ_OFFSET, (lnb_param.UnicableTuningWord & 0x3FF) *4000 + 1400000 + lof - (2 * (lnb_param.SatCRvco - (tmp1-tmp2))) );
+                               voltage = VOLTAGE(13);
                        }
 
                        if (diseqc_mode >= eDVBSatelliteDiseqcParameters::V1_0)
@@ -433,7 +438,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                        (di_param.m_toneburst_param != eDVBSatelliteDiseqcParameters::NO);
                                bool changed_burst = send_burst && (forceChanged || toneburst != lastToneburst);
 
-                               int send_mask = 0; /*
+                               /* send_mask
                                        1 must send csw
                                        2 must send ucsw
                                        4 send toneburst first
@@ -459,7 +464,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                        if (di_param.m_command_order==4 && send_burst)
                                                send_mask |= 8;
                                }
-                               if (changed_csw) 
+                               if (changed_csw)
                                {
                                        if ( di_param.m_use_fast
                                                && di_param.m_committed_cmd < eDVBSatelliteDiseqcParameters::SENDNO
@@ -485,388 +490,201 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                eDebugNoNewLine("0");
                                eDebug("");
 #endif
-                               if (doSetVoltageToneFrontend)
+                               if ( diseqc_mode == eDVBSatelliteDiseqcParameters::V1_2
+                                       && !sat.no_rotor_command_on_tune )
                                {
-                                       int RotorCmd=-1;
-                                       bool useGotoXX = false;
-                                       if ( diseqc_mode == eDVBSatelliteDiseqcParameters::V1_2
-                                               && !sat.no_rotor_command_on_tune )
+                                       if (sw_param.m_rotorPosNum) // we have stored rotor pos?
+                                               RotorCmd=sw_param.m_rotorPosNum;
+                                       else  // we must calc gotoxx cmd
                                        {
-                                               if (sw_param.m_rotorPosNum) // we have stored rotor pos?
-                                                       RotorCmd=sw_param.m_rotorPosNum;
-                                               else  // we must calc gotoxx cmd
-                                               {
-                                                       eDebugNoSimulate("Entry for %d,%d? not in Rotor Table found... i try gotoXX?", sat.orbital_position / 10, sat.orbital_position % 10 );
-                                                       useGotoXX = true;
-       
-                                                       double  SatLon = abs(sat.orbital_position)/10.00,
-                                                                       SiteLat = rotor_param.m_gotoxx_parameters.m_latitude,
-                                                                       SiteLon = rotor_param.m_gotoxx_parameters.m_longitude;
-       
-                                                       if ( rotor_param.m_gotoxx_parameters.m_la_direction == eDVBSatelliteRotorParameters::SOUTH )
-                                                               SiteLat = -SiteLat;
-       
-                                                       if ( rotor_param.m_gotoxx_parameters.m_lo_direction == eDVBSatelliteRotorParameters::WEST )
-                                                               SiteLon = 360 - SiteLon;
-       
-                                                       eDebugNoSimulate("siteLatitude = %lf, siteLongitude = %lf, %lf degrees", SiteLat, SiteLon, SatLon );
-                                                       double satHourAngle =
-                                                               calcSatHourangle( SatLon, SiteLat, SiteLon );
-                                                       eDebugNoSimulate("PolarmountHourAngle=%lf", satHourAngle );
-       
-                                                       static int gotoXTable[10] =
-                                                               { 0x00, 0x02, 0x03, 0x05, 0x06, 0x08, 0x0A, 0x0B, 0x0D, 0x0E };
-       
-                                                       if (SiteLat >= 0) // Northern Hemisphere
-                                                       {
-                                                               int tmp=(int)round( fabs( 180 - satHourAngle ) * 10.0 );
-                                                               RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
-       
-                                                               if (satHourAngle < 180) // the east
-                                                                       RotorCmd |= 0xE000;
-                                                               else                                    // west
-                                                                       RotorCmd |= 0xD000;
-                                                       }
-                                                       else // Southern Hemisphere
-                                                       {
-                                                               if (satHourAngle < 180) // the east
-                                                               {
-                                                                       int tmp=(int)round( fabs( satHourAngle ) * 10.0 );
-                                                                       RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
-                                                                       RotorCmd |= 0xD000;
-                                                               }
-                                                               else // west
-                                                               {
-                                                                       int tmp=(int)round( fabs( 360 - satHourAngle ) * 10.0 );
-                                                                       RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
-                                                                       RotorCmd |= 0xE000;
-                                                               }
-                                                       }
-                                                       eDebugNoSimulate("RotorCmd = %04x", RotorCmd);
-                                               }
-                                       }
+                                               eDebugNoSimulate("Entry for %d,%d? not in Rotor Table found... i try gotoXX?", sat.orbital_position / 10, sat.orbital_position % 10 );
+                                               useGotoXX = true;
 
-                                       if ( send_mask )
-                                       {
-                                               int diseqc_repeats = diseqc_mode > eDVBSatelliteDiseqcParameters::V1_0 ? di_param.m_repeats : 0;
-                                               int vlt = iDVBFrontend::voltageOff;
-                                               eSecCommand::pair compare;
-                                               compare.steps = +3;
-                                               compare.tone = iDVBFrontend::toneOff;
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC]) );
-
-                                               if (diseqc13V)
-                                                       vlt = iDVBFrontend::voltage13;
-                                               else if ( RotorCmd != -1 && RotorCmd != lastRotorCmd )
-                                               {
-                                                       if (rotor_param.m_inputpower_parameters.m_use)
-                                                               vlt = VOLTAGE(18);  // in input power mode set 18V for measure input power
-                                                       else
-                                                               vlt = VOLTAGE(13);  // in normal mode start turning with 13V
-                                               }
-                                               else
-                                                       vlt = voltage;
+                                               double  SatLon = abs(sat.orbital_position)/10.00,
+                                                               SiteLat = rotor_param.m_gotoxx_parameters.m_latitude,
+                                                               SiteLon = rotor_param.m_gotoxx_parameters.m_longitude;
 
-                                               // check if voltage is already correct..
-                                               compare.voltage = vlt;
-                                               compare.steps = +7;
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
+                                               if ( rotor_param.m_gotoxx_parameters.m_la_direction == eDVBSatelliteRotorParameters::SOUTH )
+                                                       SiteLat = -SiteLat;
 
-                                               // check if voltage is disabled
-                                               compare.voltage = iDVBFrontend::voltageOff;
-                                               compare.steps = +4;
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
+                                               if ( rotor_param.m_gotoxx_parameters.m_lo_direction == eDVBSatelliteRotorParameters::WEST )
+                                                       SiteLon = 360 - SiteLon;
 
-                                               // voltage is changed... use DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, vlt) );
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS]) );
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, +3) );
+                                               eDebugNoSimulate("siteLatitude = %lf, siteLongitude = %lf, %lf degrees", SiteLat, SiteLon, SatLon );
+                                               double satHourAngle =
+                                                       calcSatHourangle( SatLon, SiteLat, SiteLon );
+                                               eDebugNoSimulate("PolarmountHourAngle=%lf", satHourAngle );
 
-                                               // voltage was disabled.. use DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, vlt) );
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS]) );
+                                               static int gotoXTable[10] =
+                                                       { 0x00, 0x02, 0x03, 0x05, 0x06, 0x08, 0x0A, 0x0B, 0x0D, 0x0E };
 
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_SWITCHPARMS) );
-                                               if (needDiSEqCReset)
+                                               if (SiteLat >= 0) // Northern Hemisphere
                                                {
-                                                       eDVBDiseqcCommand diseqc;
-                                                       memset(diseqc.data, 0, MAX_DISEQC_LENGTH);
-                                                       diseqc.len = 3;
-                                                       diseqc.data[0] = 0xE0;
-                                                       diseqc.data[1] = 0;
-                                                       diseqc.data[2] = 0;
-                                                       // diseqc reset
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_DISEQC_RESET_CMD]) );
-                                                       diseqc.data[2] = 3;
-                                                       // diseqc peripherial powersupply on
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_DISEQC_PERIPHERIAL_POWERON_CMD]) );
-                                               }
+                                                       int tmp=(int)round( fabs( 180 - satHourAngle ) * 10.0 );
+                                                       RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
 
-                                               for (int seq_repeat = 0; seq_repeat < (di_param.m_seq_repeat?2:1); ++seq_repeat)
+                                                       if (satHourAngle < 180) // the east
+                                                               RotorCmd |= 0xE000;
+                                                       else                                    // west
+                                                               RotorCmd |= 0xD000;
+                                               }
+                                               else // Southern Hemisphere
                                                {
-                                                       if ( send_mask & 4 )
-                                                       {
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SEND_TONEBURST, di_param.m_toneburst_param) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_TONEBURST]) );
-                                                       }
-
-                                                       int loops=0;
-
-                                                       if ( send_mask & 1 )
-                                                               ++loops;
-                                                       if ( send_mask & 2 )
-                                                               ++loops;
-
-                                                       loops <<= diseqc_repeats;
-
-                                                       for ( int i = 0; i < loops;)  // fill commands...
+                                                       if (satHourAngle < 180) // the east
                                                        {
-                                                               eDVBDiseqcCommand diseqc;
-                                                               memset(diseqc.data, 0, MAX_DISEQC_LENGTH);
-                                                               diseqc.len = 4;
-                                                               diseqc.data[0] = i ? 0xE1 : 0xE0;
-                                                               diseqc.data[1] = 0x10;
-                                                               if ( (send_mask & 2) && (di_param.m_command_order & 4) )
-                                                               {
-                                                                       diseqc.data[2] = 0x39;
-                                                                       diseqc.data[3] = ucsw;
-                                                               }
-                                                               else if ( send_mask & 1 )
-                                                               {
-                                                                       diseqc.data[2] = 0x38;
-                                                                       diseqc.data[3] = csw;
-                                                               }
-                                                               else  // no committed command confed.. so send uncommitted..
-                                                               {
-                                                                       diseqc.data[2] = 0x39;
-                                                                       diseqc.data[3] = ucsw;
-                                                               }
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
-
-                                                               i++;
-                                                               if ( i < loops )
-                                                               {
-                                                                       int cmd=0;
-                                                                       if (diseqc.data[2] == 0x38 && (send_mask & 2))
-                                                                               cmd=0x39;
-                                                                       else if (diseqc.data[2] == 0x39 && (send_mask & 1))
-                                                                               cmd=0x38;
-                                                                       int tmp = m_params[DELAY_BETWEEN_DISEQC_REPEATS];
-                                                                       if (cmd)
-                                                                       {
-                                                                               int delay = diseqc_repeats ? (tmp - 54) / 2 : tmp;  // standard says 100msek between two repeated commands
-                                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, delay) );
-                                                                               diseqc.data[2]=cmd;
-                                                                               diseqc.data[3]=(cmd==0x38) ? csw : ucsw;
-                                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
-                                                                               ++i;
-                                                                               if ( i < loops )
-                                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, delay ) );
-                                                                               else
-                                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_LAST_DISEQC_CMD]) );
-                                                                       }
-                                                                       else  // delay 120msek when no command is in repeat gap
-                                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, tmp) );
-                                                               }
-                                                               else
-                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_LAST_DISEQC_CMD]) );
+                                                               int tmp=(int)round( fabs( satHourAngle ) * 10.0 );
+                                                               RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
+                                                               RotorCmd |= 0xD000;
                                                        }
-
-                                                       if ( send_mask & 8 )  // toneburst at end of sequence
+                                                       else // west
                                                        {
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SEND_TONEBURST, di_param.m_toneburst_param) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_TONEBURST]) );
+                                                               int tmp=(int)round( fabs( 360 - satHourAngle ) * 10.0 );
+                                                               RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
+                                                               RotorCmd |= 0xE000;
                                                        }
-
-                                                       if (di_param.m_seq_repeat && seq_repeat == 0)
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_BEFORE_SEQUENCE_REPEAT]) );
                                                }
+                                               eDebugNoSimulate("RotorCmd = %04x", RotorCmd);
                                        }
+                               }
 
-                                       eDebugNoSimulate("RotorCmd %02x, lastRotorCmd %02lx", RotorCmd, lastRotorCmd);
-                                       if ( RotorCmd != -1 && RotorCmd != lastRotorCmd )
+                               if ( send_mask )
+                               {
+                                       int diseqc_repeats = diseqc_mode > eDVBSatelliteDiseqcParameters::V1_0 ? di_param.m_repeats : 0;
+                                       int vlt = iDVBFrontend::voltageOff;
+                                       eSecCommand::pair compare;
+                                       compare.steps = +3;
+                                       compare.tone = iDVBFrontend::toneOff;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC]) );
+
+                                       if (diseqc13V)
+                                               vlt = iDVBFrontend::voltage13;
+                                       else if ( RotorCmd != -1 && RotorCmd != lastRotorCmd )
                                        {
-                                               eSecCommand::pair compare;
-                                               if (!send_mask && !is_unicable)
-                                               {
-                                                       compare.steps = +3;
-                                                       compare.tone = iDVBFrontend::toneOff;
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC]) );
-
-                                                       compare.voltage = iDVBFrontend::voltageOff;
-                                                       compare.steps = +4;
-                                                       // the next is a check if voltage is switched off.. then we first set a voltage :)
-                                                       // else we set voltage after all diseqc stuff..
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_NOT_VOLTAGE_GOTO, compare) );
-
-                                                       if (rotor_param.m_inputpower_parameters.m_use)
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(18)) ); // set 18V for measure input power
-                                                       else
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) ); // in normal mode start turning with 13V
-
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_MOTOR_CMD]) ); // wait 750ms when voltage was disabled
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, +9) );  // no need to send stop rotor cmd and recheck voltage
-                                               }
+                                               if (rotor_param.m_inputpower_parameters.m_use && !is_unicable)
+                                                       vlt = VOLTAGE(18);  // in input power mode set 18V for measure input power
                                                else
-                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_BETWEEN_SWITCH_AND_MOTOR_CMD]) ); // wait 700ms when diseqc changed
+                                                       vlt = VOLTAGE(13);  // in normal mode start turning with 13V
+                                       }
+                                       else
+                                               vlt = voltage;
+
+                                       // check if voltage is already correct..
+                                       compare.voltage = vlt;
+                                       compare.steps = +7;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
+
+                                       // check if voltage is disabled
+                                       compare.voltage = iDVBFrontend::voltageOff;
+                                       compare.steps = +4;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
 
+                                       // voltage is changed... use DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, vlt) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS]) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, +3) );
+
+                                       // voltage was disabled.. use DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, vlt) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS]) );
+
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_SWITCHPARMS) );
+                                       if (needDiSEqCReset)
+                                       {
                                                eDVBDiseqcCommand diseqc;
                                                memset(diseqc.data, 0, MAX_DISEQC_LENGTH);
                                                diseqc.len = 3;
                                                diseqc.data[0] = 0xE0;
-                                               diseqc.data[1] = 0x31;  // positioner
-                                               diseqc.data[2] = 0x60;  // stop
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_ROTORPOS_VALID_GOTO, +5) );
+                                               diseqc.data[1] = 0;
+                                               diseqc.data[2] = 0;
+                                               // diseqc reset
                                                sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) );
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_DISEQC_RESET_CMD]) );
+                                               diseqc.data[2] = 3;
+                                               // diseqc peripherial powersupply on
                                                sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
-                                               // wait 150msec after send rotor stop cmd
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_MOTOR_STOP_CMD]) );
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_DISEQC_PERIPHERIAL_POWERON_CMD]) );
+                                       }
 
-                                               diseqc.data[0] = 0xE0;
-                                               diseqc.data[1] = 0x31;          // positioner
-                                               if ( useGotoXX )
+                                       for (int seq_repeat = 0; seq_repeat < (di_param.m_seq_repeat?2:1); ++seq_repeat)
+                                       {
+                                               if ( send_mask & 4 )
                                                {
-                                                       diseqc.len = 5;
-                                                       diseqc.data[2] = 0x6E;  // drive to angular position
-                                                       diseqc.data[3] = ((RotorCmd & 0xFF00) / 0x100);
-                                                       diseqc.data[4] = RotorCmd & 0xFF;
+                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SEND_TONEBURST, di_param.m_toneburst_param) );
+                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_TONEBURST]) );
                                                }
-                                               else
+
+                                               int loops=0;
+
+                                               if ( send_mask & 1 )
+                                                       ++loops;
+                                               if ( send_mask & 2 )
+                                                       ++loops;
+
+                                               loops <<= diseqc_repeats;
+
+                                               for ( int i = 0; i < loops;)  // fill commands...
                                                {
+                                                       eDVBDiseqcCommand diseqc;
+                                                       memset(diseqc.data, 0, MAX_DISEQC_LENGTH);
                                                        diseqc.len = 4;
-                                                       diseqc.data[2] = 0x6B;  // goto stored sat position
-                                                       diseqc.data[3] = RotorCmd;
-                                                       diseqc.data[4] = 0x00;
-                                               }
-//                                             if(!is_unicable)
-                                               {
-                                                       int mrt = m_params[MOTOR_RUNNING_TIMEOUT]; // in seconds!
-                                                       if ( rotor_param.m_inputpower_parameters.m_use && !is_unicable)
-                                                       { // use measure rotor input power to detect rotor state
-                                                               bool turn_fast = need_turn_fast(rotor_param.m_inputpower_parameters.m_turning_speed);
-                                                               eSecCommand::rotor cmd;
-                                                               eSecCommand::pair compare;
-                                                               if (turn_fast)
-                                                                       compare.voltage = VOLTAGE(18);
-                                                               else
-                                                                       compare.voltage = VOLTAGE(13);
-                                                               compare.steps = +3;
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, compare.voltage) );
-       // measure idle power values
-                                                               compare.steps = -2;
-                                                               if (turn_fast) {
-                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) );  // wait 150msec after voltage change
-                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 1) );
-                                                                       compare.val = 1;
-                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) );
-                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) );
-                                                               }
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) );  // wait 150msec before measure
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 0) );
-                                                               compare.val = 0;
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) );
-       ////////////////////////////
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_DISEQC_RETRYS, m_params[MOTOR_COMMAND_RETRIES]) );  // 2 retries
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_ROTORPARMS) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, 40) );  // 2 seconds rotor start timout
-       // rotor start loop
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) );  // 50msec delay
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_RUNNING_INPUTPOWER) );
-                                                               cmd.direction=1;  // check for running rotor
-                                                               cmd.deltaA=rotor_param.m_inputpower_parameters.m_delta;
-                                                               cmd.steps=+5;
-                                                               cmd.okcount=0;
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_INPUTPOWER_DELTA_GOTO, cmd ) );  // check if rotor has started
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +2 ) );  // timeout .. we assume now the rotor is already at the correct position
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -4) );  // goto loop start
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_NO_MORE_ROTOR_DISEQC_RETRYS_GOTO, turn_fast ? 10 : 9 ) );  // timeout .. we assume now the rotor is already at the correct position 
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -8) );  // goto loop start
-       ////////////////////
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_MOVING) );
-                                                               if (turn_fast)
-                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(18)) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, mrt*20) );  // mrt is in seconds... our SLEEP time is 50ms.. so * 20
-       // rotor running loop
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) );  // wait 50msec
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_RUNNING_INPUTPOWER) );
-                                                               cmd.direction=0;  // check for stopped rotor
-                                                               cmd.steps=+3;
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_INPUTPOWER_DELTA_GOTO, cmd ) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +2 ) );  // timeout ? this should never happen
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -4) );  // running loop start
-       /////////////////////
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_ROTORPARAMS) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_STOPPED) );
+                                                       diseqc.data[0] = i ? 0xE1 : 0xE0;
+                                                       diseqc.data[1] = 0x10;
+                                                       if ( (send_mask & 2) && (di_param.m_command_order & 4) )
+                                                       {
+                                                               diseqc.data[2] = 0x39;
+                                                               diseqc.data[3] = ucsw;
                                                        }
-                                                       else
-                                                       {  // use normal turning mode
-                                                               if (curRotorPos != -1)
-                                                               {               
-                                                                       mrt = abs(curRotorPos - sat.orbital_position);
-                                                                       if (mrt > 1800)
-                                                                               mrt = 3600 - mrt;
-                                                                       if (mrt % 10)
-                                                                               mrt += 10; // round a little bit
-                                                                       mrt *= 2000;  // (we assume a very slow rotor with just 0.5 degree per second here)
-                                                                       mrt /= 10000;
-                                                                       mrt += 3; // a little bit overhead
+                                                       else if ( send_mask & 1 )
+                                                       {
+                                                               diseqc.data[2] = 0x38;
+                                                               diseqc.data[3] = csw;
+                                                       }
+                                                       else  // no committed command confed.. so send uncommitted..
+                                                       {
+                                                               diseqc.data[2] = 0x39;
+                                                               diseqc.data[3] = ucsw;
+                                                       }
+                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
+
+                                                       i++;
+                                                       if ( i < loops )
+                                                       {
+                                                               int cmd=0;
+                                                               if (diseqc.data[2] == 0x38 && (send_mask & 2))
+                                                                       cmd=0x39;
+                                                               else if (diseqc.data[2] == 0x39 && (send_mask & 1))
+                                                                       cmd=0x38;
+                                                               int tmp = m_params[DELAY_BETWEEN_DISEQC_REPEATS];
+                                                               if (cmd)
+                                                               {
+                                                                       int delay = diseqc_repeats ? (tmp - 54) / 2 : tmp;  // standard says 100msek between two repeated commands
+                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, delay) );
+                                                                       diseqc.data[2]=cmd;
+                                                                       diseqc.data[3]=(cmd==0x38) ? csw : ucsw;
+                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
+                                                                       ++i;
+                                                                       if ( i < loops )
+                                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, delay ) );
+                                                                       else
+                                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_LAST_DISEQC_CMD]) );
                                                                }
-                                                               doSetVoltageToneFrontend=false;
-                                                               doSetFrontend=false;
-                                                               eSecCommand::rotor cmd;
-                                                               eSecCommand::pair compare;
-                                                               compare.voltage = VOLTAGE(13);
-                                                               compare.steps = +3;
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, compare.voltage) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MOTOR_CMD]) );  // wait 150msec after voltage change
-       
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_ROTORPARMS) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_MOVING) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 1000) ); // sleep one second before change voltage or tone
-
-                                                               compare.voltage = voltage;
-                                                               compare.steps = +3;
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) ); // correct final voltage?
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 2000) );  // wait 2 second before set high voltage
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, voltage) );
-
-                                                               compare.tone = tone;
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_CONT_TONE_CHANGE]) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND, 0) );
-       
-                                                               cmd.direction=1;  // check for running rotor
-                                                               cmd.deltaA=0;
-                                                               cmd.steps = +3;
-                                                               cmd.okcount=0;
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, mrt*4) );  // mrt is in seconds... our SLEEP time is 250ms.. so * 4
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 250) );  // 250msec delay
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_TUNER_LOCKED_GOTO, cmd ) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +5 ) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -3) );  // goto loop start
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_ROTORPARAMS) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_STOPPED) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, +4) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::START_TUNE_TIMEOUT, tunetimeout) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND, 1) );
-                                                               sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -5) );
+                                                               else  // delay 120msek when no command is in repeat gap
+                                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, tmp) );
                                                        }
-                                                       eDebug("set rotor timeout to %d seconds", mrt);
-                                                       sec_fe->setData(eDVBFrontend::NEW_ROTOR_CMD, RotorCmd);
-                                                       sec_fe->setData(eDVBFrontend::NEW_ROTOR_POS, sat.orbital_position);
+                                                       else
+                                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_LAST_DISEQC_CMD]) );
                                                }
+
+                                               if ( send_mask & 8 )  // toneburst at end of sequence
+                                               {
+                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SEND_TONEBURST, di_param.m_toneburst_param) );
+                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_TONEBURST]) );
+                                               }
+
+                                               if (di_param.m_seq_repeat && seq_repeat == 0)
+                                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_BEFORE_SEQUENCE_REPEAT]) );
                                        }
                                }
                        }
@@ -880,22 +698,6 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        sec_fe->setData(eDVBFrontend::NEW_UCSW, ucsw);
                        sec_fe->setData(eDVBFrontend::NEW_TONEBURST, di_param.m_toneburst_param);
 
-                       if (doSetVoltageToneFrontend && !is_unicable)
-                       {
-                               eSecCommand::pair compare;
-                               compare.voltage = voltage;
-                               compare.steps = +3;
-                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) ); // voltage already correct ?
-                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, voltage) );
-                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_VOLTAGE_CHANGE]) );
-                               compare.tone = tone;
-                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
-                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) );
-                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_CONT_TONE_CHANGE]) );
-                       }
-
-                       sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_SWITCHPARMS) );
-
                        if(is_unicable)
                        {
                                // check if voltage is disabled
@@ -903,10 +705,10 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                compare.steps = +3;
                                compare.voltage = iDVBFrontend::voltageOff;
                                sec_sequence.push_back( eSecCommand(eSecCommand::IF_NOT_VOLTAGE_GOTO, compare) );
-                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) );
                                sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS] ) );
 
-                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage18_5) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(18)) );
                                sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
                                sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS]) );  // wait 20 ms after voltage change
        
@@ -921,9 +723,209 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
 
                                sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
                                sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_LAST_DISEQC_CMD]) );
-                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) );
+                               if ( RotorCmd != -1 && RotorCmd != lastRotorCmd && !rotor_param.m_inputpower_parameters.m_use)
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MOTOR_CMD]) );  // wait 150msec after voltage change
+                       }
+
+                       eDebugNoSimulate("RotorCmd %02x, lastRotorCmd %02lx", RotorCmd, lastRotorCmd);
+                       if ( RotorCmd != -1 && RotorCmd != lastRotorCmd )
+                       {
+                               int mrt = m_params[MOTOR_RUNNING_TIMEOUT]; // in seconds!
+                               eSecCommand::pair compare;
+                               if (!send_mask && !is_unicable)
+                               {
+                                       compare.steps = +3;
+                                       compare.tone = iDVBFrontend::toneOff;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC]) );
+
+                                       compare.voltage = iDVBFrontend::voltageOff;
+                                       compare.steps = +4;
+                                       // the next is a check if voltage is switched off.. then we first set a voltage :)
+                                       // else we set voltage after all diseqc stuff..
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_NOT_VOLTAGE_GOTO, compare) );
+
+                                       if (rotor_param.m_inputpower_parameters.m_use)
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(18)) ); // set 18V for measure input power
+                                       else
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) ); // in normal mode start turning with 13V
+
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_MOTOR_CMD]) ); // wait 750ms when voltage was disabled
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, +9) );  // no need to send stop rotor cmd and recheck voltage
+                               }
+                               else
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_BETWEEN_SWITCH_AND_MOTOR_CMD]) ); // wait 700ms when diseqc changed
+
+                               eDVBDiseqcCommand diseqc;
+                               memset(diseqc.data, 0, MAX_DISEQC_LENGTH);
+                               diseqc.len = 3;
+                               diseqc.data[0] = 0xE0;
+                               diseqc.data[1] = 0x31;  // positioner
+                               diseqc.data[2] = 0x60;  // stop
+                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_ROTORPOS_VALID_GOTO, +5) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
+                               // wait 150msec after send rotor stop cmd
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_MOTOR_STOP_CMD]) );
+
+                               diseqc.data[0] = 0xE0;
+                               diseqc.data[1] = 0x31;          // positioner
+                               if ( useGotoXX )
+                               {
+                                       diseqc.len = 5;
+                                       diseqc.data[2] = 0x6E;  // drive to angular position
+                                       diseqc.data[3] = ((RotorCmd & 0xFF00) / 0x100);
+                                       diseqc.data[4] = RotorCmd & 0xFF;
+                               }
+                               else
+                               {
+                                       diseqc.len = 4;
+                                       diseqc.data[2] = 0x6B;  // goto stored sat position
+                                       diseqc.data[3] = RotorCmd;
+                                       diseqc.data[4] = 0x00;
+                               }
+
+                       // use measure rotor input power to detect motor state
+                               if ( rotor_param.m_inputpower_parameters.m_use)
+                               {
+                                       bool turn_fast = need_turn_fast(rotor_param.m_inputpower_parameters.m_turning_speed) && !is_unicable;
+                                       eSecCommand::rotor cmd;
+                                       eSecCommand::pair compare;
+                                       if (turn_fast)
+                                               compare.voltage = VOLTAGE(18);
+                                       else
+                                               compare.voltage = VOLTAGE(13);
+                                       compare.steps = +3;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, compare.voltage) );
+                       // measure idle power values
+                                       compare.steps = -2;
+                                       if (turn_fast) {
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) );  // wait 150msec after voltage change
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 1) );
+                                               compare.val = 1;
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) );
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) );
+                                       }
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) );  // wait 150msec before measure
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 0) );
+                                       compare.val = 0;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) );
+                       ////////////////////////////
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_DISEQC_RETRYS, m_params[MOTOR_COMMAND_RETRIES]) );  // 2 retries
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_ROTORPARMS) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, 40) );  // 2 seconds rotor start timout
+                       // rotor start loop
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) );  // 50msec delay
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_RUNNING_INPUTPOWER) );
+                                       cmd.direction=1;  // check for running rotor
+                                       cmd.deltaA=rotor_param.m_inputpower_parameters.m_delta;
+                                       cmd.steps=+5;
+                                       cmd.okcount=0;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_INPUTPOWER_DELTA_GOTO, cmd ) );  // check if rotor has started
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +2 ) );  // timeout .. we assume now the rotor is already at the correct position
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -4) );  // goto loop start
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_NO_MORE_ROTOR_DISEQC_RETRYS_GOTO, turn_fast ? 10 : 9 ) );  // timeout .. we assume now the rotor is already at the correct position 
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -8) );  // goto loop start
+                       ////////////////////
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_MOVING) );
+                                       if (turn_fast)
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(18)) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, mrt*20) );  // mrt is in seconds... our SLEEP time is 50ms.. so * 20
+                       // rotor running loop
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) );  // wait 50msec
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_RUNNING_INPUTPOWER) );
+                                       cmd.direction=0;  // check for stopped rotor
+                                       cmd.steps=+3;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_INPUTPOWER_DELTA_GOTO, cmd ) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +2 ) );  // timeout ? this should never happen
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -4) );  // running loop start
+                       /////////////////////
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_ROTORPARAMS) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_STOPPED) );
+                               }
+                       // use normal motor turning mode
+                               else
+                               {
+                                       if (curRotorPos != -1)
+                                       {
+                                               mrt = abs(curRotorPos - sat.orbital_position);
+                                               if (mrt > 1800)
+                                                       mrt = 3600 - mrt;
+                                               if (mrt % 10)
+                                                       mrt += 10; // round a little bit
+                                               mrt *= 2000;  // (we assume a very slow rotor with just 0.5 degree per second here)
+                                               mrt /= 10000;
+                                               mrt += 3; // a little bit overhead
+                                       }
+                                       doSetVoltageToneFrontend=false;
+                                       doSetFrontend=false;
+                                       eSecCommand::rotor cmd;
+                                       eSecCommand::pair compare;
+                                       compare.voltage = VOLTAGE(13);
+                                       compare.steps = +3;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, compare.voltage) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MOTOR_CMD]) );  // wait 150msec after voltage change
+
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_ROTORPARMS) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_MOVING) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 1000) ); // sleep one second before change voltage or tone
+
+                                       compare.voltage = voltage;
+                                       compare.steps = +3;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) ); // correct final voltage?
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 2000) );  // wait 2 second before set high voltage
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, voltage) );
+
+                                       compare.tone = tone;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_CONT_TONE_CHANGE]) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND, 0) );
+
+                                       cmd.direction=1;  // check for running rotor
+                                       cmd.deltaA=0;
+                                       cmd.steps = +3;
+                                       cmd.okcount=0;
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, mrt*4) );  // mrt is in seconds... our SLEEP time is 250ms.. so * 4
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 250) );  // 250msec delay
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_TUNER_LOCKED_GOTO, cmd ) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +5 ) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -3) );  // goto loop start
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_ROTORPARAMS) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_STOPPED) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, +4) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::START_TUNE_TIMEOUT, tunetimeout) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND, 1) );
+                                       sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -5) );
+                                       eDebug("set rotor timeout to %d seconds", mrt);
+                               }
+                               sec_fe->setData(eDVBFrontend::NEW_ROTOR_CMD, RotorCmd);
+                               sec_fe->setData(eDVBFrontend::NEW_ROTOR_POS, sat.orbital_position);
                        }
 
+                       if (doSetVoltageToneFrontend && !is_unicable)
+                       {
+                               eSecCommand::pair compare;
+                               compare.voltage = voltage;
+                               compare.steps = +3;
+                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) ); // voltage already correct ?
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, voltage) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_VOLTAGE_CHANGE]) );
+                               compare.tone = tone;
+                               sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) );
+                               sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_CONT_TONE_CHANGE]) );
+                       }
+
+                       sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_SWITCHPARMS) );
+
                        if (doSetFrontend)
                        {
                                sec_sequence.push_back( eSecCommand(eSecCommand::START_TUNE_TIMEOUT, tunetimeout) );
index 3b6fd3e..b73f6d5 100644 (file)
@@ -6,4 +6,4 @@ install_PYTHON = \
        ConditionalShowHide.py ServicePosition.py ValueRange.py RdsInfo.py Streaming.py \
        StaticMultiList.py ServiceTime.py MovieInfo.py MenuEntryCompare.py StringListSelection.py \
        ValueBitTest.py TunerInfo.py ConfigEntryTest.py TemplatedMultiContent.py ProgressToText.py \
-       Combine.py SensorToText.py
+       Combine.py SensorToText.py ValueToPixmap.py
diff --git a/lib/python/Components/Converter/ValueToPixmap.py b/lib/python/Components/Converter/ValueToPixmap.py
new file mode 100644 (file)
index 0000000..0acd263
--- /dev/null
@@ -0,0 +1,40 @@
+from Components.Converter.Converter import Converter
+from Components.Element import cached, ElementError
+from Tools.Directories import fileExists, SCOPE_SKIN_IMAGE, SCOPE_CURRENT_SKIN, resolveFilename
+from Tools.LoadPixmap import LoadPixmap
+
+
+class ValueToPixmap(Converter, object):
+       LANGUAGE_CODE = 0
+       PATH = 1
+       
+       def __init__(self, type):
+               Converter.__init__(self, type)
+               if type == "LanguageCode":
+                       self.type = self.LANGUAGE_CODE
+               elif type == "Path":
+                       self.type = self.PATH
+               else:
+                       raise ElementError("'%s' is not <LanguageCode|Path> for ValueToPixmap converter" % type)
+
+       @cached
+       def getPixmap(self):
+               if self.source:
+                       val = self.source.text
+                       if val in (None, ""):
+                               return None
+               if self.type == self.PATH:
+                       return LoadPixmap(val)
+               if self.type == self.LANGUAGE_CODE:
+                       png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "countries/" + val[3:].lower() + ".png"))
+                       if png == None:
+                               png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "countries/missing.png"))
+                       return png
+               return None                     
+       
+       pixmap = property(getPixmap)
+
+       def changed(self, what):
+               if what[0] != self.CHANGED_SPECIFIC or what[1] == self.type:
+                       Converter.changed(self, what)
+
index d67cd55..7c6b579 100644 (file)
@@ -3,4 +3,17 @@ from Renderer import Renderer
 from enigma import ePixmap
 
 class Pixmap(Renderer):
+       def __init__(self):
+               Renderer.__init__(self)
+
        GUI_WIDGET = ePixmap
+
+       def postWidgetCreate(self, instance):
+               self.changed((self.CHANGED_DEFAULT,))
+
+       def changed(self, what):
+               if what[0] != self.CHANGED_CLEAR:
+                       if self.source and hasattr(self.source, "pixmap"):
+                               if self.instance:
+                                       self.instance.setPixmap(self.source.pixmap)
+
index 813c09f..e01c61f 100644 (file)
@@ -11,6 +11,8 @@ add_type("application/x-dream-package", ".dmpkg")
 add_type("application/x-dream-image", ".nfi")
 add_type("video/MP2T", ".ts")
 add_type("video/x-dvd-iso", ".iso")
+add_type("video/x-matroska", ".mkv")
+add_type("audio/x-matroska", ".mka")
 
 def getType(file):
        (type, _) = guess_type(file)
index 3a75540..8676923 100644 (file)
@@ -108,7 +108,6 @@ class Job(object):
                        self.tasks[i].abort()
 
        def cancel(self):
-               # some Jobs might have a better idea of how to cancel a job
                self.abort()
 
 class Task(object):
@@ -305,6 +304,7 @@ class JobManager:
                        list.append(self.active_job)
                list += self.active_jobs
                return list
+
 # some examples:
 #class PartitionExistsPostcondition:
 #      def __init__(self, device):
index acbc342..ce56f0f 100644 (file)
@@ -9,6 +9,8 @@ def InitUsageConfig():
        config.usage = ConfigSubsection();
        config.usage.showdish = ConfigYesNo(default = True)
        config.usage.multibouquet = ConfigYesNo(default = False)
+       config.usage.multiepg_ask_bouquet = ConfigYesNo(default = False)
+
        config.usage.quickzap_bouquet_change = ConfigYesNo(default = False)
        config.usage.e1like_radio_mode = ConfigYesNo(default = False)
        config.usage.infobar_timeout = ConfigSelection(default = "5", choices = [
index bcc7b9b..af14578 100644 (file)
@@ -1,8 +1,9 @@
 from Plugins.Plugin import PluginDescriptor
 from GraphMultiEpg import GraphMultiEPG
-from Screens.ChannelSelection import BouquetSelector
+from Screens.ChannelSelection import BouquetSelector, SilentBouquetSelector
 from enigma import eServiceCenter, eServiceReference
 from ServiceReference import ServiceReference
+from Components.config import config
 
 Session = None
 Servicelist = None
@@ -73,6 +74,32 @@ def changeBouquetCB(direction, epg):
                        epg_bouquet = bouquet
                        epg.setServices(services)
 
+def openAskBouquet(Session, bouquets, cnt):
+       if cnt > 1: # show bouquet list
+               global bouquetSel
+               bouquetSel = Session.openWithCallback(closed, BouquetSelector, bouquets, openBouquetEPG, enableWrapAround=True)
+               dlg_stack.append(bouquetSel)
+       elif cnt == 1:
+               if not openBouquetEPG(bouquets[0][1]):
+                       cleanup()
+
+def openSilent(Servicelist, bouquets, cnt):
+       root = Servicelist.getRoot()
+       if cnt > 1: # create bouquet list
+               global bouquetSel
+               current = 0
+               rootstr = root.toCompareString()
+               for bouquet in bouquets:
+                       if bouquet[1].toCompareString() == rootstr:
+                               break
+                       current += 1
+               if current >= cnt:
+                       current = 0
+               bouquetSel = SilentBouquetSelector(bouquets, True, current)
+       if cnt >= 1: # open current bouquet
+               if not openBouquetEPG(root):
+                       cleanup()
+
 def main(session, servicelist, **kwargs):
        global Session
        Session = session
@@ -83,13 +110,10 @@ def main(session, servicelist, **kwargs):
                cnt = 0
        else:
                cnt = len(bouquets)
-       if cnt > 1: # show bouquet list
-               global bouquetSel
-               bouquetSel = Session.openWithCallback(closed, BouquetSelector, bouquets, openBouquetEPG, enableWrapAround=True)
-               dlg_stack.append(bouquetSel)
-       elif cnt == 1:
-               if not openBouquetEPG(bouquets[0][1]):
-                       cleanup()
+       if config.usage.multiepg_ask_bouquet.value:
+               openAskBouquet(session, bouquets, cnt)
+       else:
+               openSilent(servicelist, bouquets, cnt)
 
 def Plugins(**kwargs):
        name = _("Graphical Multi EPG")
index 84cbbcb..21b214a 100644 (file)
@@ -50,12 +50,12 @@ IOC_TYPESHIFT = (IOC_NRSHIFT+IOC_NRBITS)
 BLKRRPART = ((0x12<<IOC_TYPESHIFT) | (95<<IOC_NRSHIFT))
 
 def autostart(reason, **kwargs):
+       global bdpoll
        if reason == 0:
                print "starting hotplug handler"
 
                if fileExists('/dev/.udev'):
                        global netlink
-                       global bdpoll
                        from enigma import eSocketNotifier, eTimer, ePythonMessagePump
                        import socket
                        from select import POLLIN, POLLPRI
@@ -295,6 +295,12 @@ def autostart(reason, **kwargs):
                        factory = Factory()
                        factory.protocol = Hotplug
                        reactor.listenUNIX("/tmp/hotplug.socket", factory)
+       else:
+               if bdpoll:
+                       bdpoll.running = False
+                       bdpoll.timeout() # XXX: I assume the timer is shut down before it executes again, so release the semaphore manually
+                       bdpoll.join()
+               bdpoll = None
 
 def Plugins(**kwargs):
        return PluginDescriptor(name = "Hotplug", description = "listens to hotplug events", where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart)
index bfe28b4..c7c143f 100755 (executable)
@@ -267,7 +267,7 @@ class RestoreMenu(Screen):
                        self.sel = self["filelist"].getCurrent()
                        if self.sel:
                                self.val = self.path + "/" + self.sel
-                               self.session.openWithCallback(self.startDelete, MessageBox, _("Are you sure you want to delete\nfollowing backup:\n" + self.sel ))
+                               self.session.openWithCallback(self.startDelete, MessageBox, _("Are you sure you want to delete\nfollowing backup:\n") + self.sel)
 
        def startDelete(self, ret = False):
                if (ret == True):
index 4c68962..a5e09c0 100644 (file)
@@ -1,6 +1,6 @@
 from Screen import Screen
 from Components.ServiceEventTracker import ServiceEventTracker
-from Components.ActionMap import ActionMap
+from Components.ActionMap import NumberActionMap
 from Components.ConfigList import ConfigListScreen
 from Components.ChoiceList import ChoiceList, ChoiceEntryComponent
 from Components.config import config, ConfigSubsection, getConfigListEntry, ConfigNothing, ConfigSelection, ConfigOnOff
@@ -36,7 +36,7 @@ class AudioSelection(Screen, ConfigListScreen):
                self.cached_subtitle_checked = False
                self.__selected_subtitle = None
         
-               self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"],
+               self["actions"] = NumberActionMap(["ColorActions", "SetupActions", "DirectionActions"],
                {
                        "red": self.keyRed,
                        "green": self.keyGreen,
@@ -46,6 +46,15 @@ class AudioSelection(Screen, ConfigListScreen):
                        "cancel": self.cancel,
                        "up": self.keyUp,
                        "down": self.keyDown,
+                       "1": self.keyNumberGlobal,
+                       "2": self.keyNumberGlobal,
+                       "3": self.keyNumberGlobal,
+                       "4": self.keyNumberGlobal,
+                       "5": self.keyNumberGlobal,
+                       "6": self.keyNumberGlobal,
+                       "7": self.keyNumberGlobal,
+                       "8": self.keyNumberGlobal,
+                       "9": self.keyNumberGlobal,
                }, -2)
 
                self.settings = ConfigSubsection()
@@ -87,7 +96,7 @@ class AudioSelection(Screen, ConfigListScreen):
                                        self["key_green"].setBoolean(False)
                                selectedAudio = self.audioTracks.getCurrentTrack()
                                for x in range(n):
-                                       number = str(x)
+                                       number = str(x + 1)
                                        i = audio.getTrackInfo(x)
                                        languages = i.getLanguage().split('/')
                                        description = i.getDescription() or _("<unknown>")
@@ -289,11 +298,16 @@ class AudioSelection(Screen, ConfigListScreen):
                elif self.focus == FOCUS_STREAMS:
                        self["streams"].selectNext()
 
+       def keyNumberGlobal(self, number):
+               if number <= len(self["streams"].list):
+                       self["streams"].setIndex(number-1)
+                       self.keyOk()
+
        def keyOk(self):
                if self.focus == FOCUS_STREAMS and self["streams"].list:
                        cur = self["streams"].getCurrent()
                        if self.settings.menupage.getValue() == PAGE_AUDIO and cur[0] is not None:
-                               self.changeAudio(cur[2])
+                               self.changeAudio(cur[0])
                                self.__updatedInfo()
                        if self.settings.menupage.getValue() == PAGE_SUBTITLES and cur[0] is not None:
                                if self.infobar.selected_subtitle == cur[0]:
index c07e349..912d678 100644 (file)
@@ -65,6 +65,24 @@ class BouquetSelector(Screen):
        def cancelClick(self):
                self.close(False)
 
+class SilentBouquetSelector:
+       def __init__(self, bouquets, enableWrapAround=False, current=0):
+               self.bouquets = [b[1] for b in bouquets]
+               self.pos = current
+               self.count = len(bouquets)
+               self.enableWrapAround = enableWrapAround
+
+       def up(self):
+               if self.pos > 0 or self.enableWrapAround:
+                       self.pos = (self.pos - 1) % self.count
+
+       def down(self):
+               if self.pos < (self.count - 1) or self.enableWrapAround:
+                       self.pos = (self.pos + 1) % self.count
+
+       def getCurrent(self):
+               return self.bouquets[self.pos]
+
 # csel.bouquet_mark_edit values
 OFF = 0
 EDIT_BOUQUET = 1
index 2e97b59..93a4788 100644 (file)
@@ -1,4 +1,4 @@
-from ChannelSelection import ChannelSelection, BouquetSelector
+from ChannelSelection import ChannelSelection, BouquetSelector, SilentBouquetSelector
 
 from Components.ActionMap import ActionMap, HelpableActionMap
 from Components.ActionMap import NumberActionMap
@@ -559,6 +559,12 @@ class InfoBarEPG:
                        cnt = 0
                else:
                        cnt = len(bouquets)
+               if config.usage.multiepg_ask_bouquet.value:
+                       self.openMultiServiceEPGAskBouquet(bouquets, cnt, withCallback)
+               else:
+                       self.openMultiServiceEPGSilent(bouquets, cnt, withCallback)
+
+       def openMultiServiceEPGAskBouquet(self, bouquets, cnt, withCallback):
                if cnt > 1: # show bouquet list
                        if withCallback:
                                self.bouquetSel = self.session.openWithCallback(self.closed, BouquetSelector, bouquets, self.openBouquetEPG, enableWrapAround=True)
@@ -568,6 +574,21 @@ class InfoBarEPG:
                elif cnt == 1:
                        self.openBouquetEPG(bouquets[0][1], withCallback)
 
+       def openMultiServiceEPGSilent(self, bouquets, cnt, withCallback):
+               root = self.servicelist.getRoot()
+               rootstr = root.toCompareString()
+               current = 0
+               for bouquet in bouquets:
+                       if bouquet[1].toCompareString() == rootstr:
+                               break
+                       current += 1
+               if current >= cnt:
+                       current = 0
+               if cnt > 1: # create bouquet list for bouq+/-
+                       self.bouquetSel = SilentBouquetSelector(bouquets, True, self.servicelist.getBouquetNumOffset(root))
+               if cnt >= 1:
+                       self.openBouquetEPG(root, withCallback)
+
        def changeServiceCB(self, direction, epg):
                if self.serviceSel:
                        if direction > 0:
index 660fb27..5dd744f 100644 (file)
@@ -2,6 +2,7 @@ from Screen import Screen
 from Components.ConfigList import ConfigListScreen
 from Components.config import config, ConfigSubsection, ConfigSelection, getConfigListEntry
 from Components.SystemInfo import SystemInfo
+from Components.Task import job_manager
 from InfoBarGenerics import InfoBarNotifications
 import Screens.Standby
 from Tools import Notifications
@@ -108,10 +109,13 @@ class JobView(InfoBarNotifications, Screen, ConfigListScreen):
                        self.close(False)
 
        def abort(self):
-               if self.job.status in (self.job.FINISHED, self.job.FAILED):
+               if self.job.status == self.job.NOT_STARTED:
+                       job_manager.active_jobs.remove(self.job)
                        self.close(False)
-               if self["cancelable"].boolean == True:
+               elif self.job.status == self.job.IN_PROGRESS and self["cancelable"].boolean == True:
                        self.job.cancel()
+               else:
+                       self.close(False)
 
        def performAfterEvent(self):
                self["config"].hide()
index 7846e4b..c0d0c10 100755 (executable)
@@ -1,12 +1,13 @@
-# -*- coding: iso-8859-1 -*-
+# -*- coding: UTF-8 -*-
+from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_CENTER, RT_VALIGN_CENTER, getPrevAsciiCode
+from Screen import Screen
 from Components.Language import language
 from Components.ActionMap import ActionMap
+from Components.Sources.StaticText import StaticText
 from Components.Label import Label
 from Components.Pixmap import Pixmap
 from Components.MenuList import MenuList
 from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
-from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_CENTER, RT_VALIGN_CENTER
-from Screen import Screen
 from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN
 from Tools.LoadPixmap import LoadPixmap
 
@@ -86,52 +87,127 @@ class VirtualKeyBoard(Screen):
                self.keys_list = []
                self.shiftkeys_list = []
                self.lang = language.getLanguage()
+               self.nextLang = None
+               self.shiftMode = False
+               self.text = text
+               self.selectedKey = 0
+               
+               self["country"] = StaticText("")
+               self["header"] = Label(title)
+               self["text"] = Label(self.text)
+               self["list"] = VirtualKeyBoardList([])
+               
+               self["actions"] = ActionMap(["OkCancelActions", "WizardActions", "ColorActions", "KeyboardInputActions", "InputBoxActions", "InputAsciiActions"],
+                       {
+                               "gotAsciiCode": self.keyGotAscii,
+                               "ok": self.okClicked,
+                               "cancel": self.exit,
+                               "left": self.left,
+                               "right": self.right,
+                               "up": self.up,
+                               "down": self.down,
+                               "red": self.backClicked,
+                               "green": self.ok,
+                               "yellow": self.switchLang,
+                               "deleteBackward": self.backClicked,
+                               "back": self.exit                               
+                       }, -2)
+               self.setLang()
+               self.onExecBegin.append(self.setKeyboardModeAscii)
+               self.onLayoutFinish.append(self.buildVirtualKeyBoard)
+       
+       def switchLang(self):
+               self.lang = self.nextLang
+               self.setLang()
+               self.buildVirtualKeyBoard()
+
+       def setLang(self):
                if self.lang == 'de_DE':
                        self.keys_list = [
                                [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"],
-                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"ü", u"+"],
-                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ö", u"ä", u"#"],
+                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"ü", u"+"],
+                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ö", u"ä", u"#"],
                                [u"<", u"y", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"-", u"CLEAR"],
-                               [u"SHIFT", u"SPACE", u"@", u"ß", u"OK"]]
-                       
+                               [u"SHIFT", u"SPACE", u"@", u"ß", u"OK"]]
                        self.shiftkeys_list = [
-                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
-                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"Ü", u"*"],
-                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"Ö", u"Ä", u"'"],
+                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
+                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"Ü", u"*"],
+                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"Ö", u"Ä", u"'"],
                                [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"],
                                [u"SHIFT", u"SPACE", u"?", u"\\", u"OK"]]
-                       
+                       self.nextLang = 'es_ES'
                elif self.lang == 'es_ES':
-                       #still missing keys (u"ùÙ")
+                       #still missing keys (u"ùÙ")
                        self.keys_list = [
                                [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"],
-                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"ú", u"+"],
-                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ó", u"á", u"#"],
+                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"ú", u"+"],
+                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ó", u"á", u"#"],
                                [u"<", u"y", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"-", u"CLEAR"],
-                               [u"SHIFT", u"SPACE", u"@", u"£", u"à", u"é", u"è", u"í", u"ì", u"ñ", u"ò", u"OK"]]
-                       
+                               [u"SHIFT", u"SPACE", u"@", u"Ł", u"ŕ", u"é", u"č", u"í", u"ě", u"ń", u"ň", u"OK"]]
                        self.shiftkeys_list = [
-                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
-                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"Ú", u"*"],
-                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"Ó", u"Á", u"'"],
+                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
+                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"Ú", u"*"],
+                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"Ó", u"Á", u"'"],
                                [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"],
-                               [u"SHIFT", u"SPACE", u"?", u"\\", u"À", u"É", u"È",  u"Í", u"Ì", u"Ñ", u"Ò", u"OK"]]
-                               
-               elif self.lang in ('sv_SE', 'fi_FI'):
+                               [u"SHIFT", u"SPACE", u"?", u"\\", u"Ŕ", u"É", u"Č", u"Í", u"Ě", u"Ń", u"Ň", u"OK"]]
+                       self.nextLang = 'fi_FI'
+               elif self.lang == 'fi_FI':
                        self.keys_list = [
                                [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"],
-                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"é", u"+"],
-                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ö", u"ä", u"#"],
+                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"é", u"+"],
+                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ö", u"ä", u"#"],
                                [u"<", u"y", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"-", u"CLEAR"],
-                               [u"SHIFT", u"SPACE", u"@", u"ß", u"å", u"OK"]]
-                               
+                               [u"SHIFT", u"SPACE", u"@", u"ß", u"ĺ", u"OK"]]
                        self.shiftkeys_list = [
-                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
-                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"É", u"*"],
-                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"Ö", u"Ä", u"'"],
+                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
+                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"É", u"*"],
+                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"Ö", u"Ä", u"'"],
                                [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"],
-
-                               [u"SHIFT", u"SPACE", u"?", u"\\", u"Å", u"OK"]]
+                               [u"SHIFT", u"SPACE", u"?", u"\\", u"Ĺ", u"OK"]]
+                       self.nextLang = 'sv_SE'
+               elif self.lang == 'sv_SE':
+                       self.keys_list = [
+                               [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"],
+                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"é", u"+"],
+                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ö", u"ä", u"#"],
+                               [u"<", u"y", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"-", u"CLEAR"],
+                               [u"SHIFT", u"SPACE", u"@", u"ß", u"ĺ", u"OK"]]
+                       self.shiftkeys_list = [
+                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
+                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"É", u"*"],
+                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"Ö", u"Ä", u"'"],
+                               [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"],
+                               [u"SHIFT", u"SPACE", u"?", u"\\", u"Ĺ", u"OK"]]
+                       self.nextLang = 'sk_SK'
+               elif self.lang =='sk_SK':
+                       self.keys_list = [
+                               [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"],
+                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"ú", u"+"],
+                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ľ", u"@", u"#"],
+                               [u"<", u"y", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"-", u"CLEAR"],
+                               [u"SHIFT", u"SPACE", u"š", u"č", u"ž", u"ý", u"á", u"í", u"é", u"OK"]]
+                       self.shiftkeys_list = [
+                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
+                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"ť", u"*"],
+                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"ň", u"ď", u"'"],
+                               [u"Á", u"É", u"Ď", u"Í", u"Ý", u"Ó", u"Ú", u"Ž", u"Š", u"Č", u"Ť", u"Ň"],
+                               [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"],
+                               [u"SHIFT", u"SPACE", u"?", u"\\", u"ä", u"ö", u"ü", u"ô", u"ŕ", u"ĺ", u"OK"]]
+                       self.nextLang = 'cs_CZ'
+               elif self.lang == 'cs_CZ':
+                       self.keys_list = [
+                               [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"],
+                               [u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"ú", u"+"],
+                               [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"ů", u"@", u"#"],
+                               [u"<", u"y", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"-", u"CLEAR"],
+                               [u"SHIFT", u"SPACE", u"ě", u"š", u"č", u"ř", u"ž", u"ý", u"á", u"í", u"é", u"OK"]]
+                       self.shiftkeys_list = [
+                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
+                               [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"ť", u"*"],
+                               [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"ň", u"ď", u"'"],
+                               [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"],
+                               [u"SHIFT", u"SPACE", u"?", u"\\", u"Č", u"Ř", u"Š", u"Ž", u"Ú", u"Á", u"É", u"OK"]]
+                       self.nextLang = 'en_EN'
                else:
                        self.keys_list = [
                                [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"],
@@ -139,36 +215,15 @@ class VirtualKeyBoard(Screen):
                                [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u"#", u"\\"],
                                [u"<", u"y", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"-", u"CLEAR"],
                                [u"SHIFT", u"SPACE", u"OK"]]
-                       
                        self.shiftkeys_list = [
-                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
+                               [u"EXIT", u"!", u'"', u"§", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"],
                                [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"*"],
                                [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"'", u"?"],
                                [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"],
                                [u"SHIFT", u"SPACE", u"OK"]]
-               
-               self.shiftMode = False
-               self.text = text
-               self.selectedKey = 0
-               
-               self["header"] = Label(title)
-               self["text"] = Label(self.text)
-               self["list"] = VirtualKeyBoardList([])
-               
-               self["actions"] = ActionMap(["OkCancelActions", "WizardActions", "ColorActions"],
-                       {
-                               "ok": self.okClicked,
-                               "cancel": self.exit,
-                               "left": self.left,
-                               "right": self.right,
-                               "up": self.up,
-                               "down": self.down,
-                               "red": self.backClicked,
-                               "green": self.ok
-                       }, -2)
-               
-               self.onLayoutFinish.append(self.buildVirtualKeyBoard)
-       
+                       self.lang = 'en_EN'
+                       self.nextLang = 'de_DE'         
+               self["country"].setText(self.lang)
                self.max_key=47+len(self.keys_list[4])
 
        def buildVirtualKeyBoard(self, selectedKey=0):
@@ -192,7 +247,6 @@ class VirtualKeyBoard(Screen):
                                selectedKey -= 12
                
                self["list"].setList(list)
-
        
        def backClicked(self):
                self.text = self["text"].getText()[:-1]
@@ -219,7 +273,7 @@ class VirtualKeyBoard(Screen):
                if text is None:
                        return
 
-               text = text.encode("utf-8")
+               text = text.encode("UTF-8")
 
                if text == "EXIT":
                        self.close(None)
@@ -312,3 +366,30 @@ class VirtualKeyBoard(Screen):
 
        def showActiveKey(self):
                self.buildVirtualKeyBoard(self.selectedKey)
+
+       def inShiftKeyList(self,key):
+               for KeyList in self.shiftkeys_list:
+                       for char in KeyList:
+                               if char == key:
+                                       return True
+               return False
+
+       def keyGotAscii(self):
+               char = str(unichr(getPrevAsciiCode()).encode('utf-8'))
+               if self.inShiftKeyList(char):
+                       self.shiftMode = True
+                       list = self.shiftkeys_list
+               else:
+                       self.shiftMode = False
+                       list = self.keys_list   
+
+               selkey = 0
+               for keylist in list:
+                       for key in keylist:
+                               if key == char:
+                                       self.selectedKey = selkey
+                                       self.okClicked()
+                                       self.showActiveKey()
+                                       return
+                               else:
+                                       selkey += 1
index 63a58ea..252e174 100644 (file)
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- coding: UTF-8 -*-
 from enigma import eTimer
 from Components.Language import language
 
@@ -63,6 +63,17 @@ class NumericalTextInput:
                        self.mapping.append (u"pqrs7PQRS") # 7
                        self.mapping.append (u"tuv8TUV") # 8
                        self.mapping.append (u"wxyz9WXYZ") # 9
+               elif self.lang in ('cs_CZ', 'sk_SK'):
+                       self.mapping.append (u"0,?'+\"()@$!=&*") # 0
+                       self.mapping.append (u" 1.:/-_") # 1
+                       self.mapping.append (u"abc2áäčABCÁÄČ") # 2
+                       self.mapping.append (u"def3ďéěDEFĎÉĚ") # 3
+                       self.mapping.append (u"ghi4íGHIÍ") # 4
+                       self.mapping.append (u"jkl5ľĺJKLĽĹ") # 5
+                       self.mapping.append (u"mno6ňóöôMNOŇÓÖÔ") # 6
+                       self.mapping.append (u"pqrs7řŕšPQRSŘŔŠ") # 7
+                       self.mapping.append (u"tuv8ťúůüTUVŤÚŮÜ") # 8
+                       self.mapping.append (u"wxyz9ýžWXYZÝŽ") # 9
                else:
                        self.mapping.append (u"0,?!&@=*'+\"()$~") # 0
                        self.mapping.append (u" 1.:/-_") # 1
@@ -76,7 +87,8 @@ class NumericalTextInput:
                        self.mapping.append (u"wxyz9WXYZ") # 9
 
        def setUseableChars(self, useable):
-               self.useableChars = useable
+               self.useableChars = unicode(useable)
+               
 
        def getKey(self, num):
                cnt=0
index be55d0c..937032a 100644 (file)
@@ -284,7 +284,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref)
                m_sourceinfo.containertype = ctVCD;
                m_sourceinfo.is_video = TRUE;
        }
-       if ( (strncmp(filename, "http://", 7)) == 0 || (strncmp(filename, "udp://", 6)) == 0 || (strncmp(filename, "rtp://", 6)) == 0  || (strncmp(filename, "https://", 8)) == 0 || (strncmp(filename, "mms://", 6)) == 0 || (strncmp(filename, "rtsp://", 7)) == 0 || (strncmp(filename, "rtspt://", 7)) == 0 )
+       if ( strstr(filename, "://") )
                m_sourceinfo.is_streaming = TRUE;
 
        gchar *uri;