Ticket #72: default_theme.diff

File default_theme.diff, 1.5 KB (added by Korey <k.m.fort@…>, 19 years ago)

Allows the default theme to be G.A.N.T. if the preferred theme cannot be found.

  • libs/libmyth/mythcontext.cpp

     
    13961396    if (dir.exists())
    13971397        return testdir;
    13981398
    1399     testdir = "../menutest/" + themename;
     1399    testdir = d->m_installprefix + "/share/mythtv/themes/G.A.N.T.";
    14001400    dir.setPath(testdir);
    1401     if (dir.exists())
     1401    if (dir.exists()){
     1402        cerr<<"Defaulting to G.A.N.T. theme"<<endl;
    14021403        return testdir;
     1404        }
    14031405
    14041406
    14051407    // Don't complain about the "default" theme being missing
     
    14091411        dir.setPath(testdir);
    14101412        if (dir.exists())
    14111413            return testdir;
    1412     }
     1414        dir.setPath(testdir);
    14131415   
    14141416    cerr << "Could not find theme: " << themename << endl;
    1415     return "";
     1417        }
    14161418}
    14171419QString MythContext::GetMenuThemeDir(void)
    14181420{
  • programs/mythuitest/main.cpp

     
    2525    if (themedir == "")
    2626    {
    2727        cerr << "Couldn't find theme " << themename << endl;
    28         exit(0);
     28        cerr << "loading Titivillus as default theme"<<endl;
     29        themename = "Titivillus";
     30        themedir = gContext->FindThemeDir("/usr/local/share/mythtv/themes");
     31        cout<< themedir<<themename<<endl;
     32        //exit(0);
    2933    }
    3034
    3135    gContext->LoadQtConfig();