Changeset View
Standalone View
src/filewidgets/kdiroperator.cpp
Show First 20 Lines • Show All 1877 Lines • ▼ Show 20 Line(s) | 1847 | { | |||
---|---|---|---|---|---|
1878 | 1878 | | |||
1879 | QAction *action = new QAction(i18n("Delete"), this); | 1879 | QAction *action = new QAction(i18n("Delete"), this); | ||
1880 | d->actionCollection->addAction(QStringLiteral("delete"), action); | 1880 | d->actionCollection->addAction(QStringLiteral("delete"), action); | ||
1881 | action->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); | 1881 | action->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); | ||
1882 | action->setShortcut(Qt::SHIFT + Qt::Key_Delete); | 1882 | action->setShortcut(Qt::SHIFT + Qt::Key_Delete); | ||
1883 | connect(action, SIGNAL(triggered(bool)), this, SLOT(deleteSelected())); | 1883 | connect(action, SIGNAL(triggered(bool)), this, SLOT(deleteSelected())); | ||
1884 | 1884 | | |||
1885 | // the sort menu actions | 1885 | // the sort menu actions | ||
1886 | KActionMenu *sortMenu = new KActionMenu(i18n("Sorting"), this); | 1886 | KActionMenu *sortMenu = new KActionMenu(i18n("Sort by"), this); | ||
1887 | d->actionCollection->addAction(QStringLiteral("sorting menu"), sortMenu); | 1887 | d->actionCollection->addAction(QStringLiteral("sorting menu"), sortMenu); | ||
ngraham: Before the patch lands, this icon will be changed to whatever https://bugs.kde.org/show_bug.cgi? | |||||
1888 | sortMenu->setIcon(QIcon::fromTheme(QStringLiteral("itemize"))); | ||||
While we agreed upon wanting a better icon, until that's done I'd prefer view-sort-ascending instead. For me, itemize has no connection to sorting at all, sorry. I'm aware my alternative shows a specific mode, but TBH I don't think users will be put off too much by this detail, in particular because it is the only sorting-related icon in the dialog. Anyway, that's just my preference. Let me know if you think itemize is vastly better. rkflx: While we agreed upon wanting a better icon, until that's done I'd prefer `view-sort-ascending`… | |||||
The problem conceptually is that view-sort-ascending is semantically inaccurate for anything but ascending order. We don't actually have an icon yet that means "general sort options are here!" That's covered by https://bugs.kde.org/show_bug.cgi?id=393318, and I've pinged Andreas again. No matter what flawed we choose as a placeholder, I'm going to wait for the better icon before landing this, so for now let's just leave it the way it is. ngraham: The problem conceptually is that `view-sort-ascending` is semantically inaccurate for anything… | |||||
I think it is a misconception that toolbar icons represent state. I don't know of any toolbar in our software where this is the case, so why should users suddenly expect that what's on the icon represents exactly what is happening, e.g. A-Z ascending? It is merely an example of what type of actions they can expect when clicking on the button. Icons are a symbolic representation of general concept, not a literal display of a specific state. Anyway, if you want block everything on that, that's what we'll do. rkflx: I think it is a misconception that toolbar icons represent state. I don't know of any toolbar… | |||||
Seems like the new icon may be a long time in coming, and after giving it more thought, I've come around to your position (an increasingly common occurrence! :) ). ngraham: Seems like the new icon may be a long time in coming, and after giving it more thought, I've… | |||||
1888 | 1889 | | |||
1889 | KToggleAction *byNameAction = new KToggleAction(i18n("By Name"), this); | 1890 | KToggleAction *byNameAction = new KToggleAction(i18n("Name"), this); | ||
1890 | d->actionCollection->addAction(QStringLiteral("by name"), byNameAction); | 1891 | d->actionCollection->addAction(QStringLiteral("by name"), byNameAction); | ||
1891 | connect(byNameAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortByName())); | 1892 | connect(byNameAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortByName())); | ||
1892 | 1893 | | |||
1893 | KToggleAction *bySizeAction = new KToggleAction(i18n("By Size"), this); | 1894 | KToggleAction *bySizeAction = new KToggleAction(i18n("Size"), this); | ||
1894 | d->actionCollection->addAction(QStringLiteral("by size"), bySizeAction); | 1895 | d->actionCollection->addAction(QStringLiteral("by size"), bySizeAction); | ||
1895 | connect(bySizeAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortBySize())); | 1896 | connect(bySizeAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortBySize())); | ||
1896 | 1897 | | |||
1897 | KToggleAction *byDateAction = new KToggleAction(i18n("By Date"), this); | 1898 | KToggleAction *byDateAction = new KToggleAction(i18n("Date"), this); | ||
1898 | d->actionCollection->addAction(QStringLiteral("by date"), byDateAction); | 1899 | d->actionCollection->addAction(QStringLiteral("by date"), byDateAction); | ||
1899 | connect(byDateAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortByDate())); | 1900 | connect(byDateAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortByDate())); | ||
1900 | 1901 | | |||
1901 | KToggleAction *byTypeAction = new KToggleAction(i18n("By Type"), this); | 1902 | KToggleAction *byTypeAction = new KToggleAction(i18n("Type"), this); | ||
1902 | d->actionCollection->addAction(QStringLiteral("by type"), byTypeAction); | 1903 | d->actionCollection->addAction(QStringLiteral("by type"), byTypeAction); | ||
1903 | connect(byTypeAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortByType())); | 1904 | connect(byTypeAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortByType())); | ||
1904 | 1905 | | |||
1905 | KToggleAction *descendingAction = new KToggleAction(i18n("Descending"), this); | 1906 | KToggleAction *descendingAction = new KToggleAction(i18n("Descending"), this); | ||
1906 | d->actionCollection->addAction(QStringLiteral("descending"), descendingAction); | 1907 | d->actionCollection->addAction(QStringLiteral("descending"), descendingAction); | ||
1907 | connect(descendingAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortReversed(bool))); | 1908 | connect(descendingAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSortReversed(bool))); | ||
1908 | 1909 | | |||
1909 | KToggleAction *dirsFirstAction = new KToggleAction(i18n("Folders First"), this); | 1910 | KToggleAction *dirsFirstAction = new KToggleAction(i18n("Folders First"), this); | ||
▲ Show 20 Lines • Show All 759 Lines • Show Last 20 Lines |
Before the patch lands, this icon will be changed to whatever https://bugs.kde.org/show_bug.cgi?id=393318 yields.