]> cloud.milkyroute.net Git - dolphin.git/commitdiff
allow to disable the preview of the Information Panel
authorPeter Penz <peter.penz19@gmail.com>
Tue, 10 Mar 2009 19:59:22 +0000 (19:59 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 10 Mar 2009 19:59:22 +0000 (19:59 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=937927

src/panels/information/dolphin_informationpanelsettings.kcfg
src/panels/information/informationpanel.cpp

index b4c30b221fd3eab677756ef30f0df9a773a1bb8e..a30bee65d59b09c7ea053607f3275492161026ab 100644 (file)
@@ -3,6 +3,10 @@
 <kcfg>
     <kcfgfile name="dolphinrc"/>
     <group name="InformationPanel">
+        <entry name="showPreview" type="Bool">
+            <label context="@label">Show preview</label>
+            <default>true</default>
+        </entry>
         <entry name="showRating" type="Bool">
             <label context="@label">Show rating</label>
             <default>true</default>
index 2b3124b3cff09427867029b6adae886bdd49f4ec..96f158020b30a9b768ff3b556389601b2edd88e0 100644 (file)
@@ -229,11 +229,18 @@ void InformationPanel::contextMenuEvent(QContextMenuEvent* event)
 
     KMenu popup(this);
 
+    QAction* previewAction = popup.addAction(i18nc("@action:inmenu", "Preview"));
+    previewAction->setIcon(KIcon("view-preview"));
+    previewAction->setCheckable(true);
+    previewAction->setChecked(InformationPanelSettings::showPreview());
+
     QAction* ratingAction = popup.addAction(i18nc("@action:inmenu", "Rating"));
+    ratingAction->setIcon(KIcon("rating"));
     ratingAction->setCheckable(true);
     ratingAction->setChecked(InformationPanelSettings::showRating());
 
     QAction* commentAction = popup.addAction(i18nc("@action:inmenu", "Comment"));
+    commentAction->setIcon(KIcon("text-plain"));
     commentAction->setCheckable(true);
     commentAction->setChecked(InformationPanelSettings::showComment());
 
@@ -304,7 +311,9 @@ void InformationPanel::contextMenuEvent(QContextMenuEvent* event)
         return;
     }
 
-    if (action == ratingAction) {
+    if (action == previewAction) {
+        // TODO
+    } else if (action == ratingAction) {
         // TODO
     } else if (action == commentAction) {
         // TODO