[PC-BSD Commits] r865 - pcbsd/trunk/PBIsource

svn at pcbsd.org svn at pcbsd.org
Fri Nov 9 07:38:13 PST 2007


Author: kris
Date: 2007-11-09 07:38:12 -0800 (Fri, 09 Nov 2007)
New Revision: 865

Modified:
   pcbsd/trunk/PBIsource/pbi.ui.h
Log:

Add passive popup to PBI installer which lets user know where icons have
been created in kmenu



Modified: pcbsd/trunk/PBIsource/pbi.ui.h
===================================================================
--- pcbsd/trunk/PBIsource/pbi.ui.h	2007-11-09 15:06:49 UTC (rev 864)
+++ pcbsd/trunk/PBIsource/pbi.ui.h	2007-11-09 15:38:12 UTC (rev 865)
@@ -395,6 +395,7 @@
 
 void PBI::CreateConfigSlot()
 {
+    QString pathLoc="";
    
     
     QFile GTKCheck("/Programs/" + ProgDirName + "/autolibs/pangorc");
@@ -498,12 +499,34 @@
     // First create the special ".sbin" directory for each script executable
     QDir sbindir;
     sbindir.mkdir ( "/Programs/" + ProgDirName + "/.sbin", TRUE );
+
+
     
     // Starts creating the scripts for each EXE
     i = 0;
+    // Variable to check if the program needs a menu entry
+    int addedIcons = 0;
     QString Binary;
     while (! ExePath[i].isEmpty() )
     {
+
+        // Do a check to save the menu location for this app, so we can
+        // do a passive popup letting the user know
+        if (LaunchCheckBox->isChecked() && NoMenu[i] == "0" && addedIcons == 0)
+        {
+            // Set the flag that we have created menu entries
+            addedIcons = 1;
+            if ( ExeOwndir[i] == 0)
+            {
+              pathLoc="/" + ProgramName + "/"; 
+            } else if ( ExeOwndir[i] == 1 ) {
+              pathLoc="/" + ExeKdeCat[i] + "/" + ProgramName ; 
+            } else {
+              pathLoc="/" + ExeKdeCat[i] + "/"; 
+            }
+        }
+
+
         if ( ExeLink[i] != "1" && ExeWebLink[i] != "1" )
         {
 	
@@ -560,16 +583,6 @@
 	      
          }
 	
-        // Create the simlink to the fake script
-        // Link = new QProcess( this );
-        // Link->addArgument( "ln" );
-        // Link->addArgument( "-s" );
-        // Link->addArgument( "/Programs/.sbin/" + Binary);
-        // Link->addArgument( "/usr/local/bin/" + Binary);
-        // if ( !Link->start() ) {
-	      
-        //         }
-	
          }
 	
          // Start creating the Icons now
@@ -580,6 +593,12 @@
 	
 	i++;
     }
+
+    // We have icons, so display a passive popup informing the user
+    if ( addedIcons == 1)
+    {
+	runCommand("kdialog --passivepopup \"" + ProgramName + " menu entry created in " + pathLoc + "\" 10 &");
+    }
     
     
     // Check if we need to create any mime icons



More information about the Commits mailing list