summaryrefslogtreecommitdiff
path: root/noncore/settings/usermanager/userdialog.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/usermanager/userdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/usermanager/userdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp
index c06f639..19b0e84 100644
--- a/noncore/settings/usermanager/userdialog.cpp
+++ b/noncore/settings/usermanager/userdialog.cpp
@@ -380,62 +380,62 @@ bool UserDialog::editUser(const char *username) {
accounts->pw_shell=edituserDialog->shellComboBox->currentText();
// Update userinfo, using the information stored in the user variables stored in the accounts object.
accounts->updateUser(username);
// Remove user from all groups he/she is a member of. (could be done in a better way I guess, this was simple though.)
for(QStringList::Iterator it=tempList.begin(); it!=tempList.end(); ++it) {
accounts->delGroupMember((*it).left((*it).find(":")),username);
}
// Add User to additional groups that he/she is a member of.
QListViewItemIterator it( edituserDialog->groupsListView );
for ( ; it.current(); ++it ) {
temp=(QCheckListItem*)it.current();
if ( temp->isOn() )
accounts->addGroupMember(it.current()->text(0),edituserDialog->loginLineEdit->text());
}
// Copy image to pics/users/
if(!(edituserDialog->userImage.isNull())) {
QDir d;
if(!(d.exists("/opt/QtPalmtop/pics/users"))) {
d.mkdir("/opt/QtPalmtop/pics/users");
}
QString filename="/opt/QtPalmtop/pics/users/"+accounts->pw_name+".png";
// edituserDialog->userImage=edituserDialog->userImage.smoothScale(48,48);
edituserDialog->userImage.save(filename,"PNG");
}
return true;
}
/**
* "OK" has been clicked. Verify some information before closing the dialog.
*
*/
void UserDialog::accept() {
// Add checking... valid username? username taken?
if(loginLineEdit->text().isEmpty()) {
QMessageBox::information(0,"Empty Login","Please enter a login.");
return;
}
QDialog::accept();
}
/**
* This slot is called when the usericon is clicked, this loads (should) the iconselector.
*
*/
void UserDialog::clickedPicture() {
- QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED,"/opt/QtPalmtop/pics");
+ QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED, QString::null);
if(!(filename.isEmpty())) {
userImage.reset();
if(!(userImage.load(filename))) {
QMessageBox::information(0,"Sorry!","That icon could not be loaded.\nLoading failed on: "+filename);
} else {
// userImage=userImage.smoothScale(48,48);
QPixmap *picture;
picture=(QPixmap *)picturePushButton->pixmap();
picture->convertFromImage(userImage,0);
picturePushButton->update();
}
}
}