Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/kpropertiesdialog.cpp
Show First 20 Lines • Show All 1143 Lines • ▼ Show 20 Line(s) | 1142 | if (!dt.isNull()) { | |||
---|---|---|---|---|---|
1144 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | 1144 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | ||
1145 | 1145 | | |||
1146 | l = new QLabel(dt.toString(Qt::DefaultLocaleLongDate), d->m_frame); | 1146 | l = new QLabel(dt.toString(Qt::DefaultLocaleLongDate), d->m_frame); | ||
1147 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | 1147 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||
1148 | grid->addWidget(l, curRow++, 2); | 1148 | grid->addWidget(l, curRow++, 2); | ||
1149 | } | 1149 | } | ||
1150 | } | 1150 | } | ||
1151 | 1151 | | |||
1152 | if (hasDirs) { // only for directories | 1152 | // Show volume information only for the root level of a mounted volume | ||
1153 | if (isLocal) { | ||||
1154 | KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(url.toLocalFile()); | ||||
1155 | | ||||
1156 | if (mp && (mp->mountPoint() == directory || mp->mountPoint() == url.toLocalFile())) { | ||||
1153 | sep = new KSeparator(Qt::Horizontal, d->m_frame); | 1157 | sep = new KSeparator(Qt::Horizontal, d->m_frame); | ||
1154 | grid->addWidget(sep, curRow, 0, 1, 3); | 1158 | grid->addWidget(sep, curRow, 0, 1, 3); | ||
1155 | ++curRow; | 1159 | ++curRow; | ||
1156 | 1160 | | |||
1157 | if (isLocal) { | | |||
1158 | KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(url.toLocalFile()); | | |||
1159 | | ||||
1160 | if (mp) { | | |||
1161 | l = new QLabel(i18n("File System:"), d->m_frame); | 1161 | l = new QLabel(i18n("File System:"), d->m_frame); | ||
1162 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | 1162 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | ||
1163 | 1163 | | |||
1164 | l = new QLabel(d->m_frame); | 1164 | l = new QLabel(d->m_frame); | ||
1165 | grid->addWidget(l, curRow++, 2); | 1165 | grid->addWidget(l, curRow++, 2); | ||
1166 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | 1166 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||
1167 | l->setText(mp->mountType()); | 1167 | l->setText(mp->mountType()); | ||
1168 | 1168 | | |||
1169 | l = new QLabel(i18n("Mounted on:"), d->m_frame); | 1169 | l = new QLabel(i18n("Mounted on:"), d->m_frame); | ||
1170 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | 1170 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | ||
1171 | 1171 | | |||
1172 | l = new KSqueezedTextLabel(mp->mountPoint(), d->m_frame); | 1172 | l = new KSqueezedTextLabel(mp->mountPoint(), d->m_frame); | ||
1173 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | 1173 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||
1174 | grid->addWidget(l, curRow++, 2); | 1174 | grid->addWidget(l, curRow++, 2); | ||
1175 | 1175 | | |||
1176 | l = new QLabel(i18n("Mounted from:"), d->m_frame); | 1176 | l = new QLabel(i18n("Mounted from:"), d->m_frame); | ||
1177 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | 1177 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | ||
1178 | 1178 | | |||
1179 | l = new QLabel(mp->mountedFrom(), d->m_frame); | 1179 | l = new QLabel(mp->mountedFrom(), d->m_frame); | ||
1180 | grid->addWidget(l, curRow++, 2); | 1180 | grid->addWidget(l, curRow++, 2); | ||
1181 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | 1181 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||
1182 | } | | |||
1183 | } | | |||
1184 | 1182 | | |||
1185 | l = new QLabel(i18nc("Amount of used and available space on this device or partition", "Free space:"), d->m_frame); | 1183 | l = new QLabel(i18nc("Amount of used and available space on this device or partition", "Free space:"), d->m_frame); | ||
1186 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | 1184 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | ||
1187 | 1185 | | |||
1188 | d->m_capacityBar = new KCapacityBar(KCapacityBar::DrawTextOutline, d->m_frame); | 1186 | d->m_capacityBar = new KCapacityBar(KCapacityBar::DrawTextOutline, d->m_frame); | ||
1189 | d->m_capacityBar->setText(i18nc("@info:status", "Unknown size")); | 1187 | d->m_capacityBar->setText(i18nc("@info:status", "Unknown size")); | ||
1190 | grid->addWidget(d->m_capacityBar, curRow++, 2); | 1188 | grid->addWidget(d->m_capacityBar, curRow++, 2); | ||
1191 | 1189 | | |||
1192 | KIO::FileSystemFreeSpaceJob *job = KIO::fileSystemFreeSpace(url); | 1190 | KIO::FileSystemFreeSpaceJob *job = KIO::fileSystemFreeSpace(url); | ||
1193 | connect(job, &KIO::FileSystemFreeSpaceJob::result, this, &KFilePropsPlugin::slotFreeSpaceResult); | 1191 | connect(job, &KIO::FileSystemFreeSpaceJob::result, this, &KFilePropsPlugin::slotFreeSpaceResult); | ||
1194 | } | 1192 | } | ||
1193 | } | ||||
1195 | 1194 | | |||
1196 | vbl->addStretch(1); | 1195 | vbl->addStretch(1); | ||
1197 | } | 1196 | } | ||
1198 | 1197 | | |||
1199 | bool KFilePropsPlugin::enableIconButton() const | 1198 | bool KFilePropsPlugin::enableIconButton() const | ||
1200 | { | 1199 | { | ||
1201 | bool iconEnabled = false; | 1200 | bool iconEnabled = false; | ||
1202 | const KFileItem item = properties->item(); | 1201 | const KFileItem item = properties->item(); | ||
▲ Show 20 Lines • Show All 2724 Lines • Show Last 20 Lines |