Changeset View
Changeset View
Standalone View
Standalone View
src/filewidgets/kdiroperator.cpp
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Line(s) | 172 | public: | |||
---|---|---|---|---|---|
195 | // private slots | 195 | // private slots | ||
196 | void _k_slotDetailedView(); | 196 | void _k_slotDetailedView(); | ||
197 | void _k_slotSimpleView(); | 197 | void _k_slotSimpleView(); | ||
198 | void _k_slotTreeView(); | 198 | void _k_slotTreeView(); | ||
199 | void _k_slotDetailedTreeView(); | 199 | void _k_slotDetailedTreeView(); | ||
200 | void _k_slotToggleHidden(bool); | 200 | void _k_slotToggleHidden(bool); | ||
201 | void _k_togglePreview(bool); | 201 | void _k_togglePreview(bool); | ||
202 | void _k_toggleInlinePreviews(bool); | 202 | void _k_toggleInlinePreviews(bool); | ||
203 | void _k_slotOpen(); | ||||
203 | void _k_slotOpenFileManager(); | 204 | void _k_slotOpenFileManager(); | ||
204 | void _k_slotSortByName(); | 205 | void _k_slotSortByName(); | ||
205 | void _k_slotSortBySize(); | 206 | void _k_slotSortBySize(); | ||
206 | void _k_slotSortByDate(); | 207 | void _k_slotSortByDate(); | ||
207 | void _k_slotSortByType(); | 208 | void _k_slotSortByType(); | ||
208 | void _k_slotSortReversed(bool doReverse); | 209 | void _k_slotSortReversed(bool doReverse); | ||
209 | void _k_slotToggleDirsFirst(); | 210 | void _k_slotToggleDirsFirst(); | ||
210 | void _k_slotToggleIgnoreCase(); | 211 | void _k_slotToggleIgnoreCase(); | ||
▲ Show 20 Lines • Show All 445 Lines • ▼ Show 20 Line(s) | 651 | { | |||
656 | 657 | | |||
657 | if (!previewGenerator) { | 658 | if (!previewGenerator) { | ||
658 | return; | 659 | return; | ||
659 | } | 660 | } | ||
660 | 661 | | |||
661 | previewGenerator->setPreviewShown(show); | 662 | previewGenerator->setPreviewShown(show); | ||
662 | } | 663 | } | ||
663 | 664 | | |||
665 | void KDirOperator::Private::_k_slotOpen() | ||||
666 | { | ||||
667 | const KFileItemList list = parent->selectedItems(); | ||||
668 | if (list.isEmpty()) { | ||||
669 | new KRun(currUrl, parent); | ||||
670 | } else { | ||||
671 | foreach (const QUrl &url, list.urlList()) { | ||||
672 | new KRun(url, parent); | ||||
673 | } | ||||
674 | } | ||||
675 | } | ||||
676 | | ||||
664 | void KDirOperator::Private::_k_slotOpenFileManager() | 677 | void KDirOperator::Private::_k_slotOpenFileManager() | ||
665 | { | 678 | { | ||
666 | const KFileItemList list = parent->selectedItems(); | 679 | const KFileItemList list = parent->selectedItems(); | ||
667 | if (list.isEmpty()) { | 680 | if (list.isEmpty()) { | ||
668 | KIO::highlightInFileManager({currUrl.adjusted(QUrl::StripTrailingSlash)}); | 681 | KIO::highlightInFileManager({currUrl.adjusted(QUrl::StripTrailingSlash)}); | ||
669 | } else { | 682 | } else { | ||
670 | KIO::highlightInFileManager(list.urlList()); | 683 | KIO::highlightInFileManager(list.urlList()); | ||
671 | } | 684 | } | ||
▲ Show 20 Lines • Show All 1300 Lines • ▼ Show 20 Line(s) | 1984 | connect(previewAction, SIGNAL(toggled(bool)), | |||
1972 | SLOT(_k_togglePreview(bool))); | 1985 | SLOT(_k_togglePreview(bool))); | ||
1973 | 1986 | | |||
1974 | KToggleAction *inlinePreview = new KToggleAction(QIcon::fromTheme(QStringLiteral("view-preview")), | 1987 | KToggleAction *inlinePreview = new KToggleAction(QIcon::fromTheme(QStringLiteral("view-preview")), | ||
1975 | i18n("Show Preview"), this); | 1988 | i18n("Show Preview"), this); | ||
1976 | d->actionCollection->addAction(QStringLiteral("inline preview"), inlinePreview); | 1989 | d->actionCollection->addAction(QStringLiteral("inline preview"), inlinePreview); | ||
1977 | inlinePreview->setShortcut(Qt::Key_F12); | 1990 | inlinePreview->setShortcut(Qt::Key_F12); | ||
1978 | connect(inlinePreview, SIGNAL(toggled(bool)), SLOT(_k_toggleInlinePreviews(bool))); | 1991 | connect(inlinePreview, SIGNAL(toggled(bool)), SLOT(_k_toggleInlinePreviews(bool))); | ||
1979 | 1992 | | |||
1993 | QAction *openItem = new QAction(i18n("Open"), this); | ||||
1994 | d->actionCollection->addAction(QStringLiteral("open"), openItem); | ||||
1995 | connect(openItem, SIGNAL(triggered()), SLOT(_k_slotOpen())); | ||||
1996 | | ||||
1980 | QAction *fileManager = new QAction(i18n("Open Containing Folder"), this); | 1997 | QAction *fileManager = new QAction(i18n("Open Containing Folder"), this); | ||
1981 | d->actionCollection->addAction(QStringLiteral("file manager"), fileManager); | 1998 | d->actionCollection->addAction(QStringLiteral("file manager"), fileManager); | ||
1982 | fileManager->setIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"))); | 1999 | fileManager->setIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"))); | ||
1983 | connect(fileManager, SIGNAL(triggered()), SLOT(_k_slotOpenFileManager())); | 2000 | connect(fileManager, SIGNAL(triggered()), SLOT(_k_slotOpenFileManager())); | ||
1984 | 2001 | | |||
1985 | action = new QAction(i18n("Properties"), this); | 2002 | action = new QAction(i18n("Properties"), this); | ||
1986 | d->actionCollection->addAction(QStringLiteral("properties"), action); | 2003 | d->actionCollection->addAction(QStringLiteral("properties"), action); | ||
1987 | action->setIcon(QIcon::fromTheme(QStringLiteral("document-properties"))); | 2004 | action->setIcon(QIcon::fromTheme(QStringLiteral("document-properties"))); | ||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 2034 | { | |||
2059 | } | 2076 | } | ||
2060 | 2077 | | |||
2061 | if (whichActions & ViewActions) { | 2078 | if (whichActions & ViewActions) { | ||
2062 | d->actionMenu->addAction(d->actionCollection->action(QStringLiteral("view menu"))); | 2079 | d->actionMenu->addAction(d->actionCollection->action(QStringLiteral("view menu"))); | ||
2063 | d->actionMenu->addSeparator(); | 2080 | d->actionMenu->addSeparator(); | ||
2064 | } | 2081 | } | ||
2065 | 2082 | | |||
2066 | if (whichActions & FileActions) { | 2083 | if (whichActions & FileActions) { | ||
2084 | d->actionMenu->addAction(d->actionCollection->action(QStringLiteral("open"))); | ||||
2067 | d->actionMenu->addAction(d->actionCollection->action(QStringLiteral("file manager"))); | 2085 | d->actionMenu->addAction(d->actionCollection->action(QStringLiteral("file manager"))); | ||
2068 | d->actionMenu->addAction(d->actionCollection->action(QStringLiteral("properties"))); | 2086 | d->actionMenu->addAction(d->actionCollection->action(QStringLiteral("properties"))); | ||
2069 | } | 2087 | } | ||
2070 | } | 2088 | } | ||
2071 | 2089 | | |||
2072 | void KDirOperator::updateSortActions() | 2090 | void KDirOperator::updateSortActions() | ||
2073 | { | 2091 | { | ||
2074 | if (KFile::isSortByName(d->sorting)) { | 2092 | if (KFile::isSortByName(d->sorting)) { | ||
▲ Show 20 Lines • Show All 594 Lines • Show Last 20 Lines |