Ticket #2853: ProgGuideFinderPos.patch

File ProgGuideFinderPos.patch, 4.0 KB (added by Alex Halovanic <halovanic@…>, 18 years ago)

against SVN Trunk 14543

  • libs/libmythtv/guidegrid.h

     
    2929MPUBLIC
    3030bool RunProgramGuide(uint &startChanId, QString &startChanNum,
    3131                     bool thread = false, TV *player = NULL,
    32                      bool allowsecondaryepg = true);
     32                     bool allowsecondaryepg = true, bool needsresize = false);
    3333
    3434
    3535class GuideGrid : public MythDialog
  • libs/libmythtv/guidegrid.cpp

     
    3636
    3737bool RunProgramGuide(uint &chanid, QString &channum,
    3838                     bool thread, TV *player,
    39                      bool allowsecondaryepg)
     39                     bool allowsecondaryepg, bool needsresize)
    4040{
    4141    bool channel_changed = false;
    4242
     43    int x, y, width, height;
     44    float xm, ym;
     45
    4346    if (thread)
    4447        qApp->lock();
    4548
     
    4952                                  chanid, channum,
    5053                                  player, allowsecondaryepg, "guidegrid");
    5154
     55    bool using_gui_size_for_tv = gContext->GetNumSetting("GuiSizeForTV", 0);
     56    if (needsresize && !using_gui_size_for_tv)
     57    {
     58        gContext->GetScreenSettings(x, width, xm, y, height, ym);
     59        gg->setGeometry(x, y, width, height);
     60        gg->setFixedSize(QSize(width, height));
     61    }
     62
    5263    gg->Show();
    5364
    5465    if (thread)
  • libs/libmythtv/progfind.h

     
    2424class QWidget;
    2525class TV;
    2626
    27 MPUBLIC void RunProgramFind(bool thread = false, bool ggActive = false);
     27MPUBLIC void RunProgramFind(bool thread = false, bool ggActive = false, bool needsresize = false);
    2828
    2929class ProgFinder : public MythDialog
    3030{
  • libs/libmythtv/tv_play.cpp

     
    51275127                    allowsecondary = nvp->getVideoOutput()->AllowPreviewEPG();
    51285128
    51295129                // Start up EPG
    5130                 changeChannel = RunProgramGuide(chanid, channum, true, this, allowsecondary);
     5130                changeChannel = RunProgramGuide(chanid, channum, true, this, allowsecondary, true);
    51315131                break;
    51325132            }
    51335133            case kPlaybackBox:
     
    51695169        {
    51705170            default:
    51715171            case kScheduleProgramGuide:
    5172                 RunProgramGuide(chanid, channum, true);
     5172                RunProgramGuide(chanid, channum, true, NULL, true, true);
    51735173                break;
    51745174            case kScheduleProgramFinder:
    5175                 RunProgramFind(true, false);
     5175                RunProgramFind(true, false, true);
    51765176                break;
    51775177            case kScheduledRecording:
    51785178            {
  • libs/libmythtv/progfind.cpp

     
    3434#include "libmyth/mythcontext.h"
    3535#include "libmyth/mythdbcon.h"
    3636
    37 void RunProgramFind(bool thread, bool ggActive)
     37void RunProgramFind(bool thread, bool ggActive, bool needsresize)
    3838{
     39    int x, y, width, height;
     40    float xm, ym;
     41
    3942    if (thread)
    4043        qApp->lock();
    4144
     
    5457        programFind = new ProgFinder(gContext->GetMainWindow(),
    5558                                     "program finder", ggActive);
    5659
     60    bool using_gui_size_for_tv = gContext->GetNumSetting("GuiSizeForTV", 0);
     61    if (needsresize && !using_gui_size_for_tv)
     62    {
     63        gContext->GetScreenSettings(x, width, xm, y, height, ym);
     64        programFind->setGeometry(x, y, width, height);
     65        programFind->setFixedSize(QSize(width, height));
     66    }
     67
    5768    programFind->Initialize();
    5869    programFind->Show();