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

List:       kde-commits
Subject:    kdebase/libkonq
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2003-09-09 19:13:25
[Download RAW message or body]

CVS commit by aseigo: 

only show the action submenu if there is more than one action. 
for lypie - with love and squalor


  M +15 -6     konq_popupmenu.cc   1.171


--- kdebase/libkonq/konq_popupmenu.cc  #1.170:1.171
@@ -678,5 +678,9 @@ void KonqPopupMenu::setup(bool showPrope
     if ( !user.isEmpty() || !userSubmenus.empty() || !builtin.isEmpty() )
     {
-        QDomElement actionMenu = m_doc.createElement( "menu" );
+        QDomElement actionMenu;
+
+        if (user.count() + userSubmenus.count() + builtin.count() > 1)
+        {
+            actionMenu = m_doc.createElement( "menu" );
         actionMenu.setAttribute( "name", "actions submenu" );
         m_menuElement.appendChild( actionMenu );
@@ -684,4 +688,9 @@ void KonqPopupMenu::setup(bool showPrope
         actionMenu.appendChild( text );
         text.appendChild( m_doc.createTextNode( i18n("Ac&tions") ) );
+        }
+        else
+        {
+            actionMenu = m_menuElement;
+        }
 
         QMap<QString, ServiceList>::Iterator it;


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

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