summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcommunity/cairo-dock-plugins/PKGBUILD7
-rw-r--r--community/cinnamon-control-center/PKGBUILD22
-rw-r--r--community/cinnamon-session/PKGBUILD6
-rw-r--r--community/cinnamon-settings-daemon/PKGBUILD50
-rw-r--r--community/cinnamon-settings-daemon/automount-plugin.patch447
-rw-r--r--community/cinnamon-settings-daemon/dpms.patch29
-rw-r--r--community/cinnamon-settings-daemon/fix-lock-on-suspend.patch109
-rw-r--r--community/cinnamon-settings-daemon/keyboard.patch4728
-rw-r--r--community/cinnamon-settings-daemon/remove_obsolete_battery_recall_code.patch242
-rw-r--r--community/cinnamon-settings-daemon/systemd-support.patch535
-rw-r--r--community/cinnamon-settings-daemon/upower_deprecated.patch81
-rw-r--r--community/cinnamon/PKGBUILD47
-rw-r--r--community/cinnamon/cinnamon.install1
-rw-r--r--community/cinnamon/input_keybindings.patch11
-rw-r--r--community/cinnamon/keyboard_applet.patch133
-rw-r--r--community/cinnamon/org.archlinux.pkexec.cinnamon-settings-users.policy20
-rw-r--r--community/connman/PKGBUILD6
-rw-r--r--community/gnome-screensaver/PKGBUILD4
-rw-r--r--community/kmscon/PKGBUILD18
-rw-r--r--community/liblogging/PKGBUILD6
-rw-r--r--community/libuv/PKGBUILD6
-rwxr-xr-xcommunity/lightdm/PKGBUILD16
-rw-r--r--community/liteide/PKGBUILD6
-rw-r--r--community/mate-applets/PKGBUILD4
-rw-r--r--community/mate-power-manager/PKGBUILD19
-rw-r--r--community/mate-session-manager/PKGBUILD7
-rw-r--r--community/muffin/PKGBUILD6
-rw-r--r--community/mupdf/PKGBUILD19
-rw-r--r--community/mupdf/mupdf-1.3-stack-buffer-overflow-in-xps_parse_color.patch135
-rw-r--r--community/mupdf/mupdf-1.3-system-libcurl.patch21
-rw-r--r--community/mupdf/mupdf-1.4-system-libcurl.patch26
-rw-r--r--community/nemo/PKGBUILD13
-rw-r--r--community/nemo/adwaita_style.patch10
-rw-r--r--community/paxtest/PKGBUILD27
-rw-r--r--community/perl-term-readline-gnu/PKGBUILD20
-rw-r--r--community/perl-xml-libxml/PKGBUILD6
-rw-r--r--community/perl-xml-libxslt/PKGBUILD6
-rw-r--r--community/plank/PKGBUILD21
-rw-r--r--community/python-pillow/PKGBUILD8
-rw-r--r--community/rsyslog/PKGBUILD8
-rw-r--r--community/units/PKGBUILD6
-rw-r--r--community/xe-guest-utilities/PKGBUILD13
-rw-r--r--core/iproute2/PKGBUILD10
-rw-r--r--core/logrotate/PKGBUILD17
-rw-r--r--core/logrotate/logrotate.conf2
-rwxr-xr-xcore/logrotate/logrotate.cron.daily28
-rw-r--r--core/logrotate/logrotate.service9
-rw-r--r--core/logrotate/logrotate.timer7
-rw-r--r--core/man-db/PKGBUILD25
-rwxr-xr-xcore/man-db/man-db.cron.daily39
-rw-r--r--core/man-db/man-db.service11
-rw-r--r--core/man-db/man-db.timer7
-rw-r--r--core/mlocate/PKGBUILD26
-rwxr-xr-xcore/mlocate/updatedb.cron6
-rw-r--r--core/mlocate/updatedb.service9
-rw-r--r--core/mlocate/updatedb.timer7
-rw-r--r--core/shadow/PKGBUILD18
-rwxr-xr-xcore/shadow/shadow.cron.daily6
-rw-r--r--core/shadow/shadow.service10
-rw-r--r--core/shadow/shadow.timer7
-rw-r--r--core/systemd/0001-backlight-do-nothing-if-max_brightness-is-0.patch108
-rw-r--r--core/systemd/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch38
-rw-r--r--core/systemd/0003-man-reword-Persistent-description.patch50
-rw-r--r--core/systemd/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch85
-rw-r--r--core/systemd/PKGBUILD28
-rw-r--r--cross/cross-gcc/gcc-4.8-filename-output.patch17
-rw-r--r--cross/cross-gcc/gcc-4.8-lambda-ICE.patch35
-rw-r--r--cross/cross-gcc/gcc-xtensa.patch115
-rw-r--r--cross/cross-gcc/gcc.install20
-rw-r--r--extra/efl/PKGBUILD6
-rw-r--r--extra/elementary/PKGBUILD6
-rw-r--r--extra/enlightenment/PKGBUILD4
-rw-r--r--extra/eog-plugins/PKGBUILD8
-rw-r--r--extra/eog/PKGBUILD8
-rw-r--r--extra/gedit/PKGBUILD6
-rw-r--r--extra/gnome-klotski/PKGBUILD8
-rw-r--r--extra/gnome-klotski/gnome-klotski.install1
-rw-r--r--extra/gnome-mahjongg/PKGBUILD8
-rw-r--r--extra/gnome-mahjongg/gnome-mahjongg.install1
-rw-r--r--extra/gnome-maps/PKGBUILD4
-rw-r--r--extra/gnome-mines/PKGBUILD8
-rw-r--r--extra/gnome-mines/gnome-mines.install1
-rw-r--r--extra/gnome-robots/PKGBUILD8
-rw-r--r--extra/gnome-robots/gnome-robots.install1
-rw-r--r--extra/gnome-system-monitor/PKGBUILD6
-rw-r--r--extra/gnome-tetravex/PKGBUILD10
-rw-r--r--extra/gnome-tetravex/gnome-tetravex.install1
-rw-r--r--extra/gtksourceview3/PKGBUILD6
-rw-r--r--extra/haveged/PKGBUILD18
-rw-r--r--extra/perl-ev/PKGBUILD7
-rw-r--r--extra/rygel/PKGBUILD6
-rw-r--r--extra/swell-foop/PKGBUILD8
-rw-r--r--extra/swell-foop/swell-foop.install1
-rw-r--r--extra/tomcat-native/PKGBUILD4
-rw-r--r--pcr/debootstrap-libre/PKGBUILD68
-rw-r--r--pcr/debootstrap-libre/debootstrap.8.gzbin2580 -> 0 bytes
96 files changed, 707 insertions, 7151 deletions
diff --git a/community/cairo-dock-plugins/PKGBUILD b/community/cairo-dock-plugins/PKGBUILD
index dc244e9e3..d5802c626 100755
--- a/community/cairo-dock-plugins/PKGBUILD
+++ b/community/cairo-dock-plugins/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 108397 2014-03-27 14:47:09Z fyan $
+# $Id: PKGBUILD 109494 2014-04-15 08:32:17Z alucryd $
# Maintainer: Maxime Gauduin <alucryd@gmail.com>
# Contributor: Tofe <chris.chapuis@gmail.com>
# Contributor: zhuqin <zhuqin83@gmail.com>
@@ -7,13 +7,13 @@
pkgname=cairo-dock-plugins
pkgver=3.3.2
-pkgrel=3
+pkgrel=4
pkgdesc='Plugins for Cairo-Dock'
arch=('i686' 'x86_64')
url='https://launchpad.net/cairo-dock-plug-ins'
license=('GPL')
depends=('cairo-dock')
-makedepends=('cmake' 'alsa-lib' 'fftw' 'gnome-menus' 'gtk-sharp-2' 'gvfs' 'libetpan' 'libexif' 'libical' 'libpulse' 'libxklavier' 'libzeitgeist' 'lm_sensors' 'ndesk-dbus-glib' 'python' 'python2' 'ruby' 'upower' 'vala' 'vte3' 'webkitgtk3')
+makedepends=('cmake' 'alsa-lib' 'fftw' 'gnome-menus' 'gtk-sharp-2' 'gvfs' 'libetpan' 'libexif' 'libical' 'libpulse' 'libxklavier' 'libzeitgeist' 'lm_sensors' 'ndesk-dbus-glib' 'python' 'python2' 'ruby' 'vala' 'vte3' 'webkitgtk3')
optdepends=('alsa-lib: Sound Control, Sound Effects applets'
'fftw: Impulse applet'
'gnome-menus: Applications Menu applet'
@@ -30,7 +30,6 @@ optdepends=('alsa-lib: Sound Control, Sound Effects applets'
'python: Python 3 API'
'python2: Python 2 API'
'ruby: Ruby API'
- 'upower: Logout, PowerManager applets'
'vte3: Terminal applet'
'webkitgtk3: Weblets applet')
source=("${url}/${pkgver%.?}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz")
diff --git a/community/cinnamon-control-center/PKGBUILD b/community/cinnamon-control-center/PKGBUILD
index 6820abb1d..ff5724b7a 100644
--- a/community/cinnamon-control-center/PKGBUILD
+++ b/community/cinnamon-control-center/PKGBUILD
@@ -1,32 +1,24 @@
-# $Id: PKGBUILD 101563 2013-11-28 01:18:16Z faidoc $
-# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com
+# $Id: PKGBUILD 109527 2014-04-15 12:47:26Z bpiotrowski $
+# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Based on gnome-control-center:
# Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Jan de Groot <jgc@archlinux.org>
pkgname=cinnamon-control-center
-pkgver=2.0.9
+pkgver=2.2.3
pkgrel=1
pkgdesc="The Control Center for Cinnamon"
arch=('i686' 'x86_64')
-depends=('cinnamon-settings-daemon' 'cinnamon-translations' 'gnome-menus' 'libgnomekbd' 'network-manager-applet')
+depends=('cinnamon-settings-daemon' 'cinnamon-translations' 'cinnamon-menus'
+ 'libgnomekbd' 'network-manager-applet')
optdepends=('gnome-color-manager: for color management tasks')
makedepends=('intltool' 'gnome-common' 'docbook-xsl')
url="https://github.com/linuxmint/cinnamon-control-center"
install=cinnamon-control-center.install
license=('GPL')
options=('!emptydirs')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-control-center/archive/$pkgver.tar.gz"
- region.patch)
-sha256sums=('63bb179a50d5f873ed1c19de97966592eedbc055ce2829e4298223a75fc33b4e'
- '077cb8d6814c32a4df85f71c2b8fa84da25e5260263a6e0536c6e1626051f022')
-
-prepare() {
- cd $pkgname-$pkgver
-
- # Fix region panel
- patch -Np1 -i ../region.patch
-}
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-control-center/archive/$pkgver.tar.gz")
+sha256sums=('50a3da1282f7dcda7a9460aff18873bc83076b74c8dcbe9919e0a372672ae6c9')
build() {
cd $pkgname-$pkgver
diff --git a/community/cinnamon-session/PKGBUILD b/community/cinnamon-session/PKGBUILD
index ba3d9a8cd..f921c56f9 100644
--- a/community/cinnamon-session/PKGBUILD
+++ b/community/cinnamon-session/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=cinnamon-session
pkgver=2.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="The Cinnamon Session Handler"
arch=(i686 x86_64)
license=(GPL LGPL)
@@ -36,8 +36,4 @@ build() {
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
-
- # Prefix 'Startup Applications' with 'Cinnamon' to avoid confusion with gnome-session
- sed -i 's/^Name\(.*\)=\(.*\)/Name\1=Cinnamon \2/' \
- "$pkgdir/usr/share/applications/cinnamon-session-properties.desktop"
}
diff --git a/community/cinnamon-settings-daemon/PKGBUILD b/community/cinnamon-settings-daemon/PKGBUILD
index d9e808e4b..98f0fedf9 100644
--- a/community/cinnamon-settings-daemon/PKGBUILD
+++ b/community/cinnamon-settings-daemon/PKGBUILD
@@ -1,57 +1,21 @@
-# $Id: PKGBUILD 109437 2014-04-14 20:20:10Z jgc $
+# $Id: PKGBUILD 109529 2014-04-15 12:55:57Z bpiotrowski $
# Maintainer: Alexandre Filgueira (faidoc) <alexfilgueira@antergos.com>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
pkgname=cinnamon-settings-daemon
-pkgver=2.0.8
-pkgrel=6
+pkgver=2.2.1
+pkgrel=1
pkgdesc="The Cinnamon Settings daemon"
arch=('i686' 'x86_64')
license=('GPL')
-depends=('cinnamon-desktop' 'libibus' 'libcanberra-pulse' 'librsvg' 'nss' 'pulseaudio-alsa' 'upower' 'libnotify')
+depends=('cinnamon-desktop' 'libibus' 'libcanberra-pulse' 'librsvg' 'nss'
+ 'pulseaudio-alsa' 'upower' 'libnotify' 'libgnomekbd')
makedepends=('intltool' 'docbook-xsl' 'gnome-common')
options=('!emptydirs')
install=cinnamon-settings-daemon.install
url="https://github.com/linuxmint/cinnamon-settings-daemon"
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/linuxmint/cinnamon-settings-daemon/archive/${pkgver}.tar.gz"
- keyboard.patch
- systemd-support.patch
- upower_deprecated.patch
- remove_obsolete_battery_recall_code.patch
- fix-lock-on-suspend.patch
- automount-plugin.patch
- dpms.patch)
-sha256sums=('6889f021acab93d146c78fe8aa540a83a12260232e1ea5f697037a7c94c877fd'
- '3c05b978cb414c8fc1530f211bab58627a64ac9c156630c9d486f5926a85109c'
- '28c002628bc97e8b4a2aa7e8a8141bcc8388b250a6c3ebc09a640e110ae815a9'
- 'cde7cdfe5222796d651df542526fcad2cbf0bb3a6001b31084586d1232ee6771'
- '4c1d917a7a70e16a5307f767c1494fa59cbc5168d9293ad66b56e17a74e8baf1'
- '1292c5c6a5fbf7f3db462bb8b71a75e651ea165cbd6adfd334776ccb76bdcdba'
- '4fc2b3a354b53d41d92d7f95d175a6a18382330353a0579d29c2d33b9400a837'
- '194cc704320a2d6be636191e96f62514f2b5f97655c200991b5690fbf3006026')
-
-prepare() {
- cd $pkgname-$pkgver
-
- # Fix crasher
- patch -Np1 -i ../keyboard.patch
-
- # Add systemd support for power and media-keys plugins
- patch -Np1 -i ../systemd-support.patch
-
- # Port to upower 0.99
- patch -Np1 -i ../upower_deprecated.patch
- patch -Np1 -i ../remove_obsolete_battery_recall_code.patch
-
- # Fix regressions in the previous patches
- patch -Np1 -i ../fix-lock-on-suspend.patch
-
- # Turn automount helper into a plugin
- patch -Np1 -i ../automount-plugin.patch
-
- # Fix DPMS issue with Xorg 1.14
- patch -Np1 -i ../dpms.patch
-}
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/linuxmint/cinnamon-settings-daemon/archive/${pkgver}.tar.gz")
+sha256sums=('89798977ad44fa4cfaff26d93e21b29f1a9a6a68a1c57c30e5414ad2159a849e')
build() {
cd $pkgname-$pkgver
diff --git a/community/cinnamon-settings-daemon/automount-plugin.patch b/community/cinnamon-settings-daemon/automount-plugin.patch
deleted file mode 100644
index 745ed9e2b..000000000
--- a/community/cinnamon-settings-daemon/automount-plugin.patch
+++ /dev/null
@@ -1,447 +0,0 @@
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/data/org.cinnamon.settings-daemon.plugins.gschema.xml.in.in cinnamon-settings-daemon-2.0.1/data/org.cinnamon.settings-daemon.plugins.gschema.xml.in.in
---- cinnamon-settings-daemon-2.0.6.orig/data/org.cinnamon.settings-daemon.plugins.gschema.xml.in.in 2013-11-03 10:50:04.000000000 -0500
-+++ cinnamon-settings-daemon-2.0.6/data/org.cinnamon.settings-daemon.plugins.gschema.xml.in.in 2013-11-05 15:33:21.112912392 -0500
-@@ -2,6 +2,7 @@
- <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.cinnamon.settings-daemon.plugins" path="/org/cinnamon/settings-daemon/plugins/">
- <child name="a11y-keyboard" schema="org.cinnamon.settings-daemon.plugins.a11y-keyboard"/>
- <child name="a11y-settings" schema="org.cinnamon.settings-daemon.plugins.a11y-settings"/>
-+ <child name="automount" schema="org.cinnamon.settings-daemon.plugins.automount"/>
- <child name="clipboard" schema="org.cinnamon.settings-daemon.plugins.clipboard"/>
- <child name="color" schema="org.cinnamon.settings-daemon.plugins.color"/>
- <child name="cursor" schema="org.cinnamon.settings-daemon.plugins.cursor"/>
-@@ -42,6 +43,18 @@
- <_summary>Priority to use for this plugin</_summary>
- <_description>Priority to use for this plugin in cinnamon-settings-daemon startup queue</_description>
- </key>
-+ </schema>
-+ <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.cinnamon.settings-daemon.plugins.automount" path="/org/cinnamon/settings-daemon/plugins/automount/">
-+ <key name="active" type="b">
-+ <default>true</default>
-+ <_summary>Activation of this plugin</_summary>
-+ <_description>Whether this plugin would be activated by cinnamon-settings-daemon or not</_description>
-+ </key>
-+ <key name="priority" type="i">
-+ <default>97</default>
-+ <_summary>Priority to use for this plugin</_summary>
-+ <_description>Priority to use for this plugin in cinnamon-settings-daemon startup queue</_description>
-+ </key>
- </schema>
- <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.cinnamon.settings-daemon.plugins.clipboard" path="/org/cinnamon/settings-daemon/plugins/clipboard/">
- <key name="active" type="b">
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/automount.cinnamon-settings-plugin.in cinnamon-settings-daemon-2.0.1/plugins/automount/automount.cinnamon-settings-plugin.in
---- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/automount.cinnamon-settings-plugin.in 1970-01-01 01:00:00.000000000 +0100
-+++ cinnamon-settings-daemon-2.0.1/plugins/automount/automount.cinnamon-settings-plugin.in 2013-10-08 22:35:10.771472456 +0200
-@@ -0,0 +1,8 @@
-+[Cinnamon Settings Plugin]
-+Module=automount
-+IAge=0
-+_Name=Automount
-+_Description=Automounter plugin
-+Authors=Tomas Bzatek
-+Copyright=Copyright © 2010 Red Hat, Inc.
-+Website=
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/cinnamon-fallback-mount-helper.c cinnamon-settings-daemon-2.0.1/plugins/automount/cinnamon-fallback-mount-helper.c
---- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/cinnamon-fallback-mount-helper.c 2013-10-02 16:13:56.000000000 +0200
-+++ cinnamon-settings-daemon-2.0.1/plugins/automount/cinnamon-fallback-mount-helper.c 1970-01-01 01:00:00.000000000 +0100
-@@ -1,65 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2010 Red Hat, Inc.
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-- *
-- * Author: Tomas Bzatek <tbzatek@redhat.com>
-- */
--
--#include "config.h"
--
--#include <glib.h>
--#include <glib/gi18n.h>
--#include <unistd.h>
--#include <gtk/gtk.h>
--
--#include "csd-automount-manager.h"
--
--int
--main (int argc,
-- char **argv)
--{
-- GMainLoop *loop;
-- CsdAutomountManager *manager;
-- GError *error = NULL;
--
-- g_type_init ();
-- gtk_init (&argc, &argv);
--
-- bindtextdomain (GETTEXT_PACKAGE, CINNAMON_SETTINGS_LOCALEDIR);
-- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-- textdomain (GETTEXT_PACKAGE);
--
-- loop = g_main_loop_new (NULL, FALSE);
-- manager = csd_automount_manager_new ();
--
-- csd_automount_manager_start (manager, &error);
--
-- if (error != NULL) {
-- g_printerr ("Unable to start the mount manager: %s",
-- error->message);
--
-- g_error_free (error);
-- _exit (1);
-- }
--
-- g_main_loop_run (loop);
--
-- csd_automount_manager_stop (manager);
-- g_main_loop_unref (loop);
--
-- return 0;
--}
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in cinnamon-settings-daemon-2.0.1/plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in
---- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in 2013-10-02 16:13:56.000000000 +0200
-+++ cinnamon-settings-daemon-2.0.1/plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in 1970-01-01 01:00:00.000000000 +0100
-@@ -1,12 +0,0 @@
--[Desktop Entry]
--_Name=Mount Helper
--_Comment=Automount and autorun plugged devices
--Exec=@LIBEXECDIR@/cinnamon-fallback-mount-helper
--Icon=drive-optical
--Terminal=false
--Type=Application
--Categories=
--NoDisplay=true
--OnlyShowIn=GNOME;
--X-GNOME-Autostart-Notify=true
--
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/csd-automount-plugin.c cinnamon-settings-daemon-2.0.1/plugins/automount/csd-automount-plugin.c
---- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/csd-automount-plugin.c 1970-01-01 01:00:00.000000000 +0100
-+++ cinnamon-settings-daemon-2.0.1/plugins/automount/csd-automount-plugin.c 2013-10-08 22:35:10.771472456 +0200
-@@ -0,0 +1,106 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-+ *
-+ * Copyright (C) 2010 Red Hat, Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ * Author: Tomas Bzatek <tbzatek@redhat.com>
-+ */
-+
-+#include "config.h"
-+
-+#include <glib/gi18n-lib.h>
-+#include <gmodule.h>
-+
-+#include "cinnamon-settings-plugin.h"
-+#include "csd-automount-plugin.h"
-+#include "csd-automount-manager.h"
-+
-+struct CsdAutomountPluginPrivate {
-+ CsdAutomountManager *manager;
-+};
-+
-+#define CSD_AUTOMOUNT_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), CSD_TYPE_AUTOMOUNT_PLUGIN, CsdAutomountPluginPrivate))
-+
-+CINNAMON_SETTINGS_PLUGIN_REGISTER (CsdAutomountPlugin, csd_automount_plugin)
-+
-+static void
-+csd_automount_plugin_init (CsdAutomountPlugin *plugin)
-+{
-+ plugin->priv = CSD_AUTOMOUNT_PLUGIN_GET_PRIVATE (plugin);
-+
-+ g_debug ("Automount plugin initializing");
-+
-+ plugin->priv->manager = csd_automount_manager_new ();
-+}
-+
-+static void
-+csd_automount_plugin_finalize (GObject *object)
-+{
-+ CsdAutomountPlugin *plugin;
-+
-+ g_return_if_fail (object != NULL);
-+ g_return_if_fail (CSD_IS_AUTOMOUNT_PLUGIN (object));
-+
-+ g_debug ("Automount plugin finalizing");
-+
-+ plugin = CSD_AUTOMOUNT_PLUGIN (object);
-+
-+ g_return_if_fail (plugin->priv != NULL);
-+
-+ if (plugin->priv->manager != NULL) {
-+ g_object_unref (plugin->priv->manager);
-+ }
-+
-+ G_OBJECT_CLASS (csd_automount_plugin_parent_class)->finalize (object);
-+}
-+
-+static void
-+impl_activate (CinnamonSettingsPlugin *plugin)
-+{
-+ gboolean res;
-+ GError *error;
-+
-+ g_debug ("Activating automount plugin");
-+
-+ error = NULL;
-+ res = csd_automount_manager_start (CSD_AUTOMOUNT_PLUGIN (plugin)->priv->manager, &error);
-+ if (! res) {
-+ g_warning ("Unable to start automount manager: %s", error->message);
-+ g_error_free (error);
-+ }
-+}
-+
-+static void
-+impl_deactivate (CinnamonSettingsPlugin *plugin)
-+{
-+ g_debug ("Deactivating automount plugin");
-+ csd_automount_manager_stop (CSD_AUTOMOUNT_PLUGIN (plugin)->priv->manager);
-+}
-+
-+static void
-+csd_automount_plugin_class_init (CsdAutomountPluginClass *klass)
-+{
-+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
-+ CinnamonSettingsPluginClass *plugin_class = CINNAMON_SETTINGS_PLUGIN_CLASS (klass);
-+
-+ object_class->finalize = csd_automount_plugin_finalize;
-+
-+ plugin_class->activate = impl_activate;
-+ plugin_class->deactivate = impl_deactivate;
-+
-+ g_type_class_add_private (klass, sizeof (CsdAutomountPluginPrivate));
-+}
-+
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/csd-automount-plugin.h cinnamon-settings-daemon-2.0.1/plugins/automount/csd-automount-plugin.h
---- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/csd-automount-plugin.h 1970-01-01 01:00:00.000000000 +0100
-+++ cinnamon-settings-daemon-2.0.1/plugins/automount/csd-automount-plugin.h 2013-10-08 22:35:10.771472456 +0200
-@@ -0,0 +1,60 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-+ *
-+ * Copyright (C) 2010 Red Hat, Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ * Author: Tomas Bzatek <tbzatek@redhat.com>
-+ */
-+
-+#ifndef __CSD_AUTOMOUNT_PLUGIN_H__
-+#define __CSD_AUTOMOUNT_PLUGIN_H__
-+
-+#include <glib.h>
-+#include <glib-object.h>
-+#include <gmodule.h>
-+
-+#include "cinnamon-settings-plugin.h"
-+
-+G_BEGIN_DECLS
-+
-+#define CSD_TYPE_AUTOMOUNT_PLUGIN (csd_automount_plugin_get_type ())
-+#define CSD_AUTOMOUNT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CSD_TYPE_AUTOMOUNT_PLUGIN, CsdAutomountPlugin))
-+#define CSD_AUTOMOUNT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CSD_TYPE_AUTOMOUNT_PLUGIN, CsdAutomountPluginClass))
-+#define CSD_IS_AUTOMOUNT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CSD_TYPE_AUTOMOUNT_PLUGIN))
-+#define CSD_IS_AUTOMOUNT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CSD_TYPE_AUTOMOUNT_PLUGIN))
-+#define CSD_AUTOMOUNT_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CSD_TYPE_AUTOMOUNT_PLUGIN, CsdAutomountPluginClass))
-+
-+typedef struct CsdAutomountPluginPrivate CsdAutomountPluginPrivate;
-+
-+typedef struct
-+{
-+ CinnamonSettingsPlugin parent;
-+ CsdAutomountPluginPrivate *priv;
-+} CsdAutomountPlugin;
-+
-+typedef struct
-+{
-+ CinnamonSettingsPluginClass parent_class;
-+} CsdAutomountPluginClass;
-+
-+GType csd_automount_plugin_get_type (void) G_GNUC_CONST;
-+
-+/* All the plugins must implement this function */
-+G_MODULE_EXPORT GType register_cinnamon_settings_plugin (GTypeModule *module);
-+
-+G_END_DECLS
-+
-+#endif /* __CSD_AUTOMOUNT_PLUGIN_H__ */
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/Makefile.am cinnamon-settings-daemon-2.0.1/plugins/automount/Makefile.am
---- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/Makefile.am 2013-10-02 16:13:56.000000000 +0200
-+++ cinnamon-settings-daemon-2.0.1/plugins/automount/Makefile.am 2013-10-08 22:48:19.240865461 +0200
-@@ -1,38 +1,87 @@
--libexec_PROGRAMS = cinnamon-fallback-mount-helper
-+NULL =
-
--cinnamon_fallback_mount_helper_SOURCES = \
-- cinnamon-fallback-mount-helper.c \
-- csd-automount-manager.c \
-- csd-automount-manager.h \
-- csd-autorun.c \
-- csd-autorun.h
-+plugin_name = automount
-
--cinnamon_fallback_mount_helper_CPPFLAGS = \
-+libexec_PROGRAMS = csd-test-automount
-+
-+csd_test_automount_SOURCES = \
-+ test-automount.c \
-+ csd-automount-manager.h \
-+ csd-automount-manager.c \
-+ csd-autorun.c \
-+ csd-autorun.h \
-+ $(NULL)
-+
-+csd_test_automount_CPPFLAGS = \
- -I$(top_srcdir)/cinnamon-settings-daemon \
-+ -I$(top_srcdir)/plugins/common \
- -DCINNAMON_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
- $(AM_CPPFLAGS)
-
--cinnamon_fallback_mount_helper_CFLAGS = \
-+csd_test_automount_CFLAGS = \
-+ $(PLUGIN_CFLAGS) \
- $(SETTINGS_PLUGIN_CFLAGS) \
- $(SYSTEMD_CFLAGS) \
- $(AUTOMOUNT_CFLAGS)
-+ $(AM_CFLAGS)
-+
-+csd_test_automount_LDADD = \
-+ $(top_builddir)/cinnamon-settings-daemon/libcsd.la \
-+ $(SETTINGS_PLUGIN_LIBS) \
-+ $(SYSTEMD_LIBS) \
-+ $(AUTOMOUNT_LIBS) \
-+ $(NULL)
-+
-+plugin_LTLIBRARIES = \
-+ libautomount.la \
-+ $(NULL)
-+
-+libautomount_la_SOURCES = \
-+ csd-automount-plugin.h \
-+ csd-automount-plugin.c \
-+ csd-automount-manager.h \
-+ csd-automount-manager.c \
-+ csd-autorun.c \
-+ csd-autorun.h \
-+ $(NULL)
-+
-+libautomount_la_CPPFLAGS = \
-+ -I$(top_srcdir)/cinnamon-settings-daemon \
-+ -DCINNAMON_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
-+ $(AM_CPPFLAGS)
-+
-+libautomount_la_CFLAGS = \
-+ $(SETTINGS_PLUGIN_CFLAGS) \
-+ $(SYSTEMD_CFLAGS) \
-+ $(AUTOMOUNT_CFLAGS) \
-+ $(AM_CFLAGS)
-+
-+libautomount_la_LDFLAGS = \
-+ $(CSD_PLUGIN_LDFLAGS) \
-+ $(NULL)
-
--cinnamon_fallback_mount_helper_LDADD = \
-+libautomount_la_LIBADD = \
- $(SETTINGS_PLUGIN_LIBS) \
- $(SYSTEMD_LIBS) \
- $(AUTOMOUNT_LIBS) \
-- $(top_builddir)/cinnamon-settings-daemon/libcsd.la
-+ $(NULL)
-
--autostartdir = $(datadir)/applications
--autostart_in_files = cinnamon-fallback-mount-helper.desktop.in
--autostart_in_in_files = cinnamon-fallback-mount-helper.desktop.in.in
--autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
-+plugin_in_files = \
-+ automount.cinnamon-settings-plugin.in \
-+ $(NULL)
-
--$(autostart_in_files): $(autostart_in_in_files)
-- @sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
-+plugin_DATA = $(plugin_in_files:.cinnamon-settings-plugin.in=.cinnamon-settings-plugin)
-
--@INTLTOOL_DESKTOP_RULE@
-+EXTRA_DIST = \
-+ $(plugin_in_files) \
-+ $(NULL)
-
--EXTRA_DIST = $(autostart_in_in_files)
-+CLEANFILES = \
-+ $(plugin_DATA) \
-+ $(NULL)
-
--CLEANFILES = $(autostart_DATA) $(autostart_in_files)
-+DISTCLEANFILES = \
-+ $(plugin_DATA) \
-+ $(NULL)
-+
-+@CSD_INTLTOOL_PLUGIN_RULE@
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/test-automount.c cinnamon-settings-daemon-2.0.1/plugins/automount/test-automount.c
---- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/test-automount.c 1970-01-01 01:00:00.000000000 +0100
-+++ cinnamon-settings-daemon-2.0.1/plugins/automount/test-automount.c 2013-10-08 22:42:53.759486525 +0200
-@@ -0,0 +1,7 @@
-+#define NEW csd_automount_manager_new
-+#define START csd_automount_manager_start
-+#define STOP csd_automount_manager_stop
-+#define MANAGER CsdAutomountManager
-+#include "csd-automount-manager.h"
-+
-+#include "test-plugin.h"
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/po/POTFILES.in cinnamon-settings-daemon-2.0.1/po/POTFILES.in
---- cinnamon-settings-daemon-2.0.1.orig/po/POTFILES.in 2013-10-02 16:13:56.000000000 +0200
-+++ cinnamon-settings-daemon-2.0.1/po/POTFILES.in 2013-10-08 22:35:10.771472456 +0200
-@@ -18,8 +18,9 @@
- plugins/a11y-keyboard/csd-a11y-preferences-dialog.c
- [type: gettext/glade]plugins/a11y-keyboard/csd-a11y-preferences-dialog.ui
- [type: gettext/ini]plugins/a11y-settings/a11y-settings.cinnamon-settings-plugin.in
--plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in
-+[type: gettext/ini]plugins/automount/automount.cinnamon-settings-plugin.in
- plugins/automount/csd-automount-manager.c
-+plugins/automount/csd-automount-plugin.c
- plugins/automount/csd-autorun.c
- [type: gettext/ini]plugins/background/background.cinnamon-settings-plugin.in
- [type: gettext/ini]plugins/clipboard/clipboard.cinnamon-settings-plugin.in
-diff -Naur cinnamon-settings-daemon-2.0.1.orig/po/POTFILES.skip cinnamon-settings-daemon-2.0.1/po/POTFILES.skip
---- cinnamon-settings-daemon-2.0.1.orig/po/POTFILES.skip 2013-10-02 16:13:56.000000000 +0200
-+++ cinnamon-settings-daemon-2.0.1/po/POTFILES.skip 2013-10-08 22:37:20.224645009 +0200
-@@ -20,6 +20,5 @@
- data/org.cinnamon.settings-daemon.plugins.updates.gschema.xml.in
- data/org.cinnamon.settings-daemon.plugins.xrandr.gschema.xml.in
- data/org.cinnamon.settings-daemon.plugins.xsettings.gschema.xml.in
--plugins/automount/gnome-fallback-mount-helper.desktop.in
- plugins/power/org.cinnamon.settings-daemon.plugins.power.policy.in
- plugins/wacom/org.cinnamon.settings-daemon.plugins.wacom.policy.in
diff --git a/community/cinnamon-settings-daemon/dpms.patch b/community/cinnamon-settings-daemon/dpms.patch
deleted file mode 100644
index 0e48ee85d..000000000
--- a/community/cinnamon-settings-daemon/dpms.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/plugins/power/csd-power-manager.c
-+++ b/plugins/power/csd-power-manager.c
-@@ -33,6 +33,8 @@
- #include <libnotify/notify.h>
- #include <canberra-gtk.h>
-
-+#include <X11/extensions/dpms.h>
-+
- #define GNOME_DESKTOP_USE_UNSTABLE_API
- #include <libcinnamon-desktop/gnome-rr.h>
-
-@@ -3967,6 +3790,17 @@ csd_power_manager_start (CsdPowerManager
- /* set the initial dim time that can adapt for the user */
- refresh_idle_dim_settings (manager);
-
-+ /* Make sure that Xorg's DPMS extension never gets in our way. The defaults seem to have changed in Xorg 1.14
-+ * being "0" by default to being "600" by default
-+ * https://bugzilla.gnome.org/show_bug.cgi?id=709114
-+ */
-+ gdk_error_trap_push ();
-+ int dummy;
-+ if (DPMSQueryExtension(GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &dummy, &dummy)) {
-+ DPMSSetTimeouts (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), 0, 0, 0);
-+ }
-+ gdk_error_trap_pop_ignored ();
-+
- manager->priv->xscreensaver_watchdog_timer_id = g_timeout_add_seconds (XSCREENSAVER_WATCHDOG_TIMEOUT,
- disable_builtin_screensaver,
- NULL); \ No newline at end of file
diff --git a/community/cinnamon-settings-daemon/fix-lock-on-suspend.patch b/community/cinnamon-settings-daemon/fix-lock-on-suspend.patch
deleted file mode 100644
index 46b1b1a57..000000000
--- a/community/cinnamon-settings-daemon/fix-lock-on-suspend.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From 45ba88f2798dd66a289953d76cee7ea1c28fa088 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
-Date: Fri, 11 Apr 2014 16:09:05 +0200
-Subject: [PATCH 1/3] Make lock-on-suspend independent form lock-enabled
-
-This was a regression in my logind support patch.
----
- plugins/power/csd-power-manager.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/plugins/power/csd-power-manager.c b/plugins/power/csd-power-manager.c
-index 8db93b5..ea626a5 100644
---- a/plugins/power/csd-power-manager.c
-+++ b/plugins/power/csd-power-manager.c
-@@ -3678,7 +3678,15 @@ handle_suspend_actions (CsdPowerManager *manager)
- do_lock = g_settings_get_boolean (manager->priv->settings,
- "lock-on-suspend");
- if (do_lock)
-- lock_screensaver (manager);
-+ g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
-+ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
-+ NULL,
-+ GS_DBUS_NAME,
-+ GS_DBUS_PATH,
-+ GS_DBUS_INTERFACE,
-+ NULL,
-+ sleep_cb_screensaver_proxy_ready_cb,
-+ manager);
-
- /* lift the delay inhibit, so logind can proceed */
- uninhibit_suspend (manager);
---
-1.9.1
-
-
-From 898f866fed431f27b2203566b240ea2280260e83 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
-Date: Fri, 11 Apr 2014 16:29:59 +0200
-Subject: [PATCH 2/3] Lock screen when lid closed
-
-This was a regression in the upower-1.0 patch.
----
- plugins/power/csd-power-manager.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/plugins/power/csd-power-manager.c b/plugins/power/csd-power-manager.c
-index ea626a5..e28faae 100644
---- a/plugins/power/csd-power-manager.c
-+++ b/plugins/power/csd-power-manager.c
-@@ -2146,10 +2146,10 @@ suspend_with_lid_closed (CsdPowerManager *manager)
- "lid-close-ac-action");
- }
-
--#if ! UP_CHECK_VERSION(0,99,0)
- /* check we won't melt when the lid is closed */
- if (action_type != CSD_POWER_ACTION_SUSPEND &&
- action_type != CSD_POWER_ACTION_HIBERNATE) {
-+#if ! UP_CHECK_VERSION(0,99,0)
- if (up_client_get_lid_force_sleep (manager->priv->up_client)) {
- g_warning ("to prevent damage, now forcing suspend");
- do_power_action_type (manager, CSD_POWER_ACTION_SUSPEND);
-@@ -2158,8 +2158,10 @@ suspend_with_lid_closed (CsdPowerManager *manager)
- /* maybe lock the screen if the lid is closed */
- lock_screensaver (manager);
- }
-- }
-+#else
-+ lock_screensaver (manager);
- #endif
-+ }
-
- /* ensure we turn the panel back on after resume */
- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
---
-1.9.1
-
-
-From 5dfc5f50b762c431ed7f9da2d07d08e1fd4f1376 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
-Date: Fri, 11 Apr 2014 16:46:52 +0200
-Subject: [PATCH 3/3] Really fix the error with merge
-
----
- plugins/power/csd-power-manager.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/plugins/power/csd-power-manager.c b/plugins/power/csd-power-manager.c
-index e28faae..a72f645 100644
---- a/plugins/power/csd-power-manager.c
-+++ b/plugins/power/csd-power-manager.c
-@@ -3730,6 +3730,7 @@ handle_resume_actions (CsdPowerManager *manager)
- inhibit_suspend (manager);
- }
-
-+#if ! UP_CHECK_VERSION(0,99,0)
- static void
- upower_notify_sleep_cb (UpClient *client,
- UpSleepKind sleep_kind,
-@@ -3745,6 +3746,7 @@ upower_notify_resume_cb (UpClient *client,
- {
- handle_resume_actions (manager);
- }
-+#endif
-
- static void
- logind_proxy_signal_cb (GDBusProxy *proxy,
---
-1.9.1
-
diff --git a/community/cinnamon-settings-daemon/keyboard.patch b/community/cinnamon-settings-daemon/keyboard.patch
deleted file mode 100644
index 927910d8a..000000000
--- a/community/cinnamon-settings-daemon/keyboard.patch
+++ /dev/null
@@ -1,4728 +0,0 @@
-diff -uNrp a/cinnamon-settings-daemon/main.c b/cinnamon-settings-daemon/main.c
---- a/cinnamon-settings-daemon/main.c 2013-08-24 18:04:31.000000000 +0100
-+++ b/cinnamon-settings-daemon/main.c 2013-08-25 16:36:02.000000000 +0100
-@@ -319,6 +319,29 @@ set_legacy_ibus_env_vars (GDBusProxy *pr
- }
- #endif
-
-+static void
-+got_session_proxy (GObject *source_object,
-+ GAsyncResult *res,
-+ gpointer user_data)
-+{
-+ GDBusProxy *proxy;
-+ GError *error = NULL;
-+
-+ proxy = g_dbus_proxy_new_finish (res, &error);
-+ if (proxy == NULL) {
-+ g_debug ("Could not connect to the Session manager: %s", error->message);
-+ g_error_free (error);
-+ } else {
-+ set_locale (proxy);
-+#ifdef HAVE_IBUS
-+ /* This will register with cinnamon-session after calling Setenv. */
-+ set_legacy_ibus_env_vars (proxy);
-+#else
-+ register_with_gnome_session (proxy);
-+#endif
-+ }
-+}
-+
- static gboolean
- on_term_signal_pipe_closed (GIOChannel *source,
- GIOCondition condition,
-@@ -368,6 +391,16 @@ set_session_over_handler (GDBusConnectio
- {
- g_assert (bus != NULL);
-
-+ g_dbus_proxy_new (bus,
-+ G_DBUS_PROXY_FLAGS_NONE,
-+ NULL,
-+ GNOME_SESSION_DBUS_NAME,
-+ GNOME_SESSION_DBUS_OBJECT,
-+ GNOME_SESSION_DBUS_INTERFACE,
-+ NULL,
-+ (GAsyncReadyCallback) got_session_proxy,
-+ NULL);
-+
- watch_for_term_signal (manager);
- }
-
-@@ -390,56 +423,6 @@ name_lost_handler (GDBusConnection *conn
- gtk_main_quit ();
- }
-
--static gboolean
--do_register_client (gpointer user_data)
--{
-- GDBusProxy *proxy = (GDBusProxy *) user_data;
-- g_assert (proxy != NULL);
--
-- const char *startup_id = g_getenv ("DESKTOP_AUTOSTART_ID");
-- g_dbus_proxy_call (proxy,
-- "RegisterClient",
-- g_variant_new ("(ss)", "cinnamon-settings-daemon", startup_id ? startup_id : ""),
-- G_DBUS_CALL_FLAGS_NONE,
-- -1,
-- NULL,
-- (GAsyncReadyCallback) on_client_registered,
-- manager);
--
-- return FALSE;
--}
--
--static void
--queue_register_client (void)
--{
-- GDBusConnection *bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
-- if (!bus)
-- return;
--
-- GError *error = NULL;
-- GDBusProxy *proxy = g_dbus_proxy_new_sync (bus,
-- G_DBUS_PROXY_FLAGS_NONE,
-- NULL,
-- GNOME_SESSION_DBUS_NAME,
-- GNOME_SESSION_DBUS_OBJECT,
-- GNOME_SESSION_DBUS_INTERFACE,
-- NULL,
-- &error);
-- g_object_unref (bus);
--
-- if (proxy == NULL) {
-- g_debug ("Could not connect to the Session manager: %s", error->message);
-- g_error_free (error);
-- return;
-- }
--
-- /* Register the daemon with cinnamon-session */
-- g_signal_connect (G_OBJECT (proxy), "g-signal",
-- G_CALLBACK (on_session_over), NULL);
--
-- g_idle_add_full (G_PRIORITY_DEFAULT, do_register_client, proxy, NULL);
--}
--
- static void
- bus_register (void)
- {
-@@ -541,8 +524,6 @@ main (int argc, char *argv[])
-
- notify_init ("cinnamon-settings-daemon");
-
-- queue_register_client ();
--
- bus_register ();
-
- cinnamon_settings_profile_start ("cinnamon_settings_manager_new");
-diff -uNrp a/configure.ac b/configure.ac
---- a/configure.ac 2013-08-24 18:04:31.000000000 +0100
-+++ b/configure.ac 2013-08-25 16:36:02.000000000 +0100
-@@ -53,6 +53,7 @@ UPOWER_GLIB_REQUIRED_VERSION=0.9.1
- PA_REQUIRED_VERSION=0.9.16
- UPOWER_REQUIRED_VERSION=0.9.11
- GTK_XINPUT_2_3_VERSION=3.7.8
-+IBUS_REQUIRED_VERSION=1.4.2
-
- #EXTRA_COMPILE_WARNINGS(yes)
-
-@@ -199,8 +200,21 @@ dnl ------------------------------------
- dnl - Keyboard plugin stuff
- dnl ---------------------------------------------------------------------------
-
--LIBGNOMEKBD_REQUIRED=2.91.1
--PKG_CHECK_MODULES(KEYBOARD, [libgnomekbdui >= $LIBGNOMEKBD_REQUIRED libgnomekbd >= $LIBGNOMEKBD_REQUIRED libxklavier >= 5.0 kbproto])
-+AC_ARG_ENABLE(ibus,
-+ AS_HELP_STRING([--disable-ibus],
-+ [Disable IBus support]),
-+ enable_ibus=$enableval,
-+ enable_ibus=yes)
-+
-+if test "x$enable_ibus" = "xyes" ; then
-+ IBUS_MODULE="ibus-1.0 >= $IBUS_REQUIRED_VERSION"
-+ AC_DEFINE(HAVE_IBUS, 1, [Defined if IBus support is enabled])
-+else
-+ IBUS_MODULE=
-+fi
-+AM_CONDITIONAL(HAVE_IBUS, test "x$enable_ibus" == "xyes")
-+
-+PKG_CHECK_MODULES(KEYBOARD, xkbfile $IBUS_MODULE cinnamon-desktop >= $CINNAMON_DESKTOP_REQUIRED_VERSION)
-
- dnl ---------------------------------------------------------------------------
- dnl - Housekeeping plugin stuff
-diff -uNrp a/data/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml.in.in b/data/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml.in.in
---- a/data/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml.in.in 2013-08-24 18:04:31.000000000 +0100
-+++ b/data/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml.in.in 2013-08-25 16:36:02.000000000 +0100
-@@ -175,6 +175,15 @@
- <_summary>Magnifier zoom out</_summary>
- <_description>Binding for the magnifier to zoom out</_description>
- </key>
-+ <key name="switch-input-source" type="s">
-+ <default>''</default>
-+ <_summary>Switch input source</_summary>
-+ <_description>Binding to select the next input source</_description>
-+ </key>
-+ <key name="switch-input-source-backward" type="s">
-+ <default>''</default>
-+ <_summary>Switch input source backward</_summary>
-+ <_description>Binding to select the previous input source</_description>
-+ </key>
- </schema>
--
--</schemalist>
-+</schemalist>
-\ No newline at end of file
-diff -uNrp a/plugins/keyboard/csd-keyboard-manager.c b/plugins/keyboard/csd-keyboard-manager.c
---- a/plugins/keyboard/csd-keyboard-manager.c 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/csd-keyboard-manager.c 2013-08-25 16:36:02.000000000 +0100
-@@ -40,19 +40,22 @@
-
- #include <X11/XKBlib.h>
- #include <X11/keysym.h>
-+#include <X11/extensions/XKBrules.h>
-+
-+#define GNOME_DESKTOP_USE_UNSTABLE_API
-+#include <libcinnamon-desktop/gnome-xkb-info.h>
-+
-+#ifdef HAVE_IBUS
-+#include <ibus.h>
-+#endif
-
- #include "cinnamon-settings-profile.h"
- #include "csd-keyboard-manager.h"
-+#include "csd-input-helper.h"
- #include "csd-enums.h"
-
--#include "csd-keyboard-xkb.h"
--
- #define CSD_KEYBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CSD_TYPE_KEYBOARD_MANAGER, CsdKeyboardManagerPrivate))
-
--#ifndef HOST_NAME_MAX
--# define HOST_NAME_MAX 255
--#endif
--
- #define CSD_KEYBOARD_DIR "org.cinnamon.settings-daemon.peripherals.keyboard"
-
- #define KEY_REPEAT "repeat"
-@@ -60,6 +63,7 @@
- #define KEY_INTERVAL "repeat-interval"
- #define KEY_DELAY "delay"
- #define KEY_CLICK_VOLUME "click-volume"
-+#define KEY_REMEMBER_NUMLOCK_STATE "remember-numlock-state"
- #define KEY_NUMLOCK_STATE "numlock-state"
-
- #define KEY_BELL_VOLUME "bell-volume"
-@@ -67,27 +71,560 @@
- #define KEY_BELL_DURATION "bell-duration"
- #define KEY_BELL_MODE "bell-mode"
-
--#define LIBGNOMEKBD_KEYBOARD_DIR "org.gnome.libgnomekbd.keyboard"
--#define LIBGNOMEKBD_KEY_LAYOUTS "layouts"
-+#define KEY_SWITCHER "input-sources-switcher"
-+
-+#define GNOME_DESKTOP_INTERFACE_DIR "org.cinnamon.desktop.interface"
-+
-+#define KEY_GTK_IM_MODULE "gtk-im-module"
-+#define GTK_IM_MODULE_SIMPLE "gtk-im-context-simple"
-+#define GTK_IM_MODULE_IBUS "ibus"
-+
-+#define GNOME_DESKTOP_INPUT_SOURCES_DIR "org.cinnamon.desktop.input-sources"
-+
-+#define KEY_CURRENT_INPUT_SOURCE "current"
-+#define KEY_INPUT_SOURCES "sources"
-+#define KEY_KEYBOARD_OPTIONS "xkb-options"
-+
-+#define INPUT_SOURCE_TYPE_XKB "xkb"
-+#define INPUT_SOURCE_TYPE_IBUS "ibus"
-+
-+#define DEFAULT_LANGUAGE "en_US"
-
- struct CsdKeyboardManagerPrivate
- {
- guint start_idle_id;
- GSettings *settings;
-- GSettings *libgnomekbd_settings;
-- gboolean have_xkb;
-+ GSettings *input_sources_settings;
-+ GSettings *interface_settings;
-+ GnomeXkbInfo *xkb_info;
-+#ifdef HAVE_IBUS
-+ IBusBus *ibus;
-+ GHashTable *ibus_engines;
-+ GHashTable *ibus_xkb_engines;
-+ GCancellable *ibus_cancellable;
-+ gboolean session_is_fallback;
-+#endif
- gint xkb_event_base;
- CsdNumLockState old_state;
-+ GdkDeviceManager *device_manager;
-+ guint device_added_id;
-+ guint device_removed_id;
-+
-+ gboolean input_sources_switcher_spawned;
-+ GPid input_sources_switcher_pid;
- };
-
- static void csd_keyboard_manager_class_init (CsdKeyboardManagerClass *klass);
- static void csd_keyboard_manager_init (CsdKeyboardManager *keyboard_manager);
- static void csd_keyboard_manager_finalize (GObject *object);
-+static gboolean apply_input_sources_settings (GSettings *settings,
-+ gpointer keys,
-+ gint n_keys,
-+ CsdKeyboardManager *manager);
-+static void set_gtk_im_module (CsdKeyboardManager *manager,
-+ const gchar *new_module);
-
- G_DEFINE_TYPE (CsdKeyboardManager, csd_keyboard_manager, G_TYPE_OBJECT)
-
- static gpointer manager_object = NULL;
-
-+static void
-+init_builder_with_sources (GVariantBuilder *builder,
-+ GSettings *settings)
-+{
-+ const gchar *type;
-+ const gchar *id;
-+ GVariantIter iter;
-+ GVariant *sources;
-+
-+ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
-+
-+ g_variant_builder_init (builder, G_VARIANT_TYPE ("a(ss)"));
-+
-+ g_variant_iter_init (&iter, sources);
-+ while (g_variant_iter_next (&iter, "(&s&s)", &type, &id))
-+ g_variant_builder_add (builder, "(ss)", type, id);
-+
-+ g_variant_unref (sources);
-+}
-+
-+static gboolean
-+schema_is_installed (const gchar *name)
-+{
-+ const gchar * const *schemas;
-+ const gchar * const *s;
-+
-+ schemas = g_settings_list_schemas ();
-+ for (s = schemas; *s; ++s)
-+ if (g_str_equal (*s, name))
-+ return TRUE;
-+
-+ return FALSE;
-+}
-+
-+#ifdef HAVE_IBUS
-+static void
-+clear_ibus (CsdKeyboardManager *manager)
-+{
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+
-+ g_cancellable_cancel (priv->ibus_cancellable);
-+ g_clear_object (&priv->ibus_cancellable);
-+ g_clear_pointer (&priv->ibus_engines, g_hash_table_destroy);
-+ g_clear_pointer (&priv->ibus_xkb_engines, g_hash_table_destroy);
-+ g_clear_object (&priv->ibus);
-+}
-+
-+static gchar *
-+make_xkb_source_id (const gchar *engine_id)
-+{
-+ gchar *id;
-+ gchar *p;
-+ gint n_colons = 0;
-+
-+ /* engine_id is like "xkb:layout:variant:lang" where
-+ * 'variant' and 'lang' might be empty */
-+
-+ engine_id += 4;
-+
-+ for (p = (gchar *)engine_id; *p; ++p)
-+ if (*p == ':')
-+ if (++n_colons == 2)
-+ break;
-+ if (!*p)
-+ return NULL;
-+
-+ id = g_strndup (engine_id, p - engine_id + 1);
-+
-+ id[p - engine_id] = '\0';
-+
-+ /* id is "layout:variant" where 'variant' might be empty */
-+
-+ for (p = id; *p; ++p)
-+ if (*p == ':') {
-+ if (*(p + 1) == '\0')
-+ *p = '\0';
-+ else
-+ *p = '+';
-+ break;
-+ }
-+
-+ /* id is "layout+variant" or "layout" */
-+
-+ return id;
-+}
-+
-+static void
-+fetch_ibus_engines_result (GObject *object,
-+ GAsyncResult *result,
-+ CsdKeyboardManager *manager)
-+{
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+ GList *list, *l;
-+ GError *error = NULL;
-+
-+ /* engines shouldn't be there yet */
-+ g_return_if_fail (priv->ibus_engines == NULL);
-+
-+ g_clear_object (&priv->ibus_cancellable);
-+
-+ list = ibus_bus_list_engines_async_finish (priv->ibus,
-+ result,
-+ &error);
-+ if (!list && error) {
-+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-+ g_warning ("Couldn't finish IBus request: %s", error->message);
-+ g_error_free (error);
-+
-+ clear_ibus (manager);
-+ return;
-+ }
-+
-+ /* Maps IBus engine ids to engine description objects */
-+ priv->ibus_engines = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
-+ /* Maps XKB source id strings to engine description objects */
-+ priv->ibus_xkb_engines = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
-+
-+ for (l = list; l; l = l->next) {
-+ IBusEngineDesc *engine = l->data;
-+ const gchar *engine_id = ibus_engine_desc_get_name (engine);
-+
-+ g_hash_table_replace (priv->ibus_engines, (gpointer)engine_id, engine);
-+
-+ if (strncmp ("xkb:", engine_id, 4) == 0) {
-+ gchar *xkb_source_id = make_xkb_source_id (engine_id);
-+ if (xkb_source_id)
-+ g_hash_table_replace (priv->ibus_xkb_engines,
-+ xkb_source_id,
-+ engine);
-+ }
-+ }
-+ g_list_free (list);
-+
-+ apply_input_sources_settings (priv->input_sources_settings, NULL, 0, manager);
-+}
-+
-+static void
-+fetch_ibus_engines (CsdKeyboardManager *manager)
-+{
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+
-+ /* engines shouldn't be there yet */
-+ g_return_if_fail (priv->ibus_engines == NULL);
-+ g_return_if_fail (priv->ibus_cancellable == NULL);
-+
-+ priv->ibus_cancellable = g_cancellable_new ();
-+
-+ ibus_bus_list_engines_async (priv->ibus,
-+ -1,
-+ priv->ibus_cancellable,
-+ (GAsyncReadyCallback)fetch_ibus_engines_result,
-+ manager);
-+}
-+
-+static void
-+maybe_start_ibus (CsdKeyboardManager *manager,
-+ GVariant *sources)
-+{
-+ gboolean need_ibus = FALSE;
-+ GVariantIter iter;
-+ const gchar *type;
-+
-+ if (manager->priv->session_is_fallback)
-+ return;
-+
-+ g_variant_iter_init (&iter, sources);
-+ while (g_variant_iter_next (&iter, "(&s&s)", &type, NULL))
-+ if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS)) {
-+ need_ibus = TRUE;
-+ break;
-+ }
-+
-+ if (!need_ibus)
-+ return;
-+
-+ if (!manager->priv->ibus) {
-+ ibus_init ();
-+ manager->priv->ibus = ibus_bus_new ();
-+ g_signal_connect_swapped (manager->priv->ibus, "connected",
-+ G_CALLBACK (fetch_ibus_engines), manager);
-+ g_signal_connect_swapped (manager->priv->ibus, "disconnected",
-+ G_CALLBACK (clear_ibus), manager);
-+ }
-+ /* IBus doesn't export API in the session bus. The only thing
-+ * we have there is a well known name which we can use as a
-+ * sure-fire way to activate it. */
-+ g_bus_unwatch_name (g_bus_watch_name (G_BUS_TYPE_SESSION,
-+ IBUS_SERVICE_IBUS,
-+ G_BUS_NAME_WATCHER_FLAGS_AUTO_START,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL));
-+}
-+
-+static void
-+got_session_name (GObject *object,
-+ GAsyncResult *res,
-+ CsdKeyboardManager *manager)
-+{
-+ GVariant *result, *variant;
-+ GDBusConnection *connection = G_DBUS_CONNECTION (object);
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+ const gchar *session_name = NULL;
-+ GError *error = NULL;
-+
-+ /* IBus shouldn't have been touched yet */
-+ g_return_if_fail (priv->ibus == NULL);
-+
-+ g_clear_object (&priv->ibus_cancellable);
-+
-+ result = g_dbus_connection_call_finish (connection, res, &error);
-+ if (!result) {
-+ g_warning ("Couldn't get session name: %s", error->message);
-+ g_error_free (error);
-+ goto out;
-+ }
-+
-+ g_variant_get (result, "(v)", &variant);
-+ g_variant_unref (result);
-+
-+ g_variant_get (variant, "&s", &session_name);
-+
-+ if (g_strcmp0 (session_name, "gnome") == 0)
-+ manager->priv->session_is_fallback = FALSE;
-+
-+ g_variant_unref (variant);
-+ out:
-+ apply_input_sources_settings (manager->priv->input_sources_settings, NULL, 0, manager);
-+ g_object_unref (connection);
-+}
-+
-+static void
-+got_bus (GObject *object,
-+ GAsyncResult *res,
-+ CsdKeyboardManager *manager)
-+{
-+ GDBusConnection *connection;
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+ GError *error = NULL;
-+
-+ /* IBus shouldn't have been touched yet */
-+ g_return_if_fail (priv->ibus == NULL);
-+
-+ g_clear_object (&priv->ibus_cancellable);
-+
-+ connection = g_bus_get_finish (res, &error);
-+ if (!connection) {
-+ g_warning ("Couldn't get session bus: %s", error->message);
-+ g_error_free (error);
-+ apply_input_sources_settings (priv->input_sources_settings, NULL, 0, manager);
-+ return;
-+ }
-+
-+ priv->ibus_cancellable = g_cancellable_new ();
-+
-+ g_dbus_connection_call (connection,
-+ "org.gnome.SessionManager",
-+ "/org/gnome/SessionManager",
-+ "org.freedesktop.DBus.Properties",
-+ "Get",
-+ g_variant_new ("(ss)",
-+ "org.gnome.SessionManager",
-+ "SessionName"),
-+ NULL,
-+ G_DBUS_CALL_FLAGS_NONE,
-+ -1,
-+ priv->ibus_cancellable,
-+ (GAsyncReadyCallback)got_session_name,
-+ manager);
-+}
-+
-+static void
-+set_ibus_engine_finish (GObject *object,
-+ GAsyncResult *res,
-+ CsdKeyboardManager *manager)
-+{
-+ gboolean result;
-+ IBusBus *ibus = IBUS_BUS (object);
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+ GError *error = NULL;
-+
-+ g_clear_object (&priv->ibus_cancellable);
-+
-+ result = ibus_bus_set_global_engine_async_finish (ibus, res, &error);
-+ if (!result) {
-+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-+ g_warning ("Couldn't set IBus engine: %s", error->message);
-+ g_error_free (error);
-+ }
-+}
-+
-+static void
-+set_ibus_engine (CsdKeyboardManager *manager,
-+ const gchar *engine_id)
-+{
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+
-+ g_return_if_fail (priv->ibus != NULL);
-+ g_return_if_fail (priv->ibus_engines != NULL);
-+
-+ g_cancellable_cancel (priv->ibus_cancellable);
-+ g_clear_object (&priv->ibus_cancellable);
-+ priv->ibus_cancellable = g_cancellable_new ();
-+
-+ ibus_bus_set_global_engine_async (priv->ibus,
-+ engine_id,
-+ -1,
-+ priv->ibus_cancellable,
-+ (GAsyncReadyCallback)set_ibus_engine_finish,
-+ manager);
-+}
-+
-+static void
-+set_ibus_xkb_engine (CsdKeyboardManager *manager,
-+ const gchar *xkb_id)
-+{
-+ IBusEngineDesc *engine;
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+
-+ if (!priv->ibus_xkb_engines)
-+ return;
-+
-+ engine = g_hash_table_lookup (priv->ibus_xkb_engines, xkb_id);
-+ if (!engine)
-+ return;
-+
-+ set_ibus_engine (manager, ibus_engine_desc_get_name (engine));
-+}
-+
-+/* XXX: See upstream bug:
-+ * https://codereview.appspot.com/6586075/ */
-+static gchar *
-+layout_from_ibus_layout (const gchar *ibus_layout)
-+{
-+ const gchar *p;
-+
-+ /* we get something like "layout(variant)[option1,option2]" */
-+
-+ p = ibus_layout;
-+ while (*p) {
-+ if (*p == '(' || *p == '[')
-+ break;
-+ p += 1;
-+ }
-+
-+ return g_strndup (ibus_layout, p - ibus_layout);
-+}
-+
-+static gchar *
-+variant_from_ibus_layout (const gchar *ibus_layout)
-+{
-+ const gchar *a, *b;
-+
-+ /* we get something like "layout(variant)[option1,option2]" */
-+
-+ a = ibus_layout;
-+ while (*a) {
-+ if (*a == '(')
-+ break;
-+ a += 1;
-+ }
-+ if (!*a)
-+ return NULL;
-+
-+ a += 1;
-+ b = a;
-+ while (*b) {
-+ if (*b == ')')
-+ break;
-+ b += 1;
-+ }
-+ if (!*b)
-+ return NULL;
-+
-+ return g_strndup (a, b - a);
-+}
-+
-+static gchar **
-+options_from_ibus_layout (const gchar *ibus_layout)
-+{
-+ const gchar *a, *b;
-+ GPtrArray *opt_array;
-+
-+ /* we get something like "layout(variant)[option1,option2]" */
-+
-+ a = ibus_layout;
-+ while (*a) {
-+ if (*a == '[')
-+ break;
-+ a += 1;
-+ }
-+ if (!*a)
-+ return NULL;
-+
-+ opt_array = g_ptr_array_new ();
-+
-+ do {
-+ a += 1;
-+ b = a;
-+ while (*b) {
-+ if (*b == ',' || *b == ']')
-+ break;
-+ b += 1;
-+ }
-+ if (!*b)
-+ goto out;
-+
-+ g_ptr_array_add (opt_array, g_strndup (a, b - a));
-+
-+ a = b;
-+ } while (*a && *a == ',');
-+
-+out:
-+ g_ptr_array_add (opt_array, NULL);
-+ return (gchar **) g_ptr_array_free (opt_array, FALSE);
-+}
-+
-+static const gchar *
-+engine_from_locale (void)
-+{
-+ const gchar *locale;
-+ const gchar *locale_engine[][2] = {
-+ { "as_IN", "m17n:as:phonetic" },
-+ { "bn_IN", "m17n:bn:inscript" },
-+ { "gu_IN", "m17n:gu:inscript" },
-+ { "hi_IN", "m17n:hi:inscript" },
-+ { "ja_JP", "anthy" },
-+ { "kn_IN", "m17n:kn:kgp" },
-+ { "ko_KR", "hangul" },
-+ { "mai_IN", "m17n:mai:inscript" },
-+ { "ml_IN", "m17n:ml:inscript" },
-+ { "mr_IN", "m17n:mr:inscript" },
-+ { "or_IN", "m17n:or:inscript" },
-+ { "pa_IN", "m17n:pa:inscript" },
-+ { "sd_IN", "m17n:sd:inscript" },
-+ { "ta_IN", "m17n:ta:tamil99" },
-+ { "te_IN", "m17n:te:inscript" },
-+ { "zh_CN", "pinyin" },
-+ { "zh_HK", "cangjie3" },
-+ { "zh_TW", "chewing" },
-+ };
-+ gint i;
-+
-+ locale = setlocale (LC_CTYPE, NULL);
-+ if (!locale)
-+ return NULL;
-+
-+ for (i = 0; i < G_N_ELEMENTS (locale_engine); ++i)
-+ if (g_str_has_prefix (locale, locale_engine[i][0]))
-+ return locale_engine[i][1];
-+
-+ return NULL;
-+}
-+
-+static void
-+add_ibus_sources_from_locale (GSettings *settings)
-+{
-+ const gchar *locale_engine;
-+ GVariantBuilder builder;
-+
-+ locale_engine = engine_from_locale ();
-+ if (!locale_engine)
-+ return;
-+
-+ init_builder_with_sources (&builder, settings);
-+ g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_IBUS, locale_engine);
-+ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
-+}
-+
-+static void
-+convert_ibus (GSettings *settings)
-+{
-+ GVariantBuilder builder;
-+ GSettings *ibus_settings;
-+ gchar **engines, **e;
-+
-+ if (!schema_is_installed ("org.freedesktop.ibus.general"))
-+ return;
-+
-+ init_builder_with_sources (&builder, settings);
-+
-+ ibus_settings = g_settings_new ("org.freedesktop.ibus.general");
-+ engines = g_settings_get_strv (ibus_settings, "preload-engines");
-+ for (e = engines; *e; ++e) {
-+ if (g_str_has_prefix (*e, "xkb:"))
-+ continue;
-+ g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_IBUS, *e);
-+ }
-+
-+ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
-+
-+ g_strfreev (engines);
-+ g_object_unref (ibus_settings);
-+}
-+#endif /* HAVE_IBUS */
-+
- static gboolean
- xkb_set_keyboard_autorepeat_rate (guint delay, guint interval)
- {
-@@ -97,32 +634,33 @@ xkb_set_keyboard_autorepeat_rate (guint
- interval);
- }
-
--static void
--numlock_xkb_init (CsdKeyboardManager *manager)
-+static gboolean
-+check_xkb_extension (CsdKeyboardManager *manager)
- {
- Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-- gboolean have_xkb;
- int opcode, error_base, major, minor;
-+ gboolean have_xkb;
-
- have_xkb = XkbQueryExtension (dpy,
- &opcode,
- &manager->priv->xkb_event_base,
- &error_base,
- &major,
-- &minor)
-- && XkbUseExtension (dpy, &major, &minor);
-+ &minor);
-+ return have_xkb;
-+}
-
-- if (have_xkb) {
-- XkbSelectEventDetails (dpy,
-- XkbUseCoreKbd,
-- XkbStateNotifyMask,
-- XkbModifierLockMask,
-- XkbModifierLockMask);
-- } else {
-- g_warning ("XKB extension not available");
-- }
-+static void
-+xkb_init (CsdKeyboardManager *manager)
-+{
-+ Display *dpy;
-
-- manager->priv->have_xkb = have_xkb;
-+ dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-+ XkbSelectEventDetails (dpy,
-+ XkbUseCoreKbd,
-+ XkbStateNotify,
-+ XkbModifierLockMask,
-+ XkbModifierLockMask);
- }
-
- static unsigned
-@@ -143,19 +681,32 @@ numlock_set_xkb_state (CsdNumLockState n
- XkbLockModifiers (dpy, XkbUseCoreKbd, num_mask, new_state == CSD_NUM_LOCK_STATE_ON ? num_mask : 0);
- }
-
-+static const char *
-+num_lock_state_to_string (CsdNumLockState numlock_state)
-+{
-+ switch (numlock_state) {
-+ case CSD_NUM_LOCK_STATE_UNKNOWN:
-+ return "CSD_NUM_LOCK_STATE_UNKNOWN";
-+ case CSD_NUM_LOCK_STATE_ON:
-+ return "CSD_NUM_LOCK_STATE_ON";
-+ case CSD_NUM_LOCK_STATE_OFF:
-+ return "CSD_NUM_LOCK_STATE_OFF";
-+ default:
-+ return "UNKNOWN";
-+ }
-+}
-+
- static GdkFilterReturn
--numlock_xkb_callback (GdkXEvent *xev_,
-- GdkEvent *gdkev_,
-- gpointer user_data)
-+xkb_events_filter (GdkXEvent *xev_,
-+ GdkEvent *gdkev_,
-+ gpointer user_data)
- {
- XEvent *xev = (XEvent *) xev_;
- XkbEvent *xkbev = (XkbEvent *) xev;
- CsdKeyboardManager *manager = (CsdKeyboardManager *) user_data;
-
-- if (xev->type != manager->priv->xkb_event_base)
-- return GDK_FILTER_CONTINUE;
--
-- if (xkbev->any.xkb_type != XkbStateNotify)
-+ if (xev->type != manager->priv->xkb_event_base ||
-+ xkbev->any.xkb_type != XkbStateNotify)
- return GDK_FILTER_CONTINUE;
-
- if (xkbev->state.changed & XkbModifierLockMask) {
-@@ -166,6 +717,9 @@ numlock_xkb_callback (GdkXEvent *xev_,
- numlock_state = (num_mask & locked_mods) ? CSD_NUM_LOCK_STATE_ON : CSD_NUM_LOCK_STATE_OFF;
-
- if (numlock_state != manager->priv->old_state) {
-+ g_debug ("New num-lock state '%s' != Old num-lock state '%s'",
-+ num_lock_state_to_string (numlock_state),
-+ num_lock_state_to_string (manager->priv->old_state));
- g_settings_set_enum (manager->priv->settings,
- KEY_NUMLOCK_STATE,
- numlock_state);
-@@ -177,57 +731,509 @@ numlock_xkb_callback (GdkXEvent *xev_,
- }
-
- static void
--numlock_install_xkb_callback (CsdKeyboardManager *manager)
-+install_xkb_filter (CsdKeyboardManager *manager)
- {
-- if (!manager->priv->have_xkb)
-- return;
--
- gdk_window_add_filter (NULL,
-- numlock_xkb_callback,
-+ xkb_events_filter,
- manager);
- }
-
--static guint
--_csd_settings_get_uint (GSettings *settings,
-- const char *key)
-+static void
-+remove_xkb_filter (CsdKeyboardManager *manager)
- {
-- guint value;
-+ gdk_window_remove_filter (NULL,
-+ xkb_events_filter,
-+ manager);
-+}
-
-- g_settings_get (settings, key, "u", &value);
-- return value;
-+static void
-+free_xkb_component_names (XkbComponentNamesRec *p)
-+{
-+ g_return_if_fail (p != NULL);
-+
-+ free (p->keymap);
-+ free (p->keycodes);
-+ free (p->types);
-+ free (p->compat);
-+ free (p->symbols);
-+ free (p->geometry);
-+
-+ g_free (p);
-+}
-+
-+static void
-+upload_xkb_description (const gchar *rules_file_path,
-+ XkbRF_VarDefsRec *var_defs,
-+ XkbComponentNamesRec *comp_names)
-+{
-+ Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-+ XkbDescRec *xkb_desc;
-+ gchar *rules_file;
-+
-+ /* Upload it to the X server using the same method as setxkbmap */
-+ xkb_desc = XkbGetKeyboardByName (display,
-+ XkbUseCoreKbd,
-+ comp_names,
-+ XkbGBN_AllComponentsMask,
-+ XkbGBN_AllComponentsMask &
-+ (~XkbGBN_GeometryMask), True);
-+ if (!xkb_desc) {
-+ g_warning ("Couldn't upload new XKB keyboard description");
-+ return;
-+ }
-+
-+ XkbFreeKeyboard (xkb_desc, 0, True);
-+
-+ rules_file = g_path_get_basename (rules_file_path);
-+
-+ if (!XkbRF_SetNamesProp (display, rules_file, var_defs))
-+ g_warning ("Couldn't update the XKB root window property");
-+
-+ g_free (rules_file);
-+}
-+
-+static gchar *
-+language_code_from_locale (const gchar *locale)
-+{
-+ if (!locale || !locale[0] || !locale[1])
-+ return NULL;
-+
-+ if (!locale[2] || locale[2] == '_' || locale[2] == '.')
-+ return g_strndup (locale, 2);
-+
-+ if (!locale[3] || locale[3] == '_' || locale[3] == '.')
-+ return g_strndup (locale, 3);
-+
-+ return NULL;
-+}
-+
-+static gchar *
-+build_xkb_group_string (const gchar *user,
-+ const gchar *locale,
-+ const gchar *latin)
-+{
-+ gchar *string;
-+ gsize length = 0;
-+ guint commas = 2;
-+
-+ if (latin)
-+ length += strlen (latin);
-+ else
-+ commas -= 1;
-+
-+ if (locale)
-+ length += strlen (locale);
-+ else
-+ commas -= 1;
-+
-+ length += strlen (user) + commas + 1;
-+
-+ string = malloc (length);
-+
-+ if (locale && latin)
-+ sprintf (string, "%s,%s,%s", user, locale, latin);
-+ else if (locale)
-+ sprintf (string, "%s,%s", user, locale);
-+ else if (latin)
-+ sprintf (string, "%s,%s", user, latin);
-+ else
-+ sprintf (string, "%s", user);
-+
-+ return string;
-+}
-+
-+static gboolean
-+layout_equal (const gchar *layout_a,
-+ const gchar *variant_a,
-+ const gchar *layout_b,
-+ const gchar *variant_b)
-+{
-+ return !g_strcmp0 (layout_a, layout_b) && !g_strcmp0 (variant_a, variant_b);
- }
-
- static void
--apply_settings (GSettings *settings,
-- const char *key,
-- CsdKeyboardManager *manager)
-+replace_layout_and_variant (CsdKeyboardManager *manager,
-+ XkbRF_VarDefsRec *xkb_var_defs,
-+ const gchar *layout,
-+ const gchar *variant)
- {
-+ /* Toolkits need to know about both a latin layout to handle
-+ * accelerators which are usually defined like Ctrl+C and a
-+ * layout with the symbols for the language used in UI strings
-+ * to handle mnemonics like Alt+Ф, so we try to find and add
-+ * them in XKB group slots after the layout which the user
-+ * actually intends to type with. */
-+ const gchar *latin_layout = "us";
-+ const gchar *latin_variant = "";
-+ const gchar *locale_layout = NULL;
-+ const gchar *locale_variant = NULL;
-+ const gchar *locale;
-+ gchar *language;
-+
-+ if (!layout)
-+ return;
-+
-+ if (!variant)
-+ variant = "";
-+
-+ locale = setlocale (LC_MESSAGES, NULL);
-+ /* If LANG is empty, default to en_US */
-+ if (!locale)
-+ language = g_strdup (DEFAULT_LANGUAGE);
-+ else
-+ language = language_code_from_locale (locale);
-+
-+ if (!language)
-+ language = language_code_from_locale (DEFAULT_LANGUAGE);
-+
-+ gnome_xkb_info_get_layout_info_for_language (manager->priv->xkb_info,
-+ language,
-+ NULL,
-+ NULL,
-+ NULL,
-+ &locale_layout,
-+ &locale_variant);
-+ g_free (language);
-+
-+ /* We want to minimize the number of XKB groups if we have
-+ * duplicated layout+variant pairs.
-+ *
-+ * Also, if a layout doesn't have a variant we still have to
-+ * include it in the variants string because the number of
-+ * variants must agree with the number of layouts. For
-+ * instance:
-+ *
-+ * layouts: "us,ru,us"
-+ * variants: "dvorak,,"
-+ */
-+ if (layout_equal (latin_layout, latin_variant, locale_layout, locale_variant) ||
-+ layout_equal (latin_layout, latin_variant, layout, variant)) {
-+ latin_layout = NULL;
-+ latin_variant = NULL;
-+ }
-+
-+ if (layout_equal (locale_layout, locale_variant, layout, variant)) {
-+ locale_layout = NULL;
-+ locale_variant = NULL;
-+ }
-+
-+ free (xkb_var_defs->layout);
-+ xkb_var_defs->layout = build_xkb_group_string (layout, locale_layout, latin_layout);
-+
-+ free (xkb_var_defs->variant);
-+ xkb_var_defs->variant = build_xkb_group_string (variant, locale_variant, latin_variant);
-+}
-+
-+static gchar *
-+build_xkb_options_string (gchar **options)
-+{
-+ gchar *string;
-+
-+ if (*options) {
-+ gint i;
-+ gsize len;
-+ gchar *ptr;
-+
-+ /* First part, getting length */
-+ len = 1 + strlen (options[0]);
-+ for (i = 1; options[i] != NULL; i++)
-+ len += strlen (options[i]);
-+ len += (i - 1); /* commas */
-+
-+ /* Second part, building string */
-+ string = malloc (len);
-+ ptr = g_stpcpy (string, *options);
-+ for (i = 1; options[i] != NULL; i++) {
-+ ptr = g_stpcpy (ptr, ",");
-+ ptr = g_stpcpy (ptr, options[i]);
-+ }
-+ } else {
-+ string = malloc (1);
-+ *string = '\0';
-+ }
-+
-+ return string;
-+}
-+
-+static gchar **
-+append_options (gchar **a,
-+ gchar **b)
-+{
-+ gchar **c, **p;
-+
-+ if (!a && !b)
-+ return NULL;
-+ else if (!a)
-+ return g_strdupv (b);
-+ else if (!b)
-+ return g_strdupv (a);
-+
-+ c = g_new0 (gchar *, g_strv_length (a) + g_strv_length (b) + 1);
-+ p = c;
-+
-+ while (*a) {
-+ *p = g_strdup (*a);
-+ p += 1;
-+ a += 1;
-+ }
-+ while (*b) {
-+ *p = g_strdup (*b);
-+ p += 1;
-+ b += 1;
-+ }
-+
-+ return c;
-+}
-+
-+static void
-+add_xkb_options (CsdKeyboardManager *manager,
-+ XkbRF_VarDefsRec *xkb_var_defs,
-+ gchar **extra_options)
-+{
-+ gchar **options;
-+ gchar **settings_options;
-+
-+ settings_options = g_settings_get_strv (manager->priv->input_sources_settings,
-+ KEY_KEYBOARD_OPTIONS);
-+ options = append_options (settings_options, extra_options);
-+ g_strfreev (settings_options);
-+
-+ free (xkb_var_defs->options);
-+ xkb_var_defs->options = build_xkb_options_string (options);
-+
-+ g_strfreev (options);
-+}
-+
-+static void
-+apply_xkb_settings (CsdKeyboardManager *manager,
-+ const gchar *layout,
-+ const gchar *variant,
-+ gchar **options)
-+{
-+ XkbRF_RulesRec *xkb_rules;
-+ XkbRF_VarDefsRec *xkb_var_defs;
-+ gchar *rules_file_path;
-+
-+ gnome_xkb_info_get_var_defs (&rules_file_path, &xkb_var_defs);
-+
-+ add_xkb_options (manager, xkb_var_defs, options);
-+ replace_layout_and_variant (manager, xkb_var_defs, layout, variant);
-+
-+ gdk_error_trap_push ();
-+
-+ xkb_rules = XkbRF_Load (rules_file_path, NULL, True, True);
-+ if (xkb_rules) {
-+ XkbComponentNamesRec *xkb_comp_names;
-+ xkb_comp_names = g_new0 (XkbComponentNamesRec, 1);
-+
-+ XkbRF_GetComponents (xkb_rules, xkb_var_defs, xkb_comp_names);
-+ upload_xkb_description (rules_file_path, xkb_var_defs, xkb_comp_names);
-+
-+ free_xkb_component_names (xkb_comp_names);
-+ XkbRF_Free (xkb_rules, True);
-+ } else {
-+ g_warning ("Couldn't load XKB rules");
-+ }
-+
-+ if (gdk_error_trap_pop ())
-+ g_warning ("Error loading XKB rules");
-+
-+ gnome_xkb_info_free_var_defs (xkb_var_defs);
-+ g_free (rules_file_path);
-+}
-+
-+static void
-+set_gtk_im_module (CsdKeyboardManager *manager,
-+ const gchar *new_module)
-+{
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+ gchar *current_module;
-+
-+ current_module = g_settings_get_string (priv->interface_settings,
-+ KEY_GTK_IM_MODULE);
-+ if (!g_str_equal (current_module, new_module))
-+ g_settings_set_string (priv->interface_settings,
-+ KEY_GTK_IM_MODULE,
-+ new_module);
-+ g_free (current_module);
-+}
-+
-+static gboolean
-+apply_input_sources_settings (GSettings *settings,
-+ gpointer keys,
-+ gint n_keys,
-+ CsdKeyboardManager *manager)
-+{
-+ CsdKeyboardManagerPrivate *priv = manager->priv;
-+ GVariant *sources;
-+ guint current;
-+ guint n_sources;
-+ const gchar *type = NULL;
-+ const gchar *id = NULL;
-+ gchar *layout = NULL;
-+ gchar *variant = NULL;
-+ gchar **options = NULL;
-+
-+ sources = g_settings_get_value (priv->input_sources_settings, KEY_INPUT_SOURCES);
-+ current = g_settings_get_uint (priv->input_sources_settings, KEY_CURRENT_INPUT_SOURCE);
-+ n_sources = g_variant_n_children (sources);
-+
-+ if (n_sources < 1)
-+ goto exit;
-+
-+ if (current >= n_sources) {
-+ g_settings_set_uint (priv->input_sources_settings,
-+ KEY_CURRENT_INPUT_SOURCE,
-+ n_sources - 1);
-+ goto exit;
-+ }
-+
-+#ifdef HAVE_IBUS
-+ maybe_start_ibus (manager, sources);
-+#endif
-+
-+ g_variant_get_child (sources, current, "(&s&s)", &type, &id);
-+
-+ if (g_str_equal (type, INPUT_SOURCE_TYPE_XKB)) {
-+ const gchar *l, *v;
-+ gnome_xkb_info_get_layout_info (priv->xkb_info, id, NULL, NULL, &l, &v);
-+
-+ layout = g_strdup (l);
-+ variant = g_strdup (v);
-+
-+ if (!layout || !layout[0]) {
-+ g_warning ("Couldn't find XKB input source '%s'", id);
-+ goto exit;
-+ }
-+ set_gtk_im_module (manager, GTK_IM_MODULE_SIMPLE);
-+#ifdef HAVE_IBUS
-+ set_ibus_xkb_engine (manager, id);
-+#endif
-+ } else if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS)) {
-+#ifdef HAVE_IBUS
-+ IBusEngineDesc *engine_desc = NULL;
-+
-+ if (priv->session_is_fallback)
-+ goto exit;
-+
-+ if (priv->ibus_engines)
-+ engine_desc = g_hash_table_lookup (priv->ibus_engines, id);
-+ else
-+ goto exit; /* we'll be called again when ibus is up and running */
-+
-+ if (engine_desc) {
-+ const gchar *ibus_layout;
-+ ibus_layout = ibus_engine_desc_get_layout (engine_desc);
-+
-+ if (ibus_layout) {
-+ layout = layout_from_ibus_layout (ibus_layout);
-+ variant = variant_from_ibus_layout (ibus_layout);
-+ options = options_from_ibus_layout (ibus_layout);
-+ }
-+ } else {
-+ g_warning ("Couldn't find IBus input source '%s'", id);
-+ goto exit;
-+ }
-+
-+ set_gtk_im_module (manager, GTK_IM_MODULE_IBUS);
-+ set_ibus_engine (manager, id);
-+#else
-+ g_warning ("IBus input source type specified but IBus support was not compiled");
-+#endif
-+ } else {
-+ g_warning ("Unknown input source type '%s'", type);
-+ }
-+
-+ exit:
-+ apply_xkb_settings (manager, layout, variant, options);
-+ g_variant_unref (sources);
-+ g_free (layout);
-+ g_free (variant);
-+ g_strfreev (options);
-+ /* Prevent individual "changed" signal invocations since we
-+ don't need them. */
-+ return TRUE;
-+}
-+
-+static void
-+apply_bell (CsdKeyboardManager *manager)
-+{
-+ GSettings *settings;
- XKeyboardControl kbdcontrol;
-- gboolean repeat;
- gboolean click;
-- guint interval;
-- guint delay;
-- int click_volume;
- int bell_volume;
- int bell_pitch;
- int bell_duration;
- CsdBellMode bell_mode;
-- gboolean rnumlock;
--
-- if (g_strcmp0 (key, KEY_NUMLOCK_STATE) == 0)
-- return;
-+ int click_volume;
-
-- repeat = g_settings_get_boolean (settings, KEY_REPEAT);
-+ g_debug ("Applying the bell settings");
-+ settings = manager->priv->settings;
- click = g_settings_get_boolean (settings, KEY_CLICK);
-- interval = _csd_settings_get_uint (settings, KEY_INTERVAL);
-- delay = _csd_settings_get_uint (settings, KEY_DELAY);
- click_volume = g_settings_get_int (settings, KEY_CLICK_VOLUME);
-+
- bell_pitch = g_settings_get_int (settings, KEY_BELL_PITCH);
- bell_duration = g_settings_get_int (settings, KEY_BELL_DURATION);
-
- bell_mode = g_settings_get_enum (settings, KEY_BELL_MODE);
- bell_volume = (bell_mode == CSD_BELL_MODE_ON) ? 50 : 0;
-
-+ /* as percentage from 0..100 inclusive */
-+ if (click_volume < 0) {
-+ click_volume = 0;
-+ } else if (click_volume > 100) {
-+ click_volume = 100;
-+ }
-+ kbdcontrol.key_click_percent = click ? click_volume : 0;
-+ kbdcontrol.bell_percent = bell_volume;
-+ kbdcontrol.bell_pitch = bell_pitch;
-+ kbdcontrol.bell_duration = bell_duration;
-+
-+ gdk_error_trap_push ();
-+ XChangeKeyboardControl (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
-+ KBKeyClickPercent | KBBellPercent | KBBellPitch | KBBellDuration,
-+ &kbdcontrol);
-+
-+ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
-+ gdk_error_trap_pop_ignored ();
-+}
-+
-+static void
-+apply_numlock (CsdKeyboardManager *manager)
-+{
-+ GSettings *settings;
-+ gboolean rnumlock;
-+
-+ g_debug ("Applying the num-lock settings");
-+ settings = manager->priv->settings;
-+ rnumlock = g_settings_get_boolean (settings, KEY_REMEMBER_NUMLOCK_STATE);
-+ manager->priv->old_state = g_settings_get_enum (manager->priv->settings, KEY_NUMLOCK_STATE);
-+
-+ gdk_error_trap_push ();
-+ if (rnumlock) {
-+ g_debug ("Remember num-lock is set, so applying setting '%s'",
-+ num_lock_state_to_string (manager->priv->old_state));
-+ numlock_set_xkb_state (manager->priv->old_state);
-+ }
-+
-+ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
-+ gdk_error_trap_pop_ignored ();
-+}
-+
-+static void
-+apply_repeat (CsdKeyboardManager *manager)
-+{
-+ GSettings *settings;
-+ gboolean repeat;
-+ guint interval;
-+ guint delay;
-+
-+ g_debug ("Applying the repeat settings");
-+ settings = manager->priv->settings;
-+ repeat = g_settings_get_boolean (settings, KEY_REPEAT);
-+ interval = g_settings_get_uint (settings, KEY_INTERVAL);
-+ delay = g_settings_get_uint (settings, KEY_DELAY);
-+
- gdk_error_trap_push ();
- if (repeat) {
- gboolean rate_set = FALSE;
-@@ -243,124 +1249,319 @@ apply_settings (GSettings *sett
- XAutoRepeatOff (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
- }
-
-- /* as percentage from 0..100 inclusive */
-- if (click_volume < 0) {
-- click_volume = 0;
-- } else if (click_volume > 100) {
-- click_volume = 100;
-+ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
-+ gdk_error_trap_pop_ignored ();
-+}
-+
-+static void
-+apply_all_settings (CsdKeyboardManager *manager)
-+{
-+ apply_repeat (manager);
-+ apply_bell (manager);
-+ apply_numlock (manager);
-+}
-+
-+static void
-+set_input_sources_switcher (CsdKeyboardManager *manager,
-+ gboolean state)
-+{
-+ if (state) {
-+ GError *error = NULL;
-+ char *args[2];
-+
-+ if (manager->priv->input_sources_switcher_spawned)
-+ set_input_sources_switcher (manager, FALSE);
-+
-+ args[0] = LIBEXECDIR "/csd-input-sources-switcher";
-+ args[1] = NULL;
-+
-+ g_spawn_async (NULL, args, NULL,
-+ 0, NULL, NULL,
-+ &manager->priv->input_sources_switcher_pid, &error);
-+
-+ manager->priv->input_sources_switcher_spawned = (error == NULL);
-+
-+ if (error) {
-+ g_warning ("Couldn't spawn %s: %s", args[0], error->message);
-+ g_error_free (error);
-+ }
-+ } else if (manager->priv->input_sources_switcher_spawned) {
-+ kill (manager->priv->input_sources_switcher_pid, SIGHUP);
-+ g_spawn_close_pid (manager->priv->input_sources_switcher_pid);
-+ manager->priv->input_sources_switcher_spawned = FALSE;
- }
-- kbdcontrol.key_click_percent = click ? click_volume : 0;
-- kbdcontrol.bell_percent = bell_volume;
-- kbdcontrol.bell_pitch = bell_pitch;
-- kbdcontrol.bell_duration = bell_duration;
-- XChangeKeyboardControl (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
-- KBKeyClickPercent | KBBellPercent | KBBellPitch | KBBellDuration,
-- &kbdcontrol);
-+}
-
-- if (g_strcmp0 (key, "remember-numlock-state") == 0 || key == NULL) {
-- rnumlock = g_settings_get_boolean (settings, "remember-numlock-state");
-+static gboolean
-+enable_switcher (CsdKeyboardManager *manager)
-+{
-+ CsdInputSourcesSwitcher switcher;
-
-- manager->priv->old_state = g_settings_get_enum (manager->priv->settings, KEY_NUMLOCK_STATE);
-+ switcher = g_settings_get_enum (manager->priv->settings, KEY_SWITCHER);
-
-- if (manager->priv->have_xkb && rnumlock)
-- numlock_set_xkb_state (manager->priv->old_state);
-+ return switcher != CSD_INPUT_SOURCES_SWITCHER_OFF;
-+}
-+
-+static void
-+settings_changed (GSettings *settings,
-+ const char *key,
-+ CsdKeyboardManager *manager)
-+{
-+ if (g_strcmp0 (key, KEY_CLICK) == 0||
-+ g_strcmp0 (key, KEY_CLICK_VOLUME) == 0 ||
-+ g_strcmp0 (key, KEY_BELL_PITCH) == 0 ||
-+ g_strcmp0 (key, KEY_BELL_DURATION) == 0 ||
-+ g_strcmp0 (key, KEY_BELL_MODE) == 0) {
-+ g_debug ("Bell setting '%s' changed, applying bell settings", key);
-+ apply_bell (manager);
-+ } else if (g_strcmp0 (key, KEY_REMEMBER_NUMLOCK_STATE) == 0) {
-+ g_debug ("Remember Num-Lock state '%s' changed, applying num-lock settings", key);
-+ apply_numlock (manager);
-+ } else if (g_strcmp0 (key, KEY_NUMLOCK_STATE) == 0) {
-+ g_debug ("Num-Lock state '%s' changed, will apply at next startup", key);
-+ } else if (g_strcmp0 (key, KEY_REPEAT) == 0 ||
-+ g_strcmp0 (key, KEY_INTERVAL) == 0 ||
-+ g_strcmp0 (key, KEY_DELAY) == 0) {
-+ g_debug ("Key repeat setting '%s' changed, applying key repeat settings", key);
-+ apply_repeat (manager);
-+ } else if (g_strcmp0 (key, KEY_SWITCHER) == 0) {
-+ set_input_sources_switcher (manager, enable_switcher (manager));
-+ } else {
-+ g_warning ("Unhandled settings change, key '%s'", key);
- }
-
-- XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
-- gdk_error_trap_pop_ignored ();
- }
-
--void
--csd_keyboard_manager_apply_settings (CsdKeyboardManager *manager)
-+static void
-+device_added_cb (GdkDeviceManager *device_manager,
-+ GdkDevice *device,
-+ CsdKeyboardManager *manager)
- {
-- apply_settings (manager->priv->settings, NULL, manager);
-+ GdkInputSource source;
-+
-+ source = gdk_device_get_source (device);
-+ if (source == GDK_SOURCE_KEYBOARD) {
-+ g_debug ("New keyboard plugged in, applying all settings");
-+ apply_all_settings (manager);
-+ apply_input_sources_settings (manager->priv->input_sources_settings, NULL, 0, manager);
-+ run_custom_command (device, COMMAND_DEVICE_ADDED);
-+ }
- }
-
- static void
--apply_libgnomekbd_settings (GSettings *settings,
-- const char *key,
-- CsdKeyboardManager *manager)
-+device_removed_cb (GdkDeviceManager *device_manager,
-+ GdkDevice *device,
-+ CsdKeyboardManager *manager)
- {
-- gchar **layouts;
-+ GdkInputSource source;
-
-- layouts = g_settings_get_strv (settings, LIBGNOMEKBD_KEY_LAYOUTS);
-+ source = gdk_device_get_source (device);
-+ if (source == GDK_SOURCE_KEYBOARD) {
-+ run_custom_command (device, COMMAND_DEVICE_REMOVED);
-+ }
-+}
-
-- /* Get accounts daemon */
-- GDBusProxy *proxy = NULL;
-- GDBusProxy *user = NULL;
-- GVariant *variant = NULL;
-- GError *error = NULL;
-- gchar *object_path = NULL;
-+static void
-+set_devicepresence_handler (CsdKeyboardManager *manager)
-+{
-+ GdkDeviceManager *device_manager;
-
-- proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
-- G_DBUS_PROXY_FLAGS_NONE,
-- NULL,
-- "org.freedesktop.Accounts",
-- "/org/freedesktop/Accounts",
-- "org.freedesktop.Accounts",
-- NULL,
-- &error);
-+ device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
-
-- if (proxy == NULL) {
-- g_warning ("Failed to contact accounts service: %s", error->message);
-- g_error_free (error);
-- goto bail;
-+ manager->priv->device_added_id = g_signal_connect (G_OBJECT (device_manager), "device-added",
-+ G_CALLBACK (device_added_cb), manager);
-+ manager->priv->device_removed_id = g_signal_connect (G_OBJECT (device_manager), "device-removed",
-+ G_CALLBACK (device_removed_cb), manager);
-+ manager->priv->device_manager = device_manager;
-+}
-+
-+static void
-+create_sources_from_current_xkb_config (GSettings *settings)
-+{
-+ GVariantBuilder builder;
-+ XkbRF_VarDefsRec *xkb_var_defs;
-+ gchar *tmp;
-+ gchar **layouts = NULL;
-+ gchar **variants = NULL;
-+ guint i, n;
-+
-+ gnome_xkb_info_get_var_defs (&tmp, &xkb_var_defs);
-+ g_free (tmp);
-+
-+ if (xkb_var_defs->layout)
-+ layouts = g_strsplit (xkb_var_defs->layout, ",", 0);
-+ if (xkb_var_defs->variant)
-+ variants = g_strsplit (xkb_var_defs->variant, ",", 0);
-+
-+ gnome_xkb_info_free_var_defs (xkb_var_defs);
-+
-+ if (!layouts)
-+ goto out;
-+
-+ if (variants && variants[0])
-+ n = MIN (g_strv_length (layouts), g_strv_length (variants));
-+ else
-+ n = g_strv_length (layouts);
-+
-+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)"));
-+ for (i = 0; i < n && layouts[i][0]; ++i) {
-+ if (variants && variants[i] && variants[i][0])
-+ tmp = g_strdup_printf ("%s+%s", layouts[i], variants[i]);
-+ else
-+ tmp = g_strdup (layouts[i]);
-+
-+ g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_XKB, tmp);
-+ g_free (tmp);
- }
-+ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
-+out:
-+ g_strfreev (layouts);
-+ g_strfreev (variants);
-+}
-
-- variant = g_dbus_proxy_call_sync (proxy,
-- "FindUserByName",
-- g_variant_new ("(s)", g_get_user_name ()),
-- G_DBUS_CALL_FLAGS_NONE,
-- -1,
-- NULL,
-- &error);
-+static void
-+convert_libgnomekbd_options (GSettings *settings)
-+{
-+ GPtrArray *opt_array;
-+ GSettings *libgnomekbd_settings;
-+ gchar **options, **o;
-
-- if (variant == NULL) {
-- g_warning ("Could not contact accounts service to look up '%s': %s",
-- g_get_user_name (), error->message);
-- g_error_free (error);
-- goto bail;
-+ if (!schema_is_installed ("org.gnome.libgnomekbd.keyboard"))
-+ return;
-+
-+ opt_array = g_ptr_array_new_with_free_func (g_free);
-+
-+ libgnomekbd_settings = g_settings_new ("org.gnome.libgnomekbd.keyboard");
-+ options = g_settings_get_strv (libgnomekbd_settings, "options");
-+
-+ for (o = options; *o; ++o) {
-+ gchar **strv;
-+
-+ strv = g_strsplit (*o, "\t", 2);
-+ if (strv[0] && strv[1]) {
-+ /* We don't want the group switcher because
-+ * it's incompatible with the way we use XKB
-+ * groups. */
-+ if (!g_str_has_prefix (strv[1], "grp:"))
-+ g_ptr_array_add (opt_array, g_strdup (strv[1]));
-+ }
-+ g_strfreev (strv);
- }
-+ g_ptr_array_add (opt_array, NULL);
-
-- g_variant_get (variant, "(o)", &object_path);
-- user = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
-- G_DBUS_PROXY_FLAGS_NONE,
-- NULL,
-- "org.freedesktop.Accounts",
-- object_path,
-- "org.freedesktop.Accounts.User",
-- NULL,
-- &error);
-- g_free (object_path);
-+ g_settings_set_strv (settings, KEY_KEYBOARD_OPTIONS, (const gchar * const*) opt_array->pdata);
-
-- if (user == NULL) {
-- g_warning ("Could not create proxy for user '%s': %s",
-- g_variant_get_string (variant, NULL), error->message);
-- g_error_free (error);
-- goto bail;
-+ g_strfreev (options);
-+ g_object_unref (libgnomekbd_settings);
-+ g_ptr_array_free (opt_array, TRUE);
-+}
-+
-+static void
-+convert_libgnomekbd_layouts (GSettings *settings)
-+{
-+ GVariantBuilder builder;
-+ GSettings *libgnomekbd_settings;
-+ gchar **layouts, **l;
-+
-+ if (!schema_is_installed ("org.gnome.libgnomekbd.keyboard"))
-+ return;
-+
-+ init_builder_with_sources (&builder, settings);
-+
-+ libgnomekbd_settings = g_settings_new ("org.gnome.libgnomekbd.keyboard");
-+ layouts = g_settings_get_strv (libgnomekbd_settings, "layouts");
-+
-+ for (l = layouts; *l; ++l) {
-+ gchar *id;
-+ gchar **strv;
-+
-+ strv = g_strsplit (*l, "\t", 2);
-+ if (strv[0] && !strv[1])
-+ id = g_strdup (strv[0]);
-+ else if (strv[0] && strv[1])
-+ id = g_strdup_printf ("%s+%s", strv[0], strv[1]);
-+ else
-+ id = NULL;
-+
-+ if (id)
-+ g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_XKB, id);
-+
-+ g_free (id);
-+ g_strfreev (strv);
- }
-- g_variant_unref (variant);
-
-- variant = g_dbus_proxy_call_sync (user,
-- "SetXKeyboardLayouts",
-- g_variant_new ("(^as)", layouts),
-- G_DBUS_CALL_FLAGS_NONE,
-- -1,
-- NULL,
-- &error);
-+ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
-+
-+ g_strfreev (layouts);
-+ g_object_unref (libgnomekbd_settings);
-+}
-
-- if (variant == NULL) {
-- g_warning ("Failed to set the keyboard layouts: %s", error->message);
-+static void
-+maybe_convert_old_settings (GSettings *settings)
-+{
-+ GVariant *sources;
-+ gchar **options;
-+ gchar *stamp_dir_path = NULL;
-+ gchar *stamp_file_path = NULL;
-+ GError *error = NULL;
-+
-+ stamp_dir_path = g_build_filename (g_get_user_data_dir (), PACKAGE_NAME, NULL);
-+ if (g_mkdir_with_parents (stamp_dir_path, 0755)) {
-+ g_warning ("Failed to create directory %s: %s", stamp_dir_path, g_strerror (errno));
-+ goto out;
-+ }
-+
-+ stamp_file_path = g_build_filename (stamp_dir_path, "input-sources-converted", NULL);
-+ if (g_file_test (stamp_file_path, G_FILE_TEST_EXISTS))
-+ goto out;
-+
-+ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
-+ if (g_variant_n_children (sources) < 1) {
-+ convert_libgnomekbd_layouts (settings);
-+#ifdef HAVE_IBUS
-+ convert_ibus (settings);
-+#endif
-+ }
-+ g_variant_unref (sources);
-+
-+ options = g_settings_get_strv (settings, KEY_KEYBOARD_OPTIONS);
-+ if (g_strv_length (options) < 1)
-+ convert_libgnomekbd_options (settings);
-+ g_strfreev (options);
-+
-+ if (!g_file_set_contents (stamp_file_path, "", 0, &error)) {
-+ g_warning ("%s", error->message);
- g_error_free (error);
-- goto bail;
- }
-+out:
-+ g_free (stamp_file_path);
-+ g_free (stamp_dir_path);
-+}
-
--bail:
-- if (proxy != NULL)
-- g_object_unref (proxy);
-- if (variant != NULL)
-- g_variant_unref (variant);
-- g_strfreev (layouts);
-+static void
-+maybe_create_input_sources (CsdKeyboardManager *manager)
-+{
-+ GSettings *settings;
-+ GVariant *sources;
-+
-+ settings = manager->priv->input_sources_settings;
-+
-+ if (g_getenv ("RUNNING_UNDER_GDM")) {
-+ create_sources_from_current_xkb_config (settings);
-+ return;
-+ }
-+
-+ maybe_convert_old_settings (settings);
-+
-+ /* if we still don't have anything do some educated guesses */
-+ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
-+ if (g_variant_n_children (sources) < 1) {
-+ create_sources_from_current_xkb_config (settings);
-+#ifdef HAVE_IBUS
-+ add_ibus_sources_from_locale (settings);
-+#endif
-+ }
-+ g_variant_unref (sources);
- }
-
- static gboolean
-@@ -370,26 +1571,41 @@ start_keyboard_idle_cb (CsdKeyboardManag
-
- g_debug ("Starting keyboard manager");
-
-- manager->priv->have_xkb = 0;
- manager->priv->settings = g_settings_new (CSD_KEYBOARD_DIR);
-- manager->priv->libgnomekbd_settings = g_settings_new (LIBGNOMEKBD_KEYBOARD_DIR);
-
-- /* Essential - xkb initialization should happen before */
-- csd_keyboard_xkb_init (manager);
-+ xkb_init (manager);
-
-- numlock_xkb_init (manager);
-+ set_devicepresence_handler (manager);
-
-+ manager->priv->input_sources_settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
-+ manager->priv->interface_settings = g_settings_new (GNOME_DESKTOP_INTERFACE_DIR);
-+ manager->priv->xkb_info = gnome_xkb_info_new ();
-+
-+ maybe_create_input_sources (manager);
-+
-+#ifdef HAVE_IBUS
-+ /* We don't want to touch IBus until we are sure this isn't a
-+ fallback session. */
-+ manager->priv->session_is_fallback = TRUE;
-+ manager->priv->ibus_cancellable = g_cancellable_new ();
-+ g_bus_get (G_BUS_TYPE_SESSION,
-+ manager->priv->ibus_cancellable,
-+ (GAsyncReadyCallback)got_bus,
-+ manager);
-+#else
-+ apply_input_sources_settings (manager->priv->input_sources_settings, NULL, 0, manager);
-+#endif
- /* apply current settings before we install the callback */
-- csd_keyboard_manager_apply_settings (manager);
-+ g_debug ("Started the keyboard plugin, applying all settings");
-+ apply_all_settings (manager);
-
- g_signal_connect (G_OBJECT (manager->priv->settings), "changed",
-- G_CALLBACK (apply_settings), manager);
--
-- apply_libgnomekbd_settings (manager->priv->libgnomekbd_settings, NULL, manager);
-- g_signal_connect (G_OBJECT (manager->priv->libgnomekbd_settings), "changed",
-- G_CALLBACK (apply_libgnomekbd_settings), manager);
-+ G_CALLBACK (settings_changed), manager);
-+ g_signal_connect (G_OBJECT (manager->priv->input_sources_settings), "change-event",
-+ G_CALLBACK (apply_input_sources_settings), manager);
-
-- numlock_install_xkb_callback (manager);
-+ install_xkb_filter (manager);
-+ set_input_sources_switcher (manager, enable_switcher (manager));
-
- cinnamon_settings_profile_end (NULL);
-
-@@ -404,6 +1620,11 @@ csd_keyboard_manager_start (CsdKeyboardM
- {
- cinnamon_settings_profile_start (NULL);
-
-+ if (check_xkb_extension (manager) == FALSE) {
-+ g_debug ("XKB is not supported, not applying any settings");
-+ return TRUE;
-+ }
-+
- manager->priv->start_idle_id = g_idle_add ((GSourceFunc) start_keyboard_idle_cb, manager);
-
- cinnamon_settings_profile_end (NULL);
-@@ -418,37 +1639,24 @@ csd_keyboard_manager_stop (CsdKeyboardMa
-
- g_debug ("Stopping keyboard manager");
-
-- if (p->settings != NULL) {
-- g_object_unref (p->settings);
-- p->settings = NULL;
-- }
-+ g_clear_object (&p->settings);
-+ g_clear_object (&p->input_sources_settings);
-+ g_clear_object (&p->interface_settings);
-+ g_clear_object (&p->xkb_info);
-
-- if (p->libgnomekbd_settings != NULL) {
-- g_object_unref (p->libgnomekbd_settings);
-- p->libgnomekbd_settings = NULL;
-- }
-+#ifdef HAVE_IBUS
-+ clear_ibus (manager);
-+#endif
-
-- if (p->have_xkb) {
-- gdk_window_remove_filter (NULL,
-- numlock_xkb_callback,
-- manager);
-+ if (p->device_manager != NULL) {
-+ g_signal_handler_disconnect (p->device_manager, p->device_added_id);
-+ g_signal_handler_disconnect (p->device_manager, p->device_removed_id);
-+ p->device_manager = NULL;
- }
-
-- csd_keyboard_xkb_shutdown ();
--}
--
--static GObject *
--csd_keyboard_manager_constructor (GType type,
-- guint n_construct_properties,
-- GObjectConstructParam *construct_properties)
--{
-- CsdKeyboardManager *keyboard_manager;
--
-- keyboard_manager = CSD_KEYBOARD_MANAGER (G_OBJECT_CLASS (csd_keyboard_manager_parent_class)->constructor (type,
-- n_construct_properties,
-- construct_properties));
-+ remove_xkb_filter (manager);
-
-- return G_OBJECT (keyboard_manager);
-+ set_input_sources_switcher (manager, FALSE);
- }
-
- static void
-@@ -456,7 +1664,6 @@ csd_keyboard_manager_class_init (CsdKeyb
- {
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-- object_class->constructor = csd_keyboard_manager_constructor;
- object_class->finalize = csd_keyboard_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (CsdKeyboardManagerPrivate));
-diff -uNrp a/plugins/keyboard/csd-keyboard-manager.h b/plugins/keyboard/csd-keyboard-manager.h
---- a/plugins/keyboard/csd-keyboard-manager.h 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/csd-keyboard-manager.h 2013-08-25 16:36:02.000000000 +0100
-@@ -51,7 +51,6 @@ CsdKeyboardManager * csd_keyboard_
- gboolean csd_keyboard_manager_start (CsdKeyboardManager *manager,
- GError **error);
- void csd_keyboard_manager_stop (CsdKeyboardManager *manager);
--void csd_keyboard_manager_apply_settings (CsdKeyboardManager *manager);
-
- G_END_DECLS
-
-diff -uNrp a/plugins/keyboard/csd-keyboard-plugin.h b/plugins/keyboard/csd-keyboard-plugin.h
---- a/plugins/keyboard/csd-keyboard-plugin.h 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/csd-keyboard-plugin.h 2013-08-25 16:36:02.000000000 +0100
-@@ -52,7 +52,7 @@ typedef struct
- GType csd_keyboard_plugin_get_type (void) G_GNUC_CONST;
-
- /* All the plugins must implement this function */
--G_MODULE_EXPORT GType register_cinnamon_settings_plugin (GTypeModule *module);
-+G_MODULE_EXPORT GType register_gnome_settings_plugin (GTypeModule *module);
-
- G_END_DECLS
-
-diff -uNrp a/plugins/keyboard/csd-keyboard-xkb.c b/plugins/keyboard/csd-keyboard-xkb.c
---- a/plugins/keyboard/csd-keyboard-xkb.c 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/csd-keyboard-xkb.c 1970-01-01 01:00:00.000000000 +0100
-@@ -1,579 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2001 Udaltsoft
-- *
-- * Written by Sergey V. Oudaltsov <svu@users.sourceforge.net>
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2, or (at your option)
-- * any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
-- * 02110-1335, USA.
-- */
--
--#include "config.h"
--
--#include <string.h>
--#include <time.h>
--
--#include <glib/gi18n.h>
--#include <gdk/gdk.h>
--#include <gdk/gdkx.h>
--#include <gtk/gtk.h>
--
--#include <libgnomekbd/gkbd-status.h>
--
--#include <libgnomekbd/gkbd-keyboard-drawing.h>
--#include <libgnomekbd/gkbd-desktop-config.h>
--#include <libgnomekbd/gkbd-indicator-config.h>
--#include <libgnomekbd/gkbd-keyboard-config.h>
--#include <libgnomekbd/gkbd-util.h>
--
--#include "csd-keyboard-xkb.h"
--#include "delayed-dialog.h"
--#include "cinnamon-settings-profile.h"
--
--#define SETTINGS_KEYBOARD_DIR "org.cinnamon.settings-daemon.plugins.keyboard"
--
--static CsdKeyboardManager *manager = NULL;
--
--static XklEngine *xkl_engine;
--static XklConfigRegistry *xkl_registry = NULL;
--
--static GkbdDesktopConfig current_config;
--static GkbdKeyboardConfig current_kbd_config;
--
--/* never terminated */
--static GkbdKeyboardConfig initial_sys_kbd_config;
--
--static gboolean inited_ok = FALSE;
--
--static GSettings *settings_desktop = NULL;
--static GSettings *settings_keyboard = NULL;
--
--static PostActivationCallback pa_callback = NULL;
--static void *pa_callback_user_data = NULL;
--
--static GtkStatusIcon *icon = NULL;
--
--static GHashTable *preview_dialogs = NULL;
--
--static void
--activation_error (void)
--{
-- char const *vendor;
-- GtkWidget *dialog;
--
-- vendor =
-- ServerVendor (GDK_DISPLAY_XDISPLAY
-- (gdk_display_get_default ()));
--
-- /* VNC viewers will not work, do not barrage them with warnings */
-- if (NULL != vendor && NULL != strstr (vendor, "VNC"))
-- return;
--
-- dialog = gtk_message_dialog_new_with_markup (NULL,
-- 0,
-- GTK_MESSAGE_ERROR,
-- GTK_BUTTONS_CLOSE,
-- _
-- ("Error activating XKB configuration.\n"
-- "There can be various reasons for that.\n\n"
-- "If you report this situation as a bug, include the results of\n"
-- " • <b>%s</b>\n"
-- " • <b>%s</b>\n"
-- " • <b>%s</b>\n"
-- " • <b>%s</b>"),
-- "xprop -root | grep XKB",
-- "gsettings get org.gnome.libgnomekbd.keyboard model",
-- "gsettings get org.gnome.libgnomekbd.keyboard layouts",
-- "gsettings get org.gnome.libgnomekbd.keyboard options");
-- g_signal_connect (dialog, "response",
-- G_CALLBACK (gtk_widget_destroy), NULL);
-- csd_delayed_show_dialog (dialog);
--}
--
--static gboolean
--ensure_xkl_registry (void)
--{
-- if (!xkl_registry) {
-- xkl_registry =
-- xkl_config_registry_get_instance (xkl_engine);
-- /* load all materials, unconditionally! */
-- if (!xkl_config_registry_load (xkl_registry, TRUE)) {
-- g_object_unref (xkl_registry);
-- xkl_registry = NULL;
-- return FALSE;
-- }
-- }
--
-- return TRUE;
--}
--
--static void
--apply_desktop_settings (void)
--{
-- if (!inited_ok)
-- return;
--
-- csd_keyboard_manager_apply_settings (manager);
-- gkbd_desktop_config_load (&current_config);
-- /* again, probably it would be nice to compare things
-- before activating them */
-- gkbd_desktop_config_activate (&current_config);
--}
--
--static void
--popup_menu_launch_capplet ()
--{
-- GAppInfo *info;
-- GdkAppLaunchContext *ctx;
-- GError *error = NULL;
--
-- info =
-- g_app_info_create_from_commandline
-- ("cinnamon-settings region", NULL, 0, &error);
--
-- if (info != NULL) {
-- ctx =
-- gdk_display_get_app_launch_context
-- (gdk_display_get_default ());
--
-- if (g_app_info_launch (info, NULL,
-- G_APP_LAUNCH_CONTEXT (ctx), &error) == FALSE) {
-- g_warning
-- ("Could not execute keyboard properties capplet: [%s]\n",
-- error->message);
-- g_error_free (error);
-- }
--
-- g_object_unref (info);
-- g_object_unref (ctx);
-- }
--
--}
--
--static void
--show_layout_destroy (GtkWidget * dialog, gint group)
--{
-- g_hash_table_remove (preview_dialogs, GINT_TO_POINTER (group));
--}
--
--static void
--popup_menu_show_layout ()
--{
-- GtkWidget *dialog;
-- XklEngine *engine =
-- xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY
-- (gdk_display_get_default ()));
-- XklState *xkl_state = xkl_engine_get_current_state (engine);
--
-- gchar **group_names = gkbd_status_get_group_names ();
--
-- gpointer p = g_hash_table_lookup (preview_dialogs,
-- GINT_TO_POINTER
-- (xkl_state->group));
--
-- if (xkl_state->group < 0
-- || xkl_state->group >= g_strv_length (group_names)) {
-- return;
-- }
--
-- if (p != NULL) {
-- /* existing window */
-- gtk_window_present (GTK_WINDOW (p));
-- return;
-- }
--
-- if (!ensure_xkl_registry ())
-- return;
--
-- dialog = gkbd_keyboard_drawing_dialog_new ();
-- gkbd_keyboard_drawing_dialog_set_group (dialog, xkl_registry, xkl_state->group);
--
-- g_signal_connect (dialog, "destroy",
-- G_CALLBACK (show_layout_destroy),
-- GINT_TO_POINTER (xkl_state->group));
-- g_hash_table_insert (preview_dialogs,
-- GINT_TO_POINTER (xkl_state->group), dialog);
-- gtk_widget_show_all (dialog);
--}
--
--static void
--popup_menu_set_group (gint group_number, gboolean only_menu)
--{
--
-- XklEngine *engine = gkbd_status_get_xkl_engine ();
--
-- XklState *st = xkl_engine_get_current_state(engine);
-- Window cur;
-- st->group = group_number;
-- xkl_engine_allow_one_switch_to_secondary_group (engine);
-- cur = xkl_engine_get_current_window (engine);
-- if (cur != (Window) NULL) {
-- xkl_debug (150, "Enforcing the state %d for window %lx\n",
-- st->group, cur);
--
-- xkl_engine_save_state (engine,
-- xkl_engine_get_current_window
-- (engine), st);
--/* XSetInputFocus( GDK_DISPLAY(), cur, RevertToNone, CurrentTime );*/
-- } else {
-- xkl_debug (150,
-- "??? Enforcing the state %d for unknown window\n",
-- st->group);
-- /* strange situation - bad things can happen */
-- }
-- if (!only_menu)
-- xkl_engine_lock_group (engine, st->group);
--}
--
--static void
--popup_menu_set_group_cb (GtkMenuItem * item, gpointer param)
--{
-- gint group_number = GPOINTER_TO_INT (param);
--
-- popup_menu_set_group(group_number, FALSE);
--}
--
--
--static GtkMenu *
--create_status_menu (void)
--{
-- GtkMenu *popup_menu = GTK_MENU (gtk_menu_new ());
-- int i = 0;
--
-- GtkMenu *groups_menu = GTK_MENU (gtk_menu_new ());
-- gchar **current_name = gkbd_status_get_group_names ();
--
-- GtkWidget *item = gtk_menu_item_new_with_mnemonic (_("_Layouts"));
-- gtk_widget_show (item);
-- gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
-- gtk_menu_item_set_submenu (GTK_MENU_ITEM (item),
-- GTK_WIDGET (groups_menu));
--
-- item = gtk_menu_item_new_with_mnemonic (_("Show _Keyboard Layout..."));
-- gtk_widget_show (item);
-- g_signal_connect (item, "activate", popup_menu_show_layout, NULL);
-- gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
--
-- /* translators note:
-- * This is the name of the cinnamon-settings "region" panel */
-- item = gtk_menu_item_new_with_mnemonic (_("Region and Language Settings"));
-- gtk_widget_show (item);
-- g_signal_connect (item, "activate", popup_menu_launch_capplet, NULL);
-- gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
--
-- for (i = 0; current_name && *current_name; i++, current_name++) {
--
-- gchar *image_file = gkbd_status_get_image_filename (i);
--
-- if (image_file == NULL) {
-- item =
-- gtk_menu_item_new_with_label (*current_name);
-- } else {
-- GdkPixbuf *pixbuf =
-- gdk_pixbuf_new_from_file_at_size (image_file,
-- 24, 24,
-- NULL);
-- GtkWidget *img =
-- gtk_image_new_from_pixbuf (pixbuf);
-- item =
-- gtk_image_menu_item_new_with_label
-- (*current_name);
-- gtk_widget_show (img);
-- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM
-- (item), img);
-- gtk_image_menu_item_set_always_show_image
-- (GTK_IMAGE_MENU_ITEM (item), TRUE);
-- g_free (image_file);
-- }
-- gtk_widget_show (item);
-- gtk_menu_shell_append (GTK_MENU_SHELL (groups_menu), item);
-- g_signal_connect (item, "activate",
-- G_CALLBACK (popup_menu_set_group_cb),
-- GINT_TO_POINTER (i));
-- }
--
-- return popup_menu;
--}
--
--static void
--status_icon_popup_menu_cb (GtkStatusIcon * icon, guint button, guint time)
--{
-- GtkMenu *popup_menu = create_status_menu ();
--
-- gtk_menu_popup (popup_menu, NULL, NULL,
-- gtk_status_icon_position_menu,
-- (gpointer) icon, button, time);
--}
--
--static void
--show_hide_icon ()
--{
-- if (g_strv_length (current_kbd_config.layouts_variants) > 1) {
-- if (icon == NULL) {
-- xkl_debug (150, "Creating keyboard status icon\n");
-- icon = gkbd_status_new ();
-- g_signal_connect (icon, "popup-menu",
-- G_CALLBACK
-- (status_icon_popup_menu_cb),
-- NULL);
--
-- }
-- } else {
-- if (icon != NULL) {
-- xkl_debug (150, "Destroying icon\n");
-- g_object_unref (icon);
-- icon = NULL;
-- }
-- }
--}
--
--static gboolean
--try_activating_xkb_config_if_new (GkbdKeyboardConfig *
-- current_sys_kbd_config)
--{
-- /* Activate - only if different! */
-- if (!gkbd_keyboard_config_equals
-- (&current_kbd_config, current_sys_kbd_config)) {
-- if (gkbd_keyboard_config_activate (&current_kbd_config)) {
-- if (pa_callback != NULL) {
-- (*pa_callback) (pa_callback_user_data);
-- return TRUE;
-- }
-- } else {
-- return FALSE;
-- }
-- }
-- return TRUE;
--}
--
--static gboolean
--filter_xkb_config (void)
--{
-- XklConfigItem *item;
-- gchar *lname;
-- gchar *vname;
-- gchar **lv;
-- gboolean any_change = FALSE;
--
-- xkl_debug (100, "Filtering configuration against the registry\n");
-- if (!ensure_xkl_registry ())
-- return FALSE;
--
-- lv = current_kbd_config.layouts_variants;
-- item = xkl_config_item_new ();
-- while (*lv) {
-- xkl_debug (100, "Checking [%s]\n", *lv);
-- if (gkbd_keyboard_config_split_items (*lv, &lname, &vname)) {
-- gboolean should_be_dropped = FALSE;
-- g_snprintf (item->name, sizeof (item->name), "%s",
-- lname);
-- if (!xkl_config_registry_find_layout
-- (xkl_registry, item)) {
-- xkl_debug (100, "Bad layout [%s]\n",
-- lname);
-- should_be_dropped = TRUE;
-- } else if (vname) {
-- g_snprintf (item->name,
-- sizeof (item->name), "%s",
-- vname);
-- if (!xkl_config_registry_find_variant
-- (xkl_registry, lname, item)) {
-- xkl_debug (100,
-- "Bad variant [%s(%s)]\n",
-- lname, vname);
-- should_be_dropped = TRUE;
-- }
-- }
-- if (should_be_dropped) {
-- gkbd_strv_behead (lv);
-- any_change = TRUE;
-- continue;
-- }
-- }
-- lv++;
-- }
-- g_object_unref (item);
-- return any_change;
--}
--
--static void
--apply_xkb_settings (void)
--{
-- GkbdKeyboardConfig current_sys_kbd_config;
--
-- if (!inited_ok)
-- return;
--
-- gkbd_keyboard_config_init (&current_sys_kbd_config, xkl_engine);
--
-- gkbd_keyboard_config_load (&current_kbd_config,
-- &initial_sys_kbd_config);
--
-- gkbd_keyboard_config_load_from_x_current (&current_sys_kbd_config,
-- NULL);
--
-- if (!try_activating_xkb_config_if_new (&current_sys_kbd_config)) {
-- if (filter_xkb_config ()) {
-- if (!try_activating_xkb_config_if_new
-- (&current_sys_kbd_config)) {
-- g_warning
-- ("Could not activate the filtered XKB configuration");
-- activation_error ();
-- }
-- } else {
-- g_warning
-- ("Could not activate the XKB configuration");
-- activation_error ();
-- }
-- } else
-- xkl_debug (100,
-- "Actual KBD configuration was not changed: redundant notification\n");
--
-- gkbd_keyboard_config_term (&current_sys_kbd_config);
-- show_hide_icon ();
--}
--
--static void
--csd_keyboard_xkb_analyze_sysconfig (void)
--{
-- if (!inited_ok)
-- return;
--
-- gkbd_keyboard_config_init (&initial_sys_kbd_config, xkl_engine);
-- gkbd_keyboard_config_load_from_x_initial (&initial_sys_kbd_config,
-- NULL);
--}
--
--void
--csd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun,
-- void *user_data)
--{
-- pa_callback = fun;
-- pa_callback_user_data = user_data;
--}
--
--static GdkFilterReturn
--csd_keyboard_xkb_evt_filter (GdkXEvent * xev, GdkEvent * event)
--{
-- XEvent *xevent = (XEvent *) xev;
-- xkl_engine_filter_events (xkl_engine, xevent);
-- return GDK_FILTER_CONTINUE;
--}
--
--/* When new Keyboard is plugged in - reload the settings */
--static void
--csd_keyboard_new_device (XklEngine * engine)
--{
-- apply_desktop_settings ();
-- apply_xkb_settings ();
--}
--
--void
--csd_keyboard_xkb_init (CsdKeyboardManager * kbd_manager)
--{
-- Display *display =
-- GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-- cinnamon_settings_profile_start (NULL);
--
-- gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
-- DATADIR G_DIR_SEPARATOR_S
-- "icons");
--
-- manager = kbd_manager;
-- cinnamon_settings_profile_start ("xkl_engine_get_instance");
-- xkl_engine = xkl_engine_get_instance (display);
-- cinnamon_settings_profile_end ("xkl_engine_get_instance");
-- if (xkl_engine) {
-- inited_ok = TRUE;
--
-- gkbd_desktop_config_init (&current_config, xkl_engine);
-- gkbd_keyboard_config_init (&current_kbd_config,
-- xkl_engine);
-- xkl_engine_backup_names_prop (xkl_engine);
-- csd_keyboard_xkb_analyze_sysconfig ();
--
-- settings_desktop = g_settings_new (GKBD_DESKTOP_SCHEMA);
-- settings_keyboard = g_settings_new (GKBD_KEYBOARD_SCHEMA);
-- g_signal_connect (settings_desktop, "changed",
-- (GCallback) apply_desktop_settings,
-- NULL);
-- g_signal_connect (settings_keyboard, "changed",
-- (GCallback) apply_xkb_settings, NULL);
--
-- gdk_window_add_filter (NULL, (GdkFilterFunc)
-- csd_keyboard_xkb_evt_filter, NULL);
--
-- if (xkl_engine_get_features (xkl_engine) &
-- XKLF_DEVICE_DISCOVERY)
-- g_signal_connect (xkl_engine, "X-new-device",
-- G_CALLBACK
-- (csd_keyboard_new_device), NULL);
--
-- cinnamon_settings_profile_start ("xkl_engine_start_listen");
-- xkl_engine_start_listen (xkl_engine,
-- XKLL_MANAGE_LAYOUTS |
-- XKLL_MANAGE_WINDOW_STATES);
-- cinnamon_settings_profile_end ("xkl_engine_start_listen");
--
-- cinnamon_settings_profile_start ("apply_desktop_settings");
-- apply_desktop_settings ();
-- cinnamon_settings_profile_end ("apply_desktop_settings");
-- cinnamon_settings_profile_start ("apply_xkb_settings");
-- apply_xkb_settings ();
-- cinnamon_settings_profile_end ("apply_xkb_settings");
-- }
-- preview_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
--
-- cinnamon_settings_profile_end (NULL);
--}
--
--void
--csd_keyboard_xkb_shutdown (void)
--{
-- if (!inited_ok)
-- return;
--
-- pa_callback = NULL;
-- pa_callback_user_data = NULL;
-- manager = NULL;
--
-- if (preview_dialogs != NULL)
-- g_hash_table_destroy (preview_dialogs);
--
-- if (!inited_ok)
-- return;
--
-- xkl_engine_stop_listen (xkl_engine,
-- XKLL_MANAGE_LAYOUTS |
-- XKLL_MANAGE_WINDOW_STATES);
--
-- gdk_window_remove_filter (NULL, (GdkFilterFunc)
-- csd_keyboard_xkb_evt_filter, NULL);
--
-- g_object_unref (settings_desktop);
-- settings_desktop = NULL;
-- g_object_unref (settings_keyboard);
-- settings_keyboard = NULL;
--
-- if (xkl_registry) {
-- g_object_unref (xkl_registry);
-- }
--
-- g_object_unref (xkl_engine);
--
-- xkl_engine = NULL;
--
-- inited_ok = FALSE;
--}
-diff -uNrp a/plugins/keyboard/csd-keyboard-xkb.h b/plugins/keyboard/csd-keyboard-xkb.h
---- a/plugins/keyboard/csd-keyboard-xkb.h 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/csd-keyboard-xkb.h 1970-01-01 01:00:00.000000000 +0100
-@@ -1,39 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-- * cinnamon-settings-keyboard-xkb.h
-- *
-- * Copyright (C) 2001 Udaltsoft
-- *
-- * Written by Sergey V. Oudaltsov <svu@users.sourceforge.net>
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2, or (at your option)
-- * any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
-- * 02110-1335, USA.
-- */
--
--#ifndef __CSD_KEYBOARD_XKB_H
--#define __CSD_KEYBOARD_XKB_H
--
--#include <libxklavier/xklavier.h>
--#include "csd-keyboard-manager.h"
--
--void csd_keyboard_xkb_init (CsdKeyboardManager *manager);
--void csd_keyboard_xkb_shutdown (void);
--
--typedef void (*PostActivationCallback) (void *userData);
--
--void
--csd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun,
-- void *userData);
--
--#endif
-diff -uNrp a/plugins/keyboard/delayed-dialog.c b/plugins/keyboard/delayed-dialog.c
---- a/plugins/keyboard/delayed-dialog.c 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/delayed-dialog.c 1970-01-01 01:00:00.000000000 +0100
-@@ -1,128 +0,0 @@
--/*
-- * Copyright © 2006 Novell, Inc.
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License as
-- * published by the Free Software Foundation; either version 2, or (at
-- * your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful, but
-- * WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
-- * 02110-1335, USA.
-- */
--
--#include <stdlib.h>
--#include <string.h>
--
--#include <gtk/gtk.h>
--#include <gdk/gdkx.h>
--
--#include "delayed-dialog.h"
--
--static gboolean delayed_show_timeout (gpointer data);
--static GdkFilterReturn message_filter (GdkXEvent *xevent,
-- GdkEvent *event,
-- gpointer data);
--
--static GSList *dialogs = NULL;
--
--/**
-- * csd_delayed_show_dialog:
-- * @dialog: the dialog
-- *
-- * Shows the dialog as with gtk_widget_show(), unless a window manager
-- * hasn't been started yet, in which case it will wait up to 5 seconds
-- * for that to happen before showing the dialog.
-- **/
--void
--csd_delayed_show_dialog (GtkWidget *dialog)
--{
-- GdkDisplay *display = gtk_widget_get_display (dialog);
-- Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
-- GdkScreen *screen = gtk_widget_get_screen (dialog);
-- char selection_name[10];
-- Atom selection_atom;
--
-- /* We can't use gdk_selection_owner_get() for this, because
-- * it's an unknown out-of-process window.
-- */
-- snprintf (selection_name, sizeof (selection_name), "WM_S%d",
-- gdk_screen_get_number (screen));
-- selection_atom = XInternAtom (xdisplay, selection_name, True);
-- if (selection_atom &&
-- XGetSelectionOwner (xdisplay, selection_atom) != None) {
-- gtk_widget_show (dialog);
-- return;
-- }
--
-- dialogs = g_slist_prepend (dialogs, dialog);
--
-- gdk_window_add_filter (NULL, message_filter, NULL);
--
-- g_timeout_add (5000, delayed_show_timeout, NULL);
--}
--
--static gboolean
--delayed_show_timeout (gpointer data)
--{
-- GSList *l;
--
-- for (l = dialogs; l; l = l->next)
-- gtk_widget_show (l->data);
-- g_slist_free (dialogs);
-- dialogs = NULL;
--
-- /* FIXME: There's no gdk_display_remove_client_message_filter */
--
-- return FALSE;
--}
--
--static GdkFilterReturn
--message_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
--{
-- XClientMessageEvent *evt;
-- char *selection_name;
-- int screen;
-- GSList *l, *next;
--
-- if (((XEvent *)xevent)->type != ClientMessage)
-- return GDK_FILTER_CONTINUE;
--
-- evt = (XClientMessageEvent *)xevent;
--
-- if (evt->message_type != XInternAtom (evt->display, "MANAGER", FALSE))
-- return GDK_FILTER_CONTINUE;
--
-- selection_name = XGetAtomName (evt->display, evt->data.l[1]);
--
-- if (strncmp (selection_name, "WM_S", 4) != 0) {
-- XFree (selection_name);
-- return GDK_FILTER_CONTINUE;
-- }
--
-- screen = atoi (selection_name + 4);
--
-- for (l = dialogs; l; l = next) {
-- GtkWidget *dialog = l->data;
-- next = l->next;
--
-- if (gdk_screen_get_number (gtk_widget_get_screen (dialog)) == screen) {
-- gtk_widget_show (dialog);
-- dialogs = g_slist_remove (dialogs, dialog);
-- }
-- }
--
-- if (!dialogs) {
-- gdk_window_remove_filter (NULL, message_filter, NULL);
-- }
--
-- XFree (selection_name);
--
-- return GDK_FILTER_CONTINUE;
--}
-diff -uNrp a/plugins/keyboard/delayed-dialog.h b/plugins/keyboard/delayed-dialog.h
---- a/plugins/keyboard/delayed-dialog.h 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/delayed-dialog.h 1970-01-01 01:00:00.000000000 +0100
-@@ -1,32 +0,0 @@
--/*
-- * Copyright © 2006 Novell, Inc.
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License as
-- * published by the Free Software Foundation; either version 2, or (at
-- * your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful, but
-- * WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
-- * 02110-1335, USA.
-- */
--
--
--#ifndef __DELAYED_DIALOG_H
--#define __DELAYED_DIALOG_H
--
--#include <gtk/gtk.h>
--
--G_BEGIN_DECLS
--
--void csd_delayed_show_dialog (GtkWidget *dialog);
--
--G_END_DECLS
--
--#endif
-diff -uNrp a/plugins/keyboard/gkbd-configuration.c b/plugins/keyboard/gkbd-configuration.c
---- a/plugins/keyboard/gkbd-configuration.c 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/gkbd-configuration.c 1970-01-01 01:00:00.000000000 +0100
-@@ -1,350 +0,0 @@
--/*
-- * Copyright (C) 2010 Canonical Ltd.
-- *
-- * Authors: Jan Arne Petersen <jpetersen@openismus.com>
-- *
-- * Based on gkbd-status.c by Sergey V. Udaltsov <svu@gnome.org>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Lesser General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
-- * Boston, MA 02110-1335, USA.
-- */
--
--#include <memory.h>
--
--#include <gdk/gdkkeysyms.h>
--#include <gdk/gdkx.h>
--#include <glib/gi18n.h>
--
--#include <libgnomekbd/gkbd-desktop-config.h>
--#include <libgnomekbd/gkbd-indicator-config.h>
--
--#include "gkbd-configuration.h"
--
--struct _GkbdConfigurationPrivate {
-- XklEngine *engine;
-- XklConfigRegistry *registry;
--
-- GkbdDesktopConfig cfg;
-- GkbdIndicatorConfig ind_cfg;
-- GkbdKeyboardConfig kbd_cfg;
--
-- gchar **full_group_names;
-- gchar **short_group_names;
--
-- gulong state_changed_handler;
-- gulong config_changed_handler;
--};
--
--enum {
-- SIGNAL_CHANGED,
-- SIGNAL_GROUP_CHANGED,
-- LAST_SIGNAL
--};
--
--static guint signals[LAST_SIGNAL] = { 0, };
--
--#define GKBD_CONFIGURATION_GET_PRIVATE(o) \
-- (G_TYPE_INSTANCE_GET_PRIVATE ((o), GKBD_TYPE_CONFIGURATION, GkbdConfigurationPrivate))
--
--G_DEFINE_TYPE (GkbdConfiguration, gkbd_configuration, G_TYPE_OBJECT)
--
--/* Should be called once for all widgets */
--static void
--gkbd_configuration_cfg_changed (GSettings *settings,
-- const char *key,
-- GkbdConfiguration * configuration)
--{
-- GkbdConfigurationPrivate *priv = configuration->priv;
--
-- xkl_debug (100,
-- "General configuration changed in GSettings - reiniting...\n");
-- gkbd_desktop_config_load (&priv->cfg);
-- gkbd_desktop_config_activate (&priv->cfg);
--
-- g_signal_emit (configuration,
-- signals[SIGNAL_CHANGED], 0);
--}
--
--/* Should be called once for all widgets */
--static void
--gkbd_configuration_ind_cfg_changed (GSettings *settings,
-- const char *key,
-- GkbdConfiguration * configuration)
--{
-- GkbdConfigurationPrivate *priv = configuration->priv;
-- xkl_debug (100,
-- "Applet configuration changed in GSettings - reiniting...\n");
-- gkbd_indicator_config_load (&priv->ind_cfg);
--
-- gkbd_indicator_config_free_image_filenames (&priv->ind_cfg);
-- gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
-- &priv->kbd_cfg);
--
-- gkbd_indicator_config_activate (&priv->ind_cfg);
--
-- g_signal_emit (configuration,
-- signals[SIGNAL_CHANGED], 0);
--}
--
--static void
--gkbd_configuration_load_group_names (GkbdConfiguration * configuration,
-- XklConfigRec * xklrec)
--{
-- GkbdConfigurationPrivate *priv = configuration->priv;
--
-- if (!gkbd_desktop_config_load_group_descriptions (&priv->cfg,
-- priv->registry,
-- (const char **) xklrec->layouts,
-- (const char **) xklrec->variants,
-- &priv->short_group_names,
-- &priv->full_group_names)) {
-- /* We just populate no short names (remain NULL) -
-- * full names are going to be used anyway */
-- gint i, total_groups =
-- xkl_engine_get_num_groups (priv->engine);
-- xkl_debug (150, "group descriptions loaded: %d!\n",
-- total_groups);
-- priv->full_group_names =
-- g_new0 (char *, total_groups + 1);
--
-- if (xkl_engine_get_features (priv->engine) &
-- XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
-- for (i = 0; priv->kbd_cfg.layouts_variants[i]; i++) {
-- priv->full_group_names[i] =
-- g_strdup ((char *) priv->kbd_cfg.layouts_variants[i]);
-- }
-- } else {
-- for (i = total_groups; --i >= 0;) {
-- priv->full_group_names[i] =
-- g_strdup_printf ("Group %d", i);
-- }
-- }
-- }
--}
--
--/* Should be called once for all widgets */
--static void
--gkbd_configuration_kbd_cfg_callback (XklEngine *engine,
-- GkbdConfiguration *configuration)
--{
-- GkbdConfigurationPrivate *priv = configuration->priv;
-- XklConfigRec *xklrec = xkl_config_rec_new ();
-- xkl_debug (100,
-- "XKB configuration changed on X Server - reiniting...\n");
--
-- gkbd_keyboard_config_load_from_x_current (&priv->kbd_cfg,
-- xklrec);
--
-- gkbd_indicator_config_free_image_filenames (&priv->ind_cfg);
-- gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
-- &priv->kbd_cfg);
--
-- g_strfreev (priv->full_group_names);
-- priv->full_group_names = NULL;
--
-- g_strfreev (priv->short_group_names);
-- priv->short_group_names = NULL;
--
-- gkbd_configuration_load_group_names (configuration,
-- xklrec);
--
-- g_signal_emit (configuration,
-- signals[SIGNAL_CHANGED],
-- 0);
--
-- g_object_unref (G_OBJECT (xklrec));
--}
--
--/* Should be called once for all applets */
--static void
--gkbd_configuration_state_callback (XklEngine * engine,
-- XklEngineStateChange changeType,
-- gint group, gboolean restore,
-- GkbdConfiguration * configuration)
--{
-- xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
--
-- if (changeType == GROUP_CHANGED) {
-- g_signal_emit (configuration,
-- signals[SIGNAL_GROUP_CHANGED], 0,
-- group);
-- }
--}
--
--static void
--gkbd_configuration_init (GkbdConfiguration *configuration)
--{
-- GkbdConfigurationPrivate *priv;
-- XklConfigRec *xklrec = xkl_config_rec_new ();
--
-- priv = GKBD_CONFIGURATION_GET_PRIVATE (configuration);
-- configuration->priv = priv;
--
-- priv->engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
-- if (priv->engine == NULL) {
-- xkl_debug (0, "Libxklavier initialization error");
-- return;
-- }
--
-- priv->state_changed_handler =
-- g_signal_connect (priv->engine, "X-state-changed",
-- G_CALLBACK (gkbd_configuration_state_callback),
-- configuration);
-- priv->config_changed_handler =
-- g_signal_connect (priv->engine, "X-config-changed",
-- G_CALLBACK (gkbd_configuration_kbd_cfg_callback),
-- configuration);
--
-- gkbd_desktop_config_init (&priv->cfg, priv->engine);
-- gkbd_keyboard_config_init (&priv->kbd_cfg, priv->engine);
-- gkbd_indicator_config_init (&priv->ind_cfg, priv->engine);
--
-- gkbd_desktop_config_load (&priv->cfg);
-- gkbd_desktop_config_activate (&priv->cfg);
--
-- priv->registry = xkl_config_registry_get_instance (priv->engine);
-- xkl_config_registry_load (priv->registry,
-- priv->cfg.load_extra_items);
--
-- gkbd_keyboard_config_load_from_x_current (&priv->kbd_cfg,
-- xklrec);
--
-- gkbd_indicator_config_load (&priv->ind_cfg);
--
-- gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
-- &priv->kbd_cfg);
--
-- gkbd_indicator_config_activate (&priv->ind_cfg);
--
-- gkbd_configuration_load_group_names (configuration,
-- xklrec);
-- g_object_unref (G_OBJECT (xklrec));
--
-- gkbd_desktop_config_start_listen (&priv->cfg,
-- G_CALLBACK (gkbd_configuration_cfg_changed),
-- configuration);
-- gkbd_indicator_config_start_listen (&priv->ind_cfg,
-- G_CALLBACK (gkbd_configuration_ind_cfg_changed),
-- configuration);
-- xkl_engine_start_listen (priv->engine,
-- XKLL_TRACK_KEYBOARD_STATE);
--
-- xkl_debug (100, "Initiating the widget startup process for %p\n",
-- configuration);
--}
--
--static void
--gkbd_configuration_finalize (GObject * obj)
--{
-- GkbdConfiguration *configuration = GKBD_CONFIGURATION (obj);
-- GkbdConfigurationPrivate *priv = configuration->priv;
--
-- xkl_debug (100,
-- "Starting the gnome-kbd-configuration widget shutdown process for %p\n",
-- configuration);
--
-- xkl_engine_stop_listen (priv->engine,
-- XKLL_TRACK_KEYBOARD_STATE);
--
-- gkbd_desktop_config_stop_listen (&priv->cfg);
-- gkbd_indicator_config_stop_listen (&priv->ind_cfg);
--
-- gkbd_indicator_config_term (&priv->ind_cfg);
-- gkbd_keyboard_config_term (&priv->kbd_cfg);
-- gkbd_desktop_config_term (&priv->cfg);
--
-- if (g_signal_handler_is_connected (priv->engine,
-- priv->state_changed_handler)) {
-- g_signal_handler_disconnect (priv->engine,
-- priv->state_changed_handler);
-- priv->state_changed_handler = 0;
-- }
-- if (g_signal_handler_is_connected (priv->engine,
-- priv->config_changed_handler)) {
-- g_signal_handler_disconnect (priv->engine,
-- priv->config_changed_handler);
-- priv->config_changed_handler = 0;
-- }
--
-- g_object_unref (priv->registry);
-- priv->registry = NULL;
-- g_object_unref (priv->engine);
-- priv->engine = NULL;
--
-- G_OBJECT_CLASS (gkbd_configuration_parent_class)->finalize (obj);
--}
--
--static void
--gkbd_configuration_class_init (GkbdConfigurationClass * klass)
--{
-- GObjectClass *object_class = G_OBJECT_CLASS (klass);
--
-- /* Initing vtable */
-- object_class->finalize = gkbd_configuration_finalize;
--
-- /* Signals */
-- signals[SIGNAL_CHANGED] = g_signal_new ("changed",
-- GKBD_TYPE_CONFIGURATION,
-- G_SIGNAL_RUN_LAST,
-- 0,
-- NULL, NULL,
-- g_cclosure_marshal_VOID__VOID,
-- G_TYPE_NONE,
-- 0);
-- signals[SIGNAL_GROUP_CHANGED] = g_signal_new ("group-changed",
-- GKBD_TYPE_CONFIGURATION,
-- G_SIGNAL_RUN_LAST,
-- 0,
-- NULL, NULL,
-- g_cclosure_marshal_VOID__INT,
-- G_TYPE_NONE,
-- 1,
-- G_TYPE_INT);
--
-- g_type_class_add_private (klass, sizeof (GkbdConfigurationPrivate));
--}
--
--GkbdConfiguration *
--gkbd_configuration_get (void)
--{
-- static gpointer instance = NULL;
--
-- if (!instance) {
-- instance = g_object_new (GKBD_TYPE_CONFIGURATION, NULL);
-- g_object_add_weak_pointer (instance, &instance);
-- } else {
-- g_object_ref (instance);
-- }
--
-- return instance;
--}
--
--XklEngine *
--gkbd_configuration_get_xkl_engine (GkbdConfiguration *configuration)
--{
-- return configuration->priv->engine;
--}
--
--const char * const *
--gkbd_configuration_get_group_names (GkbdConfiguration *configuration)
--{
-- return configuration->priv->full_group_names;
--}
--
--const char * const *
--gkbd_configuration_get_short_group_names (GkbdConfiguration *configuration)
--{
-- return configuration->priv->short_group_names;
--}
-diff -uNrp a/plugins/keyboard/gkbd-configuration.h b/plugins/keyboard/gkbd-configuration.h
---- a/plugins/keyboard/gkbd-configuration.h 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/gkbd-configuration.h 1970-01-01 01:00:00.000000000 +0100
-@@ -1,65 +0,0 @@
--/*
-- * Copyright (C) 2010 Canonical Ltd.
-- *
-- * Authors: Jan Arne Petersen <jpetersen@openismus.com>
-- *
-- * Based on gkbd-status.h by Sergey V. Udaltsov <svu@gnome.org>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Lesser General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
-- * Boston, MA 02110-1335, USA.
-- */
--
--#ifndef __GKBD_CONFIGURATION_H__
--#define __GKBD_CONFIGURATION_H__
--
--#include <glib-object.h>
--
--#include <libxklavier/xklavier.h>
--
--G_BEGIN_DECLS
--
--typedef struct _GkbdConfiguration GkbdConfiguration;
--typedef struct _GkbdConfigurationPrivate GkbdConfigurationPrivate;
--typedef struct _GkbdConfigurationClass GkbdConfigurationClass;
--
--#define GKBD_TYPE_CONFIGURATION (gkbd_configuration_get_type ())
--#define GKBD_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfiguration))
--#define GKBD_INDCATOR_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfigurationClass))
--#define GKBD_IS_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKBD_TYPE_CONFIGURATION))
--#define GKBD_IS_CONFIGURATION_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GKBD_TYPE_CONFIGURATION))
--#define GKBD_CONFIGURATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfigurationClass))
--
--struct _GkbdConfiguration {
-- GObject parent;
--
-- GkbdConfigurationPrivate *priv;
--};
--
--struct _GkbdConfigurationClass {
-- GObjectClass parent_class;
--};
--
--extern GType gkbd_configuration_get_type (void);
--
--extern GkbdConfiguration *gkbd_configuration_get (void);
--
--extern XklEngine *gkbd_configuration_get_xkl_engine (GkbdConfiguration *configuration);
--
--extern const char * const *gkbd_configuration_get_group_names (GkbdConfiguration *configuration);
--extern const char * const *gkbd_configuration_get_short_group_names (GkbdConfiguration *configuration);
--
--G_END_DECLS
--
--#endif
-diff -uNrp a/plugins/keyboard/.indent.pro b/plugins/keyboard/.indent.pro
---- a/plugins/keyboard/.indent.pro 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/.indent.pro 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,2 @@
-+-kr -i8 -pcs -lps -psl
-+
-diff -uNrp a/plugins/keyboard/Makefile.am b/plugins/keyboard/Makefile.am
---- a/plugins/keyboard/Makefile.am 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/keyboard/Makefile.am 2013-08-25 16:36:02.000000000 +0100
-@@ -20,25 +20,20 @@ libkeyboard_la_SOURCES = \
- csd-keyboard-plugin.c \
- csd-keyboard-manager.h \
- csd-keyboard-manager.c \
-- csd-keyboard-xkb.h \
-- csd-keyboard-xkb.c \
-- delayed-dialog.h \
-- delayed-dialog.c \
-- gkbd-configuration.c \
-- gkbd-configuration.h \
- $(NULL)
-
- libkeyboard_la_CPPFLAGS = \
- -I$(top_srcdir)/cinnamon-settings-daemon \
- -I$(top_srcdir)/data \
-+ -I$(top_srcdir)/plugins/common \
- -DDATADIR=\""$(pkgdatadir)"\" \
-+ -DLIBEXECDIR=\""$(libexecdir)"\" \
- -DCINNAMON_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
- $(AM_CPPFLAGS)
-
- libkeyboard_la_CFLAGS = \
- $(PLUGIN_CFLAGS) \
- $(SETTINGS_PLUGIN_CFLAGS) \
-- $(APPINDICATOR_CFLAGS) \
- $(KEYBOARD_CFLAGS) \
- $(AM_CFLAGS)
-
-@@ -46,19 +41,63 @@ libkeyboard_la_LDFLAGS = \
- $(CSD_PLUGIN_LDFLAGS) \
- $(NULL)
-
--libkeyboard_la_LIBADD = \
-- $(SETTINGS_PLUGIN_LIBS) \
-- $(XF86MISC_LIBS) \
-- $(KEYBOARD_LIBS) \
-- $(APPINDICATOR_LIBS) \
-+libkeyboard_la_LIBADD = \
-+ $(top_builddir)/plugins/common/libcommon.la \
-+ $(SETTINGS_PLUGIN_LIBS) \
-+ $(XF86MISC_LIBS) \
-+ $(KEYBOARD_LIBS) \
- $(NULL)
-
-+libexec_PROGRAMS = csd-test-keyboard
-+csd_test_keyboard_SOURCES = \
-+ test-keyboard.c \
-+ csd-keyboard-manager.h \
-+ csd-keyboard-manager.c \
-+ $(NULL)
-+
-+csd_test_keyboard_CFLAGS = $(libkeyboard_la_CFLAGS)
-+csd_test_keyboard_CPPFLAGS = $(libkeyboard_la_CPPFLAGS)
-+csd_test_keyboard_LDADD = $(libkeyboard_la_LIBADD) $(top_builddir)/cinnamon-settings-daemon/libcsd.la
-+
- plugin_in_files = \
- keyboard.cinnamon-settings-plugin.in \
- $(NULL)
-
- plugin_DATA = $(plugin_in_files:.cinnamon-settings-plugin.in=.cinnamon-settings-plugin)
-
-+if HAVE_IBUS
-+noinst_PROGRAMS = test-keyboard-ibus-utils
-+test_keyboard_ibus_utils_SOURCES = test-keyboard-ibus-utils.c
-+test_keyboard_ibus_utils_CFLAGS = $(libkeyboard_la_CFLAGS)
-+test_keyboard_ibus_utils_CPPFLAGS = $(libkeyboard_la_CPPFLAGS)
-+test_keyboard_ibus_utils_LDADD = $(libkeyboard_la_LIBADD) $(top_builddir)/cinnamon-settings-daemon/libcsd.la
-+
-+check-local: test-keyboard-ibus-utils
-+ $(builddir)/test-keyboard-ibus-utils > /dev/null
-+endif
-+
-+libexec_PROGRAMS += csd-input-sources-switcher
-+
-+csd_input_sources_switcher_SOURCES = \
-+ csd-input-sources-switcher.c \
-+ $(NULL)
-+
-+csd_input_sources_switcher_CPPFLAGS = \
-+ -I$(top_srcdir)/data \
-+ -I$(top_srcdir)/plugins/common \
-+ $(AM_CPPFLAGS) \
-+ $(NULL)
-+
-+csd_input_sources_switcher_CFLAGS = \
-+ $(SETTINGS_PLUGIN_CFLAGS) \
-+ $(AM_CFLAGS) \
-+ $(NULL)
-+
-+csd_input_sources_switcher_LDADD = \
-+ $(top_builddir)/plugins/common/libcommon.la \
-+ $(SETTINGS_PLUGIN_LIBS) \
-+ $(NULL)
-+
- EXTRA_DIST = \
- $(icons_DATA) \
- $(plugin_in_files) \
-diff -uNrp a/plugins/keyboard/test-keyboard.c b/plugins/keyboard/test-keyboard.c
---- a/plugins/keyboard/test-keyboard.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/test-keyboard.c 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,7 @@
-+#define NEW csd_keyboard_manager_new
-+#define START csd_keyboard_manager_start
-+#define STOP csd_keyboard_manager_stop
-+#define MANAGER CsdKeyboardManager
-+#include "csd-keyboard-manager.h"
-+
-+#include "test-plugin.h"
-diff -uNrp a/plugins/keyboard/test-keyboard-ibus-utils.c b/plugins/keyboard/test-keyboard-ibus-utils.c
---- a/plugins/keyboard/test-keyboard-ibus-utils.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/test-keyboard-ibus-utils.c 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,116 @@
-+#include "csd-keyboard-manager.c"
-+
-+static void
-+test_make_xkb_source_id (void)
-+{
-+ gint i;
-+ const gchar *test_strings[][2] = {
-+ /* input output */
-+ { "xkb:aa:bb:cc", "aa+bb" },
-+ { "xkb:aa:bb:", "aa+bb" },
-+ { "xkb:aa::cc", "aa" },
-+ { "xkb:aa::", "aa" },
-+ { "xkb::bb:cc", "+bb" },
-+ { "xkb::bb:", "+bb" },
-+ { "xkb:::cc", "" },
-+ { "xkb:::", "" },
-+ };
-+
-+ for (i = 0; i < G_N_ELEMENTS (test_strings); ++i)
-+ g_assert_cmpstr (make_xkb_source_id (test_strings[i][0]), ==, test_strings[i][1]);
-+}
-+
-+static void
-+test_layout_from_ibus_layout (void)
-+{
-+ gint i;
-+ const gchar *test_strings[][2] = {
-+ /* input output */
-+ { "", "" },
-+ { "a", "a" },
-+ { "a(", "a" },
-+ { "a[", "a" },
-+ };
-+
-+ for (i = 0; i < G_N_ELEMENTS (test_strings); ++i)
-+ g_assert_cmpstr (layout_from_ibus_layout (test_strings[i][0]), ==, test_strings[i][1]);
-+}
-+
-+static void
-+test_variant_from_ibus_layout (void)
-+{
-+ gint i;
-+ const gchar *test_strings[][2] = {
-+ /* input output */
-+ { "", NULL },
-+ { "a", NULL },
-+ { "(", NULL },
-+ { "()", "" },
-+ { "(b)", "b" },
-+ { "a(", NULL },
-+ { "a()", "" },
-+ { "a(b)", "b" },
-+ };
-+
-+ for (i = 0; i < G_N_ELEMENTS (test_strings); ++i)
-+ g_assert_cmpstr (variant_from_ibus_layout (test_strings[i][0]), ==, test_strings[i][1]);
-+}
-+
-+static void
-+test_options_from_ibus_layout (void)
-+{
-+ gint i, j;
-+ gchar *output_0[] = {
-+ NULL
-+ };
-+ gchar *output_1[] = {
-+ "",
-+ NULL
-+ };
-+ gchar *output_2[] = {
-+ "b",
-+ NULL
-+ };
-+ gchar *output_3[] = {
-+ "b", "",
-+ NULL
-+ };
-+ gchar *output_4[] = {
-+ "b", "c",
-+ NULL
-+ };
-+ const gpointer tests[][2] = {
-+ /* input output */
-+ { "", NULL },
-+ { "a", NULL },
-+ { "a[", output_0 },
-+ { "a[]", output_1 },
-+ { "a[b]", output_2 },
-+ { "a[b,]", output_3 },
-+ { "a[b,c]", output_4 },
-+ };
-+
-+ for (i = 0; i < G_N_ELEMENTS (tests); ++i) {
-+ if (tests[i][1] == NULL) {
-+ g_assert (options_from_ibus_layout (tests[i][0]) == NULL);
-+ } else {
-+ gchar **strv_a = options_from_ibus_layout (tests[i][0]);
-+ gchar **strv_b = tests[i][1];
-+
-+ g_assert (g_strv_length (strv_a) == g_strv_length (strv_b));
-+ for (j = 0; j < g_strv_length (strv_a); ++j)
-+ g_assert_cmpstr (strv_a[j], ==, strv_b[j]);
-+ }
-+ }
-+}
-+
-+int
-+main (void)
-+{
-+ test_make_xkb_source_id ();
-+ test_layout_from_ibus_layout ();
-+ test_variant_from_ibus_layout ();
-+ test_options_from_ibus_layout ();
-+
-+ return 0;
-+}
-diff -uNrp a/plugins/keyboard/xxx/csd-keyboard-xkb.c b/plugins/keyboard/xxx/csd-keyboard-xkb.c
---- a/plugins/keyboard/xxx/csd-keyboard-xkb.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/xxx/csd-keyboard-xkb.c 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,579 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-+ *
-+ * Copyright (C) 2001 Udaltsoft
-+ *
-+ * Written by Sergey V. Oudaltsov <svu@users.sourceforge.net>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2, or (at your option)
-+ * any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
-+ * 02110-1335, USA.
-+ */
-+
-+#include "config.h"
-+
-+#include <string.h>
-+#include <time.h>
-+
-+#include <glib/gi18n.h>
-+#include <gdk/gdk.h>
-+#include <gdk/gdkx.h>
-+#include <gtk/gtk.h>
-+
-+#include <libgnomekbd/gkbd-status.h>
-+
-+#include <libgnomekbd/gkbd-keyboard-drawing.h>
-+#include <libgnomekbd/gkbd-desktop-config.h>
-+#include <libgnomekbd/gkbd-indicator-config.h>
-+#include <libgnomekbd/gkbd-keyboard-config.h>
-+#include <libgnomekbd/gkbd-util.h>
-+
-+#include "csd-keyboard-xkb.h"
-+#include "delayed-dialog.h"
-+#include "cinnamon-settings-profile.h"
-+
-+#define SETTINGS_KEYBOARD_DIR "org.cinnamon.settings-daemon.plugins.keyboard"
-+
-+static CsdKeyboardManager *manager = NULL;
-+
-+static XklEngine *xkl_engine;
-+static XklConfigRegistry *xkl_registry = NULL;
-+
-+static GkbdDesktopConfig current_config;
-+static GkbdKeyboardConfig current_kbd_config;
-+
-+/* never terminated */
-+static GkbdKeyboardConfig initial_sys_kbd_config;
-+
-+static gboolean inited_ok = FALSE;
-+
-+static GSettings *settings_desktop = NULL;
-+static GSettings *settings_keyboard = NULL;
-+
-+static PostActivationCallback pa_callback = NULL;
-+static void *pa_callback_user_data = NULL;
-+
-+static GtkStatusIcon *icon = NULL;
-+
-+static GHashTable *preview_dialogs = NULL;
-+
-+static void
-+activation_error (void)
-+{
-+ char const *vendor;
-+ GtkWidget *dialog;
-+
-+ vendor =
-+ ServerVendor (GDK_DISPLAY_XDISPLAY
-+ (gdk_display_get_default ()));
-+
-+ /* VNC viewers will not work, do not barrage them with warnings */
-+ if (NULL != vendor && NULL != strstr (vendor, "VNC"))
-+ return;
-+
-+ dialog = gtk_message_dialog_new_with_markup (NULL,
-+ 0,
-+ GTK_MESSAGE_ERROR,
-+ GTK_BUTTONS_CLOSE,
-+ _
-+ ("Error activating XKB configuration.\n"
-+ "There can be various reasons for that.\n\n"
-+ "If you report this situation as a bug, include the results of\n"
-+ " • <b>%s</b>\n"
-+ " • <b>%s</b>\n"
-+ " • <b>%s</b>\n"
-+ " • <b>%s</b>"),
-+ "xprop -root | grep XKB",
-+ "gsettings get org.gnome.libgnomekbd.keyboard model",
-+ "gsettings get org.gnome.libgnomekbd.keyboard layouts",
-+ "gsettings get org.gnome.libgnomekbd.keyboard options");
-+ g_signal_connect (dialog, "response",
-+ G_CALLBACK (gtk_widget_destroy), NULL);
-+ csd_delayed_show_dialog (dialog);
-+}
-+
-+static gboolean
-+ensure_xkl_registry (void)
-+{
-+ if (!xkl_registry) {
-+ xkl_registry =
-+ xkl_config_registry_get_instance (xkl_engine);
-+ /* load all materials, unconditionally! */
-+ if (!xkl_config_registry_load (xkl_registry, TRUE)) {
-+ g_object_unref (xkl_registry);
-+ xkl_registry = NULL;
-+ return FALSE;
-+ }
-+ }
-+
-+ return TRUE;
-+}
-+
-+static void
-+apply_desktop_settings (void)
-+{
-+ if (!inited_ok)
-+ return;
-+
-+ csd_keyboard_manager_apply_settings (manager);
-+ gkbd_desktop_config_load (&current_config);
-+ /* again, probably it would be nice to compare things
-+ before activating them */
-+ gkbd_desktop_config_activate (&current_config);
-+}
-+
-+static void
-+popup_menu_launch_capplet ()
-+{
-+ GAppInfo *info;
-+ GdkAppLaunchContext *ctx;
-+ GError *error = NULL;
-+
-+ info =
-+ g_app_info_create_from_commandline
-+ ("cinnamon-settings region", NULL, 0, &error);
-+
-+ if (info != NULL) {
-+ ctx =
-+ gdk_display_get_app_launch_context
-+ (gdk_display_get_default ());
-+
-+ if (g_app_info_launch (info, NULL,
-+ G_APP_LAUNCH_CONTEXT (ctx), &error) == FALSE) {
-+ g_warning
-+ ("Could not execute keyboard properties capplet: [%s]\n",
-+ error->message);
-+ g_error_free (error);
-+ }
-+
-+ g_object_unref (info);
-+ g_object_unref (ctx);
-+ }
-+
-+}
-+
-+static void
-+show_layout_destroy (GtkWidget * dialog, gint group)
-+{
-+ g_hash_table_remove (preview_dialogs, GINT_TO_POINTER (group));
-+}
-+
-+static void
-+popup_menu_show_layout ()
-+{
-+ GtkWidget *dialog;
-+ XklEngine *engine =
-+ xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY
-+ (gdk_display_get_default ()));
-+ XklState *xkl_state = xkl_engine_get_current_state (engine);
-+
-+ gchar **group_names = gkbd_status_get_group_names ();
-+
-+ gpointer p = g_hash_table_lookup (preview_dialogs,
-+ GINT_TO_POINTER
-+ (xkl_state->group));
-+
-+ if (xkl_state->group < 0
-+ || xkl_state->group >= g_strv_length (group_names)) {
-+ return;
-+ }
-+
-+ if (p != NULL) {
-+ /* existing window */
-+ gtk_window_present (GTK_WINDOW (p));
-+ return;
-+ }
-+
-+ if (!ensure_xkl_registry ())
-+ return;
-+
-+ dialog = gkbd_keyboard_drawing_dialog_new ();
-+ gkbd_keyboard_drawing_dialog_set_group (dialog, xkl_registry, xkl_state->group);
-+
-+ g_signal_connect (dialog, "destroy",
-+ G_CALLBACK (show_layout_destroy),
-+ GINT_TO_POINTER (xkl_state->group));
-+ g_hash_table_insert (preview_dialogs,
-+ GINT_TO_POINTER (xkl_state->group), dialog);
-+ gtk_widget_show_all (dialog);
-+}
-+
-+static void
-+popup_menu_set_group (gint group_number, gboolean only_menu)
-+{
-+
-+ XklEngine *engine = gkbd_status_get_xkl_engine ();
-+
-+ XklState *st = xkl_engine_get_current_state(engine);
-+ Window cur;
-+ st->group = group_number;
-+ xkl_engine_allow_one_switch_to_secondary_group (engine);
-+ cur = xkl_engine_get_current_window (engine);
-+ if (cur != (Window) NULL) {
-+ xkl_debug (150, "Enforcing the state %d for window %lx\n",
-+ st->group, cur);
-+
-+ xkl_engine_save_state (engine,
-+ xkl_engine_get_current_window
-+ (engine), st);
-+/* XSetInputFocus( GDK_DISPLAY(), cur, RevertToNone, CurrentTime );*/
-+ } else {
-+ xkl_debug (150,
-+ "??? Enforcing the state %d for unknown window\n",
-+ st->group);
-+ /* strange situation - bad things can happen */
-+ }
-+ if (!only_menu)
-+ xkl_engine_lock_group (engine, st->group);
-+}
-+
-+static void
-+popup_menu_set_group_cb (GtkMenuItem * item, gpointer param)
-+{
-+ gint group_number = GPOINTER_TO_INT (param);
-+
-+ popup_menu_set_group(group_number, FALSE);
-+}
-+
-+
-+static GtkMenu *
-+create_status_menu (void)
-+{
-+ GtkMenu *popup_menu = GTK_MENU (gtk_menu_new ());
-+ int i = 0;
-+
-+ GtkMenu *groups_menu = GTK_MENU (gtk_menu_new ());
-+ gchar **current_name = gkbd_status_get_group_names ();
-+
-+ GtkWidget *item = gtk_menu_item_new_with_mnemonic (_("_Layouts"));
-+ gtk_widget_show (item);
-+ gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
-+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (item),
-+ GTK_WIDGET (groups_menu));
-+
-+ item = gtk_menu_item_new_with_mnemonic (_("Show _Keyboard Layout..."));
-+ gtk_widget_show (item);
-+ g_signal_connect (item, "activate", popup_menu_show_layout, NULL);
-+ gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
-+
-+ /* translators note:
-+ * This is the name of the cinnamon-settings "region" panel */
-+ item = gtk_menu_item_new_with_mnemonic (_("Region and Language Settings"));
-+ gtk_widget_show (item);
-+ g_signal_connect (item, "activate", popup_menu_launch_capplet, NULL);
-+ gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
-+
-+ for (i = 0; current_name && *current_name; i++, current_name++) {
-+
-+ gchar *image_file = gkbd_status_get_image_filename (i);
-+
-+ if (image_file == NULL) {
-+ item =
-+ gtk_menu_item_new_with_label (*current_name);
-+ } else {
-+ GdkPixbuf *pixbuf =
-+ gdk_pixbuf_new_from_file_at_size (image_file,
-+ 24, 24,
-+ NULL);
-+ GtkWidget *img =
-+ gtk_image_new_from_pixbuf (pixbuf);
-+ item =
-+ gtk_image_menu_item_new_with_label
-+ (*current_name);
-+ gtk_widget_show (img);
-+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM
-+ (item), img);
-+ gtk_image_menu_item_set_always_show_image
-+ (GTK_IMAGE_MENU_ITEM (item), TRUE);
-+ g_free (image_file);
-+ }
-+ gtk_widget_show (item);
-+ gtk_menu_shell_append (GTK_MENU_SHELL (groups_menu), item);
-+ g_signal_connect (item, "activate",
-+ G_CALLBACK (popup_menu_set_group_cb),
-+ GINT_TO_POINTER (i));
-+ }
-+
-+ return popup_menu;
-+}
-+
-+static void
-+status_icon_popup_menu_cb (GtkStatusIcon * icon, guint button, guint time)
-+{
-+ GtkMenu *popup_menu = create_status_menu ();
-+
-+ gtk_menu_popup (popup_menu, NULL, NULL,
-+ gtk_status_icon_position_menu,
-+ (gpointer) icon, button, time);
-+}
-+
-+static void
-+show_hide_icon ()
-+{
-+ if (g_strv_length (current_kbd_config.layouts_variants) > 1) {
-+ if (icon == NULL) {
-+ xkl_debug (150, "Creating keyboard status icon\n");
-+ icon = gkbd_status_new ();
-+ g_signal_connect (icon, "popup-menu",
-+ G_CALLBACK
-+ (status_icon_popup_menu_cb),
-+ NULL);
-+
-+ }
-+ } else {
-+ if (icon != NULL) {
-+ xkl_debug (150, "Destroying icon\n");
-+ g_object_unref (icon);
-+ icon = NULL;
-+ }
-+ }
-+}
-+
-+static gboolean
-+try_activating_xkb_config_if_new (GkbdKeyboardConfig *
-+ current_sys_kbd_config)
-+{
-+ /* Activate - only if different! */
-+ if (!gkbd_keyboard_config_equals
-+ (&current_kbd_config, current_sys_kbd_config)) {
-+ if (gkbd_keyboard_config_activate (&current_kbd_config)) {
-+ if (pa_callback != NULL) {
-+ (*pa_callback) (pa_callback_user_data);
-+ return TRUE;
-+ }
-+ } else {
-+ return FALSE;
-+ }
-+ }
-+ return TRUE;
-+}
-+
-+static gboolean
-+filter_xkb_config (void)
-+{
-+ XklConfigItem *item;
-+ gchar *lname;
-+ gchar *vname;
-+ gchar **lv;
-+ gboolean any_change = FALSE;
-+
-+ xkl_debug (100, "Filtering configuration against the registry\n");
-+ if (!ensure_xkl_registry ())
-+ return FALSE;
-+
-+ lv = current_kbd_config.layouts_variants;
-+ item = xkl_config_item_new ();
-+ while (*lv) {
-+ xkl_debug (100, "Checking [%s]\n", *lv);
-+ if (gkbd_keyboard_config_split_items (*lv, &lname, &vname)) {
-+ gboolean should_be_dropped = FALSE;
-+ g_snprintf (item->name, sizeof (item->name), "%s",
-+ lname);
-+ if (!xkl_config_registry_find_layout
-+ (xkl_registry, item)) {
-+ xkl_debug (100, "Bad layout [%s]\n",
-+ lname);
-+ should_be_dropped = TRUE;
-+ } else if (vname) {
-+ g_snprintf (item->name,
-+ sizeof (item->name), "%s",
-+ vname);
-+ if (!xkl_config_registry_find_variant
-+ (xkl_registry, lname, item)) {
-+ xkl_debug (100,
-+ "Bad variant [%s(%s)]\n",
-+ lname, vname);
-+ should_be_dropped = TRUE;
-+ }
-+ }
-+ if (should_be_dropped) {
-+ gkbd_strv_behead (lv);
-+ any_change = TRUE;
-+ continue;
-+ }
-+ }
-+ lv++;
-+ }
-+ g_object_unref (item);
-+ return any_change;
-+}
-+
-+static void
-+apply_xkb_settings (void)
-+{
-+ GkbdKeyboardConfig current_sys_kbd_config;
-+
-+ if (!inited_ok)
-+ return;
-+
-+ gkbd_keyboard_config_init (&current_sys_kbd_config, xkl_engine);
-+
-+ gkbd_keyboard_config_load (&current_kbd_config,
-+ &initial_sys_kbd_config);
-+
-+ gkbd_keyboard_config_load_from_x_current (&current_sys_kbd_config,
-+ NULL);
-+
-+ if (!try_activating_xkb_config_if_new (&current_sys_kbd_config)) {
-+ if (filter_xkb_config ()) {
-+ if (!try_activating_xkb_config_if_new
-+ (&current_sys_kbd_config)) {
-+ g_warning
-+ ("Could not activate the filtered XKB configuration");
-+ activation_error ();
-+ }
-+ } else {
-+ g_warning
-+ ("Could not activate the XKB configuration");
-+ activation_error ();
-+ }
-+ } else
-+ xkl_debug (100,
-+ "Actual KBD configuration was not changed: redundant notification\n");
-+
-+ gkbd_keyboard_config_term (&current_sys_kbd_config);
-+ show_hide_icon ();
-+}
-+
-+static void
-+csd_keyboard_xkb_analyze_sysconfig (void)
-+{
-+ if (!inited_ok)
-+ return;
-+
-+ gkbd_keyboard_config_init (&initial_sys_kbd_config, xkl_engine);
-+ gkbd_keyboard_config_load_from_x_initial (&initial_sys_kbd_config,
-+ NULL);
-+}
-+
-+void
-+csd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun,
-+ void *user_data)
-+{
-+ pa_callback = fun;
-+ pa_callback_user_data = user_data;
-+}
-+
-+static GdkFilterReturn
-+csd_keyboard_xkb_evt_filter (GdkXEvent * xev, GdkEvent * event)
-+{
-+ XEvent *xevent = (XEvent *) xev;
-+ xkl_engine_filter_events (xkl_engine, xevent);
-+ return GDK_FILTER_CONTINUE;
-+}
-+
-+/* When new Keyboard is plugged in - reload the settings */
-+static void
-+csd_keyboard_new_device (XklEngine * engine)
-+{
-+ apply_desktop_settings ();
-+ apply_xkb_settings ();
-+}
-+
-+void
-+csd_keyboard_xkb_init (CsdKeyboardManager * kbd_manager)
-+{
-+ Display *display =
-+ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-+ cinnamon_settings_profile_start (NULL);
-+
-+ gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
-+ DATADIR G_DIR_SEPARATOR_S
-+ "icons");
-+
-+ manager = kbd_manager;
-+ cinnamon_settings_profile_start ("xkl_engine_get_instance");
-+ xkl_engine = xkl_engine_get_instance (display);
-+ cinnamon_settings_profile_end ("xkl_engine_get_instance");
-+ if (xkl_engine) {
-+ inited_ok = TRUE;
-+
-+ gkbd_desktop_config_init (&current_config, xkl_engine);
-+ gkbd_keyboard_config_init (&current_kbd_config,
-+ xkl_engine);
-+ xkl_engine_backup_names_prop (xkl_engine);
-+ csd_keyboard_xkb_analyze_sysconfig ();
-+
-+ settings_desktop = g_settings_new (GKBD_DESKTOP_SCHEMA);
-+ settings_keyboard = g_settings_new (GKBD_KEYBOARD_SCHEMA);
-+ g_signal_connect (settings_desktop, "changed",
-+ (GCallback) apply_desktop_settings,
-+ NULL);
-+ g_signal_connect (settings_keyboard, "changed",
-+ (GCallback) apply_xkb_settings, NULL);
-+
-+ gdk_window_add_filter (NULL, (GdkFilterFunc)
-+ csd_keyboard_xkb_evt_filter, NULL);
-+
-+ if (xkl_engine_get_features (xkl_engine) &
-+ XKLF_DEVICE_DISCOVERY)
-+ g_signal_connect (xkl_engine, "X-new-device",
-+ G_CALLBACK
-+ (csd_keyboard_new_device), NULL);
-+
-+ cinnamon_settings_profile_start ("xkl_engine_start_listen");
-+ xkl_engine_start_listen (xkl_engine,
-+ XKLL_MANAGE_LAYOUTS |
-+ XKLL_MANAGE_WINDOW_STATES);
-+ cinnamon_settings_profile_end ("xkl_engine_start_listen");
-+
-+ cinnamon_settings_profile_start ("apply_desktop_settings");
-+ apply_desktop_settings ();
-+ cinnamon_settings_profile_end ("apply_desktop_settings");
-+ cinnamon_settings_profile_start ("apply_xkb_settings");
-+ apply_xkb_settings ();
-+ cinnamon_settings_profile_end ("apply_xkb_settings");
-+ }
-+ preview_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
-+
-+ cinnamon_settings_profile_end (NULL);
-+}
-+
-+void
-+csd_keyboard_xkb_shutdown (void)
-+{
-+ if (!inited_ok)
-+ return;
-+
-+ pa_callback = NULL;
-+ pa_callback_user_data = NULL;
-+ manager = NULL;
-+
-+ if (preview_dialogs != NULL)
-+ g_hash_table_destroy (preview_dialogs);
-+
-+ if (!inited_ok)
-+ return;
-+
-+ xkl_engine_stop_listen (xkl_engine,
-+ XKLL_MANAGE_LAYOUTS |
-+ XKLL_MANAGE_WINDOW_STATES);
-+
-+ gdk_window_remove_filter (NULL, (GdkFilterFunc)
-+ csd_keyboard_xkb_evt_filter, NULL);
-+
-+ g_object_unref (settings_desktop);
-+ settings_desktop = NULL;
-+ g_object_unref (settings_keyboard);
-+ settings_keyboard = NULL;
-+
-+ if (xkl_registry) {
-+ g_object_unref (xkl_registry);
-+ }
-+
-+ g_object_unref (xkl_engine);
-+
-+ xkl_engine = NULL;
-+
-+ inited_ok = FALSE;
-+}
-diff -uNrp a/plugins/keyboard/xxx/csd-keyboard-xkb.h b/plugins/keyboard/xxx/csd-keyboard-xkb.h
---- a/plugins/keyboard/xxx/csd-keyboard-xkb.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/xxx/csd-keyboard-xkb.h 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,39 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-+ * cinnamon-settings-keyboard-xkb.h
-+ *
-+ * Copyright (C) 2001 Udaltsoft
-+ *
-+ * Written by Sergey V. Oudaltsov <svu@users.sourceforge.net>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2, or (at your option)
-+ * any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
-+ * 02110-1335, USA.
-+ */
-+
-+#ifndef __CSD_KEYBOARD_XKB_H
-+#define __CSD_KEYBOARD_XKB_H
-+
-+#include <libxklavier/xklavier.h>
-+#include "csd-keyboard-manager.h"
-+
-+void csd_keyboard_xkb_init (CsdKeyboardManager *manager);
-+void csd_keyboard_xkb_shutdown (void);
-+
-+typedef void (*PostActivationCallback) (void *userData);
-+
-+void
-+csd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun,
-+ void *userData);
-+
-+#endif
-diff -uNrp a/plugins/keyboard/xxx/delayed-dialog.c b/plugins/keyboard/xxx/delayed-dialog.c
---- a/plugins/keyboard/xxx/delayed-dialog.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/xxx/delayed-dialog.c 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,128 @@
-+/*
-+ * Copyright © 2006 Novell, Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2, or (at
-+ * your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
-+ * 02110-1335, USA.
-+ */
-+
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#include <gtk/gtk.h>
-+#include <gdk/gdkx.h>
-+
-+#include "delayed-dialog.h"
-+
-+static gboolean delayed_show_timeout (gpointer data);
-+static GdkFilterReturn message_filter (GdkXEvent *xevent,
-+ GdkEvent *event,
-+ gpointer data);
-+
-+static GSList *dialogs = NULL;
-+
-+/**
-+ * csd_delayed_show_dialog:
-+ * @dialog: the dialog
-+ *
-+ * Shows the dialog as with gtk_widget_show(), unless a window manager
-+ * hasn't been started yet, in which case it will wait up to 5 seconds
-+ * for that to happen before showing the dialog.
-+ **/
-+void
-+csd_delayed_show_dialog (GtkWidget *dialog)
-+{
-+ GdkDisplay *display = gtk_widget_get_display (dialog);
-+ Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
-+ GdkScreen *screen = gtk_widget_get_screen (dialog);
-+ char selection_name[10];
-+ Atom selection_atom;
-+
-+ /* We can't use gdk_selection_owner_get() for this, because
-+ * it's an unknown out-of-process window.
-+ */
-+ snprintf (selection_name, sizeof (selection_name), "WM_S%d",
-+ gdk_screen_get_number (screen));
-+ selection_atom = XInternAtom (xdisplay, selection_name, True);
-+ if (selection_atom &&
-+ XGetSelectionOwner (xdisplay, selection_atom) != None) {
-+ gtk_widget_show (dialog);
-+ return;
-+ }
-+
-+ dialogs = g_slist_prepend (dialogs, dialog);
-+
-+ gdk_window_add_filter (NULL, message_filter, NULL);
-+
-+ g_timeout_add (5000, delayed_show_timeout, NULL);
-+}
-+
-+static gboolean
-+delayed_show_timeout (gpointer data)
-+{
-+ GSList *l;
-+
-+ for (l = dialogs; l; l = l->next)
-+ gtk_widget_show (l->data);
-+ g_slist_free (dialogs);
-+ dialogs = NULL;
-+
-+ /* FIXME: There's no gdk_display_remove_client_message_filter */
-+
-+ return FALSE;
-+}
-+
-+static GdkFilterReturn
-+message_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
-+{
-+ XClientMessageEvent *evt;
-+ char *selection_name;
-+ int screen;
-+ GSList *l, *next;
-+
-+ if (((XEvent *)xevent)->type != ClientMessage)
-+ return GDK_FILTER_CONTINUE;
-+
-+ evt = (XClientMessageEvent *)xevent;
-+
-+ if (evt->message_type != XInternAtom (evt->display, "MANAGER", FALSE))
-+ return GDK_FILTER_CONTINUE;
-+
-+ selection_name = XGetAtomName (evt->display, evt->data.l[1]);
-+
-+ if (strncmp (selection_name, "WM_S", 4) != 0) {
-+ XFree (selection_name);
-+ return GDK_FILTER_CONTINUE;
-+ }
-+
-+ screen = atoi (selection_name + 4);
-+
-+ for (l = dialogs; l; l = next) {
-+ GtkWidget *dialog = l->data;
-+ next = l->next;
-+
-+ if (gdk_screen_get_number (gtk_widget_get_screen (dialog)) == screen) {
-+ gtk_widget_show (dialog);
-+ dialogs = g_slist_remove (dialogs, dialog);
-+ }
-+ }
-+
-+ if (!dialogs) {
-+ gdk_window_remove_filter (NULL, message_filter, NULL);
-+ }
-+
-+ XFree (selection_name);
-+
-+ return GDK_FILTER_CONTINUE;
-+}
-diff -uNrp a/plugins/keyboard/xxx/delayed-dialog.h b/plugins/keyboard/xxx/delayed-dialog.h
---- a/plugins/keyboard/xxx/delayed-dialog.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/xxx/delayed-dialog.h 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,32 @@
-+/*
-+ * Copyright © 2006 Novell, Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2, or (at
-+ * your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
-+ * 02110-1335, USA.
-+ */
-+
-+
-+#ifndef __DELAYED_DIALOG_H
-+#define __DELAYED_DIALOG_H
-+
-+#include <gtk/gtk.h>
-+
-+G_BEGIN_DECLS
-+
-+void csd_delayed_show_dialog (GtkWidget *dialog);
-+
-+G_END_DECLS
-+
-+#endif
-diff -uNrp a/plugins/keyboard/xxx/gkbd-configuration.c b/plugins/keyboard/xxx/gkbd-configuration.c
---- a/plugins/keyboard/xxx/gkbd-configuration.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/xxx/gkbd-configuration.c 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,350 @@
-+/*
-+ * Copyright (C) 2010 Canonical Ltd.
-+ *
-+ * Authors: Jan Arne Petersen <jpetersen@openismus.com>
-+ *
-+ * Based on gkbd-status.c by Sergey V. Udaltsov <svu@gnome.org>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
-+ * Boston, MA 02110-1335, USA.
-+ */
-+
-+#include <memory.h>
-+
-+#include <gdk/gdkkeysyms.h>
-+#include <gdk/gdkx.h>
-+#include <glib/gi18n.h>
-+
-+#include <libgnomekbd/gkbd-desktop-config.h>
-+#include <libgnomekbd/gkbd-indicator-config.h>
-+
-+#include "gkbd-configuration.h"
-+
-+struct _GkbdConfigurationPrivate {
-+ XklEngine *engine;
-+ XklConfigRegistry *registry;
-+
-+ GkbdDesktopConfig cfg;
-+ GkbdIndicatorConfig ind_cfg;
-+ GkbdKeyboardConfig kbd_cfg;
-+
-+ gchar **full_group_names;
-+ gchar **short_group_names;
-+
-+ gulong state_changed_handler;
-+ gulong config_changed_handler;
-+};
-+
-+enum {
-+ SIGNAL_CHANGED,
-+ SIGNAL_GROUP_CHANGED,
-+ LAST_SIGNAL
-+};
-+
-+static guint signals[LAST_SIGNAL] = { 0, };
-+
-+#define GKBD_CONFIGURATION_GET_PRIVATE(o) \
-+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), GKBD_TYPE_CONFIGURATION, GkbdConfigurationPrivate))
-+
-+G_DEFINE_TYPE (GkbdConfiguration, gkbd_configuration, G_TYPE_OBJECT)
-+
-+/* Should be called once for all widgets */
-+static void
-+gkbd_configuration_cfg_changed (GSettings *settings,
-+ const char *key,
-+ GkbdConfiguration * configuration)
-+{
-+ GkbdConfigurationPrivate *priv = configuration->priv;
-+
-+ xkl_debug (100,
-+ "General configuration changed in GSettings - reiniting...\n");
-+ gkbd_desktop_config_load (&priv->cfg);
-+ gkbd_desktop_config_activate (&priv->cfg);
-+
-+ g_signal_emit (configuration,
-+ signals[SIGNAL_CHANGED], 0);
-+}
-+
-+/* Should be called once for all widgets */
-+static void
-+gkbd_configuration_ind_cfg_changed (GSettings *settings,
-+ const char *key,
-+ GkbdConfiguration * configuration)
-+{
-+ GkbdConfigurationPrivate *priv = configuration->priv;
-+ xkl_debug (100,
-+ "Applet configuration changed in GSettings - reiniting...\n");
-+ gkbd_indicator_config_load (&priv->ind_cfg);
-+
-+ gkbd_indicator_config_free_image_filenames (&priv->ind_cfg);
-+ gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
-+ &priv->kbd_cfg);
-+
-+ gkbd_indicator_config_activate (&priv->ind_cfg);
-+
-+ g_signal_emit (configuration,
-+ signals[SIGNAL_CHANGED], 0);
-+}
-+
-+static void
-+gkbd_configuration_load_group_names (GkbdConfiguration * configuration,
-+ XklConfigRec * xklrec)
-+{
-+ GkbdConfigurationPrivate *priv = configuration->priv;
-+
-+ if (!gkbd_desktop_config_load_group_descriptions (&priv->cfg,
-+ priv->registry,
-+ (const char **) xklrec->layouts,
-+ (const char **) xklrec->variants,
-+ &priv->short_group_names,
-+ &priv->full_group_names)) {
-+ /* We just populate no short names (remain NULL) -
-+ * full names are going to be used anyway */
-+ gint i, total_groups =
-+ xkl_engine_get_num_groups (priv->engine);
-+ xkl_debug (150, "group descriptions loaded: %d!\n",
-+ total_groups);
-+ priv->full_group_names =
-+ g_new0 (char *, total_groups + 1);
-+
-+ if (xkl_engine_get_features (priv->engine) &
-+ XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
-+ for (i = 0; priv->kbd_cfg.layouts_variants[i]; i++) {
-+ priv->full_group_names[i] =
-+ g_strdup ((char *) priv->kbd_cfg.layouts_variants[i]);
-+ }
-+ } else {
-+ for (i = total_groups; --i >= 0;) {
-+ priv->full_group_names[i] =
-+ g_strdup_printf ("Group %d", i);
-+ }
-+ }
-+ }
-+}
-+
-+/* Should be called once for all widgets */
-+static void
-+gkbd_configuration_kbd_cfg_callback (XklEngine *engine,
-+ GkbdConfiguration *configuration)
-+{
-+ GkbdConfigurationPrivate *priv = configuration->priv;
-+ XklConfigRec *xklrec = xkl_config_rec_new ();
-+ xkl_debug (100,
-+ "XKB configuration changed on X Server - reiniting...\n");
-+
-+ gkbd_keyboard_config_load_from_x_current (&priv->kbd_cfg,
-+ xklrec);
-+
-+ gkbd_indicator_config_free_image_filenames (&priv->ind_cfg);
-+ gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
-+ &priv->kbd_cfg);
-+
-+ g_strfreev (priv->full_group_names);
-+ priv->full_group_names = NULL;
-+
-+ g_strfreev (priv->short_group_names);
-+ priv->short_group_names = NULL;
-+
-+ gkbd_configuration_load_group_names (configuration,
-+ xklrec);
-+
-+ g_signal_emit (configuration,
-+ signals[SIGNAL_CHANGED],
-+ 0);
-+
-+ g_object_unref (G_OBJECT (xklrec));
-+}
-+
-+/* Should be called once for all applets */
-+static void
-+gkbd_configuration_state_callback (XklEngine * engine,
-+ XklEngineStateChange changeType,
-+ gint group, gboolean restore,
-+ GkbdConfiguration * configuration)
-+{
-+ xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
-+
-+ if (changeType == GROUP_CHANGED) {
-+ g_signal_emit (configuration,
-+ signals[SIGNAL_GROUP_CHANGED], 0,
-+ group);
-+ }
-+}
-+
-+static void
-+gkbd_configuration_init (GkbdConfiguration *configuration)
-+{
-+ GkbdConfigurationPrivate *priv;
-+ XklConfigRec *xklrec = xkl_config_rec_new ();
-+
-+ priv = GKBD_CONFIGURATION_GET_PRIVATE (configuration);
-+ configuration->priv = priv;
-+
-+ priv->engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
-+ if (priv->engine == NULL) {
-+ xkl_debug (0, "Libxklavier initialization error");
-+ return;
-+ }
-+
-+ priv->state_changed_handler =
-+ g_signal_connect (priv->engine, "X-state-changed",
-+ G_CALLBACK (gkbd_configuration_state_callback),
-+ configuration);
-+ priv->config_changed_handler =
-+ g_signal_connect (priv->engine, "X-config-changed",
-+ G_CALLBACK (gkbd_configuration_kbd_cfg_callback),
-+ configuration);
-+
-+ gkbd_desktop_config_init (&priv->cfg, priv->engine);
-+ gkbd_keyboard_config_init (&priv->kbd_cfg, priv->engine);
-+ gkbd_indicator_config_init (&priv->ind_cfg, priv->engine);
-+
-+ gkbd_desktop_config_load (&priv->cfg);
-+ gkbd_desktop_config_activate (&priv->cfg);
-+
-+ priv->registry = xkl_config_registry_get_instance (priv->engine);
-+ xkl_config_registry_load (priv->registry,
-+ priv->cfg.load_extra_items);
-+
-+ gkbd_keyboard_config_load_from_x_current (&priv->kbd_cfg,
-+ xklrec);
-+
-+ gkbd_indicator_config_load (&priv->ind_cfg);
-+
-+ gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
-+ &priv->kbd_cfg);
-+
-+ gkbd_indicator_config_activate (&priv->ind_cfg);
-+
-+ gkbd_configuration_load_group_names (configuration,
-+ xklrec);
-+ g_object_unref (G_OBJECT (xklrec));
-+
-+ gkbd_desktop_config_start_listen (&priv->cfg,
-+ G_CALLBACK (gkbd_configuration_cfg_changed),
-+ configuration);
-+ gkbd_indicator_config_start_listen (&priv->ind_cfg,
-+ G_CALLBACK (gkbd_configuration_ind_cfg_changed),
-+ configuration);
-+ xkl_engine_start_listen (priv->engine,
-+ XKLL_TRACK_KEYBOARD_STATE);
-+
-+ xkl_debug (100, "Initiating the widget startup process for %p\n",
-+ configuration);
-+}
-+
-+static void
-+gkbd_configuration_finalize (GObject * obj)
-+{
-+ GkbdConfiguration *configuration = GKBD_CONFIGURATION (obj);
-+ GkbdConfigurationPrivate *priv = configuration->priv;
-+
-+ xkl_debug (100,
-+ "Starting the gnome-kbd-configuration widget shutdown process for %p\n",
-+ configuration);
-+
-+ xkl_engine_stop_listen (priv->engine,
-+ XKLL_TRACK_KEYBOARD_STATE);
-+
-+ gkbd_desktop_config_stop_listen (&priv->cfg);
-+ gkbd_indicator_config_stop_listen (&priv->ind_cfg);
-+
-+ gkbd_indicator_config_term (&priv->ind_cfg);
-+ gkbd_keyboard_config_term (&priv->kbd_cfg);
-+ gkbd_desktop_config_term (&priv->cfg);
-+
-+ if (g_signal_handler_is_connected (priv->engine,
-+ priv->state_changed_handler)) {
-+ g_signal_handler_disconnect (priv->engine,
-+ priv->state_changed_handler);
-+ priv->state_changed_handler = 0;
-+ }
-+ if (g_signal_handler_is_connected (priv->engine,
-+ priv->config_changed_handler)) {
-+ g_signal_handler_disconnect (priv->engine,
-+ priv->config_changed_handler);
-+ priv->config_changed_handler = 0;
-+ }
-+
-+ g_object_unref (priv->registry);
-+ priv->registry = NULL;
-+ g_object_unref (priv->engine);
-+ priv->engine = NULL;
-+
-+ G_OBJECT_CLASS (gkbd_configuration_parent_class)->finalize (obj);
-+}
-+
-+static void
-+gkbd_configuration_class_init (GkbdConfigurationClass * klass)
-+{
-+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
-+
-+ /* Initing vtable */
-+ object_class->finalize = gkbd_configuration_finalize;
-+
-+ /* Signals */
-+ signals[SIGNAL_CHANGED] = g_signal_new ("changed",
-+ GKBD_TYPE_CONFIGURATION,
-+ G_SIGNAL_RUN_LAST,
-+ 0,
-+ NULL, NULL,
-+ g_cclosure_marshal_VOID__VOID,
-+ G_TYPE_NONE,
-+ 0);
-+ signals[SIGNAL_GROUP_CHANGED] = g_signal_new ("group-changed",
-+ GKBD_TYPE_CONFIGURATION,
-+ G_SIGNAL_RUN_LAST,
-+ 0,
-+ NULL, NULL,
-+ g_cclosure_marshal_VOID__INT,
-+ G_TYPE_NONE,
-+ 1,
-+ G_TYPE_INT);
-+
-+ g_type_class_add_private (klass, sizeof (GkbdConfigurationPrivate));
-+}
-+
-+GkbdConfiguration *
-+gkbd_configuration_get (void)
-+{
-+ static gpointer instance = NULL;
-+
-+ if (!instance) {
-+ instance = g_object_new (GKBD_TYPE_CONFIGURATION, NULL);
-+ g_object_add_weak_pointer (instance, &instance);
-+ } else {
-+ g_object_ref (instance);
-+ }
-+
-+ return instance;
-+}
-+
-+XklEngine *
-+gkbd_configuration_get_xkl_engine (GkbdConfiguration *configuration)
-+{
-+ return configuration->priv->engine;
-+}
-+
-+const char * const *
-+gkbd_configuration_get_group_names (GkbdConfiguration *configuration)
-+{
-+ return configuration->priv->full_group_names;
-+}
-+
-+const char * const *
-+gkbd_configuration_get_short_group_names (GkbdConfiguration *configuration)
-+{
-+ return configuration->priv->short_group_names;
-+}
-diff -uNrp a/plugins/keyboard/xxx/gkbd-configuration.h b/plugins/keyboard/xxx/gkbd-configuration.h
---- a/plugins/keyboard/xxx/gkbd-configuration.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/plugins/keyboard/xxx/gkbd-configuration.h 2013-08-25 16:36:02.000000000 +0100
-@@ -0,0 +1,65 @@
-+/*
-+ * Copyright (C) 2010 Canonical Ltd.
-+ *
-+ * Authors: Jan Arne Petersen <jpetersen@openismus.com>
-+ *
-+ * Based on gkbd-status.h by Sergey V. Udaltsov <svu@gnome.org>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
-+ * Boston, MA 02110-1335, USA.
-+ */
-+
-+#ifndef __GKBD_CONFIGURATION_H__
-+#define __GKBD_CONFIGURATION_H__
-+
-+#include <glib-object.h>
-+
-+#include <libxklavier/xklavier.h>
-+
-+G_BEGIN_DECLS
-+
-+typedef struct _GkbdConfiguration GkbdConfiguration;
-+typedef struct _GkbdConfigurationPrivate GkbdConfigurationPrivate;
-+typedef struct _GkbdConfigurationClass GkbdConfigurationClass;
-+
-+#define GKBD_TYPE_CONFIGURATION (gkbd_configuration_get_type ())
-+#define GKBD_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfiguration))
-+#define GKBD_INDCATOR_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfigurationClass))
-+#define GKBD_IS_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKBD_TYPE_CONFIGURATION))
-+#define GKBD_IS_CONFIGURATION_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GKBD_TYPE_CONFIGURATION))
-+#define GKBD_CONFIGURATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfigurationClass))
-+
-+struct _GkbdConfiguration {
-+ GObject parent;
-+
-+ GkbdConfigurationPrivate *priv;
-+};
-+
-+struct _GkbdConfigurationClass {
-+ GObjectClass parent_class;
-+};
-+
-+extern GType gkbd_configuration_get_type (void);
-+
-+extern GkbdConfiguration *gkbd_configuration_get (void);
-+
-+extern XklEngine *gkbd_configuration_get_xkl_engine (GkbdConfiguration *configuration);
-+
-+extern const char * const *gkbd_configuration_get_group_names (GkbdConfiguration *configuration);
-+extern const char * const *gkbd_configuration_get_short_group_names (GkbdConfiguration *configuration);
-+
-+G_END_DECLS
-+
-+#endif
-diff -uNrp a/plugins/media-keys/csd-media-keys-manager.c b/plugins/media-keys/csd-media-keys-manager.c
---- a/plugins/media-keys/csd-media-keys-manager.c 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/media-keys/csd-media-keys-manager.c 2013-08-25 16:36:02.000000000 +0100
-@@ -120,6 +120,10 @@ static const gchar kb_introspection_xml[
- #define VOLUME_STEP 6 /* percents for one volume button press */
- #define MAX_VOLUME 65536.0
-
-+#define GNOME_DESKTOP_INPUT_SOURCES_DIR "org.cinnamon.desktop.input-sources"
-+#define KEY_CURRENT_INPUT_SOURCE "current"
-+#define KEY_INPUT_SOURCES "sources"
-+
- #define CSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CSD_TYPE_MEDIA_KEYS_MANAGER, CsdMediaKeysManagerPrivate))
-
- typedef struct {
-@@ -1750,6 +1754,40 @@ do_keyboard_brightness_action (CsdMediaK
- manager);
- }
-
-+static void
-+do_switch_input_source_action (CsdMediaKeysManager *manager,
-+ MediaKeyType type)
-+{
-+ GSettings *settings;
-+ GVariant *sources;
-+ gint i, n;
-+
-+ settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
-+ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
-+
-+ n = g_variant_n_children (sources);
-+ if (n < 2)
-+ goto out;
-+
-+ i = g_settings_get_uint (settings, KEY_CURRENT_INPUT_SOURCE);
-+
-+ if (type == SWITCH_INPUT_SOURCE_KEY)
-+ i += 1;
-+ else
-+ i -= 1;
-+
-+ if (i < 0)
-+ i = n - 1;
-+ else if (i >= n)
-+ i = 0;
-+
-+ g_settings_set_uint (settings, KEY_CURRENT_INPUT_SOURCE, i);
-+
-+ out:
-+ g_variant_unref (sources);
-+ g_object_unref (settings);
-+}
-+
- static gboolean
- do_action (CsdMediaKeysManager *manager,
- guint deviceid,
-@@ -1908,6 +1946,10 @@ do_action (CsdMediaKeysManager *manager,
- case BATTERY_KEY:
- do_execute_desktop (manager, "gnome-power-statistics.desktop", timestamp);
- break;
-+ case SWITCH_INPUT_SOURCE_KEY:
-+ case SWITCH_INPUT_SOURCE_BACKWARD_KEY:
-+ do_switch_input_source_action (manager, type);
-+ break;
- /* Note, no default so compiler catches missing keys */
- case CUSTOM_KEY:
- g_assert_not_reached ();
-diff -uNrp a/plugins/media-keys/shortcuts-list.h b/plugins/media-keys/shortcuts-list.h
---- a/plugins/media-keys/shortcuts-list.h 2013-08-24 18:04:31.000000000 +0100
-+++ b/plugins/media-keys/shortcuts-list.h 2013-08-25 16:36:02.000000000 +0100
-@@ -81,6 +81,8 @@ typedef enum {
- KEYBOARD_BRIGHTNESS_DOWN_KEY,
- KEYBOARD_BRIGHTNESS_TOGGLE_KEY,
- BATTERY_KEY,
-+ SWITCH_INPUT_SOURCE_KEY,
-+ SWITCH_INPUT_SOURCE_BACKWARD_KEY,
- CUSTOM_KEY
- } MediaKeyType;
-
-@@ -148,6 +150,9 @@ static struct {
- { KEYBOARD_BRIGHTNESS_UP_KEY, NULL, "XF86KbdBrightnessUp" },
- { KEYBOARD_BRIGHTNESS_DOWN_KEY, NULL, "XF86KbdBrightnessDown" },
- { KEYBOARD_BRIGHTNESS_TOGGLE_KEY, NULL, "XF86KbdLightOnOff" },
-+ { SWITCH_INPUT_SOURCE_KEY, "switch-input-source", NULL },
-+ { SWITCH_INPUT_SOURCE_BACKWARD_KEY, "switch-input-source-backward", NULL },
-+
- { BATTERY_KEY, NULL, "XF86Battery" },
- };
-
diff --git a/community/cinnamon-settings-daemon/remove_obsolete_battery_recall_code.patch b/community/cinnamon-settings-daemon/remove_obsolete_battery_recall_code.patch
deleted file mode 100644
index fca763689..000000000
--- a/community/cinnamon-settings-daemon/remove_obsolete_battery_recall_code.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-diff -uNrp a/data/org.cinnamon.settings-daemon.plugins.power.gschema.xml.in.in b/data/org.cinnamon.settings-daemon.plugins.power.gschema.xml.in.in
---- a/data/org.cinnamon.settings-daemon.plugins.power.gschema.xml.in.in 2013-11-03 15:50:04.000000000 +0000
-+++ b/data/org.cinnamon.settings-daemon.plugins.power.gschema.xml.in.in 2013-11-09 12:39:50.907354689 +0000
-@@ -141,11 +141,6 @@
- <_summary>Whether to use time-based notifications</_summary>
- <_description>If time based notifications should be used. If set to false, then the percentage change is used instead, which may fix a broken ACPI BIOS.</_description>
- </key>
-- <key name="notify-perhaps-recall" type="b">
-- <default>true</default>
-- <_summary>If we should show the recalled battery warning for a broken battery</_summary>
-- <_description>If we should show the recalled battery warning for a broken battery. Set this to false only if you know your battery is okay.</_description>
-- </key>
- <key name="lock-on-suspend" type="b">
- <default>false</default>
- <_summary>If the computer should lock when entering suspend mode</_summary>
-diff -uNrp a/plugins/power/csd-power-manager.c b/plugins/power/csd-power-manager.c
---- a/plugins/power/csd-power-manager.c 2013-11-03 15:50:04.000000000 +0000
-+++ b/plugins/power/csd-power-manager.c 2013-11-09 12:38:55.358363329 +0000
-@@ -75,7 +75,6 @@
- #define CSD_POWER_MANAGER_NOTIFY_TIMEOUT_LONG 30 * 1000 /* ms */
-
- #define CSD_POWER_MANAGER_CRITICAL_ALERT_TIMEOUT 5 /* seconds */
--#define CSD_POWER_MANAGER_RECALL_DELAY 30 /* seconds */
- #define CSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT 30 /* seconds */
-
- /* Keep this in sync with gnome-shell */
-@@ -930,146 +929,9 @@ out:
- return device;
- }
-
--typedef struct {
-- CsdPowerManager *manager;
-- UpDevice *device;
--} CsdPowerManagerRecallData;
--
--static void
--device_perhaps_recall_response_cb (GtkDialog *dialog,
-- gint response_id,
-- CsdPowerManagerRecallData *recall_data)
--{
-- GdkScreen *screen;
-- GtkWidget *dialog_error;
-- GError *error = NULL;
-- gboolean ret;
-- gchar *website = NULL;
--
-- /* don't show this again */
-- if (response_id == GTK_RESPONSE_CANCEL) {
-- g_settings_set_boolean (recall_data->manager->priv->settings,
-- "notify-perhaps-recall",
-- FALSE);
-- goto out;
-- }
--
-- /* visit recall website */
-- if (response_id == GTK_RESPONSE_OK) {
--
-- g_object_get (recall_data->device,
-- "recall-url", &website,
-- NULL);
--
-- screen = gdk_screen_get_default();
-- ret = gtk_show_uri (screen,
-- website,
-- gtk_get_current_event_time (),
-- &error);
-- if (!ret) {
-- dialog_error = gtk_message_dialog_new (NULL,
-- GTK_DIALOG_MODAL,
-- GTK_MESSAGE_INFO,
-- GTK_BUTTONS_OK,
-- "Failed to show url %s",
-- error->message);
-- gtk_dialog_run (GTK_DIALOG (dialog_error));
-- g_error_free (error);
-- }
-- }
--out:
-- gtk_widget_destroy (GTK_WIDGET (dialog));
-- g_object_unref (recall_data->device);
-- g_object_unref (recall_data->manager);
-- g_free (recall_data);
-- g_free (website);
-- return;
--}
--
--static gboolean
--device_perhaps_recall_delay_cb (gpointer user_data)
--{
-- gchar *vendor;
-- const gchar *title = NULL;
-- GString *message = NULL;
-- GtkWidget *dialog;
-- CsdPowerManagerRecallData *recall_data = (CsdPowerManagerRecallData *) user_data;
--
-- g_object_get (recall_data->device,
-- "recall-vendor", &vendor,
-- NULL);
--
-- /* TRANSLATORS: the battery may be recalled by its vendor */
-- title = _("Battery may be recalled");
-- message = g_string_new ("");
-- g_string_append_printf (message,
-- _("A battery in your computer may have been "
-- "recalled by %s and you may be at risk."), vendor);
-- g_string_append (message, "\n\n");
-- g_string_append (message, _("For more information visit the battery recall website."));
-- dialog = gtk_message_dialog_new_with_markup (NULL,
-- GTK_DIALOG_DESTROY_WITH_PARENT,
-- GTK_MESSAGE_INFO,
-- GTK_BUTTONS_CLOSE,
-- "<span size='larger'><b>%s</b></span>",
-- title);
-- gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog),
-- "%s", message->str);
--
-- /* TRANSLATORS: button text, visit the manufacturers recall website */
-- gtk_dialog_add_button (GTK_DIALOG (dialog), _("Visit recall website"),
-- GTK_RESPONSE_OK);
--
-- /* TRANSLATORS: button text, do not show this bubble again */
-- gtk_dialog_add_button (GTK_DIALOG (dialog), _("Do not show me this again"),
-- GTK_RESPONSE_CANCEL);
--
-- gtk_widget_show (dialog);
-- g_signal_connect (dialog, "response",
-- G_CALLBACK (device_perhaps_recall_response_cb),
-- recall_data);
--
-- g_string_free (message, TRUE);
-- g_free (vendor);
-- return FALSE;
--}
--
--static void
--device_perhaps_recall (CsdPowerManager *manager, UpDevice *device)
--{
-- gboolean ret;
-- guint timer_id;
-- CsdPowerManagerRecallData *recall_data;
--
-- /* don't show when running under GDM */
-- if (g_getenv ("RUNNING_UNDER_GDM") != NULL) {
-- g_debug ("running under gdm, so no notification");
-- return;
-- }
--
-- /* already shown, and dismissed */
-- ret = g_settings_get_boolean (manager->priv->settings,
-- "notify-perhaps-recall");
-- if (!ret) {
-- g_debug ("settings prevents recall notification");
-- return;
-- }
--
-- recall_data = g_new0 (CsdPowerManagerRecallData, 1);
-- recall_data->manager = g_object_ref (manager);
-- recall_data->device = g_object_ref (device);
--
-- /* delay by a few seconds so the session can load */
-- timer_id = g_timeout_add_seconds (CSD_POWER_MANAGER_RECALL_DELAY,
-- device_perhaps_recall_delay_cb,
-- recall_data);
-- g_source_set_name_by_id (timer_id, "[CsdPowerManager] perhaps-recall");
--}
--
- static void
- engine_device_add (CsdPowerManager *manager, UpDevice *device)
- {
-- gboolean recall_notice;
- CsdPowerManagerWarning warning;
- UpDeviceState state;
- UpDeviceKind kind;
-@@ -1085,7 +947,6 @@ engine_device_add (CsdPowerManager *mana
- g_object_get (device,
- "kind", &kind,
- "state", &state,
-- "recall-notice", &recall_notice,
- NULL);
-
- /* add old state for transitions */
-@@ -1109,43 +970,6 @@ engine_device_add (CsdPowerManager *mana
- "engine-state-old",
- GUINT_TO_POINTER(state));
- }
--
-- /* the device is recalled */
-- if (recall_notice)
-- device_perhaps_recall (manager, device);
--}
--
--static gboolean
--engine_check_recall (CsdPowerManager *manager, UpDevice *device)
--{
-- UpDeviceKind kind;
-- gboolean recall_notice = FALSE;
-- gchar *recall_vendor = NULL;
-- gchar *recall_url = NULL;
--
-- /* get device properties */
-- g_object_get (device,
-- "kind", &kind,
-- "recall-notice", &recall_notice,
-- "recall-vendor", &recall_vendor,
-- "recall-url", &recall_url,
-- NULL);
--
-- /* not battery */
-- if (kind != UP_DEVICE_KIND_BATTERY)
-- goto out;
--
-- /* no recall data */
-- if (!recall_notice)
-- goto out;
--
-- /* emit signal for manager */
-- g_debug ("** EMIT: perhaps-recall");
-- g_debug ("%s-%s", recall_vendor, recall_url);
--out:
-- g_free (recall_vendor);
-- g_free (recall_url);
-- return recall_notice;
- }
-
- static gboolean
-@@ -1177,7 +1001,6 @@ engine_coldplug (CsdPowerManager *manage
- for (i = 0; array != NULL && i < array->len; i++) {
- device = g_ptr_array_index (array, i);
- engine_device_add (manager, device);
-- engine_check_recall (manager, device);
- }
- out:
- if (array != NULL)
-@@ -1191,8 +1014,6 @@ engine_device_added_cb (UpClient *client
- {
- /* add to list */
- g_ptr_array_add (manager->priv->devices_array, g_object_ref (device));
-- engine_check_recall (manager, device);
--
- engine_recalculate_state (manager);
- }
-
diff --git a/community/cinnamon-settings-daemon/systemd-support.patch b/community/cinnamon-settings-daemon/systemd-support.patch
deleted file mode 100644
index 3c8b115e8..000000000
--- a/community/cinnamon-settings-daemon/systemd-support.patch
+++ /dev/null
@@ -1,535 +0,0 @@
-diff --git a/plugins/media-keys/csd-media-keys-manager.c b/plugins/media-keys/csd-media-keys-manager.c
-index 02930a3..7c1c519 100644
---- a/plugins/media-keys/csd-media-keys-manager.c
-+++ b/plugins/media-keys/csd-media-keys-manager.c
-@@ -39,6 +39,7 @@
- #include <gdk/gdkx.h>
- #include <gtk/gtk.h>
- #include <gio/gdesktopappinfo.h>
-+#include <gio/gunixfdlist.h>
-
- #ifdef HAVE_GUDEV
- #include <gudev/gudev.h>
-@@ -121,6 +122,10 @@ static const gchar kb_introspection_xml[] =
- #define VOLUME_STEP 5 /* percents for one volume button press */
- #define MAX_VOLUME 65536.0
-
-+#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
-+#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
-+#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
-+
- #define CSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CSD_TYPE_MEDIA_KEYS_MANAGER, CsdMediaKeysManagerPrivate))
-
- typedef struct {
-@@ -167,6 +172,10 @@ struct CsdMediaKeysManagerPrivate
- GDBusProxy *power_screen_proxy;
- GDBusProxy *power_keyboard_proxy;
-
-+ /* systemd stuff */
-+ GDBusProxy *logind_proxy;
-+ gint inhibit_keys_fd;
-+
- /* Multihead stuff */
- GdkScreen *current_screen;
- GSList *screens;
-@@ -2213,6 +2222,11 @@ csd_media_keys_manager_stop (CsdMediaKeysManager *manager)
- }
- #endif /* HAVE_GUDEV */
-
-+ if (priv->logind_proxy) {
-+ g_object_unref (priv->logind_proxy);
-+ priv->logind_proxy = NULL;
-+ }
-+
- if (priv->settings) {
- g_object_unref (priv->settings);
- priv->settings = NULL;
-@@ -2356,9 +2370,85 @@ csd_media_keys_manager_class_init (CsdMediaKeysManagerClass *klass)
- }
-
- static void
-+inhibit_done (GObject *source,
-+ GAsyncResult *result,
-+ gpointer user_data)
-+{
-+ GDBusProxy *proxy = G_DBUS_PROXY (source);
-+ CsdMediaKeysManager *manager = CSD_MEDIA_KEYS_MANAGER (user_data);
-+ GError *error = NULL;
-+ GVariant *res;
-+ GUnixFDList *fd_list = NULL;
-+ gint idx;
-+
-+ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
-+ if (res == NULL) {
-+ g_warning ("Unable to inhibit keypresses: %s", error->message);
-+ g_error_free (error);
-+ } else {
-+ g_variant_get (res, "(h)", &idx);
-+ manager->priv->inhibit_keys_fd = g_unix_fd_list_get (fd_list, idx, &error);
-+ if (manager->priv->inhibit_keys_fd == -1) {
-+ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
-+ g_error_free (error);
-+ }
-+ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_keys_fd);
-+ g_object_unref (fd_list);
-+ g_variant_unref (res);
-+ }
-+}
-+
-+static void
- csd_media_keys_manager_init (CsdMediaKeysManager *manager)
- {
-+ GError *error;
-+ GDBusConnection *bus;
-+
-+ error = NULL;
- manager->priv = CSD_MEDIA_KEYS_MANAGER_GET_PRIVATE (manager);
-+
-+ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
-+ if (bus == NULL) {
-+ g_warning ("Failed to connect to system bus: %s",
-+ error->message);
-+ g_error_free (error);
-+ return;
-+ }
-+
-+ manager->priv->logind_proxy =
-+ g_dbus_proxy_new_sync (bus,
-+ 0,
-+ NULL,
-+ SYSTEMD_DBUS_NAME,
-+ SYSTEMD_DBUS_PATH,
-+ SYSTEMD_DBUS_INTERFACE,
-+ NULL,
-+ &error);
-+
-+ if (manager->priv->logind_proxy == NULL) {
-+ g_warning ("Failed to connect to systemd: %s",
-+ error->message);
-+ g_error_free (error);
-+ }
-+
-+ g_object_unref (bus);
-+
-+ g_debug ("Adding system inhibitors for power keys");
-+ manager->priv->inhibit_keys_fd = -1;
-+ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
-+ "Inhibit",
-+ g_variant_new ("(ssss)",
-+ "handle-power-key:handle-suspend-key:handle-hibernate-key",
-+ g_get_user_name (),
-+ "Cinnamon handling keypresses",
-+ "block"),
-+ 0,
-+ G_MAXINT,
-+ NULL,
-+ NULL,
-+ inhibit_done,
-+ manager);
-+
- }
-
- static void
-@@ -2375,6 +2465,8 @@ csd_media_keys_manager_finalize (GObject *object)
-
- if (media_keys_manager->priv->start_idle_id != 0)
- g_source_remove (media_keys_manager->priv->start_idle_id);
-+ if (media_keys_manager->priv->inhibit_keys_fd != -1)
-+ close (media_keys_manager->priv->inhibit_keys_fd);
-
- G_OBJECT_CLASS (csd_media_keys_manager_parent_class)->finalize (object);
- }
-diff --git a/plugins/power/csd-power-manager.c b/plugins/power/csd-power-manager.c
-index b54cb5b..b9c5429 100644
---- a/plugins/power/csd-power-manager.c
-+++ b/plugins/power/csd-power-manager.c
-@@ -32,6 +32,7 @@
- #include <libupower-glib/upower.h>
- #include <libnotify/notify.h>
- #include <canberra-gtk.h>
-+#include <gio/gunixfdlist.h>
-
- #include <X11/extensions/dpms.h>
-
-@@ -79,6 +80,10 @@
- #define CSD_POWER_MANAGER_CRITICAL_ALERT_TIMEOUT 5 /* seconds */
- #define CSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT 30 /* seconds */
-
-+#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
-+#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
-+#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
-+
- /* Keep this in sync with gnome-shell */
- #define SCREENSAVER_FADE_TIME 10 /* seconds */
-
-@@ -203,6 +208,13 @@ struct CsdPowerManagerPrivate
- GtkStatusIcon *status_icon;
- guint xscreensaver_watchdog_timer_id;
- gboolean is_virtual_machine;
-+
-+ /* systemd stuff */
-+ GDBusProxy *logind_proxy;
-+ gint inhibit_lid_switch_fd;
-+ gboolean inhibit_lid_switch_taken;
-+ gint inhibit_suspend_fd;
-+ gboolean inhibit_suspend_taken;
- };
-
- enum {
-@@ -3350,30 +3362,6 @@ lock_screensaver (CsdPowerManager *manager)
- if (!do_lock)
- return;
-
-- /* connect to the screensaver first */
-- g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
-- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
-- NULL,
-- GS_DBUS_NAME,
-- GS_DBUS_PATH,
-- GS_DBUS_INTERFACE,
-- NULL,
-- sleep_cb_screensaver_proxy_ready_cb,
-- manager);
--}
--
--static void
--upower_notify_sleep_cb (UpClient *client,
-- UpSleepKind sleep_kind,
-- CsdPowerManager *manager)
--{
-- gboolean do_lock;
--
-- do_lock = g_settings_get_boolean (manager->priv->settings,
-- "lock-on-suspend");
-- if (!do_lock)
-- return;
--
- /* connect to the screensaver first */
- g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
-@@ -3384,46 +3372,6 @@ upower_notify_sleep_cb (UpClient *client,
- NULL,
- sleep_cb_screensaver_proxy_ready_cb,
- manager);
--
--}
--
--static void
--upower_notify_resume_cb (UpClient *client,
-- UpSleepKind sleep_kind,
-- CsdPowerManager *manager)
--{
-- gboolean ret;
-- GError *error = NULL;
--
-- /* this displays the unlock dialogue so the user doesn't have
-- * to move the mouse or press any key before the window comes up */
-- if (manager->priv->screensaver_proxy != NULL) {
-- g_dbus_proxy_call (manager->priv->screensaver_proxy,
-- "SimulateUserActivity",
-- NULL,
-- G_DBUS_CALL_FLAGS_NONE,
-- -1, NULL, NULL, NULL);
-- }
--
-- if (manager->priv->screensaver_proxy != NULL) {
-- g_object_unref (manager->priv->screensaver_proxy);
-- manager->priv->screensaver_proxy = NULL;
-- }
--
-- /* close existing notifications on resume, the system power
-- * state is probably different now */
-- notify_close_if_showing (manager->priv->notification_low);
-- notify_close_if_showing (manager->priv->notification_discharging);
--
-- /* ensure we turn the panel back on after resume */
-- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
-- GNOME_RR_DPMS_ON,
-- &error);
-- if (!ret) {
-- g_warning ("failed to turn the panel on after resume: %s",
-- error->message);
-- g_error_free (error);
-- }
- }
-
- static void
-@@ -3582,6 +3530,219 @@ disable_builtin_screensaver (gpointer unused)
- return TRUE;
- }
-
-+static void
-+inhibit_lid_switch_done (GObject *source,
-+ GAsyncResult *result,
-+ gpointer user_data)
-+{
-+ GDBusProxy *proxy = G_DBUS_PROXY (source);
-+ CsdPowerManager *manager = CSD_POWER_MANAGER (user_data);
-+ GError *error = NULL;
-+ GVariant *res;
-+ GUnixFDList *fd_list = NULL;
-+ gint idx;
-+
-+ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
-+ if (res == NULL) {
-+ g_warning ("Unable to inhibit lid switch: %s", error->message);
-+ g_error_free (error);
-+ } else {
-+ g_variant_get (res, "(h)", &idx);
-+ manager->priv->inhibit_lid_switch_fd = g_unix_fd_list_get (fd_list, idx, &error);
-+ if (manager->priv->inhibit_lid_switch_fd == -1) {
-+ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
-+ g_error_free (error);
-+ }
-+ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_lid_switch_fd);
-+ g_object_unref (fd_list);
-+ g_variant_unref (res);
-+ }
-+}
-+
-+static void
-+inhibit_lid_switch (CsdPowerManager *manager)
-+{
-+ GVariant *params;
-+
-+ if (manager->priv->inhibit_lid_switch_taken) {
-+ g_debug ("already inhibited lid-switch");
-+ return;
-+ }
-+ g_debug ("Adding lid switch system inhibitor");
-+ manager->priv->inhibit_lid_switch_taken = TRUE;
-+
-+ params = g_variant_new ("(ssss)",
-+ "handle-lid-switch",
-+ g_get_user_name (),
-+ "Multiple displays attached",
-+ "block");
-+ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
-+ "Inhibit",
-+ params,
-+ 0,
-+ G_MAXINT,
-+ NULL,
-+ NULL,
-+ inhibit_lid_switch_done,
-+ manager);
-+}
-+
-+static void
-+inhibit_suspend_done (GObject *source,
-+ GAsyncResult *result,
-+ gpointer user_data)
-+{
-+ GDBusProxy *proxy = G_DBUS_PROXY (source);
-+ CsdPowerManager *manager = CSD_POWER_MANAGER (user_data);
-+ GError *error = NULL;
-+ GVariant *res;
-+ GUnixFDList *fd_list = NULL;
-+ gint idx;
-+
-+ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
-+ if (res == NULL) {
-+ g_warning ("Unable to inhibit suspend: %s", error->message);
-+ g_error_free (error);
-+ } else {
-+ g_variant_get (res, "(h)", &idx);
-+ manager->priv->inhibit_suspend_fd = g_unix_fd_list_get (fd_list, idx, &error);
-+ if (manager->priv->inhibit_suspend_fd == -1) {
-+ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
-+ g_error_free (error);
-+ }
-+ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_suspend_fd);
-+ g_object_unref (fd_list);
-+ g_variant_unref (res);
-+ }
-+}
-+
-+/* We take a delay inhibitor here, which causes logind to send a
-+ * PrepareToSleep signal, which gives us a chance to lock the screen
-+ * and do some other preparations.
-+ */
-+static void
-+inhibit_suspend (CsdPowerManager *manager)
-+{
-+ if (manager->priv->inhibit_suspend_taken) {
-+ g_debug ("already inhibited lid-switch");
-+ return;
-+ }
-+ g_debug ("Adding suspend delay inhibitor");
-+ manager->priv->inhibit_suspend_taken = TRUE;
-+ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
-+ "Inhibit",
-+ g_variant_new ("(ssss)",
-+ "sleep",
-+ g_get_user_name (),
-+ "Cinnamon needs to lock the screen",
-+ "delay"),
-+ 0,
-+ G_MAXINT,
-+ NULL,
-+ NULL,
-+ inhibit_suspend_done,
-+ manager);
-+}
-+
-+static void
-+uninhibit_suspend (CsdPowerManager *manager)
-+{
-+ if (manager->priv->inhibit_suspend_fd == -1) {
-+ g_debug ("no suspend delay inhibitor");
-+ return;
-+ }
-+ g_debug ("Removing suspend delay inhibitor");
-+ close (manager->priv->inhibit_suspend_fd);
-+ manager->priv->inhibit_suspend_fd = -1;
-+ manager->priv->inhibit_suspend_taken = FALSE;
-+}
-+
-+static void
-+handle_suspend_actions (CsdPowerManager *manager)
-+{
-+ gboolean do_lock;
-+
-+ do_lock = g_settings_get_boolean (manager->priv->settings,
-+ "lock-on-suspend");
-+ if (do_lock)
-+ lock_screensaver (manager);
-+
-+ /* lift the delay inhibit, so logind can proceed */
-+ uninhibit_suspend (manager);
-+}
-+
-+static void
-+handle_resume_actions (CsdPowerManager *manager)
-+{
-+ gboolean ret;
-+ GError *error = NULL;
-+
-+ /* this displays the unlock dialogue so the user doesn't have
-+ * to move the mouse or press any key before the window comes up */
-+ g_dbus_connection_call (manager->priv->connection,
-+ GS_DBUS_NAME,
-+ GS_DBUS_PATH,
-+ GS_DBUS_INTERFACE,
-+ "SimulateUserActivity",
-+ NULL, NULL,
-+ G_DBUS_CALL_FLAGS_NONE, -1,
-+ NULL, NULL, NULL);
-+
-+ /* close existing notifications on resume, the system power
-+ * state is probably different now */
-+ notify_close_if_showing (manager->priv->notification_low);
-+ notify_close_if_showing (manager->priv->notification_discharging);
-+
-+ /* ensure we turn the panel back on after resume */
-+ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
-+ GNOME_RR_DPMS_ON,
-+ &error);
-+ if (!ret) {
-+ g_warning ("failed to turn the panel on after resume: %s",
-+ error->message);
-+ g_error_free (error);
-+ }
-+
-+ /* set up the delay again */
-+ inhibit_suspend (manager);
-+}
-+
-+static void
-+upower_notify_sleep_cb (UpClient *client,
-+ UpSleepKind sleep_kind,
-+ CsdPowerManager *manager)
-+{
-+ handle_suspend_actions (manager);
-+}
-+
-+static void
-+upower_notify_resume_cb (UpClient *client,
-+ UpSleepKind sleep_kind,
-+ CsdPowerManager *manager)
-+{
-+ handle_resume_actions (manager);
-+}
-+
-+static void
-+logind_proxy_signal_cb (GDBusProxy *proxy,
-+ const gchar *sender_name,
-+ const gchar *signal_name,
-+ GVariant *parameters,
-+ gpointer user_data)
-+{
-+ CsdPowerManager *manager = CSD_POWER_MANAGER (user_data);
-+ gboolean is_about_to_suspend;
-+
-+ if (g_strcmp0 (signal_name, "PrepareForSleep") != 0)
-+ return;
-+ g_variant_get (parameters, "(b)", &is_about_to_suspend);
-+ if (is_about_to_suspend) {
-+ handle_suspend_actions (manager);
-+ } else {
-+ handle_resume_actions (manager);
-+ }
-+}
-+
- static gboolean
- is_hardware_a_virtual_machine (void)
- {
-@@ -3647,6 +3808,26 @@ csd_power_manager_start (CsdPowerManager *manager,
- if (manager->priv->x11_screen == NULL)
- return FALSE;
-
-+ /* Set up the logind proxy */
-+ manager->priv->logind_proxy =
-+ g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
-+ 0,
-+ NULL,
-+ SYSTEMD_DBUS_NAME,
-+ SYSTEMD_DBUS_PATH,
-+ SYSTEMD_DBUS_INTERFACE,
-+ NULL,
-+ error);
-+ g_signal_connect (manager->priv->logind_proxy, "g-signal",
-+ G_CALLBACK (logind_proxy_signal_cb),
-+ manager);
-+
-+ /* Set up a delay inhibitor to be informed about suspend attempts */
-+ inhibit_suspend (manager);
-+
-+ /* Disable logind's lid handling while g-s-d is active */
-+ inhibit_lid_switch (manager);
-+
- /* track the active session */
- manager->priv->session = cinnamon_settings_session_new ();
- g_signal_connect (manager->priv->session, "notify::state",
-@@ -3856,6 +4037,22 @@ csd_power_manager_stop (CsdPowerManager *manager)
- manager->priv->up_client = NULL;
- }
-
-+ if (manager->priv->inhibit_lid_switch_fd != -1) {
-+ close (manager->priv->inhibit_lid_switch_fd);
-+ manager->priv->inhibit_lid_switch_fd = -1;
-+ manager->priv->inhibit_lid_switch_taken = FALSE;
-+ }
-+ if (manager->priv->inhibit_suspend_fd != -1) {
-+ close (manager->priv->inhibit_suspend_fd);
-+ manager->priv->inhibit_suspend_fd = -1;
-+ manager->priv->inhibit_suspend_taken = FALSE;
-+ }
-+
-+ if (manager->priv->logind_proxy != NULL) {
-+ g_object_unref (manager->priv->logind_proxy);
-+ manager->priv->logind_proxy = NULL;
-+ }
-+
- if (manager->priv->x11_screen != NULL) {
- g_object_unref (manager->priv->x11_screen);
- manager->priv->x11_screen = NULL;
-@@ -3928,6 +4125,8 @@ static void
- csd_power_manager_init (CsdPowerManager *manager)
- {
- manager->priv = CSD_POWER_MANAGER_GET_PRIVATE (manager);
-+ manager->priv->inhibit_lid_switch_fd = -1;
-+ manager->priv->inhibit_suspend_fd = -1;
- }
-
- static void
diff --git a/community/cinnamon-settings-daemon/upower_deprecated.patch b/community/cinnamon-settings-daemon/upower_deprecated.patch
deleted file mode 100644
index 3719c849c..000000000
--- a/community/cinnamon-settings-daemon/upower_deprecated.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 44d6bf66141b8cf772d8299106e9fd7fda6a21e3 Mon Sep 17 00:00:00 2001
-From: leigh123linux <leigh123linux@googlemail.com>
-Date: Fri, 8 Nov 2013 09:04:44 +0000
-Subject: [PATCH] upower-1.0 changes
-
----
- plugins/power/csd-power-manager.c | 17 +++++++++++++++--
- 1 file changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/plugins/power/csd-power-manager.c b/plugins/power/csd-power-manager.c
-index a8efe08..bae3298 100644
---- a/plugins/power/csd-power-manager.c
-+++ b/plugins/power/csd-power-manager.c
-@@ -1157,6 +1157,7 @@ engine_coldplug (CsdPowerManager *manager)
- gboolean ret;
- GError *error = NULL;
-
-+#if ! UP_CHECK_VERSION(0,99,0)
- /* get devices from UPower */
- ret = up_client_enumerate_devices_sync (manager->priv->up_client, NULL, &error);
- if (!ret) {
-@@ -1164,6 +1165,7 @@ engine_coldplug (CsdPowerManager *manager)
- g_error_free (error);
- goto out;
- }
-+#endif
-
- /* connected mobile phones */
- gpm_phone_coldplug (manager->priv->phone);
-@@ -1306,12 +1308,17 @@ manager_critical_action_get (CsdPowerManager *manager,
-
- policy = g_settings_get_enum (manager->priv->settings, "critical-battery-action");
- if (policy == CSD_POWER_ACTION_SUSPEND) {
-- if (is_ups == FALSE &&
-- up_client_get_can_suspend (manager->priv->up_client))
-+ if (is_ups == FALSE
-+#if ! UP_CHECK_VERSION(0,99,0)
-+ && up_client_get_can_suspend (manager->priv->up_client)
-+#endif
-+ )
- return policy;
- return CSD_POWER_ACTION_SHUTDOWN;
- } else if (policy == CSD_POWER_ACTION_HIBERNATE) {
-+#if ! UP_CHECK_VERSION(0,99,0)
- if (up_client_get_can_hibernate (manager->priv->up_client))
-+#endif
- return policy;
- return CSD_POWER_ACTION_SHUTDOWN;
- }
-@@ -2300,6 +2307,7 @@ suspend_with_lid_closed (CsdPowerManager *manager)
- "lid-close-ac-action");
- }
-
-+#if ! UP_CHECK_VERSION(0,99,0)
- /* check we won't melt when the lid is closed */
- if (action_type != CSD_POWER_ACTION_SUSPEND &&
- action_type != CSD_POWER_ACTION_HIBERNATE) {
-@@ -2312,6 +2320,7 @@ suspend_with_lid_closed (CsdPowerManager *manager)
- lock_screensaver (manager);
- }
- }
-+#endif
-
- /* ensure we turn the panel back on after resume */
- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
-@@ -3838,10 +3849,12 @@ csd_power_manager_start (CsdPowerManager *manager,
- G_CALLBACK (engine_settings_key_changed_cb), manager);
- manager->priv->settings_screensaver = g_settings_new ("org.cinnamon.desktop.screensaver");
- manager->priv->up_client = up_client_new ();
-+#if ! UP_CHECK_VERSION(0,99,0)
- g_signal_connect (manager->priv->up_client, "notify-sleep",
- G_CALLBACK (upower_notify_sleep_cb), manager);
- g_signal_connect (manager->priv->up_client, "notify-resume",
- G_CALLBACK (upower_notify_resume_cb), manager);
-+#endif
- manager->priv->lid_is_closed = up_client_get_lid_is_closed (manager->priv->up_client);
- g_signal_connect (manager->priv->up_client, "device-added",
- G_CALLBACK (engine_device_added_cb), manager);
---
-1.9.1
-
diff --git a/community/cinnamon/PKGBUILD b/community/cinnamon/PKGBUILD
index 1ed94ac4f..b96d658a7 100644
--- a/community/cinnamon/PKGBUILD
+++ b/community/cinnamon/PKGBUILD
@@ -1,19 +1,19 @@
-# $Id: PKGBUILD 109424 2014-04-14 20:15:29Z jgc $
+# $Id: PKGBUILD 109554 2014-04-15 18:16:46Z bgyorgy $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: M0Rf30
# Contributor: unifiedlinux
# Contributor: CReimer
pkgname=cinnamon
-pkgver=2.2.1
-pkgrel=1
+pkgver=2.2.3
+pkgrel=3
pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience"
arch=('i686' 'x86_64')
url="http://cinnamon.linuxmint.com/"
license=('GPL2')
depends=('accountsservice' 'caribou' 'cinnamon-settings-daemon' 'cinnamon-session'
'cinnamon-translations' 'cjs' 'clutter-gtk' 'gconf' 'gnome-icon-theme'
- 'gnome-menus' 'gnome-themes-standard' 'gstreamer' 'libgnome-keyring'
+ 'gnome-themes-standard' 'gstreamer' 'libgnome-keyring'
'librsvg' 'networkmanager' 'muffin' 'python2-dbus' 'python2-pillow'
'python2-pam' 'python2-pexpect' 'python2-pyinotify' 'python2-lxml' 'webkitgtk'
'cinnamon-control-center' 'cinnamon-screensaver' 'cinnamon-menus' 'libgnomekbd'
@@ -23,17 +23,10 @@ options=('!emptydirs')
install=${pkgname}.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/archive/$pkgver.tar.gz"
"upower_calender_fix.patch"
- "keyboard_applet.patch"
- "input_keybindings.patch"
- "set_wheel.patch"
- "org.archlinux.pkexec.cinnamon-settings-users.policy")
-sha256sums=('34ad53f81cf57e8dca06fbd76b0be761b16d9f46a1b5aa22596cd07725703478'
+ "set_wheel.patch")
+sha256sums=('9151452f81ffb7edc28cbdb107818f64bb9bd55610711781345418166372f0fe'
'babfe88a3773f5369b05c7b61d0318cf969b482b9e0c3f281afaf488b0051e53'
- '6acb07393105ddced8a4c3c869a596350d1a7d81a808ca5307d2ad770653a9d3'
- 'e28c40eb844105154fa6106f5b4de3151a22805b3a7b2f84be9ea6c15cec3de6'
- 'd5d5634b24e56837cb677e62669450c25f79005ed1388584760a131f461180ec'
- '371beac9e55d36f7629d2fc5cb40d6a3e6c0f4aac014f6fefdcd6743b5194b23')
-
+ 'd5d5634b24e56837cb677e62669450c25f79005ed1388584760a131f461180ec')
prepare() {
cd ${srcdir}/Cinnamon*
@@ -42,27 +35,20 @@ prepare() {
sed -i 's:/usr/bin/python :/usr/bin/python2 :' files/usr/bin/cinnamon-menu-editor
find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
-
# Fix calendar applet with upower 0.99
patch -Np1 -i ../upower_calender_fix.patch
- # Fix keyboard applet
- patch -Np1 -i ../keyboard_applet.patch
-
- # Add input keybindings
- patch -Np1 -i ../input_keybindings.patch
-
# Use wheel group instread of sudo
patch -Np1 -i ../set_wheel.patch
- # Fix required components
- sed -i 's/cinnamon-fallback-mount-helper;/polkit-gnome-authentication-agent-1;/' files/usr/share/cinnamon-session/sessions/cinnamon*.session
+ # Use cinnamon-menus instead of gnome-menus in cinnamon-desktop-editor
+ sed -i 's/GMenu/CMenu/g' files/usr/lib/cinnamon-desktop-editor/cinnamon-desktop-editor.py
- # fix for the python2 PAM module
- sed -i 's:import PAM:import pam:' files/usr/lib/cinnamon-settings/modules/cs_user.py
+ # Add polkit agent to required components
+ sed -i 's/RequiredComponents=\(.*\)$/RequiredComponents=\1polkit-gnome-authentication-agent-1;/' files/usr/share/cinnamon-session/sessions/cinnamon*.session
- # Use pkexec instead of gksu
- sed -i 's/gksu/pkexec/' files/usr/bin/cinnamon-settings-users
+ # Fix for the python2 PAM module
+ sed -i 's:import PAM:import pam:' files/usr/lib/cinnamon-settings/modules/cs_user.py
# Check for the cc-panel path, not for the unneeded binary
sed -i 's|/usr/bin/cinnamon-control-center|/usr/lib/cinnamon-control-center-1/panels|' files/usr/bin/cinnamon-settings
@@ -70,9 +56,6 @@ prepare() {
# Cinnamon has no upstream backgrounds, use GNOME backgrounds instead
sed -i 's|/usr/share/cinnamon-background-properties|/usr/share/gnome-background-properties|' \
files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py
-
- # Prefix 'System Settings' with 'Cinnamon' to avoid confusion with gnome-control-center
- sed -i 's/^Name\(.*\)=\(.*\)/Name\1=Cinnamon \2/' files/usr/share/applications/cinnamon-settings{,-users}.desktop
}
build() {
@@ -92,8 +75,4 @@ build() {
package() {
cd ${srcdir}/Cinnamon*
make DESTDIR="${pkgdir}" install
-
- # Install policy file
- install -Dm644 "${srcdir}/org.archlinux.pkexec.cinnamon-settings-users.policy" \
- "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.cinnamon-settings-users.policy"
}
diff --git a/community/cinnamon/cinnamon.install b/community/cinnamon/cinnamon.install
index 326aa98a2..c0ed9a0d7 100644
--- a/community/cinnamon/cinnamon.install
+++ b/community/cinnamon/cinnamon.install
@@ -1,5 +1,6 @@
post_install() {
glib-compile-schemas usr/share/glib-2.0/schemas
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}
post_upgrade() {
diff --git a/community/cinnamon/input_keybindings.patch b/community/cinnamon/input_keybindings.patch
deleted file mode 100644
index 2e7a4cd66..000000000
--- a/community/cinnamon/input_keybindings.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py
-+++ b/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py
-@@ -119,6 +119,8 @@ KEYBINDINGS = [
- [_("Log out"), MEDIA_KEYS_SCHEMA, "logout", False, "system"],
- [_("Lock screen"), MEDIA_KEYS_SCHEMA, "screensaver", False, "system"],
- [_("Toggle recording desktop (must restart Cinnamon)"), MUFFIN_KEYBINDINGS_SCHEMA, "toggle-recording", True, "system"],
-+ [_("Switch to next source"), MEDIA_KEYS_SCHEMA, "switch-input-source", False, "system"],
-+ [_("Switch to previous source"), MEDIA_KEYS_SCHEMA, "switch-input-source-backward", False, "system"],
-
- # Launchers
- [_("Launch help browser"), MEDIA_KEYS_SCHEMA, "help", False, "launchers"],
diff --git a/community/cinnamon/keyboard_applet.patch b/community/cinnamon/keyboard_applet.patch
deleted file mode 100644
index 29ea489ce..000000000
--- a/community/cinnamon/keyboard_applet.patch
+++ /dev/null
@@ -1,133 +0,0 @@
---- a/files/usr/share/cinnamon/applets/keyboard@cinnamon.org/applet.js
-+++ b/files/usr/share/cinnamon/applets/keyboard@cinnamon.org/applet.js
-@@ -1,9 +1,10 @@
- const Applet = imports.ui.applet;
--const Gkbd = imports.gi.Gkbd;
- const Lang = imports.lang;
--const Cinnamon = imports.gi.Cinnamon;
-+const Gio = imports.gi.Gio;
-+const GLib = imports.gi.GLib;
- const St = imports.gi.St;
- const Gtk = imports.gi.Gtk;
-+const CinnamonDesktop = imports.gi.CinnamonDesktop;
- const Main = imports.ui.main;
- const PopupMenu = imports.ui.popupMenu;
- const Util = imports.misc.util;
-@@ -16,11 +17,12 @@ function LayoutMenuItem() {
- LayoutMenuItem.prototype = {
- __proto__: PopupMenu.PopupBaseMenuItem.prototype,
-
-- _init: function(config, id, indicator, long_name) {
-+ _init: function(ipsettings, id, index, indicator, long_name) {
- PopupMenu.PopupBaseMenuItem.prototype._init.call(this);
-
-- this._config = config;
-+ this._ipsettings = ipsettings;
- this._id = id;
-+ this._index = index;
- this.label = new St.Label({ text: long_name });
- this.indicator = indicator;
- this.addActor(this.label);
-@@ -29,7 +31,7 @@ LayoutMenuItem.prototype = {
-
- activate: function(event) {
- PopupMenu.PopupBaseMenuItem.prototype.activate.call(this);
-- this._config.lock_group(this._id);
-+ this._ipsettings.set_value('current', GLib.Variant.new_uint32(this._index));
- }
- };
-
-@@ -62,18 +64,18 @@ MyApplet.prototype = {
- this._syncConfig,
- null);
-
-- this._config = Gkbd.Configuration.get();
-- this._config.connect('changed', Lang.bind(this, this._syncConfig));
-- this._config.connect('group-changed', Lang.bind(this, this._syncGroup));
-+ this._xkbInfo = new CinnamonDesktop.XkbInfo();
-+ this._ipsettings = new Gio.Settings({ schema: 'org.cinnamon.desktop.input-sources' });
-+ this._ipsettings.connect('changed::sources', Lang.bind(this, this._syncConfig));
-+ this._ipsettings.connect('changed::current', Lang.bind(this, this._syncGroup));
-
-- this._config.start_listen();
-
- this._syncConfig();
-
- this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
- Main.overview.hide();
-- Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
-+ Util.spawn(['gkbd-keyboard-display', '-l', this._selectedLayout._id]);
- }));
- this.menu.addAction(_("Show Character Table"), Lang.bind(this, function() {
- Main.overview.hide();
-@@ -113,8 +115,8 @@ MyApplet.prototype = {
- },
-
- _syncConfig: function() {
-- let groups = this._config.get_group_names();
-- if (groups.length > 1) {
-+ let sources = this._ipsettings.get_value('sources');
-+ if (sources.n_children() > 1) {
- this.actor.show();
- } else {
- this.menu.close();
-@@ -127,25 +129,30 @@ MyApplet.prototype = {
- for (let i = 0; i < this._labelActors.length; i++)
- this._labelActors[i].destroy();
-
-- let short_names = this._adjustGroupNames(this._config.get_short_group_names());
-
- this._selectedLayout = null;
- this._layoutItems = [ ];
- this._labelActors = [ ];
-- for (let i = 0; i < groups.length; i++) {
-- let icon_name = this._config.get_group_name(i);
-+ for (let i = 0; i < sources.n_children(); i++) {
-+ let [type, id] = sources.get_child_value(i).deep_unpack();
-+ let displayName = id;
-+ let shortName = id;
-+ let xkbLayout = id;
-+ if (type == 'xkb') {
-+ [_exists, displayName, shortName, xkbLayout, _xkbVariant] = this._xkbInfo.get_layout_info(id);
-+ } // TODO: errorhandling, handle 'ibus'
-+ let icon_name = xkbLayout; // FIXME: Really?
- let actor;
- if (this._showFlags)
- actor = new St.Icon({ icon_name: icon_name, icon_type: St.IconType.FULLCOLOR, style_class: 'popup-menu-icon' });
- else
-- actor = new St.Label({ text: short_names[i] });
-- let item = new LayoutMenuItem(this._config, i, actor, groups[i]);
-- item._short_group_name = short_names[i];
-+ actor = new St.Label({ text: shortName });
-+ let item = new LayoutMenuItem(this._ipsettings, id, i, actor, displayName);
- item._icon_name = icon_name;
- this._layoutItems.push(item);
- this.menu.addMenuItem(item, i);
-
-- let shortLabel = new St.Label({ text: short_names[i] });
-+ let shortLabel = new St.Label({ text: shortName });
- this._labelActors.push(shortLabel);
- }
-
-@@ -153,17 +160,17 @@ MyApplet.prototype = {
- },
-
- _syncGroup: function() {
-- let selected = this._config.get_current_group();
-+ let current = this._ipsettings.get_uint('current');
-
- if (this._selectedLayout) {
- this._selectedLayout.setShowDot(false);
- this._selectedLayout = null;
- }
-
-- let item = this._layoutItems[selected];
-+ let item = this._layoutItems[current];
- item.setShowDot(true);
-
-- let selectedLabel = this._labelActors[selected];
-+ let selectedLabel = this._labelActors[current];
-
- if (this._showFlags) {
- this.set_applet_icon_name(item._icon_name);
diff --git a/community/cinnamon/org.archlinux.pkexec.cinnamon-settings-users.policy b/community/cinnamon/org.archlinux.pkexec.cinnamon-settings-users.policy
deleted file mode 100644
index 4d30ca9f3..000000000
--- a/community/cinnamon/org.archlinux.pkexec.cinnamon-settings-users.policy
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC
- "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
-<policyconfig>
-
- <action id="org.archlinux.pkexec.cinnamon-settings-users">
- <message>Authentication is required to run the Cinnamon Users and Groups</message>
- <icon_name>system-users</icon_name>
- <defaults>
- <allow_any>auth_admin</allow_any>
- <allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin</allow_active>
- </defaults>
- <annotate key="org.freedesktop.policykit.exec.path">/usr/lib/cinnamon-settings-users/cinnamon-settings-users.py</annotate>
- <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
- </action>
-
-</policyconfig>
-
diff --git a/community/connman/PKGBUILD b/community/connman/PKGBUILD
index dc359a250..33453e9b7 100644
--- a/community/connman/PKGBUILD
+++ b/community/connman/PKGBUILD
@@ -1,9 +1,9 @@
-#$Id: PKGBUILD 107302 2014-03-16 22:25:15Z dwallace $
+#$Id: PKGBUILD 109454 2014-04-14 22:41:47Z dwallace $
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Lucas De Marchi <lucas.de.marchi@gmail.com>
pkgname=connman
-pkgver=1.22
+pkgver=1.23
pkgrel=1
pkgdesc="Wireless LAN network manager"
url="http://connman.net/"
@@ -17,7 +17,7 @@ optdepends=('bluez: Support for Bluetooth devices'
makedepends=('bluez' 'wpa_supplicant' 'openconnect' 'openvpn' 'ppp')
source=("http://www.kernel.org/pub/linux/network/${pkgname}/${pkgname}-${pkgver}.tar.xz"
'allow_group_network.diff')
-md5sums=('4f45ab2035d1028a287d14427ce61774'
+md5sums=('f835b8137ab198e0af5deab043e2890a'
'a8d22ee089fb0ed725130d16ad393047')
prepare(){
diff --git a/community/gnome-screensaver/PKGBUILD b/community/gnome-screensaver/PKGBUILD
index ac2578542..f868132ca 100644
--- a/community/gnome-screensaver/PKGBUILD
+++ b/community/gnome-screensaver/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 101767 2013-11-30 20:33:20Z bgyorgy $
+# $Id: PKGBUILD 109548 2014-04-15 15:37:59Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-screensaver
pkgver=3.6.1
-pkgrel=7
+pkgrel=8
pkgdesc="Legacy GNOME screensaver"
arch=('i686' 'x86_64')
license=('GPL')
diff --git a/community/kmscon/PKGBUILD b/community/kmscon/PKGBUILD
index 1bd5ec8d4..d0b3c408c 100644
--- a/community/kmscon/PKGBUILD
+++ b/community/kmscon/PKGBUILD
@@ -1,26 +1,26 @@
-# $Id: PKGBUILD 106905 2014-03-09 21:01:09Z lcarlier $
+# $Id: PKGBUILD 109556 2014-04-15 18:59:39Z thestinger $
# Maintainer: Daniel Micay <danielmicay@gmail.com>
# Contributor: David Herrmann <dh.herrmann@googlemail.com>
pkgname=kmscon
pkgver=8
-pkgrel=2
+pkgrel=3
pkgdesc='Terminal emulator based on Kernel Mode Setting (KMS)'
arch=(i686 x86_64)
-url='https://github.com/dvdhrm/kmscon'
+url='http://www.freedesktop.org/wiki/Software/kmscon/'
license=('MIT')
depends=(systemd libdrm mesa libgl pango libxkbcommon xkeyboard-config libtsm)
-makedepends=(git libxslt docbook-xsl linux-api-headers)
-source=(git://github.com/dvdhrm/kmscon#tag=kmscon-$pkgver)
-md5sums=(SKIP)
+makedepends=(libxslt docbook-xsl linux-api-headers)
+source=(http://www.freedesktop.org/software/kmscon/releases/kmscon-${pkgver}.tar.xz)
+md5sums=('90d39c4ef53a11c53f27be4a7e9acee4')
build() {
- cd $pkgname
- ./autogen.sh --prefix=/usr --disable-wlterm
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr
make
}
package() {
- cd $pkgname
+ cd $pkgname-$pkgver
make DESTDIR="$pkgdir/" install
mkdir -p "$pkgdir/usr/share/licenses/$pkgname" "$pkgdir/usr/lib/systemd/system"
cp COPYING "$pkgdir/usr/share/licenses/$pkgname/"
diff --git a/community/liblogging/PKGBUILD b/community/liblogging/PKGBUILD
index 8f61ff403..857d319c1 100644
--- a/community/liblogging/PKGBUILD
+++ b/community/liblogging/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 107594 2014-03-18 09:05:22Z spupykin $
+# $Id: PKGBUILD 109488 2014-04-15 08:21:51Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Denis Wernert <deniswernert@gmail.com>
pkgname=liblogging
-pkgver=1.0.2
+pkgver=1.0.4
pkgrel=1
pkgdesc="easy to use, portable, open source library for system logging"
url="http://www.liblogging.org/"
@@ -13,7 +13,7 @@ depends=('systemd')
makedepends=('python-docutils')
options=('strip' 'zipman' '!libtool')
source=("http://download.rsyslog.com/$pkgname/$pkgname-$pkgver.tar.gz")
-md5sums=('ba57db94a8fdddce92e3bf720ced40b9')
+md5sums=('034083ef1424a566fdeefc56a719691f')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
diff --git a/community/libuv/PKGBUILD b/community/libuv/PKGBUILD
index e3ed0a91c..351e64973 100644
--- a/community/libuv/PKGBUILD
+++ b/community/libuv/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 108919 2014-04-07 16:09:08Z mtorromeo $
+# $Id: PKGBUILD 109510 2014-04-15 09:35:38Z mtorromeo $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=libuv
-pkgver=0.11.23
+pkgver=0.11.24
pkgrel=1
pkgdesc="A new platform layer for Node.JS"
arch=('i686' 'x86_64')
@@ -38,4 +38,4 @@ package() {
"$pkgdir/usr/share/doc/$pkgname/ChangeLog"
}
-sha256sums=('041beb3cc3ae6791e7469984324b4c7dd18001f9be82eac617f244dfbb332e39')
+sha256sums=('8e23517d37a8c820fc68fa250b7398f520c76e40250b8da2a2eca230eb7f3ab8')
diff --git a/community/lightdm/PKGBUILD b/community/lightdm/PKGBUILD
index 9f2b2ff2a..8b7e39a01 100755
--- a/community/lightdm/PKGBUILD
+++ b/community/lightdm/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 109000 2014-04-09 10:22:20Z alucryd $
+# $Id: PKGBUILD 109518 2014-04-15 09:51:22Z alucryd $
# Maintainer: Maxime Gauduin <alucryd@gmail.com>
# Contributor: Morfeo <morfeo89@hotmail.it>
pkgbase=lightdm
pkgname=('lightdm' 'liblightdm-qt4' 'liblightdm-qt5')
pkgver=1.10.0
-pkgrel=1
+pkgrel=2
epoch=1
pkgdesc='A lightweight display manager'
arch=('i686' 'x86_64')
@@ -66,12 +66,14 @@ install="${pkgbase}.install"
rm -rf "${pkgdir}"/etc/init
rm -rf "${pkgdir}"/usr/include/lightdm-qt{,5}-*
- install -dm 770 "${pkgdir}"/var/lib/lightdm
+ install -dm 755 "${pkgdir}"/var/cache/lightdm
+ install -dm 770 "${pkgdir}"/var/lib/lightdm{,-data}
install -dm 711 "${pkgdir}"/var/log/lightdm
- chmod +t "${pkgdir}"/var/lib/lightdm
+ chmod +t "${pkgdir}"/var/{cache/lightdm,lib/lightdm{,-data}}
echo 'GDK_CORE_DEVICE_EVENTS=true' > "${pkgdir}"/var/lib/lightdm/.pam_environment
chmod 644 "${pkgdir}"/var/lib/lightdm/.pam_environment
- chown 620:620 -R "${pkgdir}"/var/{lib,log}/lightdm
+ chown 620:620 -R "${pkgdir}"/var/lib/lightdm{,-data}
+ chgrp 620 "${pkgdir}"/var/log/lightdm
# PAM
install -m 644 ../lightdm.pam "${pkgdir}"/etc/pam.d/lightdm
@@ -90,7 +92,7 @@ install="${pkgbase}.install"
package_liblightdm-qt4() {
pkgdesc='LightDM Qt client library'
depends=('lightdm' 'qt4')
-options+=('!emptydirs')
+options=('!emptydirs')
cd ${pkgbase}-${pkgver}
@@ -105,7 +107,7 @@ options+=('!emptydirs')
package_liblightdm-qt5() {
pkgdesc='LightDM Qt client library'
depends=('lightdm' 'qt5-base')
-options+=('!emptydirs')
+options=('!emptydirs')
cd ${pkgbase}-${pkgver}
diff --git a/community/liteide/PKGBUILD b/community/liteide/PKGBUILD
index cf4a7486c..67730d2b8 100644
--- a/community/liteide/PKGBUILD
+++ b/community/liteide/PKGBUILD
@@ -1,13 +1,13 @@
-# $Id: PKGBUILD 108100 2014-03-22 17:06:48Z arodseth $
+# $Id: PKGBUILD 109501 2014-04-15 09:25:35Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: spambanane <happy.house@gmx.de>
# Contributor: Matteo <matteo.dek@gmail.com>
# Contributor: Matthew Zimmerman <mzimmerman@gmail.com>
pkgname=liteide
-pkgver=21.1
+pkgver=22
pkgrel=1
-pkgdesc='IDE for editing and building projects written in the Go programming language ("golangide")'
+pkgdesc='IDE for editing and building projects written in the Go programming language'
license=('LGPL')
arch=('x86_64' 'i686')
url='https://github.com/visualfc/liteide'
diff --git a/community/mate-applets/PKGBUILD b/community/mate-applets/PKGBUILD
index ae0b0bf9d..eadbaca56 100644
--- a/community/mate-applets/PKGBUILD
+++ b/community/mate-applets/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=mate-applets
pkgver=1.8.0
-pkgrel=2
+pkgrel=3
pkgdesc="Applets for MATE panel"
arch=('i686' 'x86_64')
url="http://mate-desktop.org"
@@ -10,7 +10,7 @@ license=('GPL')
depends=('gtksourceview2' 'mate-panel' 'python2-dbus' 'python2-gobject' 'upower')
makedepends=('docbook2x' 'docbook-xsl' 'mate-common' 'networkmanager'
'perl-xml-parser' 'yelp-tools')
-optdepends=('fortune-mod: for displaying fortune cookies in the Wanda the Fish applet'
+optdepends=('fortune-mod: for displaying fortune cookies in the Wanda the Fish applet'
'yelp: for reading MATE help documents')
groups=('mate-extra')
source=("http://pub.mate-desktop.org/releases/1.8/${pkgname}-${pkgver}.tar.xz")
diff --git a/community/mate-power-manager/PKGBUILD b/community/mate-power-manager/PKGBUILD
index dfc4f74ef..6ff5fcc88 100644
--- a/community/mate-power-manager/PKGBUILD
+++ b/community/mate-power-manager/PKGBUILD
@@ -2,26 +2,35 @@
pkgname=mate-power-manager
pkgver=1.8.0
-pkgrel=1
+pkgrel=2
pkgdesc="Session daemon that makes it easy to manage your laptop or desktop system for Mate Desktop"
url="http://mate-desktop.org"
arch=('i686' 'x86_64')
license=('GPL')
-depends=('dbus-glib' 'dconf' 'libcanberra' 'libgnome-keyring' 'libnotify'
+depends=('dbus-glib' 'dconf' 'libcanberra' 'libgnome-keyring' 'libnotify'
'libunique' 'mate-panel' 'upower')
makedepends=('docbook2x' 'docbook-xml' 'mate-common' 'perl-xml-parser'
'xmlto' 'yelp-tools')
optdepends=('yelp: for reading MATE help documents')
-options=('!emptydirs')
groups=('mate-extra')
-source=("http://pub.mate-desktop.org/releases/1.8/${pkgname}-${pkgver}.tar.xz")
-sha1sums=('5cde22f2d6498294a76e3bf9005b4f73bbdd0db8')
+source=("http://pub.mate-desktop.org/releases/1.8/${pkgname}-${pkgver}.tar.xz"
+ "https://github.com/seife/mate-power-manager/commit/2b3cf01f84204dd5d8204d519e2167b41cda6bc0.diff"
+ "https://github.com/seife/mate-power-manager/commit/220a4e0a64aca0579f50e6e57d4eca848b3ac57f.diff"
+ "https://github.com/seife/mate-power-manager/commit/d59f4b8bd38e1628af3a992ae8e96b8e069ab738.diff")
+sha1sums=('5cde22f2d6498294a76e3bf9005b4f73bbdd0db8'
+ '8c8d724ac99604aad6eabaddd5012a997dbadc90'
+ '884af06e9344954b4237263cd910acb2f34ff443'
+ 'd2950548f353b71ffa8ea6680af6d211a72a5670')
install=${pkgname}.install
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
#Work around a problem where the .sgml fail to parse.
sed -e 's:@HAVE_DOCBOOK2MAN_TRUE@.*::' -i man/Makefile.in
+ # Add upower 0.99 support
+ patch -Np1 -i "${srcdir}/2b3cf01f84204dd5d8204d519e2167b41cda6bc0.diff"
+ patch -Np1 -i "${srcdir}/220a4e0a64aca0579f50e6e57d4eca848b3ac57f.diff"
+ patch -Np1 -i "${srcdir}/d59f4b8bd38e1628af3a992ae8e96b8e069ab738.diff"
}
build() {
diff --git a/community/mate-session-manager/PKGBUILD b/community/mate-session-manager/PKGBUILD
index 7eeebed2c..4c1f2fb90 100644
--- a/community/mate-session-manager/PKGBUILD
+++ b/community/mate-session-manager/PKGBUILD
@@ -2,13 +2,13 @@
pkgname=mate-session-manager
pkgver=1.8.1
-pkgrel=1
+pkgrel=2
pkgdesc="The MATE Session Handler"
url="http://mate-desktop.org"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL')
depends=('dbus-glib' 'gtk2' 'libsm' 'libxtst' 'mate-desktop' 'mate-polkit'
- 'mate-settings-daemon' 'upower' 'xdg-user-dirs')
+ 'mate-settings-daemon' 'pangox-compat' 'xdg-user-dirs')
makedepends=('mate-common' 'perl-xml-parser' 'xmlto')
optdepends=('xdg-user-dirs-gtk: Add autostart that prompts to rename user directories when switching locales')
groups=('mate')
@@ -23,7 +23,8 @@ build() {
--libexecdir=/usr/lib/${pkgname} \
--sysconfdir=/etc \
--localstatedir=/var \
- --with-gtk=2.0
+ --with-gtk=2.0 \
+ --disable-upower
make
}
diff --git a/community/muffin/PKGBUILD b/community/muffin/PKGBUILD
index ba0af8d4b..2269b1ac7 100644
--- a/community/muffin/PKGBUILD
+++ b/community/muffin/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 109427 2014-04-14 20:15:33Z jgc $
+# $Id: PKGBUILD 109468 2014-04-15 00:55:39Z faidoc $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: Adam Hani Schakaki <adam@schakaki.net>
# Contributor: Ner0
pkgname=muffin
-pkgver=2.2.0
+pkgver=2.2.1
pkgrel=1
pkgdesc="Cinnamon window manager based on Mutter"
arch=('i686' 'x86_64')
@@ -17,7 +17,7 @@ options=('!emptydirs')
install=$pkgname.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/muffin/archive/$pkgver.tar.gz"
cogl_ABI.patch)
-sha256sums=('85332899ff4f441624b145af6ee9689dbab1d4b824517a35d01cc563bede9737'
+sha256sums=('aec5062ca53364e5077694ef0848b7a4efe384f19d41736c2f7d86e53ce5c009'
'bce6cf03f7d635345db8a664084b98122aa23802867c7e6e4573273ffccc01e5')
prepare() {
diff --git a/community/mupdf/PKGBUILD b/community/mupdf/PKGBUILD
index 6f736631e..c3f31f5d5 100644
--- a/community/mupdf/PKGBUILD
+++ b/community/mupdf/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 105051 2014-01-30 18:29:49Z bpiotrowski $
+# $Id: PKGBUILD 109477 2014-04-15 05:41:52Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
@@ -6,8 +6,8 @@
# Contributor: xduugu
pkgname=mupdf
-pkgver=1.3
-pkgrel=8
+pkgver=1.4
+pkgrel=1
pkgdesc='Lightweight PDF and XPS viewer'
arch=('i686' 'x86_64')
url='http://mupdf.com'
@@ -16,18 +16,15 @@ depends=('curl' 'desktop-file-utils' 'freetype2' 'jbig2dec' 'libjpeg' 'libxext'
'openssl')
install=mupdf.install
options=('staticlibs')
-source=(https://mupdf.googlecode.com/files/$pkgname-$pkgver-source.tar.gz
- mupdf-1.3-system-libcurl.patch
- mupdf-1.3-stack-buffer-overflow-in-xps_parse_color.patch)
-md5sums=('fe53c2a56ebd7759f5f965bc4ff66359'
- '6d11387e9bb9897f6f1ecc3956f8e2d4'
- 'f4d785b28f711e12d4a078ce9b3ed8f5')
+source=(http://mupdf.com/downloads/mupdf-$pkgver-source.tar.gz
+ mupdf-1.4-system-libcurl.patch)
+md5sums=('0f6840a7020db0c833b0c090ca1864ec'
+ 'b9fa68f059cfcd0b95c1166c83fd2ec5')
prepare() {
cd $pkgname-$pkgver-source
rm -rf thirdparty/{curl,freetype,jpeg,zlib,jbig2dec}
- patch -p1 -i ../mupdf-1.3-system-libcurl.patch
- patch -p1 -i ../mupdf-1.3-stack-buffer-overflow-in-xps_parse_color.patch
+ patch -p1 -i ../mupdf-1.4-system-libcurl.patch
cd platform/debian
sed -i -e 's/mupdf.xpm/mupdf/' \
diff --git a/community/mupdf/mupdf-1.3-stack-buffer-overflow-in-xps_parse_color.patch b/community/mupdf/mupdf-1.3-stack-buffer-overflow-in-xps_parse_color.patch
deleted file mode 100644
index bfe86f320..000000000
--- a/community/mupdf/mupdf-1.3-stack-buffer-overflow-in-xps_parse_color.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 60dabde18d7fe12b19da8b509bdfee9cc886aafc Mon Sep 17 00:00:00 2001
-From: =?utf8?q?Simon=20B=C3=BCnzli?= <zeniko@gmail.com>
-Date: Thu, 16 Jan 2014 22:04:51 +0100
-Subject: [PATCH] Bug 694957: fix stack buffer overflow in xps_parse_color
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-xps_parse_color happily reads more than FZ_MAX_COLORS values out of a
-ContextColor array which overflows the passed in samples array.
-Limiting the number of allowed samples to FZ_MAX_COLORS and make sure
-to use that constant for all callers fixes the problem.
-
-Thanks to Jean-Jamil Khalifé for reporting and investigating the issue
-and providing a sample exploit file.
----
- source/xps/xps-common.c | 22 ++++++++++++++--------
- source/xps/xps-glyphs.c | 2 +-
- source/xps/xps-gradient.c | 2 +-
- source/xps/xps-path.c | 2 +-
- 4 files changed, 17 insertions(+), 11 deletions(-)
-
-diff --git a/source/xps/xps-common.c b/source/xps/xps-common.c
-index b780f42..32a30ba 100644
---- a/source/xps/xps-common.c
-+++ b/source/xps/xps-common.c
-@@ -89,7 +89,7 @@ xps_begin_opacity(xps_document *doc, const fz_matrix *ctm, const fz_rect *area,
- if (scb_color_att)
- {
- fz_colorspace *colorspace;
-- float samples[32];
-+ float samples[FZ_MAX_COLORS];
- xps_parse_color(doc, base_uri, scb_color_att, &colorspace, samples);
- opacity = opacity * samples[0];
- }
-@@ -208,12 +208,13 @@ void
- xps_parse_color(xps_document *doc, char *base_uri, char *string,
- fz_colorspace **csp, float *samples)
- {
-+ fz_context *ctx = doc->ctx;
- char *p;
- int i, n;
- char buf[1024];
- char *profile;
-
-- *csp = fz_device_rgb(doc->ctx);
-+ *csp = fz_device_rgb(ctx);
-
- samples[0] = 1;
- samples[1] = 0;
-@@ -259,7 +260,7 @@ xps_parse_color(xps_document *doc, char *base_uri, char *string,
- profile = strchr(buf, ' ');
- if (!profile)
- {
-- fz_warn(doc->ctx, "cannot find icc profile uri in '%s'", string);
-+ fz_warn(ctx, "cannot find icc profile uri in '%s'", string);
- return;
- }
-
-@@ -267,12 +268,17 @@ xps_parse_color(xps_document *doc, char *base_uri, char *string,
- p = strchr(profile, ' ');
- if (!p)
- {
-- fz_warn(doc->ctx, "cannot find component values in '%s'", profile);
-+ fz_warn(ctx, "cannot find component values in '%s'", profile);
- return;
- }
-
- *p++ = 0;
- n = count_commas(p) + 1;
-+ if (n > FZ_MAX_COLORS)
-+ {
-+ fz_warn(ctx, "ignoring %d color components (max %d allowed)", n - FZ_MAX_COLORS, FZ_MAX_COLORS);
-+ n = FZ_MAX_COLORS;
-+ }
- i = 0;
- while (i < n)
- {
-@@ -292,10 +298,10 @@ xps_parse_color(xps_document *doc, char *base_uri, char *string,
- /* TODO: load ICC profile */
- switch (n)
- {
-- case 2: *csp = fz_device_gray(doc->ctx); break;
-- case 4: *csp = fz_device_rgb(doc->ctx); break;
-- case 5: *csp = fz_device_cmyk(doc->ctx); break;
-- default: *csp = fz_device_gray(doc->ctx); break;
-+ case 2: *csp = fz_device_gray(ctx); break;
-+ case 4: *csp = fz_device_rgb(ctx); break;
-+ case 5: *csp = fz_device_cmyk(ctx); break;
-+ default: *csp = fz_device_gray(ctx); break;
- }
- }
- }
-diff --git a/source/xps/xps-glyphs.c b/source/xps/xps-glyphs.c
-index b26e18d..e621257 100644
---- a/source/xps/xps-glyphs.c
-+++ b/source/xps/xps-glyphs.c
-@@ -590,7 +590,7 @@ xps_parse_glyphs(xps_document *doc, const fz_matrix *ctm,
-
- if (fill_att)
- {
-- float samples[32];
-+ float samples[FZ_MAX_COLORS];
- fz_colorspace *colorspace;
-
- xps_parse_color(doc, base_uri, fill_att, &colorspace, samples);
-diff --git a/source/xps/xps-gradient.c b/source/xps/xps-gradient.c
-index 7d03f89..76188e9 100644
---- a/source/xps/xps-gradient.c
-+++ b/source/xps/xps-gradient.c
-@@ -39,7 +39,7 @@ xps_parse_gradient_stops(xps_document *doc, char *base_uri, fz_xml *node,
- struct stop *stops, int maxcount)
- {
- fz_colorspace *colorspace;
-- float sample[8];
-+ float sample[FZ_MAX_COLORS];
- float rgb[3];
- int before, after;
- int count;
-diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c
-index b97ee17..ea84a81 100644
---- a/source/xps/xps-path.c
-+++ b/source/xps/xps-path.c
-@@ -826,7 +826,7 @@ xps_parse_path(xps_document *doc, const fz_matrix *ctm, char *base_uri, xps_reso
-
- fz_stroke_state *stroke = NULL;
- fz_matrix transform;
-- float samples[32];
-+ float samples[FZ_MAX_COLORS];
- fz_colorspace *colorspace;
- fz_path *path = NULL;
- fz_path *stroke_path = NULL;
---
-1.7.9.5
-
diff --git a/community/mupdf/mupdf-1.3-system-libcurl.patch b/community/mupdf/mupdf-1.3-system-libcurl.patch
deleted file mode 100644
index b99083216..000000000
--- a/community/mupdf/mupdf-1.3-system-libcurl.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/Makerules 2013-08-27 14:35:11.243520354 +0000
-+++ b/Makerules 2013-08-27 15:40:22.583629510 +0000
-@@ -67,6 +67,8 @@
- SYS_JBIG2DEC_LIBS = -ljbig2dec
- SYS_JPEG_LIBS = -ljpeg
- SYS_ZLIB_LIBS = -lz
-+SYS_CURL_CFLAGS = $(shell pkg-config --cflags libcurl) -I/usr/include/curl
-+SYS_CURL_LIBS = $(shell pkg-config --libs libcurl)
-
- endif
-
---- a/Makethird 2013-08-27 15:41:18.043354692 +0000
-+++ b/Makethird 2013-08-27 15:42:41.332916192 +0000
-@@ -444,5 +444,6 @@
- CURL_CFLAGS := -I$(CURL_DIR)/include
- CURL_LIBS := $(SYS_CURL_DEPS)
- else
--NOCURL := yes
-+CURL_CFLAGS := $(SYS_CURL_CFLAGS)
-+CURL_LIBS := $(SYS_CURL_LIBS) $(SYS_CURL_DEPS)
- endif
diff --git a/community/mupdf/mupdf-1.4-system-libcurl.patch b/community/mupdf/mupdf-1.4-system-libcurl.patch
new file mode 100644
index 000000000..bbee9b076
--- /dev/null
+++ b/community/mupdf/mupdf-1.4-system-libcurl.patch
@@ -0,0 +1,26 @@
+diff -rupN a/Makerules b/Makerules
+--- a/Makerules 2014-04-11 15:10:41.000000000 +0000
++++ b/Makerules 2014-04-15 05:35:34.430028127 +0000
+@@ -47,6 +47,8 @@ SYS_OPENJPEG_LIBS = -lopenjpeg
+ SYS_JBIG2DEC_LIBS = -ljbig2dec
+ SYS_JPEG_LIBS = -ljpeg
+ SYS_ZLIB_LIBS = -lz
++SYS_CURL_CFLAGS = $(shell pkg-config --cflags libcurl) -I/usr/include/curl
++SYS_CURL_LIBS = $(shell pkg-config --libs libcurl)
+
+ CC = xcrun cc
+ AR = xcrun ar
+diff -rupN a/Makethird b/Makethird
+--- a/Makethird 2014-04-11 15:10:41.000000000 +0000
++++ b/Makethird 2014-04-15 05:37:06.712810863 +0000
+@@ -454,6 +454,10 @@ CURL_CFLAGS := -I$(CURL_DIR)/include
+ CURL_LIBS := $(SYS_CURL_DEPS)
+
+ HAVE_CURL := yes
++else
++HAVE_CURL := yes
++CURL_CFLAGS := $(SYS_CURL_CFLAGS)
++CURL_LIBS := $(SYS_CURL_LIBS) $(SYS_CURL_DEPS)
+ endif
+
+ # --- X11 ---
diff --git a/community/nemo/PKGBUILD b/community/nemo/PKGBUILD
index d1ff3f3a1..934c5b2d5 100644
--- a/community/nemo/PKGBUILD
+++ b/community/nemo/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 109425 2014-04-14 20:15:30Z jgc $
+# $Id: PKGBUILD 109531 2014-04-15 13:28:34Z bgyorgy $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: Ner0
pkgname=nemo
pkgver=2.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="Cinnamon file manager (Nautilus fork)"
arch=('i686' 'x86_64')
url="https://github.com/linuxmint/nemo"
@@ -15,12 +15,17 @@ depends=('libexif' 'gvfs' 'dconf' 'desktop-file-utils' 'exempi' 'python2'
makedepends=('gtk-doc' 'gobject-introspection' 'intltool' 'gnome-common' 'python2-gobject' 'python2-polib')
options=('!emptydirs')
install=nemo.install
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/nemo/tarball/$pkgver")
-sha256sums=('d909354fb5378804eb9abcfe04e3f4b4e482e7afbec018cacc35b3e845cce466')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/nemo/tarball/$pkgver"
+ "adwaita_style.patch")
+sha256sums=('d909354fb5378804eb9abcfe04e3f4b4e482e7afbec018cacc35b3e845cce466'
+ '6faa6a5a7042832fb1230a5d21ebe8572c100798e724fcd72fee86dc01d69290')
prepare() {
cd linuxmint-nemo-*
+ # Fix white text on breadcrumb with Adwaita theme
+ patch -Np1 -i ../adwaita_style.patch
+
# Python2 fix
sed -i 's/bin\/python/bin\/python2/g' files/usr/share/nemo/actions/myaction.py
find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
diff --git a/community/nemo/adwaita_style.patch b/community/nemo/adwaita_style.patch
new file mode 100644
index 000000000..1c9e814c5
--- /dev/null
+++ b/community/nemo/adwaita_style.patch
@@ -0,0 +1,10 @@
+--- a/src/nemo-style-fallback.css
++++ b/src/nemo-style-fallback.css
+@@ -8,7 +8,6 @@ NemoPathbarButton {
+ color-stop (.7, shade(alpha(@bg_color, 0.8), 0.90)),
+ color-stop (1, shade(alpha(@bg_color, 0.8), 0.80)));
+ border-color: #808080;
+- color: @fg_color;
+ -NemoPathbarButton-border-radius: 3px;
+ }
+
diff --git a/community/paxtest/PKGBUILD b/community/paxtest/PKGBUILD
new file mode 100644
index 000000000..add18bdf4
--- /dev/null
+++ b/community/paxtest/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Daniel Micay <danielmicay@gmail.com>
+# Contributor: Lubomir Krajcovic <lubomir.krajcovic(AT)gmail(DOT)com>
+# Contributor: sh0 <mee(AT)sh0(DOT)org>
+# Contributor: leoarcher <carvalho.inacio(AT)gmail(DOT)com>
+
+pkgname=paxtest
+pkgver=0.9.11
+pkgrel=2
+pkgdesc='PaX regression test suite'
+url='http://pax.grsecurity.net'
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=(sh)
+source=("http://grsecurity.net/~spender/${pkgname}-${pkgver}.tar.gz")
+md5sums=('04ec4a600052c86ee341bbe0240d02c0')
+
+_make="make -f Makefile.psm BINDIR=/usr/bin RUNDIR=/usr/lib/$pkgname"
+
+build() {
+ cd $pkgname-$pkgver
+ $_make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ $_make DESTDIR="$pkgdir" install
+}
diff --git a/community/perl-term-readline-gnu/PKGBUILD b/community/perl-term-readline-gnu/PKGBUILD
index 898aee284..919937374 100644
--- a/community/perl-term-readline-gnu/PKGBUILD
+++ b/community/perl-term-readline-gnu/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 91695 2013-05-26 09:26:04Z bluewind $
+# $Id: PKGBUILD 109452 2014-04-14 22:37:08Z dwallace $
# CPAN Name : Term-ReadLine-Gnu
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: jason ryan <jasonwryan@gmail.com>
@@ -6,18 +6,18 @@
# Generator : CPANPLUS::Dist::Arch 1.15
pkgname=perl-term-readline-gnu
-pkgver=1.20
-pkgrel=6
+pkgver=1.24
+pkgrel=1
pkgdesc="GNU Readline XS library wrapper"
arch=('i686' 'x86_64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl>=5.7')
url='http://search.cpan.org/dist/Term-ReadLine-Gnu'
-source=('http://search.cpan.org/CPAN/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.20.tar.gz'
- 'termcap-bad-ncurses-good.patch')
-md5sums=('fa33510193b89a2ada74fcef00816322'
- 'a000706b89792f822b5ec20baa370910')
+source=("http://search.cpan.org/CPAN/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-${pkgver}.tar.gz"
+ 'termcap-bad-ncurses-good.patch')
+md5sums=('43db7380970a0674a601c042e9486a9a'
+ 'a000706b89792f822b5ec20baa370910')
build() {
export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
@@ -26,20 +26,20 @@ build() {
PERL_MB_OPT="--installdirs vendor" \
MODULEBUILDRC=/dev/null
- cd "${srcdir}/Term-ReadLine-Gnu-1.20"
+ cd "${srcdir}/Term-ReadLine-Gnu-$pkgver"
patch --forward -p1 < "${srcdir}/termcap-bad-ncurses-good.patch"
/usr/bin/perl Makefile.PL
make
}
check() {
- cd "${srcdir}/Term-ReadLine-Gnu-1.20"
+ cd "${srcdir}/Term-ReadLine-Gnu-$pkgver"
export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
make test
}
package() {
- cd "${srcdir}/Term-ReadLine-Gnu-1.20"
+ cd "${srcdir}/Term-ReadLine-Gnu-$pkgver"
make pure_install PERL_INSTALL_ROOT="$pkgdir"
find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
diff --git a/community/perl-xml-libxml/PKGBUILD b/community/perl-xml-libxml/PKGBUILD
index 1affda098..a3dc14561 100644
--- a/community/perl-xml-libxml/PKGBUILD
+++ b/community/perl-xml-libxml/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 109082 2014-04-10 12:31:16Z fyan $
+# $Id: PKGBUILD 109502 2014-04-15 09:25:51Z fyan $
# Maintainer: Jonathan Steel <jsteel@aur.archlinux.org>
# Contributor: Justin "juster" Davis <jrcd83@gmail.com>
# Contributor: François Charette <francois.archlinux.org>
pkgname=perl-xml-libxml
-pkgver=2.0115
+pkgver=2.0116
pkgrel=1
pkgdesc="Interface to the libxml library"
arch=('i686' 'x86_64')
@@ -16,7 +16,7 @@ replaces=('perl-libxml' 'perl-xml-libxml-common')
options=('!emptydirs')
install=$pkgname.install
source=(http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-$pkgver.tar.gz)
-md5sums=('456cde9d6733792e35bc45df566e82ad')
+md5sums=('a53a743bf053a0cb4afb41513fb8a684')
build() {
cd "$srcdir"/XML-LibXML-$pkgver
diff --git a/community/perl-xml-libxslt/PKGBUILD b/community/perl-xml-libxslt/PKGBUILD
index 6e56fc870..1343d2908 100644
--- a/community/perl-xml-libxslt/PKGBUILD
+++ b/community/perl-xml-libxslt/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 109074 2014-04-10 09:00:23Z fyan $
+# $Id: PKGBUILD 109504 2014-04-15 09:30:25Z fyan $
# Maintainer: Jonathan Steel <jsteel@aur.archlinux.org>
# Contributor: Justin "juster" Davis <jrcd83@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>
pkgname=perl-xml-libxslt
-pkgver=1.89
+pkgver=1.92
pkgrel=1
pkgdesc="Interface to the gnome libxslt library"
arch=('i686' 'x86_64')
@@ -13,7 +13,7 @@ license=('GPL')
depends=('perl-xml-libxml' 'libxslt')
options=('!emptydirs')
source=(http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXSLT-$pkgver.tar.gz)
-md5sums=('692d2491b3ebf3465960c270c6a10e8b')
+md5sums=('e543d54493c8be6d4fb26595593818d1')
build() {
cd XML-LibXSLT-$pkgver
diff --git a/community/plank/PKGBUILD b/community/plank/PKGBUILD
index 063652177..355fedb74 100644
--- a/community/plank/PKGBUILD
+++ b/community/plank/PKGBUILD
@@ -1,31 +1,25 @@
-# $Id: PKGBUILD 101218 2013-11-19 21:08:43Z alucryd $
+# $Id: PKGBUILD 109496 2014-04-15 08:44:49Z alucryd $
# Maintainer: Maxime Gauduin <alucryd at gmail dot com>
# Contributor: Ner0 <darkelfdarkelf666 at yahoo dot co dot uk>
# Contributor: dcelasun <dcelasun at gmaild dot com>
pkgname=plank
-pkgver=0.5.0
+pkgver=0.6.0
pkgrel=1
-pkgdesc="Elegant, simple, clean dock"
+pkgdesc='Elegant, simple, clean dock'
arch=('i686' 'x86_64')
-url="https://launchpad.net/plank"
+url='https://launchpad.net/plank'
license=('GPL3')
-depends=('bamf' 'libdbusmenu-gtk3' 'libgee06' 'python2')
+depends=('bamf' 'libdbusmenu-gtk3' 'libgee')
makedepends=('gnome-common' 'intltool' 'vala')
install="${pkgname}.install"
source=("https://launchpad.net/${pkgname}/1.0/${pkgver}/+download/${pkgname}-${pkgver}.tar.xz")
-sha256sums=('bf0e14dbdc9d30d57e55cc88644ef6e6c296be924bbfc1b345cba1e0c9be1804')
-
-prepare() {
- cd ${pkgname}-${pkgver}
-
- sed -i 's|^#!.*python$|#!/usr/bin/python2|' $(grep -rl '^#!.*python')
-}
+sha256sums=('6a49bcd2d4aaf8f9dc49b9a074ea02593880c32b7e5f328cad62257cc1e20b25')
build() {
cd ${pkgname}-${pkgver}
- ./configure --prefix='/usr' --sysconfdir='/etc' --localstatedir='/var' --disable-gee-0.8
+ ./configure --prefix='/usr' --sysconfdir='/etc' --disable-apport
make
}
@@ -33,7 +27,6 @@ package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
- rm -rf "${pkgdir}"/{etc,usr/share/apport}
}
# vim: ts=2 sw=2 et:
diff --git a/community/python-pillow/PKGBUILD b/community/python-pillow/PKGBUILD
index 1f5a65d29..d924893ba 100644
--- a/community/python-pillow/PKGBUILD
+++ b/community/python-pillow/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 108464 2014-03-27 14:48:00Z fyan $
+# $Id: PKGBUILD 109546 2014-04-15 15:10:39Z kkeen $
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: minder
pkgbase=python-pillow
pkgname=(python-pillow python2-pillow)
-pkgver=2.3.1
-pkgrel=2
+pkgver=2.4.0
+pkgrel=1
_appname=Pillow
_py2basever=2.7
_py3basever=3.4m
@@ -15,7 +15,7 @@ url="http://python-imaging.github.io/"
license=('BSD')
makedepends=('python-setuptools' 'python2-setuptools' 'lcms' 'libwebp' 'tk' 'sane')
source=("http://pypi.python.org/packages/source/P/$_appname/$_appname-$pkgver.zip")
-md5sums=('0946bb3aa18b3836eeb45cc64588fe94')
+md5sums=('b46ac9f00580920ffafe518bc765e43c')
build() {
cd "$srcdir"
diff --git a/community/rsyslog/PKGBUILD b/community/rsyslog/PKGBUILD
index 1324775b5..963a47778 100644
--- a/community/rsyslog/PKGBUILD
+++ b/community/rsyslog/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 108543 2014-03-28 07:09:00Z spupykin $
+# $Id: PKGBUILD 109490 2014-04-15 08:22:17Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=rsyslog
-pkgver=7.6.3
+pkgver=8.2.0
pkgrel=1
pkgdesc="An enhanced multi-threaded syslogd with a focus on security and reliability"
url="http://www.rsyslog.com/"
@@ -21,7 +21,7 @@ options=('strip' 'zipman')
source=("http://www.rsyslog.com/files/download/rsyslog/rsyslog-$pkgver.tar.gz"
'rsyslog.logrotate'
'rsyslog.conf')
-md5sums=('09c29847fff170bece92975f1bb05caa'
+md5sums=('33b06598f46caf8d5436151eec25a254'
'0d990373f5c70ddee989296007b4df5b'
'd61dd424e660eb16401121eed20d98bc')
@@ -39,7 +39,6 @@ build() {
--enable-imjournal \
--enable-omjournal \
--with-systemdsystemunitdir=/usr/lib/systemd/system
- echo "rsyslogd_LDADD += \$(LIBESTR_LIBS) -lm" >>tools/Makefile
make
}
@@ -47,7 +46,6 @@ package() {
cd ${srcdir}/${pkgname}-${pkgver}
make install DESTDIR=${pkgdir}
# Install Daemons and Configuration Files
- install -D -m644 doc/${pkgname}-example.conf ${pkgdir}/usr/share/doc/$pkgname/${pkgname}.conf.example
install -D -m644 $srcdir/${pkgname}.conf ${pkgdir}/etc/${pkgname}.conf
install -D -m644 $srcdir/${pkgname}.logrotate ${pkgdir}/etc/logrotate.d/${pkgname}
diff --git a/community/units/PKGBUILD b/community/units/PKGBUILD
index a95edca3e..1576588f7 100644
--- a/community/units/PKGBUILD
+++ b/community/units/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 108661 2014-03-31 11:41:19Z spupykin $
+# $Id: PKGBUILD 109492 2014-04-15 08:22:39Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Jeff Mickey <jeff@archlinux.org>
# Contributor: Steve Sansom <snsansom@gmail.com>
pkgname=units
-pkgver=2.10
+pkgver=2.11
pkgrel=1
pkgdesc="converts between different units"
arch=('i686' 'x86_64')
@@ -14,7 +14,7 @@ license=("GPL")
options=('!makeflags')
install=units.install
source=(http://ftp.gnu.org/gnu/units/$pkgname-$pkgver.tar.gz)
-md5sums=('08dc084526a879dd04b64ef46db2b80d')
+md5sums=('1d83f4e68135495aa9267b848de78dc5')
build() {
cd $srcdir/$pkgname-$pkgver
diff --git a/community/xe-guest-utilities/PKGBUILD b/community/xe-guest-utilities/PKGBUILD
index f3af11392..8d3f04cd5 100644
--- a/community/xe-guest-utilities/PKGBUILD
+++ b/community/xe-guest-utilities/PKGBUILD
@@ -1,24 +1,25 @@
-# $Id: PKGBUILD 91549 2013-05-23 14:44:31Z dwallace $
+# $Id: PKGBUILD 109466 2014-04-14 23:44:15Z dwallace $
# Maintainer: Daniel Wallace <danielwallace at code gtmanfred com>
# Contributor: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
# Contributor: Krzysztof Raczkowski <raczkow@gnu-tech.pl>
pkgbase=xe-guest-utilities
pkgname=('xe-guest-utilities' 'xenstore')
-pkgver=6.1.0
-pkgrel=6
+pkgver=6.2.0
+pkgrel=1
pkgdesc="Citrix XenServer Tools"
arch=('i686' 'x86_64')
url="http://citrix.com/English/ps2/products/product.asp?contentID=683148&ntref=hp_nav_US"
license=('GPL' 'LGPL')
makedepends=(python2)
-source=("ftp://ftp.archlinux.org/other/community/$pkgbase/${pkgbase}_${pkgver}-1033.tar.gz"
+options=(staticlibs)
+source=("ftp://ftp.archlinux.org/other/community/$pkgbase/${pkgbase}_${pkgver}-1120.tar.gz"
'ip_address.patch'
'xe-linux-distribution.service'
'xe-daemon.service'
'proc-xen.mount'
'tmpfile')
-md5sums=('26fd52ffc5ddeb7d3e510e6f272c2860'
+md5sums=('98644da204b18b695ede0ba45f4df22d'
'9bd39e95384056069f7faa870a28413a'
'95064a7d8a32cd3aaca14e3b48c69599'
'173fed74c76817702b062ed653002db0'
@@ -61,7 +62,7 @@ package_xenstore() {
package_xe-guest-utilities(){
cd "$srcdir/$pkgname-$pkgver"
- depends=('xenstore' 'bash')
+ depends=('xenstore' 'bash' 'lsb-release')
install -Dm755 xe-linux-distribution "$pkgdir/usr/bin/xe-linux-distribution"
install -Dm755 xe-update-guest-attrs "$pkgdir/usr/bin/xe-update-guest-attrs"
install -Dm755 xe-daemon "$pkgdir/usr/bin/xe-daemon"
diff --git a/core/iproute2/PKGBUILD b/core/iproute2/PKGBUILD
index 18d1c94c6..a1b26856a 100644
--- a/core/iproute2/PKGBUILD
+++ b/core/iproute2/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 203666 2014-01-13 18:57:04Z foutrelis $
+# $Id: PKGBUILD 210619 2014-04-15 20:43:33Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
pkgname=iproute2
-pkgver=3.12.0
+pkgver=3.14.0
pkgrel=1
pkgdesc="IP Routing Utilities"
arch=('i686' 'x86_64')
@@ -22,7 +22,7 @@ backup=('etc/iproute2/ematch_map' 'etc/iproute2/rt_dsfield' 'etc/iproute2/rt_pro
source=(http://www.kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz
iproute2-fhs.patch
unwanted-link-help.patch)
-sha1sums=('9397376e5d4dcbb1182745cd58625895fcdb868d'
+sha1sums=('0b7d9db9e17da77a5bd8c2c75f6ddd607449ba3e'
'35b8cf2dc94b73eccad427235c07596146cd6f6c'
'3b1335f4025f657f388fbf4e5a740871e3129c2a')
@@ -40,14 +40,14 @@ prepare() {
}
build() {
- cd $srcdir/$pkgname-$pkgver
+ cd "$srcdir/$pkgname-$pkgver"
./configure
make
}
package() {
- cd $srcdir/$pkgname-$pkgver
+ cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
diff --git a/core/logrotate/PKGBUILD b/core/logrotate/PKGBUILD
index a6cdd75d3..eeb7f37d3 100644
--- a/core/logrotate/PKGBUILD
+++ b/core/logrotate/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 196792 2013-10-19 09:14:49Z pierre $
+# $Id: PKGBUILD 210561 2014-04-14 22:14:38Z thomas $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
pkgname=logrotate
pkgver=3.8.7
-pkgrel=1
+pkgrel=3
pkgdesc="Rotates system logs automatically"
arch=('i686' 'x86_64')
url="https://fedorahosted.org/logrotate/"
@@ -15,11 +15,12 @@ backup=('etc/logrotate.conf')
source=("https://fedorahosted.org/releases/l/o/logrotate/logrotate-${pkgver}.tar.gz"
'paths.patch'
'logrotate.conf'
- 'logrotate.cron.daily')
+ logrotate.{timer,service})
md5sums=('99e08503ef24c3e2e3ff74cc5f3be213'
'e76526bcd6fc33c9d921e1cb1eff1ffb'
- '86209d257c8b8bc0ae34d6f6ef057c0f'
- 'dd5fd26724274fd9c827eadad60ff4c5')
+ '94dae4d3eded2fab9ae879533d3680db'
+ '287c2ad9b074cb5478db7692f385827c'
+ '85560be5272ed68a88bb77a0a2293369')
build() {
cd "$srcdir/${pkgname}-${pkgver}"
@@ -41,5 +42,9 @@ package() {
install -dm755 "$pkgdir/etc/logrotate.d"
install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
- install -Dm744 "$srcdir/logrotate.cron.daily" "$pkgdir/etc/cron.daily/logrotate"
+
+ install -D -m644 ${srcdir}/logrotate.timer ${pkgdir}/usr/lib/systemd/system/logrotate.timer
+ install -D -m644 ${srcdir}/logrotate.service ${pkgdir}/usr/lib/systemd/system/logrotate.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../logrotate.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/logrotate.timer
}
diff --git a/core/logrotate/logrotate.conf b/core/logrotate/logrotate.conf
index 9c1927fec..4193a3a7f 100644
--- a/core/logrotate/logrotate.conf
+++ b/core/logrotate/logrotate.conf
@@ -26,7 +26,7 @@ include /etc/logrotate.d
/var/log/wtmp {
monthly
create 0664 root utmp
- minsize 1M
+ minsize 1M
rotate 1
}
diff --git a/core/logrotate/logrotate.cron.daily b/core/logrotate/logrotate.cron.daily
deleted file mode 100755
index 11fe09c52..000000000
--- a/core/logrotate/logrotate.cron.daily
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
-NICE=19
-
-# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
-IONICE_CLASS=2
-
-# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
-IONICE_PRIORITY=7
-
-CMD_LOGROTATE="/usr/bin/logrotate /etc/logrotate.conf"
-
-if [ -x /usr/bin/nice ]; then
- CMD_LOGROTATE="/usr/bin/nice -n ${NICE:-19} ${CMD_LOGROTATE}"
-fi
-
-if [ -x /usr/bin/ionice ]; then
- IONICE_CMD="/usr/bin/ionice -c ${IONICE_CLASS:-2}"
- if [ $IONICE_CLASS -ne 3 ]; then
- IONICE_CMD="${IONICE_CMD} -n ${IONICE_PRIORITY:-7}"
- fi
- CMD_LOGROTATE="${IONICE_CMD} ${CMD_LOGROTATE}"
-fi
-
-${CMD_LOGROTATE}
-
-exit 0
diff --git a/core/logrotate/logrotate.service b/core/logrotate/logrotate.service
new file mode 100644
index 000000000..3a483c3a3
--- /dev/null
+++ b/core/logrotate/logrotate.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Rotate log files
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/logrotate /etc/logrotate.conf
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/logrotate/logrotate.timer b/core/logrotate/logrotate.timer
new file mode 100644
index 000000000..a92ba1ecc
--- /dev/null
+++ b/core/logrotate/logrotate.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily rotation of log files
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/core/man-db/PKGBUILD b/core/man-db/PKGBUILD
index 89ee632db..bfb1321b1 100644
--- a/core/man-db/PKGBUILD
+++ b/core/man-db/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 204740 2014-01-26 11:28:37Z andyrtr $
+# $Id: PKGBUILD 210567 2014-04-14 22:17:29Z thomas $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
pkgname=man-db
-pkgver=2.6.6
+pkgver=2.6.7.1
pkgrel=1
pkgdesc="A utility for reading man pages"
arch=('i686' 'x86_64')
@@ -12,18 +12,19 @@ license=('GPL' 'LGPL')
groups=('base')
depends=( 'bash' 'gdbm' 'zlib' 'groff' 'libpipeline' 'less')
optdepends=('gzip')
-backup=('etc/man_db.conf'
- 'etc/cron.daily/man-db')
+backup=('etc/man_db.conf')
conflicts=('man')
provides=('man')
replaces=('man')
install=${pkgname}.install
-source=(http://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.xz{,.sig}
- convert-mans man-db.cron.daily)
-md5sums=('5d65d66191080c144437a6c854e17868'
+source=(http://download-mirror.savannah.gnu.org/releases/man-db/$pkgname-$pkgver.tar.xz{,.sig}
+ convert-mans
+ man-db.{timer,service})
+md5sums=('ce7b697f8e8016a085d9f5975ae6c4fb'
'SKIP'
'2b7662a7d5b33fe91f9f3e034361a2f6'
- '934fd047fecb915038bf4bf844ea609c')
+ 'df6d4f432e3e16c255c785fca1447346'
+ '36fb3f616e42a0e23cf7a4d284e640cd')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
@@ -54,7 +55,9 @@ package() {
# http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html
install -D -m755 ${srcdir}/convert-mans ${pkgdir}/usr/bin/convert-mans
- #install whatis cron script
- install -D -m744 ${srcdir}/man-db.cron.daily ${pkgdir}/etc/cron.daily/man-db
+ # install man-db update timer
+ install -D -m644 ${srcdir}/man-db.timer ${pkgdir}/usr/lib/systemd/system/man-db.timer
+ install -D -m644 ${srcdir}/man-db.service ${pkgdir}/usr/lib/systemd/system/man-db.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../man-db.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/man-db.timer
}
-
diff --git a/core/man-db/man-db.cron.daily b/core/man-db/man-db.cron.daily
deleted file mode 100755
index 9b4abd894..000000000
--- a/core/man-db/man-db.cron.daily
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
-NICE=19
-
-# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
-IONICE_CLASS=2
-
-# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
-IONICE_PRIORITY=7
-
-UPDATEMANDB="/usr/bin/mandb --quiet"
-
-# Update the "whatis" database
-#/usr/bin/makewhatis -u -w
-
-# taken from Debian
-# man-db cron daily
-set -e
-
-if ! [ -d /var/cache/man ]; then
- # Recover from deletion, per FHS.
- mkdir -p /var/cache/man
- chmod 755 /var/cache/man
-fi
-
-# regenerate man database
-
-if [ -x /usr/bin/nice ]; then
- UPDATEMANDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEMANDB}"
-fi
-
-if [ -x /usr/bin/ionice ]; then
- UPDATEMANDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEMANDB}"
-fi
-
-${UPDATEMANDB}
-
-exit 0
diff --git a/core/man-db/man-db.service b/core/man-db/man-db.service
new file mode 100644
index 000000000..be4619c4d
--- /dev/null
+++ b/core/man-db/man-db.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Update man-db cache
+RequiresMountsFor=/var/cache/man
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mkdir -m 0755 -p /var/cache/man
+ExecStart=/usr/bin/mandb --quiet
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/man-db/man-db.timer b/core/man-db/man-db.timer
new file mode 100644
index 000000000..5d950f0e8
--- /dev/null
+++ b/core/man-db/man-db.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily man-db cache update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/core/mlocate/PKGBUILD b/core/mlocate/PKGBUILD
index c8d979f9a..b46a7afdb 100644
--- a/core/mlocate/PKGBUILD
+++ b/core/mlocate/PKGBUILD
@@ -1,28 +1,32 @@
-# $Id: PKGBUILD 166971 2012-09-23 22:22:21Z bisson $
+# $Id: PKGBUILD 210562 2014-04-14 22:14:39Z thomas $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: lydgate
pkgname=mlocate
pkgver=0.26
-pkgrel=1
+pkgrel=3
pkgdesc='Merging locate/updatedb implementation'
url='https://fedorahosted.org/mlocate/'
arch=('i686' 'x86_64')
license=('GPL')
-backup=('etc/updatedb.conf'
- 'etc/cron.daily/updatedb')
+backup=('etc/updatedb.conf')
+depends=('glibc')
source=("https://fedorahosted.org/releases/m/l/mlocate/mlocate-${pkgver}.tar.xz"
'updatedb.conf'
- 'updatedb.cron')
+ updatedb.{timer,service})
sha1sums=('c6e6d81b25359c51c545f4b8ba0f3b469227fcbc'
'0150379149bf9d714bc81332d775fc273e7e3535'
- '8301e6277d27db539af6cf4bc243e8e247bffc2e')
+ '2f3a94994ece62aeb286315a6fa5e9e03203706a'
+ 'f2f71aefbf677fb1719b5c67c757cde34e3210d7')
-build() {
+prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
-
sed -i '/^groupname /s/mlocate/locate/' Makefile.in
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make
}
@@ -45,5 +49,9 @@ package() {
install -dm750 -g21 "${pkgdir}/var/lib/locate"
install -Dm644 ../updatedb.conf "${pkgdir}/etc/updatedb.conf"
- install -Dm744 ../updatedb.cron "${pkgdir}/etc/cron.daily/updatedb"
+
+ install -D -m644 ${srcdir}/updatedb.timer ${pkgdir}/usr/lib/systemd/system/updatedb.timer
+ install -D -m644 ${srcdir}/updatedb.service ${pkgdir}/usr/lib/systemd/system/updatedb.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../updatedb.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/updatedb.timer
}
diff --git a/core/mlocate/updatedb.cron b/core/mlocate/updatedb.cron
deleted file mode 100755
index 431cb533e..000000000
--- a/core/mlocate/updatedb.cron
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-NICE='nice -n 19'
-IONICE='ionice -c 2 -n 7'
-
-exec ${IONICE} ${NICE} updatedb -f proc
diff --git a/core/mlocate/updatedb.service b/core/mlocate/updatedb.service
new file mode 100644
index 000000000..f02edace9
--- /dev/null
+++ b/core/mlocate/updatedb.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Update locate database
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/updatedb
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/mlocate/updatedb.timer b/core/mlocate/updatedb.timer
new file mode 100644
index 000000000..c8ca33f35
--- /dev/null
+++ b/core/mlocate/updatedb.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily locate database update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/core/shadow/PKGBUILD b/core/shadow/PKGBUILD
index 0ca6f5433..8134224ec 100644
--- a/core/shadow/PKGBUILD
+++ b/core/shadow/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 197840 2013-10-30 11:06:53Z allan $
+# $Id: PKGBUILD 210563 2014-04-14 22:14:41Z thomas $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Aaron Griffin <aaron@archlinux.org>
pkgname=shadow
pkgver=4.1.5.1
-pkgrel=7
+pkgrel=9
pkgdesc="Password and account management tool suite with support for shadow files and PAM"
arch=('i686' 'x86_64')
url='http://pkg-shadow.alioth.debian.org/'
@@ -18,7 +18,7 @@ backup=(etc/login.defs
etc/default/useradd)
options=(strip debug)
install='shadow.install'
-source=("http://pkg-shadow.alioth.debian.org/releases/$pkgname-$pkgver.tar.bz2"{,.sig}
+source=("ftp://ftp.archlinux.org/other/packages/$pkgname/$pkgname-$pkgver.tar.bz2"{,.sig}
LICENSE
chgpasswd
chpasswd
@@ -26,7 +26,7 @@ source=("http://pkg-shadow.alioth.debian.org/releases/$pkgname-$pkgver.tar.bz2"{
login.defs
newusers
passwd
- shadow.cron.daily
+ shadow.{timer,service}
useradd.defaults
xstrdup.patch
shadow-strncpy-usage.patch
@@ -40,7 +40,8 @@ sha1sums=('81f38720b953ef9c2c100c43d02dfe19cafd6c30'
'e92045fb75e0c21a3f294a00de0bd2cd252e9463'
'12427b1ca92a9b85ca8202239f0d9f50198b818f'
'611be25d91c3f8f307c7fe2485d5f781e5dee75f'
- '98f4919014b1a9eb9f01ca7731e04b1d973cedd5'
+ 'a154a94b47a3d0c6c287253b98c0d10b861226d0'
+ 'e40fc20894e69a07fb0070b41f567d0c27133720'
'9ae93de5987dd0ae428f0cc1a5a5a5cd53583f19'
'6010fffeed1fc6673ad9875492e1193b1a847b53'
'21e12966a6befb25ec123b403cd9b5c492fe5b16'
@@ -87,8 +88,11 @@ package() {
# useradd defaults
install -Dm644 "$srcdir/useradd.defaults" "$pkgdir/etc/default/useradd"
- # cron job
- install -Dm744 "$srcdir/shadow.cron.daily" "$pkgdir/etc/cron.daily/shadow"
+ # systemd timer
+ install -D -m644 ${srcdir}/shadow.timer ${pkgdir}/usr/lib/systemd/system/shadow.timer
+ install -D -m644 ${srcdir}/shadow.service ${pkgdir}/usr/lib/systemd/system/shadow.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../shadow.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/shadow.timer
# login.defs
install -Dm644 "$srcdir/login.defs" "$pkgdir/etc/login.defs"
diff --git a/core/shadow/shadow.cron.daily b/core/shadow/shadow.cron.daily
deleted file mode 100755
index 1373ecde9..000000000
--- a/core/shadow/shadow.cron.daily
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# Verify integrity of password and group files
-/usr/bin/pwck -r
-/usr/bin/grpck -r
-
diff --git a/core/shadow/shadow.service b/core/shadow/shadow.service
new file mode 100644
index 000000000..5c1c84583
--- /dev/null
+++ b/core/shadow/shadow.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Verify integrity of password and group files
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/pwck -r
+ExecStart=/usr/bin/grpck -r
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/shadow/shadow.timer b/core/shadow/shadow.timer
new file mode 100644
index 000000000..9cc6baaa9
--- /dev/null
+++ b/core/shadow/shadow.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily verification of password and group files
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/core/systemd/0001-backlight-do-nothing-if-max_brightness-is-0.patch b/core/systemd/0001-backlight-do-nothing-if-max_brightness-is-0.patch
new file mode 100644
index 000000000..c7525066e
--- /dev/null
+++ b/core/systemd/0001-backlight-do-nothing-if-max_brightness-is-0.patch
@@ -0,0 +1,108 @@
+From eab2144e7ef737e532a241bcfae432395ae8f22d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
+Date: Thu, 27 Mar 2014 23:41:59 +0100
+Subject: [PATCH 1/4] backlight: do nothing if max_brightness is 0
+
+On virtually any newer Asus mainboard, the eeepc-wmi driver is loaded.
+It exposes a backlight device despite the lack of any physical backlight
+devices. This fake backlight device has max_brightness set to 0. Since
+the introduction of the clamp_brightness function, systemd-backlight
+tries to write '1' to brightness and fails.
+
+This patch changes systemd-backlight to exit gracefully when
+max_brightness is 0 before performing any action. This affects
+both the load and save actions.
+---
+ src/backlight/backlight.c | 44 ++++++++++++++++++++++++++++++--------------
+ 1 file changed, 30 insertions(+), 14 deletions(-)
+
+diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
+index abf8bcf..ce0385b 100644
+--- a/src/backlight/backlight.c
++++ b/src/backlight/backlight.c
+@@ -192,30 +192,37 @@ static bool validate_device(struct udev *udev, struct udev_device *device) {
+ return true;
+ }
+
+-/* Some systems turn the backlight all the way off at the lowest levels.
+- * clamp_brightness clamps the saved brightness to at least 1 or 5% of
+- * max_brightness. This avoids preserving an unreadably dim screen, which
+- * would otherwise force the user to disable state restoration. */
+-static void clamp_brightness(struct udev_device *device, char **value) {
++static unsigned get_max_brightness(struct udev_device *device) {
+ int r;
+ const char *max_brightness_str;
+- unsigned brightness, max_brightness, new_brightness;
++ unsigned max_brightness;
+
+ max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness");
+ if (!max_brightness_str) {
+- log_warning("Failed to read max_brightness attribute; not checking saved brightness");
+- return;
++ log_warning("Failed to read max_brightness attribute");
++ return 0;
+ }
+
+- r = safe_atou(*value, &brightness);
++ r = safe_atou(max_brightness_str, &max_brightness);
+ if (r < 0) {
+- log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r));
+- return;
++ log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r));
++ return 0;
+ }
+
+- r = safe_atou(max_brightness_str, &max_brightness);
++ return max_brightness;
++}
++
++/* Some systems turn the backlight all the way off at the lowest levels.
++ * clamp_brightness clamps the saved brightness to at least 1 or 5% of
++ * max_brightness. This avoids preserving an unreadably dim screen, which
++ * would otherwise force the user to disable state restoration. */
++static void clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) {
++ int r;
++ unsigned brightness, new_brightness;
++
++ r = safe_atou(*value, &brightness);
+ if (r < 0) {
+- log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r));
++ log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r));
+ return;
+ }
+
+@@ -239,6 +246,7 @@ int main(int argc, char *argv[]) {
+ _cleanup_udev_device_unref_ struct udev_device *device = NULL;
+ _cleanup_free_ char *saved = NULL, *ss = NULL, *escaped_ss = NULL, *escaped_sysname = NULL, *escaped_path_id = NULL;
+ const char *sysname, *path_id;
++ unsigned max_brightness;
+ int r;
+
+ if (argc != 3) {
+@@ -294,6 +302,14 @@ int main(int argc, char *argv[]) {
+ return EXIT_FAILURE;
+ }
+
++ /* If max_brightness is 0, then there is no actual backlight
++ * device. This happens on desktops with Asus mainboards
++ * that load the eeepc-wmi module.
++ */
++ max_brightness = get_max_brightness(device);
++ if (max_brightness == 0)
++ return EXIT_SUCCESS;
++
+ escaped_ss = cescape(ss);
+ if (!escaped_ss) {
+ log_oom();
+@@ -348,7 +364,7 @@ int main(int argc, char *argv[]) {
+ return EXIT_FAILURE;
+ }
+
+- clamp_brightness(device, &value);
++ clamp_brightness(device, &value, max_brightness);
+
+ r = udev_device_set_sysattr_value(device, "brightness", value);
+ if (r < 0) {
+--
+1.9.2
+
diff --git a/core/systemd/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch b/core/systemd/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch
new file mode 100644
index 000000000..c99756691
--- /dev/null
+++ b/core/systemd/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch
@@ -0,0 +1,38 @@
+From cad77d38e7e0544f719812af2bf5dc97d71a6f02 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Sat, 5 Apr 2014 13:59:01 -0400
+Subject: [PATCH 2/4] reduce the amount of messages logged to /dev/kmsg when
+ "debug" is specified
+
+---
+ src/core/main.c | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/src/core/main.c b/src/core/main.c
+index 41605ee..feabead 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -412,18 +412,13 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
+ }
+
+ } else if (streq(key, "quiet") && !value) {
+-
+ if (arg_show_status == _SHOW_STATUS_UNSET)
+ arg_show_status = SHOW_STATUS_AUTO;
+
+ } else if (streq(key, "debug") && !value) {
+-
+- /* Log to kmsg, the journal socket will fill up before the
+- * journal is started and tools running during that time
+- * will block with every log message for for 60 seconds,
+- * before they give up. */
+ log_set_max_level(LOG_DEBUG);
+- log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_KMSG);
++ if (detect_container(NULL) > 0)
++ log_set_target(LOG_TARGET_CONSOLE);
+
+ } else if (!in_initrd() && !value) {
+ unsigned i;
+--
+1.9.2
+
diff --git a/core/systemd/0003-man-reword-Persistent-description.patch b/core/systemd/0003-man-reword-Persistent-description.patch
new file mode 100644
index 000000000..feb394da8
--- /dev/null
+++ b/core/systemd/0003-man-reword-Persistent-description.patch
@@ -0,0 +1,50 @@
+From 1d83dac5adba9e1db5b058436e23ba7ac403d652 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Mon, 7 Apr 2014 20:58:37 -0400
+Subject: [PATCH 3/4] man: reword Persistent= description
+
+I think it is easier to grok this way.
+---
+ man/systemd.timer.xml | 26 ++++++++++++--------------
+ 1 file changed, 12 insertions(+), 14 deletions(-)
+
+diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml
+index 58eaab0..44f55e0 100644
+--- a/man/systemd.timer.xml
++++ b/man/systemd.timer.xml
+@@ -255,20 +255,18 @@
+ <term><varname>Persistent=</varname></term>
+
+ <listitem><para>Takes a boolean
+- argument. If true the service unit is
+- immediately triggered when the timer
+- unit is activated and the timer
+- elapsed at least once since the last
+- time the service unit has been
+- triggered by the timer unit. The time
+- when the service unit was last
+- triggered is stored on disk. This is
+- useful to catch up for missed timers
+- when a machine is shutdown temporarily
+- and then is powered up again. Note
+- that this setting only has an effect
+- on timers configured with
+- <varname>OnCalendar=</varname>.
++ argument. If true, the time when the
++ service unit was last triggered is
++ stored on disk. When the timer is
++ activated, the service unit is
++ triggered immediately if it would have
++ been triggered at least once during
++ the time when the timer was inactive.
++ This is useful to catch up on missed
++ runs of the service when the machine
++ was off. Note that this setting only
++ has an effect on timers configured
++ with <varname>OnCalendar=</varname>.
+ </para></listitem>
+ </varlistentry>
+
+--
+1.9.2
+
diff --git a/core/systemd/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch b/core/systemd/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch
new file mode 100644
index 000000000..741176e62
--- /dev/null
+++ b/core/systemd/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch
@@ -0,0 +1,85 @@
+From 7cee0cf1ecc18ea8a016bef48c79f7ea4fd4195a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
+Date: Wed, 2 Apr 2014 20:18:44 +0200
+Subject: [PATCH 4/4] core: Make sure a stamp file exists for all
+ Persistent=true timers
+
+If a persistent timer has no stamp file yet, it behaves just like a normal
+timer until it runs for the first time. If the system is always shut down
+while the timer is supposed to run, a stamp file is never created and
+Peristent=true has no effect.
+
+This patch fixes this by creating a stamp file with the current time
+when the timer is first started.
+---
+ src/core/timer.c | 40 ++++++++++++++++++++++++----------------
+ 1 file changed, 24 insertions(+), 16 deletions(-)
+
+diff --git a/src/core/timer.c b/src/core/timer.c
+index 6c85304..b0a9023 100644
+--- a/src/core/timer.c
++++ b/src/core/timer.c
+@@ -111,6 +111,23 @@ static int timer_add_default_dependencies(Timer *t) {
+ return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ }
+
++static void update_stampfile(Timer *t, usec_t timestamp) {
++ _cleanup_close_ int fd = -1;
++
++ mkdir_parents_label(t->stamp_path, 0755);
++
++ /* Update the file atime + mtime, if we can */
++ fd = open(t->stamp_path, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
++ if (fd >= 0) {
++ struct timespec ts[2];
++
++ timespec_store(&ts[0], timestamp);
++ ts[1] = ts[0];
++
++ futimens(fd, ts);
++ }
++}
++
+ static int timer_setup_persistent(Timer *t) {
+ int r;
+
+@@ -496,22 +513,8 @@ static void timer_enter_running(Timer *t) {
+
+ dual_timestamp_get(&t->last_trigger);
+
+- if (t->stamp_path) {
+- _cleanup_close_ int fd = -1;
+-
+- mkdir_parents_label(t->stamp_path, 0755);
+-
+- /* Update the file atime + mtime, if we can */
+- fd = open(t->stamp_path, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
+- if (fd >= 0) {
+- struct timespec ts[2];
+-
+- timespec_store(&ts[0], t->last_trigger.realtime);
+- ts[1] = ts[0];
+-
+- futimens(fd, ts);
+- }
+- }
++ if (t->stamp_path)
++ update_stampfile(t, t->last_trigger.realtime);
+
+ timer_set_state(t, TIMER_RUNNING);
+ return;
+@@ -539,6 +542,11 @@ static int timer_start(Unit *u) {
+
+ if (stat(t->stamp_path, &st) >= 0)
+ t->last_trigger.realtime = timespec_load(&st.st_atim);
++ else if (errno == ENOENT)
++ /* The timer has never run before,
++ * make sure a stamp file exists.
++ */
++ update_stampfile(t, now(CLOCK_REALTIME));
+ }
+
+ t->result = TIMER_SUCCESS;
+--
+1.9.2
+
diff --git a/core/systemd/PKGBUILD b/core/systemd/PKGBUILD
index b9b1befb2..966b70596 100644
--- a/core/systemd/PKGBUILD
+++ b/core/systemd/PKGBUILD
@@ -4,7 +4,7 @@
pkgbase=systemd
pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat')
pkgver=212
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gobject-introspection' 'gperf'
@@ -14,11 +14,33 @@ options=('strip' 'debug')
source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
'initcpio-hook-udev'
'initcpio-install-systemd'
- 'initcpio-install-udev')
+ 'initcpio-install-udev'
+ '0001-backlight-do-nothing-if-max_brightness-is-0.patch'
+ '0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch'
+ '0003-man-reword-Persistent-description.patch'
+ '0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch'
+ )
md5sums=('257a75fff826ff91cb1ce567091cf270'
'29245f7a240bfba66e2b1783b63b6b40'
'66cca7318e13eaf37c5b7db2efa69846'
- 'bde43090d4ac0ef048e3eaee8202a407')
+ 'bde43090d4ac0ef048e3eaee8202a407'
+ '4b5d61e30b423ff5a0ec38037146b61b'
+ 'd9518fc6cef154ebc76555b0fb9d4412'
+ 'c35c7f55d41c0a8b8725785b49ce6440'
+ '2e7aee18c749727c8bbc8db86f17edc0')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=3cadce7d33e263ec7a6a83c00c11144930258b22
+ patch -p1 -i "$srcdir/0001-backlight-do-nothing-if-max_brightness-is-0.patch"
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=b2103dccb354de3f38c49c14ccb637bdf665e40f
+ patch -p1 -i "$srcdir/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch"
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=de41590a9bb370de92e4a1ed933bc6e38abb6787
+ patch -p1 -i "$srcdir/0003-man-reword-Persistent-description.patch"
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=472fc28fdade525e700ebf4b25d026a8c907796d
+ patch -p1 -i "$srcdir/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch"
+}
build() {
cd "$pkgname-$pkgver"
diff --git a/cross/cross-gcc/gcc-4.8-filename-output.patch b/cross/cross-gcc/gcc-4.8-filename-output.patch
deleted file mode 100644
index 6951eb239..000000000
--- a/cross/cross-gcc/gcc-4.8-filename-output.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- gcc/c-family/c-opts.c (revision 200330)
-+++ gcc/c-family/c-opts.c (working copy)
-@@ -1338,10 +1338,14 @@ c_finish_options (void)
-
- /* Give CPP the next file given by -include, if any. */
- static void
- push_command_line_include (void)
- {
-+ // This can happen if disabled by -imacros for example.
-+ if (include_cursor > deferred_count)
-+ return;
-+
- if (!done_preinclude)
- {
- done_preinclude = true;
- if (flag_hosted && std_inc && !cpp_opts->preprocessed)
- {
diff --git a/cross/cross-gcc/gcc-4.8-lambda-ICE.patch b/cross/cross-gcc/gcc-4.8-lambda-ICE.patch
deleted file mode 100644
index cf77a9b35..000000000
--- a/cross/cross-gcc/gcc-4.8-lambda-ICE.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
-index 0b8e2f7..ad1c209 100644
---- a/gcc/cp/semantics.c
-+++ b/gcc/cp/semantics.c
-@@ -2719,8 +2719,10 @@ finish_member_declaration (tree decl)
- /*friend_p=*/0);
- }
- }
-- /* Enter the DECL into the scope of the class. */
-- else if (pushdecl_class_level (decl))
-+ /* Enter the DECL into the scope of the class, if the class
-+ isn't a closure (whose fields are supposed to be unnamed). */
-+ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
-+ || pushdecl_class_level (decl))
- {
- if (TREE_CODE (decl) == USING_DECL)
- {
-diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
-new file mode 100644
-index 0000000..df2b037
---- /dev/null
-+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
-@@ -0,0 +1,9 @@
-+// PR c++/56710
-+// { dg-options "-std=c++11 -Wall" }
-+
-+int main()
-+{
-+ int t = 0;
-+ return [&]() -> int {int __t; __t = t; return __t; }();
-+ return [&t]() -> int {int __t; __t = t; return __t; }();
-+}
---
-1.8.4.2
-
diff --git a/cross/cross-gcc/gcc-xtensa.patch b/cross/cross-gcc/gcc-xtensa.patch
deleted file mode 100644
index 9f43902be..000000000
--- a/cross/cross-gcc/gcc-xtensa.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From c7162b8a3db42e7faf47606d3aa3dd61e64aea17 Mon Sep 17 00:00:00 2001
-From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
-Date: Mon, 7 Jan 2013 16:06:28 +0530
-Subject: [PATCH] gcc: AR9271/AR7010 config
-
-Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
----
- include/xtensa-config.h | 36 +++++++++++++++++-------------------
- 1 file changed, 17 insertions(+), 19 deletions(-)
-
-diff --git a/include/xtensa-config.h b/include/xtensa-config.h
-index 30f4f41..fe9b051 100644
---- a/include/xtensa-config.h
-+++ b/include/xtensa-config.h
-@@ -1,7 +1,7 @@
- /* Xtensa configuration settings.
-- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
-+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
-- Contributed by Bob Wilson (bob.wilson@acm.org) at Tensilica.
-+ Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
-@@ -44,10 +44,7 @@
- #define XCHAL_HAVE_L32R 1
-
- #undef XSHAL_USE_ABSOLUTE_LITERALS
--#define XSHAL_USE_ABSOLUTE_LITERALS 0
--
--#undef XSHAL_HAVE_TEXT_SECTION_LITERALS
--#define XSHAL_HAVE_TEXT_SECTION_LITERALS 1 /* Set if there is some memory that allows both code and literals. */
-+#define XSHAL_USE_ABSOLUTE_LITERALS 1
-
- #undef XCHAL_HAVE_MAC16
- #define XCHAL_HAVE_MAC16 0
-@@ -59,10 +56,10 @@
- #define XCHAL_HAVE_MUL32 1
-
- #undef XCHAL_HAVE_MUL32_HIGH
--#define XCHAL_HAVE_MUL32_HIGH 0
-+#define XCHAL_HAVE_MUL32_HIGH 1
-
- #undef XCHAL_HAVE_DIV32
--#define XCHAL_HAVE_DIV32 1
-+#define XCHAL_HAVE_DIV32 0
-
- #undef XCHAL_HAVE_NSA
- #define XCHAL_HAVE_NSA 1
-@@ -103,8 +100,6 @@
- #undef XCHAL_HAVE_FP_RSQRT
- #define XCHAL_HAVE_FP_RSQRT 0
-
--#undef XCHAL_HAVE_DFP_accel
--#define XCHAL_HAVE_DFP_accel 0
- #undef XCHAL_HAVE_WINDOWED
- #define XCHAL_HAVE_WINDOWED 1
-
-@@ -119,32 +114,32 @@
-
-
- #undef XCHAL_ICACHE_SIZE
--#define XCHAL_ICACHE_SIZE 16384
-+#define XCHAL_ICACHE_SIZE 0
-
- #undef XCHAL_DCACHE_SIZE
--#define XCHAL_DCACHE_SIZE 16384
-+#define XCHAL_DCACHE_SIZE 0
-
- #undef XCHAL_ICACHE_LINESIZE
--#define XCHAL_ICACHE_LINESIZE 32
-+#define XCHAL_ICACHE_LINESIZE 16
-
- #undef XCHAL_DCACHE_LINESIZE
--#define XCHAL_DCACHE_LINESIZE 32
-+#define XCHAL_DCACHE_LINESIZE 16
-
- #undef XCHAL_ICACHE_LINEWIDTH
--#define XCHAL_ICACHE_LINEWIDTH 5
-+#define XCHAL_ICACHE_LINEWIDTH 4
-
- #undef XCHAL_DCACHE_LINEWIDTH
--#define XCHAL_DCACHE_LINEWIDTH 5
-+#define XCHAL_DCACHE_LINEWIDTH 4
-
- #undef XCHAL_DCACHE_IS_WRITEBACK
--#define XCHAL_DCACHE_IS_WRITEBACK 1
-+#define XCHAL_DCACHE_IS_WRITEBACK 0
-
-
- #undef XCHAL_HAVE_MMU
- #define XCHAL_HAVE_MMU 1
-
- #undef XCHAL_MMU_MIN_PTE_PAGE_SIZE
--#define XCHAL_MMU_MIN_PTE_PAGE_SIZE 12
-+#define XCHAL_MMU_MIN_PTE_PAGE_SIZE 29
-
-
- #undef XCHAL_HAVE_DEBUG
-@@ -157,8 +152,11 @@
- #define XCHAL_NUM_DBREAK 2
-
- #undef XCHAL_DEBUGLEVEL
--#define XCHAL_DEBUGLEVEL 6
-+#define XCHAL_DEBUGLEVEL 4
-+
-
-+#undef XCHAL_EXCM_LEVEL
-+#define XCHAL_EXCM_LEVEL 3
-
- #undef XCHAL_MAX_INSTRUCTION_SIZE
- #define XCHAL_MAX_INSTRUCTION_SIZE 3
---
-1.8.1
-
diff --git a/cross/cross-gcc/gcc.install b/cross/cross-gcc/gcc.install
deleted file mode 100644
index 3407a5e1f..000000000
--- a/cross/cross-gcc/gcc.install
+++ /dev/null
@@ -1,20 +0,0 @@
-infodir=usr/share/info
-filelist=(cpp.info cppinternals.info gcc.info gccinstall.info gccint.info)
-
-post_install() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
diff --git a/extra/efl/PKGBUILD b/extra/efl/PKGBUILD
index 378129aff..77eb649a5 100644
--- a/extra/efl/PKGBUILD
+++ b/extra/efl/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 208760 2014-03-26 19:55:43Z ronald $
+# $Id: PKGBUILD 210614 2014-04-15 20:29:39Z ronald $
# Maintainer: Ronald van Haren <ronald@archlinux.org>
# Contributor: Enlightenment Developers <enlightenment-devel@enlightenment.org>
pkgbase=efl
pkgname=('efl' 'efl-docs')
-pkgver=1.9.2
+pkgver=1.9.3
pkgrel=1
pkgdesc="Enlightenment Foundation Libraries"
arch=('i686' 'x86_64')
@@ -21,7 +21,7 @@ replaces=('ecore' 'edje' 'eet' 'eeze' 'efreet' 'eina' 'eio' 'embryo'
options=('!emptydirs')
source=(http://download.enlightenment.org/rel/libs/${pkgname}/$pkgname-$pkgver.tar.gz)
install=efl.install
-sha1sums=('723711d38e6e0d47006fe049d92228961cd37520')
+sha1sums=('66ee2fa95b43adbce44087fe6b0e3f638ac82fb1')
prepare() {
sed -i 's/env python$/&2/' "${srcdir}/${pkgname}-${pkgver}/src/scripts/eina/eina-bench-cmp"
diff --git a/extra/elementary/PKGBUILD b/extra/elementary/PKGBUILD
index 5e31f1e8d..ea39f3745 100644
--- a/extra/elementary/PKGBUILD
+++ b/extra/elementary/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 208762 2014-03-26 20:14:51Z ronald $
+# $Id: PKGBUILD 210616 2014-04-15 20:35:29Z ronald $
# Maintainer: Ronald van Haren <ronald@archlinux.org>
# Contributor: Gustavo Sverzut Barbieri <barbieri@gmail.com>
pkgbase=elementary
pkgname=('elementary' 'elementary-docs')
-pkgver=1.9.2
+pkgver=1.9.3
pkgrel=1
pkgdesc="Enlightenment's widget set"
arch=('i686' 'x86_64')
@@ -14,7 +14,7 @@ depends=('efl' 'evas_generic_loaders')
makedepends=('doxygen' 'imagemagick')
options=('!emptydirs')
source=(http://download.enlightenment.org/rel/libs/${pkgname}/${pkgname}-${pkgver}.tar.gz)
-sha1sums=('7120ace473b539cee73ad84fc173ae928228de26')
+sha1sums=('19f708c2e6c3ae40cf233e135a8936111d7bda42')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/enlightenment/PKGBUILD b/extra/enlightenment/PKGBUILD
index 05de8e3fb..69ac53edc 100644
--- a/extra/enlightenment/PKGBUILD
+++ b/extra/enlightenment/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Enlightenment Developers <enlightenment-devel@enlightenment.org>>
pkgname=enlightenment
-pkgver=0.18.6
+pkgver=0.18.7
pkgrel=1
pkgdesc="Enlightenment window manager"
arch=('i686' 'x86_64')
@@ -19,7 +19,7 @@ backup=('etc/enlightenment/sysactions.conf'
'etc/xdg/menus/enlightenment.menu')
source=(http://download.enlightenment.org/rel/apps/${pkgname}/$pkgname-$pkgver.tar.gz)
install=enlightenment.install
-sha1sums=('f010f86b5179a2adca0041c7558032e2d86a7fb9')
+sha1sums=('eb981cf0c4d6716c7e6ee35c9c7f7dbd6c8940b9')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/eog-plugins/PKGBUILD b/extra/eog-plugins/PKGBUILD
index 8e8984e59..29761ce22 100644
--- a/extra/eog-plugins/PKGBUILD
+++ b/extra/eog-plugins/PKGBUILD
@@ -1,18 +1,18 @@
-# $Id: PKGBUILD 210426 2014-04-14 20:06:02Z jgc $
+# $Id: PKGBUILD 210579 2014-04-15 08:18:43Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
pkgname=eog-plugins
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="Plugins for Eye of Gnome"
arch=('i686' 'x86_64')
-url="http://www.gnome.org/"
+url="https://wiki.gnome.org/Apps/EyeOfGnome/Plugins"
license=('GPL2')
depends=('eog' 'libchamplain' 'libgdata')
makedepends=('intltool')
install=eog-plugins.install
source=(http://download.gnome.org/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('3f6c4e0dd63c1003f31c08636b6540cf0312b9b42e2e621c96b946c72e3d9742')
+sha256sums=('5b9a6854d5411e75aadb9d44694bbe02a35f5a79a23da5c1bb4feb6bacf56f1c')
build() {
cd $pkgname-$pkgver
diff --git a/extra/eog/PKGBUILD b/extra/eog/PKGBUILD
index d8d5c08ec..41f8d5494 100644
--- a/extra/eog/PKGBUILD
+++ b/extra/eog/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 210425 2014-04-14 20:06:01Z jgc $
+# $Id: PKGBUILD 210578 2014-04-15 08:02:37Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=eog
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="Eye of Gnome: An image viewing and cataloging program"
arch=(i686 x86_64)
@@ -13,9 +13,9 @@ makedepends=(intltool itstool)
install=eog.install
groups=(gnome)
options=('!emptydirs')
-url="http://www.gnome.org"
+url="https://wiki.gnome.org/Apps/EyeOfGnome"
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('bd9d3f733cb78465bc0891efb203889c97bacd774ca6017a3fd4a146b3d32402')
+sha256sums=('69a68a95c1322f133e15d86616db3b4fd02a2100767e897a85157b6c8ac77dd1')
build() {
cd "$pkgname-$pkgver"
diff --git a/extra/gedit/PKGBUILD b/extra/gedit/PKGBUILD
index 1fc5e7df9..2ec5fef7d 100644
--- a/extra/gedit/PKGBUILD
+++ b/extra/gedit/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 210440 2014-04-14 20:06:14Z jgc $
+# $Id: PKGBUILD 210581 2014-04-15 08:23:31Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gedit
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="A text editor for GNOME"
arch=(i686 x86_64)
@@ -16,7 +16,7 @@ options=('!emptydirs')
url="http://www.gnome.org"
install=gedit.install
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
-sha256sums=('6028d535d50c85017739b84e7fe94ad5a1940064bb315375d5d1d6ed99eb38c2')
+sha256sums=('8e3edc62102934a8be708b0fdf27b86368fa9ede885628283bf8e91b26bbb67f')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-klotski/PKGBUILD b/extra/gnome-klotski/PKGBUILD
index 724b041bd..c487a8eb4 100644
--- a/extra/gnome-klotski/PKGBUILD
+++ b/extra/gnome-klotski/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 210468 2014-04-14 20:06:36Z jgc $
+# $Id: PKGBUILD 210587 2014-04-15 08:33:15Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-klotski
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="Slide blocks to solve the puzzle"
arch=('i686' 'x86_64')
license=('GPL')
-depends=('desktop-file-utils' 'hicolor-icon-theme' 'gtk3' 'librsvg')
+depends=('hicolor-icon-theme' 'gtk3' 'librsvg')
makedepends=('intltool' 'itstool' 'gobject-introspection')
conflicts=('gnome-games')
replaces=('gnome-games')
@@ -17,7 +17,7 @@ install=gnome-klotski.install
url="https://live.gnome.org/Klotski"
groups=('gnome-extra')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('f73a5be8207ed5578ba4fd8482ad5c0a0ddd55119e52e5967053bf4729225a02')
+sha256sums=('2f2f559f85405de8f9580f9743d922407d78cdd79b9c8e3dddda529ee9393a18')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-klotski/gnome-klotski.install b/extra/gnome-klotski/gnome-klotski.install
index 0730c1a47..e9eb19f52 100644
--- a/extra/gnome-klotski/gnome-klotski.install
+++ b/extra/gnome-klotski/gnome-klotski.install
@@ -1,6 +1,5 @@
post_install() {
glib-compile-schemas usr/share/glib-2.0/schemas
- update-desktop-database -q
gtk-update-icon-cache -f -q usr/share/icons/hicolor
}
diff --git a/extra/gnome-mahjongg/PKGBUILD b/extra/gnome-mahjongg/PKGBUILD
index db92985a4..dde84b193 100644
--- a/extra/gnome-mahjongg/PKGBUILD
+++ b/extra/gnome-mahjongg/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 210469 2014-04-14 20:06:37Z jgc $
+# $Id: PKGBUILD 210604 2014-04-15 10:33:45Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-mahjongg
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="Disassemble a pile of tiles by removing matching pairs"
arch=('i686' 'x86_64')
license=('GPL')
-depends=('desktop-file-utils' 'hicolor-icon-theme' 'gtk3' 'librsvg')
+depends=('hicolor-icon-theme' 'gtk3' 'librsvg')
makedepends=('intltool' 'itstool' 'gobject-introspection')
conflicts=('gnome-games')
replaces=('gnome-games')
@@ -17,7 +17,7 @@ install=gnome-mahjongg.install
url="https://live.gnome.org/Mahjongg"
groups=('gnome-extra')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
-sha256sums=('bc1e04ddcdd4facb79c564328da8401245cc92c3465b73ad908caf1577c85b45')
+sha256sums=('86b54c8b82131b9a6ffcb1eb41a8a29b859ae3a1ca99a1b08656cbe8bcca9f04')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-mahjongg/gnome-mahjongg.install b/extra/gnome-mahjongg/gnome-mahjongg.install
index 0730c1a47..e9eb19f52 100644
--- a/extra/gnome-mahjongg/gnome-mahjongg.install
+++ b/extra/gnome-mahjongg/gnome-mahjongg.install
@@ -1,6 +1,5 @@
post_install() {
glib-compile-schemas usr/share/glib-2.0/schemas
- update-desktop-database -q
gtk-update-icon-cache -f -q usr/share/icons/hicolor
}
diff --git a/extra/gnome-maps/PKGBUILD b/extra/gnome-maps/PKGBUILD
index 3a219b95d..77ff35a26 100644
--- a/extra/gnome-maps/PKGBUILD
+++ b/extra/gnome-maps/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-maps
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="A simple GNOME 3 maps application"
arch=(i686 x86_64)
@@ -12,7 +12,7 @@ makedepends=(intltool)
groups=('gnome-extra')
install=gnome-maps.install
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('00396da76f88274355c8fa1206308fbd56c94443033993fb7e74c5e3b863516b')
+sha256sums=('783215079164478f9fec4aef455449ceaa3d3ae1726dd3bcdb16096b25865025')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-mines/PKGBUILD b/extra/gnome-mines/PKGBUILD
index 43ccd6438..a59af2e1d 100644
--- a/extra/gnome-mines/PKGBUILD
+++ b/extra/gnome-mines/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 210471 2014-04-14 20:06:38Z jgc $
+# $Id: PKGBUILD 210589 2014-04-15 08:36:37Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-mines
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="Clear hidden mines from a minefield"
arch=('i686' 'x86_64')
license=('GPL')
-depends=('desktop-file-utils' 'hicolor-icon-theme' 'gtk3' 'librsvg')
+depends=('hicolor-icon-theme' 'gtk3' 'librsvg')
makedepends=('intltool' 'itstool' 'gobject-introspection')
conflicts=('gnome-games')
replaces=('gnome-games')
@@ -17,7 +17,7 @@ install=gnome-mines.install
url="https://live.gnome.org/Mines"
groups=('gnome-extra')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('7916c1b8cab4f4e876ae5856437b0e2df8db25ed53501b0378fea914dfcce69d')
+sha256sums=('b386add5c4dbaa8ad8a1952a52fbdf4c753a036202e63bf198940e9b97f10a01')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-mines/gnome-mines.install b/extra/gnome-mines/gnome-mines.install
index 0730c1a47..e9eb19f52 100644
--- a/extra/gnome-mines/gnome-mines.install
+++ b/extra/gnome-mines/gnome-mines.install
@@ -1,6 +1,5 @@
post_install() {
glib-compile-schemas usr/share/glib-2.0/schemas
- update-desktop-database -q
gtk-update-icon-cache -f -q usr/share/icons/hicolor
}
diff --git a/extra/gnome-robots/PKGBUILD b/extra/gnome-robots/PKGBUILD
index 55b55b77d..c56e18595 100644
--- a/extra/gnome-robots/PKGBUILD
+++ b/extra/gnome-robots/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 210478 2014-04-14 20:06:44Z jgc $
+# $Id: PKGBUILD 210591 2014-04-15 08:41:46Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-robots
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="Avoid the robots and make them crash into each other"
arch=('i686' 'x86_64')
license=('GPL')
-depends=('desktop-file-utils' 'hicolor-icon-theme' 'gtk3' 'libcanberra' 'librsvg')
+depends=('hicolor-icon-theme' 'gtk3' 'libcanberra' 'librsvg')
makedepends=('intltool' 'itstool' 'gobject-introspection')
conflicts=('gnome-games')
replaces=('gnome-games')
@@ -17,7 +17,7 @@ install=gnome-robots.install
url="https://live.gnome.org/Robots"
groups=('gnome-extra')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('8d31c32636689bef4badf19477a2a5b32e0cd08d244a5eb587180c472ff56f50')
+sha256sums=('f48477f0dfab25ca78920c005c7d02cbdd8fa771f3825e9106b784d2cb5ca4ad')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-robots/gnome-robots.install b/extra/gnome-robots/gnome-robots.install
index d04cdce36..79c0589bb 100644
--- a/extra/gnome-robots/gnome-robots.install
+++ b/extra/gnome-robots/gnome-robots.install
@@ -1,6 +1,5 @@
post_install() {
glib-compile-schemas usr/share/glib-2.0/schemas
- update-desktop-database -q
gtk-update-icon-cache -q -f usr/share/icons/hicolor
}
diff --git a/extra/gnome-system-monitor/PKGBUILD b/extra/gnome-system-monitor/PKGBUILD
index 4e9283376..12ea6ec33 100644
--- a/extra/gnome-system-monitor/PKGBUILD
+++ b/extra/gnome-system-monitor/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 210485 2014-04-14 20:06:50Z jgc $
+# $Id: PKGBUILD 210583 2014-04-15 08:27:36Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-system-monitor
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="A system monitor for GNOME"
arch=(i686 x86_64)
@@ -15,7 +15,7 @@ url="http://www.gnome.org"
groups=('gnome')
install=gnome-system-monitor.install
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('e2f10547f297002a02f667c4b399242fa82ed1753e0b80ee7c2bbf7034fe3097')
+sha256sums=('9abdf046248f26b3945a6aba4098ab04907416cdc07e19a7a8aeb568e2428f0f')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-tetravex/PKGBUILD b/extra/gnome-tetravex/PKGBUILD
index 0db75bcab..aae0c4ed1 100644
--- a/extra/gnome-tetravex/PKGBUILD
+++ b/extra/gnome-tetravex/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 210487 2014-04-14 20:06:52Z jgc $
+# $Id: PKGBUILD 210606 2014-04-15 11:20:24Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-tetravex
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="Complete the puzzle by matching numbered tiles"
arch=(i686 x86_64)
license=(GPL)
-depends=(desktop-file-utils hicolor-icon-theme gtk3)
+depends=(hicolor-icon-theme gtk3)
makedepends=(intltool itstool gobject-introspection vala)
conflicts=(gnome-games)
replaces=(gnome-games)
@@ -16,8 +16,8 @@ options=(!emptydirs)
install=gnome-tetravex.install
url="https://live.gnome.org/Tetravex"
groups=(gnome-extra)
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
-sha256sums=('93ac828fb41d57631dff88fc6546d2954b028fdbddfd3e95e8ea8ca56ad30763')
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
+sha256sums=('d50ba0eefb13b5293e7636b30d4f2621c9f001221eb144dbc7d283639871e8ff')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-tetravex/gnome-tetravex.install b/extra/gnome-tetravex/gnome-tetravex.install
index 0730c1a47..e9eb19f52 100644
--- a/extra/gnome-tetravex/gnome-tetravex.install
+++ b/extra/gnome-tetravex/gnome-tetravex.install
@@ -1,6 +1,5 @@
post_install() {
glib-compile-schemas usr/share/glib-2.0/schemas
- update-desktop-database -q
gtk-update-icon-cache -f -q usr/share/icons/hicolor
}
diff --git a/extra/gtksourceview3/PKGBUILD b/extra/gtksourceview3/PKGBUILD
index fe01c4412..8fc57a648 100644
--- a/extra/gtksourceview3/PKGBUILD
+++ b/extra/gtksourceview3/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 210502 2014-04-14 20:07:04Z jgc $
+# $Id: PKGBUILD 210585 2014-04-15 08:29:41Z jgc $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgname=gtksourceview3
_pkgbasename=gtksourceview
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="A text widget adding syntax highlighting and more to GNOME"
arch=('i686' 'x86_64')
@@ -12,7 +12,7 @@ depends=('gtk3' 'libxml2')
makedepends=('intltool' 'gobject-introspection' 'glade')
url="http://www.gnome.org"
source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgbasename/${pkgver:0:4}/$_pkgbasename-$pkgver.tar.xz)
-sha256sums=('633fe802d23b9642a2cdfc2131bd67ed3c4355735d4bcbad0fbbde82a21efbdb')
+sha256sums=('008cc0758197aeb4843fc4d1220cbe1586a419455b8ef2efdc9d05a2e6f6bd3e')
build() {
cd "$_pkgbasename-$pkgver"
diff --git a/extra/haveged/PKGBUILD b/extra/haveged/PKGBUILD
index be9c9dea8..bd1b650ce 100644
--- a/extra/haveged/PKGBUILD
+++ b/extra/haveged/PKGBUILD
@@ -1,32 +1,28 @@
-# $Id: PKGBUILD 203089 2014-01-04 07:54:11Z bpiotrowski $
+# $Id: PKGBUILD 210569 2014-04-15 05:49:04Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: kfgz <kfgz at interia dot pl>
# Contributor: pootzko <pootzko at gmail dot com>
pkgname=haveged
-pkgver=1.8
-_pkgver=${pkgver/.c/c}
+pkgver=1.9.1
pkgrel=1
pkgdesc='Entropy harvesting daemon using CPU timings'
arch=('i686' 'x86_64')
url='http://www.issihosts.com/haveged'
license=('GPL')
depends=('glibc')
-source=($url/$pkgname-$_pkgver.tar.gz
+source=($url/$pkgname-$pkgver.tar.gz
service)
-md5sums=('e0034fd8a645b7499157a31a3e3b224d'
+md5sums=('015ff58cd10607db0e0de60aeca2f5f8'
'777c7ac7fa145c03fca3ba9dcd4501de')
build() {
- cd $pkgname-$_pkgver
+ cd $pkgname-$pkgver
./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/bin
make
}
package() {
- cd $pkgname-$_pkgver
- make DESTDIR="$pkgdir" install
-
- install -Dm644 "$srcdir"/service \
- "$pkgdir"/usr/lib/systemd/system/haveged.service
+ make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
+ install -Dm644 service "$pkgdir"/usr/lib/systemd/system/haveged.service
}
diff --git a/extra/perl-ev/PKGBUILD b/extra/perl-ev/PKGBUILD
index 49d35242a..dbccb0f44 100644
--- a/extra/perl-ev/PKGBUILD
+++ b/extra/perl-ev/PKGBUILD
@@ -1,7 +1,8 @@
-# $Id: PKGBUILD 210156 2014-04-10 13:13:58Z fyan $
+# $Id: PKGBUILD 210600 2014-04-15 09:26:43Z fyan $
+# Maintainer:
pkgname=perl-ev
-pkgver=4.16
+pkgver=4.17
pkgrel=1
pkgdesc='perl interface to libev, a high performance full-featured event loop'
arch=(i686 x86_64)
@@ -10,7 +11,7 @@ options=(!emptydirs)
depends=(perl-common-sense)
url=https://metacpan.org/release/EV
source=("http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/EV-$pkgver.tar.gz")
-md5sums=('8b2ee81053b0766db8af36b055e4dab5')
+md5sums=('ffc39299fab4589bb850b5a46ccd2395')
build() {
cd EV-$pkgver
diff --git a/extra/rygel/PKGBUILD b/extra/rygel/PKGBUILD
index 96320d67f..54bead0dd 100644
--- a/extra/rygel/PKGBUILD
+++ b/extra/rygel/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 210529 2014-04-14 20:07:27Z jgc $
+# $Id: PKGBUILD 210575 2014-04-15 07:59:02Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Balló György <ballogyor+arch at gmail dot com>
pkgname=rygel
-pkgver=0.22.0
+pkgver=0.22.1
pkgrel=1
pkgdesc="UPnP AV MediaServer and MediaRenderer that allows you to easily share audio, video and pictures, and control of media player on your home network"
arch=(i686 x86_64)
@@ -21,7 +21,7 @@ backup=(etc/rygel.conf)
install=rygel.install
groups=('gnome-extra')
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('b70fcfc361c3cb6624b15f1acfd8b77d47628d0efd7cba8c5059c4a85ae6882c')
+sha256sums=('11e18979682685e1c078f0205cc1e53f3e7adac768eeba91026677972b8976bc')
build() {
cd $pkgname-$pkgver
diff --git a/extra/swell-foop/PKGBUILD b/extra/swell-foop/PKGBUILD
index 6b429eba0..ba3eebccc 100644
--- a/extra/swell-foop/PKGBUILD
+++ b/extra/swell-foop/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 210532 2014-04-14 20:07:30Z jgc $
+# $Id: PKGBUILD 210593 2014-04-15 08:47:36Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=swell-foop
-pkgver=3.12.0
+pkgver=3.12.1
pkgrel=1
pkgdesc="Clear the screen by removing groups of colored and shaped tiles"
arch=('i686' 'x86_64')
license=('GPL')
-depends=('desktop-file-utils' 'hicolor-icon-theme' 'clutter-gtk' 'librsvg')
+depends=('hicolor-icon-theme' 'clutter-gtk' 'librsvg')
makedepends=('intltool' 'itstool' 'gobject-introspection')
conflicts=('gnome-games')
replaces=('gnome-games')
@@ -17,7 +17,7 @@ install=swell-foop.install
url="https://live.gnome.org/Swell%20Foop"
groups=('gnome-extra')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('b7a9529cc3408e07673ba200316f799ee52e45fc56c9a2e728723135178e22a1')
+sha256sums=('d0ccb978c265dacadab635b832cb33e077930655013ee9161b68fce10c985dd9')
build() {
cd $pkgname-$pkgver
diff --git a/extra/swell-foop/swell-foop.install b/extra/swell-foop/swell-foop.install
index 0730c1a47..e9eb19f52 100644
--- a/extra/swell-foop/swell-foop.install
+++ b/extra/swell-foop/swell-foop.install
@@ -1,6 +1,5 @@
post_install() {
glib-compile-schemas usr/share/glib-2.0/schemas
- update-desktop-database -q
gtk-update-icon-cache -f -q usr/share/icons/hicolor
}
diff --git a/extra/tomcat-native/PKGBUILD b/extra/tomcat-native/PKGBUILD
index ae227ef59..5fa44ab88 100644
--- a/extra/tomcat-native/PKGBUILD
+++ b/extra/tomcat-native/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
pkgname=tomcat-native
-pkgver=1.1.29
+pkgver=1.1.30
pkgrel=1
pkgdesc='The Apache Tomcat Native Library'
arch=('i686' 'x86_64')
@@ -12,7 +12,7 @@ depends=('apr' 'openssl')
makedepends=('java-environment')
options=('!emptydirs')
source=(http://www.apache.org/dist/tomcat/tomcat-connectors/native/${pkgver}/source/${pkgname}-${pkgver}-src.tar.gz)
-sha256sums=('25fc6f3d65aeb3ac93142a4b536587b1231ac925eaf32a40f55c92a0991cf232')
+sha256sums=('0842c2a14163e2c16b8140d1855701bc3d7daba493d0193ec1bba0aa49aa8c11')
build() {
cd "${srcdir}/tomcat-native-${pkgver}-src/jni/native"
diff --git a/pcr/debootstrap-libre/PKGBUILD b/pcr/debootstrap-libre/PKGBUILD
deleted file mode 100644
index 298d52ee1..000000000
--- a/pcr/debootstrap-libre/PKGBUILD
+++ /dev/null
@@ -1,68 +0,0 @@
-# Maintainer: André Silva <emulatorman@parabola.nu>
-
-_pkgname=debootstrap
-pkgname=debootstrap-libre
-pkgver=1.0.59
-pkgrel=1
-pkgdesc="A tool used to create a gNewSense or Trisquel base system from scratch, without requiring the availability of dpkg or apt (Debian support removed)"
-arch=('any')
-license=('MIT')
-url="http://packages.debian.org/sid/debootstrap"
-depends=('wget')
-replaces=$_pkgname
-conflicts=$_pkgname
-provides=$_pkgname=$pkgver
-source=("http://ftp.debian.org/debian/pool/main/d/${_pkgname}/${_pkgname}_${pkgver}_all.deb"
- "${_pkgname}.8.gz"
- 'gnewsense'
- 'trisquel')
-install="debootstrap.install"
-md5sums=('16d5acf9a2676692a57b662975b70170'
- 'b565d089342b8a7ee35166b5d90825c7'
- '13978bdd1d877a0dd2c3c874ecd54f03'
- 'b020aa8426e70a6024c8e76312c17d78')
-
-package(){
- tar -xJf "${srcdir}/data.tar.xz" -C "${pkgdir}/"
- # remove Debian files
- rm -v "${pkgdir}/usr/share/doc/debootstrap"/{README,changelog.gz}
- rm -v "${pkgdir}/usr/share/man/man8/debootstrap.8.gz"
- # remove Debian scripts
- rm -v "${pkgdir}/usr/share/debootstrap/scripts"/*
- # move the executables to /usr/bin
- mkdir -p ${pkgdir}/usr/bin
- mv "${pkgdir}/usr/sbin"/* "${pkgdir}/usr/bin/"
- rmdir "${pkgdir}/usr/sbin"
- # patch the path to use gNewSense or Trisquel defaults (prevents error in chrooted environment)
- sed -i 's|export PATH|export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java/jre/bin:/usr/bin/vendor_perl:/usr/bin/core_perl"|' ${pkgdir}/usr/bin/debootstrap
- # doesn't work with gpg 2.x, patch to point to gpg1v
- sed 's/gpgv/gpg1v/g;' -i "${pkgdir}/usr/bin/debootstrap" "${pkgdir}/usr/share/debootstrap/functions"
-
- # add rebranded man
- install -m644 ${_pkgname}.8.gz "${pkgdir}/usr/share/man/man8"
-
- # move license to licenses folder
- install -Dm644 "${pkgdir}/usr/share/doc/debootstrap/copyright" \
- "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
- rm -rv "${pkgdir}/usr/share/doc"
-
- # add gNewSense script
- install -m644 gnewsense "$pkgdir/usr/share/debootstrap/scripts"
-
- # create gNewSense symlinks
- ln -s gnewsense "$pkgdir/usr/share/debootstrap/scripts/parkes"
-
- # add Trisquel script
- install -m644 trisquel "$pkgdir/usr/share/debootstrap/scripts"
-
- # create Trisquel symlinks
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/awen"
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/belenos"
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/brigantia"
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/dagda"
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/dwyn"
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/robur"
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/slaine"
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/taranis"
- ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/toutatis"
-}
diff --git a/pcr/debootstrap-libre/debootstrap.8.gz b/pcr/debootstrap-libre/debootstrap.8.gz
deleted file mode 100644
index 07ec4808c..000000000
--- a/pcr/debootstrap-libre/debootstrap.8.gz
+++ /dev/null
Binary files differ