You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi again,
here is a very small patch fixing strange behaviour of left-mouse click on
the systray icon. It should hide/show the window if it's shown/hidden as
it's usual for this kind of application. Anyway - feel free to commit or
reject it if you wish ;)
It just flashes (reactivates) the main window with the old code.
And one more thing - dunno why you require to call the setVisible() for all
child wodgets. It should be done automatically. But I'm not familiar with
Cuberok guts yet ;)
P.S.: can you fill SVN messages/comments for next commits, please? It's
helpful for occassional SVN users like me...
Patch:
void Cuberok::showhide(bool s)
{
bool act = !isVisible();
setVisible(act);
if (act)
activateWindow();
/*
bool vis = isVisible();
if(vis && s) activateWindow();
else if(vis != s) {
vis = s;
setVisible(vis);
foreach (QWidget *widget, QApplication::allWidgets()) {
QDialog *d = qobject_cast<QDialog*>(widget);
if(d) d->setVisible(vis);
}
}*/
}
Original issue reported on code.google.com by yarpe...@gmail.com on 9 Apr 2009 at 8:01
The text was updated successfully, but these errors were encountered:
Если вы не против, я предложу ещё такой
пустяк. Клик средней кнопкой мыши поствит
трек на паузу или снимет с паузы. Второе
изменение исправляет поведение на линуксе,
где окно из трея не разворачивалось, а
появлялось свёрнутым в панели задач.
Index: src/cuberok.cpp
===================================================================
--- src/cuberok.cpp (revision 200)
+++ src/cuberok.cpp (working copy)
@@ -227,6 +227,8 @@
{
if(r == QSystemTrayIcon::Trigger) {
showhide(true);
+ } else if ( r == QSystemTrayIcon::MiddleClick ) {
+ ui.actionPause->trigger();
}
}
@@ -234,9 +236,10 @@
{
bool act = !isVisible();
setVisible(act);
- if (act)
- activateWindow();
-
+ if (act) {
+ activateWindow(); // for windows
+ showNormal(); // for linux
+ }
/*bool vis = isVisible();
if(vis && s) activateWindow();
else if(vis != s) {
Original comment by nomen.in...@gmail.com on 22 May 2009 at 8:35
Original issue reported on code.google.com by
yarpe...@gmail.com
on 9 Apr 2009 at 8:01The text was updated successfully, but these errors were encountered: