Ignore:
Timestamp:
02/20/14 14:48:48 (17 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
07e812b
Parents:
6b7fcc5
Message:

Add the ability for the AppCafe? to install random PBI files on the system through a menu option, and update the Installed tab interface a bit to make it more uniform between the two pages. Still have a couple things to do to finish it up, but it is perfectly functional.

File:
1 edited

Legend:

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

    r2916111d re543bca  
    124124void MainUI::on_actionAppCafe_Settings_triggered(){ 
    125125  PBI->openConfigurationDialog(); 
     126} 
     127 
     128void MainUI::on_actionInstall_From_File_triggered(){ 
     129  QStringList files = QFileDialog::getOpenFileNames(this, tr("Install PBI"), QDir::homePath(), tr("PBI Application (*.pbi)") ); 
     130  if(files.isEmpty()){ return; } //cancelled 
     131  //Verify that they want to install these applications 
     132  QStringList names; 
     133  for(int i=0; i<files.length(); i++){ names << files[i].section("/",-1); } 
     134  names.sort(); 
     135  if( QMessageBox::Yes == QMessageBox::question(this, tr("Verify Installation"), tr("Are you ready to begin installing these PBI's?")+"\n"+tr("NOTE: You will need to manually add desktop/menu icons through the AppCafe afterwards.")+"\n\n"+names.join("\n"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) ){ 
     136    //This might take a while, so don't allow the user to run this action again until it is done (thread safe though) 
     137    ui->actionInstall_From_File->setEnabled(false); 
     138    PBI->installPBIFromFile(files); 
     139    ui->actionInstall_From_File->setEnabled(true); 
     140  } 
    126141} 
    127142 
     
    164179  connect(ui->tree_install_apps, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(slotCheckSelectedItems()) ); 
    165180  slotRefreshInstallTab(); 
     181  qDebug() << "Detailed shortcuts button not implemented yet"; 
     182  ui->tool_install_shortcuts->setEnabled(false); 
    166183} 
    167184 
Note: See TracChangeset for help on using the changeset viewer.