[PC-BSD Commits] r21530 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Fri Feb 15 07:06:10 PST 2013


Author: kenmoore
Date: 2013-02-15 15:06:09 +0000 (Fri, 15 Feb 2013)
New Revision: 21530

Modified:
   pcbsd-projects/PCDM/main.cpp
   pcbsd-projects/PCDM/themeStruct.cpp
Log:
Fix loading a default pcdm.conf file if none found



Modified: pcbsd-projects/PCDM/main.cpp
===================================================================
--- pcbsd-projects/PCDM/main.cpp	2013-02-15 14:54:10 UTC (rev 21529)
+++ pcbsd-projects/PCDM/main.cpp	2013-02-15 15:06:09 UTC (rev 21530)
@@ -24,9 +24,9 @@
   
   QString changeLang; 
   // Load the configuration file
-  Config::loadConfigFile("/usr/local/share/PCDM/pcdm.conf");
-  // Load the Desired Theme
-  //Theme::loadTheme(Config::themeFile());
+  QString confFile = "/usr/local/share/PCDM/pcdm.conf";
+  if(!QFile::exists(confFile)){ confFile = ":samples/pcdm.conf"; }
+  Config::loadConfigFile(confFile);
 
   // Startup the main application
   QApplication a(argc,argv); 

Modified: pcbsd-projects/PCDM/themeStruct.cpp
===================================================================
--- pcbsd-projects/PCDM/themeStruct.cpp	2013-02-15 14:54:10 UTC (rev 21529)
+++ pcbsd-projects/PCDM/themeStruct.cpp	2013-02-15 15:06:09 UTC (rev 21530)
@@ -2,6 +2,7 @@
 
 
 void ThemeStruct::loadThemeFile(QString filePath){
+  qDebug() << "Loading PCDM Theme File:" << filePath;
   //Create the required Items:
   itemNames.clear();
   itemNames << "background" << "header" << "user" << "password" << "login" << "desktop" << "system" << "locale" << "keyboard" << "vkeyboard" << "toolbar";



More information about the Commits mailing list