[yast-commit] r63879 - in /trunk/qt-pkg: VERSION.cmake package/yast2-qt-pkg.changes src/YQPkgObjList.cc src/YQPkgObjList.h
Author: tgoettlicher
Date: Wed Apr 27 16:42:14 2011
New Revision: 63879
URL: http://svn.opensuse.org/viewcvs/yast?rev=63879&view=rev
Log:
Enabled menu key to show context menu (bnc #681702)
Modified:
trunk/qt-pkg/VERSION.cmake
trunk/qt-pkg/package/yast2-qt-pkg.changes
trunk/qt-pkg/src/YQPkgObjList.cc
trunk/qt-pkg/src/YQPkgObjList.h
Modified: trunk/qt-pkg/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/VERSION.cmake?rev=63879&r1=63878&r2=63879&view=diff
==============================================================================
--- trunk/qt-pkg/VERSION.cmake (original)
+++ trunk/qt-pkg/VERSION.cmake Wed Apr 27 16:42:14 2011
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
-SET(VERSION_MINOR "20")
-SET(VERSION_PATCH "3")
+SET(VERSION_MINOR "21")
+SET(VERSION_PATCH "1")
Modified: trunk/qt-pkg/package/yast2-qt-pkg.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/package/yast2-qt-pkg.changes?rev=63879&r1=63878&r2=63879&view=diff
==============================================================================
--- trunk/qt-pkg/package/yast2-qt-pkg.changes (original)
+++ trunk/qt-pkg/package/yast2-qt-pkg.changes Wed Apr 27 16:42:14 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Apr 27 16:27:50 CEST 2011 - tgoettlicher@suse.de
+
+- Enabled menu key to show context menu (bnc #681702)
+- 2.21.1
+
+-------------------------------------------------------------------
Thu Feb 3 15:13:54 CET 2011 - tgoettlicher@suse.de
- Fixed dependencies
Modified: trunk/qt-pkg/src/YQPkgObjList.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgObjList.cc?rev=63879&r1=63878&r2=63879&view=diff
==============================================================================
--- trunk/qt-pkg/src/YQPkgObjList.cc (original)
+++ trunk/qt-pkg/src/YQPkgObjList.cc Wed Apr 27 16:42:14 2011
@@ -117,10 +117,18 @@
connect( this, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
this, SLOT ( currentItemChangedInternal( QTreeWidgetItem * ) ) );
+ connect( this, SIGNAL(customContextMenuRequested(const QPoint &)),
+ this, SLOT (slotCustomContextMenu(const QPoint&)));
+
setIconSize( QSize( 22, 16 ) );
+
+ setContextMenuPolicy(Qt::CustomContextMenu);
+
}
+
+
YQPkgObjList::~YQPkgObjList()
{
if ( _excludedItems )
@@ -182,23 +190,7 @@
item->cycleStatus();
}
}
- else if ( button == Qt::RightButton )
- {
- if ( editable() && item->editable() )
- {
- updateActions( item );
-
- if ( ! item->selectable() )
- return;
-
- QMenu * contextMenu =
- ! item->selectable()->installedEmpty() ?
- installedContextMenu() : notInstalledContextMenu();
-
- if ( contextMenu )
- contextMenu->popup( pos );
- }
- }
+ // context menus are handled in slotCustomContextMenu()
}
}
@@ -1680,6 +1672,26 @@
return ( _excludeMap.find( item ) != _excludeMap.end() );
}
+void YQPkgObjList::slotCustomContextMenu(const QPoint& pos)
+{
+ YQPkgObjListItem * item = dynamic_cast
participants (1)
-
tgoettlicher@svn2.opensuse.org