[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: [PATCH] BUG 199107 make the popup dialog of group
From: "潘 <wppan () redflag-linux ! com>
Date: 2009-07-10 13:37:01
Message-ID: 4A5743FD.6060405 () redflag-linux ! com
[Download RAW message or body]
Aaron J. Seigo 写道:
> On Tuesday 07 July 2009, 潘卫平 wrote:
>> Reproduce steps:
>> 1、set "By Program Name" grouping strategy, uncheck "Only when the
>> taskbar is full".
>> 2、run one konsole application.
>> 3、run two dolphin applications, they will group together on the taskbar.
>> 4、click the dolphin group, a popup dialog will show.
>> 5、move the mouse over konsole on the taskbar, a tooltip will show, but
>> the popup dialog of dolphin doesn't hide automatically. It is still
>> there! see
>> https://bugs.kde.org/show_bug.cgi?id=199107#c2
>
> i don't think the solution is to automatically hide the popup, however. that
> will just be rather annoying if you move the mouse out of the popup
> accidentally or just to get it out of the way so you can read it better.
>
I still think that hiding the popup automatically is more convenient
than rejecting showing tooltip and context menu.
> what could happen is to reject showing tooltips when there is a popup. that
> seems more sensible to me, as then what the user specifically chose to show
> remains and the conflicting mouse-overs are suppressed.
>
> in AbstractTaskItem::toolTipAboutToShow() there could be a check added to see
> if there are any group popups and if so to just set an empty ToolTipContent
> object.
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
Since AbstractTaskItem has a m_applet pointer, I add a function to hide
the popup dialog in class Tasks. Every time a WindowTaskItem or a
TaskGroupItem wants to show a tooltip or a context menu, it first calls
that function to hide the popup dialog which is showing.
regards
--
潘卫平(Peter Pan)
Red Flag Software Co., Ltd
["kdebase-plasma-tasks-grouphide.patch" (text/x-patch)]
Index: taskgroupitem.cpp
===================================================================
--- taskgroupitem.cpp (revision 994260)
+++ taskgroupitem.cpp (working copy)
@@ -259,6 +259,8 @@
void TaskGroupItem::updateToolTip()
{
+ m_applet->hidePopupDialog(m_applet->rootGroupItem(), this);
+
if (!m_group) {
return;
}
@@ -370,6 +372,8 @@
void TaskGroupItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *e)
{
+ m_applet->hidePopupDialog(m_applet->rootGroupItem(), this);
+
//kDebug();
if (!KAuthorized::authorizeKAction("kwin_rmb") || !m_group) {
QGraphicsWidget::contextMenuEvent(e);
Index: windowtaskitem.cpp
===================================================================
--- windowtaskitem.cpp (revision 994260)
+++ windowtaskitem.cpp (working copy)
@@ -183,6 +183,8 @@
void WindowTaskItem::updateToolTip()
{
+ m_applet->hidePopupDialog(m_applet->rootGroupItem(), this);
+
if (!m_task) {
return;
}
@@ -273,6 +275,8 @@
void WindowTaskItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *e)
{
+ m_applet->hidePopupDialog(m_applet->rootGroupItem(), this);
+
if (!KAuthorized::authorizeKAction("kwin_rmb") || !m_task) {
QGraphicsWidget::contextMenuEvent(e);
return;
Index: tasks.cpp
===================================================================
--- tasks.cpp (revision 994260)
+++ tasks.cpp (working copy)
@@ -391,7 +391,26 @@
return m_rootGroupItem;
}
+void Tasks::hidePopupDialog(TaskGroupItem *group, AbstractTaskItem *abstractTaskItem)
+{
+ foreach (AbstractTaskItem *item, group->members().values()) {
+ TaskGroupItem *groupItem = qobject_cast<TaskGroupItem *>(item);
+ if (groupItem) {
+ if (groupItem->popupDialog()->isVisible()) {
+ if (!groupItem->members().values().contains(abstractTaskItem)) {
+ groupItem->popupDialog()->hide();
+ }
+
+ return;
+ } else {
+ hidePopupDialog(groupItem, abstractTaskItem);
+ }
+ }
+ }
+ return;
+}
+
K_EXPORT_PLASMA_APPLET(tasks, Tasks)
#include "tasks.moc"
Index: tasks.h
===================================================================
--- tasks.h (revision 994260)
+++ tasks.h (working copy)
@@ -106,6 +106,7 @@
void needsVisualFocus();
+ void hidePopupDialog(TaskGroupItem *group, AbstractTaskItem *abstractTaskItem);
signals:
/**
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic