[kvirc] fix the color issues with recent gtk packages kvirc#1010

nucleo nucleo at fedoraproject.org
Thu Dec 16 13:50:16 UTC 2010


commit 2597eac599a6aafe1ae5fb0cf24e3682d6608ea4
Author: nucleo <nucleo at fedoraproject.org>
Date:   Thu Dec 16 15:50:09 2010 +0200

    fix the color issues with recent gtk packages kvirc#1010

 kvirc-gtk-style-workaround.patch |   61 ++++++++++++++++++++++++++++++++++++++
 kvirc.spec                       |   10 +++++-
 2 files changed, 70 insertions(+), 1 deletions(-)
---
diff --git a/kvirc-gtk-style-workaround.patch b/kvirc-gtk-style-workaround.patch
new file mode 100644
index 0000000..7bfdc26
--- /dev/null
+++ b/kvirc-gtk-style-workaround.patch
@@ -0,0 +1,61 @@
+Index: src/kvirc/kernel/kvi_app.cpp
+===================================================================
+--- src/kvirc/kernel/kvi_app.cpp	(revision 5127)
++++ src/kvirc/kernel/kvi_app.cpp	(revision 5128)
+@@ -199,6 +199,8 @@
+ 	kvi_socket_flushTrafficCounters();
+ #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
+ 	m_bPortable = KviFileUtils::fileExists(g_pApp->applicationDirPath()+KVI_PATH_SEPARATOR_CHAR+"portable");
++	//workaround for #957
++	QApplication::setEffectEnabled(Qt::UI_FadeMenu, FALSE);
+ #endif
+ }
+ 
+Index: src/kvirc/kernel/kvi_app.cpp
+===================================================================
+--- src/kvirc/kernel/kvi_app.cpp	(revision 5189)
++++ src/kvirc/kernel/kvi_app.cpp	(revision 5190)
+@@ -209,6 +209,13 @@
+ 	m_bPortable = KviFileUtils::fileExists(g_pApp->applicationDirPath()+KVI_PATH_SEPARATOR_CHAR+"portable");
+ 	//workaround for #957
+ 	QApplication::setEffectEnabled(Qt::UI_FadeMenu, FALSE);
++
++	// workaround for gtk+ style forcing a crappy white background (ticket #777, #964, #1009, ..) 
++	if(QString("QGtkStyle").compare(qApp->style()->metaObject()->className())==0) 
++	{
++		setStyle(new QCleanlooksStyle());
++		setPalette(style()->standardPalette());
++	}
+ #endif
+ }
+ 
+Index: src/kvirc/kernel/kvi_app.cpp
+===================================================================
+--- src/kvirc/kernel/kvi_app.cpp	(revision 5196)
++++ src/kvirc/kernel/kvi_app.cpp	(revision 5197)
+@@ -95,7 +95,7 @@
+ #include <QTextCodec>
+ #include <QMetaObject>
+ #include <QTextDocument>
+-
++#include <QCleanlooksStyle>
+ /*
+ HACK These 2 hacks are defined because X11 defines Unsorted and None
+ which conflicts with QDir and KviApp::KvircSubdir
+@@ -209,14 +209,13 @@
+ 	m_bPortable = KviFileUtils::fileExists(g_pApp->applicationDirPath()+KVI_PATH_SEPARATOR_CHAR+"portable");
+ 	//workaround for #957
+ 	QApplication::setEffectEnabled(Qt::UI_FadeMenu, FALSE);
+-
+-	// workaround for gtk+ style forcing a crappy white background (ticket #777, #964, #1009, ..) 
++#endif
++	// workaround for gtk+ style forcing a crappy white background (ticket #777, #964, #1010, ..) 
+ 	if(QString("QGtkStyle").compare(qApp->style()->metaObject()->className())==0) 
+ 	{
+ 		setStyle(new QCleanlooksStyle());
+ 		setPalette(style()->standardPalette());
+ 	}
+-#endif
+ }
+ 
+ void KviApp::setup()
diff --git a/kvirc.spec b/kvirc.spec
index 0fb944a..8ad5363 100644
--- a/kvirc.spec
+++ b/kvirc.spec
@@ -1,6 +1,6 @@
 Name:             kvirc
 Version:          4.0.2
-Release:          4%{?dist}
+Release:          5%{?dist}
 Summary:          Free portable IRC client
 Group:            Applications/Internet
 License:          GPLv2+ with exceptions
@@ -10,6 +10,10 @@ Source0:          ftp://ftp.kvirc.de/pub/kvirc/%{version}/source/%{name}-%{versi
 Patch0:           kvirc-fix-tray.patch
 # https://svn.kvirc.de/kvirc/changeset/4795
 Patch1:           kvirc-fix-join-channels.patch
+# combine part of changeset https://svn.kvirc.de/kvirc/changeset/5128
+# and https://svn.kvirc.de/kvirc/changeset/5190
+# and https://svn.kvirc.de/kvirc/changeset/5197
+Patch2:           kvirc-gtk-style-workaround.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
@@ -31,6 +35,7 @@ many IRC addicted developers around the world.
 %setup -q
 %patch0
 %patch1
+%patch2
 
 %build
 %{cmake}  \
@@ -137,6 +142,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %exclude %{_datadir}/%{name}/4.0/doc/README
 
 %changelog
+* Thu Dec 16 2010 Alexey Kurov <nucleo at fedoraproject.org> - 4.0.2-5
+- fix the color issues with recent gtk packages kvirc#1010
+
 * Thu Nov 25 2010 Alexey Kurov <nucleo at fedoraproject.org> - 4.0.2-4
 - depends on kdelibs version used at build time
 


More information about the scm-commits mailing list