Hello community,

here is the log from the commit of package mate-session-manager for 
openSUSE:Factory checked in at 2016-10-23 12:52:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mate-session-manager (Old)
 and      /work/SRC/openSUSE:Factory/.mate-session-manager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mate-session-manager"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/mate-session-manager/mate-session-manager.changes    
    2016-09-25 14:43:44.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.mate-session-manager.new/mate-session-manager.changes
   2016-10-23 12:52:26.000000000 +0200
@@ -1,0 +2,9 @@
+Fri Oct 21 12:01:23 UTC 2016 - sor.ale...@meowr.ru
+
+- Add mate-session-manager-qt-5.7-styleoverride.patch: On Qt 5.7+
+  use Gtk2 Platform Theme (party based on cinnamon-session changes
+  made by Dustin Falgout).
+- Require libqt5-qtstyleplugins-platformtheme-gtk2 to make sure the
+  user actually gets native styling on Qt5.
+
+-------------------------------------------------------------------

New:
----
  mate-session-manager-qt-5.7-styleoverride.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mate-session-manager.spec ++++++
--- /var/tmp/diff_new_pack.0JnWiA/_old  2016-10-23 12:52:27.000000000 +0200
+++ /var/tmp/diff_new_pack.0JnWiA/_new  2016-10-23 12:52:27.000000000 +0200
@@ -29,6 +29,8 @@
 Source1:        mate-session-manager-upstream-mate_defaults.conf
 # Some documentation for people writing branding packages, shipped in the 
branding-upstream package.
 Source2:        README.Gsettings-overrides
+# PATCH-FIX-OPENSUSE mate-session-manager-qt-5.7-styleoverride.patch 
sor.ale...@meowr.ru -- On Qt 5.7+ use Gtk2 Platform Theme.
+Patch0:         mate-session-manager-qt-5.7-styleoverride.patch
 BuildRequires:  hicolor-icon-theme
 BuildRequires:  mate-common >= %{_version}
 BuildRequires:  pkgconfig
@@ -38,6 +40,7 @@
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gtk+-3.0) >= 3.14
 BuildRequires:  pkgconfig(ice)
+BuildRequires:  pkgconfig(libsystemd)
 BuildRequires:  pkgconfig(sm)
 BuildRequires:  pkgconfig(xau)
 BuildRequires:  pkgconfig(xext)
@@ -45,10 +48,9 @@
 Requires:       %{name}-gschemas >= %{version}
 Recommends:     %{name}-lang
 %glib2_gsettings_schema_requires
-%if 0%{?suse_version} > 1310
-BuildRequires:  pkgconfig(libsystemd)
-%else
-BuildRequires:  pkgconfig(libsystemd-login)
+%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120300 && 
0%{?is_opensuse})
+# Make native styling in Qt5 happen.
+Requires:       libqt5-qtstyleplugins-platformtheme-gtk2
 %endif
 
 %description
@@ -89,6 +91,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 cp -a %{SOURCE2} .
 cp -a %{SOURCE1} mate_defaults.conf
 
@@ -98,6 +101,11 @@
   --disable-static        \
   --enable-ipv6           \
   --with-default-wm=marco \
+%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120300 && 
0%{?is_opensuse})
+  --enable-qt57-theme-support  \
+%else
+  --disable-qt57-theme-support \
+%endif
   --with-systemd=yes
 make %{?_smp_mflags}
 

++++++ mate-session-manager-qt-5.7-styleoverride.patch ++++++
--- a/configure.ac
+++ b/configure.ac
@@ -143,6 +143,19 @@ AM_CONDITIONAL(HAVE_UPOWER, test "x$has_
 AC_SUBST(HAVE_UPOWER)
 
 dnl ====================================================================
+dnl Check for Qt 5.7+ to set correct env var for theme/styling
+dnl ====================================================================
+AC_DEFINE([HAVE_QT57], [0], [Have Qt 5.7+])
+AC_ARG_ENABLE(qt57_theme_support,
+              AS_HELP_STRING([--enable-qt57-theme-support], [Support GTK+ 
styles for Qt apps with Qt 5.7+]),
+              [enable_qt57_theme_support=yes],
+              [enable_qt57_theme_support=no])
+
+if test x$enable_qt57_theme_support = xyes; then
+    AC_DEFINE([HAVE_QT57], [1])
+fi
+
+dnl ====================================================================
 dnl Check for XSync extension
 dnl ====================================================================
 
--- a/mate-session/main.c
+++ b/mate-session/main.c
@@ -646,6 +646,15 @@ int main(int argc, char** argv)
         */
        gsm_util_setenv("MATE_DESKTOP_SESSION_ID", "this-is-deprecated");
 
+        /* Make Qt5 apps follow the GTK+ style */
+       if (!HAVE_QT57 && g_getenv("QT_STYLE_OVERRIDE") == NULL)
+               gsm_util_setenv("QT_STYLE_OVERRIDE", "gtk");
+       else if (HAVE_QT57 && g_getenv("QT_STYLE_OVERRIDE") != NULL)
+               g_unsetenv("QT_STYLE_OVERRIDE");
+
+       if (HAVE_QT57 && g_getenv("QT_QPA_PLATFORMTHEME") == NULL)
+               gsm_util_setenv("QT_QPA_PLATFORMTHEME", "gtk2");
+
        /*
         * Make sure gsettings is set up correctly.  If not, then bail.
         */

Reply via email to