Ignore:
Timestamp:
08/22/13 11:16:48 (13 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
4f9718b, 7d207f5
Parents:
f981222
Message:

Add a new quick-launch button for starting up applications. This replaces using the icon as a button as well.
Also clean up some old commented out code in the process manager.

File:
1 edited

Legend:

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

    r603823a r80faf74  
    154154  //Setup the binary menu for installed applications 
    155155  appBinMenu = new QMenu(); 
    156   ui->tool_install_icon->setMenu(appBinMenu); 
     156  ui->tool_install_startApp->setMenu(appBinMenu); 
    157157    connect(appBinMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotStartApp(QAction*)) ); 
    158     //Now setup the action button 
    159     ui->tool_install_performaction->setMenu(actionMenu); 
    160     ui->tool_install_performaction->setPopupMode(QToolButton::InstantPopup); 
    161     //Now setup any defaults for the installed tab 
    162     ui->tool_install_gotobrowserpage->setEnabled(FALSE); //disable it until the browser is ready 
    163     ui->tree_install_apps->setIconSize(QSize(22,22)); 
    164     slotRefreshInstallTab(); 
     158  //Now setup the action button 
     159  ui->tool_install_performaction->setMenu(actionMenu); 
     160  ui->tool_install_performaction->setPopupMode(QToolButton::InstantPopup); 
     161  //Now setup any defaults for the installed tab 
     162  ui->tool_install_gotobrowserpage->setEnabled(FALSE); //disable it until the browser is ready 
     163  ui->tree_install_apps->setIconSize(QSize(22,22)); 
     164  slotRefreshInstallTab(); 
    165165} 
    166166 
     
    492492    //Now display that info on the UI 
    493493    ui->label_install_app->setText(vals[0]); 
    494     ui->tool_install_icon->setIcon( QIcon(vals[1]) ); 
     494    ui->label_install_icon->setPixmap( QPixmap(vals[1]) ); 
    495495    if(vals[3].isEmpty()){  
    496496      ui->label_install_author->setText(vals[2]);  
     
    511511      ui->tool_install_remove->setVisible(FALSE); 
    512512      ui->tool_install_update->setVisible(FALSE); 
     513      ui->tool_install_startApp->setVisible(FALSE); 
    513514    }else{ 
    514515      //Nothing pending 
     
    526527          else{ ui->tool_install_update->setIcon(QIcon(":icons/app_upgrade_small.png")); } 
    527528        } 
     529        //Start Application binaries 
     530        QStringList bins = PBI->pbiBinList(appID); 
     531        appBinMenu->clear(); 
     532        for(int i=0; i<bins.length(); i++){ 
     533          QAction *act = new QAction(this); 
     534            act->setText(bins[i].section("::::",0,0)); //set name 
     535            act->setWhatsThis(bins[i].section("::::",1,10)); //set command string 
     536          appBinMenu->addAction(act); 
     537        } 
     538        if(appBinMenu->isEmpty()){ ui->tool_install_startApp->setVisible(FALSE); } 
     539        else{ ui->tool_install_startApp->setVisible(TRUE); } 
    528540      }else{  
    529541        ui->tool_install_remove->setVisible(FALSE);  
    530542        ui->tool_install_update->setVisible(FALSE);  
     543        ui->tool_install_startApp->setVisible(FALSE); 
    531544      }    
    532545    } 
     
    563576      ui->progress_install_DL->setVisible(FALSE); 
    564577      ui->label_install_DL->setVisible(FALSE); 
    565   } 
    566   if(!statusonly){ 
    567     //Get the application binaries and set the icon to start them 
    568     QStringList bins = PBI->pbiBinList(appID); 
    569     appBinMenu->clear(); 
    570     if(bins.isEmpty()){ 
    571       ui->tool_install_icon->setAutoRaise(false); 
    572     }else{ 
    573       ui->tool_install_icon->setAutoRaise(true); 
    574       for(int i=0; i<bins.length(); i++){ 
    575         QAction *act = new QAction(this); 
    576             act->setText(bins[i].section("::::",0,0)); //set name 
    577             act->setWhatsThis(bins[i].section("::::",1,10)); //set command string 
    578         appBinMenu->addAction(act); 
    579       } 
    580     } 
    581578  } 
    582579} 
Note: See TracChangeset for help on using the changeset viewer.