Ticket #1894: guideicons.patch

File guideicons.patch, 2.3 KB (added by mythtv@…, 19 years ago)

Missing icon text patch

  • libs/libmythtv/guidegrid.cpp

     
    11351135        if ((y == (unsigned int)2 && scrolltype != 1) ||
    11361136            ((signed int)y == m_currentRow && scrolltype == 1))
    11371137        {
    1138             if (chinfo->iconpath != "none" && chinfo->iconpath != "")
     1138            if (!chinfo->iconpath.isEmpty() && chinfo->iconpath != "none")
    11391139            {
    11401140                int iconsize = 0;
    11411141                if (itype)
     
    11441144                    iconsize = type->GetSize();
    11451145                if (!chinfo->iconload)
    11461146                    chinfo->LoadIcon(iconsize);
    1147                 if (chinfo->iconload && itype)
    1148                     itype->SetImage(chinfo->icon);
     1147                if (chinfo->iconload)
     1148                {
     1149                    if (itype)
     1150                        itype->SetImage(chinfo->icon);
     1151                }
     1152                else
     1153                {
     1154                    chinfo->iconpath = QString::null;
     1155                }
    11491156            }
    11501157        }
    11511158
     
    11661173                    chinfo->LoadIcon(iconsize);
    11671174                if (chinfo->iconload)
    11681175                    type->SetIcon(y, chinfo->icon);
     1176                else
     1177                {
     1178                    chinfo->iconpath = QString::null;
     1179                    type->ResetImage(y);
     1180                }
    11691181            }
    11701182            else
    11711183            {
     
    12711283        container->ClearAllText();
    12721284        container->SetText(infoMap);
    12731285
    1274         UITextType *type;
    1275 
    1276         type = (UITextType *)container->GetType("misicon");
    1277         if (type)
    1278             type->SetText(chinfo->callsign);
    1279 
    12801286        UIImageType *itype = (UIImageType *)container->GetType("icon");
    12811287        if (itype)
    12821288        {
     
    12841290            itype->LoadImage();
    12851291        }
    12861292
     1293        if (!itype || chinfo->iconpath.isEmpty() || chinfo->iconpath == "none")
     1294        {
     1295            UITextType *type = (UITextType *)container->GetType("misicon");
     1296            if (type)
     1297                type->SetText(chinfo->callsign);
     1298        }
     1299
    12871300        container->Draw(&tmp, 1, m_context);
    12881301        container->Draw(&tmp, 2, m_context);
    12891302        container->Draw(&tmp, 3, m_context);