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

svn at pcbsd.org svn at pcbsd.org
Wed Feb 13 15:28:01 PST 2013


Author: kenmoore
Date: 2013-02-13 23:28:01 +0000 (Wed, 13 Feb 2013)
New Revision: 21485

Modified:
   pcbsd-projects/PCDM/pcdm-gui.cpp
Log:
Re-enable a couple minor things for the new theme format



Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp	2013-02-13 23:20:13 UTC (rev 21484)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp	2013-02-13 23:28:01 UTC (rev 21485)
@@ -117,7 +117,6 @@
     toolbar->addWidget(systemButton);
     //connect( systemButton, SIGNAL(triggered()), this, SLOT(slotShutdownComputer()) );
     systemButton->setPopupMode( QToolButton::InstantPopup );
-    //systemButton->setToolTip(tr("Shutdown the computer"));
 
   //Create the grid layout
   QGridLayout* grid = new QGridLayout;
@@ -171,7 +170,9 @@
     //Add the available desktops to the switcher
     QStringList deList = Backend::getAvailableDesktops();
     for(int i=0; i<deList.length(); i++){
-      deSwitcher->addItem( deList[i], Backend::getDesktopIcon(deList[i]), Backend::getDesktopComment(deList[i]) );
+      QString deIcon = Backend::getDesktopIcon(deList[i]);
+      if( deIcon.isEmpty() ){ deIcon = currentTheme->itemIcon("desktop"); } //set the default icon if none given
+      deSwitcher->addItem( deList[i], deIcon, Backend::getDesktopComment(deList[i]) );
     }
     //Set the switcher to the last used desktop environment
     //deSwitcher->setCurrentItem("kde3"); 
@@ -210,8 +211,6 @@
   QString binary = Backend::getDesktopBinary(deSwitcher->currentItem());
   //Disable user input while confirming login
   loginW->setEnabled(FALSE);
-  //unameline->setEnabled(FALSE);
-  //pwline->setEnabled(FALSE);
   deSwitcher->setEnabled(FALSE);
   toolbar->setEnabled(FALSE);
   //Try to login
@@ -225,7 +224,7 @@
   }else{
     pwline->setText("");
     //Display an info box that the login failed
-    QMessageBox notice;
+    QMessageBox notice(this);
     notice.setWindowTitle(tr("Invalid Username/Password"));
     notice.setIcon(QMessageBox::Warning);
     notice.setText(tr("Username/Password combination is invalid, please try again."));
@@ -236,8 +235,6 @@
   }
   //Re-Enable user input
   loginW->setEnabled(TRUE);
-  //unameline->setEnabled(TRUE);
-  //pwline->setEnabled(TRUE);
   deSwitcher->setEnabled(TRUE);
   toolbar->setEnabled(TRUE);
 }



More information about the Commits mailing list