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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/kickoff
From:       Alexander Wiedenbruch <wirr01 () gmail ! com>
Date:       2007-10-22 23:09:02
Message-ID: 1193094542.977125.18213.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 728317 by wirr:

Fix adding favorites by maping the cursor position to the content area
and show the context menu at the correct position



 M  +2 -1      core/favoritesmodel.cpp  
 M  +1 -1      ui/contextmenufactory.cpp  
 M  +1 -1      ui/launcher.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/favoritesmodel.cpp \
#728316:728317 @@ -34,7 +34,8 @@
     void removeFavoriteItem(const QString& url)
     {
        QModelIndexList matches = q->match(q->index(0,0),UrlRole,
-                                          url);
+                                          url,-1,
+                                          Qt::MatchFlags(Qt::MatchStartsWith | \
Qt::MatchWrap | Qt::MatchRecursive));  
        qDebug() << "Removing item matches" << matches;
 
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/contextmenufactory.cpp \
#728316:728317 @@ -144,7 +144,7 @@
     actions << viewActions(view); 
 
     // display menu
-    QAction *result = QMenu::exec(actions,view->mapToGlobal(pos));
+    QAction *result = QMenu::exec(actions,QCursor::pos());
     
     if (result == favoriteAction) {
         if (isFavorite) {
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/launcher.cpp #728316:728317
@@ -349,7 +349,7 @@
 {
     QAbstractItemView *view = qobject_cast<QAbstractItemView*>(sender());
     if (view) {
-        d->contextMenuFactory->showContextMenu(view,pos);
+        d->contextMenuFactory->showContextMenu(view,d->contentArea->mapFromParent(pos));
  }
 }
 void Launcher::keyPressEvent(QKeyEvent *)


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

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