[PC-BSD Commits] r2507 - in pbibuild/pbi-source: PBIsource PBItext

svn at pcbsd.org svn at pcbsd.org
Thu Jul 31 12:26:17 PDT 2008


Author: kris
Date: 2008-07-31 12:26:16 -0700 (Thu, 31 Jul 2008)
New Revision: 2507

Modified:
   pbibuild/pbi-source/PBIsource/pbi.cpp
   pbibuild/pbi-source/PBItext/main.cpp
Log:

Fixed a bug removing old menu entries from KDE4 when uninstalling a PBI



Modified: pbibuild/pbi-source/PBIsource/pbi.cpp
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.cpp	2008-07-31 18:14:33 UTC (rev 2506)
+++ pbibuild/pbi-source/PBIsource/pbi.cpp	2008-07-31 19:26:16 UTC (rev 2507)
@@ -695,7 +695,7 @@
         
     if(LaunchCheckBox->isChecked() && NoMenu[exenum] == "0"  )
     {
-	tmp = "/usr/local/share/applications/kde/PBI-" + Binary + ".desktop";
+	tmp = "/usr/local/share/applications/kde/PBI-" + ProgDirName + "-" + Binary + ".desktop";
 	QFile file( tmp );
 	if(!file.open( QIODevice::WriteOnly))
         {
@@ -2305,6 +2305,7 @@
 	     stream << "then\n";
 	     stream << "   sh /Programs/" + ProgDirName + "/PBI.RemoveScript2.sh \"${@}\"\n";
 	     stream << "fi\n";
+             stream << "rm /usr/local/share/applications/kde/PBI-" + ProgDirName+ "-* >/dev/null 2>/dev/null\n";
              stream << "rm /usr/local/share/desktop-directories/PBI-" + ProgDirName + ".directory >/dev/null 2>/dev/null\n";
 	     stream << "rm /usr/local/etc/xdg/menus/applications-merged/PBI-" + ProgDirName + ".merge.menu >/dev/null 2>/dev/null\n";
 	     stream << "rm -rf '" + InstallDirPath + "'\n";

Modified: pbibuild/pbi-source/PBItext/main.cpp
===================================================================
--- pbibuild/pbi-source/PBItext/main.cpp	2008-07-31 18:14:33 UTC (rev 2506)
+++ pbibuild/pbi-source/PBItext/main.cpp	2008-07-31 19:26:16 UTC (rev 2507)
@@ -640,7 +640,7 @@
         
     if( NoMenu[exenum] == "0"  )
     {
-	tmp = "/usr/local/share/applications/kde/PBI-" + Binary + ".desktop";
+	tmp = "/usr/local/share/applications/kde/PBI-" + ProgDirName + "-" + Binary + ".desktop";
 	QFile file( tmp );
 	if(!file.open( QIODevice::WriteOnly))
         {
@@ -1138,6 +1138,7 @@
              stream << "then\n";
              stream << "   sh /Programs/" + ProgDirName + "/PBI.RemoveScript2.sh \"${@}\"\n";
              stream << "fi\n";
+             stream << "rm /usr/local/share/applications/kde/PBI-" + ProgDirName+ "-* >/dev/null 2>/dev/null\n";
              stream << "rm /usr/local/share/desktop-directories/PBI-" + ProgDirName + ".directory >/dev/null 2>/dev/null\n";
 	     stream << "rm /usr/local/etc/xdg/menus/applications-merged/PBI-" + ProgDirName + ".merge.menu >/dev/null 2>/dev/null\n";
 



More information about the Commits mailing list