[kvirc/f12/master] fix tray

nucleo nucleo at fedoraproject.org
Mon Aug 2 10:11:35 UTC 2010


commit ef220091993d42226ff0f21dcfd8fe5f74d38c4f
Author: nucleo <nucleo at fedoraproject.org>
Date:   Mon Aug 2 13:10:18 2010 +0300

    fix tray

 kvirc-fix-tray.patch |   31 +++++++++++++++++++++++++++++++
 kvirc.spec           |   10 ++++++++--
 2 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/kvirc-fix-tray.patch b/kvirc-fix-tray.patch
new file mode 100644
index 0000000..68eb59d
--- /dev/null
+++ b/kvirc-fix-tray.patch
@@ -0,0 +1,31 @@
+Index: src/modules/trayicon/libkvitrayicon.cpp
+===================================================================
+--- src/modules/trayicon/libkvitrayicon.cpp	(revision 4751)
++++ src/modules/trayicon/libkvitrayicon.cpp	(revision 4752)
+@@ -413,9 +413,24 @@
+ 
+ void KviTrayIcon::activatedSlot( QSystemTrayIcon::ActivationReason reason )
+ {
+-	if(reason==QSystemTrayIcon::Trigger && (KVI_OPTION_BOOL(KviOption_boolCloseInTray) || !m_pFrm->isVisible()))
++	switch(reason)
+ 	{
+-		toggleParentFrame();
++		case QSystemTrayIcon::Trigger:
++			// This is single click
++#ifdef COMPILE_ON_MAC
++			// On MacOSX one can only single-left-click the icon.
++			// This activates the context menu and is quite confusing if it *also* hides the kvirc window.
++			// So on mac we only _show_ the main window if it's hidden and the CloseInTray option is enabled.
++			if(KVI_OPTION_BOOL(KviOption_boolCloseInTray) && ((!m_pFrm->isVisible()) || m_pFrm->isMinimized()))
++				toggleParentFrame();
++#else //!COMPILE_ON_MAC
++			// on other platforms we always toggle the window
++			toggleParentFrame();
++#endif //!COMPILE_ON_MAC
++		break;
++		default:
++			// we do nothing at this time
++		break;
+ 	}
+ }
+ 
diff --git a/kvirc.spec b/kvirc.spec
index ffc8132..83e49c5 100644
--- a/kvirc.spec
+++ b/kvirc.spec
@@ -1,11 +1,13 @@
 Name:             kvirc
 Version:          4.0.2
-Release:          1%{?dist}
+Release:          2%{?dist}
 Summary:          Free portable IRC client
 Group:            Applications/Internet
 License:          GPLv2+ with exceptions
 URL:              http://kvirc.net/
-Source0:          ftp://ftp.kvirc.de/pub/kvirc/4.0.0/source/%{name}-%{version}.tar.bz2
+Source0:          ftp://ftp.kvirc.de/pub/kvirc/%{version}/source/%{name}-%{version}.tar.bz2
+# https://svn.kvirc.de/kvirc/changeset/4752
+Patch0:           kvirc-fix-tray.patch
 BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:    kdelibs4-devel audiofile-devel esound-devel glib2-devel
 BuildRequires:    python-devel perl-ExtUtils-Embed dbus-devel
@@ -24,6 +26,7 @@ many IRC addicted developers around the world.
 
 %prep
 %setup -q
+%patch0
 
 %build
 %{cmake}  \
@@ -130,6 +133,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %exclude %{_datadir}/%{name}/4.0/doc/README
 
 %changelog
+* Mon Aug  2 2010 Alexey Kurov <nucleo at fedoraproject.org> - 4.0.2-2
+- fix tray issue kvirc#872
+
 * Mon Aug  2 2010 Alexey Kurov <nucleo at fedoraproject.org> - 4.0.2-1
 - KVIrc 4.0.2
 


More information about the scm-commits mailing list