Changeset fd03a3a


Ignore:
Timestamp:
12/09/13 14:31:45 (10 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
69ec30c, c61d66c
Parents:
809d133 (diff), 9db63e8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Files:
1 deleted
10 edited
2 moved

Legend:

Unmodified
Added
Removed
  • src-sh/pbi-manager/pbi-manager

    r7ff5d68 rcd20ca3  
    71927192                mkdir -p ${PBI_CHROOTDIR}/usr/local/etc 2>/dev/null 
    71937193                cp /usr/local/etc/pkg.conf ${PBI_CHROOTDIR}/usr/local/etc/pkg.conf 
    7194                 # Make sure we change pkgng ARCH to what we are building 
    7195                 sed -i '' "s|amd64|$ARCH|g" ${PBI_CHROOTDIR}/usr/local/etc/pkg.conf      
    7196                 sed -i '' "s|i386|$ARCH|g" ${PBI_CHROOTDIR}/usr/local/etc/pkg.conf       
    7197                 # Now make sure to copy over the pubkey 
    7198                 local pubKey=`cat /usr/local/etc/pkg.conf | grep "^PUBKEY:" | awk '{print $2}'` 
    7199                 if [ -n "$pubKey" ] ; then 
    7200                         if [ ! -d "${PBI_CHROOTDIR}/`dirname $pubKey`" ] ; then 
    7201                                 mkdir "${PBI_CHROOTDIR}/`dirname $pubKey`" 
    7202                         fi 
    7203                         cp $pubKey ${PBI_CHROOTDIR}/$pubKey 
    7204                 fi 
     7194                # Copy over the pkg/repo and friends 
     7195                cp -r /usr/local/etc/pkg ${PBI_CHROOTDIR}/usr/local/etc/ 
    72057196 
    72067197                # Install pkgng into the chroot 
  • src-sh/pc-extractoverlay/ports-overlay/usr/local/etc/pkg/repos/pcbsd.conf

    ra3d8948 rd04f1ac8  
    1 pcbsd-build: { 
     1pcbsd: { 
    22               url: "http://pkg.cdn.pcbsd.org/VERSION/ARCH", 
    33               signature_type: "fingerprints", 
  • src-sh/pc-updatemanager/pc-updatemanager

    r2b62dde rd04f1ac8  
    408408rollback_update() 
    409409{ 
    410   cp /usr/local/etc/pkg.conf.preUpgrade /usr/local/etc/pkg.conf 
     410  cp /tmp/pcbsd.conf.preUpdate.$$ /usr/local/etc/pkg/repos/pcbsd.conf 
    411411  if [ "$PKGROLLBACK" = "YES" ] ; then 
    412412 
     
    468468  PKGROLLBACK="NO" 
    469469 
    470   # Lets backup the old pkg.conf file 
    471   cp /usr/local/etc/pkg.conf /usr/local/etc/pkg.conf.preUpgrade 
    472  
    473   # Set the new pkg.conf file to the new repo 
     470  # Save the repo file 
     471  cp /usr/local/etc/pkg/repos/pcbsd.conf /tmp/pcbsd.conf.preUpdate.$$ 
     472 
     473  # Set the new pcbsd.conf file to the new repo 
    474474  local arch=`uname -m` 
    475   echo "packagesite: pkg+http://pkg.cdn.pcbsd.org/$rel/$arch" >/usr/local/etc/pkg.conf 
    476   echo "PUBKEY: /usr/local/etc/pkg-pubkey.cert" >>/usr/local/etc/pkg.conf 
    477   echo "PKG_CACHEDIR: /usr/local/tmp" >>/usr/local/etc/pkg.conf 
     475  echo "pcbsd: { 
     476        url: "http://pkg.cdn.pcbsd.org/$rel/$arch", 
     477        signature_type: "fingerprints", 
     478        fingerprints: "/usr/local/etc/pkg/fingerprints/pcbsd", 
     479        enabled: true 
     480       }" > /usr/local/etc/pkg/repos/pcbsd.conf 
    478481 
    479482  # Lets backup old pkgng 
     
    510513     exit_err "Failed running \"freebsd-update install\"..." 
    511514  fi 
     515 
     516  # Remove backup repo file 
     517  rm /tmp/pcbsd.conf.preUpdate.$$ 
    512518 
    513519  echo "Major update finished!"  
  • src-qt4/EasyPBI-devel/EasyPBI.pro

    r3038c71 r809d133  
    2020        config.cpp \ 
    2121        preferencesDialog.cpp \ 
    22         aboutDialog.cpp 
     22        aboutDialog.cpp \ 
     23        PBIModule.cpp 
    2324 
    2425HEADERS  += mainGUI.h \ 
     
    2829            config.h \ 
    2930            preferencesDialog.h \ 
    30             aboutDialog.h  
     31            aboutDialog.h \ 
     32            PBIModule.h 
    3133 
    3234FORMS    += mainGUI.ui \ 
  • src-qt4/EasyPBI-devel/Makefile

    r3038c71 r809d133  
    11############################################################################# 
    22# Makefile for building: EasyPBI 
    3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Dec 5 15:24:24 2013 
     3# Generated by qmake (2.01a) (Qt 4.8.5) on: Mon Dec 9 16:12:58 2013 
    44# Project:  EasyPBI.pro 
    55# Template: app 
     
    5151                config.cpp \ 
    5252                preferencesDialog.cpp \ 
    53                 aboutDialog.cpp moc_mainGUI.cpp \ 
     53                aboutDialog.cpp \ 
     54                PBIModule.cpp moc_mainGUI.cpp \ 
    5455                moc_newModuleDialog.cpp \ 
    5556                moc_preferencesDialog.cpp \ 
    5657                moc_aboutDialog.cpp \ 
     58                moc_PBIModule.cpp \ 
    5759                qrc_EasyPBI.cpp 
    5860OBJECTS       = main.o \ 
     
    6466                preferencesDialog.o \ 
    6567                aboutDialog.o \ 
     68                PBIModule.o \ 
    6669                moc_mainGUI.o \ 
    6770                moc_newModuleDialog.o \ 
    6871                moc_preferencesDialog.o \ 
    6972                moc_aboutDialog.o \ 
     73                moc_PBIModule.o \ 
    7074                qrc_EasyPBI.o 
    7175DIST          = /usr/local/share/qt4/mkspecs/common/unix.conf \ 
     
    188192dist:  
    189193        @$(CHK_DIR_EXISTS) .tmp/EasyPBI1.0.0 || $(MKDIR) .tmp/EasyPBI1.0.0  
    190         $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents mainGUI.h modBuild.h backend.h newModuleDialog.h config.h preferencesDialog.h aboutDialog.h .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents EasyPBI.qrc .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents main.cpp mainGUI.cpp modBuild.cpp backend.cpp newModuleDialog.cpp config.cpp preferencesDialog.cpp aboutDialog.cpp .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents mainGUI.ui newModuleDialog.ui preferencesDialog.ui aboutDialog.ui .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents i18n/EasyPBI_af.ts i18n/EasyPBI_ar.ts i18n/EasyPBI_az.ts i18n/EasyPBI_bg.ts i18n/EasyPBI_bn.ts i18n/EasyPBI_bs.ts i18n/EasyPBI_ca.ts i18n/EasyPBI_cs.ts i18n/EasyPBI_cy.ts i18n/EasyPBI_da.ts i18n/EasyPBI_de.ts i18n/EasyPBI_el.ts i18n/EasyPBI_en_GB.ts i18n/EasyPBI_en_ZA.ts i18n/EasyPBI_es.ts i18n/EasyPBI_et.ts i18n/EasyPBI_eu.ts i18n/EasyPBI_fa.ts i18n/EasyPBI_fi.ts i18n/EasyPBI_fr.ts i18n/EasyPBI_fr_CA.ts i18n/EasyPBI_gl.ts i18n/EasyPBI_he.ts i18n/EasyPBI_hi.ts i18n/EasyPBI_hr.ts i18n/EasyPBI_hu.ts i18n/EasyPBI_id.ts i18n/EasyPBI_is.ts i18n/EasyPBI_it.ts i18n/EasyPBI_ja.ts i18n/EasyPBI_ka.ts i18n/EasyPBI_ko.ts i18n/EasyPBI_lt.ts i18n/EasyPBI_lv.ts i18n/EasyPBI_mk.ts i18n/EasyPBI_mn.ts i18n/EasyPBI_ms.ts i18n/EasyPBI_mt.ts i18n/EasyPBI_nb.ts i18n/EasyPBI_nl.ts i18n/EasyPBI_pa.ts i18n/EasyPBI_pl.ts i18n/EasyPBI_pt.ts i18n/EasyPBI_pt_BR.ts i18n/EasyPBI_ro.ts i18n/EasyPBI_ru.ts i18n/EasyPBI_sa.ts i18n/EasyPBI_sk.ts i18n/EasyPBI_sl.ts i18n/EasyPBI_sr.ts i18n/EasyPBI_sv.ts i18n/EasyPBI_sw.ts i18n/EasyPBI_ta.ts i18n/EasyPBI_tg.ts i18n/EasyPBI_th.ts i18n/EasyPBI_tr.ts i18n/EasyPBI_uk.ts i18n/EasyPBI_uz.ts i18n/EasyPBI_vi.ts i18n/EasyPBI_zh_CN.ts i18n/EasyPBI_zh_HK.ts i18n/EasyPBI_zh_TW.ts i18n/EasyPBI_zu.ts .tmp/EasyPBI1.0.0/ && (cd `dirname .tmp/EasyPBI1.0.0` && $(TAR) EasyPBI1.0.0.tar EasyPBI1.0.0 && $(COMPRESS) EasyPBI1.0.0.tar) && $(MOVE) `dirname .tmp/EasyPBI1.0.0`/EasyPBI1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/EasyPBI1.0.0 
     194        $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents mainGUI.h modBuild.h backend.h newModuleDialog.h config.h preferencesDialog.h aboutDialog.h PBIModule.h .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents EasyPBI.qrc .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents main.cpp mainGUI.cpp modBuild.cpp backend.cpp newModuleDialog.cpp config.cpp preferencesDialog.cpp aboutDialog.cpp PBIModule.cpp .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents mainGUI.ui newModuleDialog.ui preferencesDialog.ui aboutDialog.ui .tmp/EasyPBI1.0.0/ && $(COPY_FILE) --parents i18n/EasyPBI_af.ts i18n/EasyPBI_ar.ts i18n/EasyPBI_az.ts i18n/EasyPBI_bg.ts i18n/EasyPBI_bn.ts i18n/EasyPBI_bs.ts i18n/EasyPBI_ca.ts i18n/EasyPBI_cs.ts i18n/EasyPBI_cy.ts i18n/EasyPBI_da.ts i18n/EasyPBI_de.ts i18n/EasyPBI_el.ts i18n/EasyPBI_en_GB.ts i18n/EasyPBI_en_ZA.ts i18n/EasyPBI_es.ts i18n/EasyPBI_et.ts i18n/EasyPBI_eu.ts i18n/EasyPBI_fa.ts i18n/EasyPBI_fi.ts i18n/EasyPBI_fr.ts i18n/EasyPBI_fr_CA.ts i18n/EasyPBI_gl.ts i18n/EasyPBI_he.ts i18n/EasyPBI_hi.ts i18n/EasyPBI_hr.ts i18n/EasyPBI_hu.ts i18n/EasyPBI_id.ts i18n/EasyPBI_is.ts i18n/EasyPBI_it.ts i18n/EasyPBI_ja.ts i18n/EasyPBI_ka.ts i18n/EasyPBI_ko.ts i18n/EasyPBI_lt.ts i18n/EasyPBI_lv.ts i18n/EasyPBI_mk.ts i18n/EasyPBI_mn.ts i18n/EasyPBI_ms.ts i18n/EasyPBI_mt.ts i18n/EasyPBI_nb.ts i18n/EasyPBI_nl.ts i18n/EasyPBI_pa.ts i18n/EasyPBI_pl.ts i18n/EasyPBI_pt.ts i18n/EasyPBI_pt_BR.ts i18n/EasyPBI_ro.ts i18n/EasyPBI_ru.ts i18n/EasyPBI_sa.ts i18n/EasyPBI_sk.ts i18n/EasyPBI_sl.ts i18n/EasyPBI_sr.ts i18n/EasyPBI_sv.ts i18n/EasyPBI_sw.ts i18n/EasyPBI_ta.ts i18n/EasyPBI_tg.ts i18n/EasyPBI_th.ts i18n/EasyPBI_tr.ts i18n/EasyPBI_uk.ts i18n/EasyPBI_uz.ts i18n/EasyPBI_vi.ts i18n/EasyPBI_zh_CN.ts i18n/EasyPBI_zh_HK.ts i18n/EasyPBI_zh_TW.ts i18n/EasyPBI_zu.ts .tmp/EasyPBI1.0.0/ && (cd `dirname .tmp/EasyPBI1.0.0` && $(TAR) EasyPBI1.0.0.tar EasyPBI1.0.0 && $(COMPRESS) EasyPBI1.0.0.tar) && $(MOVE) `dirname .tmp/EasyPBI1.0.0`/EasyPBI1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/EasyPBI1.0.0 
    191195 
    192196 
     
    209213mocables: compiler_moc_header_make_all compiler_moc_source_make_all 
    210214 
    211 compiler_moc_header_make_all: moc_mainGUI.cpp moc_newModuleDialog.cpp moc_preferencesDialog.cpp moc_aboutDialog.cpp 
     215compiler_moc_header_make_all: moc_mainGUI.cpp moc_newModuleDialog.cpp moc_preferencesDialog.cpp moc_aboutDialog.cpp moc_PBIModule.cpp 
    212216compiler_moc_header_clean: 
    213         -$(DEL_FILE) moc_mainGUI.cpp moc_newModuleDialog.cpp moc_preferencesDialog.cpp moc_aboutDialog.cpp 
     217        -$(DEL_FILE) moc_mainGUI.cpp moc_newModuleDialog.cpp moc_preferencesDialog.cpp moc_aboutDialog.cpp moc_PBIModule.cpp 
    214218moc_mainGUI.cpp: modBuild.h \ 
    215219                backend.h \ 
     
    232236                aboutDialog.h 
    233237        /usr/local/bin/moc-qt4 $(DEFINES) $(INCPATH) aboutDialog.h -o moc_aboutDialog.cpp 
     238 
     239moc_PBIModule.cpp: PBIModule.h 
     240        /usr/local/bin/moc-qt4 $(DEFINES) $(INCPATH) PBIModule.h -o moc_PBIModule.cpp 
    234241 
    235242compiler_rcc_make_all: qrc_EasyPBI.cpp 
     
    322329        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o aboutDialog.o aboutDialog.cpp 
    323330 
     331PBIModule.o: PBIModule.cpp  
     332        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o PBIModule.o PBIModule.cpp 
     333 
    324334moc_mainGUI.o: moc_mainGUI.cpp  
    325335        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainGUI.o moc_mainGUI.cpp 
     
    333343moc_aboutDialog.o: moc_aboutDialog.cpp  
    334344        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_aboutDialog.o moc_aboutDialog.cpp 
     345 
     346moc_PBIModule.o: moc_PBIModule.cpp  
     347        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_PBIModule.o moc_PBIModule.cpp 
    335348 
    336349qrc_EasyPBI.o: qrc_EasyPBI.cpp  
     
    350363install_desktop: first FORCE 
    351364        @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/applications/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/applications/  
    352         -$(INSTALL_FILE) /usr/home/kenmoore/Projects/pcbsd/src-qt4/EasyPBI/EasyPBI.desktop $(INSTALL_ROOT)/usr/local/share/applications/ 
     365        -$(INSTALL_FILE) /usr/home/kenmoore/Projects/pcbsd/src-qt4/EasyPBI-devel/EasyPBI.desktop $(INSTALL_ROOT)/usr/local/share/applications/ 
    353366 
    354367 
     
    360373install_icons: first FORCE 
    361374        @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/EasyPBI/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/EasyPBI/  
    362         -$(INSTALL_FILE) /usr/home/kenmoore/Projects/pcbsd/src-qt4/EasyPBI/icons/EasyPBIicon.png $(INSTALL_ROOT)/usr/local/share/EasyPBI/ 
     375        -$(INSTALL_FILE) /usr/home/kenmoore/Projects/pcbsd/src-qt4/EasyPBI-devel/icons/EasyPBIicon.png $(INSTALL_ROOT)/usr/local/share/EasyPBI/ 
    363376 
    364377 
  • src-qt4/EasyPBI-devel/PBIModule.cpp

    rd236dbd r809d133  
    1 #include "PBImodule.h" 
     1#include "PBIModule.h" 
    22 
    33PBIModule::PBIModule(){ 
    44  //Setup the possible values that are recognized 
    55    // 10.x PBI format: 12/5/13 
    6   version = "10.x" 
     6  version = "10.x"; 
    77  //pbi.conf values 
    88  CTextValues << "PBI_PROGNAME" << "PBI_PROGWEB" << "PBI_PROGAUTHOR" << "PBI_PROGICON" \ 
     
    1717  xdgBoolValues << "StartupNotify" << "Terminal" << "NoDisplay"; 
    1818  //valid MIME values 
    19   mimeValues << "xmlns" << "type" << "pattern"; 
     19     // NOTE: These are hard-coded in the file read/write below due to specific file format 
     20  mimeValues << "xmlns" << "type" << "pattern";  
    2021         
    2122  HASH.clear(); //Make sure the hash is currently empty 
     
    3334  if(!QFile::exists(basePath)){ basePath.clear(); return false; } 
    3435  //This is good to go: now start to load all the different pieces of the module 
    35   this->loadConfig(); //pbi.conf 
    36    
     36  this->loadConfig(); //pbi.conf (only piece that is loaded at all times) 
    3737  return true; 
    3838} 
     
    4242// ================== 
    4343QStringList PBIModule::textL(QStringList vars){ //a list of individual QString values 
    44   QString out; 
     44  QStringList out; 
    4545  for(int i=0; i<vars.length(); i++){ 
    46     out << this->text(vars[i]); 
     46    out << text(vars[i]); 
    4747  } 
    4848  return out; 
     
    5252  if( vars.length() != vals.length() ){ return; } 
    5353  for(int i=0; i<<vars.length(); i++){ 
    54     this->setText(vars[i], vals[i]); 
     54    setText(vars[i], vals[i]); 
    5555  } 
    5656} 
     
    125125          i++; 
    126126          line = contents[i]; 
    127           val.append("\n"+line.section("#",0,0).section(";",0,0).trimmed(); 
     127          val.append( "\n"+line.section("#",0,0).section(";",0,0).trimmed() ); 
    128128        } 
    129129        if(val.endsWith("\"")){ val.chop(1); } //remove the ending quote 
     
    188188QStringList PBIModule::readScript(QString var){ 
    189189  QStringList out; 
    190   if( scriptValues.contains(var) || QFile:exists(basePath+"/scripts/"+var) ){ 
     190  if( scriptValues.contains(var) || QFile::exists(basePath+"/scripts/"+var) ){ 
    191191    out = readFile(basePath+"/scripts/"+var); 
    192192  }        
     
    196196bool PBIModule::writeScript(QString var,QStringList val){ 
    197197  bool ok = false; 
    198   if( scriptValues.contains(var) || QFile:exists(basePath+"/scripts/"+var) ){ 
     198  if( scriptValues.contains(var) || QFile::exists(basePath+"/scripts/"+var) ){ 
    199199    ok = createFile(basePath+"/scripts/"+var, val); 
    200200  } 
     
    233233    QDir dir(rPath); 
    234234    if(!dir.exists()){  
    235       ok = dir.mkPath(rPath);  
     235      ok = dir.mkpath(rPath);  
    236236      if(!ok){ 
    237237        qDebug() << "Error: Could not create directory: "<<rPath; 
     
    263263QString PBIModule::xdgText(QString var){ 
    264264  QString out; 
    265   if(xdgTextValues.contains(var) && HASH.contains("XDG_"+var){ 
     265  if(xdgTextValues.contains(var) && HASH.contains("XDG_"+var) ){ 
    266266    out = HASH["XDG_"+var].toString(); 
    267267  } 
     
    298298} 
    299299 
    300 void PBIModule::xdgEnabled(QString var){ 
     300bool PBIModule::xdgEnabled(QString var){ 
    301301  bool out = false; 
    302302  if(xdgBoolValues.contains(var) && HASH.contains("XDG_"+var)){ 
     
    374374 
    375375bool PBIModule::removeXdgDesktop(QString fileName){ 
    376   createFile(basePath+"/xdg-desktop/"+fileName, QStringList() ); 
     376  return createFile(basePath+"/xdg-desktop/"+fileName, QStringList() ); 
    377377} 
    378378 
    379379bool PBIModule::removeXdgMenu(QString fileName){ 
    380   createFile(basePath+"/xdg-menu/"+fileName, QStringList() );    
     380  return createFile(basePath+"/xdg-menu/"+fileName, QStringList() );     
    381381} 
    382382 
     
    385385  QStringList contents = readFile(basePath+"/xdg-desktop/"+fileName); 
    386386  if(contents.isEmpty()){ return false; } 
     387  QStringList extraLines; 
    387388  for(int i=0; i<contents.length(); i++){ 
    388389    //Ignore specific/special lines 
     
    405406} 
    406407 
    407 bool PBIModule::loadXdgMenu(QString filename){ 
     408bool PBIModule::loadXdgMenu(QString fileName){ 
    408409  clearXdgData(); 
    409410  QStringList contents = readFile(basePath+"/xdg-menu/"+fileName); 
    410411  if(contents.isEmpty()){ return false; } 
     412  QStringList extraLines; 
    411413  for(int i=0; i<contents.length(); i++){ 
    412414    //Ignore specific/special lines 
     
    482484  //Now create the file contents 
    483485  QStringList contents; 
    484   contents << "<?xml version=\"1.0\"?>" 
     486  contents << "<?xml version=\"1.0\"?>"; 
    485487  QString xmlns = "http://www.freedesktop.org/standards/shared-mime-info"; 
    486488  if(HASH.contains("MIME_xmlns")){ xmlns = HASH["MIME_xmlns"].toString(); } 
     
    617619    QStringList subdirs = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); 
    618620    out << dir.entryList(QDir::Files | QDir::NoDotAndDotDot,QDir::Name); 
    619     for(int i=0, i<subdirs.length(); i++){ 
     621    for(int i=0; i<subdirs.length(); i++){ 
    620622      out << filesInDir(dirPath+"/"+subdirs[i]); 
    621623    } 
     
    627629  for(int i=0; i<xdgTextValues.length(); i++){ 
    628630    if(HASH.contains("XDG_"+xdgTextValues[i])){ 
    629       HASH.removeAll("XDG_"+xdgTextValues[i]); 
     631      HASH.remove("XDG_"+xdgTextValues[i]); 
    630632    } 
    631633  } 
    632634  for(int i=0; i<xdgBoolValues.length(); i++){ 
    633635    if(HASH.contains("XDG_"+xdgBoolValues[i])){ 
    634       HASH.removeAll("XDG_"+xdgBoolValues[i]); 
     636      HASH.remove("XDG_"+xdgBoolValues[i]); 
    635637    } 
    636638  } 
    637639  if(HASH.contains("XDG_EXTRALINES")){ 
    638     HASH.removeAll("XDG_EXTRALINES"); 
     640    HASH.remove("XDG_EXTRALINES"); 
    639641  } 
    640642} 
  • src-qt4/EasyPBI-devel/PBIModule.h

    rd236dbd r809d133  
    55#include <QHash> 
    66#include <QString> 
    7 #include <QStringLIst> 
     7#include <QStringList> 
    88#include <QVariant> 
    99#include <QFile> 
    1010#include <QDir> 
     11#include <QTextStream> 
     12#include <QDebug> 
    1113 
    1214class PBIModule : public QObject{ 
     
    2426        QString text(QString); //a single QString value 
    2527        void setText(QString,QString); //set a single QString value 
    26         void textValues(); //list all the possible values 
     28        QStringList textValues(); //list all the possible values 
    2729 
    2830        bool isEnabled(QString);  
     
    3335        void setNumber(QString,int); 
    3436        QStringList numberValues(); //list all possible integer values 
    35          
     37 
     38        void loadConfig(); 
    3639        bool saveConfig(); 
    3740         
     
    5457         
    5558        QStringList validXdgEnables(); 
    56         void xdgEnabled(QString); 
     59        bool xdgEnabled(QString); 
    5760        void setXdgEnabled(QString, bool); 
    5861         
     
    9598 
    9699}; 
     100 
     101#endif 
  • src-qt4/EasyPBI-devel/mainGUI.cpp

    r3038c71 r809d133  
    3838        ui->toolBar->addWidget(line_module); 
    3939        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); 
     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); 
    4646        //Setup Module Editor 
    4747        connect(ui->tabWidget, SIGNAL(currentChanged(int)),this,SLOT(slotModTabChanged(int)) ); //setup to refresh each tab once it is selected 
    4848        // -- pbi.conf tab -- 
    49         ui->push_change_progdir->setIcon(Backend::icon("load")); 
     49        //ui->push_change_progdir->setIcon(Backend::icon("load")); 
    5050        ui->push_change_makeport->setIcon(Backend::icon("file")); 
    51         ui->push_addmakeopt->setIcon(Backend::icon("left")); 
    52         ui->push_addmakeopt->setMenu(&menu_addOpt); 
     51        //ui->push_addmakeopt->setIcon(Backend::icon("left")); 
     52        //ui->push_addmakeopt->setMenu(&menu_addOpt); 
    5353        connect(&menu_addOpt,SIGNAL(triggered(QAction*)),this,SLOT(slotAddMakeOption(QAction*)) ); 
    5454        ui->push_config_save->setIcon(Backend::icon("save")); 
     
    9797      connect(ui->line_progversion,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    9898      connect(ui->line_progweb,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    99       connect(ui->line_progdir,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
     99      //connect(ui->line_progdir,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    100100      connect(ui->line_makeport,SIGNAL(textChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    101101      connect(ui->list_progicon,SIGNAL(currentIndexChanged(QString)),this,SLOT(slotOptionChanged(QString)) ); 
    102       connect(ui->edit_makeopts,SIGNAL(textChanged()),this,SLOT(slotOptionChanged()) ); 
     102      //connect(ui->edit_makeopts,SIGNAL(textChanged()),this,SLOT(slotOptionChanged()) ); 
    103103      connect(ui->check_requiresroot, SIGNAL(clicked()),this,SLOT(slotOptionChanged()) ); 
    104104      // Rwsources tab 
     
    184184    ui->actionPackage_Module->setEnabled(FALSE); 
    185185    ui->actionRefresh_Module->setEnabled(FALSE); 
    186     if(PBI_BUILDING_NOW.isEmpty() ){ui->toolBox->setEnabled(FALSE); return; } 
    187     else{  
    188       ui->toolBox->setItemEnabled(0,FALSE); 
    189       ui->toolBox->setItemEnabled(1,TRUE); 
    190       ui->toolBox->setCurrentIndex(1);  
    191       item="pbibuild"; 
    192     } 
     186    //if(PBI_BUILDING_NOW.isEmpty() ){ui->toolBox->setEnabled(FALSE); return; } 
     187    //else{  
     188      //ui->toolBox->setItemEnabled(0,FALSE); 
     189      //ui->toolBox->setItemEnabled(1,TRUE); 
     190      //ui->toolBox->setCurrentIndex(1);  
     191      //item="pbibuild"; 
     192    //} 
    193193  }else{  
    194     ui->toolBox->setEnabled(TRUE);  
     194    //ui->toolBox->setEnabled(TRUE);  
    195195    ui->actionPackage_Module->setEnabled(TRUE);   
    196196    ui->actionRefresh_Module->setEnabled(TRUE); 
    197197  } 
    198198  //Figure out the type of module that is loaded 
    199   bool isport = radio_module_port->isChecked(); 
     199  //bool isport = radio_module_port->isChecked(); 
    200200  //See if we should refresh everything (default)   
    201201  bool doall = ( (item == "all") || item.isEmpty() ); 
     
    204204  // ------PBI.CONF------ 
    205205  if( doall || doeditor || (item == "pbiconf")){ 
    206     if(isport){ 
     206    //if(isport){ 
    207207        ui->line_progversion->setVisible(FALSE); ui->label_progversion->setVisible(FALSE); 
    208         ui->line_progdir->setVisible(FALSE); ui->push_change_progdir->setVisible(FALSE); ui->label_progdir->setVisible(FALSE); 
     208        //ui->line_progdir->setVisible(FALSE); ui->push_change_progdir->setVisible(FALSE); ui->label_progdir->setVisible(FALSE); 
    209209        ui->line_makeport->setVisible(TRUE); ui->push_change_makeport->setVisible(TRUE); ui->label_makeport->setVisible(TRUE); 
    210         ui->edit_makeopts->setVisible(TRUE); ui->push_addmakeopt->setVisible(TRUE); ui->label_makeopts->setVisible(TRUE); 
    211         ui->list_portbefore->setVisible(TRUE); ui->push_addportbefore->setVisible(TRUE); ui->push_rmportbefore->setVisible(TRUE);ui->label_portbefore->setVisible(TRUE); 
     210        //ui->edit_makeopts->setVisible(TRUE); ui->push_addmakeopt->setVisible(TRUE); ui->label_makeopts->setVisible(TRUE); 
     211        //ui->list_portbefore->setVisible(TRUE); ui->push_addportbefore->setVisible(TRUE); ui->push_rmportbefore->setVisible(TRUE);ui->label_portbefore->setVisible(TRUE); 
    212212        ui->list_portafter->setVisible(TRUE); ui->push_addportafter->setVisible(TRUE); ui->push_rmportafter->setVisible(TRUE); ui->label_portafter->setVisible(TRUE); 
    213     }else{ 
     213    /*}else{ 
    214214        ui->line_progversion->setVisible(TRUE); ui->label_progversion->setVisible(TRUE); 
    215         ui->line_progdir->setVisible(TRUE); ui->push_change_progdir->setVisible(TRUE); ui->label_progdir->setVisible(TRUE); 
     215        //ui->line_progdir->setVisible(TRUE); ui->push_change_progdir->setVisible(TRUE); ui->label_progdir->setVisible(TRUE); 
    216216        ui->line_makeport->setVisible(FALSE); ui->push_change_makeport->setVisible(FALSE); ui->label_makeport->setVisible(FALSE); 
    217         ui->edit_makeopts->setVisible(FALSE); ui->push_addmakeopt->setVisible(FALSE); ui->label_makeopts->setVisible(FALSE); 
    218         ui->list_portbefore->setVisible(FALSE); ui->push_addportbefore->setVisible(FALSE); ui->push_rmportbefore->setVisible(FALSE);ui->label_portbefore->setVisible(FALSE); 
     217        //ui->edit_makeopts->setVisible(FALSE); ui->push_addmakeopt->setVisible(FALSE); ui->label_makeopts->setVisible(FALSE); 
     218        //ui->list_portbefore->setVisible(FALSE); ui->push_addportbefore->setVisible(FALSE); ui->push_rmportbefore->setVisible(FALSE);ui->label_portbefore->setVisible(FALSE); 
    219219        ui->list_portafter->setVisible(FALSE); ui->push_addportafter->setVisible(FALSE); ui->push_rmportafter->setVisible(FALSE); ui->label_portafter->setVisible(FALSE); 
    220     } 
     220    }*/ 
    221221    //Display the variables from the currentModule structure 
    222222    // -- check boxes 
     
    229229    ui->line_progweb->setText(currentModule->readValue("progweb")); 
    230230    ui->line_progauthor->setText(currentModule->readValue("progauthor")); 
    231     ui->line_progdir->setText(currentModule->readValue("packagedir")); 
     231    //ui->line_progdir->setText(currentModule->readValue("packagedir")); 
    232232    ui->line_makeport->setText(currentModule->readValue("makeport")); 
    233     ui->edit_makeopts->setPlainText(currentModule->readValue("makeoptions")); 
     233    //ui->edit_makeopts->setPlainText(currentModule->readValue("makeoptions")); 
    234234    // -- combo boxes (lists) 
    235     ui->list_portbefore->clear(); ui->list_portafter->clear(); ui->list_progicon->clear(); 
    236     ui->list_portbefore->addItems( currentModule->readValue("makeportbefore").split(" ") ); 
     235    //ui->list_portbefore->clear(); ui->list_portafter->clear(); ui->list_progicon->clear(); 
     236    //ui->list_portbefore->addItems( currentModule->readValue("makeportbefore").split(" ") ); 
    237237    ui->list_portafter->addItems( currentModule->readValue("makeportafter").split(" ") ); 
    238238    QStringList icons = currentModule->currentIcons; 
     
    354354    if( settings->check("isportsavailable") ){ 
    355355      ui->push_change_makeport->setEnabled(TRUE); 
    356       ui->push_addportbefore->setEnabled(TRUE); 
     356      //ui->push_addportbefore->setEnabled(TRUE); 
    357357      ui->push_addportafter->setEnabled(TRUE); 
    358358    }else{ 
    359359      ui->push_change_makeport->setEnabled(FALSE); 
    360       ui->push_addportbefore->setEnabled(FALSE); 
     360      //ui->push_addportbefore->setEnabled(FALSE); 
    361361      ui->push_addportafter->setEnabled(FALSE); 
    362362    } 
     
    409409    qDebug() << "Loaded module:"<<modSel;          
    410410    line_module->setText(modSel.replace(QDir::homePath(),"~"));  
    411     if(currentModule->isLocalPBI){ radio_module_local->toggle(); } 
    412     else{  
    413       radio_module_port->toggle(); //Port PBI 
     411    //if(currentModule->isLocalPBI){ radio_module_local->toggle(); } 
     412    //else{  
     413      //radio_module_port->toggle(); //Port PBI 
    414414      if( settings->check("isportsavailable") ){  
    415415        currentModule->readPortInformation(settings->value("portsdir")+"/"+currentModule->readValue("makeport")); 
    416416      } 
    417     } 
     417    //} 
    418418    refreshGUI("all"); 
    419419  } 
     
    475475      //Load Port info if appropriate 
    476476      if(currentModule->isPortPBI){ 
    477         radio_module_port->toggle(); 
     477        //radio_module_port->toggle(); 
    478478        //Use the port info if possible 
    479479        if( settings->check("isportsAvailable") ){ 
     
    485485          currentModule->writePBIconf(); 
    486486        } 
    487       }else if(currentModule->isLocalPBI){ 
    488         radio_module_local->toggle(); 
     487      }//else if(currentModule->isLocalPBI){ 
     488        //radio_module_local->toggle(); 
    489489               
    490       } 
     490      //} 
    491491      //Now let the UI reflect the new module  
    492492      line_module->setText( currentModule->path().replace(QDir::homePath(),"~") );       
     
    505505    qDebug() << "Loaded module:"<<modSel;          
    506506    line_module->setText(modSel.replace(QDir::homePath(),"~"));  
    507     if(currentModule->isLocalPBI){ radio_module_local->toggle(); } 
    508     else{  
    509       radio_module_port->toggle(); //Port PBI 
     507    //if(currentModule->isLocalPBI){ radio_module_local->toggle(); } 
     508    //else{  
     509      //radio_module_port->toggle(); //Port PBI 
    510510      if( settings->check("isportsavailable") ){  
    511511        currentModule->readPortInformation(settings->value("portsdir")+"/"+currentModule->readValue("makeport")); 
    512512      } 
    513     } 
     513    //} 
    514514    refreshGUI("all"); 
    515515  } 
     
    560560  ui->push_config_save->setEnabled(TRUE); 
    561561} 
    562  
     562/* 
    563563void MainGUI::on_push_change_progdir_clicked(){ 
    564564  //Prompt for a new directory 
     
    566566  if(dirSel.isEmpty()){return;} //action cancelled or closed     
    567567  //Save the port info to the GUI 
    568   ui->line_progdir->setText(dirSel); 
     568  //ui->line_progdir->setText(dirSel); 
    569569  ui->push_config_save->setEnabled(TRUE); 
    570 } 
     570}*/ 
    571571 
    572572void MainGUI::slotAddMakeOption(QAction* act){ 
     
    583583  else{ qDebug() << "Error: Unknown option type:"<<typ<<"option:"<<opt; return; } 
    584584  //Now read the current option settings 
    585   QStringList curr = ui->edit_makeopts->toPlainText().split("\n"); //split according to lines 
     585  QStringList curr; //= ui->edit_makeopts->toPlainText().split("\n"); //split according to lines 
    586586  bool found = FALSE; 
    587587  for(int i=0; i<curr.length(); i++){ 
     
    617617  } 
    618618  //Now put the new options list back onto the GUI 
    619   ui->edit_makeopts->setPlainText(curr.join("\n")); 
     619  //ui->edit_makeopts->setPlainText(curr.join("\n")); 
    620620  ui->push_config_save->setEnabled(TRUE); 
    621621} 
    622  
     622/* 
    623623void MainGUI::on_push_addportbefore_clicked(){ 
    624624  if( !settings->check("isportsavailable") ){ 
     
    634634  } 
    635635  //Save the port info to the GUI 
    636   if(ui->list_portbefore->count() == 1 && ui->list_portbefore->currentText().isEmpty() ){ ui->list_portbefore->clear(); } 
    637   ui->list_portbefore->addItem(portSel.remove(settings->value("portsdir")+"/")); 
     636  //if(ui->list_portbefore->count() == 1 && ui->list_portbefore->currentText().isEmpty() ){ ui->list_portbefore->clear(); } 
     637  //ui->list_portbefore->addItem(portSel.remove(settings->value("portsdir")+"/")); 
    638638  ui->push_config_save->setEnabled(TRUE); 
    639639} 
    640640 
    641641void MainGUI::on_push_rmportbefore_clicked(){ 
    642   int index = ui->list_portbefore->currentIndex(); 
    643   if(index != -1){ 
    644     ui->list_portbefore->removeItem(index); 
    645   } 
    646   ui->push_config_save->setEnabled(TRUE); 
    647 } 
    648  
     642  //int index = ui->list_portbefore->currentIndex(); 
     643  //if(index != -1){ 
     644    //ui->list_portbefore->removeItem(index); 
     645  //} 
     646  //ui->push_config_save->setEnabled(TRUE); 
     647} 
     648*/ 
    649649void MainGUI::on_push_addportafter_clicked(){ 
    650650  if( !settings->check("isportsavailable") ){ 
     
    684684    //Module-dependant settings 
    685685    bool newport = FALSE; 
    686     if( radio_module_port->isChecked() ){ //FreeBSD port module 
     686    //if( radio_module_port->isChecked() ){ //FreeBSD port module 
    687687        if(currentModule->readValue("makeport") != ui->line_makeport->text()){ newport=TRUE; } 
    688688        currentModule->writeValue("makeport",ui->line_makeport->text()); 
    689         currentModule->writeValue("makeoptions",ui->edit_makeopts->toPlainText()); 
     689        //currentModule->writeValue("makeoptions",ui->edit_makeopts->toPlainText()); 
    690690        QString tmp; 
    691         for(int i=0; i < ui->list_portbefore->count(); i++){ 
    692           tmp.append(" "+ui->list_portbefore->itemText(i) ); 
    693         } 
    694         currentModule->writeValue("makeportbefore",tmp.simplified()); 
     691        //for(int i=0; i < ui->list_portbefore->count(); i++){ 
     692          //tmp.append(" "+ui->list_portbefore->itemText(i) ); 
     693        //} 
     694        //currentModule->writeValue("makeportbefore",tmp.simplified()); 
    695695        tmp.clear(); 
    696696        for(int i=0; i < ui->list_portafter->count(); i++){ 
     
    699699        currentModule->writeValue("makeportafter",tmp.simplified()); 
    700700         
    701     }else{ //local sources module 
    702         currentModule->writeValue("packagedir",ui->line_progdir->text()); 
     701    /*}else{ //local sources module 
     702        //currentModule->writeValue("packagedir",ui->line_progdir->text()); 
    703703        currentModule->writeValue("progversion",ui->line_progversion->text()); 
    704     } 
     704    }*/ 
    705705  //save the new settings to pbi.conf 
    706706  bool ok = currentModule->writePBIconf(); 
     
    13581358  QString cmd; 
    13591359  // -- PBI from ports 
    1360   if(radio_module_port->isChecked()){ 
     1360  //if(radio_module_port->isChecked()){ 
    13611361    //Check that the ports tree is available 
    13621362    if( !settings->check("isportsavailable") ){  
     
    13851385     
    13861386  // -- PBI from local directory 
    1387   }else if(radio_module_local->isChecked() ){ 
     1387  /*}else if(radio_module_local->isChecked() ){ 
    13881388        //get the base command 
    13891389        cmd = settings->value("pbi_create"); 
     
    13981398        //Now setup the directory to package 
    13991399        cmd += " "+ currentModule->readValue("packagedir"); 
    1400   } 
     1400  }*/ 
    14011401  //Display the command created in hte terminal 
    14021402  qDebug() << "Build PBI command created:"<<cmd; 
     
    14391439  //Start the Process 
    14401440  qDebug() << "Starting the PBI build process..."; 
    1441   ui->toolBox->setItemText(0,tr("PBI Builder (Working)")); 
     1441  //ui->toolBox->setItemText(0,tr("PBI Builder (Working)")); 
    14421442  p->start(cmd); 
    14431443} 
     
    15021502  PBI_BUILDING_NOW.clear(); 
    15031503  PBI_BUILD_TERMINATED=FALSE; 
    1504   ui->toolBox->setItemText(0,tr("PBI Builder (Finished)")); 
     1504  //ui->toolBox->setItemText(0,tr("PBI Builder (Finished)")); 
    15051505  delete p; 
    15061506} 
  • src-qt4/EasyPBI-devel/mainGUI.h

    r3038c71 r809d133  
    5252    //pbi.conf functions 
    5353    void on_push_change_makeport_clicked(); 
    54     void on_push_change_progdir_clicked(); 
     54    //void on_push_change_progdir_clicked(); 
    5555    void slotAddMakeOption(QAction*); 
    56     void on_push_addportbefore_clicked(); 
    57     void on_push_rmportbefore_clicked(); 
     56    //void on_push_addportbefore_clicked(); 
     57    //void on_push_rmportbefore_clicked(); 
    5858    void on_push_addportafter_clicked(); 
    5959    void on_push_rmportafter_clicked(); 
     
    103103    Config *settings; 
    104104    QLineEdit *line_module; 
    105     QRadioButton *radio_module_port, *radio_module_local; 
     105    //QRadioButton *radio_module_port, *radio_module_local; 
    106106    QMenu menu_addOpt, menu_elOpts, menu_validMenuCats, menu_bins, menu_el_bins; 
    107107 
  • src-qt4/EasyPBI-devel/mainGUI.ui

    r3038c71 r809d133  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>555</width> 
    10     <height>588</height> 
     9    <width>548</width> 
     10    <height>448</height> 
    1111   </rect> 
    1212  </property> 
     
    271271             <x>0</x> 
    272272             <y>0</y> 
    273              <width>508</width> 
     273             <width>501</width> 
    274274             <height>648</height> 
    275275            </rect> 
     
    16461646     <x>0</x> 
    16471647     <y>0</y> 
    1648      <width>555</width> 
     1648     <width>548</width> 
    16491649     <height>20</height> 
    16501650    </rect> 
Note: See TracChangeset for help on using the changeset viewer.