author | umopapisdn <umopapisdn> | 2002-09-28 22:30:24 (UTC) |
---|---|---|
committer | umopapisdn <umopapisdn> | 2002-09-28 22:30:24 (UTC) |
commit | 551661da944e2b93cff73317d6fb6eaffe5f7102 (patch) (unidiff) | |
tree | 29f415d63bad6727920e392efc3dfe201da80bb5 | |
parent | aa347496d408431d85ff2d7a2cf60479407620af (diff) | |
download | opie-551661da944e2b93cff73317d6fb6eaffe5f7102.zip opie-551661da944e2b93cff73317d6fb6eaffe5f7102.tar.gz opie-551661da944e2b93cff73317d6fb6eaffe5f7102.tar.bz2 |
User icons can be selected.
-rw-r--r-- | noncore/settings/usermanager/userdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp index c6b8a57..719dd1e 100644 --- a/noncore/settings/usermanager/userdialog.cpp +++ b/noncore/settings/usermanager/userdialog.cpp | |||
@@ -313,42 +313,42 @@ bool UserDialog::editUser(const char *username) { | |||
313 | if(!(d.exists("/opt/QtPalmtop/pics/users"))) { | 313 | if(!(d.exists("/opt/QtPalmtop/pics/users"))) { |
314 | d.mkdir("/opt/QtPalmtop/pics/users"); | 314 | d.mkdir("/opt/QtPalmtop/pics/users"); |
315 | } | 315 | } |
316 | QString filename="/opt/QtPalmtop/pics/users/"+accounts->pw_name+".png"; | 316 | QString filename="/opt/QtPalmtop/pics/users/"+accounts->pw_name+".png"; |
317 | edituserDialog->userImage=edituserDialog->userImage.smoothScale(48,48); | 317 | edituserDialog->userImage=edituserDialog->userImage.smoothScale(48,48); |
318 | edituserDialog->userImage.save(filename,"PNG"); | 318 | edituserDialog->userImage.save(filename,"PNG"); |
319 | } | 319 | } |
320 | return true; | 320 | return true; |
321 | } | 321 | } |
322 | 322 | ||
323 | /** | 323 | /** |
324 | * "OK" has been clicked. Verify some information before closing the dialog. | 324 | * "OK" has been clicked. Verify some information before closing the dialog. |
325 | * | 325 | * |
326 | */ | 326 | */ |
327 | void UserDialog::accept() { | 327 | void UserDialog::accept() { |
328 | // Add checking... valid username? username taken? | 328 | // Add checking... valid username? username taken? |
329 | if(loginLineEdit->text().isEmpty()) { | 329 | if(loginLineEdit->text().isEmpty()) { |
330 | QMessageBox::information(0,"Empty Login","Please enter a login."); | 330 | QMessageBox::information(0,"Empty Login","Please enter a login."); |
331 | return; | 331 | return; |
332 | } | 332 | } |
333 | QDialog::accept(); | 333 | QDialog::accept(); |
334 | } | 334 | } |
335 | 335 | ||
336 | /** | 336 | /** |
337 | * This slot is called when the usericon is clicked, this loads (should) the iconselector. | 337 | * This slot is called when the usericon is clicked, this loads (should) the iconselector. |
338 | * | 338 | * |
339 | */ | 339 | */ |
340 | void UserDialog::clickedPicture() { | 340 | void UserDialog::clickedPicture() { |
341 | QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED,"/opt/QtPalmtop/pics"); | 341 | QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED,"/opt/QtPalmtop/pics"); |
342 | if(!(filename.isEmpty())) { | 342 | if(!(filename.isEmpty())) { |
343 | userImage.reset(); | 343 | userImage.reset(); |
344 | if(!(userImage.load(filename))) { | 344 | if(!(userImage.load(filename))) { |
345 | QMessageBox::information(0,"Sorry!","Icon selection not yet implemented.\nComming real soon now! (tm)\n"+filename); | 345 | QMessageBox::information(0,"Sorry!","That icon could not be loaded.\nLoading failed on: "+filename); |
346 | } else { | 346 | } else { |
347 | userImage=userImage.smoothScale(48,48); | 347 | userImage=userImage.smoothScale(48,48); |
348 | QPixmap *picture; | 348 | QPixmap *picture; |
349 | picture=(QPixmap *)picturePushButton->pixmap(); | 349 | picture=(QPixmap *)picturePushButton->pixmap(); |
350 | picture->convertFromImage(userImage,0); | 350 | picture->convertFromImage(userImage,0); |
351 | picturePushButton->update(); | 351 | picturePushButton->update(); |
352 | } | 352 | } |
353 | } | 353 | } |
354 | } | 354 | } |