Changeset 36275


Ignore:
Timestamp:
11/21/15 16:19:31 (7 years ago)
Author:
obi
Message:

optimize create auto transponder syntax

Location:
titan/titan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r36264 r36275  
    66996699
    67006700//      free(tmpstr), tmpstr = NULL;
    6701         if(textbox(_("Message"), _("Transponder/Satellite Convert done, please use channel search on next Boot.\nYour System will reboot !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0) == 1)
    6702         {       
    6703                 //write only config file
    6704                 system("sync");
    6705                 writeallconfig(3);
    6706                 oshutdown(2,2);
    6707                 system("init 6");
    6708         }
     6701        textbox(_("Message"), _("Transponder/Satellite Convert done, please use channel search.\n\nTitan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 800, 200, 0, 0);
     6702        //sync usb
     6703        system("sync");
     6704        //enable autoscan after guirestart
     6705        addconfig("autoscan", "1");
     6706        //write only config file
     6707        writeallconfig(3);
     6708        //gui restart and write no config
     6709        oshutdown(3, 2);
    67096710}
    67106711
     
    68966897                                line = ostrcat(line, "#", 1, 0);
    68976898
    6898 // not needed
    6899 //                              if(checkbox("UFS910") == 1)
    6900 //                                      line = ostrcat(line, "1", 1, 0); //pilot
    6901 //                              else
     6899                                if(checkbox("UFS910") == 1)
     6900                                        line = ostrcat(line, "1", 1, 0); //pilot
     6901                                else
    69026902                                        line = ostrcat(line, "2", 1, 0); //pilot
    69036903                                line = ostrcat(line, "#", 1, 0);
    69046904
    6905 //                              if(checkbox("UFS910") == 1)
    6906 //                                      line = ostrcat(line, "0", 1, 0); //rolloff
    6907 //                              else
     6905                                if(checkbox("UFS910") == 1)
     6906                                        line = ostrcat(line, "0", 1, 0); //rolloff
     6907                                else
    69086908                                        line = ostrcat(line, "3", 1, 0); //rolloff
    69096909                                line = ostrcat(line, "#", 1, 0);
     
    69556955}
    69566956
    6957 void createfav()
    6958 {
    6959         struct skin* load = getscreen("loading");
    6960         drawscreen(load, 0, 0);
    6961 
    6962         system("rm -rf /mnt/settings/bouquets*");
    6963         system("cp -a /etc/titan.restore/mnt/settings/bouquets* /mnt/settings");
    6964 
    6965         if(textbox(_("Message"), _("Standard favorites have been successfully applied.\nYour System will reboot !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0) == 1)
    6966         {
    6967                 //write only config file
    6968                 system("sync");
    6969                 writeallconfig(3);
    6970                 oshutdown(2,2);
    6971                 system("init 6");
    6972         }
    6973 }
    6974 
    69756957char* system_infos(int mode)
    69766958{
     
    72217203        if(textbox(_("Message"), _("Start Restore Default Bouquets ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1)
    72227204        {
     7205                struct skin* load = getscreen("loading");
     7206                drawscreen(load, 0, 0);
     7207       
    72237208                system("rm -f /mnt/settings/bouquets.* > /dev/null 2>&1");
    7224                 system("cp -a /etc/titan.restore/mnt/settings/bouquets.cfg /mnt/settings/bouquets.cfg > /dev/null 2>&1");
    7225                 system("cp -a /etc/titan.restore/mnt/settings/bouquets.*.tv /mnt/settings > /dev/null 2>&1");
    7226                 system("cp -a /etc/titan.restore/mnt/settings/bouquets.*.radio /mnt/settings > /dev/null 2>&1");
     7209                system("cp -a /etc/titan.restore/mnt/settings/bouquets* /mnt/settings > /dev/null 2>&1");
     7210
    72277211                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
    7228                 oshutdown(3, 0);
     7212                //sync usb
     7213                system("sync");
     7214                //write only config file
     7215                writeallconfig(3);
     7216                //gui restart and write no config
     7217                oshutdown(3, 2);
    72297218        }
    72307219}
     
    72347223        if(textbox(_("Message"), _("Start Restore Default Channel Settings ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1)
    72357224        {
     7225                struct skin* load = getscreen("loading");
     7226                drawscreen(load, 0, 0);
     7227       
    72367228                system("rm -rf /mnt/settings/* > /dev/null 2>&1");
    72377229                system("cp -a /etc/titan.restore/mnt/settings/* /mnt/settings > /dev/null 2>&1");
     7230
    72387231                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
    7239                 oshutdown(3, 0);
     7232                //sync usb
     7233                system("sync");
     7234                //write only config file
     7235                writeallconfig(3);
     7236                //gui restart and write no config
     7237                oshutdown(3, 2);
    72407238        }
    72417239}
     
    72457243        if(textbox(_("Message"), _("Start Restore Default Providers ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1)
    72467244        {
     7245                struct skin* load = getscreen("loading");
     7246                drawscreen(load, 0, 0);
     7247       
    72477248                system("rm -f /mnt/settings/provider > /dev/null 2>&1");
    72487249                system("cp -a /etc/titan.restore/mnt/settings/provider /mnt/settings > /dev/null 2>&1");
     7250
    72497251                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
    7250                 oshutdown(3, 0);
     7252                //sync usb
     7253                system("sync");
     7254                //write only config file
     7255                writeallconfig(3);
     7256                //gui restart and write no config
     7257                oshutdown(3, 2);
    72517258        }
    72527259}
     
    72567263        if(textbox(_("Message"), _("Start Restore Default Channels ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1)
    72577264        {
     7265                struct skin* load = getscreen("loading");
     7266                drawscreen(load, 0, 0);
     7267       
    72587268                system("rm -f /mnt/settings/channel > /dev/null 2>&1");
    72597269                system("cp -a /etc/titan.restore/mnt/settings/channel /mnt/settings > /dev/null 2>&1");
     7270
    72607271                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
    7261                 oshutdown(3, 0);
     7272                //sync usb
     7273                system("sync");
     7274                //write only config file
     7275                writeallconfig(3);
     7276                //gui restart and write no config
     7277                oshutdown(3, 2);
    72627278        }
    72637279}
     
    72677283        if(textbox(_("Message"), _("Start Restore Default Sats ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1)
    72687284        {
     7285                struct skin* load = getscreen("loading");
     7286                drawscreen(load, 0, 0);
     7287       
    72697288                system("rm -f /mnt/settings/satellites > /dev/null 2>&1");
    72707289                system("cp -a /etc/titan.restore/mnt/settings/satellites /mnt/settings > /dev/null 2>&1");
     7290
    72717291                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
    7272                 oshutdown(3, 0);
     7292                //sync usb
     7293                system("sync");
     7294                //write only config file
     7295                writeallconfig(3);
     7296                //gui restart and write no config
     7297                oshutdown(3, 2);
    72737298        }
    72747299}
  • titan/titan/menu.h

    r34228 r36275  
    692692        {
    693693                if(check == 1) return 0;
    694                 createfav();
     694                setdefaultbouquets();
    695695        }
    696696        else if(ostrcmp("autosearch", menuentry->name) == 0)
  • titan/titan/titan.c

    r36025 r36275  
    10091009                }
    10101010        }
    1011                        
     1011
     1012        if(getconfigint("autoscan", NULL) == 1)
     1013        {
     1014                status.updatevfd = PAUSE;
     1015                resettvpic();
     1016                screenscanconfig(1);
     1017                resettvpic();
     1018                writevfd("");
     1019                status.updatevfd = START;
     1020                drawscreen(skin, 0, 0);
     1021                addconfig("autoscan", "0");
     1022        }
     1023               
    10121024        //first wizzard
    10131025        if(getconfigint("nofirstwizzard", NULL) < 2)
Note: See TracChangeset for help on using the changeset viewer.