Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/kpropertiesdialog.cpp
Show First 20 Lines • Show All 1860 Lines • ▼ Show 20 Line(s) | 1679 | { | |||
---|---|---|---|---|---|
1861 | * (possibly) making this unacceptably slow. | 1861 | * (possibly) making this unacceptably slow. | ||
1862 | * OTOH, it is nice to offer this functionality for the standard user. | 1862 | * OTOH, it is nice to offer this functionality for the standard user. | ||
1863 | */ | 1863 | */ | ||
1864 | int maxEntries = 1000; | 1864 | int maxEntries = 1000; | ||
1865 | 1865 | | |||
1866 | /* File owner: For root, offer a KLineEdit with autocompletion. | 1866 | /* File owner: For root, offer a KLineEdit with autocompletion. | ||
1867 | * For a user, who can never chown() a file, offer a QLabel. | 1867 | * For a user, who can never chown() a file, offer a QLabel. | ||
1868 | */ | 1868 | */ | ||
1869 | if (IamRoot && isLocal) { | 1869 | if (IamRoot && isLocal) { | ||
ngraham: You don't need to create a whole new grid layout; just add the label to the existing one. | |||||
1870 | d->usrEdit = new KLineEdit(gb); | 1870 | d->usrEdit = new KLineEdit(gb); | ||
1871 | KCompletion *kcom = d->usrEdit->completionObject(); | 1871 | KCompletion *kcom = d->usrEdit->completionObject(); | ||
1872 | kcom->setOrder(KCompletion::Sorted); | 1872 | kcom->setOrder(KCompletion::Sorted); | ||
1873 | QStringList userNames = KUser::allUserNames(maxEntries); | 1873 | QStringList userNames = KUser::allUserNames(maxEntries); | ||
1874 | kcom->setItems(userNames); | 1874 | kcom->setItems(userNames); | ||
1875 | d->usrEdit->setCompletionMode((userNames.size() < maxEntries) ? KCompletion::CompletionAuto : | 1875 | d->usrEdit->setCompletionMode((userNames.size() < maxEntries) ? KCompletion::CompletionAuto : | ||
1876 | KCompletion::CompletionNone); | 1876 | KCompletion::CompletionNone); | ||
1877 | d->usrEdit->setText(d->strOwner); | 1877 | d->usrEdit->setText(d->strOwner); | ||
▲ Show 20 Lines • Show All 224 Lines • ▼ Show 20 Line(s) | 2100 | case PermissionsOnlyLinks: | |||
2102 | aPartialPermissions = 0; | 2102 | aPartialPermissions = 0; | ||
2103 | break; | 2103 | break; | ||
2104 | } | 2104 | } | ||
2105 | } else { | 2105 | } else { | ||
2106 | aPermissions = d->permissions; | 2106 | aPermissions = d->permissions; | ||
2107 | aPartialPermissions = d->partialPermissions; | 2107 | aPartialPermissions = d->partialPermissions; | ||
2108 | } | 2108 | } | ||
2109 | 2109 | | |||
2110 | // Calculate item permissions | ||||
2111 | const mode_t itemPermission = properties->item().permissions(); | ||||
pino: why the cast to qint64? | |||||
2112 | | ||||
pino: why this string includes the untranslated label? | |||||
2113 | // Add Octal permissions to the dialog | ||||
2114 | l = new QLabel(i18n("Octal: %1", QString::fromLatin1("%1").arg(itemPermission, 0, 8)), gb); | ||||
pino: just use the static QString::number? | |||||
2115 | gl->addWidget(l, 0, 0, Qt::AlignRight); | ||||
pino: the translatable label must be here instead | |||||
2116 | | ||||
2110 | // Draw Checkboxes | 2117 | // Draw Checkboxes | ||
2111 | QCheckBox *cba[3][4]; | 2118 | QCheckBox *cba[3][4]; | ||
2112 | for (int row = 0; row < 3; ++row) { | 2119 | for (int row = 0; row < 3; ++row) { | ||
2113 | for (int col = 0; col < 4; ++col) { | 2120 | for (int col = 0; col < 4; ++col) { | ||
2114 | QCheckBox *cb = new QCheckBox(gb); | 2121 | QCheckBox *cb = new QCheckBox(gb); | ||
2115 | if (col != 3) { | 2122 | if (col != 3) { | ||
2116 | theNotSpecials.append(cb); | 2123 | theNotSpecials.append(cb); | ||
2117 | } | 2124 | } | ||
▲ Show 20 Lines • Show All 1812 Lines • Show Last 20 Lines |
You don't need to create a whole new grid layout; just add the label to the existing one.