Changeset 73ada33


Ignore:
Timestamp:
03/14/14 17:41:23 (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
556d790
Parents:
31467bf (diff), bf6b163 (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

Location:
src-qt4
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/src/main.cpp

    r28c79ad rfdf420c  
    145145    w.setWindowState(Qt::WindowMaximized); //Qt::WindowFullScreen); 
    146146 
    147     //Setup the signals/slots to startup the desktop session 
    148     //if(USECLIBS){ QObject::connect( &w,SIGNAL(xLoginAttempt(QString,QString,QString)), &desktop,SLOT(setupDesktop(QString,QString,QString))); } 
    149     //else{  
    150             QObject::connect( &w,SIGNAL(xLoginAttempt(QString,QString,QString,QString)), &desktop,SLOT(loginToXSession(QString,QString,QString,QString)) );  
    151     //} 
     147    //Setup the signals/slots to startup the desktop session  
     148    QObject::connect( &w,SIGNAL(xLoginAttempt(QString,QString,QString,QString)), &desktop,SLOT(loginToXSession(QString,QString,QString,QString)) );  
    152149    //Setup the signals/slots for return information for the GUI 
    153150    QObject::connect( &desktop, SIGNAL(InvalidLogin()), &w, SLOT(slotLoginFailure()) ); 
     
    160157  }  // end of PCDM GUI running 
    161158  //Wait for the desktop session to finish before exiting 
    162   //if(USECLIBS){ desktop.startDesktop(); } 
    163   //else{  
    164159    desktop.waitForSessionClosed();  
    165   //} 
    166160  splash.show(); //show the splash screen again 
    167161  //Now wait a couple seconds for things to settle 
     
    180174      QCoreApplication::processEvents(QEventLoop::AllEvents, 100);  
    181175    } 
    182     //set the return code for a shutdown 
    183     retCode = -1; //make sure it does not start a new session 
    184176  } 
    185177   
     
    214206    qDebug() << "-- PCDM Session Ended --"; 
    215207    //check for special exit code 
    216     if(retCode != 0){ neverquit=FALSE; } 
     208    if(retCode == -1){ neverquit=true; } //make sure we go around again at least once 
     209    else if(retCode != 0){ neverquit=FALSE; } 
    217210    //Now kill the shild process (whole session) 
    218211    qDebug() << "Exiting child process"; 
  • src-qt4/PCDM/src/pcdm-backend.cpp

    rae41693 rfdf420c  
    9292QString Backend::getDisplayNameFromUsername(QString username){ 
    9393  int i = usernameList.indexOf(username); 
    94   return displaynameList[i];   
     94  if(i==-1){ i = displaynameList.indexOf(username); } //make sure it was not a display name passed in 
     95  if(i==-1){ return ""; } 
     96  else{ 
     97    return displaynameList[i];   
     98  } 
    9599} 
    96100 
     
    250254  if(!mainDir.exists("pcdm.conf.sample")){ QFile::copy(":samples/pcdm.conf",base+"/pcdm.conf.sample"); }  
    251255  //Check for the PCDM runtime directory 
    252   mainDir.cd("/var/db/pcdm"); 
    253   if(!mainDir.exists()){ mainDir.mkdir("/var/db/pcdm"); } 
     256  mainDir.cd(DBDIR); 
     257  if(!mainDir.exists()){ mainDir.mkpath(DBDIR); } 
    254258} 
    255259 
     
    260264  } 
    261265  //return the value 
    262   return lastUser; 
     266  QString user = getDisplayNameFromUsername(lastUser); 
     267  return user; 
    263268} 
    264269 
     
    274279 
    275280void Backend::saveLoginInfo(QString user, QString desktop){ 
    276   writeSystemLastLogin(user,desktop); //save the system file (/usr/local/share/PCDM/.lastlogin) 
     281  writeSystemLastLogin(user,desktop); //save the system file (DBDIR/lastlogin) 
    277282  writeUserLastDesktop(user,desktop); //save the user file (~/.lastlogin) 
    278283} 
     
    285290    keyvariant = ""; 
    286291  //Read the current inputs file and overwrite default values 
    287   QFile file("/var/db/pcdm/defaultInputs"); 
     292  QFile file(DBDIR+"defaultInputs"); 
    288293  bool goodFile=false; 
    289294  if(file.exists()){ 
     
    309314 
    310315void Backend::saveDefaultSysEnvironment(QString lang, QString keymodel, QString keylayout, QString keyvariant){ 
    311   QFile file("/var/db/pcdm/defaultInputs"); 
     316  QFile file(DBDIR+"defaultInputs"); 
    312317  //Make sure the containing directory exists 
    313   if(!QFile::exists("/var/db/pcdm")){ 
     318  if(!QFile::exists(DBDIR)){ 
    314319    QDir dir; 
    315     dir.mkpath("/var/db/pcdm"); 
     320    dir.mkpath(DBDIR); 
    316321  } 
    317322  //Now save the file 
     
    541546 
    542547void Backend::readSystemLastLogin(){ 
    543     if(!QFile::exists("/usr/local/share/PCDM/.lastlogin")){ 
     548    if(!QFile::exists(DBDIR+"lastlogin")){ 
    544549      lastUser.clear(); 
    545550      Backend::log("PCDM: No previous login data found"); 
    546551    }else{ 
    547552      //Load the previous login data 
    548       QFile file("/usr/local/share/PCDM/.lastlogin"); 
     553      QFile file(DBDIR+"lastlogin"); 
    549554      if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ 
    550555        Backend::log("PCDM: Unable to open previous login data file");     
     
    559564 
    560565void Backend::writeSystemLastLogin(QString user, QString desktop){ 
    561   QFile file1("/usr/local/share/PCDM/.lastlogin"); 
     566  QFile file1(DBDIR+"lastlogin"); 
    562567  if(!file1.open(QIODevice::Truncate | QIODevice::WriteOnly | QIODevice::Text)){ 
    563568    Backend::log("PCDM: Unable to save last login data to system directory");      
  • src-qt4/PCDM/src/pcdm-backend.h

    r3b71e5d rfdf420c  
    2020 
    2121#define PCSYSINSTALL    QString("/usr/sbin/pc-sysinstall") 
     22#define DBDIR QString("/var/db/pcdm/") 
    2223 
    2324class Process : public QProcess { 
  • src-qt4/PCDM/src/pcdm-xprocess.cpp

    ra51a897 rfdf420c  
    4949  xlang = lang; 
    5050  //Now start the login process 
    51   startXSession(); 
     51  if( !startXSession() ){ 
     52    //Could not continue after session changed significantly - close down the session to restart 
     53    QCoreApplication::exit(-1); //special code to make sure we are just restarting the PCDM session (not the full X session) 
     54  } 
    5255} 
    5356 
     
    6972 
    7073bool XProcess::startXSession(){ 
    71   //disconnect(SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup()) ); 
     74  //Returns TRUE if the session can continue, or FALSE if it needs to be closed down 
     75 
    7276  //Check that the necessary info to start the session is available 
    7377  if( xuser.isEmpty() || xcmd.isEmpty() || xhome.isEmpty() || xde.isEmpty() ){ 
    7478    emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    75     return FALSE; 
     79    return true; 
    7680  } 
    7781  //Backend::log("Starting up Desktop environment ("+xcmd+") as user ("+xuser+")"); 
    7882   
    7983  //Check for PAM username/password validity 
    80   if( !pam_checkPW() ){ emit InvalidLogin(); pam_shutdown(); return FALSE; } 
     84  if( !pam_checkPW() ){ emit InvalidLogin(); pam_shutdown(); return true; } 
    8185 
    8286 
    8387  //Save the current user/desktop as the last login 
    84   Backend::saveLoginInfo(Backend::getDisplayNameFromUsername(xuser),xde); 
     88  Backend::saveLoginInfo(xuser,xde); 
    8589 
    8690  // Get the users uid/gid information 
     
    9296      uid = strtol(xuser.toLatin1(), &ok, 10); 
    9397      if (!(pw = getpwuid(uid))) { 
    94           emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    9598          return FALSE; 
    9699      } 
     
    110113  if (setgid(pw->pw_gid) < 0) { 
    111114      qDebug() << "setgid() failed!"; 
    112       emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    113115      return FALSE; 
    114116  } 
     
    117119  if (initgroups(xuser.toLatin1(), pw->pw_gid) < 0) { 
    118120      qDebug() << "initgroups() failed!"; 
    119       emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    120121      setgid(0); 
    121122      return FALSE; 
     
    125126  if (setuid(pw->pw_uid) < 0) { 
    126127      qDebug() << "setuid() failed!"; 
    127       emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    128128      return FALSE; 
    129129  } 
  • src-qt4/pc-bluetoothmanager/btmaingui.ui

    r1620346 re082b66  
    1919     <widget class="QTabWidget" name="tabWidget"> 
    2020      <property name="currentIndex"> 
    21        <number>0</number> 
     21       <number>2</number> 
    2222      </property> 
    2323      <widget class="QWidget" name="tabSettings"> 
     
    4545           <widget class="QPushButton" name="pushChangeCompName"> 
    4646            <property name="text"> 
    47              <string>Change</string> 
     47             <string>&amp;Change</string> 
    4848            </property> 
    4949           </widget> 
     
    7373           <widget class="QPushButton" name="pushDisconnectDevice"> 
    7474            <property name="text"> 
    75              <string>Disconnect Device</string> 
     75             <string>&amp;Disconnect Device</string> 
    7676            </property> 
    7777           </widget> 
     
    104104           <widget class="QPushButton" name="pushStartTray"> 
    105105            <property name="text"> 
    106              <string>Start Tray Application</string> 
     106             <string>Start &amp;Tray Application</string> 
    107107            </property> 
    108108           </widget> 
     
    124124           <widget class="QPushButton" name="pushRestart"> 
    125125            <property name="text"> 
    126              <string>Restart Service</string> 
     126             <string>&amp;Restart Service</string> 
    127127            </property> 
    128128           </widget> 
     
    158158           <widget class="QPushButton" name="pushScanNew"> 
    159159            <property name="text"> 
    160              <string>Scan</string> 
     160             <string>&amp;Scan</string> 
    161161            </property> 
    162162           </widget> 
     
    178178           <widget class="QPushButton" name="pushAddDevice"> 
    179179            <property name="text"> 
    180              <string>Add Device</string> 
     180             <string>&amp;Add Device</string> 
    181181            </property> 
    182182           </widget> 
     
    206206           <widget class="QPushButton" name="pushConnectDevice"> 
    207207            <property name="text"> 
    208              <string>Initiate Pairing</string> 
     208             <string>&amp;Initiate Pairing</string> 
    209209            </property> 
    210210           </widget> 
     
    226226           <widget class="QPushButton" name="pushConfigureOld"> 
    227227            <property name="text"> 
    228              <string>Configure</string> 
     228             <string>&amp;Configure</string> 
    229229            </property> 
    230230           </widget> 
     
    233233           <widget class="QPushButton" name="pushRemoveOld"> 
    234234            <property name="text"> 
    235              <string>Remove Device</string> 
     235             <string>&amp;Remove Device</string> 
    236236            </property> 
    237237           </widget> 
  • src-qt4/pc-netmanager/src/NetworkManager/networkman.ui

    rc9d1400 rbe08b76  
    2525    <widget class="QTabWidget" name="tabNetMan"> 
    2626     <property name="currentIndex"> 
    27       <number>0</number> 
     27      <number>1</number> 
    2828     </property> 
    2929     <widget class="QWidget" name="Widget8"> 
     
    792792      <widget class="QPushButton" name="pushSave"> 
    793793       <property name="text"> 
    794         <string>&amp;Save</string> 
     794        <string>&amp;Apply</string> 
    795795       </property> 
    796796      </widget> 
  • src-qt4/pc-pfmanager/mainwindow.ui

    rbe85a4e rde89833  
    1818    <widget class="QTabWidget" name="tabWidget4"> 
    1919     <property name="currentIndex"> 
    20       <number>0</number> 
     20      <number>1</number> 
    2121     </property> 
    2222     <widget class="QWidget" name="tab"> 
     
    5050           <widget class="QPushButton" name="pbRestore"> 
    5151            <property name="text"> 
    52              <string>Restore default configuration</string> 
     52             <string>&amp;Restore default configuration</string> 
    5353            </property> 
    5454           </widget> 
     
    8282           <widget class="QPushButton" name="pbStart"> 
    8383            <property name="text"> 
    84              <string>Start</string> 
     84             <string>&amp;Start</string> 
    8585            </property> 
    8686           </widget> 
     
    8989           <widget class="QPushButton" name="pbStop"> 
    9090            <property name="text"> 
    91              <string>Stop</string> 
     91             <string>Sto&amp;p</string> 
    9292            </property> 
    9393           </widget> 
     
    9696           <widget class="QPushButton" name="pbRestart"> 
    9797            <property name="text"> 
    98              <string>Restart</string> 
     98             <string>Re&amp;start</string> 
    9999            </property> 
    100100           </widget> 
     
    161161        <widget class="QPushButton" name="pbAdd"> 
    162162         <property name="text"> 
    163           <string>Add entry</string> 
     163          <string>&amp;Add entry</string> 
    164164         </property> 
    165165        </widget> 
     
    168168        <widget class="QPushButton" name="pbEdit"> 
    169169         <property name="text"> 
    170           <string>Edit entry</string> 
     170          <string>&amp;Edit entry</string> 
    171171         </property> 
    172172        </widget> 
     
    191191        <widget class="QPushButton" name="pbDelete"> 
    192192         <property name="text"> 
    193           <string>Delete entry</string> 
     193          <string>&amp;Delete entry</string> 
    194194         </property> 
    195195        </widget> 
  • src-qt4/libpcbsd/utils/netif.cpp

    r68ecb7a r31467bf  
    537537          //Set WEP Defaults 
    538538          int WEPIndex = 0; 
    539           bool WEPHex = true; //Use Hex WEP key 
     539          // Default to plain-text WEP keys.. 
     540          // This needs to be fixed to figure it out automatically 
     541          bool WEPHex = false; 
    540542           
    541543          streamout << " key_mgmt=NONE\n"; 
  • src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp

    r15783fa r31467bf  
    165165           // Check if we are using a plaintext WEP or not 
    166166           if ( WEPHex[curItem] ) 
     167             streamout << " wep_key" + tmp.setNum(WEPIndex[curItem]) + "=" + WEPKey[curItem] + "\n"; 
     168           else 
    167169             streamout << " wep_key" + tmp.setNum(WEPIndex[curItem]) + "=\"" + WEPKey[curItem] + "\"\n"; 
    168            else 
    169              streamout << " wep_key" + tmp.setNum(WEPIndex[curItem]) + "=" + WEPKey[curItem] + "\n"; 
    170170 
    171171         } else if (SSIDEncType[curItem] == WPA_ENCRYPTION ) { 
Note: See TracChangeset for help on using the changeset viewer.