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

List:       kde-commits
Subject:    kdevelop/parts/classview
From:       Roberto Raggi <roberto () kdevelop ! org>
Date:       2003-11-12 14:00:38
[Download RAW message or body]

CVS commit by raggi: 

bugfix: don't add "add method/attribute" entries in the popup menu if
the language plugin doens't support the AddMethod/AddAttribute feature


  M +3 -2      classviewpart.h   1.19
  M +9 -3      classviewwidget.cpp   1.46


--- kdevelop/parts/classview/classviewpart.h  #1.18:1.19
@@ -55,4 +55,6 @@ public:
     virtual ~ClassViewPart();
 
+    bool langHasFeature(KDevLanguageSupport::Features feature);
+
 private slots:
     void selectNamespace(QListViewItem*);
@@ -87,5 +89,4 @@ private slots:
 private:
     void setupActions();
-    bool langHasFeature(KDevLanguageSupport::Features feature);
 
     NamespaceDom syncNamespaces(const FileDom &dom);

--- kdevelop/parts/classview/classviewwidget.cpp  #1.45:1.46
@@ -260,7 +260,13 @@ void ClassViewWidget::contentsContextMen
     bool sep = false;
     if( item && item->isClass() ){
+        if( m_part->langHasFeature(KDevLanguageSupport::AddMethod) ) {
         m_actionAddMethod->plug( &menu );
+            sep = true;
+        }
+        
+        if( m_part->langHasFeature(KDevLanguageSupport::AddAttribute) ) {
         m_actionAddAttribute->plug( &menu );
         sep = true;
+        }       
     }
 


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

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