--- apps/kdepasswd/kcm/kcm_useraccount.kcfg~ 2008-10-22 21:03:30.000000000 -0200 +++ apps/kdepasswd/kcm/kcm_useraccount.kcfg 2009-07-22 17:49:36.000000000 -0300 @@ -22,11 +22,11 @@ but this is a nifty way of handling default values ;-) --> <entry name = "FaceSize" type="Int"> <label>The size of login images</label> - <default>64</default> + <default>48</default> </entry> <entry name = "DefaultFile" type="Path"> <label>The default image file</label> - <default>.default.face.icon</default> + <default>default</default> </entry> <entry name="CustomFaceFile" type="Path"> <label>The filename of the user's custom image file</label> --- apps/kdepasswd/kcm/main.cpp~ 2009-05-14 14:26:16.000000000 -0300 +++ apps/kdepasswd/kcm/main.cpp 2009-07-22 17:54:06.000000000 -0300 @@ -148,10 +148,11 @@ _mw->leOrganization->setText( _kes->getSetting( KEMailSettings::Organization )); _mw->leSMTP->setText( _kes->getSetting( KEMailSettings::OutServer )); - QString _userPicsDir = KCFGUserAccount::faceDir() + - KGlobal::dirs()->resourceDirs("data").last() + "kdm/faces/"; + QString _userPicsDir = KCFGUserAccount::faceDir(); + //QString _userPicsDir = KCFGUserAccount::faceDir() + + // KGlobal::dirs()->resourceDirs("data").last() + "kdm/faces/"; - QString fs = KCFGUserAccount::faceSource(); + QString fs = KCFGUserAccount::faceSource(); if (fs == QLatin1String("UserOnly")) _facePerm = userOnly; else if (fs == QLatin1String("PreferUser")) @@ -163,9 +164,13 @@ if ( _facePerm == adminFirst ) { // If the administrator's choice takes preference - _facePixmap = QPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + //_facePixmap = QPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + _facePixmap = QPixmap( _userPicsDir + _ku->loginName() ); if ( _facePixmap.isNull() ) + _facePixmap = QPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + + if ( _facePixmap.isNull() ) _facePerm = userFirst; else _mw->btnChangeFace->setIcon( KIcon(_facePixmap) ); @@ -178,6 +183,9 @@ // The user has no face, should we check for the admin's setting? if ( _facePixmap.isNull() && _facePerm == userFirst ) + _facePixmap = QPixmap( _userPicsDir + _ku->loginName() ); + + if ( _facePixmap.isNull() ) _facePixmap = QPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); if ( _facePixmap.isNull() ) @@ -188,8 +196,12 @@ else if ( _facePerm <= adminOnly ) { // Admin only - _facePixmap = QPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + //_facePixmap = QPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + _facePixmap = QPixmap( _userPicsDir + _ku->loginName() ); if ( _facePixmap.isNull() ) + _facePixmap = QPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + + if ( _facePixmap.isNull() ) _facePixmap = QPixmap( _userPicsDir + KCFGUserAccount::defaultFile() ); _mw->btnChangeFace->setIcon( KIcon(_facePixmap) ); } @@ -277,8 +289,9 @@ return; } - ChFaceDlg* pDlg = new ChFaceDlg( KGlobal::dirs()->resourceDirs("data").last() + - "/kdm/pics/users/", this ); + //ChFaceDlg* pDlg = new ChFaceDlg( KGlobal::dirs()->resourceDirs("data").last() + + //"/kdm/pics/users/", this ); + ChFaceDlg* pDlg = new ChFaceDlg( "/usr/share/faces/", this ); if ( pDlg->exec() == QDialog::Accepted && !pDlg->getFaceImage().isNull() ) changeFace( pDlg->getFaceImage() );