Ignore:
Timestamp:
09/19/16 13:47:26 (7 years ago)
Author:
obi
Message:

screenrestoredefault_without_channelsettings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/restoredefault.h

    r35859 r38905  
    1616                if(tmpstr != NULL)
    1717                {
     18                        system(tmpstr);
     19                        textbox(_("Message"), _("Receiver reboots now !!!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 7, 0);
     20                        oshutdown(2, 2);;
     21                }
     22                else
     23                        textbox(_("Message"), _("Can't restore settings"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 7, 0);
     24        }
     25        clearscreen(load);
     26}
     27
     28void screenrestoredefault_without_channelsettings()
     29{
     30        int ret = 0;
     31        char* tmpstr = NULL;
     32        struct skin* load = getscreen("loading");
     33
     34        ret = textbox(_("Message"), _("Really restore default settings without Channelsettings ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
     35
     36        if(ret == 1)
     37        {
     38                drawscreen(load, 0, 0);
     39                tmpstr = getconfig("restorecmd", NULL);
     40                if(tmpstr != NULL)
     41                {
     42                        tmpstr = ostrcat(tmpstr, " without_channelsettings", 1, 0);
     43                        printf("cmd: %s\n", tmpstr);
    1844                        system(tmpstr);
    1945                        textbox(_("Message"), _("Receiver reboots now !!!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 7, 0);
     
    6288
    6389        addmenulist(&mlist, "Restore default settings", _("Restore default settings"), NULL, 0, 0);
     90        addmenulist(&mlist, "Restore default without Channelsettings", _("Restore default without Channelsettings"), NULL, 0, 0);
    6491        addmenulist(&mlist, "Format MNT with Backup/Restore", _("Format MNT with Backup/Restore"), NULL, 0, 0);
    6592        addmenulist(&mlist, "Format MNT (all)", _("Format MNT (all)"), NULL, 0, 0);
     
    7299                {
    73100                        screenrestoredefault();
     101                }
     102                else if(ostrcmp(mbox->name, "Restore default without Channelsettings") == 0)
     103                {
     104                        screenrestoredefault_without_channelsettings();
    74105                }
    75106                else if(ostrcmp(mbox->name, "Format MNT with Backup/Restore") == 0)
Note: See TracChangeset for help on using the changeset viewer.