]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use better-named visible and hidden icons
authorNate Graham <nate@kde.org>
Wed, 4 Sep 2019 15:04:13 +0000 (09:04 -0600)
committerNate Graham <nate@kde.org>
Wed, 4 Sep 2019 15:04:13 +0000 (09:04 -0600)
src/dolphinmainwindow.cpp
src/panels/places/placespanel.cpp
src/views/dolphinviewactionhandler.cpp

index e851fa2b0934ba5e780fb9502e41dedd92c7d21c..455d3b481f8e6a1355cdcfbeacb2f9ea0ab7cda6 100644 (file)
@@ -1658,7 +1658,7 @@ void DolphinMainWindow::setupDockWidgets()
             this, &DolphinMainWindow::slotStorageTearDownExternallyRequested);
     m_tabWidget->slotPlacesPanelVisibilityChanged(m_placesPanel->isVisible());
 
-    auto actionShowAllPlaces = new QAction(QIcon::fromTheme(QStringLiteral("hint")), i18nc("@item:inmenu", "Show Hidden Places"), this);
+    auto actionShowAllPlaces = new QAction(QIcon::fromTheme(QStringLiteral("view-hidden")), i18nc("@item:inmenu", "Show Hidden Places"), this);
     actionShowAllPlaces->setCheckable(true);
     actionShowAllPlaces->setDisabled(true);
     actionShowAllPlaces->setWhatsThis(i18nc("@info:whatsthis", "This displays "
@@ -1666,13 +1666,13 @@ void DolphinMainWindow::setupDockWidgets()
         "appear semi-transparent unless you uncheck their hide property."));
 
     connect(actionShowAllPlaces, &QAction::triggered, this, [actionShowAllPlaces, this](bool checked){
-        actionShowAllPlaces->setIcon(QIcon::fromTheme(checked ? QStringLiteral("visibility") : QStringLiteral("hint")));
+        actionShowAllPlaces->setIcon(QIcon::fromTheme(checked ? QStringLiteral("view-visible") : QStringLiteral("view-hidden")));
         m_placesPanel->showHiddenEntries(checked);
     });
 
     connect(m_placesPanel, &PlacesPanel::showHiddenEntriesChanged, this, [actionShowAllPlaces] (bool checked){
         actionShowAllPlaces->setChecked(checked);
-        actionShowAllPlaces->setIcon(QIcon::fromTheme(checked ? QStringLiteral("visibility") : QStringLiteral("hint")));
+        actionShowAllPlaces->setIcon(QIcon::fromTheme(checked ? QStringLiteral("view-visible") : QStringLiteral("view-hidden")));
    });
 
     actionCollection()->action(QStringLiteral("show_places_panel"))
index a2f0e06556769d122afad8176843dffefc2d28af..3ee36dc08f61848f711b365ae116403fccf9cfa7 100644 (file)
@@ -232,7 +232,7 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
         removeAction = menu.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18nc("@item:inmenu", "Remove"));
     }
 
-    QAction* hideAction = menu.addAction(QIcon::fromTheme(QStringLiteral("hint")), i18nc("@item:inmenu", "Hide"));
+    QAction* hideAction = menu.addAction(QIcon::fromTheme(QStringLiteral("view-hidden")), i18nc("@item:inmenu", "Hide"));
     hideAction->setCheckable(true);
     hideAction->setChecked(item->isHidden());
 
@@ -293,7 +293,7 @@ void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos)
     QAction* showAllAction = menu.addAction(i18nc("@item:inmenu", "Show Hidden Places"));
     showAllAction->setCheckable(true);
     showAllAction->setChecked(m_model->hiddenItemsShown());
-    showAllAction->setIcon(QIcon::fromTheme(m_model->hiddenItemsShown() ? QStringLiteral("visibility") : QStringLiteral("hint")));
+    showAllAction->setIcon(QIcon::fromTheme(m_model->hiddenItemsShown() ? QStringLiteral("view-visible") : QStringLiteral("view-hidden")));
     showAllAction->setEnabled(m_model->hiddenCount());
 
     buildGroupContextMenu(&menu, m_controller->indexCloseToMousePressedPosition());
@@ -358,7 +358,7 @@ QAction *PlacesPanel::buildGroupContextMenu(QMenu *menu, int index)
     }
 
     KFilePlacesModel::GroupType groupType = m_model->groupType(index);
-    QAction *hideGroupAction = menu->addAction(QIcon::fromTheme(QStringLiteral("hint")), i18nc("@item:inmenu", "Hide Section '%1'", m_model->item(index)->group()));
+    QAction *hideGroupAction = menu->addAction(QIcon::fromTheme(QStringLiteral("view-hidden")), i18nc("@item:inmenu", "Hide Section '%1'", m_model->item(index)->group()));
     hideGroupAction->setCheckable(true);
     hideGroupAction->setChecked(m_model->isGroupHidden(groupType));
 
index 5746bb7cf76c7f6c4dfe9e5850c411104062301f..7086ab627d57146cb2e59fcce64fe48688c2ed3f 100644 (file)
@@ -535,11 +535,11 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown)
 
     // #374508: don't overwrite custom icons.
     const QString iconName = showHiddenFilesAction->icon().name();
-    if (!iconName.isEmpty() && iconName != QLatin1String("visibility") && iconName != QLatin1String("hint")) {
+    if (!iconName.isEmpty() && iconName != QLatin1String("view-visible") && iconName != QLatin1String("view-hidden")) {
         return;
     }
 
-    showHiddenFilesAction->setIcon(QIcon::fromTheme(shown ? QStringLiteral("visibility") : QStringLiteral("hint")));
+    showHiddenFilesAction->setIcon(QIcon::fromTheme(shown ? QStringLiteral("view-visible") : QStringLiteral("view-hidden")));
 }
 
 void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable)