Changeset 16926


Ignore:
Timestamp:
07/01/12 13:33:34 (12 years ago)
Author:
nit
Message:

[titan] add title to description in gmultiepg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/gmultiepg.h

    r16511 r16926  
    420420        drawscreen(gmultiepg, 0, 0);
    421421}
    422 
    423 void gmultiepgfilldesc(struct skin* listbox, struct skin* epgdesc)
    424 {
    425         char* tmpstr2 = NULL;
    426 
    427         if(listbox->select != NULL)
    428         {
    429                 tmpstr2 = epgdescunzip((struct epg*)listbox->select->handle1);
    430                 changetext(epgdesc, tmpstr2);
    431                 free(tmpstr2); tmpstr2 = NULL;
     422                                                                                                                                                                                                                                                                                                                                :
     423//flag 0: epg from listbox
     424//flag 1: epg from param or aktepg
     425void gmultiepgfilldesc(struct skin* listbox, struct skin* epgdesc, struct epg* epgnode, struct channel* chnode, int flag)
     426{
     427        char* tmpstr = NULL;
     428
     429        changetext(epgdesc, NULL);
     430
     431        if(flag == 0)
     432        {
     433                if(listbox->select != NULL)
     434                        epgnode = (struct epg*)listbox->select->handle1;
     435        }
     436        else
     437                if(chnode != NULL && epgnode == NULL) epgnode = getepgakt(chnode);
     438
     439        if(epgnode != NULL)
     440        {
     441                if(epgnode->title != NULL)
     442                        tmpstr = ostrcat(epgnode->title, " - ", 0, 0);
     443                tmpstr = ostrcat(tmpstr, epgdescunzip(epgnode), 1, 1);
     444                changetext(epgdesc, tmpstr);
     445                free(tmpstr); tmpstr = NULL;
    432446        }
    433447}
     
    471485       
    472486        int list = ALLCHANNEL;
    473         char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL;
     487        char* tmpstr = NULL, *tmpstr1 = NULL;
    474488        void* aktlist = NULL;
    475489        int character = 0;
     
    494508
    495509        if(chnode == NULL) chnode = status.aktservice->channel;
    496         if(epgnode == NULL) epgnode = getepgakt(chnode);
    497         tmpstr2 = epgdescunzip(epgnode);
    498         changetext(epgdesc, tmpstr2);
    499         free(tmpstr2); tmpstr2 = NULL;
     510        gmultiepgfilldesc(listbox, epgdesc, epgnode, chnode, 1);
    500511
    501512        //chalc screen, so we have all infos
     
    747758                        createtimeline(gmultiepg, timeline, akttime, zoom);
    748759                        drawscreen(gmultiepg, 2, 0);
    749                         gmultiepgfilldesc(listbox, epgdesc);
     760                        gmultiepgfilldesc(listbox, epgdesc, NULL, NULL, 0);
    750761                        drawscreen(gmultiepg, 0, 0);
    751762                        if(listbox->select != NULL)
     
    774785                        createtimeline(gmultiepg, timeline, akttime, zoom);
    775786                        drawscreen(gmultiepg, 2, 0);
    776                         gmultiepgfilldesc(listbox, epgdesc);
     787                        gmultiepgfilldesc(listbox, epgdesc, NULL, NULL, 0);
    777788                        drawscreen(gmultiepg, 0, 0);
    778789                        if(listbox->select != NULL)
     
    789800                }
    790801
    791                 gmultiepgfilldesc(listbox, epgdesc);
     802                gmultiepgfilldesc(listbox, epgdesc, NULL, NULL, 0);
    792803                drawscreen(gmultiepg, 0, 0);
    793804                if(listbox->select != NULL)
Note: See TracChangeset for help on using the changeset viewer.