summaryrefslogtreecommitdiff
path: root/noncore/settings/usermanager/usermanager.cpp
Unidiff
Diffstat (limited to 'noncore/settings/usermanager/usermanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/usermanager/usermanager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp
index 87dd7f1..ed18b7f 100644
--- a/noncore/settings/usermanager/usermanager.cpp
+++ b/noncore/settings/usermanager/usermanager.cpp
@@ -73,6 +73,7 @@ void UserConfig::setupTabAccounts() {
73 73
74 usersIconView=new QIconView(tabpage,"users"); 74 usersIconView=new QIconView(tabpage,"users");
75 usersIconView->setItemTextPos(QIconView::Right); 75 usersIconView->setItemTextPos(QIconView::Right);
76 usersIconView->setArrangement(QIconView::LeftToRight);
76 layout->addWidget(usersIconView); 77 layout->addWidget(usersIconView);
77 78
78 myTabWidget->addTab(tabpage,"Users"); 79 myTabWidget->addTab(tabpage,"Users");
@@ -123,14 +124,16 @@ void UserConfig::getUsers() {
123 new QListViewItem(usersListView,QString::number(accounts->pw_uid),accounts->pw_name,accounts->pw_gecos); 124 new QListViewItem(usersListView,QString::number(accounts->pw_uid),accounts->pw_name,accounts->pw_gecos);
124 if((accounts->pw_uid>=500) && (accounts->pw_uid<65000)) {// Is this user a "normal" user ? 125 if((accounts->pw_uid>=500) && (accounts->pw_uid<65000)) {// Is this user a "normal" user ?
125 mytext=QString(accounts->pw_name)+" - ("+QString(accounts->pw_gecos)+")"; // The string displayed next to the icon. 126 mytext=QString(accounts->pw_name)+" - ("+QString(accounts->pw_gecos)+")"; // The string displayed next to the icon.
126 mypixmap=Resource::loadPixmap(QString("users/"+accounts->pw_name));// Is there an icon for this user? 127 // mypixmap=Resource::loadPixmap(QString("users/"+accounts->pw_name));// Is there an icon for this user? Resource::loadPixmap is caching, doesn't work.
127 if(mypixmap.isNull()) { 128 if(!(mypixmap.load("/opt/QtPalmtop/pics/users/"+accounts->pw_name+".png"))) {
129 // if(mypixmap.isNull()) {
128 mypixmap=Resource::loadPixmap(QString("usermanager/usericon"));// If this user has no icon, load the default icon. 130 mypixmap=Resource::loadPixmap(QString("usermanager/usericon"));// If this user has no icon, load the default icon.
129 } 131 }
130 new QIconViewItem(usersIconView,mytext,mypixmap);// Add the icon+text to the qiconview. 132 new QIconViewItem(usersIconView,mytext,mypixmap);// Add the icon+text to the qiconview.
131 } 133 }
132 if((accounts->pw_uid>=availableUID) && (accounts->pw_uid<65000)) availableUID=accounts->pw_uid+1; // Increase 1 to the latest know UID to get a free uid. 134 if((accounts->pw_uid>=availableUID) && (accounts->pw_uid<65000)) availableUID=accounts->pw_uid+1; // Increase 1 to the latest know UID to get a free uid.
133 } 135 }
136 usersIconView->sort();
134} 137}
135 138
136void UserConfig::addUser() { 139void UserConfig::addUser() {