[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kfile
From:       Peter Penz <peter.penz () gmx ! at>
Date:       2008-01-17 21:00:04
Message-ID: 1200603604.103594.31216.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 762776 by ppenz:

don't open an empty context menu for fileplaces (used coding style from \
kfileplacesview.cpp -> no brackets)

CCMAIL: ervin@kde.org

 M  +4 -2      kfileplacesview.cpp  


--- trunk/KDE/kdelibs/kfile/kfileplacesview.cpp #762775:762776
@@ -377,22 +377,24 @@
         showAll->setChecked(d->showAll);
     }
 
-    menu.addSeparator();
-
     QAction* remove = 0L;
     QAction* teardown = 0L;
     if (index.isValid()) {
         if (!placesModel->isDevice(index)) {
+            menu.addSeparator();
             remove = menu.addAction( KIcon("edit-delete"), i18n("&Remove '%1'", \
label));  } else {
             teardown = placesModel->teardownActionForIndex(index);
             if (teardown!=0) {
                 teardown->setParent(&menu);
+                menu.addSeparator();
                 menu.addAction(teardown);
             }
         }
     }
 
+    if (menu.isEmpty()) return;
+
     QAction *result = menu.exec(event->globalPos());
 
     if (edit != 0 && result == edit) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic