summaryrefslogtreecommitdiffstats
path: root/redhat/tdebase
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2013-07-24 11:25:02 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2013-07-24 11:25:02 +0200
commit0c4b32438a57f52601dfe66d133bd263a5d304ee (patch)
tree9389a6db04f282ab54a2cc4ca8f55124285a5fa4 /redhat/tdebase
parent700ec263535470631ef4f6fb816000500eb4227e (diff)
downloadtde-packaging-0c4b32438a57f52601dfe66d133bd263a5d304ee.tar.gz
tde-packaging-0c4b32438a57f52601dfe66d133bd263a5d304ee.zip
RPM Packaging: updates for R14
Diffstat (limited to 'redhat/tdebase')
-rw-r--r--redhat/tdebase/tdebase-14.0.0-kcm_xcursor_applytheme.patch136
-rw-r--r--redhat/tdebase/tdebase-14.0.0.spec4
-rw-r--r--redhat/tdebase/tdebase-3.5.13.2.spec5
3 files changed, 144 insertions, 1 deletions
diff --git a/redhat/tdebase/tdebase-14.0.0-kcm_xcursor_applytheme.patch b/redhat/tdebase/tdebase-14.0.0-kcm_xcursor_applytheme.patch
new file mode 100644
index 000000000..b5adadbc9
--- /dev/null
+++ b/redhat/tdebase/tdebase-14.0.0-kcm_xcursor_applytheme.patch
@@ -0,0 +1,136 @@
+--- tdebase/kcontrol/input/xcursor/themepage.cpp.ORI 2013-07-22 19:33:45.153674930 +0200
++++ tdebase/kcontrol/input/xcursor/themepage.cpp 2013-07-23 15:24:01.664497762 +0200
+@@ -33,6 +33,8 @@
+ #include <tdeio/netaccess.h>
+ #include <ktar.h>
+
++#include "../../krdb/krdb.h"
++
+ #include <tqlayout.h>
+ #include <tqdir.h>
+ #include <tqpixmap.h>
+@@ -42,6 +44,7 @@
+ #include <tqpainter.h>
+ #include <tqfileinfo.h>
+ #include <tqpushbutton.h>
++#include <dcopref.h>
+
+ #include <cstdlib> // for getenv()
+
+@@ -53,6 +56,10 @@
+ #include <X11/Xlib.h>
+ #include <X11/Xcursor/Xcursor.h>
+
++#ifdef HAVE_XFIXES
++# include <X11/extensions/Xfixes.h>
++#endif
++
+ // Check for older version
+ #if !defined(XCURSOR_LIB_MAJOR) && defined(XCURSOR_MAJOR)
+ # define XCURSOR_LIB_MAJOR XCURSOR_MAJOR
+@@ -133,6 +140,65 @@
+ {
+ }
+
++bool ThemePage::applyTheme(TQString theme, TQString size)
++{
++#ifdef HAVE_XCURSOR
++ if (theme.isEmpty()) {
++ return false;
++ }
++
++ // Apply the TDE cursor theme to ourselves
++ XcursorSetTheme(tqt_xdisplay(), theme.latin1());
++
++ // Tell tdelauncher to set the XCURSOR_THEME and XCURSOR_SIZE environment
++ // variables when launching applications.
++ DCOPRef tdelauncher("tdelauncher");
++ tdelauncher.send("setLaunchEnv", TQCString("XCURSOR_THEME"), TQFile::encodeName(theme));
++ if( !size.isEmpty()) {
++ tdelauncher.send("setLaunchEnv", TQCString("XCURSOR_SIZE"), size);
++ }
++
++ // Update the Xcursor X resources
++ runRdb(0);
++
++ // Apply the TDE cursor size to ourselves
++ if (!size.isEmpty()) {
++ XcursorSetDefaultSize(tqt_xdisplay(), size.toUInt());
++ }
++
++ // Reload the standard cursors
++ TQStringList names;
++
++ // Qt cursors
++ names << "left_ptr" << "up_arrow" << "cross" << "wait"
++ << "left_ptr_watch" << "ibeam" << "size_ver" << "size_hor"
++ << "size_bdiag" << "size_fdiag" << "size_all" << "split_v"
++ << "split_h" << "pointing_hand" << "openhand"
++ << "closedhand" << "forbidden" << "whats_this" << "copy" << "move" << "link";
++
++ // X core cursors
++ names << "X_cursor" << "right_ptr" << "hand1"
++ << "hand2" << "watch" << "xterm"
++ << "crosshair" << "left_ptr_watch" << "center_ptr"
++ << "sb_h_double_arrow" << "sb_v_double_arrow" << "fleur"
++ << "top_left_corner" << "top_side" << "top_right_corner"
++ << "right_side" << "bottom_right_corner" << "bottom_side"
++ << "bottom_left_corner" << "left_side" << "question_arrow"
++ << "pirate";
++
++ for (int i = 0; i < names.size(); ++i)
++ {
++ const char* name = (*(names.at(i))).ascii();
++ Cursor handle = XcursorLibraryLoadCursor(tqt_xdisplay(), name);
++ XFixesChangeCursorByName(tqt_xdisplay(), handle, TQFile::encodeName(name));
++ XFreeCursor(tqt_xdisplay(), handle); // Don't leak the cursor
++ }
++
++ return true;
++#else // HAVE_XCURSOR
++ return false;
++#endif
++}
+
+ void ThemePage::save()
+ {
+@@ -145,10 +209,17 @@
+ c.setGroup( "Mouse" );
+ c.writeEntry( "cursorTheme", selectedTheme != "system" ? selectedTheme : TQString::null );
+
+- KMessageBox::information( this, i18n("You have to restart TDE for these "
++ // The Kcontrol panel does not allow to set cursor size for now.
++ // So we keep the same size as written in config file.
++ TQCString size = c.readEntry("cursorSize", TQString()).local8Bit();
++
++ if (!applyTheme(selectedTheme, size))
++ {
++ KMessageBox::information( this, i18n("You have to restart TDE for these "
+ "changes to take effect."), i18n("Cursor Settings Changed"),
+ "CursorSettingsChanged" );
+-
++ }
++
+ currentTheme = selectedTheme;
+ }
+
+--- tdebase/kcontrol/input/xcursor/themepage.h.ORI 2013-07-22 19:49:33.467191658 +0200
++++ tdebase/kcontrol/input/xcursor/themepage.h 2013-07-22 19:56:03.990484896 +0200
+@@ -45,6 +45,7 @@
+ void load();
+ void load( bool useDefaults );
+ void defaults();
++ bool applyTheme(TQString theme, TQString size);
+
+ signals:
+ void changed( bool );
+--- tdebase/kcontrol/input/xcursor/CMakeLists.txt.ORI 2013-07-23 15:24:41.178064068 +0200
++++ tdebase/kcontrol/input/xcursor/CMakeLists.txt 2013-07-23 15:27:31.694851294 +0200
+@@ -21,5 +21,6 @@
+
+ tde_add_library( themepage STATIC_PIC AUTOMOC
+ SOURCES
+- themepage.cpp previewwidget.cpp
++ themepage.cpp previewwidget.cpp ../../krdb/krdb.cpp
++ LINK Xfixes
+ )
diff --git a/redhat/tdebase/tdebase-14.0.0.spec b/redhat/tdebase/tdebase-14.0.0.spec
index 59dc174f8..0b2886e85 100644
--- a/redhat/tdebase/tdebase-14.0.0.spec
+++ b/redhat/tdebase/tdebase-14.0.0.spec
@@ -83,6 +83,8 @@ Patch4: tdebase-14.0.0-kickoff_default_favs.patch
## [kdebase] Changes konsole default word separator
Patch5: tdebase-14.0.0-konsole_wordseps.patch
+Patch10: tdebase-14.0.0-kcm_xcursor_applytheme.patch
+
# Patches from Mandriva
Patch101: tdebase-14.0.0-vibrate_dialog.patch
Patch102: tdebase-14.0.0-kcontrol_menu_entry.patch
@@ -3207,6 +3209,8 @@ Windows and Samba shares.
%patch3 -p1 -b .displayconfigtranslation
%patch4 -p1 -b .kickoffdefaultsfav
%patch5 -p1 -b .konsolewordseps
+%patch10 -p1 -b .kcmxcursor
+
%patch101 -p1 -b .vibrate_dialog
%patch102 -p1 -b .kcontrol_menu_entry
diff --git a/redhat/tdebase/tdebase-3.5.13.2.spec b/redhat/tdebase/tdebase-3.5.13.2.spec
index 48e7b887a..3cd8e267a 100644
--- a/redhat/tdebase/tdebase-3.5.13.2.spec
+++ b/redhat/tdebase/tdebase-3.5.13.2.spec
@@ -24,7 +24,7 @@
Name: trinity-tdebase
Version: 3.5.13.2
-Release: %{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant}
+Release: %{?!preversion:2}%{?preversion:1_%{preversion}}%{?dist}%{?_variant}
License: GPL
Summary: Trinity Base Programs
Group: User Interface/Desktops
@@ -97,6 +97,8 @@ Patch8: tdebase-3.5.13.2-kickoff_default_favs.patch
## [kdebase/kcontrol] Adds FR translation for KCM ICC
Patch9: tdebase-3.5.13.2-displayconfig_translation.patch
+Patch10: tdebase-3.5.13.2-kcm_xcursor_applytheme.patch
+
# Patches from Mandriva
Patch101: tdebase-3.5.13.2-vibrate_dialog.patch
Patch102: tdebase-3.5.13.2-kcontrol_menu_entry.patch
@@ -3260,6 +3262,7 @@ Windows and Samba shares.
%patch7 -p1 -b .pid
%patch8 -p1 -b .kickoff_default_favs
%patch9 -p1 -b .translation
+%patch10 -p1 -b .kcmxcursor
%patch101 -p1 -b .vibrate_dialog
%patch102 -p1 -b .kcontrol_menu_entry