[PC-BSD Commits] r21840 - in pcbsd-projects/PCDM: . themes themes/default

svn at pcbsd.org svn at pcbsd.org
Wed Mar 13 09:02:09 PDT 2013


Author: kenmoore
Date: 2013-03-13 16:02:08 +0000 (Wed, 13 Mar 2013)
New Revision: 21840

Added:
   pcbsd-projects/PCDM/themes/
   pcbsd-projects/PCDM/themes/default/
   pcbsd-projects/PCDM/themes/default/background.jpg
   pcbsd-projects/PCDM/themes/default/banner.png
   pcbsd-projects/PCDM/themes/default/default-desktop.png
   pcbsd-projects/PCDM/themes/default/default-user.png
   pcbsd-projects/PCDM/themes/default/default.theme
   pcbsd-projects/PCDM/themes/default/keyboardlayout.png
   pcbsd-projects/PCDM/themes/default/localechange.png
   pcbsd-projects/PCDM/themes/default/login.png
   pcbsd-projects/PCDM/themes/default/nextDE.png
   pcbsd-projects/PCDM/themes/default/password.png
   pcbsd-projects/PCDM/themes/default/previousDE.png
   pcbsd-projects/PCDM/themes/default/splashscreen.png
   pcbsd-projects/PCDM/themes/default/system.png
   pcbsd-projects/PCDM/themes/default/virtualkeyboard.png
Removed:
   pcbsd-projects/PCDM/pcdm.theme
Modified:
   pcbsd-projects/PCDM/PCDM.pro
   pcbsd-projects/PCDM/PCDM.qrc
   pcbsd-projects/PCDM/pcdm-gui.cpp
   pcbsd-projects/PCDM/pcdm.conf
   pcbsd-projects/PCDM/themeStruct.cpp
Log:
Move all the theme stuff for PCDM around. Now themes can be saved/loaded from /usr/local/share/PCDM/themes/<my-theme> easily



Modified: pcbsd-projects/PCDM/PCDM.pro
===================================================================
--- pcbsd-projects/PCDM/PCDM.pro	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/PCDM.pro	2013-03-13 16:02:08 UTC (rev 21840)
@@ -105,6 +105,10 @@
 rcd.path=/usr/local/etc/rc.d
 rcd.extra=cp rc.d/pcdm /usr/local/etc/rc.d/pcdm
 
-INSTALLS += dotrans scripts rcd target
+theme=themes/
+theme.path=/usr/local/share/PCDM/
+theme.extra=cp -r themes/ /usr/local/share/PCDM/.
 
+INSTALLS += dotrans scripts rcd theme target
+
 RESOURCES += PCDM.qrc

Modified: pcbsd-projects/PCDM/PCDM.qrc
===================================================================
--- pcbsd-projects/PCDM/PCDM.qrc	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/PCDM.qrc	2013-03-13 16:02:08 UTC (rev 21840)
@@ -26,7 +26,7 @@
     <file>images/nodesktop.png</file>
   </qresource>
   <qresource prefix="samples">
-    <file>pcdm.theme</file>
+    <file>themes/default/default.theme</file>
     <file>pcdm.conf</file>
   </qresource>
 </RCC>

Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp	2013-03-13 16:02:08 UTC (rev 21840)
@@ -35,13 +35,13 @@
 void PCDMgui::loadTheme(){
   currentTheme = new ThemeStruct();
   QString themeFile = Config::themeFile();
-  if(!QFile::exists(themeFile)){ themeFile = ":samples/pcdm.theme"; }
+  if(!QFile::exists(themeFile)){ themeFile = ":samples/themes/default/default.theme"; }
   currentTheme->loadThemeFile( themeFile );
   //Check the Theme, using default values as necessary
   QStringList invalid = currentTheme->invalidItems();
   if( !invalid.isEmpty() ){
     ThemeStruct* defaultTheme = new ThemeStruct();
-    defaultTheme->loadThemeFile( ":samples/pcdm.theme" );
+    defaultTheme->loadThemeFile( ":samples/themes/default/default.theme" );
     for( int i=0; i<invalid.length(); i++){
       //Replace the invalid items with the defaults
       qDebug() << "Invalid Theme Item, Using defaults:" << invalid[i];
@@ -186,6 +186,10 @@
     deSwitcher = new FancySwitcher(this, !currentTheme->itemIsVertical("desktop") );
     QSize deSize = currentTheme->itemIconSize("desktop");
     deSwitcher->setIconSize(deSize.height());
+    tmpIcon = currentTheme->itemIcon("nextde");
+    if( !tmpIcon.isEmpty() && QFile::exists(tmpIcon) ){ deSwitcher->changeButtonIcon("forward", tmpIcon); }
+    tmpIcon = currentTheme->itemIcon("previousde");
+    if( !tmpIcon.isEmpty() && QFile::exists(tmpIcon) ){ deSwitcher->changeButtonIcon("back", tmpIcon); }
     //Figure out if we need to smooth out the animation
     deSwitcher->setNumberAnimationFrames("4"); 
     //NOTE: A transparent widget background slows the full animation to a crawl with a stretched background image

Modified: pcbsd-projects/PCDM/pcdm.conf
===================================================================
--- pcbsd-projects/PCDM/pcdm.conf	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/pcdm.conf	2013-03-13 16:02:08 UTC (rev 21840)
@@ -4,8 +4,8 @@
 #####################################
 
 ## APPEARANCE SETTINGS ##
-THEME_FILE=/usr/local/share/PCDM/pcdm.theme
-SPLASHSCREEN_FILE=/usr/local/share/PCDM/images/default-splash.png
+THEME_FILE=/usr/local/share/PCDM/themes/default/default.theme
+SPLASHSCREEN_FILE=/usr/local/share/PCDM/themes/default/splashscreen.png
 
 ## Base Directories for files ##
 DE_STARTUP_DIR=/usr/local/share/xsessions  #location for *.desktop entries for desktop environments(s)

Modified: pcbsd-projects/PCDM/themeStruct.cpp
===================================================================
--- pcbsd-projects/PCDM/themeStruct.cpp	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themeStruct.cpp	2013-03-13 16:02:08 UTC (rev 21840)
@@ -11,7 +11,7 @@
   qDebug() << "Loading PCDM Theme File:" << filePath;
   //Create the required Items:
   itemNames.clear();
-  itemNames << "background" << "header" << "user" << "password" << "login" << "desktop" << "system" << "locale" << "keyboard" << "vkeyboard" << "toolbar";
+  itemNames << "background" << "header" << "user" << "password" << "login" << "desktop" << "system" << "locale" << "keyboard" << "vkeyboard" << "toolbar" << "nextde" << "previousde";
   items.clear();
   for(int i=0; i<itemNames.length(); i++){ 
     ThemeItem it; 

Index: pcbsd-projects/PCDM/themes/default/background.jpg
===================================================================
--- pcbsd-projects/PCDM/themes/default/background.jpg	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/background.jpg	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/background.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/jpeg
Index: pcbsd-projects/PCDM/themes/default/banner.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/banner.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/banner.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/banner.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/default-desktop.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/default-desktop.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/default-desktop.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/default-desktop.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/default-user.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/default-user.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/default-user.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/default-user.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/keyboardlayout.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/keyboardlayout.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/keyboardlayout.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/keyboardlayout.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/localechange.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/localechange.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/localechange.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/localechange.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/login.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/login.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/login.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/login.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/nextDE.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/nextDE.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/nextDE.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/nextDE.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/password.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/password.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/password.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/password.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/previousDE.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/previousDE.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/previousDE.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/previousDE.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/splashscreen.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/splashscreen.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/splashscreen.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/splashscreen.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/system.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/system.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/system.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/system.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd-projects/PCDM/themes/default/virtualkeyboard.png
===================================================================
--- pcbsd-projects/PCDM/themes/default/virtualkeyboard.png	2013-03-13 11:42:00 UTC (rev 21839)
+++ pcbsd-projects/PCDM/themes/default/virtualkeyboard.png	2013-03-13 16:02:08 UTC (rev 21840)

Property changes on: pcbsd-projects/PCDM/themes/default/virtualkeyboard.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png


More information about the Commits mailing list