Changeset 12aa30c


Ignore:
Timestamp:
05/12/14 05:31:48 (14 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
7a94ac6
Parents:
cf4efb2
Message:

Add orphan pkg filtering, (filtered by default), and move the application status notification location to a new widget on the bottom of the app details page (this will prevent the install button from changing size constantly). Also make sure that it is not re-checking the jails constantly when the app being viewed is downloading/installing.

Location:
src-qt4/pc-softwaremanager
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-softwaremanager/mainUI.cpp

    r7d1cdbb r12aa30c  
    154154void MainUI::on_actionDeveloper_Mode_triggered(){ 
    155155  ui->text_dev_output->setVisible(ui->actionDeveloper_Mode->isChecked()); 
     156} 
     157 
     158void MainUI::on_actionShow_Orphan_Packages_triggered(){ 
     159  slotRefreshInstallTab();       
    156160} 
    157161 
     
    301305  if(VISJAIL.isEmpty()){ ui->label_install_jail->setText( tr("Showing: Local System") ); } 
    302306  else{ ui->label_install_jail->setText( QString(tr("Showing Jail: %1")).arg(VISJAIL) ); } 
    303   QStringList installList = PBI->installedList(VISJAIL, ui->actionRaw_Inst_Packages->isChecked()); 
     307  QStringList installList = PBI->installedList(VISJAIL, ui->actionRaw_Inst_Packages->isChecked(), ui->actionShow_Orphan_Packages->isChecked()); 
    304308  //qDebug() << "Installed Pkgs:" << installList; 
    305309  installList.append( PBI->pendingInstallList() ); 
     
    825829void MainUI::slotUpdateAppDownloadButton(){ 
    826830  QString ico; 
    827   QStringList goodjails = PBI->jailsWithoutPkg(cApp); 
     831  QString stat = PBI->currentAppStatus(cApp); 
     832  QStringList goodjails; 
     833  if(stat.isEmpty()){ goodjails = PBI->jailsWithoutPkg(cApp); } //only do this if not currently running/pending 
     834  ui->label_app_status->setText(stat); 
     835  ui->label_app_status->setVisible( !stat.isEmpty() ); 
    828836  if( PBI->isWorking(cApp) ){ //app currently pending or actually doing something 
    829     ui->tool_bapp_download->setText( PBI->currentAppStatus(cApp) ); 
     837    ui->tool_bapp_download->setText( tr("Working") ); 
    830838    ui->tool_bapp_download->setIcon(QIcon(":icons/working.png")); 
    831839    ui->tool_bapp_download->setEnabled(false); 
  • src-qt4/pc-softwaremanager/mainUI.h

    r7d1cdbb r12aa30c  
    6868 
    6969  void on_actionRaw_Inst_Packages_triggered(); 
     70  void on_actionShow_Orphan_Packages_triggered(); 
    7071  void on_actionShow_Base_Packages_triggered(); 
    7172  void on_actionShow_Local_System_triggered(); 
  • src-qt4/pc-softwaremanager/mainUI.ui

    raae0e0b r12aa30c  
    139139     <widget class="QTabWidget" name="tabWidget"> 
    140140      <property name="currentIndex"> 
    141        <number>0</number> 
     141       <number>1</number> 
    142142      </property> 
    143143      <property name="iconSize"> 
     
    15431543             </spacer> 
    15441544            </item> 
     1545            <item> 
     1546             <widget class="QLabel" name="label_app_status"> 
     1547              <property name="styleSheet"> 
     1548               <string notr="true">QLabel{ background: rbga(50,190,255,130); border-radius: 5px; }</string> 
     1549              </property> 
     1550              <property name="text"> 
     1551               <string>TextLabel</string> 
     1552              </property> 
     1553              <property name="wordWrap"> 
     1554               <bool>true</bool> 
     1555              </property> 
     1556             </widget> 
     1557            </item> 
    15451558           </layout> 
    15461559          </widget> 
     
    17061719     <addaction name="actionSample"/> 
    17071720    </widget> 
     1721    <addaction name="actionShow_Orphan_Packages"/> 
    17081722    <addaction name="actionRaw_Inst_Packages"/> 
    17091723    <addaction name="actionShow_Base_Packages"/> 
     
    18711885   </property> 
    18721886  </action> 
     1887  <action name="actionShow_Orphan_Packages"> 
     1888   <property name="checkable"> 
     1889    <bool>true</bool> 
     1890   </property> 
     1891   <property name="text"> 
     1892    <string>Show Orphan Packages</string> 
     1893   </property> 
     1894  </action> 
    18731895 </widget> 
    18741896 <resources> 
  • src-qt4/pc-softwaremanager/pbiNgBackend.cpp

    rbbc8497 r12aa30c  
    7272} 
    7373 
    74 QStringList PBIBackend::installedList(QString injail, bool raw){ 
     74QStringList PBIBackend::installedList(QString injail, bool raw, bool orphan){ 
    7575   QStringList out; 
    7676   if( injail.isEmpty() ){  
     
    8080     for(int i=0; i<KL.length(); i++){ 
    8181       if(APPHASH.contains(KL[i])){ 
    82          if(APPHASH[KL[i]].isInstalled){ out << KL[i]; } 
     82         if(APPHASH[KL[i]].isOrphan && !orphan){ continue; } // filter out orphans 
     83         if(APPHASH[KL[i]].isInstalled ){ out << KL[i]; } 
    8384       }else if(PKGHASH.contains(KL[i])){ 
     85         if(PKGHASH[KL[i]].isOrphan && !orphan){ continue; } // filter out orphans 
    8486         if(PKGHASH[KL[i]].isInstalled){ out << KL[i]; } 
    8587       } 
    8688     } 
    8789   }else if( JAILPKGS.contains(injail) ){   
    88      out = JAILPKGS[injail].keys(); 
     90     QHash<QString, NGApp> hash = JAILPKGS[injail]; 
     91     QStringList tmp = hash.keys(); 
     92     for(int i=0; i<tmp.length(); i++){ 
     93       if(hash[tmp[i]].isOrphan && !orphan){ continue; } 
     94       out << tmp[i]; 
     95     } 
    8996   } 
    9097   return out;  
  • src-qt4/pc-softwaremanager/pbiNgBackend.h

    rd4c9f0db r12aa30c  
    4545        QString searchSimilar; 
    4646        // Main Listing functions 
    47         QStringList installedList(QString injail = "", bool raw = false); //return origin of all installed PBI's 
     47        QStringList installedList(QString injail = "", bool raw = false, bool orphan = false); //return origin of all installed PBI's 
    4848        QStringList pendingInstallList(); //return origin of all apps pending install 
    4949        QStringList pendingRemoveList(); //return origin of all apps pending removal 
Note: See TracChangeset for help on using the changeset viewer.