Ticket #6712: MythGameFixes.3.diff

File MythGameFixes.3.diff, 5.8 KB (added by robert.mcnamara@…, 15 years ago)

Even more chopping. Supercedes previous.

  • mythgame/mythgame/gamehandler.cpp

     
    459459                          "publisher, version, fanart, boxart) "
    460460                          "VALUES (:SYSTEM, :ROMNAME, :GAMENAME, :GENRE, :YEAR, "
    461461                          ":GAMETYPE, :ROMPATH, :COUNTRY, :CRC32, '1', '1', :PLOT, :PUBLISHER, :VERSION, "
    462                           ":FANART, BOXART)");
     462                          ":FANART, :BOXART)");
    463463
    464464
    465465
  • mythgame/mythgame/gameui.cpp

     
    7474
    7575    m_gameTree = new MythGenericTree("game root", 0, false);
    7676
    77     timer = new QTimer(this);
    78     connect(timer, SIGNAL(timeout()), SLOT(showImageTimeout()));
    79 
    8077    //  create system filter to only select games where handlers are present
    8178    QString systemFilter;
    8279
     
    196193            node->deleteAllChildren();
    197194            fillNode(node);
    198195        }
    199         if (timer->isActive())
    200             timer->stop();
    201196        clearRomInfo();
    202197    }
    203198    else
     
    206201        if (romInfo->Romname().isEmpty())
    207202            romInfo->fillData();
    208203        updateRomInfo(romInfo);
    209         if (!romInfo->ImagePath().isEmpty() || !romInfo->Fanart().isEmpty() ||
     204        if (!romInfo->Screenshot().isEmpty() || !romInfo->Fanart().isEmpty() ||
    210205            !romInfo->Boxart().isEmpty())
    211         {
    212             if (timer->isActive())
    213                 timer->changeInterval(330);
    214             else
    215                 timer->start(330, true);
    216         }
     206            showImages();
    217207        else
    218208        {
    219209            if (m_gameImage->IsVisible())
     
    264254    }
    265255}
    266256
    267 void GameUI::showImageTimeout(void)
     257void GameUI::showImages(void)
    268258{
    269259    m_gameImage->Load();
    270260    if (!m_gameImage->IsVisible())
  • mythgame/mythgame/rominfo.cpp

     
    267267        setBoxart(query.value(16).toString());
    268268    }
    269269
    270     query.prepare("SELECT screenshots FROM gameplayers "
    271                   "WHERE playername = :SYSTEM");
    272     query.bindValue(":SYSTEM",system);
    273     query.exec();
    274 
    275     if (query.next())
    276     {
    277         if (!query.value(0).toString().isEmpty())
    278         {
    279             QString Image = query.value(0).toString() + "/" + romname;
    280             if (FindImage(query.value(0).toString() + "/" + romname, &Image))
    281                 setImagePath(Image);
    282             else
    283                 setImagePath("");
    284         }
    285     }
    286 
    287270    setRomCount(romInDB(romname,gametype));
    288271
    289272    // If we have more than one instance of this rom in the DB fill in all
  • mythgame/mythgame/gameui.h

     
    2424  public slots:
    2525    void nodeChanged(MythGenericTree* node);
    2626    void itemClicked(MythUIButtonListItem* item);
    27     void showImageTimeout(void);
     27    void showImages(void);
    2828    void searchComplete(QString);
    2929
    3030  private:
  • mythgame/mythgame/rominfo.h

     
    4343                system = lhs.system;
    4444                gamename = lhs.gamename;
    4545                genre = lhs.genre;
    46                 imagepath = lhs.imagepath;
    4746                year = lhs.year;
    4847                favorite = lhs.favorite;
    4948                rompath = lhs.rompath;
     
    107106    QString CRC_VALUE() const { return crc_value; }
    108107    void setCRC_VALUE(const QString &lcrc_value) { crc_value = lcrc_value; }
    109108
    110     QString ImagePath() const { return imagepath; }
    111     void setImagePath(const QString &limagepath) { imagepath = limagepath; }
    112 
    113109    QString Plot() const { return plot; }
    114110    void setPlot(const QString &lplot) { plot = lplot; }
    115111
     
    136132    QString system;
    137133    QString gamename;
    138134    QString genre;
    139     QString imagepath;
    140135    QString country;
    141136    QString crc_value;
    142137    QString gametype;
  • mythgame/mythgame/gamesettings.cpp

     
    8989HostLineEdit *GetScreenshotDir()
    9090{
    9191    HostLineEdit *gc = new HostLineEdit("mythgame.screenshotdir");
    92     gc->setLabel(QObject::tr("Directory where Game Screenshot is stored"));
     92    gc->setLabel(QObject::tr("Directory where Game Screenshots are stored"));
    9393    gc->setValue(GetConfDir() + "/MythGame/Screenshots");
    9494    gc->setHelpText(QObject::tr("This directory will be the default browse "
    9595                    "location when assigning screenshots."));
     
    228228    };
    229229};
    230230
    231 
    232 class ScreenPath : public LineEditSetting, public GameDBStorage
    233 {
    234   public:
    235     ScreenPath(const MythGamePlayerSettings &parent) :
    236         LineEditSetting(this), GameDBStorage(this, parent, "screenshots")
    237     {
    238         setLabel(QObject::tr("ScreenShots"));
    239         setHelpText(QObject::tr("Path to any screenshots for this player"));
    240     };
    241 };
    242 
    243231MythGamePlayerSettings::MythGamePlayerSettings()
    244232{
    245233    // must be first
     
    251239    group->addChild(new GameType(*this));
    252240    group->addChild(new Command(*this));
    253241    group->addChild(new RomPath(*this));
    254     group->addChild(new ScreenPath(*this));
    255242    group->addChild(new WorkingDirPath(*this));
    256243    group->addChild(new Extensions(*this));
    257244    group->addChild(new AllowMultipleRoms(*this));