Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
10 src-qt4/pc-softwaremanager/mainUI.cpp
@@ -32,6 +32,7 @@ MainUI::MainUI(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainUI){
defaultIcon = ":/application.png";
statusLabel = new QLabel();
ui->statusbar->addWidget(statusLabel);
+ updatesAvailable = -1; //app starting value (0 for no updates, 1 for updates available)
}
void MainUI::setWardenMode(QString dir, QString ip){
@@ -260,6 +261,7 @@ void MainUI::slotRefreshInstallTab(){
for(int i=0; i<ui->tree_install_apps->topLevelItemCount(); i++){
cList << ui->tree_install_apps->topLevelItem(i)->whatsThis(0);
}
+ bool up = false; //to keep track of whether updates are available for any installed apps
//Quick finish if no items installed
if(installList.isEmpty()){
ui->tree_install_apps->clear();
@@ -288,9 +290,11 @@ void MainUI::slotRefreshInstallTab(){
ui->tree_install_apps->insertTopLevelItem(i,item);
cList.insert(i,installList[i]); //reflect this inclusion into the current list
}
+ up = up || !PBI->upgradeAvailable(installList[i]).isEmpty(); //will remain "true" if a single item has an update available
}else if(todo==1){
//Update current item
formatInstalledItemDisplay( ui->tree_install_apps->topLevelItem(i) );
+ up = up || !PBI->upgradeAvailable(installList[i]).isEmpty(); //will remain "true" if a single item has an update available
}else{
//Remove current item
ui->tree_install_apps->takeTopLevelItem(i);
@@ -306,6 +310,12 @@ void MainUI::slotRefreshInstallTab(){
}
} //end of empty list check
+ //Check whether the system needs to be notified about a new PBI update availability
+ if( (updatesAvailable==0 && up) || (updatesAvailable==1 && !up) ){
+ SystemFlags::setFlag(SystemFlags::PbiUpdate);
+ }
+ if(up){ updatesAvailable = 1; }
+ else{ updatesAvailable = 0; }
//Make sure that there is an item selected
if(ui->tree_install_apps->topLevelItemCount() > 0 ){
if( ui->tree_install_apps->selectedItems().isEmpty() ){
View
4 src-qt4/pc-softwaremanager/mainUI.h
@@ -23,6 +23,9 @@
#include <QDesktopServices>
#include <QUrl>
+/* LibPCBSD Includes */
+#include <pcbsd-sysFlags.h>
+
/* Local Includes */
#include "pbiBackend.h"
#include "extras.h"
@@ -117,6 +120,7 @@ private slots:
QString wardenDir, wardenIP, defaultIcon;
PBIBackend *PBI;
//INSTALLED TAB
+ int updatesAvailable;
QMenu *actionMenu, *appBinMenu, *shortcutMenu, *sDeskMenu, *sMenuMenu, *sMimeMenu, *contextActionMenu;
QString cDetails;
void initializeInstalledTab();
View
1  src-qt4/port-files/pkg-plist
@@ -2871,6 +2871,7 @@ lib/libpcbsd-utils.so.0.9.8
lib/libpcbsd-utils.so
lib/libpcbsd-utils.so.0
lib/libpcbsd-utils.so.0.9
+include/pcbsd-sysFlags.h
include/pcbsd-DLProcess.h
include/pcbsd-hardware.h
include/pcbsd-netif.h

No commit comments for this range

Something went wrong with that request. Please try again.