Changeset e62a5d2


Ignore:
Timestamp:
02/03/14 10:21:09 (6 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2
Children:
77024b5
Parents:
e9ebd59
Message:

Create a new "Configuration" dialog for the package manager GUI.

Add the ability to switch between Production / Edge in this dialog

Remove the old production / edge dialog from System Manager

Location:
src-qt4
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-pkgmanager/mainWin.cpp

    rf5f85ce re62a5d2  
    3939  connect(pushPkgApply, SIGNAL( clicked() ), this, SLOT( slotApplyClicked() ) ); 
    4040  connect(action_Quit, SIGNAL( triggered(bool) ), this, SLOT( slotCloseClicked() ) ); 
     41  connect(action_Configuration, SIGNAL( triggered(bool) ), this, SLOT( slotConfigClicked() ) ); 
    4142  connect(tool_search, SIGNAL( clicked() ), this, SLOT( slotSearchPackages() ) ); 
    4243  connect(line_search, SIGNAL( returnPressed()), this, SLOT( slotSearchPackages()) ); 
     
    15751576 
    15761577} 
     1578 
     1579void mainWin::slotConfigClicked() 
     1580{ 
     1581   configD = new dialogConfig(); 
     1582   connect(configD, SIGNAL(ok()),this, SLOT(slotConfigFinished()) ); 
     1583   configD->programInit(); 
     1584   configD->show(); 
     1585} 
     1586 
     1587void mainWin::slotConfigFinished() 
     1588{ 
     1589   // Changed view, lets refresh 
     1590   initMetaWidget(); 
     1591} 
  • src-qt4/pc-pkgmanager/mainWin.h

    rfa2ad6e re62a5d2  
    1717#include <pcbsd-ui.h> 
    1818#include "dialogConfirm.h" 
     19#include "dialogConfig.h" 
    1920#include "ui_mainWin.h" 
    2021#include "../config.h" 
     
    7980 
    8081    void slotReadEventPipe(); 
     82 
     83    // Configuration dialog 
     84    void slotConfigClicked(); 
     85    void slotConfigFinished(); 
    8186 
    8287private: 
     
    161166    QProcess *eP; 
    162167 
     168    // Config dialog 
     169    dialogConfig *configD; 
     170 
    163171signals: 
    164172 
  • src-qt4/pc-pkgmanager/mainWin.ui

    re55b4d0 re62a5d2  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>800</width> 
     9    <width>913</width> 
    1010    <height>644</height> 
    1111   </rect> 
     
    459459     <x>0</x> 
    460460     <y>0</y> 
    461      <width>800</width> 
     461     <width>913</width> 
    462462     <height>22</height> 
    463463    </rect> 
     
    467467     <string>&amp;File</string> 
    468468    </property> 
     469    <addaction name="action_Configuration"/> 
     470    <addaction name="separator"/> 
    469471    <addaction name="action_Quit"/> 
    470472   </widget> 
     
    493495   </property> 
    494496   <property name="text"> 
    495     <string>&amp;Basic</string> 
     497    <string>&amp;Basic (Meta-Packages)</string> 
    496498   </property> 
    497499  </action> 
     
    501503   </property> 
    502504   <property name="text"> 
    503     <string>&amp;Advanced</string> 
     505    <string>&amp;Advanced (All Packages)</string> 
     506   </property> 
     507  </action> 
     508  <action name="action_Preferences"> 
     509   <property name="text"> 
     510    <string>&amp;Configuration</string> 
     511   </property> 
     512  </action> 
     513  <action name="action_Configuration"> 
     514   <property name="text"> 
     515    <string>&amp;Configuration</string> 
    504516   </property> 
    505517  </action> 
  • src-qt4/pc-pkgmanager/pc-pkgmanager.pro

    r1b89eeb re62a5d2  
    77INCLUDEPATH     += ../libpcbsd/utils ../libpcbsd/ui /usr/local/include 
    88 
    9 HEADERS += mainWin.h dialogConfirm.h 
     9HEADERS += mainWin.h dialogConfirm.h dialogConfig.h 
    1010 
    11 SOURCES += main.cpp mainWin.cpp dialogConfirm.cpp 
     11SOURCES += main.cpp mainWin.cpp dialogConfirm.cpp dialogConfig.cpp 
    1212 
    13 FORMS   = mainWin.ui dialogConfirm.ui 
     13FORMS   = mainWin.ui dialogConfirm.ui dialogConfig.ui 
    1414 
    1515RESOURCES = pc-pkgmanager.qrc  
  • src-qt4/pc-sysmanager/pbsystemtab.cpp

    r1c0e4984 re62a5d2  
    181181void PBSystemTab::loadMiscData() 
    182182{ 
    183     // Load the default package set value 
    184     if ( pcbsd::Utils::getValFromPCBSDConf("PACKAGE_SET") == "EDGE" ) { 
    185        radioEdge->setChecked(true); 
    186        radioProduction->setChecked(false); 
    187     } else { 
    188        radioProduction->setChecked(true); 
    189        radioEdge->setChecked(false); 
    190     } 
    191183    //Check if IBUS input is forced 
    192184    if ( pcbsd::Utils::getConfFileValue(QString(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh"), QString("FORCEIBUS=") ) == QString("YES")){ 
     
    204196        pcbsd::Utils::setConfFileValue(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh", "FORCEIBUS", "FORCEIBUS=\"NO\"", 1); 
    205197     } 
    206  
    207     // Save package set 
    208     if ( radioProduction->isChecked() ) 
    209       pcbsd::Utils::setValPCBSDConf("PACKAGE_SET", "PRODUCTION"); 
    210     else 
    211       pcbsd::Utils::setValPCBSDConf("PACKAGE_SET", "EDGE"); 
    212  
    213     // Extract the ports overlay to grab a new package set repo config 
    214     QProcess::execute(QString("pc-extractoverlay"), QStringList() << "ports"); 
    215198} 
    216199 
  • src-qt4/pc-sysmanager/pbsystemtab.ui

    ra4325b4 re62a5d2  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>471</width> 
     9    <width>519</width> 
    1010    <height>387</height> 
    1111   </rect> 
     
    567567      </attribute> 
    568568      <layout class="QGridLayout" name="gridLayout_3"> 
    569        <item row="2" column="0" colspan="3"> 
     569       <item row="1" column="0" colspan="3"> 
    570570        <spacer name="spacer37"> 
    571571         <property name="orientation"> 
     
    583583        </spacer> 
    584584       </item> 
    585        <item row="3" column="1"> 
     585       <item row="2" column="1"> 
    586586        <widget class="QPushButton" name="pushMiscSave"> 
    587587         <property name="text"> 
     
    590590        </widget> 
    591591       </item> 
    592        <item row="3" column="0"> 
     592       <item row="2" column="0"> 
    593593        <spacer name="horizontalSpacer_9"> 
    594594         <property name="orientation"> 
     
    603603        </spacer> 
    604604       </item> 
    605        <item row="1" column="0" colspan="3"> 
     605       <item row="0" column="0" colspan="3"> 
    606606        <widget class="QGroupBox" name="groupBox_6"> 
    607607         <property name="title"> 
     
    613613            <property name="text"> 
    614614             <string>Force IBUS keyboard input</string> 
    615             </property> 
    616            </widget> 
    617           </item> 
    618          </layout> 
    619         </widget> 
    620        </item> 
    621        <item row="0" column="0" colspan="2"> 
    622         <widget class="QGroupBox" name="groupBox"> 
    623          <property name="title"> 
    624           <string>Package Set</string> 
    625          </property> 
    626          <layout class="QGridLayout" name="gridLayout_20"> 
    627           <item row="0" column="0"> 
    628            <widget class="QRadioButton" name="radioProduction"> 
    629             <property name="text"> 
    630              <string>Production (Packages updated quarterly - Recommended)</string> 
    631             </property> 
    632             <property name="checked"> 
    633              <bool>true</bool> 
    634             </property> 
    635            </widget> 
    636           </item> 
    637           <item row="1" column="0"> 
    638            <widget class="QRadioButton" name="radioEdge"> 
    639             <property name="text"> 
    640              <string>Edge (Packages updated frequently - For testing and development)</string> 
    641615            </property> 
    642616           </widget> 
Note: See TracChangeset for help on using the changeset viewer.