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

List:       kde-commits
Subject:    branches/kdevelop/3.4/languages/cpp
From:       David Nolden <david.nolden.kde () art-master ! de>
Date:       2006-05-31 23:46:02
Message-ID: 1149119162.262343.11593.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 547152 by zwabel:

menu entries back :)



 M  +15 -3     cppcodecompletion.cpp  


--- branches/kdevelop/3.4/languages/cpp/cppcodecompletion.cpp #547151:547152
@@ -84,6 +84,7 @@
 
 const bool disableVerboseForCompletionList = true;
 const bool disableVerboseForContextMenu = true;
+const bool contextMenuEntriesAtTop = false;
 
 ///This enables-disables the automatic processing of the expression under the mouse-cursor 
 //#define DISABLETOOLTIPS
@@ -1145,7 +1146,12 @@
 		PopupFiller<PopupFillerHelpStruct> filler( h, "" );
 		
 		QPopupMenu * m = new QPopupMenu( popup );
-		int gid = popup->insertItem( i18n( "Navigate by \"%1\"" ).arg( cleanForMenu( name ) ), m, 5, cpos++ );
+		int gid;
+		if( contextMenuEntriesAtTop )
+			gid = popup->insertItem( i18n( "Navigate by \"%1\"" ).arg( cleanForMenu( name ) ), m, 5, cpos++ );
+		else
+			gid = popup->insertItem( i18n( "Navigate by \"%1\"" ).arg( cleanForMenu( name ) ), m );
+		
 		popup->setWhatsThis( gid, i18n( "<b>Navigation</b><p>Provides a menu to navigate to positions of items \
that are involved in this expression" ) );  
 		if( type.sourceVariable && type.sourceVariable.name != "this" ) {
@@ -1160,7 +1166,12 @@
 		///Now fill the class-view-browsing-stuff
 		{
 			QPopupMenu * m = new QPopupMenu( popup );
-			int gid = popup->insertItem( i18n( "Navigate Class-View by \"%1\"" ).arg( cleanForMenu( name ) ), m, \
6, cpos++ ); +			int gid;
+			if( contextMenuEntriesAtTop )
+				gid = popup->insertItem( i18n( "Navigate Class-View by \"%1\"" ).arg( cleanForMenu( name ) ), m, 6, \
cpos++ ); +			else
+				gid = popup->insertItem( i18n( "Navigate Class-View by \"%1\"" ).arg( cleanForMenu( name ) ), m );
+
 			popup->setWhatsThis( gid, i18n( "<b>Navigation</b><p>Provides a menu to show involved items in the \
class-view " ) );  
 			PopupClassViewFillerHelpStruct h(this);
@@ -1170,7 +1181,8 @@
 		}
 	}
 
-	popup->insertSeparator( cpos );
+	if( contextMenuEntriesAtTop )
+		popup->insertSeparator( cpos );
 }
 
 void CppCodeCompletion::slotTextHint(int line, int column, QString &text) {


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

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