[PC-BSD Commits] r20133 - users/ken/EasyPBI2

svn at pcbsd.org svn at pcbsd.org
Wed Nov 7 11:03:09 PST 2012


Author: kenmoore
Date: 2012-11-07 19:03:09 +0000 (Wed, 07 Nov 2012)
New Revision: 20133

Modified:
   users/ken/EasyPBI2/mainGUI.cpp
   users/ken/EasyPBI2/newModuleDialog.cpp
   users/ken/EasyPBI2/newModuleDialog.h
Log:
Setup the default icon stuff for new modules



Modified: users/ken/EasyPBI2/mainGUI.cpp
===================================================================
--- users/ken/EasyPBI2/mainGUI.cpp	2012-11-07 18:52:38 UTC (rev 20132)
+++ users/ken/EasyPBI2/mainGUI.cpp	2012-11-07 19:03:09 UTC (rev 20133)
@@ -125,7 +125,6 @@
   PBISETTINGS_FILE= PROG_DIR + "/.savedPBISettings.conf";
   DEFAULTICON_FILE= PROG_DIR + "/defaulticon.png";
   PORTS_DIR = "";
-  qDebug() << "ENV:" << QProcessEnvironment::systemEnvironment().toStringList();
   isSixtyFourBitOS= ( QProcessEnvironment::systemEnvironment().value("MACHTYPE") == "x86_64" );
   
   //Check for EasyPBI directory structure and create it if it is not there
@@ -400,7 +399,7 @@
   qDebug() << "New Module triggered";
   //Create and run the new dialog
   NewModuleDialog* dlg = new NewModuleDialog(this, PORTS_DIR);
-  //dlg.setModal(TRUE);
+  dlg->setDefaultIconFile(DEFAULTICON_FILE);
   dlg->exec();
   //Determine if the action was cancelled
   if( dlg->isAccepted ){

Modified: users/ken/EasyPBI2/newModuleDialog.cpp
===================================================================
--- users/ken/EasyPBI2/newModuleDialog.cpp	2012-11-07 18:52:38 UTC (rev 20132)
+++ users/ken/EasyPBI2/newModuleDialog.cpp	2012-11-07 19:03:09 UTC (rev 20133)
@@ -35,6 +35,7 @@
     moduleType.clear(); moduleData.clear();
   }
   moduleIcon = ui->line_icon->text();
+  if(moduleIcon.isEmpty()){ moduleIcon = ui->line_icon->placeholderText(); }
   //Now close the UI
   this->close();
 }
@@ -92,3 +93,7 @@
     ui->line_icon->setText(Sel);
   }
 }
+
+void NewModuleDialog::setDefaultIconFile(QString icon){
+  ui->line_icon->setPlaceholderText(icon);
+}
\ No newline at end of file

Modified: users/ken/EasyPBI2/newModuleDialog.h
===================================================================
--- users/ken/EasyPBI2/newModuleDialog.h	2012-11-07 18:52:38 UTC (rev 20132)
+++ users/ken/EasyPBI2/newModuleDialog.h	2012-11-07 19:03:09 UTC (rev 20133)
@@ -22,6 +22,7 @@
     virtual ~NewModuleDialog();
 
     bool isAccepted;
+    void setDefaultIconFile(QString);
     QString moduleType, moduleIcon, moduleData, PORTS_DIR;
 
 



More information about the Commits mailing list