[PC-BSD Commits] r21531 - pcbsd-projects/PCDM
svn at pcbsd.org
svn at pcbsd.org
Fri Feb 15 07:27:51 PST 2013
Author: kenmoore
Date: 2013-02-15 15:27:51 +0000 (Fri, 15 Feb 2013)
New Revision: 21531
Modified:
pcbsd-projects/PCDM/pcdm-gui.cpp
pcbsd-projects/PCDM/themeStruct.cpp
Log:
Also add loading default theme file is none given/found
Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp 2013-02-15 15:06:09 UTC (rev 21530)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp 2013-02-15 15:27:51 UTC (rev 21531)
@@ -26,7 +26,9 @@
void PCDMgui::loadTheme(){
currentTheme = new ThemeStruct();
- currentTheme->loadThemeFile( Config::themeFile() );
+ QString themeFile = Config::themeFile();
+ if(!QFile::exists(themeFile)){ themeFile = ":samples/pcdm.theme"; }
+ currentTheme->loadThemeFile( themeFile );
//Check the Theme, using default values as necessary
QStringList invalid = currentTheme->invalidItems();
if( !invalid.isEmpty() ){
Modified: pcbsd-projects/PCDM/themeStruct.cpp
===================================================================
--- pcbsd-projects/PCDM/themeStruct.cpp 2013-02-15 15:06:09 UTC (rev 21530)
+++ pcbsd-projects/PCDM/themeStruct.cpp 2013-02-15 15:27:51 UTC (rev 21531)
@@ -180,7 +180,7 @@
}else{
ret = items[index].icon;
}
- qDebug() << "Theme:" << item << "Icon:" << ret;
+ //qDebug() << "Theme:" << item << "Icon:" << ret;
return ret;
}
More information about the Commits
mailing list