Changeset cbead0d1


Ignore:
Timestamp:
12/12/13 15:08:39 (13 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
75b7abf
Parents:
8c6e16d
Message:

Update the new EasyPBI so that the backend is completely functional now. All of the module editor functionality is now up and working, I just need to update all the EasyPBI simplification buttons so they are available again with the package information system instead of the ports info system. I also still need to get the PBI building functionality up and running.

Location:
src-qt4/EasyPBI-devel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/EasyPBI-devel/ModuleUtils.cpp

    r0d8df9e rcbead0d1  
    4646  if(exec.contains("%%PBI_EXEDIR%%") || exec.contains("%%PBI_APPDIR%%") ){ 
    4747    QString sline = exec.section("%%",2,50); 
    48     if(sline.startsWith("/")){ sline.remove(1); } 
     48    if(sline.startsWith("/")){ sline = sline.remove(0,1); } 
    4949    return sline; 
    5050  }else{ 
  • src-qt4/EasyPBI-devel/PBIModule.cpp

    r0d8df9e rcbead0d1  
    129129        } 
    130130        if(val.endsWith("\"")){ val.chop(1); } //remove the ending quote 
    131       qDebug() << "var="+var+"\t\tval="+val; 
     131      //qDebug() << "var="+var+"\t\tval="+val; 
    132132      //Now check for text/bool/int values 
    133133      if(CTextValues.contains(var)){ HASH.insert(var,val); } 
     
    199199  }        
    200200  return out; 
     201} 
     202 
     203bool PBIModule::removeScript(QString var){ 
     204  return createFile(basePath+"/scripts/"+var, QStringList());    
    201205} 
    202206 
     
    335339QStringList PBIModule::listXdgMenuFiles(){ 
    336340  QStringList out; 
    337   QDir dir(basePath+"/xdg-desktop"); 
     341  QDir dir(basePath+"/xdg-menu"); 
    338342  if(dir.exists()){ 
    339343    out = dir.entryList(QStringList() << "*.desktop", QDir::Files | QDir::NoDotAndDotDot, QDir::Name); 
     
    346350  if(!fileName.endsWith(".desktop")){ fileName.append(".desktop"); } 
    347351  QStringList contents; 
    348   contents << "#!/bin/sh"; 
     352  contents << "#!/usr/bin/env"; 
    349353  contents << "[Desktop Entry]";         
    350354  for(int i=0; i<xdgTextValues.length(); i++){ 
     
    355359  for(int i=0; i<xdgBoolValues.length(); i++){ 
    356360    if(HASH.contains("XDG_"+xdgBoolValues[i])){ 
    357       QString val = "false"; 
    358       if(HASH["XDG_"+xdgBoolValues[i]].toBool()){ val = "true"; } 
    359       contents << xdgBoolValues[i]+"="+val; 
     361      if(HASH["XDG_"+xdgBoolValues[i]].toBool()){ 
     362        contents << xdgBoolValues[i]+"=true"; 
     363      } 
    360364    } 
    361365  } 
     
    367371  if(!fileName.endsWith(".desktop")){ fileName.append(".desktop"); } 
    368372  QStringList contents; 
    369   contents << "#!/bin/sh"; 
     373  contents << "#!/usr/bin/env"; 
    370374  contents << "[Desktop Entry]";         
    371375  for(int i=0; i<xdgTextValues.length(); i++){ 
     
    399403  for(int i=0; i<contents.length(); i++){ 
    400404    //Ignore specific/special lines 
    401     if(contents[i].startsWith("#!/bin/sh") || contents[i].startsWith("[Desktop Entry]") || contents[i].isEmpty() ){ continue; } 
     405    if(contents[i].startsWith("#") || contents[i].startsWith("[Desktop Entry]") || contents[i].isEmpty() ){ continue; } 
    402406    //Now check for known variables 
    403407    QString var = contents[i].section("=",0,0).simplified(); 
     
    406410      HASH.insert("XDG_"+var, val); 
    407411    }else if(xdgBoolValues.contains(var)){ 
    408       HASH.insert("XDG_"+var, var.toLower() == "true" ); 
     412      HASH.insert("XDG_"+var, val.toLower() == "true" ); 
    409413    }else{ 
    410414      extraLines << contents[i]; 
     
    424428  for(int i=0; i<contents.length(); i++){ 
    425429    //Ignore specific/special lines 
    426     if(contents[i].startsWith("#!/bin/sh") || contents[i].startsWith("[Desktop Entry]") || contents[i].isEmpty() ){ continue; } 
     430    if(contents[i].startsWith("#") || contents[i].startsWith("[Desktop Entry]") || contents[i].isEmpty() ){ continue; } 
    427431    //Now check for known variables 
    428432    QString var = contents[i].section("=",0,0).simplified(); 
     
    431435      HASH.insert("XDG_"+var, val); 
    432436    }else if(xdgBoolValues.contains(var)){ 
    433       HASH.insert("XDG_"+var, var.toLower() == "true" ); 
     437      HASH.insert("XDG_"+var, val.toLower() == "true" ); 
    434438    }else{ 
    435439      extraLines << contents[i]; 
  • src-qt4/EasyPBI-devel/PBIModule.h

    r0d8df9e rcbead0d1  
    4343        //Scripts 
    4444        QStringList readScript(QString); 
     45        bool removeScript(QString); 
    4546        bool writeScript(QString,QStringList); 
    4647        QStringList validScripts(); 
  • src-qt4/EasyPBI-devel/mainGUI.cpp

    r0d8df9e rcbead0d1  
    1616       //Setup Initial state of GUI objects and connect signal/slots 
    1717       ui->setupUi(this);  //load the mainGUI.ui file 
    18         // Create the module class as necessary 
    19         currentModule = new ModBuild(); 
    2018        // Create the config class 
    2119        settings = new Config(); 
     
    3836        ui->toolBar->addWidget(line_module); 
    3937        ui->toolBar->addSeparator(); 
    40         //radio_module_port = new QRadioButton(tr("FreeBSD Port"),this); 
    41         //radio_module_port->setEnabled(FALSE); 
    42         //ui->toolBar->addWidget(radio_module_port); 
    43         //radio_module_local = new QRadioButton(tr("Local Sources"),this); 
    44         //radio_module_local->setEnabled(FALSE); 
    45         //ui->toolBar->addWidget(radio_module_local); 
    4638        //Setup Module Editor 
    4739        connect(ui->tabWidget, SIGNAL(currentChanged(int)),this,SLOT(slotModTabChanged(int)) ); //setup to refresh each tab once it is selected 
    4840        // -- pbi.conf tab -- 
    49         //ui->push_change_progdir->setIcon(Backend::icon("load")); 
    5041        ui->push_change_makeport->setIcon(Backend::icon("file")); 
    51         //ui->push_addmakeopt->setIcon(Backend::icon("left")); 
    52         //ui->push_addmakeopt->setMenu(&menu_addOpt); 
    53         //connect(&menu_addOpt,SIGNAL(triggered(QAction*)),this,SLOT(slotAddMakeOption(QAction*)) ); 
    5442        ui->push_config_save->setIcon(Backend::icon("save")); 
    5543        // -- resources tab -- 
     
    9785      connect(ui->line_progversion,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    9886      connect(ui->line_progweb,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    99       //connect(ui->line_progdir,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
     87      connect(ui->line_config_license,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    10088      connect(ui->line_makeport,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    10189      connect(ui->list_progicon,SIGNAL(currentIndexChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    102       //connect(ui->edit_makeopts,SIGNAL(textChanged()),this,SLOT(slotOptionChanged()) ); 
     90      connect(ui->line_repoTags,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
     91      connect(ui->line_repoType,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
     92      connect(ui->line_repoCat,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
     93      connect(ui->line_repoIconURL,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
     94      connect(ui->spin_repoBuildKey,SIGNAL(valueChanged(QString)),this,SLOT(slotOptionChanged()) ); 
     95      connect(ui->spin_repoPriority,SIGNAL(valueChanged(QString)),this,SLOT(slotOptionChanged()) ); 
     96      connect(ui->spin_repoRevision,SIGNAL(valueChanged(QString)),this,SLOT(slotOptionChanged()) ); 
    10397      connect(ui->check_requiresroot, SIGNAL(clicked()),this,SLOT(slotOptionChanged()) ); 
     98      connect(ui->check_config_nopkg, SIGNAL(clicked()),this,SLOT(slotOptionChanged()) ); 
     99      connect(ui->check_config_notmpfs, SIGNAL(clicked()),this,SLOT(slotOptionChanged()) ); 
     100      connect(ui->group_config_overrides, SIGNAL(clicked()), this, SLOT(updateConfigVisibility()) ); 
     101      connect(ui->group_config_repo, SIGNAL(clicked()), this, SLOT(updateConfigVisibility()) ); 
     102      connect(ui->group_config_repomgmt, SIGNAL(clicked()), this, SLOT(updateConfigVisibility()) ); 
    104103      // Resources tab 
    105104      connect(ui->text_resources_script,SIGNAL(textChanged()),this,SLOT(slotResourceScriptChanged()) ); 
     
    206205  // ------PBI.CONF------ 
    207206  if( doall || doeditor || (item == "pbiconf")){ 
    208     qDebug() << "Update conf tab"; 
    209207    //Update options visibility 
    210208    updateConfigVisibility(); 
    211209    //Now reset the options to the current module values 
    212     qDebug() << "Load config"; 
    213210    MODULE.loadConfig(); 
    214211    // -- check boxes 
    215     qDebug() << "Set bool values"; 
    216212    ui->check_requiresroot->setChecked( MODULE.isEnabled("PBI_REQUIRESROOT") ); 
    217213    ui->check_config_nopkg->setChecked( MODULE.isEnabled("PBI_AB_NOPKGBUILD") ); 
    218214    ui->check_config_notmpfs->setChecked( MODULE.isEnabled("PBI_AB_NOTMPFS") ); 
    219215    // -- Text Values 
    220     qDebug() << "Set text values"; 
    221216    ui->line_progname->setText( MODULE.text("PBI_PROGNAME") ); 
    222217    ui->line_progversion->setText( MODULE.text("PBI_PROGVERSION") ); 
     
    228223    ui->line_repoCat->setText( MODULE.text("PBI_CATEGORY") ); 
    229224    ui->line_repoIconURL->setText( MODULE.text("PBI_ICONURL") ); 
     225    ui->line_repoType->setText( MODULE.text("PBI_PROGTYPE") ); 
    230226    // -- Combo Boxes (filled with individual items from text) 
    231     qDebug() << "Show mkportafter items"; 
    232227    ui->list_portafter->clear(); 
    233228    ui->list_portafter->addItems( MODULE.text("PBI_MKPORTAFTER").split("\n") ); 
    234229    // -- Integer Values 
    235     qDebug() << "Show number values"; 
    236230    ui->spin_repoBuildKey->setValue( MODULE.number("PBI_BUILDKEY") ); 
    237231    ui->spin_repoPriority->setValue( MODULE.number("PBI_AB_PRIORITY") ); 
    238232    ui->spin_repoRevision->setValue( MODULE.number("PBI_PROGREVISION") ); 
    239233    // -- Combo Boxes (Select the proper item only) 
    240     qDebug() << "Show Icon list"; 
    241234    QStringList icons = MODULE.existingResources().filter(".png"); 
     235    ui->list_progicon->clear(); 
    242236    if(icons.length() > 0){ 
    243237      for(int i=0; i<icons.length(); i++){ 
     
    253247      ui->list_progicon->addItem( MODULE.text("PBI_PROGICON") ); 
    254248    } 
    255     qDebug() << "Done with config"; 
     249    //Now disable the save button 
    256250    ui->push_config_save->setEnabled(FALSE);  //disable the save button until something changes 
    257251  } 
    258252  // -----RESOURCES-------- 
    259253  if( doall || doeditor || (item == "resources")){ 
    260     qDebug() << "Update Resources tab"; 
    261254    //Get the all the current files in the resources category and add them to the list 
    262255    QStringList rs = MODULE.existingResources(); //currentModule->filesAvailable("resources"); 
     
    273266  //------XDG------ 
    274267  if( doall || doeditor || (item == "xdg")){ 
    275     qDebug() << "Update XDG tab"; 
    276268    slotXdgTypeChanged(); 
    277269  } 
    278270  //------SCRIPTS----- 
    279271  if( doall || doeditor || (item == "scripts")){ 
    280     qDebug() << "Update Scripts tab"; 
    281272    //Update the list of available scripts and determine if one needs to be read 
    282273    bool loadScript = FALSE; 
     
    314305  //------EXTERNAL-LINKS------ 
    315306  if( doall || doeditor || (item == "external-links")){ 
    316     qDebug() << "Update external links tab"; 
    317307    //nothing to make visible/invisible here 
    318308    //Load the external-links file 
     
    345335  //------PBI BUILDER-------- 
    346336  if( doall || (item == "pbibuild")){ 
    347     qDebug() << "Update PBI Build tab"; 
    348337    if(PBI_BUILDING_NOW.isEmpty()){ 
    349338      //only change things if there is nothing building at the moment 
     
    355344  //------OVERALL SETTINGS------ 
    356345  if( doall || doeditor ){ 
    357     qDebug() << "Update extra settings"; 
    358346    //Enable/disable the buttons that require the FreeBSD ports tree 
    359347    if( settings->check("isportsavailable") ){ 
     
    373361    this->setFocus(); 
    374362  } 
    375   qDebug() << "Finished updating GUI"; 
    376363} 
    377364/*---------------------------------- 
     
    418405  if(!line_module->text().isEmpty()){ 
    419406        //Get the currently selected port 
    420         port = currentModule->readValue("makeport"); 
     407        port = MODULE.text("PBI_MAKEPORT"); 
    421408  } 
    422409  QString target_url = "http://www.freshports.org/" + port; 
     
    465452    } 
    466453  } 
     454  //Move to the pbi.conf tab 
     455  ui->tabWidget->setCurrentWidget(ui->tab_pbi_conf); 
    467456  //Refresh the UI 
    468   refreshGUI("all"); 
     457  refreshGUI("pbiconf"); 
    469458  delete dlg; 
    470459} 
     
    478467    line_module->setText(MODULE.basepath().replace(QDir::homePath(),"~"));  
    479468  } 
    480   refreshGUI("all"); 
     469  //Move to the pbi.conf tab 
     470  ui->tabWidget->setCurrentWidget(ui->tab_pbi_conf); 
     471  //Refresh the UI 
     472  refreshGUI("pbiconf"); 
    481473} 
    482474 
     
    527519  ui->push_config_save->setEnabled(TRUE); 
    528520} 
    529 /* 
    530 void MainGUI::on_push_change_progdir_clicked(){ 
    531   //Prompt for a new directory 
    532   QString dirSel = QFileDialog::getExistingDirectory(this, tr("Select Package Directory"), QDir::homePath()); 
    533   if(dirSel.isEmpty()){return;} //action cancelled or closed     
    534   //Save the port info to the GUI 
    535   //ui->line_progdir->setText(dirSel); 
    536   ui->push_config_save->setEnabled(TRUE); 
    537 }*/ 
    538  
    539 void MainGUI::slotAddMakeOption(QAction* act){ 
    540   qDebug() << "Trying to add build option:" << act->text(); 
    541   QString opt = act->text(); 
    542   if(opt.isEmpty() ){ return; } //Do nothing if nothing selected 
    543   //Check whther the option is set or unset 
    544   QString typ = opt.section("_",0,0,QString::SectionSkipEmpty).toLower(); //get the type 
    545   opt = opt.section("_",1,50,QString::SectionSkipEmpty); //trim off the type of setting 
    546   QString chk = currentModule->readValue("makeport").section("/",-1); 
    547   bool isSet; 
    548   if(typ == "with"){chk.append("_SET"); isSet=TRUE;} 
    549   else if(typ=="without"){chk.append("_UNSET"); isSet=FALSE;} 
    550   else{ qDebug() << "Error: Unknown option type:"<<typ<<"option:"<<opt; return; } 
    551   //Now read the current option settings 
    552   QStringList curr; //= ui->edit_makeopts->toPlainText().split("\n"); //split according to lines 
    553   bool found = FALSE; 
    554   for(int i=0; i<curr.length(); i++){ 
    555     if(curr[i].contains(chk) ){ //look for optionsNG framework 
    556       found = TRUE;          
    557       QStringList cOpts = curr[i].split(" ",QString::SkipEmptyParts); 
    558       if( !cOpts.contains(opt) ){ 
    559         //Not found, add it to the end of the list 
    560         cOpts << opt; 
    561         curr[i] = cOpts.join(" "); 
    562       } 
    563     }else if(curr[i].contains(opt)){ //look for legacy options framework 
    564       QStringList cOpts = curr[i].split(" ",QString::SkipEmptyParts); 
    565       int index = cOpts.indexOf(opt); 
    566       if(index != -1){ //option currently set somehow 
    567         found = TRUE;  
    568         if(isSet){ //option should be set 
    569           if( cOpts[index].contains("WITH_"+opt) ){} //Already set 
    570           else if( cOpts[index].contains("WITHOUT_"+opt) ){ cOpts[index] = "WITH_"+opt+"=true"; } 
    571           else if( curr[i].contains(chk.replace("_SET","_UNSET")) ){ cOpts.removeAt(index); found=FALSE;} //Remove the inverse option if it is set 
    572         }else{ //options should be unset 
    573           if( cOpts[index].contains("WITHOUT_"+opt) ){} //Already set 
    574           else if( cOpts[index].contains("WITH_"+opt) ){ cOpts[index] = "WITHOUT_"+opt+"=true"; } 
    575           else if( curr[i].contains(chk.replace("_UNSET","_SET")) ){ cOpts.removeAt(index); found=FALSE;} //Remove the inverse option if it is set 
    576         } 
    577         curr[i] = cOpts.join(" "); //put the line back together 
    578       } 
    579     } //end checking different options frameworks 
    580   } // end loop over lines 
    581   if(!found){ 
    582     //Append the option to the end on a new line 
    583     curr << chk+"= "+opt; 
    584   } 
    585   //Now put the new options list back onto the GUI 
    586   //ui->edit_makeopts->setPlainText(curr.join("\n")); 
    587   ui->push_config_save->setEnabled(TRUE); 
    588 } 
    589 /* 
    590 void MainGUI::on_push_addportbefore_clicked(){ 
    591   if( !settings->check("isportsavailable") ){ 
    592     //No ports tree available 
    593     QMessageBox::warning(this,tr("EasyPBI: No FreeBSD Ports"), tr("The FreeBSD Ports tree could not be found on your system. You may fetch the ports tree through the EasyPBI menu or manually set the path to the port tree in the EasyPBI preferences if it is installed in a non-standard location.")); 
    594   } 
    595   //Prompt for a new port 
    596   QString portSel = QFileDialog::getExistingDirectory(this, tr("Select Port"), settings->value("portsdir")); 
    597   if(portSel.isEmpty()){return;} //action cancelled or closed    
    598   //Check if the port is valid 
    599   if( !isValidPort(portSel,TRUE) ){ 
    600     return; 
    601   } 
    602   //Save the port info to the GUI 
    603   //if(ui->list_portbefore->count() == 1 && ui->list_portbefore->currentText().isEmpty() ){ ui->list_portbefore->clear(); } 
    604   //ui->list_portbefore->addItem(portSel.remove(settings->value("portsdir")+"/")); 
    605   ui->push_config_save->setEnabled(TRUE); 
    606 } 
    607  
    608 void MainGUI::on_push_rmportbefore_clicked(){ 
    609   //int index = ui->list_portbefore->currentIndex(); 
    610   //if(index != -1){ 
    611     //ui->list_portbefore->removeItem(index); 
    612   //} 
    613   //ui->push_config_save->setEnabled(TRUE); 
    614 } 
    615 */ 
     521 
    616522void MainGUI::on_push_addportafter_clicked(){ 
    617523  if( !settings->check("isportsavailable") ){ 
     
    642548void MainGUI::on_push_config_save_clicked(){ 
    643549  //Save the current settings to the backend structures 
    644     //global settings for all modules 
    645     currentModule->writeValue("progname",ui->line_progname->text()); 
    646     currentModule->writeValue("progweb",ui->line_progweb->text()); 
    647     currentModule->writeValue("progauthor",ui->line_progauthor->text()); 
    648     currentModule->writeValue("progicon",ui->list_progicon->currentText()); 
    649     if(ui->check_requiresroot->isChecked()){ currentModule->writeValue("requiresroot", "true"); } 
    650     else{ currentModule->writeValue("requiresroot","false"); } 
    651     //Module-dependant settings 
    652     bool newport = FALSE; 
    653     //if( radio_module_port->isChecked() ){ //FreeBSD port module 
    654         if(currentModule->readValue("makeport") != ui->line_makeport->text()){ newport=TRUE; } 
    655         currentModule->writeValue("makeport",ui->line_makeport->text()); 
    656         //currentModule->writeValue("makeoptions",ui->edit_makeopts->toPlainText()); 
    657         QString tmp; 
    658         //for(int i=0; i < ui->list_portbefore->count(); i++){ 
    659           //tmp.append(" "+ui->list_portbefore->itemText(i) ); 
    660         //} 
    661         //currentModule->writeValue("makeportbefore",tmp.simplified()); 
    662         tmp.clear(); 
    663         for(int i=0; i < ui->list_portafter->count(); i++){ 
    664           tmp.append(" "+ui->list_portafter->itemText(i) ); 
    665         } 
    666         currentModule->writeValue("makeportafter",tmp.simplified()); 
    667          
    668     /*}else{ //local sources module 
    669         //currentModule->writeValue("packagedir",ui->line_progdir->text()); 
    670         currentModule->writeValue("progversion",ui->line_progversion->text()); 
    671     }*/ 
     550  //Text Values 
     551  MODULE.setText("PBI_PROGNAME", ui->line_progname->text()); 
     552  MODULE.setText("PBI_PROGVERSION", ui->line_progversion->text()); 
     553  MODULE.setText("PBI_PROGWEB", ui->line_progweb->text()); 
     554  MODULE.setText("PBI_PROGAUTHOR", ui->line_progauthor->text()); 
     555  MODULE.setText("PBI_LICENSE", ui->line_config_license->text()); 
     556  MODULE.setText("PBI_TAGS", ui->line_repoTags->text()); 
     557  MODULE.setText("PBI_CATEGORY", ui->line_repoCat->text()); 
     558  MODULE.setText("PBI_ICONURL", ui->line_repoIconURL->text()); 
     559  MODULE.setText("PBI_PROGTYPE", ui->line_repoType->text()); 
     560  //True/False values 
     561  MODULE.setEnabled("PBI_REQUIRESROOT", ui->check_requiresroot->isChecked()); 
     562  MODULE.setEnabled("PBI_AB_NOPKGBUILD", ui->check_config_nopkg->isChecked()); 
     563  MODULE.setEnabled("PBI_AB_NOTMPFS", ui->check_config_notmpfs->isChecked()); 
     564  //Combo Boxes 
     565  QStringList addports; 
     566  for(int i=0; i<ui->list_portafter->count(); i++){ addports << ui->list_portafter->itemText(i); } 
     567  MODULE.setText("PBI_MKPORTAFTER", addports.join("\n") ); 
     568  MODULE.setText("PBI_PROGICON", ui->list_progicon->currentText() ); 
     569  //Number values 
     570  MODULE.setNumber("PBI_BUILDKEY", ui->spin_repoBuildKey->value() ); 
     571  MODULE.setNumber("PBI_AB_PRIORITY", ui->spin_repoPriority->value() ); 
     572  MODULE.setNumber("PBI_PROGREVISION", ui->spin_repoRevision->value() ); 
     573   
    672574  //save the new settings to pbi.conf 
    673   bool ok = currentModule->writePBIconf(); 
     575  bool ok = MODULE.saveConfig(); 
    674576  if(!ok){ 
    675577    //Display a warning that the file could not be saved 
    676     qDebug() << "Error: pbi.conf could not be written:" << currentModule->path()+"/pbi.conf"; 
    677578    QMessageBox::warning(this,tr("EasyPBI Error"), tr("The PBI configuration file could not be saved. Please check your file permissions before trying again.")); 
    678   }else if(newport){ 
    679     //Refresh the port information if the main port changed 
    680     currentModule->readPortInformation(settings->value("portsdir")+"/"+ui->line_makeport->text()); 
    681     refreshGUI("pbiconf"); 
    682     ui->push_config_save->setEnabled(false); //make sure the save button goes inactive once saved 
     579    //re-load the current PBI.conf into the backend 
     580    MODULE.loadConfig(); 
    683581  }else{ 
    684582    ui->push_config_save->setEnabled(false); //make sure the save button goes inactive once saved 
     
    795693*/ 
    796694void MainGUI::slotXdgTypeChanged(){ 
    797   //Update the file list appropriately 
     695  XDGUPDATING=true; 
     696  //Update the file list appropriately   
    798697  if(ui->radio_xdg_desktop->isChecked()){ 
    799698    //update the files available 
     
    828727  if( ui->list_xdg_files->count() > 0){ ui->list_xdg_files->setCurrentRow(0); } 
    829728  //Update the program icon list for new entries 
    830   //QStringList icons = currentModule->currentIcons; 
     729  ui->list_xdg_icon->clear(); 
     730  QStringList icons = MODULE.existingResources().filter(".png"); 
     731  if(icons.length() > 0){ 
     732      for(int i=0; i<icons.length(); i++){ 
     733        ui->list_xdg_icon->addItem(QIcon(MODULE.basepath()+"/resources/"+icons[i]),icons[i]); 
     734      }      
     735  } 
    831736 
    832737  //Update the buttons that only need a refresh when the type changes (such as menu's) 
     
    850755    } 
    851756  } 
     757  XDGUPDATING=false; 
    852758  //Now update read the currently selected file 
    853759  slotXdgFileChanged(); 
     
    855761 
    856762void MainGUI::slotXdgFileChanged(){      
     763  if(XDGUPDATING){ return; } 
    857764  bool clearUI =FALSE; 
    858765  if(ui->list_xdg_files->currentRow() == -1){ clearUI=TRUE; } 
     
    959866void MainGUI::on_push_xdg_remove_clicked(){ 
    960867  //Figure out if a file is selected 
    961   if( ui->list_xdg_files->currentItem()->text().isEmpty() ){ return; } 
     868  QString desktopFile = ui->list_xdg_files->currentItem()->text(); 
     869  if( desktopFile.isEmpty() ){ return; } 
    962870  //Now remove the file 
    963871  bool ok = FALSE; 
    964872  if( ui->radio_xdg_desktop->isChecked() ){ 
    965     ok = currentModule->removeDesktop(); 
     873    ok = MODULE.removeXdgDesktop(desktopFile); 
    966874  }else if( ui->radio_xdg_menu->isChecked() ){ 
    967     ok = currentModule->removeMenu(); 
     875    //Check for a MIME type to remove as well 
     876    ui->line_xdg_mimepatterns->setText(""); //make sure we remove any MIME file 
     877    MODULE.loadXdgMenu(desktopFile); //load the file's mimetype 
     878    checkMime(); //perform the removal if appropriate 
     879    ok = MODULE.removeXdgMenu(desktopFile); 
    968880  } 
    969881  //Now inform the user if there was an error 
     
    979891  //save the current UI settings to the module structure then save the file 
    980892  bool ok = FALSE; 
     893  QString desktopFile = ui->list_xdg_files->currentItem()->text(); 
     894  if(desktopFile.isEmpty()){ return; } 
     895  //Make sure the backend is currently set for this file 
     896  if( ui->radio_xdg_desktop->isChecked() ){ MODULE.loadXdgDesktop(desktopFile); } 
     897  else if(ui->radio_xdg_menu->isChecked() ){ MODULE.loadXdgMenu(desktopFile); } 
     898  //Save the values into the backend module structure 
     899  MODULE.setXdgText("Value", "1.0"); 
     900  MODULE.setXdgText("Type", "Application"); 
     901  MODULE.setXdgText("Name", ui->line_xdg_name->text()); 
     902  MODULE.setXdgText("GenericName", ui->line_xdg_name->text().toLower()); 
     903  MODULE.setXdgText("Exec", ModuleUtils::generateXdgExec(ui->line_xdg_exec->text(), ui->check_xdg_requiresroot->isChecked()) ); 
     904  MODULE.setXdgText("Icon", ModuleUtils::generateXdgPath(ui->list_xdg_icon->currentText()) ); 
     905  MODULE.setXdgText("Path", ModuleUtils::generateXdgPath("") ); 
     906  MODULE.setXdgEnabled("Terminal",ui->check_xdg_terminal->isChecked()); 
     907  MODULE.setXdgEnabled("NoDisplay",ui->check_xdg_nodisplay->isChecked()); 
     908  MODULE.setXdgEnabled("StartupNotify", true); 
    981909  if( ui->radio_xdg_desktop->isChecked() ){ 
    982     currentModule->writeValue("desktopname",ui->line_xdg_name->text()); 
    983     currentModule->writeValue("desktopgenericname",ui->line_xdg_name->text().toLower()); 
    984     currentModule->writeValue("desktopexec",ui->line_xdg_exec->text()); 
    985     currentModule->writeValue("desktopicon",ui->list_xdg_icon->currentText()); 
    986     QString checked = "false"; 
    987     if(ui->check_xdg_terminal->isChecked()){ checked="true"; } 
    988     currentModule->writeValue("desktopterminal",checked); 
    989     checked = "false"; 
    990     if(ui->check_xdg_nodisplay->isChecked()){ checked="true"; } 
    991     currentModule->writeValue("desktopnodisplay",checked); 
    992     checked = "false"; 
    993     if(ui->check_xdg_requiresroot->isChecked()){ checked="true"; } 
    994     currentModule->writeValue("desktoprequiresroot", checked); 
     910    //clear the menu entry values 
     911    MODULE.setXdgText("Categories", ""); 
     912    MODULE.setXdgText("MimeType", ""); 
    995913    //Now save the file 
    996     ok = currentModule->writeDesktop(); 
    997      
     914    ok = MODULE.saveXdgDesktop(desktopFile); 
    998915  }else if( ui->radio_xdg_menu->isChecked() ){ 
    999     currentModule->writeValue("menuname",ui->line_xdg_name->text()); 
    1000     currentModule->writeValue("menugenericname",ui->line_xdg_name->text().toLower()); 
    1001     currentModule->writeValue("menuexec",ui->line_xdg_exec->text()); 
    1002     currentModule->writeValue("menuicon",ui->list_xdg_icon->currentText()); 
    1003     currentModule->writeValue("menucategories", ui->line_xdg_menu->text()); 
    1004     QString checked = "false"; 
    1005     if(ui->check_xdg_terminal->isChecked()){ checked="true"; } 
    1006     currentModule->writeValue("menuterminal",checked); 
    1007     checked = "false"; 
    1008     if(ui->check_xdg_nodisplay->isChecked()){ checked="true"; } 
    1009     currentModule->writeValue("menunodisplay",checked); 
    1010     checked = "false"; 
    1011     if(ui->check_xdg_requiresroot->isChecked()){ checked="true"; } 
    1012     currentModule->writeValue("menurequiresroot", checked); 
     916    //Setup the menu entry values 
     917    MODULE.setXdgText("Categories", ui->line_xdg_menu->text()); 
    1013918    //Setup the mime type associations as appropriate 
    1014919    checkMime(); 
    1015920    //Now save the file 
    1016     ok = currentModule->writeMenu();     
     921    ok = MODULE.saveXdgMenu(desktopFile);     
    1017922  } 
    1018923  //Now inform the user if there was an error 
     
    1021926  } 
    1022927  //Now refresh the GUI 
    1023   //refreshGUI("xdg"); //refresh the entire tab 
    1024928  slotXdgFileChanged(); //only update the proper half of the tab 
    1025929} 
     
    1032936  if(ui->radio_xdg_desktop->isChecked() ){ 
    1033937    filename = ui->line_xdg_exec->text().section("/",-1); 
    1034     cFiles = currentModule->filesAvailable("xdg-desktop").replaceInStrings(".desktop",""); 
     938    cFiles = MODULE.listXdgDesktopFiles().replaceInStrings(".desktop",""); 
    1035939  }else if(ui->radio_xdg_menu->isChecked() ){ 
    1036940    filename = ui->line_xdg_exec->text().section("/",-1); 
    1037     cFiles = currentModule->filesAvailable("xdg-menu").replaceInStrings(".desktop",""); 
    1038   } 
    1039   if(filename.isEmpty()){ return;} 
     941    cFiles = MODULE.listXdgMenuFiles().replaceInStrings(".desktop",""); 
     942  } 
     943  if(filename.isEmpty()){ return; } 
    1040944   
    1041945  if(cFiles.indexOf(filename) != -1){ 
     
    1046950  //save the current UI settings to the module structure then save the file 
    1047951  bool ok = FALSE; 
     952  if(filename.isEmpty()){ return; } 
     953  //Make sure the backend structure is currently empty 
     954  MODULE.clearXdgData(); 
     955  //Save the values into the backend module structure 
     956  MODULE.setXdgText("Value", "1.0"); 
     957  MODULE.setXdgText("Type", "Application"); 
     958  MODULE.setXdgText("Name", ui->line_xdg_name->text()); 
     959  MODULE.setXdgText("GenericName", ui->line_xdg_name->text().toLower()); 
     960  MODULE.setXdgText("Exec", ModuleUtils::generateXdgExec(ui->line_xdg_exec->text(), ui->check_xdg_requiresroot->isChecked()) ); 
     961  MODULE.setXdgText("Icon", ModuleUtils::generateXdgPath(ui->list_xdg_icon->currentText()) ); 
     962  MODULE.setXdgText("Path", ModuleUtils::generateXdgPath("") ); 
     963  MODULE.setXdgEnabled("Terminal",ui->check_xdg_terminal->isChecked()); 
     964  MODULE.setXdgEnabled("NoDisplay",ui->check_xdg_nodisplay->isChecked()); 
     965  MODULE.setXdgEnabled("StartupNotify", true); 
    1048966  if( ui->radio_xdg_desktop->isChecked() ){ 
    1049     currentModule->loadDesktop(filename+".desktop"); //get the new file ready 
    1050     currentModule->writeValue("desktopname",ui->line_xdg_name->text()); 
    1051     currentModule->writeValue("desktopgenericname",ui->line_xdg_name->text().toLower()); 
    1052     currentModule->writeValue("desktopexec",ui->line_xdg_exec->text()); 
    1053     currentModule->writeValue("desktopicon",ui->list_xdg_icon->currentText()); 
    1054     QString checked = "false"; 
    1055     if(ui->check_xdg_terminal->isChecked()){ checked="true"; } 
    1056     currentModule->writeValue("desktopterminal",checked); 
    1057     checked = "false"; 
    1058     if(ui->check_xdg_nodisplay->isChecked()){ checked="true"; } 
    1059     currentModule->writeValue("desktopnodisplay",checked); 
    1060     checked = "false"; 
    1061     if(ui->check_xdg_requiresroot->isChecked()){ checked="true"; } 
    1062     currentModule->writeValue("desktoprequiresroot", checked); 
     967    //clear the menu entry values 
     968    MODULE.setXdgText("Categories", ""); 
     969    MODULE.setXdgText("MimeType", ""); 
    1063970    //Now save the file 
    1064     ok = currentModule->writeDesktop(); 
    1065      
     971    ok = MODULE.saveXdgDesktop(filename); 
    1066972  }else if( ui->radio_xdg_menu->isChecked() ){ 
    1067     currentModule->loadMenu(filename+".desktop"); //get the new file ready 
    1068     //Update the MIME associations 
     973    //Setup the menu entry values 
     974    MODULE.setXdgText("Categories", ui->line_xdg_menu->text()); 
     975    //Setup the mime type associations as appropriate 
    1069976    checkMime(); 
    1070     //Save the MENU values 
    1071     currentModule->writeValue("menuname",ui->line_xdg_name->text()); 
    1072     currentModule->writeValue("menugenericname",ui->line_xdg_name->text().toLower()); 
    1073     currentModule->writeValue("menuexec",ui->line_xdg_exec->text()); 
    1074     currentModule->writeValue("menuicon",ui->list_xdg_icon->currentText()); 
    1075     currentModule->writeValue("menucategories", ui->line_xdg_menu->text()); 
    1076     QString checked = "false"; 
    1077     if(ui->check_xdg_terminal->isChecked()){ checked="true"; } 
    1078     currentModule->writeValue("menuterminal",checked); 
    1079     checked = "false"; 
    1080     if(ui->check_xdg_nodisplay->isChecked()){ checked="true"; } 
    1081     currentModule->writeValue("menunodisplay",checked); 
    1082     checked = "false"; 
    1083     if(ui->check_xdg_requiresroot->isChecked()){ checked="true"; } 
    1084     currentModule->writeValue("menurequiresroot", checked); 
    1085977    //Now save the file 
    1086     ok = currentModule->writeMenu();     
     978    ok = MODULE.saveXdgMenu(filename);     
    1087979  } 
    1088980  //Now inform the user if there was an error 
    1089981  if(!ok){ 
    1090     QMessageBox::warning(this, tr("EasyPBI Error"), tr("Could not save the changes to the XDG entry.")+"\n"+tr("Check the file permissions and try again") ); 
     982    QMessageBox::warning(this, tr("EasyPBI Error"), tr("Could not create the XDG entry.")+"\n"+tr("Check the file permissions and try again") ); 
    1091983  } 
    1092984  //Now refresh the GUI 
     
    11091001      // The MENU mime type will also be appropriately set 
    11101002         
    1111     QString menumimetype = currentModule->readValue("menumimetype"); 
    1112     QString menumimepat = ui->line_xdg_mimepatterns->text(); 
    1113     QString cmimetype = currentModule->readValue("mimetype"); 
    1114     QString cmimepat = currentModule->readValue("mimepatterns"); 
    1115     if( menumimepat != cmimepat ){ //something different about the mime patterns 
    1116         //  ---- Change the MIME file as well ---- 
    1117           //Delete MIME file 
    1118         if(menumimepat.isEmpty()){ 
    1119           currentModule->removeMime(); 
    1120           currentModule->writeValue("menumimetype",""); //set MENU value 
    1121                  
    1122           //Create new MIME file 
    1123         }else if( cmimetype.isEmpty() || (ui->line_xdg_exec->text() != currentModule->readValue("menuexec")) ){ 
    1124           QString exec = ui->line_xdg_exec->text().simplified(); 
    1125           menumimetype = "application/x-"+exec; 
    1126           QString newfile = exec+"-xdg.xml"; 
    1127           currentModule->loadMime(newfile); //setup structure 
    1128           currentModule->writeValue("mimetype",menumimetype); //set mime type 
    1129           currentModule->writeValue("mimepatterns",menumimepat); //set mime patterns 
    1130           currentModule->writeMime(); //save the MIME file (using default mime info) 
    1131                  
    1132           currentModule->writeValue("menumimetype",menumimetype); //set MENU value 
    1133                  
    1134           //Overwrite existing MIME file 
    1135         }else{ 
    1136           currentModule->writeValue("mimepatterns", menumimepat); //overwrite mime patterns 
    1137           currentModule->writeMime(); //overwrite the MIME file 
    1138                  
    1139           currentModule->writeValue("menumimetype",cmimetype); //set MENU value 
     1003    //Get the current/desired values 
     1004    QString newPatterns = ui->line_xdg_mimepatterns->text().simplified(); 
     1005    QString cmimetype = MODULE.xdgText("MimeType"); //in the desktop/menu file 
     1006         
     1007    //Determine the action necessary 
     1008    int stat = 0; //do nothing by default 
     1009    if( newPatterns.isEmpty() && !cmimetype.isEmpty() ){ stat = 1; } //remove old mime file 
     1010    else if( !newPatterns.isEmpty() && !cmimetype.isEmpty() ){stat = 2; } //update mime file 
     1011    else if( !newPatterns.isEmpty() && cmimetype.isEmpty() ){stat = 3; } //new mime file 
     1012    qDebug() << "CheckMime:" << QString::number(stat); 
     1013    //Now perform the actions as appropriate 
     1014    MODULE.clearMimeData(); //Make sure this backend is currently empty     
     1015    QString fileName; 
     1016    if(stat == 0){ return; } //no action needed 
     1017    else if(stat == 1 || stat == 2){ //need to find current MIME file 
     1018      QStringList MF = MODULE.listMimeFiles(); 
     1019      for(int i=0; i<MF.length(); i++){ 
     1020        MODULE.loadMimeFile(MF[i]); 
     1021        if(MODULE.mimeText("type") == cmimetype){ 
     1022          if(stat == 1){ //remove old mime file 
     1023            MODULE.removeMimeFile(MF[i]); 
     1024            MODULE.clearMimeData(); 
     1025            MODULE.setXdgText("MimeType",""); 
     1026            return; //done now 
     1027          }else{ //stat ==2, update mime file 
     1028            //Check if there is anything that actually needs to be done 
     1029            if( MODULE.mimeText("pattern") == newPatterns ){ return; } //nothing to change 
     1030            fileName = MF[i]; //save this filename for later use 
     1031          } 
     1032          break; //stop here, the file was already found and loaded 
    11401033        } 
    1141     } 
     1034      } 
     1035    }else{ 
     1036      QString bin = ui->line_xdg_exec->text().section(" ",0,0,QString::SectionSkipEmpty).simplified(); 
     1037      if(bin.isEmpty()){ return; } //should never hit this - but just to make sure 
     1038      //Generate a new mimetype 
     1039      cmimetype = "application/x-"+bin; 
     1040      MODULE.setXdgText("MimeType", cmimetype); 
     1041      //Generate a new filename for this mime file 
     1042      fileName = bin+"-xdg.xml"; 
     1043    } 
     1044    //Now need to save the current values into the file (new or old, depending on earlier) 
     1045    MODULE.setMimeText("type", cmimetype); 
     1046    MODULE.setMimeText("pattern", newPatterns); 
     1047    //don't worry about xmlns - it will be auto generated if not set when creating the file, otherwise will use the current setting 
     1048    MODULE.saveMimeFile(fileName); 
    11421049} 
    11431050 
     
    11711078  QString filename = ui->list_scripts_file->currentText(); 
    11721079  //Remove the file 
    1173   QDir dir(currentModule->path()+"/scripts"); 
    1174   dir.remove(filename); 
     1080  MODULE.removeScript(filename); 
    11751081  //refresh the UI 
    11761082  refreshGUI("scripts"); 
     
    11811087  QStringList contents = ui->text_scripts_edit->toPlainText().split("\n"); 
    11821088  //get the current file 
    1183   QString dir = currentModule->path() + "/scripts/"; 
    1184   bool ok = ModBuild::createDir(dir); //make sure the scripts directory exists 
    11851089  QString filename = ui->list_scripts_file->currentText(); 
    11861090  //Save the file 
    1187   ok = ModBuild::createFile(dir+filename,contents); 
     1091  bool ok = MODULE.writeScript(filename,contents); 
    11881092  //display a warning if error 
    11891093  if(!ok){ 
     
    12081112  //check for valid inputs 
    12091113  if( file.isEmpty() || linkto.isEmpty() || opts.isEmpty() ){ return; } 
    1210   //Add the link 
    1211   currentModule->addExternalLink(file, linkto, opts.split(",") ); 
    1212   //Save the file 
    1213   currentModule->writeExternalLinks(); 
     1114  QStringList bins, links, types; 
     1115  MODULE.loadExternalLinks(bins,links,types); 
     1116  //Check for an identical link to just update 
     1117  bool found = false; 
     1118  for(int i=0; i<bins.length(); i++){ 
     1119    if(bins[i] == file && links[i]==linkto){ 
     1120      types[i] = opts; 
     1121      found = true; 
     1122      break; 
     1123    } 
     1124  } 
     1125  if(!found){ 
     1126    bins << file; links << linkto; types << opts; 
     1127  } 
     1128  MODULE.saveExternalLinks(bins,links,types); 
    12141129  //Refresh the UI 
    12151130  refreshGUI("external-links"); 
     
    12221137  QString file = line->text(0); 
    12231138  QString linkto = line->text(1); 
    1224   //Remove the link 
    1225   currentModule->removeExternalLink(file,linkto); 
    1226   //Save the file 
    1227   currentModule->writeExternalLinks(); 
     1139  //check for valid inputs 
     1140  if( file.isEmpty() || linkto.isEmpty() ){ return; } 
     1141  QStringList bins, links, types; 
     1142  MODULE.loadExternalLinks(bins,links,types); 
     1143  //Check for an identical link to remove 
     1144  for(int i=0; i<bins.length(); i++){ 
     1145    if(bins[i] == file && links[i]==linkto){ 
     1146      bins.removeAt(i); links.removeAt(i); types.removeAt(i); 
     1147      break; 
     1148    } 
     1149  } 
     1150  MODULE.saveExternalLinks(bins,links,types); 
    12281151  //Refresh the UI 
    12291152  refreshGUI("external-links"); 
     
    12701193  ui->line_el_filetype->setText( types.join(",") ); 
    12711194} 
    1272 /*------------------------------------------------ 
    1273    FREENAS PLUGINS EDITOR OPTIONS 
    1274   ------------------------------------------------- 
    1275 */ 
    1276  
    12771195 
    12781196/*------------------------------------------------ 
     
    12861204  if (outdir.isEmpty() ){gostatus=FALSE;} 
    12871205  //QString sigfile = "";ui->linePBIDigSigFile->text(); //this one can be empty 
    1288   QString modDir = currentModule->path(); 
     1206  QString modDir = MODULE.basepath(); 
    12891207  if(modDir.isEmpty()){gostatus=FALSE;} 
    12901208  if(!gostatus){ 
     
    13611279  ui->push_build_start->setEnabled(FALSE); //disable the button so they do not start more than 1 build at a time 
    13621280  ui->text_build_log->clear(); //clear the display in case this is not the first run 
    1363   ui->line_build_module->setText( currentModule->path().replace(QDir::homePath(), "~") ); 
     1281  ui->line_build_module->setText( MODULE.basepath().replace(QDir::homePath(), "~") ); 
    13641282  ui->line_build_outputdir->setText(settings->value("pbidir")); 
    13651283  //Setup Process connections 
     
    13741292  connect(p,SIGNAL(error(QProcess::ProcessError)),this,SLOT(slotBuildError(QProcess::ProcessError)) ); 
    13751293  //Setup the flag for the finishing checks 
    1376   PBI_BUILDING_NOW=outdir+":::"+currentModule->readValue("progname"); 
     1294  PBI_BUILDING_NOW=outdir+":::"+MODULE.text("PBI_PROGNAME").remove(" ").toLower(); 
    13771295  //Start the Process 
    13781296  qDebug() << "Starting the PBI build process..."; 
  • src-qt4/EasyPBI-devel/mainGUI.h

    r0d8df9e rcbead0d1  
    5151    void on_actionAbout_EasyPBI_triggered(); 
    5252    //editor functions 
     53    void updateConfigVisibility(); 
    5354    void slotModTabChanged(int); 
    5455    //pbi.conf functions 
    5556    void on_push_change_makeport_clicked(); 
    5657    //void on_push_change_progdir_clicked(); 
    57     void slotAddMakeOption(QAction*); 
     58    //void slotAddMakeOption(QAction*); 
    5859    //void on_push_addportbefore_clicked(); 
    5960    //void on_push_rmportbefore_clicked(); 
     
    102103private: 
    103104    Ui::MainGUI *ui; 
    104     ModBuild *currentModule; 
     105    //ModBuild *currentModule; 
    105106    PBIModule MODULE; 
    106107    Config *settings; 
     
    108109    //QRadioButton *radio_module_port, *radio_module_local; 
    109110    QMenu menu_elOpts, menu_validMenuCats, menu_bins, menu_el_bins; 
     111    bool XDGUPDATING; 
    110112 
    111113    QString PBI_BUILDING_NOW; 
     
    116118    //bool isValidPort(QString, bool allowOverride = FALSE); 
    117119    void checkMime(); 
    118     void updateConfigVisibility(); 
    119120 
    120121}; 
  • src-qt4/EasyPBI-devel/mainGUI.ui

    ra51ecee rcbead0d1  
    587587                    </item> 
    588588                    <item> 
    589                      <widget class="QToolButton" name="toolButton_3"> 
     589                     <widget class="QToolButton" name="tool_repoCat"> 
    590590                      <property name="text"> 
    591591                       <string>...</string> 
     
    606606                  </item> 
    607607                  <item row="1" column="1"> 
    608                    <widget class="QComboBox" name="combo_repoType"> 
    609                     <property name="statusTip"> 
    610                      <string>Set the type of application</string> 
    611                     </property> 
     608                   <layout class="QHBoxLayout" name="horizontalLayout_2"> 
    612609                    <item> 
    613                      <property name="text"> 
    614                       <string notr="true">Text</string> 
    615                      </property> 
     610                     <widget class="QLineEdit" name="line_repoType"/> 
    616611                    </item> 
    617612                    <item> 
    618                      <property name="text"> 
    619                       <string notr="true">Graphical</string> 
    620                      </property> 
     613                     <widget class="QToolButton" name="tool_repoType"> 
     614                      <property name="text"> 
     615                       <string>...</string> 
     616                      </property> 
     617                     </widget> 
    621618                    </item> 
    622                     <item> 
    623                      <property name="text"> 
    624                       <string notr="true">Server</string> 
    625                      </property> 
    626                     </item> 
    627                    </widget> 
     619                   </layout> 
    628620                  </item> 
    629621                 </layout> 
Note: See TracChangeset for help on using the changeset viewer.