[PC-BSD Commits] r6389 - pcbsd/trunk/SoftwareManager
svn at pcbsd.org
svn at pcbsd.org
Thu Mar 11 20:39:29 PST 2010
Author: kris
Date: 2010-03-11 20:39:29 -0800 (Thu, 11 Mar 2010)
New Revision: 6389
Modified:
pcbsd/trunk/SoftwareManager/softconfigwidget.cpp
pcbsd/trunk/SoftwareManager/softconfigwidget.ui
pcbsd/trunk/SoftwareManager/softmanager-main.cpp
pcbsd/trunk/SoftwareManager/softmanager-main.h
pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp
Log:
Added options to automatically create desktop icons when installing new applications. Can be enabled / disabled via
the configuration screen
Modified: pcbsd/trunk/SoftwareManager/softconfigwidget.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softconfigwidget.cpp 2010-03-12 02:37:02 UTC (rev 6388)
+++ pcbsd/trunk/SoftwareManager/softconfigwidget.cpp 2010-03-12 04:39:29 UTC (rev 6389)
@@ -93,6 +93,9 @@
// Save if we are set to automatically download / install updates as system shutdown
settings.setValue("/PC-BSD/SoftwareManager/autoDownloadUpdates", checkAutoDownloadSysUpdates->isChecked());
+ // Save if we are set to automatically download / install updates as system shutdown
+ settings.setValue("/PC-BSD/SoftwareManager/autoDesktopIcons", checkAutoDesktopIcons->isChecked());
+
// Save if we are going to keep downloaded .PBI files in the temp dir
settings.setValue("/PC-BSD/SoftwareManager/keepDownloadedSoftware", checkKeepDownloadedSoftware->isChecked());
@@ -145,6 +148,7 @@
checkAutoUpdateSoftware->setChecked(settings.value("/PC-BSD/SoftwareManager/autoUpdateSoftware", false).toBool());
checkAutoDownloadSysUpdates->setChecked(settings.value("/PC-BSD/SoftwareManager/autoDownloadUpdates", false).toBool());
checkKeepDownloadedSoftware->setChecked(settings.value("/PC-BSD/SoftwareManager/keepDownloadedSoftware", false).toBool());
+ checkAutoDesktopIcons->setChecked(settings.value("/PC-BSD/SoftwareManager/autoDesktopIcons", true).toBool());
// Get the currently selected mirror
currentMirror = settings.value("/PC-BSD/SoftwareManager/currentMirror", "").toString();
Modified: pcbsd/trunk/SoftwareManager/softconfigwidget.ui
===================================================================
--- pcbsd/trunk/SoftwareManager/softconfigwidget.ui 2010-03-12 02:37:02 UTC (rev 6388)
+++ pcbsd/trunk/SoftwareManager/softconfigwidget.ui 2010-03-12 04:39:29 UTC (rev 6389)
@@ -144,7 +144,7 @@
</property>
</widget>
</item>
- <item row="2" column="0">
+ <item row="3" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -157,13 +157,20 @@
</property>
</spacer>
</item>
- <item row="1" column="0">
+ <item row="2" column="0">
<widget class="QCheckBox" name="checkKeepDownloadedSoftware">
<property name="text">
- <string> Keep downloaded software in Temporary Directory</string>
+ <string>Keep downloaded software in temporary directory</string>
</property>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="checkAutoDesktopIcons">
+ <property name="text">
+ <string>Automatically create desktop icons</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
Modified: pcbsd/trunk/SoftwareManager/softmanager-main.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-main.cpp 2010-03-12 02:37:02 UTC (rev 6388)
+++ pcbsd/trunk/SoftwareManager/softmanager-main.cpp 2010-03-12 04:39:29 UTC (rev 6389)
@@ -608,6 +608,10 @@
// Auto Update Software
autoUpdateSoftware = settings.value("/PC-BSD/SoftwareManager/autoUpdateSoftware", false).toBool();
+ // Auto-create desktop icons
+ autoDesktopIcons = settings.value("/PC-BSD/SoftwareManager/autoDesktopIcons", true).toBool();
+
+ // Keep downloaded PBIs in the tmpdir
keepDownloadedSoftware = settings.value("/PC-BSD/SoftwareManager/keepDownloadedSoftware", false).toBool();
}
Modified: pcbsd/trunk/SoftwareManager/softmanager-main.h
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-main.h 2010-03-12 02:37:02 UTC (rev 6388)
+++ pcbsd/trunk/SoftwareManager/softmanager-main.h 2010-03-12 04:39:29 UTC (rev 6389)
@@ -229,6 +229,7 @@
QTreeWidgetItemIterator *currentWorkingPBI;
bool isWorkingOnPBI;
bool autoUpdateSoftware;
+ bool autoDesktopIcons;
bool keepDownloadedSoftware;
// Our copylabel variables
Modified: pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp 2010-03-12 02:37:02 UTC (rev 6388)
+++ pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp 2010-03-12 04:39:29 UTC (rev 6389)
@@ -548,6 +548,15 @@
if ( item->getWorkingStatus() == PBINEWDOWNLOAD ) {
item->setDelete(true);
item->setStatusText(tr("Install complete!"));
+
+ // Create the desktop icons for this app
+ if (autoDesktopIcons) {
+ QString prog = "su";
+ QStringList args;
+ args << RealUserName << "-c" << "/Programs/" + item->getProgDirName() + "/.sbin/install-desktop-icons.sh";
+ installPBIDesktopIcon = new QProcess( this );
+ installPBIDesktopIcon->start(prog, args);
+ }
}
item->setWorkingStatus(PBIINACTIVE);
More information about the Commits
mailing list