diff options
author | Johannes Huber <johu@gentoo.org> | 2011-12-13 15:32:16 +0000 |
---|---|---|
committer | Johannes Huber <johu@gentoo.org> | 2011-12-13 15:32:16 +0000 |
commit | 63e9bcbc0e5f0057eb84e21595397bfa73db60f2 (patch) | |
tree | 067df66d07642bc6a4bce8e6a08f06920cc76207 /kde-base | |
parent | Stable for HPPA (bug #393567). (diff) | |
download | gentoo-2-63e9bcbc0e5f0057eb84e21595397bfa73db60f2.tar.gz gentoo-2-63e9bcbc0e5f0057eb84e21595397bfa73db60f2.tar.bz2 gentoo-2-63e9bcbc0e5f0057eb84e21595397bfa73db60f2.zip |
Revision bump. Add upstream backport patch to fix non standard global keyboard layout switch. Fixes bug #394491 Thanks to Denis Scherbakov <denis_scherbakov@yahoo.comi>.
(Portage version: 2.2.0_alpha80/cvs/Linux x86_64)
Diffstat (limited to 'kde-base')
3 files changed, 203 insertions, 1 deletions
diff --git a/kde-base/systemsettings/ChangeLog b/kde-base/systemsettings/ChangeLog index 304698ca993f..fbfaf8334c5b 100644 --- a/kde-base/systemsettings/ChangeLog +++ b/kde-base/systemsettings/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for kde-base/systemsettings # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/systemsettings/ChangeLog,v 1.125 2011/12/11 18:52:33 alexxy Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/systemsettings/ChangeLog,v 1.126 2011/12/13 15:32:16 johu Exp $ + +*systemsettings-4.7.3-r1 (13 Dec 2011) + + 13 Dec 2011; Johannes Huber <johu@gentoo.org> + +files/systemsettings-4.7.3-fix-keyboard-layout-switch.patch, + +systemsettings-4.7.3-r1.ebuild: + Revision bump. Add upstream backport patch to fix non standard global keyboard + layout switch. Fixes bug #394491 Thanks to Denis Scherbakov + <denis_scherbakov@yahoo.comi>. *systemsettings-4.7.4 (11 Dec 2011) diff --git a/kde-base/systemsettings/files/systemsettings-4.7.3-fix-keyboard-layout-switch.patch b/kde-base/systemsettings/files/systemsettings-4.7.3-fix-keyboard-layout-switch.patch new file mode 100644 index 000000000000..6a0015536482 --- /dev/null +++ b/kde-base/systemsettings/files/systemsettings-4.7.3-fix-keyboard-layout-switch.patch @@ -0,0 +1,96 @@ +commit 1ac5ebe482f633295fb4a79eb1c5236561e9ca70 +Author: Andriy Rysin <arysin@gmail.com> +Date: Fri Nov 18 23:12:14 2011 -0500 + + Fix keyboard layout global shortcuts + BUG: 286302 + +diff --git a/kcontrol/keyboard/bindings.cpp b/kcontrol/keyboard/bindings.cpp +index 6f5af7b..ac20dd9 100644 +--- a/kcontrol/keyboard/bindings.cpp ++++ b/kcontrol/keyboard/bindings.cpp +@@ -103,8 +103,11 @@ void KeyboardLayoutActionCollection::setLayoutShortcuts(QList<LayoutUnit>& layou + { + for (QList<LayoutUnit>::iterator i = layoutUnits.begin(); i != layoutUnits.end(); ++i) { + LayoutUnit& layoutUnit = *i; +- createLayoutShortcutActon(layoutUnit, rules, false); ++ if( ! layoutUnit.getShortcut().isEmpty() ) { ++ createLayoutShortcutActon(layoutUnit, rules, false); ++ } + } ++ kDebug() << "Cleaning component shortcuts on save" << KGlobalAccel::cleanComponent(COMPONENT_NAME); + } + + void KeyboardLayoutActionCollection::loadLayoutShortcuts(QList<LayoutUnit>& layoutUnits, const Rules* rules) +@@ -112,19 +115,27 @@ void KeyboardLayoutActionCollection::loadLayoutShortcuts(QList<LayoutUnit>& layo + for (QList<LayoutUnit>::iterator i = layoutUnits.begin(); i != layoutUnits.end(); ++i) { + LayoutUnit& layoutUnit = *i; + KAction* action = createLayoutShortcutActon(layoutUnit, rules, true); +- layoutUnit.setShortcut(action->globalShortcut(KAction::ActiveShortcut).primary()); // shortcut was restored ++ QKeySequence shortcut = action->globalShortcut(KAction::ActiveShortcut).primary(); // shortcut was restored ++ if( ! shortcut.isEmpty() ) { ++ kDebug() << "Restored shortcut for" << layoutUnit.toString() << shortcut; ++ layoutUnit.setShortcut(shortcut); ++ } ++ else { ++ kDebug() << "Skipping empty shortcut for" << layoutUnit.toString(); ++ removeAction(action); ++ } + } + kDebug() << "Cleaning component shortcuts on load" << KGlobalAccel::cleanComponent(COMPONENT_NAME); + } + +-KAction* KeyboardLayoutActionCollection::getAction(const LayoutUnit& layoutUnit) +-{ +- for(int i=1; i<actions().size(); i++) { +- if( action(i)->data() == layoutUnit.toString() ) +- return static_cast<KAction*>(action(i)); +- } +- return NULL; +-} ++//KAction* KeyboardLayoutActionCollection::getAction(const LayoutUnit& layoutUnit) ++//{ ++// for(int i=1; i<actions().size(); i++) { ++// if( action(i)->data() == layoutUnit.toString() ) ++// return static_cast<KAction*>(action(i)); ++// } ++// return NULL; ++//} + + void KeyboardLayoutActionCollection::resetLayoutShortcuts() + { +diff --git a/kcontrol/keyboard/bindings.h b/kcontrol/keyboard/bindings.h +index f60656b..09a9bdc 100644 +--- a/kcontrol/keyboard/bindings.h ++++ b/kcontrol/keyboard/bindings.h +@@ -36,7 +36,7 @@ public: + virtual ~KeyboardLayoutActionCollection(); + + KAction* getToggeAction(); +- KAction* getAction(const LayoutUnit& layoutUnit); ++// KAction* getAction(const LayoutUnit& layoutUnit); + KAction* createLayoutShortcutActon(const LayoutUnit& layoutUnit, const Rules* rules, bool autoload); + // KAction* setShortcut(LayoutUnit& layoutUnit, const QKeySequence& keySequence, const Rules* rules); + void setLayoutShortcuts(QList<LayoutUnit>& layoutUnits, const Rules* rules); +diff --git a/kcontrol/keyboard/keyboard_daemon.cpp b/kcontrol/keyboard/keyboard_daemon.cpp +index 1618d2a..7126268 100644 +--- a/kcontrol/keyboard/keyboard_daemon.cpp ++++ b/kcontrol/keyboard/keyboard_daemon.cpp +@@ -214,12 +214,16 @@ void KeyboardDaemon::layoutMapChanged() + + void KeyboardDaemon::switchToNextLayout() + { ++ kDebug() << "Toggling layout"; + X11Helper::switchToNextLayout(); + } + + bool KeyboardDaemon::setLayout(QAction* action) + { +- LayoutUnit layoutUnit(LayoutUnit(action->data().toString())); ++ if( action == actionCollection->getToggeAction() ) ++ return false; ++ ++ LayoutUnit layoutUnit(action->data().toString()); + return LayoutsMenu::switchToLayout(layoutUnit, keyboardConfig); // need this to be able to switch to spare layouts + // return X11Helper::setLayout(LayoutUnit(action->data().toString())); + } diff --git a/kde-base/systemsettings/systemsettings-4.7.3-r1.ebuild b/kde-base/systemsettings/systemsettings-4.7.3-r1.ebuild new file mode 100644 index 000000000000..0931d11b728f --- /dev/null +++ b/kde-base/systemsettings/systemsettings-4.7.3-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/systemsettings/systemsettings-4.7.3-r1.ebuild,v 1.1 2011/12/13 15:32:16 johu Exp $ + +EAPI=4 + +KDE_HANDBOOK="optional" +KMNAME="kde-workspace" +OPENGL_REQUIRED="optional" +inherit kde4-meta + +DESCRIPTION="System settings utility" +IUSE="debug gtk +usb xinerama" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" + +COMMONDEPEND=" + dev-libs/glib:2 + $(add_kdebase_dep libkworkspace) + media-libs/fontconfig + >=media-libs/freetype-2 + >=x11-libs/libxklavier-3.2 + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXft + x11-libs/libXrandr + x11-libs/libXtst + opengl? ( virtual/opengl ) + usb? ( =virtual/libusb-0* ) + xinerama? ( x11-libs/libXinerama ) +" +DEPEND="${COMMONDEPEND} + x11-proto/kbproto + x11-proto/xextproto + xinerama? ( x11-proto/xineramaproto ) +" +RDEPEND="${COMMONDEPEND} + sys-libs/timezone-data + x11-apps/setxkbmap + x11-misc/xkeyboard-config + gtk? ( kde-misc/kcm-gtk-config ) +" + +RESTRICT="test" +# bug 393133 + +KMEXTRA=" + kcontrol/ +" +KMEXTRACTONLY=" + krunner/dbus/org.kde.krunner.App.xml + krunner/dbus/org.kde.screensaver.xml + kwin/ + libs/ + plasma/ +" + +add_blocker kdeaccessibility-colorschemes '<4.6.50' + +PATCHES=( + "${FILESDIR}/${PN}-4.4.2-xinerama_cmake_automagic.patch" + "${FILESDIR}/${P}-fix-keyboard-layout-switch.patch" +) + +src_unpack() { + if use handbook; then + KMEXTRA+=" + doc/kcontrol + doc/kfontview + " + fi + + kde4-meta_src_unpack +} + +src_prepare() { + sed -i -e 's/systemsettingsrc DESTINATION ${SYSCONF_INSTALL_DIR}/systemsettingsrc DESTINATION ${CONFIG_INSTALL_DIR}/' \ + systemsettings/CMakeLists.txt \ + || die "Failed to fix systemsettingsrc install location" + + kde4-meta_src_prepare +} + +# FIXME: is have_openglxvisual found without screensaver +src_configure() { + # Old keyboard-detection code is unmaintained, + # so we force the new stuff, using libxklavier. + mycmakeargs=( + -DUSE_XKLAVIER=ON -DWITH_LibXKlavier=ON + -DWITH_GLIB2=ON -DWITH_GObject=ON + $(cmake-utils_use_with opengl OpenGL) + $(cmake-utils_use_with usb) + $(cmake-utils_use_with xinerama X11_Xinerama) + ) + + kde4-meta_src_configure +} |