Changeset 24209


Ignore:
Timestamp:
10/12/13 00:33:05 (9 years ago)
Author:
obi
Message:

[titan] update autoscan remove textbox add addchoicebox is better for handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/scan.h

    r24167 r24209  
    13931393}
    13941394
    1395 void screenscan(struct transponder* transpondernode, struct skin* mscan, char* tuner, int scantype, int orbitalpos, unsigned int frequency, int inversion, unsigned int symbolrate, int polarization, int fec, int modulation, int rolloff, int pilot, int networkscan, int onlyfree, int clear, int blindscan, int ichangename, int system, int timeout)
     1395void screenscan(struct transponder* transpondernode, struct skin* mscan, char* tuner, int scantype, int orbitalpos, unsigned int frequency, int inversion, unsigned int symbolrate, int polarization, int fec, int modulation, int rolloff, int pilot, int networkscan, int onlyfree, int clear, int blindscan, int ichangename, int delunusedfav, int system, int favtype, int timeout)
    13961396{
    13971397        int rcret = 0, tpmax = 0, i = 0, alladded = 0;
     
    16571657                        pnode = pnode->next;
    16581658                }
    1659                 */
    1660                
     1659       
    16611660                rcret = textbox(_("Message"), _("Bouquet\n\nRenew Bouquet = Red\nDelete all Bouquet = Green\nProvider to Bouquet = Yellow"), _("EXIT"), getrcconfigint("rcexit", NULL), _("RENEW"), getrcconfigint("rcred", NULL), _("DELETE"), getrcconfigint("rcgreen", NULL), _("NEW"), getrcconfigint("rcyellow", NULL), 600, 400, 0, 0);
    16621661                if(rcret == 2)
    16631662                        delunusedbouquetchannels(0);
     1663
    16641664                else if(rcret == 3)
    16651665                        freemainbouquet(1);
     
    16781678                        delunusedbouquetchannels(1);
    16791679               
    1680                 /*
    16811680                if(textbox(_("Message"), _("Do you want to delete all unused Bouquetentrys?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1)
    16821681                        delunusedbouquetchannels(0);
     
    16841683                        delunusedbouquetchannels(1);
    16851684                */
     1685
     1686                if(favtype == 0)
     1687                        delunusedbouquetchannels(0);
     1688                else if(favtype == 1)
     1689                        delunusedbouquetchannels(1);
     1690                else if(favtype == 2)
     1691                {
     1692                        freemainbouquet(1);
     1693                        struct provider *pnode = provider;
     1694                       
     1695                        while(pnode != NULL)
     1696                        {
     1697                                provider2bouquet(pnode->providerid);
     1698                                pnode = pnode->next;
     1699                        }
     1700// remove unused favs ARD-SR
     1701                        delunusedbouquetchannels(1);
     1702                }
     1703                else if(favtype == 3)
     1704                        freemainbouquet(1);
    16861705        }
    16871706        delmarkedscreennodes(scan, 1);
     
    18511870        int iinversion = -1, ipolarization = -1;
    18521871        int ifec = -1, imodulation = -1, irolloff = -1, ipilot = -1, isystem = -1;
    1853         int inetworkscan = -1, ionlyfree = -1, iclear = -1, iblindscan = -1, ichangename = -1;
     1872        int inetworkscan = -1, ionlyfree = -1, iclear = -1, iblindscan = -1, ichangename = -1, ifavtype = -1;
    18541873        int i = 0, treffer = 0, tunercount = 0;
    18551874        struct skin* scan = getscreen("manualscan");
     
    18791898        struct skin* blindscan = getscreennode(scan, "blindscan");
    18801899        struct skin* changename = getscreennode(scan, "changename");
     1900        struct skin* favtype = getscreennode(scan, "favtype");
     1901       
    18811902        struct skin* b4 = getscreennode(scan, "b4");
    18821903        struct skin* b5 = getscreennode(scan, "b5");
     
    22632284        addchoicebox(changename, "1", _("yes"));
    22642285
     2286        //favtype
     2287        addchoicebox(favtype, "0", _("Renew"));
     2288        addchoicebox(favtype, "1", _("Unchanged"));
     2289        addchoicebox(favtype, "2", _("Provider"));
     2290        addchoicebox(favtype, "3", _("Delete"));
     2291
    22652292        drawscreen(scan, 2, 0);
    22662293        changescantype(scantype->ret, scan, listbox, tuner, sat, id, system, frequency, inversion, symbolrate, polarization, fec, modulation, rolloff, pilot, hp, lp, bandwidth, transmission, guardinterval, hierarchy, b4, b5, flag);
     
    23022329                if(blindscan->ret != NULL) iblindscan = atoi(blindscan->ret);
    23032330                if(changename->ret != NULL) ichangename = atoi(changename->ret);
     2331                if(favtype->ret != NULL) ifavtype = atoi(favtype->ret);
    23042332
    23052333                if(rcret == getrcconfigint("rcexit", NULL)) break;
     
    23242352                {
    23252353                        clearscreen(scan);
    2326                         screenscan(tpnode, scan->child, tuner->ret, iscantype, isat, ifrequency, iinversion, isymbolrate, ipolarization, ifec, imodulation, irolloff, ipilot, inetworkscan, ionlyfree, iclear, iblindscan, ichangename, isystem, 5000000);
     2354                        screenscan(tpnode, scan->child, tuner->ret, iscantype, isat, ifrequency, iinversion, isymbolrate, ipolarization, ifec, imodulation, irolloff, ipilot, inetworkscan, ionlyfree, iclear, iblindscan, ichangename, isystem, ifavtype, 5000000);
    23272355                        drawscreen(scan, 0, 0);
    23282356                }
Note: See TracChangeset for help on using the changeset viewer.