summaryrefslogtreecommitdiff
path: root/community
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-04-23 01:16:16 -0700
committerroot <root@rshg054.dnsready.net>2013-04-23 01:16:16 -0700
commitd1d93fafb9ef98fdd0c9a5a486c179c03cbbfb33 (patch)
treeda594e49962aa1b32a81dd8066423c4fd5fdcec6 /community
parenta5f6ca5d4e1aa12dfec53c3061df6e0198126fb4 (diff)
Tue Apr 23 01:16:16 PDT 2013
Diffstat (limited to 'community')
-rw-r--r--community/activity-log-manager/PKGBUILD10
-rw-r--r--community/almanah/PKGBUILD9
-rw-r--r--community/almanah/eds-3.8.patch2609
-rw-r--r--community/apvlv/PKGBUILD29
-rw-r--r--community/apvlv/apvlv.desktop17
-rw-r--r--community/apvlv/apvlv.install7
-rw-r--r--community/audit/PKGBUILD6
-rw-r--r--community/cinnamon-control-center/PKGBUILD25
-rw-r--r--community/cinnamon-control-center/gnomerrlabeler.patch766
-rw-r--r--community/cinnamon-control-center/idle-delay.patch71
-rw-r--r--community/cinnamon-screensaver/PKGBUILD16
-rw-r--r--community/cinnamon-screensaver/cinnamon-screensaver.pam2
-rw-r--r--community/cinnamon-screensaver/fix-dbus-compatibility.patch245
-rw-r--r--community/cinnamon-screensaver/gnome-autogen.sh538
-rw-r--r--community/cinnamon/PKGBUILD47
-rw-r--r--community/cinnamon/cinnamon.install18
-rw-r--r--community/cinnamon/fix-keyboard-settings.patch83
-rw-r--r--community/cinnamon/gnome-3.8.patch3669
-rw-r--r--community/clinica/PKGBUILD6
-rw-r--r--community/couchdb/PKGBUILD4
-rw-r--r--community/cython/PKGBUILD6
-rw-r--r--community/denemo/PKGBUILD4
-rw-r--r--community/elinks/PKGBUILD34
-rw-r--r--community/freewrl/PKGBUILD4
-rw-r--r--community/gedit-plugins/PKGBUILD14
-rw-r--r--community/giggle/PKGBUILD33
-rw-r--r--community/giggle/gtksourceview3.7.patch36
-rw-r--r--community/gitg/PKGBUILD34
-rw-r--r--community/gitg/gitg.install16
-rw-r--r--community/gnome-applets/01_battstat_upower.patch622
-rw-r--r--community/gnome-applets/PKGBUILD68
-rw-r--r--community/gnome-applets/disable-gweather-applet.patch12
-rw-r--r--community/gnome-applets/fix-autoconf.patch12
-rw-r--r--community/gnome-applets/gnome-applets-cpupower.patch12
-rw-r--r--community/gnome-packagekit/PKGBUILD6
-rw-r--r--community/gnome-panel/0001-Add-the-GNOME-Flashback-session.patch95
-rw-r--r--community/gnome-panel/18_fix_force_quit_applet.patch98
-rw-r--r--community/gnome-panel/PKGBUILD100
-rw-r--r--community/gnome-panel/drop-gweather-xml-include.patch10
-rw-r--r--community/gnome-panel/fix-autoconf.patch11
-rw-r--r--community/gnome-panel/gnome-desktop-3.8.patch199
-rw-r--r--community/gnome-panel/gnome-panel.install14
-rw-r--r--community/gnome-panel/logout-hang-workaround.patch15
-rw-r--r--community/gnome-phone-manager/PKGBUILD12
-rw-r--r--community/gnome-phone-manager/gnome-phone-manager-0.68-eds.patch164
-rw-r--r--community/gnome-screensaver/PKGBUILD41
-rw-r--r--community/gnome-screensaver/fix-autoconf.patch12
-rw-r--r--community/gnome-screensaver/gnome-screensaver.install7
-rw-r--r--community/gnome-screensaver/gnome-screensaver.pam4
-rw-r--r--community/gnome-screensaver/move-desktop-file.patch34
-rw-r--r--community/gnome-settings-daemon-compat/PKGBUILD61
-rw-r--r--community/gnome-settings-daemon-compat/draw-background-unconditionally.patch162
-rw-r--r--community/gnome-settings-daemon-compat/flashback-rename.patch18
-rw-r--r--community/gnome-settings-daemon-compat/remove-libgsd-dependency.patch160
-rw-r--r--community/gnome-settings-daemon-compat/sessionisactive-port.patch73
-rw-r--r--community/gnome-settings-daemon-compat/standalone-background-helper.patch437
-rw-r--r--community/gnome-settings-daemon-updates/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch1476
-rw-r--r--community/gnome-settings-daemon-updates/PKGBUILD18
-rw-r--r--community/gnote/PKGBUILD6
-rw-r--r--community/gtksourceviewmm/PKGBUILD4
-rw-r--r--community/gtranslator/PKGBUILD28
-rw-r--r--community/gwibber/PKGBUILD6
-rw-r--r--community/ktoblzcheck/PKGBUILD6
-rw-r--r--community/metacity/PKGBUILD50
-rw-r--r--community/metacity/enable_compositing.patch12
-rw-r--r--community/metacity/fix_force_quit.patch222
-rw-r--r--community/metacity/fix_shadows.patch39
-rw-r--r--community/muffin/PKGBUILD14
-rw-r--r--community/nemiver/PKGBUILD9
-rw-r--r--community/nemiver/nemiver.install15
-rw-r--r--community/nemo/PKGBUILD33
-rw-r--r--community/nemo/remove-desktop-background.patch964
-rw-r--r--community/nemo/tracker-0.16.patch33
-rw-r--r--community/nemo/use-terminal-config.patch45
-rw-r--r--community/notion/PKGBUILD58
-rw-r--r--community/shotwell/PKGBUILD6
-rw-r--r--community/synapse/PKGBUILD8
-rw-r--r--community/ubuntuone-client-gnome/PKGBUILD15
-rw-r--r--community/ubuntuone-client-gnome/disable-gsd-plugin.patch21
-rw-r--r--community/virtualbox-modules-lts/PKGBUILD4
-rw-r--r--community/virtualbox-modules/PKGBUILD4
-rw-r--r--community/xdebug/PKGBUILD10
-rw-r--r--community/xsettings-client/PKGBUILD8
-rw-r--r--community/zeitgeist-datahub/PKGBUILD29
84 files changed, 11311 insertions, 2649 deletions
diff --git a/community/activity-log-manager/PKGBUILD b/community/activity-log-manager/PKGBUILD
index 1d860b203..6b7fbaddb 100644
--- a/community/activity-log-manager/PKGBUILD
+++ b/community/activity-log-manager/PKGBUILD
@@ -1,15 +1,15 @@
-# $Id: PKGBUILD 79218 2012-11-01 09:45:30Z bgyorgy $
+# $Id: PKGBUILD 88673 2013-04-21 22:16:39Z heftig $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Ner0
pkgname=activity-log-manager
pkgver=0.9.4
-pkgrel=3
+pkgrel=4
pkgdesc="A graphical user interface which lets you easily control what gets logged by Zeitgeist"
arch=('i686' 'x86_64')
url="https://launchpad.net/activity-log-manager"
license=('GPL2')
-depends=('gtk3' 'libgee' 'libzeitgeist' 'zeitgeist' 'hicolor-icon-theme' 'xdg-utils')
+depends=('gtk3' 'libgee06' 'libzeitgeist' 'zeitgeist' 'hicolor-icon-theme' 'xdg-utils')
makedepends=('vala' 'intltool')
install=$pkgname.install
source=(https://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz
@@ -27,10 +27,10 @@ build() {
# Fix docdir location
sed -i 's/almdocdir =.*/almdocdir = ${docdir}/' Makefile.{am,in}
- # Update language files
- echo 'af ar ast be bg bn bs ca ca@valencia cs da de el eo es et eu fi fr gd gl he hi hr hu id it ja km ko ku lt lv mi ms my nb nl oc pl pt ro ru se si sk sl sr sv ta te ug uk uz vi zh_CN zh_HK zh_TW' >po/LINGUAS
+ # Install updated language files
rename $pkgname- '' ../po/$pkgname-*.po
mv -f -t po ../po/*
+ printf "%s\n" po/*.po | sed -e 's/po\///g' -e 's/\.po//g' >po/LINGUAS
# Fix crash with GTK+ 3.6
# https://bugs.launchpad.net/activity-log-manager/+bug/1058037
diff --git a/community/almanah/PKGBUILD b/community/almanah/PKGBUILD
index 9bf7cba30..905ac9983 100644
--- a/community/almanah/PKGBUILD
+++ b/community/almanah/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 87238 2013-03-28 21:27:02Z bgyorgy $
+# $Id: PKGBUILD 88674 2013-04-21 22:16:40Z heftig $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
pkgname=almanah
pkgver=0.10.1
-pkgrel=1
+pkgrel=2
pkgdesc="Small GTK+ application to allow you to keep a diary of your life"
arch=('i686' 'x86_64')
url="http://live.gnome.org/Almanah_Diary"
@@ -12,13 +12,18 @@ depends=('evolution-data-server' 'gtkspell3' 'libcryptui' 'xdg-utils')
makedepends=('intltool')
install=$pkgname.install
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
+ eds-3.8.patch
update-gtkspell3-support.patch)
sha256sums=('122789c1baea1713102b200c0401d25395ec177a66ae22635d3ae2fecc1f08bd'
+ '2407cb2cc11e61b7863bf20fc13d4614a3384e8cb7c5b534f1e3ce7a3afb2d2d'
'60fedd6be05ef2619c3b50539b9fdc717480e4f03a2920d8b68b09e63dc7e7db')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ # Port to evolution-data-server 3.8
+ patch -Np1 -i "$srcdir/eds-3.8.patch"
+
# Port to the new gtkspell3
patch -Np1 -i "$srcdir/update-gtkspell3-support.patch"
diff --git a/community/almanah/eds-3.8.patch b/community/almanah/eds-3.8.patch
new file mode 100644
index 000000000..dea51eb74
--- /dev/null
+++ b/community/almanah/eds-3.8.patch
@@ -0,0 +1,2609 @@
+From e481f5abdb46d41ac00ee3393332e92f605b55e7 Mon Sep 17 00:00:00 2001
+From: Matthew Barnes <mbarnes@redhat.com>
+Date: Thu, 13 Dec 2012 14:16:58 +0000
+Subject: Bug 687229 - Embed ESourceSelector widget from libedataserverui
+
+Evolution developers are merging libedataserverui back into Evolution.
+Drop the libedataserverui dependency and embed the ECellRendererColor
+and ESourceSelector widgets from libedataserverui in event-factories.
+
+See also:
+https://mail.gnome.org/archives/distributor-list/2012-December/msg00000.html
+---
+diff --git a/configure.ac b/configure.ac
+index a529568..b89ba74 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -83,7 +83,7 @@ AC_SUBST(STANDARD_CFLAGS)
+ AC_SUBST(STANDARD_LIBS)
+
+ dnl Evolution
+-PKG_CHECK_MODULES(EVO, libecal-1.2 libedataserver-1.2 libedataserverui-3.0, have_evo=yes, have_evo=no)
++PKG_CHECK_MODULES(EVO, libecal-1.2 >= 3.5.91 libedataserver-1.2, have_evo=yes, have_evo=no)
+ if test "x$have_evo" = "xyes"; then
+ AC_DEFINE(HAVE_EVO, 1, [Defined if libecal-1.2 is installed])
+ fi
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 0de37e3..740c9f2 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -52,6 +52,10 @@ almanah_SOURCES += \
+ event-factories/calendar-debug.h \
+ event-factories/calendar-sources.c \
+ event-factories/calendar-sources.h \
++ event-factories/e-cell-renderer-color.c \
++ event-factories/e-cell-renderer-color.h \
++ event-factories/e-source-selector.c \
++ event-factories/e-source-selector.h \
+ events/calendar-appointment.c \
+ events/calendar-appointment.h \
+ events/calendar-task.c \
+diff --git a/src/event-factories/calendar-sources.c b/src/event-factories/calendar-sources.c
+index 217327d..9451a0d 100644
+--- a/src/event-factories/calendar-sources.c
++++ b/src/event-factories/calendar-sources.c
+@@ -32,7 +32,8 @@
+ #define HANDLE_LIBICAL_MEMORY
+ #include <libecal/libecal.h>
+ #include <libedataserver/libedataserver.h>
+-#include <libedataserverui/libedataserverui.h>
++
++#include "e-source-selector.h"
+
+ #undef CALENDAR_ENABLE_DEBUG
+ #include "calendar-debug.h"
+diff --git a/src/event-factories/e-cell-renderer-color.c b/src/event-factories/e-cell-renderer-color.c
+new file mode 100644
+index 0000000..748bea5
+--- /dev/null
++++ b/src/event-factories/e-cell-renderer-color.c
+@@ -0,0 +1,237 @@
++/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
++/* e-cell-renderer-color.c
++ *
++ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of version 2 of the GNU Lesser General Public
++ * License as published by the Free Software Foundation.
++ *
++ * 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 Lesser 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.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include "e-cell-renderer-color.h"
++
++#include <string.h>
++#include <glib/gi18n-lib.h>
++
++#define E_CELL_RENDERER_COLOR_GET_PRIVATE(obj) \
++ (G_TYPE_INSTANCE_GET_PRIVATE \
++ ((obj), E_TYPE_CELL_RENDERER_COLOR, ECellRendererColorPrivate))
++
++enum {
++ PROP_0,
++ PROP_COLOR
++};
++
++struct _ECellRendererColorPrivate {
++ GdkColor *color;
++};
++
++G_DEFINE_TYPE (
++ ECellRendererColor,
++ e_cell_renderer_color,
++ GTK_TYPE_CELL_RENDERER)
++
++static void
++cell_renderer_color_get_size (GtkCellRenderer *cell,
++ GtkWidget *widget,
++ const GdkRectangle *cell_area,
++ gint *x_offset,
++ gint *y_offset,
++ gint *width,
++ gint *height)
++{
++ gint color_width = 16;
++ gint color_height = 16;
++ gint calc_width;
++ gint calc_height;
++ gfloat xalign;
++ gfloat yalign;
++ guint xpad;
++ guint ypad;
++
++ g_object_get (
++ cell, "xalign", &xalign, "yalign", &yalign,
++ "xpad", &xpad, "ypad", &ypad, NULL);
++
++ calc_width = (gint) xpad * 2 + color_width;
++ calc_height = (gint) ypad * 2 + color_height;
++
++ if (cell_area && color_width > 0 && color_height > 0) {
++ if (x_offset) {
++ *x_offset = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
++ (1.0 - xalign) : xalign) *
++ (cell_area->width - calc_width));
++ *x_offset = MAX (*x_offset, 0);
++ }
++
++ if (y_offset) {
++ *y_offset =(yalign *
++ (cell_area->height - calc_height));
++ *y_offset = MAX (*y_offset, 0);
++ }
++ } else {
++ if (x_offset) *x_offset = 0;
++ if (y_offset) *y_offset = 0;
++ }
++
++ if (width)
++ *width = calc_width;
++
++ if (height)
++ *height = calc_height;
++}
++
++static void
++cell_renderer_color_render (GtkCellRenderer *cell,
++ cairo_t *cr,
++ GtkWidget *widget,
++ const GdkRectangle *background_area,
++ const GdkRectangle *cell_area,
++ GtkCellRendererState flags)
++{
++ ECellRendererColorPrivate *priv;
++ GdkRectangle pix_rect;
++ GdkRectangle draw_rect;
++ guint xpad;
++ guint ypad;
++
++ priv = E_CELL_RENDERER_COLOR_GET_PRIVATE (cell);
++
++ if (priv->color == NULL)
++ return;
++
++ cell_renderer_color_get_size (
++ cell, widget, cell_area,
++ &pix_rect.x, &pix_rect.y,
++ &pix_rect.width, &pix_rect.height);
++
++ g_object_get (cell, "xpad", &xpad, "ypad", &ypad, NULL);
++
++ pix_rect.x += cell_area->x + xpad;
++ pix_rect.y += cell_area->y + ypad;
++ pix_rect.width -= xpad * 2;
++ pix_rect.height -= ypad * 2;
++
++ if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect))
++ return;
++
++ gdk_cairo_set_source_color (cr, priv->color);
++ cairo_rectangle (cr, pix_rect.x, pix_rect.y, draw_rect.width, draw_rect.height);
++
++ cairo_fill (cr);
++}
++
++static void
++cell_renderer_color_set_property (GObject *object,
++ guint property_id,
++ const GValue *value,
++ GParamSpec *pspec)
++{
++ ECellRendererColorPrivate *priv;
++
++ priv = E_CELL_RENDERER_COLOR_GET_PRIVATE (object);
++
++ switch (property_id) {
++ case PROP_COLOR:
++ if (priv->color != NULL)
++ gdk_color_free (priv->color);
++ priv->color = g_value_dup_boxed (value);
++ return;
++ }
++
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++}
++
++static void
++cell_renderer_color_get_property (GObject *object,
++ guint property_id,
++ GValue *value,
++ GParamSpec *pspec)
++{
++ ECellRendererColorPrivate *priv;
++
++ priv = E_CELL_RENDERER_COLOR_GET_PRIVATE (object);
++
++ switch (property_id) {
++ case PROP_COLOR:
++ g_value_set_boxed (value, priv->color);
++ return;
++ }
++
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++}
++
++static void
++cell_renderer_color_finalize (GObject *object)
++{
++ ECellRendererColorPrivate *priv;
++
++ priv = E_CELL_RENDERER_COLOR_GET_PRIVATE (object);
++
++ if (priv->color != NULL)
++ gdk_color_free (priv->color);
++
++ /* Chain up to parent's finalize() method. */
++ G_OBJECT_CLASS (e_cell_renderer_color_parent_class)->finalize (object);
++}
++
++static void
++e_cell_renderer_color_class_init (ECellRendererColorClass *class)
++{
++ GObjectClass *object_class;
++ GtkCellRendererClass *cell_class;
++
++ g_type_class_add_private (class, sizeof (ECellRendererColorPrivate));
++
++ object_class = G_OBJECT_CLASS (class);
++ object_class->set_property = cell_renderer_color_set_property;
++ object_class->get_property = cell_renderer_color_get_property;
++ object_class->finalize = cell_renderer_color_finalize;
++
++ cell_class = GTK_CELL_RENDERER_CLASS (class);
++ cell_class->get_size = cell_renderer_color_get_size;
++ cell_class->render = cell_renderer_color_render;
++
++ g_object_class_install_property (
++ object_class,
++ PROP_COLOR,
++ g_param_spec_boxed (
++ "color",
++ "Color Info",
++ "The color to render",
++ GDK_TYPE_COLOR,
++ G_PARAM_READWRITE));
++}
++
++static void
++e_cell_renderer_color_init (ECellRendererColor *cellcolor)
++{
++ cellcolor->priv = E_CELL_RENDERER_COLOR_GET_PRIVATE (cellcolor);
++
++ g_object_set (cellcolor, "xpad", 4, NULL);
++}
++
++/**
++ * e_cell_renderer_color_new:
++ *
++ * Since: 2.22
++ **/
++GtkCellRenderer *
++e_cell_renderer_color_new (void)
++{
++ return g_object_new (E_TYPE_CELL_RENDERER_COLOR, NULL);
++}
+diff --git a/src/event-factories/e-cell-renderer-color.h b/src/event-factories/e-cell-renderer-color.h
+new file mode 100644
+index 0000000..0e0da70
+--- /dev/null
++++ b/src/event-factories/e-cell-renderer-color.h
+@@ -0,0 +1,75 @@
++/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
++/* e-cell-renderer-color.h
++ *
++ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of version 2 of the GNU Lesser General Public
++ * License as published by the Free Software Foundation.
++ *
++ * 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 Lesser 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.
++ */
++
++#ifndef _E_CELL_RENDERER_COLOR_H_
++#define _E_CELL_RENDERER_COLOR_H_
++
++#include <gtk/gtk.h>
++
++/* Standard GObject macros */
++#define E_TYPE_CELL_RENDERER_COLOR \
++ (e_cell_renderer_color_get_type ())
++#define E_CELL_RENDERER_COLOR(obj) \
++ (G_TYPE_CHECK_INSTANCE_CAST \
++ ((obj), E_TYPE_CELL_RENDERER_COLOR, ECellRendererColor))
++#define E_CELL_RENDERER_COLOR_CLASS(cls) \
++ (G_TYPE_CHECK_CLASS_CAST \
++ ((cls), E_TYPE_CELL_RENDERER_COLOR, ECellRendererColorClass))
++#define E_IS_CELL_RENDERER_COLOR(obj) \
++ (G_TYPE_CHECK_INSTANCE_TYPE \
++ ((obj), E_TYPE_CELL_RENDERER_COLOR))
++#define E_IS_CELL_RENDERER_COLOR_CLASS(cls) \
++ (G_TYPE_CHECK_CLASS_TYPE ((cls), E_TYPE_CELL_RENDERER_COLOR))
++#define E_CELL_RENDERER_COLOR_GET_CLASS(obj) \
++ (G_TYPE_INSTANCE_GET_CLASS \
++ ((obj), E_TYPE_CELL_RENDERER_COLOR, ECellRendererColorClass))
++
++G_BEGIN_DECLS
++
++typedef struct _ECellRendererColor ECellRendererColor;
++typedef struct _ECellRendererColorClass ECellRendererColorClass;
++typedef struct _ECellRendererColorPrivate ECellRendererColorPrivate;
++
++/**
++ * ECellRendererColor:
++ *
++ * Since: 2.22
++ **/
++struct _ECellRendererColor {
++ GtkCellRenderer parent;
++ ECellRendererColorPrivate *priv;
++};
++
++struct _ECellRendererColorClass {
++ GtkCellRendererClass parent_class;
++
++ /* Padding for future expansion */
++ void (*_gtk_reserved1) (void);
++ void (*_gtk_reserved2) (void);
++ void (*_gtk_reserved3) (void);
++ void (*_gtk_reserved4) (void);
++};
++
++GType e_cell_renderer_color_get_type (void);
++GtkCellRenderer *e_cell_renderer_color_new (void);
++
++G_END_DECLS
++
++#endif /* _E_CELL_RENDERER_COLOR_H_ */
+diff --git a/src/event-factories/e-source-selector.c b/src/event-factories/e-source-selector.c
+new file mode 100644
+index 0000000..925d9cd
+--- /dev/null
++++ b/src/event-factories/e-source-selector.c
+@@ -0,0 +1,2080 @@
++/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
++/* e-source-selector.c
++ *
++ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
++ *
++ * This program 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 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 Lesser General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ *
++ * Author: Ettore Perazzoli <ettore@ximian.com>
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include <string.h>
++
++#include "e-cell-renderer-color.h"
++#include "e-source-selector.h"
++
++#define E_SOURCE_SELECTOR_GET_PRIVATE(obj) \
++ (G_TYPE_INSTANCE_GET_PRIVATE \
++ ((obj), E_TYPE_SOURCE_SELECTOR, ESourceSelectorPrivate))
++
++typedef struct _AsyncContext AsyncContext;
++
++struct _ESourceSelectorPrivate {
++ ESourceRegistry *registry;
++ GHashTable *source_index;
++ gchar *extension_name;
++
++ GtkTreeRowReference *saved_primary_selection;
++
++ /* ESource -> GSource */
++ GHashTable *pending_writes;
++ GMainContext *main_context;
++
++ gboolean toggled_last;
++ gboolean select_new;
++ gboolean show_colors;
++ gboolean show_toggles;
++};
++
++struct _AsyncContext {
++ ESourceSelector *selector;
++ ESource *source;
++};
++
++enum {
++ PROP_0,
++ PROP_EXTENSION_NAME,
++ PROP_PRIMARY_SELECTION,
++ PROP_REGISTRY,
++ PROP_SHOW_COLORS,
++ PROP_SHOW_TOGGLES
++};
++
++enum {
++ SELECTION_CHANGED,
++ PRIMARY_SELECTION_CHANGED,
++ POPUP_EVENT,
++ DATA_DROPPED,
++ NUM_SIGNALS
++};
++
++enum {
++ COLUMN_NAME,
++ COLUMN_COLOR,
++ COLUMN_ACTIVE,
++ COLUMN_SHOW_COLOR,
++ COLUMN_SHOW_TOGGLE,
++ COLUMN_WEIGHT,
++ COLUMN_SOURCE,
++ NUM_COLUMNS
++};
++
++static guint signals[NUM_SIGNALS];
++
++G_DEFINE_TYPE (ESourceSelector, e_source_selector, GTK_TYPE_TREE_VIEW)
++
++/* ESafeToggleRenderer does not emit 'toggled' signal
++ * on 'activate' when mouse is not over the toggle. */
++
++typedef GtkCellRendererToggle ECellRendererSafeToggle;
++typedef GtkCellRendererToggleClass ECellRendererSafeToggleClass;
++
++/* Forward Declarations */
++GType e_cell_renderer_safe_toggle_get_type (void);
++
++G_DEFINE_TYPE (
++ ECellRendererSafeToggle,
++ e_cell_renderer_safe_toggle,
++ GTK_TYPE_CELL_RENDERER_TOGGLE)
++
++static gboolean
++safe_toggle_activate (GtkCellRenderer *cell,
++ GdkEvent *event,
++ GtkWidget *widget,
++ const gchar *path,
++ const GdkRectangle *background_area,
++ const GdkRectangle *cell_area,
++ GtkCellRendererState flags)
++{
++ gboolean point_in_cell_area = TRUE;
++
++ if (event->type == GDK_BUTTON_PRESS && cell_area != NULL) {
++ cairo_region_t *region;
++
++ region = cairo_region_create_rectangle (cell_area);
++ point_in_cell_area = cairo_region_contains_point (
++ region, event->button.x, event->button.y);
++ cairo_region_destroy (region);
++ }
++
++ if (!point_in_cell_area)
++ return FALSE;
++
++ return GTK_CELL_RENDERER_CLASS (
++ e_cell_renderer_safe_toggle_parent_class)->activate (
++ cell, event, widget, path, background_area, cell_area, flags);
++}
++
++static void
++e_cell_renderer_safe_toggle_class_init (ECellRendererSafeToggleClass *class)
++{
++ GtkCellRendererClass *cell_renderer_class;
++
++ cell_renderer_class = GTK_CELL_RENDERER_CLASS (class);
++ cell_renderer_class->activate = safe_toggle_activate;
++}
++
++static void
++e_cell_renderer_safe_toggle_init (ECellRendererSafeToggle *obj)
++{
++}
++
++static GtkCellRenderer *
++e_cell_renderer_safe_toggle_new (void)
++{
++ return g_object_new (e_cell_renderer_safe_toggle_get_type (), NULL);
++}
++
++static void
++clear_saved_primary_selection (ESourceSelector *selector)
++{
++ gtk_tree_row_reference_free (selector->priv->saved_primary_selection);
++ selector->priv->saved_primary_selection = NULL;
++}
++
++static void
++async_context_free (AsyncContext *async_context)
++{
++ if (async_context->selector != NULL)
++ g_object_unref (async_context->selector);
++
++ if (async_context->source != NULL)
++ g_object_unref (async_context->source);
++
++ g_slice_free (AsyncContext, async_context);
++}
++
++static void
++pending_writes_destroy_source (GSource *source)
++{
++ g_source_destroy (source);
++ g_source_unref (source);
++}
++
++static void
++source_selector_write_done_cb (GObject *source_object,
++ GAsyncResult *result,
++ gpointer user_data)
++{
++ ESource *source;
++ ESourceSelector *selector;
++ GError *error = NULL;
++
++ source = E_SOURCE (source_object);
++ selector = E_SOURCE_SELECTOR (user_data);
++
++ e_source_write_finish (source, result, &error);
++
++ /* FIXME Display the error in the selector somehow? */
++ if (error != NULL) {
++ g_warning ("%s: %s", G_STRFUNC, error->message);
++ g_error_free (error);
++ }
++
++ g_object_unref (selector);
++}
++
++static gboolean
++source_selector_write_idle_cb (gpointer user_data)
++{
++ AsyncContext *async_context = user_data;
++ GHashTable *pending_writes;
++
++ /* XXX This operation is not cancellable. */
++ e_source_write (
++ async_context->source, NULL,
++ source_selector_write_done_cb,
++ g_object_ref (async_context->selector));
++
++ pending_writes = async_context->selector->priv->pending_writes;
++ g_hash_table_remove (pending_writes, async_context->source);
++
++ return FALSE;
++}
++
++static void
++source_selector_cancel_write (ESourceSelector *selector,
++ ESource *source)
++{
++ GHashTable *pending_writes;
++
++ /* Cancel any pending writes for this ESource so as not
++ * to overwrite whatever change we're being notified of. */
++ pending_writes = selector->priv->pending_writes;
++ g_hash_table_remove (pending_writes, source);
++}
++
++static void
++source_selector_update_row (ESourceSelector *selector,
++ ESource *source)
++{
++ GHashTable *source_index;
++ ESourceExtension *extension = NULL;
++ GtkTreeRowReference *reference;
++ GtkTreeModel *model;
++ GtkTreePath *path;
++ GtkTreeIter iter;
++ const gchar *extension_name;
++ const gchar *display_name;
++ gboolean selected;
++
++ source_index = selector->priv->source_index;
++ reference = g_hash_table_lookup (source_index, source);
++
++ /* This function runs when ANY ESource in the registry changes.
++ * If the ESource is not in our tree model then return silently. */
++ if (reference == NULL)
++ return;
++
++ /* If we do have a row reference, it should be valid. */
++ g_return_if_fail (gtk_tree_row_reference_valid (reference));
++
++ model = gtk_tree_row_reference_get_model (reference);
++ path = gtk_tree_row_reference_get_path (reference);
++ gtk_tree_model_get_iter (model, &iter, path);
++ gtk_tree_path_free (path);
++
++ display_name = e_source_get_display_name (source);
++
++ extension_name = e_source_selector_get_extension_name (selector);
++ selected = e_source_selector_source_is_selected (selector, source);
++
++ if (e_source_has_extension (source, extension_name))
++ extension = e_source_get_extension (source, extension_name);
++
++ if (extension != NULL) {
++ GdkColor color;
++ const gchar *color_spec = NULL;
++ gboolean show_color = FALSE;
++ gboolean show_toggle;
++
++ show_color =
++ E_IS_SOURCE_SELECTABLE (extension) &&
++ e_source_selector_get_show_colors (selector);
++
++ if (show_color)
++ color_spec = e_source_selectable_get_color (
++ E_SOURCE_SELECTABLE (extension));
++
++ if (color_spec != NULL && *color_spec != '\0')
++ show_color = gdk_color_parse (color_spec, &color);
++
++ show_toggle = e_source_selector_get_show_toggles (selector);
++
++ gtk_tree_store_set (
++ GTK_TREE_STORE (model), &iter,
++ COLUMN_NAME, display_name,
++ COLUMN_COLOR, show_color ? &color : NULL,
++ COLUMN_ACTIVE, selected,
++ COLUMN_SHOW_COLOR, show_color,
++ COLUMN_SHOW_TOGGLE, show_toggle,
++ COLUMN_WEIGHT, PANGO_WEIGHT_NORMAL,
++ COLUMN_SOURCE, source,
++ -1);
++ } else {
++ gtk_tree_store_set (
++ GTK_TREE_STORE (model), &iter,
++ COLUMN_NAME, display_name,
++ COLUMN_COLOR, NULL,
++ COLUMN_ACTIVE, FALSE,
++ COLUMN_SHOW_COLOR, FALSE,
++ COLUMN_SHOW_TOGGLE, FALSE,
++ COLUMN_WEIGHT, PANGO_WEIGHT_BOLD,
++ COLUMN_SOURCE, source,
++ -1);
++ }
++}
++
++static gboolean
++source_selector_traverse (GNode *node,
++ ESourceSelector *selector)
++{
++ ESource *source;
++ GHashTable *source_index;
++ GtkTreeRowReference *reference = NULL;
++ GtkTreeModel *model;
++ GtkTreePath *path;
++ GtkTreeIter iter;
++
++ /* Skip the root node. */
++ if (G_NODE_IS_ROOT (node))
++ return FALSE;
++
++ source_index = selector->priv->source_index;
++
++ model = gtk_tree_view_get_model (GTK_TREE_VIEW (selector));
++
++ if (node->parent != NULL && node->parent->data != NULL)
++ reference = g_hash_table_lookup (
++ source_index, node->parent->data);
++
++ if (gtk_tree_row_reference_valid (reference)) {
++ GtkTreeIter parent;
++
++ path = gtk_tree_row_reference_get_path (reference);
++ gtk_tree_model_get_iter (model, &parent, path);
++ gtk_tree_path_free (path);
++
++ gtk_tree_store_append (GTK_TREE_STORE (model), &iter, &parent);
++ } else
++ gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
++
++ source = E_SOURCE (node->data);
++
++ path = gtk_tree_model_get_path (model, &iter);
++ reference = gtk_tree_row_reference_new (model, path);
++ g_hash_table_insert (source_index, g_object_ref (source), reference);
++ gtk_tree_path_free (path);
++
++ source_selector_update_row (selector, source);
++
++ return FALSE;
++}
++
++static void
++source_selector_save_expanded (GtkTreeView *tree_view,
++ GtkTreePath *path,
++ GQueue *queue)
++{
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++ ESource *source;
++
++ model = gtk_tree_view_get_model (tree_view);
++ gtk_tree_model_get_iter (model, &iter, path);
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++ g_queue_push_tail (queue, source);
++}
++
++static void
++source_selector_build_model (ESourceSelector *selector)
++{
++ ESourceRegistry *registry;
++ GQueue queue = G_QUEUE_INIT;
++ GHashTable *source_index;
++ GtkTreeView *tree_view;
++ GtkTreeModel *model;
++ ESource *selected;
++ const gchar *extension_name;
++ GNode *root;
++
++ tree_view = GTK_TREE_VIEW (selector);
++
++ registry = e_source_selector_get_registry (selector);
++ extension_name = e_source_selector_get_extension_name (selector);
++
++ /* Make sure we have what we need to build the model, since
++ * this can get called early in the initialization phase. */
++ if (registry == NULL || extension_name == NULL)
++ return;
++
++ source_index = selector->priv->source_index;
++ selected = e_source_selector_ref_primary_selection (selector);
++
++ /* Save expanded sources to restore later. */
++ gtk_tree_view_map_expanded_rows (
++ tree_view, (GtkTreeViewMappingFunc)
++ source_selector_save_expanded, &queue);
++
++ model = gtk_tree_view_get_model (tree_view);
++ gtk_tree_store_clear (GTK_TREE_STORE (model));
++
++ g_hash_table_remove_all (source_index);
++
++ root = e_source_registry_build_display_tree (registry, extension_name);
++
++ g_node_traverse (
++ root, G_PRE_ORDER, G_TRAVERSE_ALL, -1,
++ (GNodeTraverseFunc) source_selector_traverse,
++ selector);
++
++ e_source_registry_free_display_tree (root);
++
++ /* Restore previously expanded sources. */
++ while (!g_queue_is_empty (&queue)) {
++ GtkTreeRowReference *reference;
++ ESource *source;
++
++ source = g_queue_pop_head (&queue);
++ reference = g_hash_table_lookup (source_index, source);
++
++ if (gtk_tree_row_reference_valid (reference)) {
++ GtkTreePath *path;
++
++ path = gtk_tree_row_reference_get_path (reference);
++ gtk_tree_view_expand_to_path (tree_view, path);
++ gtk_tree_path_free (path);
++ }
++
++ g_object_unref (source);
++ }
++
++ /* Restore the primary selection. */
++ if (selected != NULL) {
++ e_source_selector_set_primary_selection (selector, selected);
++ g_object_unref (selected);
++ }
++
++ /* Make sure we have a primary selection. If not, pick one. */
++ selected = e_source_selector_ref_primary_selection (selector);
++ if (selected == NULL) {
++ selected = e_source_registry_ref_default_for_extension_name (
++ registry, extension_name);
++ e_source_selector_set_primary_selection (selector, selected);
++ }
++ g_object_unref (selected);
++}
++
++static void
++source_selector_expand_to_source (ESourceSelector *selector,
++ ESource *source)
++{
++ GHashTable *source_index;
++ GtkTreeRowReference *reference;
++ GtkTreePath *path;
++
++ source_index = selector->priv->source_index;
++ reference = g_hash_table_lookup (source_index, source);
++
++ /* If the ESource is not in our tree model then return silently. */
++ if (reference == NULL)
++ return;
++
++ /* If we do have a row reference, it should be valid. */
++ g_return_if_fail (gtk_tree_row_reference_valid (reference));
++
++ /* Expand the tree view to the path containing the ESource */
++ path = gtk_tree_row_reference_get_path (reference);
++ gtk_tree_view_expand_to_path (GTK_TREE_VIEW (selector), path);
++ gtk_tree_path_free (path);
++}
++
++static void
++source_selector_source_added_cb (ESourceRegistry *registry,
++ ESource *source,
++ ESourceSelector *selector)
++{
++ source_selector_build_model (selector);
++
++ source_selector_expand_to_source (selector, source);
++}
++
++static void
++source_selector_source_changed_cb (ESourceRegistry *registry,
++ ESource *source,
++ ESourceSelector *selector)
++{
++ source_selector_cancel_write (selector, source);
++
++ source_selector_update_row (selector, source);
++}
++
++static void
++source_selector_source_removed_cb (ESourceRegistry *registry,
++ ESource *source,
++ ESourceSelector *selector)
++{
++ source_selector_build_model (selector);
++}
++
++static void
++source_selector_source_enabled_cb (ESourceRegistry *registry,
++ ESource *source,
++ ESourceSelector *selector)
++{
++ source_selector_build_model (selector);
++
++ source_selector_expand_to_source (selector, source);
++}
++
++static void
++source_selector_source_disabled_cb (ESourceRegistry *registry,
++ ESource *source,
++ ESourceSelector *selector)
++{
++ source_selector_build_model (selector);
++}
++
++static gboolean
++same_source_name_exists (ESourceSelector *selector,
++ const gchar *display_name)
++{
++ GHashTable *source_index;
++ GHashTableIter iter;
++ gpointer key;
++
++ source_index = selector->priv->source_index;
++ g_hash_table_iter_init (&iter, source_index);
++
++ while (g_hash_table_iter_next (&iter, &key, NULL)) {
++ ESource *source = E_SOURCE (key);
++ const gchar *source_name;
++
++ source_name = e_source_get_display_name (source);
++ if (g_strcmp0 (display_name, source_name) == 0)
++ return TRUE;
++ }
++
++ return FALSE;
++}
++
++static gboolean
++selection_func (GtkTreeSelection *selection,
++ GtkTreeModel *model,
++ GtkTreePath *path,
++ gboolean path_currently_selected,
++ ESourceSelector *selector)
++{
++ ESource *source;
++ GtkTreeIter iter;
++ const gchar *extension_name;
++
++ if (selector->priv->toggled_last) {
++ selector->priv->toggled_last = FALSE;
++ return FALSE;
++ }
++
++ if (path_currently_selected)
++ return TRUE;
++
++ if (!gtk_tree_model_get_iter (model, &iter, path))
++ return FALSE;
++
++ extension_name = e_source_selector_get_extension_name (selector);
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++
++ if (!e_source_has_extension (source, extension_name)) {
++ g_object_unref (source);
++ return FALSE;
++ }
++
++ clear_saved_primary_selection (selector);
++
++ g_object_unref (source);
++
++ return TRUE;
++}
++
++static void
++text_cell_edited_cb (ESourceSelector *selector,
++ const gchar *path_string,
++ const gchar *new_name)
++{
++ GtkTreeView *tree_view;
++ GtkTreeModel *model;
++ GtkTreePath *path;
++ GtkTreeIter iter;
++ ESource *source;
++
++ tree_view = GTK_TREE_VIEW (selector);
++ model = gtk_tree_view_get_model (tree_view);
++ path = gtk_tree_path_new_from_string (path_string);
++
++ gtk_tree_model_get_iter (model, &iter, path);
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++ gtk_tree_path_free (path);
++
++ if (new_name == NULL || *new_name == '\0')
++ return;
++
++ if (same_source_name_exists (selector, new_name))
++ return;
++
++ e_source_set_display_name (source, new_name);
++
++ e_source_selector_queue_write (selector, source);
++}
++
++static void
++cell_toggled_callback (GtkCellRendererToggle *renderer,
++ const gchar *path_string,
++ ESourceSelector *selector)
++{
++ ESource *source;
++ GtkTreeModel *model;
++ GtkTreePath *path;
++ GtkTreeIter iter;
++
++ model = gtk_tree_view_get_model (GTK_TREE_VIEW (selector));
++ path = gtk_tree_path_new_from_string (path_string);
++
++ if (!gtk_tree_model_get_iter (model, &iter, path)) {
++ gtk_tree_path_free (path);
++ return;
++ }
++
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++
++ if (e_source_selector_source_is_selected (selector, source))
++ e_source_selector_unselect_source (selector, source);
++ else
++ e_source_selector_select_source (selector, source);
++
++ selector->priv->toggled_last = TRUE;
++
++ gtk_tree_path_free (path);
++
++ g_object_unref (source);
++}
++
++static void
++selection_changed_callback (GtkTreeSelection *selection,
++ ESourceSelector *selector)
++{
++ g_signal_emit (selector, signals[PRIMARY_SELECTION_CHANGED], 0);
++ g_object_notify (G_OBJECT (selector), "primary-selection");
++}
++
++static void
++source_selector_set_extension_name (ESourceSelector *selector,
++ const gchar *extension_name)
++{
++ g_return_if_fail (extension_name != NULL);
++ g_return_if_fail (selector->priv->extension_name == NULL);
++
++ selector->priv->extension_name = g_strdup (extension_name);
++}
++
++static void
++source_selector_set_registry (ESourceSelector *selector,
++ ESourceRegistry *registry)
++{
++ g_return_if_fail (E_IS_SOURCE_REGISTRY (registry));
++ g_return_if_fail (selector->priv->registry == NULL);
++
++ selector->priv->registry = g_object_ref (registry);
++}
++
++static void
++source_selector_set_property (GObject *object,
++ guint property_id,
++ const GValue *value,
++ GParamSpec *pspec)
++{
++ switch (property_id) {
++ case PROP_EXTENSION_NAME:
++ source_selector_set_extension_name (
++ E_SOURCE_SELECTOR (object),
++ g_value_get_string (value));
++ return;
++
++ case PROP_PRIMARY_SELECTION:
++ e_source_selector_set_primary_selection (
++ E_SOURCE_SELECTOR (object),
++ g_value_get_object (value));
++ return;
++
++ case PROP_REGISTRY:
++ source_selector_set_registry (
++ E_SOURCE_SELECTOR (object),
++ g_value_get_object (value));
++ return;
++
++ case PROP_SHOW_COLORS:
++ e_source_selector_set_show_colors (
++ E_SOURCE_SELECTOR (object),
++ g_value_get_boolean (value));
++ return;
++
++ case PROP_SHOW_TOGGLES:
++ e_source_selector_set_show_toggles (
++ E_SOURCE_SELECTOR (object),
++ g_value_get_boolean (value));
++ return;
++ }
++
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++}
++
++static void
++source_selector_get_property (GObject *object,
++ guint property_id,
++ GValue *value,
++ GParamSpec *pspec)
++{
++ switch (property_id) {
++ case PROP_EXTENSION_NAME:
++ g_value_set_string (
++ value,
++ e_source_selector_get_extension_name (
++ E_SOURCE_SELECTOR (object)));
++ return;
++
++ case PROP_PRIMARY_SELECTION:
++ g_value_take_object (
++ value,
++ e_source_selector_ref_primary_selection (
++ E_SOURCE_SELECTOR (object)));
++ return;
++
++ case PROP_REGISTRY:
++ g_value_set_object (
++ value,
++ e_source_selector_get_registry (
++ E_SOURCE_SELECTOR (object)));
++ return;
++
++ case PROP_SHOW_COLORS:
++ g_value_set_boolean (
++ value,
++ e_source_selector_get_show_colors (
++ E_SOURCE_SELECTOR (object)));
++ return;
++
++ case PROP_SHOW_TOGGLES:
++ g_value_set_boolean (
++ value,
++ e_source_selector_get_show_toggles (
++ E_SOURCE_SELECTOR (object)));
++ return;
++ }
++
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++}
++
++static void
++source_selector_dispose (GObject *object)
++{
++ ESourceSelectorPrivate *priv;
++
++ priv = E_SOURCE_SELECTOR_GET_PRIVATE (object);
++
++ if (priv->registry != NULL) {
++ g_signal_handlers_disconnect_matched (
++ priv->registry,
++ G_SIGNAL_MATCH_DATA,
++ 0, 0, NULL, NULL, object);
++ g_object_unref (priv->registry);
++ priv->registry = NULL;
++ }
++
++ g_hash_table_remove_all (priv->source_index);
++ g_hash_table_remove_all (priv->pending_writes);
++
++ clear_saved_primary_selection (E_SOURCE_SELECTOR (object));
++
++ /* Chain up to parent's dispose() method. */
++ G_OBJECT_CLASS (e_source_selector_parent_class)->dispose (object);
++}
++
++static void
++source_selector_finalize (GObject *object)
++{
++ ESourceSelectorPrivate *priv;
++
++ priv = E_SOURCE_SELECTOR_GET_PRIVATE (object);
++
++ g_hash_table_destroy (priv->source_index);
++ g_hash_table_destroy (priv->pending_writes);
++
++ g_free (priv->extension_name);
++
++ if (priv->main_context != NULL)
++ g_main_context_unref (priv->main_context);
++
++ /* Chain up to parent's finalize() method. */
++ G_OBJECT_CLASS (e_source_selector_parent_class)->finalize (object);
++}
++
++static void
++source_selector_constructed (GObject *object)
++{
++ ESourceRegistry *registry;
++ ESourceSelector *selector;
++
++ selector = E_SOURCE_SELECTOR (object);
++ registry = e_source_selector_get_registry (selector);
++
++ g_signal_connect (
++ registry, "source-added",
++ G_CALLBACK (source_selector_source_added_cb), selector);
++
++ g_signal_connect (
++ registry, "source-changed",
++ G_CALLBACK (source_selector_source_changed_cb), selector);
++
++ g_signal_connect (
++ registry, "source-removed",
++ G_CALLBACK (source_selector_source_removed_cb), selector);
++
++ g_signal_connect (
++ registry, "source-enabled",
++ G_CALLBACK (source_selector_source_enabled_cb), selector);
++
++ g_signal_connect (
++ registry, "source-disabled",
++ G_CALLBACK (source_selector_source_disabled_cb), selector);
++
++ source_selector_build_model (selector);
++
++ gtk_tree_view_expand_all (GTK_TREE_VIEW (selector));
++}
++
++static gboolean
++source_selector_button_press_event (GtkWidget *widget,
++ GdkEventButton *event)
++{
++ ESourceSelector *selector;
++ GtkWidgetClass *widget_class;
++ GtkTreePath *path;
++ ESource *source = NULL;
++ ESource *primary;
++ gboolean right_click = FALSE;
++ gboolean triple_click = FALSE;
++ gboolean row_exists;
++ gboolean res = FALSE;
++
++ selector = E_SOURCE_SELECTOR (widget);
++
++ selector->priv->toggled_last = FALSE;
++
++ /* Triple-clicking a source selects it exclusively. */
++
++ if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
++ right_click = TRUE;
++ else if (event->button == 1 && event->type == GDK_3BUTTON_PRESS)
++ triple_click = TRUE;
++ else
++ goto chainup;
++
++ row_exists = gtk_tree_view_get_path_at_pos (
++ GTK_TREE_VIEW (widget), event->x, event->y,
++ &path, NULL, NULL, NULL);
++
++ /* Get the source/group */
++ if (row_exists) {
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++
++ model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
++
++ gtk_tree_model_get_iter (model, &iter, path);
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++ }
++
++ if (source == NULL)
++ goto chainup;
++
++ primary = e_source_selector_ref_primary_selection (selector);
++ if (source != primary)
++ e_source_selector_set_primary_selection (selector, source);
++ if (primary != NULL)
++ g_object_unref (primary);
++
++ if (right_click)
++ g_signal_emit (
++ widget, signals[POPUP_EVENT], 0, source, event, &res);
++
++ if (triple_click) {
++ e_source_selector_select_exclusive (selector, source);
++ res = TRUE;
++ }
++
++ g_object_unref (source);
++
++ return res;
++
++chainup:
++
++ /* Chain up to parent's button_press_event() method. */
++ widget_class = GTK_WIDGET_CLASS (e_source_selector_parent_class);
++ return widget_class->button_press_event (widget, event);
++}
++
++static void
++source_selector_drag_leave (GtkWidget *widget,
++ GdkDragContext *context,
++ guint time_)
++{
++ GtkTreeView *tree_view;
++ GtkTreeViewDropPosition pos;
++
++ tree_view = GTK_TREE_VIEW (widget);
++ pos = GTK_TREE_VIEW_DROP_BEFORE;
++
++ gtk_tree_view_set_drag_dest_row (tree_view, NULL, pos);
++}
++
++static gboolean
++source_selector_drag_motion (GtkWidget *widget,
++ GdkDragContext *context,
++ gint x,
++ gint y,
++ guint time_)
++{
++ ESource *source = NULL;
++ GtkTreeView *tree_view;
++ GtkTreeModel *model;
++ GtkTreePath *path = NULL;
++ GtkTreeIter iter;
++ GtkTreeViewDropPosition pos;
++ GdkDragAction action = 0;
++
++ tree_view = GTK_TREE_VIEW (widget);
++ model = gtk_tree_view_get_model (tree_view);
++
++ if (!gtk_tree_view_get_dest_row_at_pos (tree_view, x, y, &path, NULL))
++ goto exit;
++
++ if (!gtk_tree_model_get_iter (model, &iter, path))
++ goto exit;
++
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++
++ if (!e_source_get_writable (source))
++ goto exit;
++
++ pos = GTK_TREE_VIEW_DROP_INTO_OR_BEFORE;
++ gtk_tree_view_set_drag_dest_row (tree_view, path, pos);
++
++ if (gdk_drag_context_get_actions (context) & GDK_ACTION_MOVE)
++ action = GDK_ACTION_MOVE;
++ else
++ action = gdk_drag_context_get_suggested_action (context);
++
++exit:
++ if (path != NULL)
++ gtk_tree_path_free (path);
++
++ if (source != NULL)
++ g_object_unref (source);
++
++ gdk_drag_status (context, action, time_);
++
++ return TRUE;
++}
++
++static gboolean
++source_selector_drag_drop (GtkWidget *widget,
++ GdkDragContext *context,
++ gint x,
++ gint y,
++ guint time_)
++{
++ ESource *source;
++ ESourceSelector *selector;
++ GtkTreeView *tree_view;
++ GtkTreeModel *model;
++ GtkTreePath *path;
++ GtkTreeIter iter;
++ const gchar *extension_name;
++ gboolean drop_zone;
++ gboolean valid;
++
++ tree_view = GTK_TREE_VIEW (widget);
++ model = gtk_tree_view_get_model (tree_view);
++
++ if (!gtk_tree_view_get_path_at_pos (
++ tree_view, x, y, &path, NULL, NULL, NULL))
++ return FALSE;
++
++ valid = gtk_tree_model_get_iter (model, &iter, path);
++ gtk_tree_path_free (path);
++ g_return_val_if_fail (valid, FALSE);
++
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++
++ selector = E_SOURCE_SELECTOR (widget);
++ extension_name = e_source_selector_get_extension_name (selector);
++ drop_zone = e_source_has_extension (source, extension_name);
++
++ g_object_unref (source);
++
++ return drop_zone;
++}
++
++static void
++source_selector_drag_data_received (GtkWidget *widget,
++ GdkDragContext *context,
++ gint x,
++ gint y,
++ GtkSelectionData *selection_data,
++ guint info,
++ guint time_)
++{
++ ESource *source = NULL;
++ GtkTreeView *tree_view;
++ GtkTreeModel *model;
++ GtkTreePath *path = NULL;
++ GtkTreeIter iter;
++ GdkDragAction action;
++ gboolean delete;
++ gboolean success = FALSE;
++
++ tree_view = GTK_TREE_VIEW (widget);
++ model = gtk_tree_view_get_model (tree_view);
++
++ action = gdk_drag_context_get_selected_action (context);
++ delete = (action == GDK_ACTION_MOVE);
++
++ if (!gtk_tree_view_get_dest_row_at_pos (tree_view, x, y, &path, NULL))
++ goto exit;
++
++ if (!gtk_tree_model_get_iter (model, &iter, path))
++ goto exit;
++
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++
++ if (!e_source_get_writable (source))
++ goto exit;
++
++ g_signal_emit (
++ widget, signals[DATA_DROPPED], 0, selection_data,
++ source, gdk_drag_context_get_selected_action (context),
++ info, &success);
++
++exit:
++ if (path != NULL)
++ gtk_tree_path_free (path);
++
++ if (source != NULL)
++ g_object_unref (source);
++
++ gtk_drag_finish (context, success, delete, time_);
++}
++
++static gboolean
++source_selector_popup_menu (GtkWidget *widget)
++{
++ ESourceSelector *selector;
++ ESource *source;
++ gboolean res = FALSE;
++
++ selector = E_SOURCE_SELECTOR (widget);
++ source = e_source_selector_ref_primary_selection (selector);
++ g_signal_emit (selector, signals[POPUP_EVENT], 0, source, NULL, &res);
++
++ if (source != NULL)
++ g_object_unref (source);
++
++ return res;
++}
++
++static gboolean
++source_selector_test_collapse_row (GtkTreeView *tree_view,
++ GtkTreeIter *iter,
++ GtkTreePath *path)
++{
++ ESourceSelectorPrivate *priv;
++ GtkTreeSelection *selection;
++ GtkTreeModel *model;
++ GtkTreeIter child_iter;
++
++ priv = E_SOURCE_SELECTOR_GET_PRIVATE (tree_view);
++
++ /* Clear this because something else has been clicked on now */
++ priv->toggled_last = FALSE;
++
++ if (priv->saved_primary_selection)
++ return FALSE;
++
++ selection = gtk_tree_view_get_selection (tree_view);
++
++ if (!gtk_tree_selection_get_selected (selection, &model, &child_iter))
++ return FALSE;
++
++ if (gtk_tree_store_is_ancestor (GTK_TREE_STORE (model), iter, &child_iter)) {
++ GtkTreeRowReference *reference;
++ GtkTreePath *child_path;
++
++ child_path = gtk_tree_model_get_path (model, &child_iter);
++ reference = gtk_tree_row_reference_new (model, child_path);
++ priv->saved_primary_selection = reference;
++ gtk_tree_path_free (child_path);
++ }
++
++ return FALSE;
++}
++
++static void
++source_selector_row_expanded (GtkTreeView *tree_view,
++ GtkTreeIter *iter,
++ GtkTreePath *path)
++{
++ ESourceSelectorPrivate *priv;
++ GtkTreeModel *model;
++ GtkTreePath *child_path;
++ GtkTreeIter child_iter;
++
++ priv = E_SOURCE_SELECTOR_GET_PRIVATE (tree_view);
++
++ if (!priv->saved_primary_selection)
++ return;
++
++ model = gtk_tree_view_get_model (tree_view);
++
++ child_path = gtk_tree_row_reference_get_path (
++ priv->saved_primary_selection);
++ gtk_tree_model_get_iter (model, &child_iter, child_path);
++
++ if (gtk_tree_store_is_ancestor (GTK_TREE_STORE (model), iter, &child_iter)) {
++ GtkTreeSelection *selection;
++
++ selection = gtk_tree_view_get_selection (tree_view);
++ gtk_tree_selection_select_iter (selection, &child_iter);
++
++ clear_saved_primary_selection (E_SOURCE_SELECTOR (tree_view));
++ }
++
++ gtk_tree_path_free (child_path);
++}
++
++static gboolean
++source_selector_get_source_selected (ESourceSelector *selector,
++ ESource *source)
++{
++ ESourceSelectable *extension;
++ const gchar *extension_name;
++ gboolean selected = TRUE;
++
++ extension_name = e_source_selector_get_extension_name (selector);
++
++ if (!e_source_has_extension (source, extension_name))
++ return FALSE;
++
++ extension = e_source_get_extension (source, extension_name);
++
++ if (E_IS_SOURCE_SELECTABLE (extension))
++ selected = e_source_selectable_get_selected (extension);
++
++ return selected;
++}
++
++static void
++source_selector_set_source_selected (ESourceSelector *selector,
++ ESource *source,
++ gboolean selected)
++{
++ ESourceSelectable *extension;
++ const gchar *extension_name;
++
++ extension_name = e_source_selector_get_extension_name (selector);
++
++ if (!e_source_has_extension (source, extension_name))
++ return;
++
++ extension = e_source_get_extension (source, extension_name);
++
++ if (!E_IS_SOURCE_SELECTABLE (extension))
++ return;
++
++ if (selected != e_source_selectable_get_selected (extension)) {
++ e_source_selectable_set_selected (extension, selected);
++ e_source_selector_queue_write (selector, source);
++ }
++}
++
++static gboolean
++ess_bool_accumulator (GSignalInvocationHint *ihint,
++ GValue *out,
++ const GValue *in,
++ gpointer data)
++{
++ gboolean v_boolean;
++
++ v_boolean = g_value_get_boolean (in);
++ g_value_set_boolean (out, v_boolean);
++
++ return !v_boolean;
++}
++
++static void
++e_source_selector_class_init (ESourceSelectorClass *class)
++{
++ GObjectClass *object_class;
++ GtkWidgetClass *widget_class;
++ GtkTreeViewClass *tree_view_class;
++
++ g_type_class_add_private (class, sizeof (ESourceSelectorPrivate));
++
++ object_class = G_OBJECT_CLASS (class);
++ object_class->set_property = source_selector_set_property;
++ object_class->get_property = source_selector_get_property;
++ object_class->dispose = source_selector_dispose;
++ object_class->finalize = source_selector_finalize;
++ object_class->constructed = source_selector_constructed;
++
++ widget_class = GTK_WIDGET_CLASS (class);
++ widget_class->button_press_event = source_selector_button_press_event;
++ widget_class->drag_leave = source_selector_drag_leave;
++ widget_class->drag_motion = source_selector_drag_motion;
++ widget_class->drag_drop = source_selector_drag_drop;
++ widget_class->drag_data_received = source_selector_drag_data_received;
++ widget_class->popup_menu = source_selector_popup_menu;
++
++ tree_view_class = GTK_TREE_VIEW_CLASS (class);
++ tree_view_class->test_collapse_row = source_selector_test_collapse_row;
++ tree_view_class->row_expanded = source_selector_row_expanded;
++
++ class->get_source_selected = source_selector_get_source_selected;
++ class->set_source_selected = source_selector_set_source_selected;
++
++ g_object_class_install_property (
++ object_class,
++ PROP_EXTENSION_NAME,
++ g_param_spec_string (
++ "extension-name",
++ NULL,
++ NULL,
++ NULL,
++ G_PARAM_READWRITE |
++ G_PARAM_CONSTRUCT_ONLY |
++ G_PARAM_STATIC_STRINGS));
++
++ g_object_class_install_property (
++ object_class,
++ PROP_PRIMARY_SELECTION,
++ g_param_spec_object (
++ "primary-selection",
++ NULL,
++ NULL,
++ E_TYPE_SOURCE,
++ G_PARAM_READWRITE |
++ G_PARAM_STATIC_STRINGS));
++
++ g_object_class_install_property (
++ object_class,
++ PROP_REGISTRY,
++ g_param_spec_object (
++ "registry",
++ NULL,
++ NULL,
++ E_TYPE_SOURCE_REGISTRY,
++ G_PARAM_READWRITE |
++ G_PARAM_CONSTRUCT_ONLY |
++ G_PARAM_STATIC_STRINGS));
++
++ g_object_class_install_property (
++ object_class,
++ PROP_SHOW_COLORS,
++ g_param_spec_boolean (
++ "show-colors",
++ NULL,
++ NULL,
++ TRUE,
++ G_PARAM_READWRITE |
++ G_PARAM_STATIC_STRINGS));
++
++ g_object_class_install_property (
++ object_class,
++ PROP_SHOW_TOGGLES,
++ g_param_spec_boolean (
++ "show-toggles",
++ NULL,
++ NULL,
++ TRUE,
++ G_PARAM_READWRITE |
++ G_PARAM_STATIC_STRINGS));
++
++ signals[SELECTION_CHANGED] = g_signal_new (
++ "selection-changed",
++ G_OBJECT_CLASS_TYPE (object_class),
++ G_SIGNAL_RUN_LAST,
++ G_STRUCT_OFFSET (ESourceSelectorClass, selection_changed),
++ NULL, NULL, NULL,
++ G_TYPE_NONE, 0);
++
++ /* XXX Consider this signal deprecated. Connect
++ * to "notify::primary-selection" instead. */
++ signals[PRIMARY_SELECTION_CHANGED] = g_signal_new (
++ "primary-selection-changed",
++ G_OBJECT_CLASS_TYPE (object_class),
++ G_SIGNAL_RUN_LAST,
++ G_STRUCT_OFFSET (ESourceSelectorClass, primary_selection_changed),
++ NULL, NULL, NULL,
++ G_TYPE_NONE, 0);
++
++ signals[POPUP_EVENT] = g_signal_new (
++ "popup-event",
++ G_OBJECT_CLASS_TYPE (object_class),
++ G_SIGNAL_RUN_LAST,
++ G_STRUCT_OFFSET (ESourceSelectorClass, popup_event),
++ ess_bool_accumulator, NULL, NULL,
++ G_TYPE_BOOLEAN, 2, G_TYPE_OBJECT,
++ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
++
++ signals[DATA_DROPPED] = g_signal_new (
++ "data-dropped",
++ G_OBJECT_CLASS_TYPE (object_class),
++ G_SIGNAL_RUN_LAST,
++ G_STRUCT_OFFSET (ESourceSelectorClass, data_dropped),
++ NULL, NULL, NULL,
++ G_TYPE_BOOLEAN, 4,
++ GTK_TYPE_SELECTION_DATA | G_SIGNAL_TYPE_STATIC_SCOPE,
++ E_TYPE_SOURCE,
++ GDK_TYPE_DRAG_ACTION,
++ G_TYPE_UINT);
++}
++
++static void
++e_source_selector_init (ESourceSelector *selector)
++{
++ GHashTable *pending_writes;
++ GtkTreeViewColumn *column;
++ GtkTreeSelection *selection;
++ GtkCellRenderer *renderer;
++ GtkTreeStore *tree_store;
++ GtkTreeView *tree_view;
++
++ pending_writes = g_hash_table_new_full (
++ (GHashFunc) g_direct_hash,
++ (GEqualFunc) g_direct_equal,
++ (GDestroyNotify) g_object_unref,
++ (GDestroyNotify) pending_writes_destroy_source);
++
++ selector->priv = E_SOURCE_SELECTOR_GET_PRIVATE (selector);
++
++ selector->priv->pending_writes = pending_writes;
++
++ selector->priv->main_context = g_main_context_get_thread_default ();
++ if (selector->priv->main_context != NULL)
++ g_main_context_ref (selector->priv->main_context);
++
++ tree_view = GTK_TREE_VIEW (selector);
++
++ gtk_tree_view_set_search_column (tree_view, COLUMN_SOURCE);
++ gtk_tree_view_set_enable_search (tree_view, TRUE);
++
++ selector->priv->toggled_last = FALSE;
++ selector->priv->select_new = FALSE;
++ selector->priv->show_colors = TRUE;
++ selector->priv->show_toggles = TRUE;
++
++ selector->priv->source_index = g_hash_table_new_full (
++ (GHashFunc) e_source_hash,
++ (GEqualFunc) e_source_equal,
++ (GDestroyNotify) g_object_unref,
++ (GDestroyNotify) gtk_tree_row_reference_free);
++
++ tree_store = gtk_tree_store_new (
++ NUM_COLUMNS,
++ G_TYPE_STRING, /* COLUMN_NAME */
++ GDK_TYPE_COLOR, /* COLUMN_COLOR */
++ G_TYPE_BOOLEAN, /* COLUMN_ACTIVE */
++ G_TYPE_BOOLEAN, /* COLUMN_SHOW_COLOR */
++ G_TYPE_BOOLEAN, /* COLUMN_SHOW_TOGGLE */
++ G_TYPE_INT, /* COLUMN_WEIGHT */
++ E_TYPE_SOURCE); /* COLUMN_SOURCE */
++
++ gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (tree_store));
++
++ column = gtk_tree_view_column_new ();
++ gtk_tree_view_append_column (tree_view, column);
++
++ renderer = e_cell_renderer_color_new ();
++ g_object_set (
++ G_OBJECT (renderer), "mode",
++ GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
++ gtk_tree_view_column_pack_start (column, renderer, FALSE);
++ gtk_tree_view_column_add_attribute (
++ column, renderer, "color", COLUMN_COLOR);
++ gtk_tree_view_column_add_attribute (
++ column, renderer, "visible", COLUMN_SHOW_COLOR);
++
++ renderer = e_cell_renderer_safe_toggle_new ();
++ gtk_tree_view_column_pack_start (column, renderer, FALSE);
++ gtk_tree_view_column_add_attribute (
++ column, renderer, "active", COLUMN_ACTIVE);
++ gtk_tree_view_column_add_attribute (
++ column, renderer, "visible", COLUMN_SHOW_TOGGLE);
++ g_signal_connect (
++ renderer, "toggled",
++ G_CALLBACK (cell_toggled_callback), selector);
++
++ renderer = gtk_cell_renderer_text_new ();
++ g_object_set (
++ G_OBJECT (renderer),
++ "ellipsize", PANGO_ELLIPSIZE_END, NULL);
++ g_signal_connect_swapped (
++ renderer, "edited",
++ G_CALLBACK (text_cell_edited_cb), selector);
++ gtk_tree_view_column_pack_start (column, renderer, TRUE);
++ gtk_tree_view_column_set_attributes (
++ column, renderer,
++ "text", COLUMN_NAME,
++ "weight", COLUMN_WEIGHT,
++ NULL);
++
++ selection = gtk_tree_view_get_selection (tree_view);
++ gtk_tree_selection_set_select_function (
++ selection, (GtkTreeSelectionFunc)
++ selection_func, selector, NULL);
++ g_signal_connect_object (
++ selection, "changed",
++ G_CALLBACK (selection_changed_callback),
++ G_OBJECT (selector), 0);
++
++ gtk_tree_view_set_headers_visible (tree_view, FALSE);
++}
++
++/**
++ * e_source_selector_new:
++ * @registry: an #ESourceRegistry
++ * @extension_name: the name of an #ESource extension
++ *
++ * Displays a list of sources from @registry having an extension named
++ * @extension_name. The sources are grouped by backend or groupware
++ * account, which are described by the parent source.
++ *
++ * Returns: a new #ESourceSelector
++ **/
++GtkWidget *
++e_source_selector_new (ESourceRegistry *registry,
++ const gchar *extension_name)
++{
++ g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
++ g_return_val_if_fail (extension_name != NULL, NULL);
++
++ return g_object_new (
++ E_TYPE_SOURCE_SELECTOR, "registry", registry,
++ "extension-name", extension_name, NULL);
++}
++
++/**
++ * e_source_selector_get_registry:
++ * @selector: an #ESourceSelector
++ *
++ * Returns the #ESourceRegistry that @selector is getting sources from.
++ *
++ * Returns: an #ESourceRegistry
++ *
++ * Since: 3.6
++ **/
++ESourceRegistry *
++e_source_selector_get_registry (ESourceSelector *selector)
++{
++ g_return_val_if_fail (E_IS_SOURCE_SELECTOR (selector), NULL);
++
++ return selector->priv->registry;
++}
++
++/**
++ * e_source_selector_get_extension_name:
++ * @selector: an #ESourceSelector
++ *
++ * Returns the extension name used to filter which sources are displayed.
++ *
++ * Returns: the #ESource extension name
++ *
++ * Since: 3.6
++ **/
++const gchar *
++e_source_selector_get_extension_name (ESourceSelector *selector)
++{
++ g_return_val_if_fail (E_IS_SOURCE_SELECTOR (selector), NULL);
++
++ return selector->priv->extension_name;
++}
++
++/**
++ * e_source_selector_get_show_colors:
++ * @selector: an #ESourceSelector
++ *
++ * Returns whether colors are shown next to data sources.
++ *
++ * Returns: %TRUE if colors are being shown
++ *
++ * Since: 3.6
++ **/
++gboolean
++e_source_selector_get_show_colors (ESourceSelector *selector)
++{
++ g_return_val_if_fail (E_IS_SOURCE_SELECTOR (selector), FALSE);
++
++ return selector->priv->show_colors;
++}
++
++/**
++ * e_source_selector_set_show_colors:
++ * @selector: an #ESourceSelector
++ * @show_colors: whether to show colors
++ *
++ * Sets whether to show colors next to data sources.
++ *
++ * Since: 3.6
++ **/
++void
++e_source_selector_set_show_colors (ESourceSelector *selector,
++ gboolean show_colors)
++{
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++
++ if ((show_colors ? 1 : 0) == (selector->priv->show_colors ? 1 : 0))
++ return;
++
++ selector->priv->show_colors = show_colors;
++
++ g_object_notify (G_OBJECT (selector), "show-colors");
++
++ source_selector_build_model (selector);
++}
++
++/**
++ * e_source_selector_get_show_toggles:
++ * @selector: an #ESourceSelector
++ *
++ * Returns whether toggles are shown next to data sources.
++ *
++ * Returns: %TRUE if toggles are being shown
++ *
++ * Since: 3.6
++ **/
++gboolean
++e_source_selector_get_show_toggles (ESourceSelector *selector)
++{
++ g_return_val_if_fail (E_IS_SOURCE_SELECTOR (selector), FALSE);
++
++ return selector->priv->show_toggles;
++}
++
++/**
++ * e_source_selector_set_show_toggles:
++ * @selector: an #ESourceSelector
++ * @show_toggles: whether to show toggles
++ *
++ * Sets whether to show toggles next to data sources.
++ *
++ * Since: 3.6
++ **/
++void
++e_source_selector_set_show_toggles (ESourceSelector *selector,
++ gboolean show_toggles)
++{
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++
++ if ((show_toggles ? 1 : 0) == (selector->priv->show_toggles ? 1 : 0))
++ return;
++
++ selector->priv->show_toggles = show_toggles;
++
++ g_object_notify (G_OBJECT (selector), "show-toggles");
++
++ source_selector_build_model (selector);
++}
++
++/* Helper for e_source_selector_get_selection() */
++static gboolean
++source_selector_check_selected (GtkTreeModel *model,
++ GtkTreePath *path,
++ GtkTreeIter *iter,
++ gpointer user_data)
++{
++ ESource *source;
++
++ struct {
++ ESourceSelector *selector;
++ GSList *list;
++ } *closure = user_data;
++
++ gtk_tree_model_get (model, iter, COLUMN_SOURCE, &source, -1);
++
++ if (e_source_selector_source_is_selected (closure->selector, source))
++ closure->list = g_slist_prepend (closure->list, source);
++ else
++ g_object_unref (source);
++
++ return FALSE;
++}
++
++/**
++ * e_source_selector_get_selection:
++ * @selector: an #ESourceSelector
++ *
++ * Get the list of selected sources, i.e. those that were enabled through the
++ * corresponding checkboxes in the tree.
++ *
++ * Returns: A list of the ESources currently selected. The sources will
++ * be in the same order as they appear on the screen, and the list should be
++ * freed using e_source_selector_free_selection().
++ **/
++GSList *
++e_source_selector_get_selection (ESourceSelector *selector)
++{
++ struct {
++ ESourceSelector *selector;
++ GSList *list;
++ } closure;
++
++ g_return_val_if_fail (E_IS_SOURCE_SELECTOR (selector), NULL);
++
++ closure.selector = selector;
++ closure.list = NULL;
++
++ gtk_tree_model_foreach (
++ gtk_tree_view_get_model (GTK_TREE_VIEW (selector)),
++ (GtkTreeModelForeachFunc) source_selector_check_selected,
++ &closure);
++
++ return g_slist_reverse (closure.list);
++}
++
++/**
++ * e_source_list_free_selection:
++ * @list: A selection list returned by e_source_selector_get_selection().
++ *
++ * Free the selection list.
++ **/
++void
++e_source_selector_free_selection (GSList *list)
++{
++ g_slist_foreach (list, (GFunc) g_object_unref, NULL);
++ g_slist_free (list);
++}
++
++/**
++ * e_source_selector_set_select_new:
++ * @selector: An #ESourceSelector widget
++ * @state: A gboolean
++ *
++ * Set whether or not to select new sources added to @selector.
++ **/
++void
++e_source_selector_set_select_new (ESourceSelector *selector,
++ gboolean state)
++{
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++
++ selector->priv->select_new = state;
++}
++
++/**
++ * e_source_selector_select_source:
++ * @selector: An #ESourceSelector widget
++ * @source: An #ESource.
++ *
++ * Select @source in @selector.
++ **/
++void
++e_source_selector_select_source (ESourceSelector *selector,
++ ESource *source)
++{
++ ESourceSelectorClass *class;
++ GtkTreeRowReference *reference;
++ GHashTable *source_index;
++
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++ g_return_if_fail (E_IS_SOURCE (source));
++
++ /* Make sure the ESource is in our tree model. */
++ source_index = selector->priv->source_index;
++ reference = g_hash_table_lookup (source_index, source);
++ g_return_if_fail (gtk_tree_row_reference_valid (reference));
++
++ class = E_SOURCE_SELECTOR_GET_CLASS (selector);
++ g_return_if_fail (class->set_source_selected != NULL);
++
++ class->set_source_selected (selector, source, TRUE);
++
++ g_signal_emit (selector, signals[SELECTION_CHANGED], 0);
++}
++
++/**
++ * e_source_selector_unselect_source:
++ * @selector: An #ESourceSelector widget
++ * @source: An #ESource.
++ *
++ * Unselect @source in @selector.
++ **/
++void
++e_source_selector_unselect_source (ESourceSelector *selector,
++ ESource *source)
++{
++ ESourceSelectorClass *class;
++ GtkTreeRowReference *reference;
++ GHashTable *source_index;
++
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++ g_return_if_fail (E_IS_SOURCE (source));
++
++ /* Make sure the ESource is in our tree model. */
++ source_index = selector->priv->source_index;
++ reference = g_hash_table_lookup (source_index, source);
++ g_return_if_fail (gtk_tree_row_reference_valid (reference));
++
++ class = E_SOURCE_SELECTOR_GET_CLASS (selector);
++ g_return_if_fail (class->set_source_selected != NULL);
++
++ class->set_source_selected (selector, source, FALSE);
++
++ g_signal_emit (selector, signals[SELECTION_CHANGED], 0);
++}
++
++/**
++ * e_source_selector_select_exclusive:
++ * @selector: An #ESourceSelector widget
++ * @source: An #ESource.
++ *
++ * Select @source in @selector and unselect all others.
++ *
++ * Since: 2.30
++ **/
++void
++e_source_selector_select_exclusive (ESourceSelector *selector,
++ ESource *source)
++{
++ ESourceSelectorClass *class;
++ GHashTable *source_index;
++ GHashTableIter iter;
++ gpointer key;
++
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++ g_return_if_fail (E_IS_SOURCE (source));
++
++ class = E_SOURCE_SELECTOR_GET_CLASS (selector);
++ g_return_if_fail (class->set_source_selected != NULL);
++
++ source_index = selector->priv->source_index;
++ g_hash_table_iter_init (&iter, source_index);
++
++ while (g_hash_table_iter_next (&iter, &key, NULL)) {
++ gboolean selected = e_source_equal (key, source);
++ class->set_source_selected (selector, key, selected);
++ }
++
++ g_signal_emit (selector, signals[SELECTION_CHANGED], 0);
++}
++
++/**
++ * e_source_selector_source_is_selected:
++ * @selector: An #ESourceSelector widget
++ * @source: An #ESource.
++ *
++ * Check whether @source is selected in @selector.
++ *
++ * Returns: %TRUE if @source is currently selected, %FALSE otherwise.
++ **/
++gboolean
++e_source_selector_source_is_selected (ESourceSelector *selector,
++ ESource *source)
++{
++ ESourceSelectorClass *class;
++ GtkTreeRowReference *reference;
++ GHashTable *source_index;
++
++ g_return_val_if_fail (E_IS_SOURCE_SELECTOR (selector), FALSE);
++ g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
++
++ /* Make sure the ESource is in our tree model. */
++ source_index = selector->priv->source_index;
++ reference = g_hash_table_lookup (source_index, source);
++ g_return_val_if_fail (gtk_tree_row_reference_valid (reference), FALSE);
++
++ class = E_SOURCE_SELECTOR_GET_CLASS (selector);
++ g_return_val_if_fail (class->get_source_selected != NULL, FALSE);
++
++ return class->get_source_selected (selector, source);
++}
++
++/**
++ * e_source_selector_edit_primary_selection:
++ * @selector: An #ESourceSelector widget
++ *
++ * Allows the user to rename the primary selected source by opening an
++ * entry box directly in @selector.
++ *
++ * Since: 2.26
++ **/
++void
++e_source_selector_edit_primary_selection (ESourceSelector *selector)
++{
++ GtkTreeRowReference *reference;
++ GtkTreeSelection *selection;
++ GtkTreeViewColumn *column;
++ GtkCellRenderer *renderer;
++ GtkTreeView *tree_view;
++ GtkTreeModel *model;
++ GtkTreePath *path = NULL;
++ GtkTreeIter iter;
++ GList *list;
++
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++
++ tree_view = GTK_TREE_VIEW (selector);
++ column = gtk_tree_view_get_column (tree_view, 0);
++ reference = selector->priv->saved_primary_selection;
++ selection = gtk_tree_view_get_selection (tree_view);
++
++ if (reference != NULL)
++ path = gtk_tree_row_reference_get_path (reference);
++ else if (gtk_tree_selection_get_selected (selection, &model, &iter))
++ path = gtk_tree_model_get_path (model, &iter);
++
++ if (path == NULL)
++ return;
++
++ /* XXX Because we stuff three renderers in a single column,
++ * we have to manually hunt for the text renderer. */
++ renderer = NULL;
++ list = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
++ while (list != NULL) {
++ renderer = list->data;
++ if (GTK_IS_CELL_RENDERER_TEXT (renderer))
++ break;
++ list = g_list_delete_link (list, list);
++ }
++ g_list_free (list);
++
++ /* Make the text cell renderer editable, but only temporarily.
++ * We don't want editing to be activated by simply clicking on
++ * the source name. Too easy for accidental edits to occur. */
++ g_object_set (renderer, "editable", TRUE, NULL);
++ gtk_tree_view_expand_to_path (tree_view, path);
++ gtk_tree_view_set_cursor_on_cell (
++ tree_view, path, column, renderer, TRUE);
++ g_object_set (renderer, "editable", FALSE, NULL);
++
++ gtk_tree_path_free (path);
++}
++
++/**
++ * e_source_selector_ref_primary_selection:
++ * @selector: An #ESourceSelector widget
++ *
++ * Get the primary selected source. The primary selection is the one that is
++ * highlighted through the normal #GtkTreeView selection mechanism (as opposed
++ * to the "normal" selection, which is the set of source whose checkboxes are
++ * checked).
++ *
++ * The returned #ESource is referenced for thread-safety and must be
++ * unreferenced with g_object_unref() when finished with it.
++ *
++ * Returns: The selected source.
++ *
++ * Since: 3.6
++ **/
++ESource *
++e_source_selector_ref_primary_selection (ESourceSelector *selector)
++{
++ ESource *source;
++ GtkTreeRowReference *reference;
++ GtkTreeSelection *selection;
++ GtkTreeView *tree_view;
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++ const gchar *extension_name;
++ gboolean have_iter = FALSE;
++
++ g_return_val_if_fail (E_IS_SOURCE_SELECTOR (selector), NULL);
++
++ tree_view = GTK_TREE_VIEW (selector);
++ model = gtk_tree_view_get_model (tree_view);
++ selection = gtk_tree_view_get_selection (tree_view);
++
++ reference = selector->priv->saved_primary_selection;
++
++ if (gtk_tree_row_reference_valid (reference)) {
++ GtkTreePath *path;
++
++ path = gtk_tree_row_reference_get_path (reference);
++ have_iter = gtk_tree_model_get_iter (model, &iter, path);
++ gtk_tree_path_free (path);
++ }
++
++ if (!have_iter)
++ have_iter = gtk_tree_selection_get_selected (
++ selection, NULL, &iter);
++
++ if (!have_iter)
++ return NULL;
++
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++
++ extension_name = e_source_selector_get_extension_name (selector);
++
++ if (!e_source_has_extension (source, extension_name)) {
++ g_object_unref (source);
++ return NULL;
++ }
++
++ return source;
++}
++
++/**
++ * e_source_selector_set_primary_selection:
++ * @selector: an #ESourceSelector widget
++ * @source: an #ESource to select
++ *
++ * Highlights @source in @selector. The highlighted #ESource is called
++ * the primary selection.
++ *
++ * Do not confuse this function with e_source_selector_select_source(),
++ * which activates the check box next to an #ESource's display name in
++ * @selector. This function does not alter the check box.
++ **/
++void
++e_source_selector_set_primary_selection (ESourceSelector *selector,
++ ESource *source)
++{
++ GHashTable *source_index;
++ GtkTreeRowReference *reference;
++ GtkTreeSelection *selection;
++ GtkTreeView *tree_view;
++ GtkTreePath *child_path;
++ GtkTreePath *parent_path;
++ const gchar *extension_name;
++
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++ g_return_if_fail (E_IS_SOURCE (source));
++
++ tree_view = GTK_TREE_VIEW (selector);
++ selection = gtk_tree_view_get_selection (tree_view);
++
++ source_index = selector->priv->source_index;
++ reference = g_hash_table_lookup (source_index, source);
++
++ /* XXX Maybe we should return a success/fail boolean? */
++ if (!gtk_tree_row_reference_valid (reference))
++ return;
++
++ extension_name = e_source_selector_get_extension_name (selector);
++
++ /* Return silently if attempting to select a parent node
++ * lacking the expected extension (e.g. On This Computer). */
++ if (!e_source_has_extension (source, extension_name))
++ return;
++
++ /* We block the signal because this all needs to be atomic */
++ g_signal_handlers_block_matched (
++ selection, G_SIGNAL_MATCH_FUNC,
++ 0, 0, NULL, selection_changed_callback, NULL);
++ gtk_tree_selection_unselect_all (selection);
++ g_signal_handlers_unblock_matched (
++ selection, G_SIGNAL_MATCH_FUNC,
++ 0, 0, NULL, selection_changed_callback, NULL);
++
++ clear_saved_primary_selection (selector);
++
++ child_path = gtk_tree_row_reference_get_path (reference);
++
++ parent_path = gtk_tree_path_copy (child_path);
++ gtk_tree_path_up (parent_path);
++
++ if (gtk_tree_view_row_expanded (tree_view, parent_path)) {
++ gtk_tree_selection_select_path (selection, child_path);
++ } else {
++ selector->priv->saved_primary_selection =
++ gtk_tree_row_reference_copy (reference);
++ g_signal_emit (selector, signals[PRIMARY_SELECTION_CHANGED], 0);
++ g_object_notify (G_OBJECT (selector), "primary-selection");
++ }
++
++ gtk_tree_path_free (child_path);
++ gtk_tree_path_free (parent_path);
++}
++
++/**
++ * e_source_selector_ref_source_by_path:
++ * @selector: an #ESourceSelector
++ * @path: a #GtkTreePath
++ *
++ * Returns the #ESource object at @path, or %NULL if @path is invalid.
++ *
++ * The returned #ESource is referenced for thread-safety and must be
++ * unreferenced with g_object_unref() when finished with it.
++ *
++ * Returns: the #ESource object at @path, or %NULL
++ *
++ * Since: 3.6
++ **/
++ESource *
++e_source_selector_ref_source_by_path (ESourceSelector *selector,
++ GtkTreePath *path)
++{
++ ESource *source = NULL;
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++
++ g_return_val_if_fail (E_IS_SOURCE_SELECTOR (selector), NULL);
++ g_return_val_if_fail (path != NULL, NULL);
++
++ model = gtk_tree_view_get_model (GTK_TREE_VIEW (selector));
++
++ if (gtk_tree_model_get_iter (model, &iter, path))
++ gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
++
++ return source;
++}
++
++/**
++ * e_source_selector_queue_write:
++ * @selector: an #ESourceSelecetor
++ * @source: an #ESource with changes to be written
++ *
++ * Queues a main loop idle callback to write changes to @source back to
++ * the D-Bus registry service.
++ *
++ * Since: 3.6
++ **/
++void
++e_source_selector_queue_write (ESourceSelector *selector,
++ ESource *source)
++{
++ GSource *idle_source;
++ GHashTable *pending_writes;
++ GMainContext *main_context;
++ AsyncContext *async_context;
++
++ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
++ g_return_if_fail (E_IS_SOURCE (source));
++
++ main_context = selector->priv->main_context;
++ pending_writes = selector->priv->pending_writes;
++
++ idle_source = g_hash_table_lookup (pending_writes, source);
++ if (idle_source != NULL && !g_source_is_destroyed (idle_source))
++ return;
++
++ async_context = g_slice_new0 (AsyncContext);
++ async_context->selector = g_object_ref (selector);
++ async_context->source = g_object_ref (source);
++
++ /* Set a higher priority so this idle source runs before our
++ * source_selector_cancel_write() signal handler, which will
++ * cancel this idle source. Cancellation is the right thing
++ * to do when receiving changes from OTHER registry clients,
++ * but we don't want to cancel our own changes.
++ *
++ * XXX This might be an argument for using etags.
++ */
++ idle_source = g_idle_source_new ();
++ g_hash_table_insert (
++ pending_writes,
++ g_object_ref (source),
++ g_source_ref (idle_source));
++ g_source_set_callback (
++ idle_source,
++ source_selector_write_idle_cb,
++ async_context,
++ (GDestroyNotify) async_context_free);
++ g_source_set_priority (idle_source, G_PRIORITY_HIGH_IDLE);
++ g_source_attach (idle_source, main_context);
++ g_source_unref (idle_source);
++}
++
+diff --git a/src/event-factories/e-source-selector.h b/src/event-factories/e-source-selector.h
+new file mode 100644
+index 0000000..b6d3770
+--- /dev/null
++++ b/src/event-factories/e-source-selector.h
+@@ -0,0 +1,137 @@
++/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
++/* e-source-selector.h
++ *
++ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
++ *
++ * This program 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 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 Lesser General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ *
++ * Author: Ettore Perazzoli <ettore@ximian.com>
++ */
++
++#ifndef E_SOURCE_SELECTOR_H
++#define E_SOURCE_SELECTOR_H
++
++#include <gtk/gtk.h>
++#include <libedataserver/libedataserver.h>
++
++/* Standard GObject macros */
++#define E_TYPE_SOURCE_SELECTOR \
++ (e_source_selector_get_type ())
++#define E_SOURCE_SELECTOR(obj) \
++ (G_TYPE_CHECK_INSTANCE_CAST \
++ ((obj), E_TYPE_SOURCE_SELECTOR, ESourceSelector))
++#define E_SOURCE_SELECTOR_CLASS(cls) \
++ (G_TYPE_CHECK_CLASS_CAST \
++ ((cls), E_TYPE_SOURCE_SELECTOR, ESourceSelectorClass))
++#define E_IS_SOURCE_SELECTOR(obj) \
++ (G_TYPE_CHECK_INSTANCE_TYPE \
++ ((obj), E_TYPE_SOURCE_SELECTOR))
++#define E_IS_SOURCE_SELECTOR_CLASS(cls) \
++ (G_TYPE_CHECK_CLASS_TYPE \
++ ((cls), E_TYPE_SOURCE_SELECTOR))
++#define E_SOURCE_SELECTOR_GET_CLASS(obj) \
++ (G_TYPE_INSTANCE_GET_CLASS \
++ ((obj), E_TYPE_SOURCE_SELECTOR, ESourceSelectorClass))
++
++G_BEGIN_DECLS
++
++typedef struct _ESourceSelector ESourceSelector;
++typedef struct _ESourceSelectorClass ESourceSelectorClass;
++typedef struct _ESourceSelectorPrivate ESourceSelectorPrivate;
++
++struct _ESourceSelector {
++ GtkTreeView parent;
++ ESourceSelectorPrivate *priv;
++};
++
++struct _ESourceSelectorClass {
++ GtkTreeViewClass parent_class;
++
++ /* Methods */
++ gboolean (*get_source_selected) (ESourceSelector *selector,
++ ESource *source);
++ void (*set_source_selected) (ESourceSelector *selector,
++ ESource *source,
++ gboolean selected);
++
++ /* Signals */
++ void (*selection_changed) (ESourceSelector *selector);
++ void (*primary_selection_changed)
++ (ESourceSelector *selector);
++ gboolean (*popup_event) (ESourceSelector *selector,
++ ESource *primary,
++ GdkEventButton *event);
++ gboolean (*data_dropped) (ESourceSelector *selector,
++ GtkSelectionData *data,
++ ESource *destination,
++ GdkDragAction action,
++ guint target_info);
++
++ gpointer padding1;
++ gpointer padding2;
++ gpointer padding3;
++};
++
++GType e_source_selector_get_type (void);
++GtkWidget * e_source_selector_new (ESourceRegistry *registry,
++ const gchar *extension_name);
++ESourceRegistry *
++ e_source_selector_get_registry (ESourceSelector *selector);
++const gchar * e_source_selector_get_extension_name
++ (ESourceSelector *selector);
++gboolean e_source_selector_get_show_colors
++ (ESourceSelector *selector);
++void e_source_selector_set_show_colors
++ (ESourceSelector *selector,
++ gboolean show_colors);
++gboolean e_source_selector_get_show_toggles
++ (ESourceSelector *selector);
++void e_source_selector_set_show_toggles
++ (ESourceSelector *selector,
++ gboolean show_toggles);
++void e_source_selector_select_source (ESourceSelector *selector,
++ ESource *source);
++void e_source_selector_unselect_source
++ (ESourceSelector *selector,
++ ESource *source);
++void e_source_selector_select_exclusive
++ (ESourceSelector *selector,
++ ESource *source);
++gboolean e_source_selector_source_is_selected
++ (ESourceSelector *selector,
++ ESource *source);
++GSList * e_source_selector_get_selection (ESourceSelector *selector);
++void e_source_selector_free_selection
++ (GSList *list);
++void e_source_selector_set_select_new
++ (ESourceSelector *selector,
++ gboolean state);
++void e_source_selector_edit_primary_selection
++ (ESourceSelector *selector);
++ESource * e_source_selector_ref_primary_selection
++ (ESourceSelector *selector);
++void e_source_selector_set_primary_selection
++ (ESourceSelector *selector,
++ ESource *source);
++ESource * e_source_selector_ref_source_by_path
++ (ESourceSelector *selector,
++ GtkTreePath *path);
++void e_source_selector_queue_write (ESourceSelector *selector,
++ ESource *source);
++
++G_END_DECLS
++
++#endif /* E_SOURCE_SELECTOR_H */
+--
+cgit v0.9.1
diff --git a/community/apvlv/PKGBUILD b/community/apvlv/PKGBUILD
index a0bca90b3..065bf30fa 100644
--- a/community/apvlv/PKGBUILD
+++ b/community/apvlv/PKGBUILD
@@ -1,23 +1,28 @@
-# $Id: PKGBUILD 79519 2012-11-06 16:27:50Z bpiotrowski $
-# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# $Id: PKGBUILD 88809 2013-04-22 20:09:44Z jsteel $
+# Maintainer: Jonathan Steel <jsteel@aur.archlinux.org>
+# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: tocer.deng <tocer.deng@gmail.com>
pkgname=apvlv
pkgver=0.1.4.20121023
-pkgrel=1
-pkgdesc='A PDF Viewer which behaves like Vim'
+pkgrel=3
+pkgdesc='A PDF Viewer, which behaves like Vim'
arch=('i686' 'x86_64')
url="http://naihe2010.github.com/apvlv/"
license=('GPL')
-depends=('gtk2' 'cairo' 'poppler-glib' 'djvulibre')
+depends=('gtk2' 'cairo' 'poppler-glib' 'djvulibre' 'desktop-file-utils')
makedepends=('cmake' 'libwebkit')
-source=(ftp://ftp.archlinux.org/other/community/$pkgname/$pkgname-$pkgver.tar.xz)
-md5sums=('f222fc4b09b15358eb4e7f996ba810d6')
+install=$pkgname.install
+source=(ftp://ftp.archlinux.org/other/community/$pkgname/$pkgname-$pkgver.tar.xz
+ $pkgname.desktop)
+backup=(etc/apvlvrc)
+md5sums=('f222fc4b09b15358eb4e7f996ba810d6'
+ '54478fecb54f36d1c44d8fdc233ddbac')
build() {
- cd $srcdir/$pkgname-$pkgver
+ cd "$srcdir"/$pkgname-$pkgver
mkdir -p build
cd build
@@ -25,11 +30,15 @@ build() {
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DAPVLV_WITH_UMD=no ..
+
make
}
package() {
- cd $srcdir/$pkgname-$pkgver/build
+ cd "$srcdir"/$pkgname-$pkgver/build
+
+ make DESTDIR="$pkgdir"/ install
- make DESTDIR=$pkgdir/ install
+ install -Dm644 "$srcdir"/$pkgname.desktop \
+ "$pkgdir"/usr/share/applications/$pkgname.desktop
}
diff --git a/community/apvlv/apvlv.desktop b/community/apvlv/apvlv.desktop
new file mode 100644
index 000000000..2f6ebd398
--- /dev/null
+++ b/community/apvlv/apvlv.desktop
@@ -0,0 +1,17 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=apvlv
+Comment=A minimalistic document viewer
+Comment[de]=Ein minimalistischer Dokumenten-Betrachter
+Comment[fr]=Un visionneur de document minimaliste
+Comment[ru]=Минималистичный просмотрщик документов
+Comment[tr]=Minimalist bir belge görüntüleyicisi
+Comment[es_CL]=Un visor de documentos minimalista
+Comment[uk_UA]=Легкий переглядач документів
+Comment[it]=Un visualizzatore di documenti minimalista
+Comment[pl]=Minimalistyczna przeglądarka dokumentów
+Exec=apvlv %f
+Terminal=false
+Categories=Office;Viewer;
+MimeType=application/pdf;application/postscript;application/eps;application/x-eps;image/eps;image/x-eps;image/vnd.djvu;
diff --git a/community/apvlv/apvlv.install b/community/apvlv/apvlv.install
new file mode 100644
index 000000000..5384f9c85
--- /dev/null
+++ b/community/apvlv/apvlv.install
@@ -0,0 +1,7 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_remove() {
+ post_install
+}
diff --git a/community/audit/PKGBUILD b/community/audit/PKGBUILD
index 11d84fd02..b2160ddb0 100644
--- a/community/audit/PKGBUILD
+++ b/community/audit/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 82354 2013-01-16 08:38:43Z mtorromeo $
+# $Id: PKGBUILD 88732 2013-04-22 07:51:09Z mtorromeo $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Connor Behan <connor.behan@gmail.com>
# Contributor: henning mueller <henning@orgizm.net>
pkgname=audit
-pkgver=2.2.2
+pkgver=2.2.3
pkgrel=1
pkgdesc='User space utilities for storing and searching the audit records generated by the audit subsystem in the Linux kernel.'
url=http://people.redhat.com/sgrubb/$pkgname
@@ -59,7 +59,7 @@ package() {
sed -ri 's| /sbin| /usr/sbin|' etc/audit/*.conf etc/audisp/plugins.d/*.conf
}
-sha256sums=('8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b'
+sha256sums=('2fc8f97020121593f516dc011ef61f39043c4cea9b2cb9ab3849bf9e41dedf02'
'1e374ff164667b6a11f84c825a39996b449dc712d573996907cd47f063bf0dd5'
'3c7179f40216b594675f26bb73884406c8ac91577b609dd1ab9837f889954007'
'6adadb405bebe99bb6a50e80e7c1a356996626e135d566283448fe4019fff3a4')
diff --git a/community/cinnamon-control-center/PKGBUILD b/community/cinnamon-control-center/PKGBUILD
index d187b373f..c303de52b 100644
--- a/community/cinnamon-control-center/PKGBUILD
+++ b/community/cinnamon-control-center/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 88411 2013-04-17 07:47:53Z faidoc $
+# $Id: PKGBUILD 88800 2013-04-22 12:29:37Z bgyorgy $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com
# Based on gnome-control-center:
# Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
@@ -6,23 +6,33 @@
pkgname=cinnamon-control-center
pkgver=1.7.3
-pkgrel=1
+pkgrel=3
pkgdesc="The Control Center for Cinnamon"
arch=('i686' 'x86_64')
-depends=('cinnamon' 'cheese' 'libgtop' 'network-manager-applet')
+depends=('cinnamon' 'cheese' 'libgnomekbd' 'libgtop' 'network-manager-applet')
optdepends=('mesa-demos: provides glxinfo for graphics information'
'gnome-color-manager: for color management tasks')
-makedepends=('intltool' 'gnome-common' 'libgnomekbd')
+makedepends=('intltool' 'gnome-common')
url="https://github.com/linuxmint/cinnamon-control-center"
install=cinnamon-control-center.install
license=('GPL')
options=('!libtool' '!emptydirs')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-control-center/archive/$pkgver.tar.gz")
-sha256sums=('44a4484238c2b9e9060d062028438df589fc29c9e3da45edad068198a990c8be')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-control-center/archive/$pkgver.tar.gz"
+ "gnomerrlabeler.patch"
+ "idle-delay.patch")
+sha256sums=('44a4484238c2b9e9060d062028438df589fc29c9e3da45edad068198a990c8be'
+ '826de61fa60349a99c6895f2ffb0ea1c7f71031b17dd80bb245e3834b30b6ff6'
+ '42ea92628dc234d65e582592a66c0011d5bb2c2eac14854a06f7a9dc923c8d67')
build() {
cd $pkgname-$pkgver
+ # Build fix for GNOME 3.8
+ patch -Np1 -i "$srcdir/gnomerrlabeler.patch"
+
+ # Runtime fix for GNOME 3.8
+ patch -Np1 -i "$srcdir/idle-delay.patch"
+
autoreconf -fi
./configure --prefix=/usr --sysconfdir=/etc \
@@ -48,9 +58,6 @@ package() {
make -C shell DESTDIR="$pkgdir" uninstall
make -C shell DESTDIR="$pkgdir" install-libLTLIBRARIES
- # Remove Region panel, because it's not compatible with gnome-settings-daemon 3.6
- make -C panels/region DESTDIR="$pkgdir" uninstall
-
# Remove broken desktop files
rm -R "$pkgdir/usr/share/applications"
rm -R "$pkgdir/etc"
diff --git a/community/cinnamon-control-center/gnomerrlabeler.patch b/community/cinnamon-control-center/gnomerrlabeler.patch
new file mode 100644
index 000000000..b763078ba
--- /dev/null
+++ b/community/cinnamon-control-center/gnomerrlabeler.patch
@@ -0,0 +1,766 @@
+diff -Naur cinnamon-control-center-1.7.3.orig/panels/display/cc-display-panel.c cinnamon-control-center-1.7.3/panels/display/cc-display-panel.c
+--- cinnamon-control-center-1.7.3.orig/panels/display/cc-display-panel.c 2013-04-15 16:04:38.000000000 +0200
++++ cinnamon-control-center-1.7.3/panels/display/cc-display-panel.c 2013-04-22 03:46:53.499944701 +0200
+@@ -31,12 +31,13 @@
+ #define GNOME_DESKTOP_USE_UNSTABLE_API
+ #include <libgnome-desktop/gnome-rr.h>
+ #include <libgnome-desktop/gnome-rr-config.h>
+-#include <libgnome-desktop/gnome-rr-labeler.h>
+ #include <gdk/gdkx.h>
+ #include <X11/Xlib.h>
+ #include <glib/gi18n.h>
+ #include <gdesktop-enums.h>
+
++#include "cc-rr-labeler.h"
++
+ CC_PANEL_REGISTER (CcDisplayPanel, cc_display_panel)
+
+ #define DISPLAY_PANEL_PRIVATE(o) \
+@@ -75,7 +76,7 @@
+ {
+ GnomeRRScreen *screen;
+ GnomeRRConfig *current_configuration;
+- GnomeRRLabeler *labeler;
++ CcRRLabeler *labeler;
+ GnomeRROutputInfo *current_output;
+
+ GSettings *clock_settings;
+@@ -200,7 +201,7 @@
+ g_signal_handler_disconnect (GTK_WIDGET (self), self->priv->focus_id_hide);
+ }
+
+- gnome_rr_labeler_hide (self->priv->labeler);
++ cc_rr_labeler_hide (self->priv->labeler);
+ g_object_unref (self->priv->labeler);
+
+ G_OBJECT_CLASS (cc_display_panel_parent_class)->finalize (object);
+@@ -293,16 +294,16 @@
+ self->priv->current_output = NULL;
+
+ if (self->priv->labeler) {
+- gnome_rr_labeler_hide (self->priv->labeler);
++ cc_rr_labeler_hide (self->priv->labeler);
+ g_object_unref (self->priv->labeler);
+ }
+
+- self->priv->labeler = gnome_rr_labeler_new (self->priv->current_configuration);
++ self->priv->labeler = cc_rr_labeler_new (self->priv->current_configuration);
+
+ if (cc_panel_get_shell (CC_PANEL (self)) == NULL)
+- gnome_rr_labeler_hide (self->priv->labeler);
++ cc_rr_labeler_hide (self->priv->labeler);
+ else
+- gnome_rr_labeler_show (self->priv->labeler);
++ cc_rr_labeler_show (self->priv->labeler);
+
+ select_current_output_from_dialog_position (self);
+
+@@ -2594,9 +2595,9 @@
+ if (self->priv->labeler == NULL)
+ return;
+ if (gtk_window_has_toplevel_focus (window))
+- gnome_rr_labeler_show (self->priv->labeler);
++ cc_rr_labeler_show (self->priv->labeler);
+ else
+- gnome_rr_labeler_hide (self->priv->labeler);
++ cc_rr_labeler_hide (self->priv->labeler);
+ }
+
+ static void
+@@ -2606,9 +2607,9 @@
+ if (CC_DISPLAY_PANEL(widget)->priv->labeler == NULL)
+ return;
+ if (gtk_widget_get_visible (widget)) {
+- gnome_rr_labeler_show (CC_DISPLAY_PANEL (widget)->priv->labeler);
++ cc_rr_labeler_show (CC_DISPLAY_PANEL (widget)->priv->labeler);
+ } else {
+- gnome_rr_labeler_hide (CC_DISPLAY_PANEL (widget)->priv->labeler);
++ cc_rr_labeler_hide (CC_DISPLAY_PANEL (widget)->priv->labeler);
+ }
+ }
+
+diff -Naur cinnamon-control-center-1.7.3.orig/panels/display/cc-rr-labeler.c cinnamon-control-center-1.7.3/panels/display/cc-rr-labeler.c
+--- cinnamon-control-center-1.7.3.orig/panels/display/cc-rr-labeler.c 1970-01-01 01:00:00.000000000 +0100
++++ cinnamon-control-center-1.7.3/panels/display/cc-rr-labeler.c 2013-04-22 03:42:12.379900127 +0200
+@@ -0,0 +1,601 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
++ *
++ * cc-rr-labeler.c - Utility to label monitors to identify them
++ * while they are being configured.
++ *
++ * Copyright 2008, Novell, Inc.
++ *
++ * This file is part of the Gnome Library.
++ *
++ * The Gnome Library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * The Gnome 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
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with the Gnome Library; see the file COPYING.LIB. If not,
++ * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ *
++ * Author: Federico Mena-Quintero <federico@novell.com>
++ */
++
++#include <config.h>
++#include <glib/gi18n-lib.h>
++#include <gtk/gtk.h>
++
++#include <X11/Xproto.h>
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++#include <X11/Xatom.h>
++#include <gdk/gdkx.h>
++
++#include "cc-rr-labeler.h"
++
++struct _CcRRLabelerPrivate {
++ GnomeRRConfig *config;
++
++ int num_outputs;
++
++ GdkRGBA *palette;
++ GtkWidget **windows;
++
++ GdkScreen *screen;
++ Atom workarea_atom;
++};
++
++enum {
++ PROP_0,
++ PROP_CONFIG,
++ PROP_LAST
++};
++
++G_DEFINE_TYPE (CcRRLabeler, cc_rr_labeler, G_TYPE_OBJECT);
++
++static void cc_rr_labeler_finalize (GObject *object);
++static void setup_from_config (CcRRLabeler *labeler);
++
++static GdkFilterReturn
++screen_xevent_filter (GdkXEvent *xevent,
++ GdkEvent *event,
++ CcRRLabeler *labeler)
++{
++ XEvent *xev;
++
++ xev = (XEvent *) xevent;
++
++ if (xev->type == PropertyNotify &&
++ xev->xproperty.atom == labeler->priv->workarea_atom) {
++ /* update label positions */
++ if (labeler->priv->windows != NULL) {
++ cc_rr_labeler_hide (labeler);
++ cc_rr_labeler_show (labeler);
++ }
++ }
++
++ return GDK_FILTER_CONTINUE;
++}
++
++static void
++cc_rr_labeler_init (CcRRLabeler *labeler)
++{
++ GdkWindow *gdkwindow;
++
++ labeler->priv = G_TYPE_INSTANCE_GET_PRIVATE (labeler, GNOME_TYPE_RR_LABELER, CcRRLabelerPrivate);
++
++ labeler->priv->workarea_atom = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
++ "_NET_WORKAREA",
++ True);
++
++ labeler->priv->screen = gdk_screen_get_default ();
++ /* code is not really designed to handle multiple screens so *shrug* */
++ gdkwindow = gdk_screen_get_root_window (labeler->priv->screen);
++ gdk_window_add_filter (gdkwindow, (GdkFilterFunc) screen_xevent_filter, labeler);
++ gdk_window_set_events (gdkwindow, gdk_window_get_events (gdkwindow) | GDK_PROPERTY_CHANGE_MASK);
++}
++
++static void
++cc_rr_labeler_set_property (GObject *gobject, guint property_id, const GValue *value, GParamSpec *param_spec)
++{
++ CcRRLabeler *self = CC_RR_LABELER (gobject);
++
++ switch (property_id) {
++ case PROP_CONFIG:
++ self->priv->config = GNOME_RR_CONFIG (g_value_dup_object (value));
++ return;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, param_spec);
++ }
++}
++
++static GObject *
++cc_rr_labeler_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties)
++{
++ CcRRLabeler *self = (CcRRLabeler*) G_OBJECT_CLASS (cc_rr_labeler_parent_class)->constructor (type, n_construct_properties, construct_properties);
++
++ setup_from_config (self);
++
++ return (GObject*) self;
++}
++
++static void
++cc_rr_labeler_class_init (CcRRLabelerClass *klass)
++{
++ GObjectClass *object_class;
++
++ g_type_class_add_private (klass, sizeof (CcRRLabelerPrivate));
++
++ object_class = (GObjectClass *) klass;
++
++ object_class->set_property = cc_rr_labeler_set_property;
++ object_class->finalize = cc_rr_labeler_finalize;
++ object_class->constructor = cc_rr_labeler_constructor;
++
++ g_object_class_install_property (object_class, PROP_CONFIG, g_param_spec_object ("config",
++ "Configuration",
++ "RandR configuration to label",
++ GNOME_TYPE_RR_CONFIG,
++ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
++ G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
++}
++
++static void
++cc_rr_labeler_finalize (GObject *object)
++{
++ CcRRLabeler *labeler;
++ GdkWindow *gdkwindow;
++
++ labeler = CC_RR_LABELER (object);
++
++ gdkwindow = gdk_screen_get_root_window (labeler->priv->screen);
++ gdk_window_remove_filter (gdkwindow, (GdkFilterFunc) screen_xevent_filter, labeler);
++
++ if (labeler->priv->config != NULL) {
++ g_object_unref (labeler->priv->config);
++ }
++
++ if (labeler->priv->windows != NULL) {
++ cc_rr_labeler_hide (labeler);
++ g_free (labeler->priv->windows);
++ }
++
++ g_free (labeler->priv->palette);
++
++ G_OBJECT_CLASS (cc_rr_labeler_parent_class)->finalize (object);
++}
++
++static int
++count_outputs (GnomeRRConfig *config)
++{
++ int i;
++ GnomeRROutputInfo **outputs = gnome_rr_config_get_outputs (config);
++
++ for (i = 0; outputs[i] != NULL; i++)
++ ;
++
++ return i;
++}
++
++static void
++make_palette (CcRRLabeler *labeler)
++{
++ /* The idea is that we go around an hue color wheel. We want to start
++ * at red, go around to green/etc. and stop at blue --- because magenta
++ * is evil. Eeeeek, no magenta, please!
++ *
++ * Purple would be nice, though. Remember that we are watered down
++ * (i.e. low saturation), so that would be like Like berries with cream.
++ * Mmmmm, berries.
++ */
++ double start_hue;
++ double end_hue;
++ int i;
++
++ g_assert (labeler->priv->num_outputs > 0);
++
++ labeler->priv->palette = g_new (GdkRGBA, labeler->priv->num_outputs);
++
++ start_hue = 0.0; /* red */
++ end_hue = 2.0/3; /* blue */
++
++ for (i = 0; i < labeler->priv->num_outputs; i++) {
++ double h, s, v;
++ double r, g, b;
++
++ h = start_hue + (end_hue - start_hue) / labeler->priv->num_outputs * i;
++ s = 1.0 / 3;
++ v = 1.0;
++
++ gtk_hsv_to_rgb (h, s, v, &r, &g, &b);
++
++ labeler->priv->palette[i].red = r;
++ labeler->priv->palette[i].green = g;
++ labeler->priv->palette[i].blue = b;
++ labeler->priv->palette[i].alpha = 1.0;
++ }
++}
++
++static void
++rounded_rectangle (cairo_t *cr,
++ gint x,
++ gint y,
++ gint width,
++ gint height,
++ gint x_radius,
++ gint y_radius)
++{
++ gint x1, x2;
++ gint y1, y2;
++ gint xr1, xr2;
++ gint yr1, yr2;
++
++ x1 = x;
++ x2 = x1 + width;
++ y1 = y;
++ y2 = y1 + height;
++
++ x_radius = MIN (x_radius, width / 2.0);
++ y_radius = MIN (y_radius, width / 2.0);
++
++ xr1 = x_radius;
++ xr2 = x_radius / 2.0;
++ yr1 = y_radius;
++ yr2 = y_radius / 2.0;
++
++ cairo_move_to (cr, x1 + xr1, y1);
++ cairo_line_to (cr, x2 - xr1, y1);
++ cairo_curve_to (cr, x2 - xr2, y1, x2, y1 + yr2, x2, y1 + yr1);
++ cairo_line_to (cr, x2, y2 - yr1);
++ cairo_curve_to (cr, x2, y2 - yr2, x2 - xr2, y2, x2 - xr1, y2);
++ cairo_line_to (cr, x1 + xr1, y2);
++ cairo_curve_to (cr, x1 + xr2, y2, x1, y2 - yr2, x1, y2 - yr1);
++ cairo_line_to (cr, x1, y1 + yr1);
++ cairo_curve_to (cr, x1, y1 + yr2, x1 + xr2, y1, x1 + xr1, y1);
++ cairo_close_path (cr);
++}
++
++#define LABEL_WINDOW_EDGE_THICKNESS 2
++#define LABEL_WINDOW_PADDING 12
++/* Look for panel-corner in:
++ * http://git.gnome.org/browse/gnome-shell/tree/data/theme/gnome-shell.css
++ * to match the corner radius */
++#define LABEL_CORNER_RADIUS 6 + LABEL_WINDOW_EDGE_THICKNESS
++
++static void
++label_draw_background_and_frame (GtkWidget *widget, cairo_t *cr, gboolean for_shape)
++{
++ GdkRGBA shape_color = { 0, 0, 0, 1 };
++ GdkRGBA *rgba;
++ GtkAllocation allocation;
++
++ rgba = g_object_get_data (G_OBJECT (widget), "rgba");
++ gtk_widget_get_allocation (widget, &allocation);
++
++ cairo_save (cr);
++ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
++
++ /* edge outline */
++ if (for_shape)
++ gdk_cairo_set_source_rgba (cr, &shape_color);
++ else
++ cairo_set_source_rgba (cr, 0, 0, 0, 0.5);
++
++ rounded_rectangle (cr,
++ LABEL_WINDOW_EDGE_THICKNESS / 2.0,
++ LABEL_WINDOW_EDGE_THICKNESS / 2.0,
++ allocation.width - LABEL_WINDOW_EDGE_THICKNESS,
++ allocation.height - LABEL_WINDOW_EDGE_THICKNESS,
++ LABEL_CORNER_RADIUS, LABEL_CORNER_RADIUS);
++ cairo_set_line_width (cr, LABEL_WINDOW_EDGE_THICKNESS);
++ cairo_stroke (cr);
++
++ /* fill */
++ if (for_shape) {
++ gdk_cairo_set_source_rgba (cr, &shape_color);
++ } else {
++ rgba->alpha = 0.75;
++ gdk_cairo_set_source_rgba (cr, rgba);
++ }
++
++ rounded_rectangle (cr,
++ LABEL_WINDOW_EDGE_THICKNESS,
++ LABEL_WINDOW_EDGE_THICKNESS,
++ allocation.width - LABEL_WINDOW_EDGE_THICKNESS * 2,
++ allocation.height - LABEL_WINDOW_EDGE_THICKNESS * 2,
++ LABEL_CORNER_RADIUS - LABEL_WINDOW_EDGE_THICKNESS / 2.0,
++ LABEL_CORNER_RADIUS - LABEL_WINDOW_EDGE_THICKNESS / 2.0);
++ cairo_fill (cr);
++
++ cairo_restore (cr);
++}
++
++static void
++maybe_update_shape (GtkWidget *widget)
++{
++ cairo_t *cr;
++ cairo_surface_t *surface;
++ cairo_region_t *region;
++
++ /* fallback to XShape only for non-composited clients */
++ if (gtk_widget_is_composited (widget)) {
++ gtk_widget_shape_combine_region (widget, NULL);
++ return;
++ }
++
++ surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
++ CAIRO_CONTENT_COLOR_ALPHA,
++ gtk_widget_get_allocated_width (widget),
++ gtk_widget_get_allocated_height (widget));
++
++ cr = cairo_create (surface);
++ label_draw_background_and_frame (widget, cr, TRUE);
++ cairo_destroy (cr);
++
++ region = gdk_cairo_region_create_from_surface (surface);
++ gtk_widget_shape_combine_region (widget, region);
++
++ cairo_surface_destroy (surface);
++ cairo_region_destroy (region);
++}
++
++static gboolean
++label_window_draw_event_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
++{
++ if (gtk_widget_is_composited (widget)) {
++ /* clear any content */
++ cairo_save (cr);
++ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
++ cairo_set_source_rgba (cr, 0, 0, 0, 0);
++ cairo_paint (cr);
++ cairo_restore (cr);
++ }
++
++ maybe_update_shape (widget);
++ label_draw_background_and_frame (widget, cr, FALSE);
++
++ return FALSE;
++}
++
++static void
++position_window (CcRRLabeler *labeler,
++ GtkWidget *window,
++ int x,
++ int y)
++{
++ GdkRectangle workarea;
++ GdkRectangle monitor;
++ int monitor_num;
++
++ monitor_num = gdk_screen_get_monitor_at_point (labeler->priv->screen, x, y);
++ gdk_screen_get_monitor_workarea (labeler->priv->screen, monitor_num, &workarea);
++ gdk_screen_get_monitor_geometry (labeler->priv->screen,
++ monitor_num,
++ &monitor);
++ gdk_rectangle_intersect (&monitor, &workarea, &workarea);
++
++ gtk_window_move (GTK_WINDOW (window), workarea.x, workarea.y);
++}
++
++static void
++label_window_realize_cb (GtkWidget *widget)
++{
++ cairo_region_t *region;
++
++ /* make the whole window ignore events */
++ region = cairo_region_create ();
++ gtk_widget_input_shape_combine_region (widget, region);
++ cairo_region_destroy (region);
++
++ maybe_update_shape (widget);
++}
++
++static void
++label_window_composited_changed_cb (GtkWidget *widget, CcRRLabeler *labeler)
++{
++ if (gtk_widget_get_realized (widget))
++ maybe_update_shape (widget);
++}
++
++static GtkWidget *
++create_label_window (CcRRLabeler *labeler, GnomeRROutputInfo *output, GdkRGBA *rgba)
++{
++ GtkWidget *window;
++ GtkWidget *widget;
++ char *str;
++ const char *display_name;
++ GdkRGBA black = { 0, 0, 0, 1.0 };
++ int x, y;
++ GdkScreen *screen;
++ GdkVisual *visual;
++
++ window = gtk_window_new (GTK_WINDOW_POPUP);
++ gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_TOOLTIP);
++ gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
++ gtk_widget_set_app_paintable (window, TRUE);
++ screen = gtk_widget_get_screen (window);
++ visual = gdk_screen_get_rgba_visual (screen);
++
++ if (visual != NULL)
++ gtk_widget_set_visual (window, visual);
++
++ gtk_container_set_border_width (GTK_CONTAINER (window), LABEL_WINDOW_PADDING + LABEL_WINDOW_EDGE_THICKNESS);
++
++ /* This is semi-dangerous. The color is part of the labeler->palette
++ * array. Note that in cc_rr_labeler_finalize(), we are careful to
++ * free the palette only after we free the windows.
++ */
++ g_object_set_data (G_OBJECT (window), "rgba", rgba);
++
++ g_signal_connect (window, "draw",
++ G_CALLBACK (label_window_draw_event_cb), labeler);
++ g_signal_connect (window, "realize",
++ G_CALLBACK (label_window_realize_cb), labeler);
++ g_signal_connect (window, "composited-changed",
++ G_CALLBACK (label_window_composited_changed_cb), labeler);
++
++ if (gnome_rr_config_get_clone (labeler->priv->config)) {
++ /* Keep this string in sync with gnome-control-center/capplets/display/xrandr-capplet.c:get_display_name() */
++
++ /* Translators: this is the feature where what you see on your
++ * laptop's screen is the same as your external projector.
++ * Here, "Mirrored" is being used as an adjective. For example,
++ * the Spanish translation could be "Pantallas en Espejo".
++ */
++ display_name = _("Mirrored Displays");
++ } else
++ display_name = gnome_rr_output_info_get_display_name (output);
++
++ str = g_strdup_printf ("<b>%s</b>", display_name);
++ widget = gtk_label_new (NULL);
++ gtk_label_set_markup (GTK_LABEL (widget), str);
++ g_free (str);
++
++ /* Make the label explicitly black. We don't want it to follow the
++ * theme's colors, since the label is always shown against a light
++ * pastel background. See bgo#556050
++ */
++ gtk_widget_override_color (widget,
++ gtk_widget_get_state_flags (widget),
++ &black);
++
++ gtk_container_add (GTK_CONTAINER (window), widget);
++
++ /* Should we center this at the top edge of the monitor, instead of using the upper-left corner? */
++ gnome_rr_output_info_get_geometry (output, &x, &y, NULL, NULL);
++ position_window (labeler, window, x, y);
++
++ gtk_widget_show_all (window);
++
++ return window;
++}
++
++static void
++setup_from_config (CcRRLabeler *labeler)
++{
++ labeler->priv->num_outputs = count_outputs (labeler->priv->config);
++
++ make_palette (labeler);
++
++ cc_rr_labeler_show (labeler);
++}
++
++/**
++ * cc_rr_labeler_new:
++ * @config: Configuration of the screens to label
++ *
++ * Create a GUI element that will display colored labels on each connected monitor.
++ * This is useful when users are required to identify which monitor is which, e.g. for
++ * for configuring multiple monitors.
++ * The labels will be shown by default, use cc_rr_labeler_hide to hide them.
++ *
++ * Returns: A new #CcRRLabeler
++ */
++CcRRLabeler *
++cc_rr_labeler_new (GnomeRRConfig *config)
++{
++ g_return_val_if_fail (GNOME_IS_RR_CONFIG (config), NULL);
++
++ return g_object_new (GNOME_TYPE_RR_LABELER, "config", config, NULL);
++}
++
++/**
++ * cc_rr_labeler_show:
++ * @labeler: A #CcRRLabeler
++ *
++ * Show the labels.
++ */
++void
++cc_rr_labeler_show (CcRRLabeler *labeler)
++{
++ int i;
++ gboolean created_window_for_clone;
++ GnomeRROutputInfo **outputs;
++
++ g_return_if_fail (GNOME_IS_RR_LABELER (labeler));
++
++ if (labeler->priv->windows != NULL)
++ return;
++
++ labeler->priv->windows = g_new (GtkWidget *, labeler->priv->num_outputs);
++
++ created_window_for_clone = FALSE;
++
++ outputs = gnome_rr_config_get_outputs (labeler->priv->config);
++
++ for (i = 0; i < labeler->priv->num_outputs; i++) {
++ if (!created_window_for_clone && gnome_rr_output_info_is_active (outputs[i])) {
++ labeler->priv->windows[i] = create_label_window (labeler, outputs[i], labeler->priv->palette + i);
++
++ if (gnome_rr_config_get_clone (labeler->priv->config))
++ created_window_for_clone = TRUE;
++ } else
++ labeler->priv->windows[i] = NULL;
++ }
++}
++
++/**
++ * cc_rr_labeler_hide:
++ * @labeler: A #CcRRLabeler
++ *
++ * Hide ouput labels.
++ */
++void
++cc_rr_labeler_hide (CcRRLabeler *labeler)
++{
++ int i;
++ CcRRLabelerPrivate *priv;
++
++ g_return_if_fail (GNOME_IS_RR_LABELER (labeler));
++
++ priv = labeler->priv;
++
++ if (priv->windows == NULL)
++ return;
++
++ for (i = 0; i < priv->num_outputs; i++)
++ if (priv->windows[i] != NULL) {
++ gtk_widget_destroy (priv->windows[i]);
++ priv->windows[i] = NULL;
++ }
++ g_free (priv->windows);
++ priv->windows = NULL;
++}
++
++/**
++ * cc_rr_labeler_get_rgba_for_output:
++ * @labeler: A #CcRRLabeler
++ * @output: Output device (i.e. monitor) to query
++ * @rgba_out: (out): Color of selected monitor.
++ *
++ * Get the color used for the label on a given output (monitor).
++ */
++void
++cc_rr_labeler_get_rgba_for_output (CcRRLabeler *labeler, GnomeRROutputInfo *output, GdkRGBA *rgba_out)
++{
++ int i;
++ GnomeRROutputInfo **outputs;
++
++ g_return_if_fail (GNOME_IS_RR_LABELER (labeler));
++ g_return_if_fail (GNOME_IS_RR_OUTPUT_INFO (output));
++ g_return_if_fail (rgba_out != NULL);
++
++ outputs = gnome_rr_config_get_outputs (labeler->priv->config);
++
++ for (i = 0; i < labeler->priv->num_outputs; i++)
++ if (outputs[i] == output) {
++ *rgba_out = labeler->priv->palette[i];
++ return;
++ }
++
++ g_warning ("trying to get the color for unknown GnomeOutputInfo %p; returning magenta!", output);
++
++ rgba_out->red = 1.0;
++ rgba_out->green = 0;
++ rgba_out->blue = 1.0;
++ rgba_out->alpha = 1.0;
++}
+diff -Naur cinnamon-control-center-1.7.3.orig/panels/display/cc-rr-labeler.h cinnamon-control-center-1.7.3/panels/display/cc-rr-labeler.h
+--- cinnamon-control-center-1.7.3.orig/panels/display/cc-rr-labeler.h 1970-01-01 01:00:00.000000000 +0100
++++ cinnamon-control-center-1.7.3/panels/display/cc-rr-labeler.h 2013-04-22 03:42:12.383233540 +0200
+@@ -0,0 +1,64 @@
++/* gnome-rr-labeler.h - Utility to label monitors to identify them
++ * while they are being configured.
++ *
++ * Copyright 2008, Novell, Inc.
++ *
++ * This file is part of the Gnome Library.
++ *
++ * The Gnome Library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * The Gnome 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
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with the Gnome Library; see the file COPYING.LIB. If not,
++ * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ *
++ * Author: Federico Mena-Quintero <federico@novell.com>
++ */
++
++#ifndef CC_RR_LABELER_H
++#define CC_RR_LABELER_H
++
++#define GNOME_DESKTOP_USE_UNSTABLE_API
++#include <libgnome-desktop/gnome-rr-config.h>
++
++#define GNOME_TYPE_RR_LABELER (cc_rr_labeler_get_type ())
++#define CC_RR_LABELER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_RR_LABELER, CcRRLabeler))
++#define CC_RR_LABELER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_RR_LABELER, CcRRLabelerClass))
++#define GNOME_IS_RR_LABELER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_RR_LABELER))
++#define GNOME_IS_RR_LABELER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_RR_LABELER))
++#define CC_RR_LABELER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_RR_LABELER, CcRRLabelerClass))
++
++typedef struct _CcRRLabeler CcRRLabeler;
++typedef struct _CcRRLabelerClass CcRRLabelerClass;
++typedef struct _CcRRLabelerPrivate CcRRLabelerPrivate;
++
++struct _CcRRLabeler {
++ GObject parent;
++
++ /*< private >*/
++ CcRRLabelerPrivate *priv;
++};
++
++struct _CcRRLabelerClass {
++ GObjectClass parent_class;
++};
++
++GType cc_rr_labeler_get_type (void);
++
++CcRRLabeler *cc_rr_labeler_new (GnomeRRConfig *config);
++
++void cc_rr_labeler_show (CcRRLabeler *labeler);
++
++void cc_rr_labeler_hide (CcRRLabeler *labeler);
++
++void cc_rr_labeler_get_rgba_for_output (CcRRLabeler *labeler, GnomeRROutputInfo *output, GdkRGBA *rgba_out);
++
++#endif
+diff -Naur cinnamon-control-center-1.7.3.orig/panels/display/Makefile.am cinnamon-control-center-1.7.3/panels/display/Makefile.am
+--- cinnamon-control-center-1.7.3.orig/panels/display/Makefile.am 2013-04-15 16:04:38.000000000 +0200
++++ cinnamon-control-center-1.7.3/panels/display/Makefile.am 2013-04-22 03:42:12.376566715 +0200
+@@ -19,6 +19,8 @@
+ display-module.c \
+ cc-display-panel.c \
+ cc-display-panel.h \
++ cc-rr-labeler.c \
++ cc-rr-labeler.h \
+ scrollarea.c \
+ scrollarea.h \
+ $(MARSHALFILES)
diff --git a/community/cinnamon-control-center/idle-delay.patch b/community/cinnamon-control-center/idle-delay.patch
new file mode 100644
index 000000000..7434018f5
--- /dev/null
+++ b/community/cinnamon-control-center/idle-delay.patch
@@ -0,0 +1,71 @@
+diff -Naur cinnamon-control-center-1.7.3.orig/panels/power/cc-power-panel.c cinnamon-control-center-1.7.3/panels/power/cc-power-panel.c
+--- cinnamon-control-center-1.7.3.orig/panels/power/cc-power-panel.c 2013-04-15 16:04:38.000000000 +0200
++++ cinnamon-control-center-1.7.3/panels/power/cc-power-panel.c 2013-04-22 05:04:26.466092668 +0200
+@@ -1068,26 +1068,6 @@
+ G_CALLBACK (combo_enum_changed_cb),
+ self);
+
+- value = g_settings_get_enum (self->priv->gsd_settings, "lid-close-ac-action");
+- widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
+- "combobox_lid_ac"));
+- disable_unavailable_combo_items (self, GTK_COMBO_BOX (widget));
+- set_value_for_combo (GTK_COMBO_BOX (widget), value);
+- g_object_set_data (G_OBJECT(widget), "_gsettings_key", "lid-close-ac-action");
+- g_signal_connect (widget, "changed",
+- G_CALLBACK (combo_enum_changed_cb),
+- self);
+-
+- value = g_settings_get_enum (self->priv->gsd_settings, "lid-close-battery-action");
+- widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
+- "combobox_lid_battery"));
+- disable_unavailable_combo_items (self, GTK_COMBO_BOX (widget));
+- set_value_for_combo (GTK_COMBO_BOX (widget), value);
+- g_object_set_data (G_OBJECT(widget), "_gsettings_key", "lid-close-battery-action");
+- g_signal_connect (widget, "changed",
+- G_CALLBACK (combo_enum_changed_cb),
+- self);
+-
+ widget = WID (self->priv->builder, "vbox_power");
+ gtk_widget_reparent (widget, (GtkWidget *) self);
+
+diff -Naur cinnamon-control-center-1.7.3.orig/panels/screen/cc-screen-panel.c cinnamon-control-center-1.7.3/panels/screen/cc-screen-panel.c
+--- cinnamon-control-center-1.7.3.orig/panels/screen/cc-screen-panel.c 2013-04-15 16:04:38.000000000 +0200
++++ cinnamon-control-center-1.7.3/panels/screen/cc-screen-panel.c 2013-04-22 14:15:28.440488342 +0200
+@@ -351,10 +351,6 @@
+ 1, &value,
+ -1);
+
+- /* set both battery and ac keys */
+- g_settings_set_int (self->priv->gsd_settings, "sleep-display-ac", value);
+- g_settings_set_int (self->priv->gsd_settings, "sleep-display-battery", value);
+-
+ set_idle_delay_from_dpms (self, value);
+ }
+
+@@ -384,7 +380,7 @@
+ {
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+- gint value;
++ guint value;
+ gint value_tmp, value_prev;
+ gboolean ret;
+ guint i;
+@@ -399,7 +395,7 @@
+ i = 0;
+
+ /* try to make the UI match the AC setting */
+- value = g_settings_get_int (self->priv->gsd_settings, "sleep-display-ac");
++ g_settings_get (self->priv->session_settings, "idle-delay", "u", &value);
+ do
+ {
+ gtk_tree_model_get (model, &iter,
+@@ -510,7 +506,7 @@
+ /* bind the auto dim checkbox */
+ widget = WID ("screen_auto_reduce_checkbutton");
+ g_settings_bind (self->priv->gsd_settings,
+- "idle-dim-battery",
++ "idle-dim",
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
+
diff --git a/community/cinnamon-screensaver/PKGBUILD b/community/cinnamon-screensaver/PKGBUILD
index ae1e35a1e..6b80d2ca0 100644
--- a/community/cinnamon-screensaver/PKGBUILD
+++ b/community/cinnamon-screensaver/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=cinnamon-screensaver
pkgver=1.7.1
-pkgrel=5
+pkgrel=6
pkgdesc="Screensaver designed to integrate well with the Cinnamon desktop."
arch=('i686' 'x86_64')
license=('GPL')
@@ -18,26 +18,19 @@ source=($pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-screensav
cinnamon-screensaver.desktop
cinnamon2d-screensaver.desktop
cinnamon-screensaver.pam
- gnome-autogen.sh
configure.patch
fix-dbus-compatibility.patch)
-
sha256sums=('055abbc24305dad5efa609b354e01fdc367792ccac5383df4b28090ab0bf64e1'
'2f29a72991deb5cc2b44da06f49d1115148fee6a0a22b1abfecee1c1661abcaa'
'335df8f2fb270484829d94995622521f0a42a12d6887f7de827db34fc81f583a'
- '99457b683c2e766a8c09a75ca906e3e00db6d294bb204a2e7a2a05c2e6b1d77e'
- '827276b01e658afb8045fb0dcbebb54f679ef47dac482f4399e1839369277ccc'
+ 'b6ea9e2eb586d94bcabb617a8f1c2958111df87afdbb51f645882bccdc15cbda'
'fed5f1f94404fab13c5369f4106b0b498cff2bb71351cae4f3d9c27f417f5e6a'
- '9013004395a401e99ce6685abb8319eb1e9ddd888c4fa6a7e45729fb93d285d1')
+ '50fa77bafc666f1aa32945a6d06d4e7c5e50bce1d98738de74075fb634cf6197')
build() {
cd $pkgname-$pkgver
- cp ${srcdir}/gnome-autogen.sh .
- sed -i 's/\ --warn-all\ --warn-error//' src/Makefile.am
- sed -i 's/gnome-autogen.sh/.\/gnome-autogen.sh/g' autogen.sh
- chmod +x gnome-autogen.sh
-
+ # Fix build with automake 1.13
patch -uNp2 -r- -i ${srcdir}/configure.patch
# Fix compatibility with gnome-screensaver's D-Bus interface and various fixes
@@ -47,7 +40,6 @@ build() {
--libexecdir=/usr/lib/cinnamon-screensaver \
--localstatedir=/var \
--with-mit-ext --with-systemd
-
make
}
diff --git a/community/cinnamon-screensaver/cinnamon-screensaver.pam b/community/cinnamon-screensaver/cinnamon-screensaver.pam
index fd8d42d03..8d3baf085 100644
--- a/community/cinnamon-screensaver/cinnamon-screensaver.pam
+++ b/community/cinnamon-screensaver/cinnamon-screensaver.pam
@@ -1,3 +1,3 @@
#%PAM-1.0
-auth required pam_unix_auth.so nullok
+auth substack system-login
-auth optional pam_gnome_keyring.so
diff --git a/community/cinnamon-screensaver/fix-dbus-compatibility.patch b/community/cinnamon-screensaver/fix-dbus-compatibility.patch
index fa53f6fac..d4c27a0b1 100644
--- a/community/cinnamon-screensaver/fix-dbus-compatibility.patch
+++ b/community/cinnamon-screensaver/fix-dbus-compatibility.patch
@@ -1,8 +1,20 @@
+From e43385126cf6f5187f98f940b8c04c3e99202b0b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
+Date: Thu, 28 Feb 2013 05:45:12 +0100
+Subject: [PATCH 1/4] Fix crashing and compatibility with gnome-screensaver's
+ D-Bus interface
+
+---
+ src/cinnamon-screensaver-command.c | 4 ++--
+ src/gs-listener-dbus.c | 10 ++++++++--
+ src/gs-manager.c | 14 +++++++++++---
+ 3 files changed, 21 insertions(+), 7 deletions(-)
+
diff --git a/src/cinnamon-screensaver-command.c b/src/cinnamon-screensaver-command.c
index 4267bd0..5c90916 100644
--- a/src/cinnamon-screensaver-command.c
+++ b/src/cinnamon-screensaver-command.c
-@@ -311,11 +311,11 @@ do_command (GDBusConnection *connection)
+@@ -311,11 +311,11 @@
if (do_lock) {
if (g_strcmp0 (away_message, "DEFAULT") == 0) {
@@ -20,7 +32,7 @@ diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index 2a98aee..6dbf12d 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
-@@ -653,6 +653,8 @@ do_introspect (DBusConnection *connection,
+@@ -653,6 +653,8 @@ enum {
xml = g_string_append (xml,
" <interface name=\""GS_INTERFACE"\">\n"
" <method name=\"Lock\">\n"
@@ -29,7 +41,7 @@ index 2a98aee..6dbf12d 100644
" <arg name=\"body\" direction=\"in\" type=\"s\"/>\n"
" </method>\n"
" <method name=\"SimulateUserActivity\">\n"
-@@ -744,6 +746,10 @@ listener_dbus_handle_session_message (DBusConnection *connection,
+@@ -744,6 +746,10 @@ enum {
g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
if (dbus_message_is_method_call (message, GS_SERVICE, "Lock")) {
@@ -40,7 +52,7 @@ index 2a98aee..6dbf12d 100644
return listener_lock (listener, connection, message);
}
if (dbus_message_is_method_call (message, GS_SERVICE, "Quit")) {
-@@ -906,7 +912,7 @@ listener_dbus_handle_system_message (DBusConnection *connection,
+@@ -906,7 +912,7 @@ enum {
} else if (dbus_message_is_signal (message, SYSTEMD_LOGIND_SESSION_INTERFACE, "Lock")) {
if (_listener_message_path_is_our_session (listener, message)) {
gs_debug ("systemd requested session lock");
@@ -49,7 +61,7 @@ index 2a98aee..6dbf12d 100644
}
return DBUS_HANDLER_RESULT_HANDLED;
-@@ -948,7 +954,7 @@ listener_dbus_handle_system_message (DBusConnection *connection,
+@@ -948,7 +954,7 @@ enum {
} else if (dbus_message_is_signal (message, CK_SESSION_INTERFACE, "Lock")) {
if (_listener_message_path_is_our_session (listener, message)) {
gs_debug ("ConsoleKit requested session lock");
@@ -62,7 +74,7 @@ diff --git a/src/gs-manager.c b/src/gs-manager.c
index 1544921..bc09cb9 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
-@@ -1275,10 +1275,18 @@ void
+@@ -1275,10 +1275,18 @@ enum {
gs_manager_set_away_message (GSManager *manager,
const char *message)
{
@@ -84,3 +96,224 @@ index 1544921..bc09cb9 100644
for (l = manager->priv->windows; l; l = l->next) {
gs_window_set_away_message (l->data, manager->priv->away_message);
}
+--
+1.8.1.6
+
+
+From 4db01451afbb246213f483805f81a77c4c7371a3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
+Date: Fri, 1 Mar 2013 05:17:46 +0100
+Subject: [PATCH 2/4] Update dbus document with the new LockMessage method
+
+---
+ doc/dbus-interface.html | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/doc/dbus-interface.html b/doc/dbus-interface.html
+index faff26c..c9f95ba 100644
+--- a/doc/dbus-interface.html
++++ b/doc/dbus-interface.html
+@@ -2,6 +2,8 @@
+ <code class="email">&lt;<a class="email" href="mailto:mccann@jhu.edu">mccann@jhu.edu</a>&gt;</code><br>
+ </p></div></div></div></div></div><div><p class="releaseinfo">Version 1.7.1</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#dbus-interface">1. DBUS Interface</a></span></dt><dd><dl><dt><span class="sect1"><a href="#gs-intro">Introduction</a></span></dt><dt><span class="sect1"><a href="#gs-methods">Methods</a></span></dt><dd><dl><dt><span class="sect2"><a href="#gs-method-Lock">
+ <code class="literal">Lock</code>
++ </a></span></dt><dt><span class="sect2"><a href="#gs-method-LockMessage">
++ <code class="literal">LockMessage</code>
+ </a></span></dt><dt><span class="sect2"><a href="#gs-method-Cycle">
+ <code class="literal">Cycle</code>
+ </a></span></dt><dt><span class="sect2"><a href="#gs-method-SimulateUserActivity">
+@@ -30,6 +32,8 @@
+ <code class="literal">AuthenticationRequestEnd</code>
+ </a></span></dt></dl></dd><dt><span class="sect1"><a href="#gs-examples">Examples</a></span></dt></dl></dd></dl></div><div class="chapter" title="Chapter1.DBUS Interface"><div class="titlepage"><div><div><h2 class="title"><a name="dbus-interface"></a>Chapter1.DBUS Interface</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#gs-intro">Introduction</a></span></dt><dt><span class="sect1"><a href="#gs-methods">Methods</a></span></dt><dd><dl><dt><span class="sect2"><a href="#gs-method-Lock">
+ <code class="literal">Lock</code>
++ </a></span></dt><dt><span class="sect2"><a href="#gs-method-LockMessage">
++ <code class="literal">LockMessage</code>
+ </a></span></dt><dt><span class="sect2"><a href="#gs-method-Cycle">
+ <code class="literal">Cycle</code>
+ </a></span></dt><dt><span class="sect2"><a href="#gs-method-SimulateUserActivity">
+@@ -70,7 +74,11 @@
+ <code class="literal">Lock</code>
+ </h3></div></div></div><p>
+ Request that the screen be locked.
+- </p></div><div class="sect2" title="Cycle"><div class="titlepage"><div><div><h3 class="title"><a name="gs-method-Cycle"></a>
++ </p></div><div class="sect2" title="LockMessage"><div class="titlepage"><div><div><h3 class="title"><a name="gs-method-LockMessage"></a>
++ <code class="literal">LockMessage</code>
++ </h3></div></div></div><p>
++ Request that the screen be locked, and set an away message.
++ </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Direction</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>in</td><td>string</td><td>the away message</td></tr></tbody></table></div></div><div class="sect2" title="Cycle"><div class="titlepage"><div><div><h3 class="title"><a name="gs-method-Cycle"></a>
+ <code class="literal">Cycle</code>
+ </h3></div></div></div><p>
+ Request that the screen saver theme be restarted and, if applicable,
+--
+1.8.1.6
+
+
+From 7141e8ce04921ab6d46648cba20c691b8d8f8e0b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
+Date: Sat, 2 Mar 2013 08:11:45 +0100
+Subject: [PATCH 3/4] Revert "Fixed away_message shown as "(null)" (using a
+ prefix to explicitly mark custom away messages)"
+
+This reverts commit bf1f42b9f9a673091b0f7bf1118781b2d95c88fd.
+---
+ src/cinnamon-screensaver-command.c | 9 +-------
+ src/gs-window-x11.c | 43 ++++++++++++--------------------------
+ 2 files changed, 14 insertions(+), 38 deletions(-)
+
+diff --git a/src/cinnamon-screensaver-command.c b/src/cinnamon-screensaver-command.c
+index 5c90916..dbcac8a 100644
+--- a/src/cinnamon-screensaver-command.c
++++ b/src/cinnamon-screensaver-command.c
+@@ -310,14 +310,7 @@
+ }
+
+ if (do_lock) {
+- if (g_strcmp0 (away_message, "DEFAULT") == 0) {
+- reply = screensaver_send_message_string (connection, "LockMessage", away_message);
+- }
+- else {
+- gchar * custom_message = g_strdup_printf("CUSTOM###%s", away_message);
+- reply = screensaver_send_message_string (connection, "LockMessage", custom_message);
+- g_free (custom_message);
+- }
++ reply = screensaver_send_message_string (connection, "LockMessage", away_message);
+ if (reply == NULL) {
+ g_message ("Did not receive a reply from the screensaver.");
+ goto done;
+diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
+index 6858509..0e3bb6f 100644
+--- a/src/gs-window-x11.c
++++ b/src/gs-window-x11.c
+@@ -2132,38 +2132,21 @@ enum {
+ return utf8_name;
+ }
+
+-static gchar *
+-str_replace(const char *string, const char *delimiter, const char *replacement)
+-{
+- gchar **split;
+- gchar *ret;
+- g_return_val_if_fail(string != NULL, NULL);
+- g_return_val_if_fail(delimiter != NULL, NULL);
+- g_return_val_if_fail(replacement != NULL, NULL);
+- split = g_strsplit(string, delimiter, 0);
+- ret = g_strjoinv(replacement, split);
+- g_strfreev(split);
+- return ret;
+-}
+-
+ static void
+ update_clock (GSWindow *window)
+-{
+- char *markup;
+- char *away_message;
+-
+- if (window->priv->away_message != NULL && g_str_has_prefix (window->priv->away_message, "CUSTOM###") && g_strcmp0(window->priv->away_message, "") != 0) {
+- away_message = str_replace(window->priv->away_message, "CUSTOM###", "");
+- away_message = g_strdup_printf (_("%s: \"%s\""), get_user_display_name(), away_message);
+- }
+- else {
+- away_message = g_strdup_printf (_("%s"), window->priv->default_message);
+- }
+-
+- markup = g_strdup_printf ("%s\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#FFFFFF\">%s</span></b>", gnome_wall_clock_get_clock (window->priv->clock_tracker), away_message);
+- gtk_label_set_markup (GTK_LABEL (window->priv->clock), markup);
+- g_free (markup);
+- g_free (away_message);
++{
++ char *markup;
++ char *away_message;
++ if (g_strcmp0(window->priv->away_message, "DEFAULT") == 0 || g_strcmp0(window->priv->away_message, "") == 0) {
++ away_message = g_strdup_printf (_("%s"), window->priv->default_message);
++ }
++ else {
++ away_message = g_strdup_printf (_("%s: \"%s\""), get_user_display_name(), window->priv->away_message);
++ }
++ markup = g_strdup_printf ("%s\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#FFFFFF\">%s</span></b>", gnome_wall_clock_get_clock (window->priv->clock_tracker), away_message);
++ gtk_label_set_markup (GTK_LABEL (window->priv->clock), markup);
++ g_free (markup);
++ g_free (away_message);
+ }
+
+ static void
+--
+1.8.1.6
+
+
+From 1ed6a959746e115a7f33de2134921c6572185ebd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
+Date: Sat, 2 Mar 2013 08:13:04 +0100
+Subject: [PATCH 4/4] Simplify away message handling
+
+---
+ src/cinnamon-screensaver-command.c | 19 ++++++++++++-------
+ src/gs-window-x11.c | 7 +++----
+ 2 files changed, 15 insertions(+), 11 deletions(-)
+
+diff --git a/src/cinnamon-screensaver-command.c b/src/cinnamon-screensaver-command.c
+index dbcac8a..4836f81 100644
+--- a/src/cinnamon-screensaver-command.c
++++ b/src/cinnamon-screensaver-command.c
+@@ -41,7 +41,7 @@
+ static gboolean do_query = FALSE;
+ static gboolean do_time = FALSE;
+
+-static gchar *away_message = "DEFAULT";
++static gchar *away_message;
+
+ static GOptionEntry entries [] = {
+ { "exit", 0, 0, G_OPTION_ARG_NONE, &do_quit,
+@@ -114,7 +114,7 @@
+ static GDBusMessage *
+ screensaver_send_message_string (GDBusConnection *connection,
+ const char *name,
+- gboolean value)
++ gchar *value)
+ {
+ GDBusMessage *message, *reply;
+ GError *error;
+@@ -310,12 +310,17 @@
+ }
+
+ if (do_lock) {
+- reply = screensaver_send_message_string (connection, "LockMessage", away_message);
+- if (reply == NULL) {
+- g_message ("Did not receive a reply from the screensaver.");
+- goto done;
++ if (away_message) {
++ reply = screensaver_send_message_string (connection, "LockMessage", away_message);
++ if (reply == NULL) {
++ g_message ("Did not receive a reply from the screensaver.");
++ goto done;
++ }
++ g_object_unref (reply);
++ } else {
++ reply = screensaver_send_message_void (connection, "Lock", FALSE);
++ g_assert (reply == NULL);
+ }
+- g_object_unref (reply);
+ }
+
+ if (do_activate) {
+diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
+index 0e3bb6f..22f5471 100644
+--- a/src/gs-window-x11.c
++++ b/src/gs-window-x11.c
+@@ -2137,11 +2137,10 @@ enum {
+ {
+ char *markup;
+ char *away_message;
+- if (g_strcmp0(window->priv->away_message, "DEFAULT") == 0 || g_strcmp0(window->priv->away_message, "") == 0) {
+- away_message = g_strdup_printf (_("%s"), window->priv->default_message);
+- }
+- else {
++ if (window->priv->away_message && g_strcmp0(window->priv->away_message, "") != 0) {
+ away_message = g_strdup_printf (_("%s: \"%s\""), get_user_display_name(), window->priv->away_message);
++ } else {
++ away_message = g_strdup_printf (_("%s"), window->priv->default_message);
+ }
+ markup = g_strdup_printf ("%s\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#FFFFFF\">%s</span></b>", gnome_wall_clock_get_clock (window->priv->clock_tracker), away_message);
+ gtk_label_set_markup (GTK_LABEL (window->priv->clock), markup);
+--
+1.8.1.6
+
diff --git a/community/cinnamon-screensaver/gnome-autogen.sh b/community/cinnamon-screensaver/gnome-autogen.sh
deleted file mode 100644
index 2467a1de2..000000000
--- a/community/cinnamon-screensaver/gnome-autogen.sh
+++ /dev/null
@@ -1,538 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-#name of package
-test "$PKG_NAME" || PKG_NAME=Package
-test "$srcdir" || srcdir=.
-
-# default version requirements ...
-test "$REQUIRED_AUTOCONF_VERSION" || REQUIRED_AUTOCONF_VERSION=2.53
-test "$REQUIRED_AUTOMAKE_VERSION" || REQUIRED_AUTOMAKE_VERSION=1.9
-test "$REQUIRED_LIBTOOL_VERSION" || REQUIRED_LIBTOOL_VERSION=1.4.3
-test "$REQUIRED_GETTEXT_VERSION" || REQUIRED_GETTEXT_VERSION=0.10.40
-test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0
-test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.25
-test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0
-test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0
-test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=2.3.0
-test "$REQUIRED_GNOME_DOC_UTILS_VERSION" || REQUIRED_GNOME_DOC_UTILS_VERSION=0.4.2
-
-# a list of required m4 macros. Package can set an initial value
-test "$REQUIRED_M4MACROS" || REQUIRED_M4MACROS=
-test "$FORBIDDEN_M4MACROS" || FORBIDDEN_M4MACROS=
-
-# Not all echo versions allow -n, so we check what is possible. This test is
-# based on the one in autoconf.
-ECHO_C=
-ECHO_N=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ;;
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-# some terminal codes ...
-if tty < /dev/null 1>/dev/null 2>&1; then
- boldface="`tput bold 2>/dev/null`"
- normal="`tput sgr0 2>/dev/null`"
-else
- boldface=
- normal=
-fi
-printbold() {
- echo $ECHO_N "$boldface" $ECHO_C
- echo "$@"
- echo $ECHO_N "$normal" $ECHO_C
-}
-printerr() {
- echo "$@" >&2
-}
-
-# Usage:
-# compare_versions MIN_VERSION ACTUAL_VERSION
-# returns true if ACTUAL_VERSION >= MIN_VERSION
-compare_versions() {
- ch_min_version=$1
- ch_actual_version=$2
- ch_status=0
- IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
- set $ch_actual_version
- for ch_min in $ch_min_version; do
- ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
- if [ -z "$ch_min" ]; then break; fi
- if [ -z "$ch_cur" ]; then ch_status=1; break; fi
- if [ $ch_cur -gt $ch_min ]; then break; fi
- if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
- done
- IFS="$ch_save_IFS"
- return $ch_status
-}
-
-# Usage:
-# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE
-# checks to see if the package is available
-version_check() {
- vc_package=$1
- vc_variable=$2
- vc_checkprogs=$3
- vc_min_version=$4
- vc_source=$5
- vc_status=1
-
- vc_checkprog=`eval echo "\\$$vc_variable"`
- if [ -n "$vc_checkprog" ]; then
- printbold "using $vc_checkprog for $vc_package"
- return 0
- fi
-
- if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then
- vc_comparator="="
- else
- vc_comparator=">="
- fi
- printbold "checking for $vc_package $vc_comparator $vc_min_version..."
- for vc_checkprog in $vc_checkprogs; do
- echo $ECHO_N " testing $vc_checkprog... " $ECHO_C
- if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
- vc_actual_version=`$vc_checkprog --version | head -n 1 | \
- sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'`
- if compare_versions $vc_min_version $vc_actual_version; then
- echo "found $vc_actual_version"
- # set variables
- eval "$vc_variable=$vc_checkprog; \
- ${vc_variable}_VERSION=$vc_actual_version"
- vc_status=0
- break
- else
- echo "too old (found version $vc_actual_version)"
- fi
- else
- echo "not found."
- fi
- done
- if [ "$vc_status" != 0 ]; then
- printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed"
- printerr " to build $PKG_NAME. Download the appropriate package for"
- printerr " from your distribution or get the source tarball at"
- printerr " $vc_source"
- printerr
- exit $vc_status
- fi
- return $vc_status
-}
-
-# Usage:
-# require_m4macro filename.m4
-# adds filename.m4 to the list of required macros
-require_m4macro() {
- case "$REQUIRED_M4MACROS" in
- $1\ * | *\ $1\ * | *\ $1) ;;
- *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;;
- esac
-}
-
-forbid_m4macro() {
- case "$FORBIDDEN_M4MACROS" in
- $1\ * | *\ $1\ * | *\ $1) ;;
- *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;;
- esac
-}
-
-# Usage:
-# add_to_cm_macrodirs dirname
-# Adds the dir to $cm_macrodirs, if it's not there yet.
-add_to_cm_macrodirs() {
- case $cm_macrodirs in
- "$1 "* | *" $1 "* | *" $1") ;;
- *) cm_macrodirs="$cm_macrodirs $1";;
- esac
-}
-
-# Usage:
-# print_m4macros_error
-# Prints an error message saying that autoconf macros were misused
-print_m4macros_error() {
- printerr "***Error***: some autoconf macros required to build $PKG_NAME"
- printerr " were not found in your aclocal path, or some forbidden"
- printerr " macros were found. Perhaps you need to adjust your"
- printerr " ACLOCAL_FLAGS?"
- printerr
-}
-
-# Usage:
-# check_m4macros
-# Checks that all the requested macro files are in the aclocal macro path
-# Uses REQUIRED_M4MACROS and ACLOCAL variables.
-check_m4macros() {
- # construct list of macro directories
- cm_macrodirs=`$ACLOCAL --print-ac-dir`
- # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9
- # but it contains only Automake's own macros, so we can ignore it.
-
- # Read the dirlist file, supported by Automake >= 1.7.
- # If AUTOMAKE was defined, no version was detected.
- if [ -z "$AUTOMAKE_VERSION" ] || compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then
- cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist`
- if [ -n "$cm_dirlist" ] ; then
- for cm_dir in $cm_dirlist; do
- if [ -d $cm_dir ]; then
- add_to_cm_macrodirs $cm_dir
- fi
- done
- fi
- fi
-
- # Parse $ACLOCAL_FLAGS
- set - $ACLOCAL_FLAGS
- while [ $# -gt 0 ]; do
- if [ "$1" = "-I" ]; then
- add_to_cm_macrodirs "$2"
- shift
- fi
- shift
- done
-
- cm_status=0
- if [ -n "$REQUIRED_M4MACROS" ]; then
- printbold "Checking for required M4 macros..."
- # check that each macro file is in one of the macro dirs
- for cm_macro in $REQUIRED_M4MACROS; do
- cm_macrofound=false
- for cm_dir in $cm_macrodirs; do
- if [ -f "$cm_dir/$cm_macro" ]; then
- cm_macrofound=true
- break
- fi
- # The macro dir in Cygwin environments may contain a file
- # called dirlist containing other directories to look in.
- if [ -f "$cm_dir/dirlist" ]; then
- for cm_otherdir in `cat $cm_dir/dirlist`; do
- if [ -f "$cm_otherdir/$cm_macro" ]; then
- cm_macrofound=true
- break
- fi
- done
- fi
- done
- if $cm_macrofound; then
- :
- else
- printerr " $cm_macro not found"
- cm_status=1
- fi
- done
- fi
- if [ "$cm_status" != 0 ]; then
- print_m4macros_error
- exit $cm_status
- fi
- if [ -n "$FORBIDDEN_M4MACROS" ]; then
- printbold "Checking for forbidden M4 macros..."
- # check that each macro file is in one of the macro dirs
- for cm_macro in $FORBIDDEN_M4MACROS; do
- cm_macrofound=false
- for cm_dir in $cm_macrodirs; do
- if [ -f "$cm_dir/$cm_macro" ]; then
- cm_macrofound=true
- break
- fi
- done
- if $cm_macrofound; then
- printerr " $cm_macro found (should be cleared from macros dir)"
- cm_status=1
- fi
- done
- fi
- if [ "$cm_status" != 0 ]; then
- print_m4macros_error
- exit $cm_status
- fi
-}
-
-# try to catch the case where the macros2/ directory hasn't been cleared out.
-forbid_m4macro gnome-cxx-check.m4
-
-want_libtool=false
-want_gettext=false
-want_glib_gettext=false
-want_intltool=false
-want_pkg_config=false
-want_gtk_doc=false
-want_gnome_doc_utils=false
-want_maintainer_mode=false
-
-find_configure_files() {
- configure_ac=
- if test -f "$1/configure.ac"; then
- configure_ac="$1/configure.ac"
- elif test -f "$1/configure.in"; then
- configure_ac="$1/configure.in"
- fi
- if test "x$configure_ac" != x; then
- echo "$configure_ac"
- # TODO We have not detected the right autoconf yet!
- autoconf -t 'AC_CONFIG_SUBDIRS:$1' "$configure_ac" | while read dir; do
- find_configure_files "$1/$dir"
- done
- fi
-}
-
-configure_files="`find_configure_files $srcdir`"
-
-for configure_ac in $configure_files; do
- dirname=`dirname $configure_ac`
- if [ -f $dirname/NO-AUTO-GEN ]; then
- echo skipping $dirname -- flagged as no auto-gen
- continue
- fi
- if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null ||
- grep "^LT_INIT" $configure_ac >/dev/null; then
- want_libtool=true
- fi
- if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then
- want_gettext=true
- fi
- if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then
- want_glib_gettext=true
- fi
- if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null ||
- grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then
- want_intltool=true
- fi
- if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then
- want_pkg_config=true
- fi
- if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then
- want_gtk_doc=true
- fi
- if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then
- want_gnome_doc_utils=true
- fi
-
- # check that AM_MAINTAINER_MODE is used
- if grep "^AM_MAINTAINER_MODE" $configure_ac >/dev/null; then
- want_maintainer_mode=true
- fi
-
- if grep "^YELP_HELP_INIT" $configure_ac >/dev/null; then
- require_m4macro yelp.m4
- fi
-
- # check to make sure gnome-common macros can be found ...
- if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null ||
- grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null ||
- grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then
- require_m4macro gnome-common.m4
- fi
- if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null ||
- grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then
- require_m4macro gnome-compiler-flags.m4
- fi
- if grep "^GNOME_CODE_COVERAGE" $configure_ac >/dev/null; then
- require_m4macro gnome-code-coverage.m4
- fi
-done
-
-#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13
-WANT_AUTOCONF_2_5=1
-export WANT_AUTOCONF_2_5
-version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \
- "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz"
-AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/`
-
-case $REQUIRED_AUTOMAKE_VERSION in
- 1.4*) automake_progs="automake-1.4" ;;
- 1.5*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;;
- 1.6*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;;
- 1.7*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;;
- 1.8*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8" ;;
- 1.9*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9" ;;
- 1.10*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10" ;;
- 1.11*) automake_progs="automake-1.13 automake-1.12 automake-1.11" ;;
- 1.12*) automake_progs="automake-1.13 automake-1.12" ;;
- 1.13*) automake_progs="automake-1.13" ;;
-esac
-version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \
- "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz"
-ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/`
-
-if $want_libtool; then
- version_check libtool LIBTOOLIZE "libtoolize glibtoolize" $REQUIRED_LIBTOOL_VERSION \
- "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz"
- require_m4macro libtool.m4
-fi
-
-if $want_gettext; then
- version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \
- "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz"
- require_m4macro gettext.m4
-fi
-
-if $want_glib_gettext; then
- version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \
- "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz"
- require_m4macro glib-gettext.m4
-fi
-
-if $want_intltool; then
- version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \
- "http://ftp.gnome.org/pub/GNOME/sources/intltool/"
- require_m4macro intltool.m4
-fi
-
-if $want_pkg_config; then
- version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \
- "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz"
- require_m4macro pkg.m4
-fi
-
-if $want_gtk_doc; then
- version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \
- "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
- require_m4macro gtk-doc.m4
-fi
-
-if $want_gnome_doc_utils; then
- version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \
- "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/"
-fi
-
-if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
- version_check gnome-common DOC_COMMON gnome-doc-common \
- $REQUIRED_DOC_COMMON_VERSION " "
-fi
-
-check_m4macros
-
-if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
- printerr "**Warning**: I am going to run \`configure' with no arguments."
- printerr "If you wish to pass any to it, please specify them on the"
- printerr \`$0\'" command line."
- printerr
-fi
-
-topdir=`pwd`
-for configure_ac in $configure_files; do
- dirname=`dirname $configure_ac`
- basename=`basename $configure_ac`
- if [ -f $dirname/NO-AUTO-GEN ]; then
- echo skipping $dirname -- flagged as no auto-gen
- elif [ ! -w $dirname ]; then
- echo skipping $dirname -- directory is read only
- else
- printbold "Processing $configure_ac"
- cd $dirname
-
- # Note that the order these tools are called should match what
- # autoconf's "autoupdate" package does. See bug 138584 for
- # details.
-
- # programs that might install new macros get run before aclocal
- if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null ||
- grep "^LT_INIT" $basename >/dev/null; then
- printbold "Running $LIBTOOLIZE..."
- $LIBTOOLIZE --force --copy || exit 1
- fi
-
- if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then
- printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages."
- echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1
- elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then
- if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then
- printbold "Running autopoint..."
- autopoint --force || exit 1
- else
- printbold "Running $GETTEXTIZE... Ignore non-fatal messages."
- echo "no" | $GETTEXTIZE --force --copy || exit 1
- fi
- fi
-
- if grep "^AC_PROG_INTLTOOL" $basename >/dev/null ||
- grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then
- printbold "Running $INTLTOOLIZE..."
- $INTLTOOLIZE --force --copy --automake || exit 1
- fi
- if grep "^GTK_DOC_CHECK" $basename >/dev/null; then
- printbold "Running $GTKDOCIZE..."
- $GTKDOCIZE --copy || exit 1
- fi
-
- if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
- printbold "Running gnome-doc-common..."
- gnome-doc-common --copy || exit 1
- fi
- if grep "^GNOME_DOC_INIT" $basename >/dev/null; then
- printbold "Running $GNOME_DOC_PREPARE..."
- $GNOME_DOC_PREPARE --force --copy || exit 1
- fi
-
- # Now run aclocal to pull in any additional macros needed
-
- # if the AC_CONFIG_MACRO_DIR() macro is used, pass that
- # directory to aclocal.
- m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
- if [ -n "$m4dir" ]; then
- m4dir="-I $m4dir"
- fi
- printbold "Running $ACLOCAL..."
- $ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1
-
- if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
- printerr "*** obsolete gnome macros were used in $configure_ac"
- fi
-
- # Now that all the macros are sorted, run autoconf and autoheader ...
- printbold "Running $AUTOCONF..."
- $AUTOCONF || exit 1
- if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then
- printbold "Running $AUTOHEADER..."
- $AUTOHEADER || exit 1
- # this prevents automake from thinking config.h.in is out of
- # date, since autoheader doesn't touch the file if it doesn't
- # change.
- test -f config.h.in && touch config.h.in
- fi
-
- # Finally, run automake to create the makefiles ...
- printbold "Running $AUTOMAKE..."
- if [ -f COPYING ]; then
- cp -pf COPYING COPYING.autogen_bak
- fi
- if [ -f INSTALL ]; then
- cp -pf INSTALL INSTALL.autogen_bak
- fi
- if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then
- $AUTOMAKE --gnu --add-missing --copy -Wno-portability || exit 1
- else
- $AUTOMAKE --gnu --add-missing --copy || exit 1
- fi
- if [ -f COPYING.autogen_bak ]; then
- cmp COPYING COPYING.autogen_bak > /dev/null || cp -pf COPYING.autogen_bak COPYING
- rm -f COPYING.autogen_bak
- fi
- if [ -f INSTALL.autogen_bak ]; then
- cmp INSTALL INSTALL.autogen_bak > /dev/null || cp -pf INSTALL.autogen_bak INSTALL
- rm -f INSTALL.autogen_bak
- fi
-
- cd "$topdir"
- fi
-done
-
-conf_flags=""
-
-if $want_maintainer_mode; then
- conf_flags="--enable-maintainer-mode"
-fi
-
-if test x$NOCONFIGURE = x; then
- printbold Running $srcdir/configure $conf_flags "$@" ...
- $srcdir/configure $conf_flags "$@" \
- && echo Now type \`make\' to compile $PKG_NAME || exit 1
-else
- echo Skipping configure process.
-fi
diff --git a/community/cinnamon/PKGBUILD b/community/cinnamon/PKGBUILD
index f4fecd1a7..a16839508 100644
--- a/community/cinnamon/PKGBUILD
+++ b/community/cinnamon/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 87446 2013-03-31 19:54:32Z faidoc $
+# $Id: PKGBUILD 88709 2013-04-22 00:29:56Z bgyorgy $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: M0Rf30
# Contributor: unifiedlinux
# Contributor: CReimer
pkgname=cinnamon
-pkgver=1.7.3
+pkgver=1.7.4
pkgrel=2
pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience"
arch=('i686' 'x86_64')
@@ -13,8 +13,9 @@ url="http://cinnamon.linuxmint.com/"
license=('GPL2')
depends=('accountsservice' 'caribou' 'clutter-gtk' 'gjs' 'gnome-bluetooth'
'gnome-icon-theme' 'gnome-menus' 'gnome-settings-daemon' 'gnome-session'
- 'gnome-themes-standard' 'gstreamer0.10' 'networkmanager' 'muffin' 'python2-dbus'
- 'python2-gconf' 'python2-imaging' 'python2-pyinotify' 'python2-lxml' 'webkitgtk3')
+ 'gnome-themes-standard' 'gstreamer0.10' 'libgnome-keyring' 'librsvg'
+ 'networkmanager' 'muffin' 'pygtk' 'python2-dbus' 'python2-imaging'
+ 'python2-pyinotify' 'python2-lxml' 'webkitgtk3')
makedepends=('gnome-common' 'intltool')
optdepends=('cinnamon-control-center: extended configurations for Cinnamon'
'cinnamon-screensaver: lock screen'
@@ -26,15 +27,21 @@ install=${pkgname}.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/tarball/$pkgver"
"keyboard_applet.patch"
"fix-control-center-check.patch"
- "fix-keyboard-settings.patch")
-md5sums=('c733e2a2280508aecf3ee010587e6743'
+ "gnome-3.8.patch")
+md5sums=('95260dc968ca9be32c265b35df2dd49d'
'2b1ece84416c3e4de030be15f1774d82'
'c3f25b06d345d9d36c197cd96e08f496'
- 'c36138eddde544b5c27b66d19451e7a5')
+ 'cf2efbe1a5c48e1be53a0e8e4b7c3181')
build() {
cd ${srcdir}/linuxmint-Cinnamon*
+ # Python2 fix
+ sed -i 's|#! /usr/bin/python|#! /usr/bin/python2|' \
+ files/usr/bin/$pkgname-menu-editor \
+ files/usr/share/$pkgname/applets/panel-launchers@$pkgname.org/$pkgname-add-panel-launcher.py
+ find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
+
# Fix Keyboard applet
# https://github.com/linuxmint/Cinnamon/issues/1337
patch -Np1 -i ${srcdir}/keyboard_applet.patch
@@ -42,9 +49,8 @@ build() {
# Check for the cc-panel path, not for the unneeded binary
patch -Np1 -i ${srcdir}/fix-control-center-check.patch
- # Fix Keyboard settings (https://bugs.archlinux.org/task/34472)
- patch -Np1 -i ${srcdir}/fix-keyboard-settings.patch
-
+ # https://github.com/linuxmint/Cinnamon/pull/1888
+ patch -Np1 -i ${srcdir}/gnome-3.8.patch
./autogen.sh --prefix=/usr \
--sysconfdir=/etc \
@@ -54,31 +60,10 @@ build() {
--disable-schemas-compile \
--enable-compile-warnings=yes \
--with-session-tracking=systemd
-
make
}
package() {
cd ${srcdir}/linuxmint-Cinnamon*
make DESTDIR="${pkgdir}" install
-
- # Install autostart files for gnome-fallback-mount-helper
- install -Dm644 /etc/xdg/autostart/gnome-fallback-mount-helper.desktop \
- "${pkgdir}/etc/xdg/autostart/gnome-fallback-mount-helper-cinnamon.desktop"
- sed -i 's/^AutostartCondition=.*/AutostartCondition=GNOME3 if-session cinnamon/' \
- "${pkgdir}/etc/xdg/autostart/gnome-fallback-mount-helper-cinnamon.desktop"
-
- install -Dm644 /etc/xdg/autostart/gnome-fallback-mount-helper.desktop \
- "${pkgdir}/etc/xdg/autostart/gnome-fallback-mount-helper-cinnamon2d.desktop"
- sed -i 's/^AutostartCondition=.*/AutostartCondition=GNOME3 if-session cinnamon2d/' \
- "${pkgdir}/etc/xdg/autostart/gnome-fallback-mount-helper-cinnamon2d.desktop"
-
- # Python2 fix
- sed -i 's|#! /usr/bin/python|#! /usr/bin/python2|' \
- "${pkgdir}/usr/bin/$pkgname-menu-editor" \
- "${pkgdir}/usr/share/$pkgname/applets/panel-launchers@$pkgname.org/$pkgname-add-panel-launcher.py"
-
- find "${pkgdir}" -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
}
-
-
diff --git a/community/cinnamon/cinnamon.install b/community/cinnamon/cinnamon.install
index 901fd95c9..326aa98a2 100644
--- a/community/cinnamon/cinnamon.install
+++ b/community/cinnamon/cinnamon.install
@@ -2,28 +2,10 @@ post_install() {
glib-compile-schemas usr/share/glib-2.0/schemas
}
-pre_upgrade() {
- if [ -f /usr/share/gconf/schemas/cinnamon.schemas ]; then
- gconfpkg --uninstall cinnamon
- fi
-
- if [ "$(vercmp 1.6.7-6 "$2")" -eq 1 ]; then
- if [[ -h '/usr/lib/libgnome-desktop-3.so.2' ]]; then
- if [[ $(uname -m) == 'i686' ]]; then
- unlink /usr/lib/libgnome-desktop-3.so.2
- fi
- fi
- fi
-}
-
post_upgrade() {
post_install
}
-pre_remove() {
- pre_upgrade
-}
-
post_remove() {
post_install
}
diff --git a/community/cinnamon/fix-keyboard-settings.patch b/community/cinnamon/fix-keyboard-settings.patch
deleted file mode 100644
index b606939c9..000000000
--- a/community/cinnamon/fix-keyboard-settings.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 034f9c886a4b08e214193576b11fb97ba3d62922 Mon Sep 17 00:00:00 2001
-From: Lusito <core@roughael.net>
-Date: Sun, 10 Mar 2013 21:01:07 +0100
-Subject: [PATCH] fix for broken keyboard settings
-
----
- files/usr/lib/cinnamon-settings/bin/SettingsWidgets.py | 2 +-
- files/usr/lib/cinnamon-settings/modules/cs_keyboard.py | 12 ++++++------
- 2 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/files/usr/lib/cinnamon-settings/bin/SettingsWidgets.py b/files/usr/lib/cinnamon-settings/bin/SettingsWidgets.py
-index b8842fe..cdccf46 100644
---- a/files/usr/lib/cinnamon-settings/bin/SettingsWidgets.py
-+++ b/files/usr/lib/cinnamon-settings/bin/SettingsWidgets.py
-@@ -9,7 +9,7 @@
- import gettext
- from gi.repository import Gio, Gtk, GObject, Gdk
- from gi.repository import GdkPixbuf
--# import gconf
-+ from gi.repository import GConf
- import json
- import dbus
- import time
-diff --git a/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py b/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py
-index 27a75ae..1ea8fd9 100644
---- a/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py
-+++ b/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py
-@@ -8,7 +8,7 @@
- gettext.install("cinnamon", "/usr/share/cinnamon/locale")
-
- # Keybindings page - check if we need to store custom
--# keybindings to gsettings key as well as gconf (In Mint 14 this is changed)
-+# keybindings to gsettings key as well as GConf (In Mint 14 this is changed)
- CUSTOM_KEYS_BASENAME = "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings"
- CUSTOM_KEYS_SCHEMA = "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding"
- CUSTOM_KEYBINDINGS_GSETTINGS = False
-@@ -160,7 +160,7 @@ def __init__(self, content_box):
- first_run_completed = schema.get_boolean("custom-keybindings-to-3-6")
-
- if CUSTOM_KEYBINDINGS_GSETTINGS and not first_run_completed:
-- gclient = gconf.client_get_default()
-+ gclient = GConf.Client.get_default()
- path = "/desktop/gnome/keybindings"
- subdirs = gclient.all_dirs(path)
- for subdir in subdirs:
-@@ -251,7 +251,7 @@ def setBinding(self, index, val):
- self.writeSettings()
-
- def writeSettings(self):
-- gclient = gconf.client_get_default()
-+ gclient = GConf.Client.get_default()
- gclient.set_string(self.path + "/name", self.label)
- gclient.set_string(self.path + "/action", self.action)
- gclient.set_string(self.path + "/binding", self.entries[0])
-@@ -537,7 +537,7 @@ def loadCustoms(self):
- for category in self.main_store:
- if category.int_name is "custom":
- category.clear()
-- gclient = gconf.client_get_default()
-+ gclient = GConf.Client.get_default()
- path = "/desktop/gnome/keybindings"
- subdirs = gclient.all_dirs(path)
- for subdir in subdirs:
-@@ -645,7 +645,7 @@ def onAddCustomButtonClicked(self, button):
- dialog.destroy()
- return
-
-- gclient = gconf.client_get_default()
-+ gclient = GConf.Client.get_default()
- path = "/desktop/gnome/keybindings/custom"
- i = 0
- while gclient.dir_exists(path + str(i)):
-@@ -670,7 +670,7 @@ def onRemoveCustomButtonClicked(self, button):
- keybindings, iter = self.kb_tree.get_selection().get_selected()
- if iter:
- keybinding = keybindings[iter][1]
-- gclient = gconf.client_get_default()
-+ gclient = GConf.Client.get_default()
- if gclient.dir_exists(keybinding.path):
- gclient.unset(keybinding.path + "/name")
- gclient.unset(keybinding.path + "/action")
---
-1.8.1.5
diff --git a/community/cinnamon/gnome-3.8.patch b/community/cinnamon/gnome-3.8.patch
new file mode 100644
index 000000000..61cd9180f
--- /dev/null
+++ b/community/cinnamon/gnome-3.8.patch
@@ -0,0 +1,3669 @@
+From f4020d3960fa96a101bdb1c3ac1e1a452dbbf48c Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Fri, 19 Apr 2013 13:19:50 -0400
+Subject: [PATCH 01/15] Disable XInput on cinnamon startup (for 3.8 compat)
+ This has no effect on < 1.14 clutter
+
+---
+ src/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/main.c b/src/main.c
+index 418fb60..ac90d91 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -260,6 +260,7 @@
+ meta_plugin_type_register (gnome_cinnamon_plugin_get_type ());
+
+ /* Prevent meta_init() from causing gtk to load gail and at-bridge */
++ g_setenv ("CLUTTER_DISABLE_XINPUT", "1", TRUE);
+ g_setenv ("NO_GAIL", "1", TRUE);
+ g_setenv ("NO_AT_BRIDGE", "1", TRUE);
+ meta_init ();
+--
+1.8.1.6
+
+
+From cc68659ecdd9e43128ec2b4555479f930c0d1ccd Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Fri, 19 Apr 2013 13:21:40 -0400
+Subject: [PATCH 02/15] Explain change
+
+---
+ src/main.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/main.c b/src/main.c
+index ac90d91..9d37975 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -257,10 +257,12 @@
+
+ g_option_context_free (ctx);
+
++ /* Disable XInput extension - required for 3.8 compatibility */
++ g_setenv ("CLUTTER_DISABLE_XINPUT", "1", TRUE);
++
+ meta_plugin_type_register (gnome_cinnamon_plugin_get_type ());
+
+ /* Prevent meta_init() from causing gtk to load gail and at-bridge */
+- g_setenv ("CLUTTER_DISABLE_XINPUT", "1", TRUE);
+ g_setenv ("NO_GAIL", "1", TRUE);
+ g_setenv ("NO_AT_BRIDGE", "1", TRUE);
+ meta_init ();
+--
+1.8.1.6
+
+
+From f3777b3b2733b965bd348c7175ee67ee268aee06 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Tue, 16 Apr 2013 17:01:30 -0400
+Subject: [PATCH 03/15] Add backgroundManager - this is needed for gnome 3.8
+ compatibility, as gnome-settings-daemon no longer handles the desktop
+ background.
+
+---
+ configure.ac | 7 +-
+ data/org.cinnamon.gschema.xml.in | 71 +++-
+ .../cinnamon-settings/modules/cs_backgrounds.py | 31 +-
+ js/ui/main.js | 3 +-
+ src/Makefile.am | 2 +
+ src/cinnamon-background-manager.c | 411 +++++++++++++++++++++
+ src/cinnamon-background-manager.h | 57 +++
+ 7 files changed, 562 insertions(+), 20 deletions(-)
+ create mode 100644 src/cinnamon-background-manager.c
+ create mode 100644 src/cinnamon-background-manager.h
+
+diff --git a/configure.ac b/configure.ac
+index 0aa47c5..a2a9479 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,6 +68,7 @@ GTK_MIN_VERSION=3.0.0
+ GIO_MIN_VERSION=2.29.10
+ POLKIT_MIN_VERSION=0.100
+ STARTUP_NOTIFICATION_MIN_VERSION=0.11
++GNOME_DESKTOP_MIN_VERSION=3.0.0
+
+ # Collect more than 20 libraries for a prize!
+ PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $GIO_MIN_VERSION
+@@ -82,7 +83,8 @@ PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $GIO_MIN_VERSION
+ gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
+ libcanberra
+ polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
+- libnm-glib libnm-util gnome-keyring-1)
++ libnm-glib libnm-util gnome-keyring-1
++ gnome-desktop-3.0 >= GNOME_DESKTOP_MIN_VERSION)
+
+ PKG_CHECK_MODULES(CINNAMON_PERF_HELPER, gtk+-3.0 gio-2.0)
+
+@@ -106,7 +108,8 @@ AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier)
+ CFLAGS=$saved_CFLAGS
+ LIBS=$saved_LIBS
+
+-PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 gnome-desktop-3.0 >= 2.90.0 x11)
++PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2
++ gnome-desktop-3.0 >= GNOME_DESKTOP_MIN_VERSION x11)
+ PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-3.0)
+ PKG_CHECK_MODULES(TRAY, gtk+-3.0)
+ PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
+diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in
+index ffbad92..6f55477 100644
+--- a/data/org.cinnamon.gschema.xml.in
++++ b/data/org.cinnamon.gschema.xml.in
+@@ -720,6 +720,23 @@
+ </key>
+ </schema>
+
++
++ <enum id="bg_style">
++ <value nick="none" value="0"/>
++ <value nick="wallpaper" value="1"/>
++ <value nick="centered" value="2"/>
++ <value nick="scaled" value="3"/>
++ <value nick="stretched" value="4"/>
++ <value nick="zoom" value="5"/>
++ <value nick="spanned" value="6"/>
++ </enum>
++
++ <enum id="bg_shading">
++ <value nick="solid" value="0"/>
++ <value nick="vertical" value="1"/>
++ <value nick="horizontal" value="2"/>
++ </enum>
++
+ <schema id="org.cinnamon.background" path="/org/cinnamon/background/">
+ <key name="mode" type="s">
+ <default>"wallpaper"</default>
+@@ -750,8 +767,60 @@
+ This key defines the delay for the slideshow.
+ </description>
+ </key>
++ <key name="draw-background" type="b">
++ <default>true</default>
++ <_summary>Draw Desktop Background</_summary>
++ <_description>Have GNOME draw the desktop background.</_description>
++ </key>
++ <key name="picture-options" enum="bg_style">
++ <default>'zoom'</default>
++ <_summary>Picture Options</_summary>
++ <_description>
++ Determines how the image set by wallpaper_filename is rendered.
++ Possible values are "none", "wallpaper", "centered", "scaled",
++ "stretched", "zoom", "spanned".
++ </_description>
++ </key>
++ <key name="picture-uri" type="s">
++ <default>'file://@datadir@/themes/Adwaita/backgrounds/adwaita-timed.xml'</default>
++ <_summary>Picture URI</_summary>
++ <_description>
++ URI to use for the background image. Not that the backend only supports
++ local (file://) URIs.
++ </_description>
++ </key>
++ <key name="picture-opacity" type="i">
++ <range min="0" max="100"/>
++ <default>100</default>
++ <_summary>Picture Opacity</_summary>
++ <_description>
++ Opacity with which to draw the background picture.
++ </_description>
++ </key>
++ <key name="primary-color" type="s">
++ <default>'#023c88'</default>
++ <_summary>Primary Color</_summary>
++ <_description>
++ Left or Top color when drawing gradients, or the solid color.
++ </_description>
++ </key>
++ <key name="secondary-color" type="s">
++ <default>'#5789ca'</default>
++ <_summary>Secondary Color</_summary>
++ <_description>
++ Right or Bottom color when drawing gradients, not used for solid color.
++ </_description>
++ </key>
++ <key name="color-shading-type" enum="bg_shading">
++ <default>'solid'</default>
++ <_summary>Color Shading Type</_summary>
++ <_description>
++ How to shade the background color. Possible values are "horizontal",
++ "vertical", and "solid".
++ </_description>
++ </key>
+ </schema>
+-
++
+ <schema id="org.cinnamon.screensaver" path="/org/cinnamon/screensaver/">
+ <key name="default-message" type="s">
+ <default>""</default>
+diff --git a/files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py b/files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py
+index f964aed..4a38c84 100644
+--- a/files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py
++++ b/files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py
+@@ -232,11 +232,11 @@ def getFirstFileFromBackgroundXml(self, filename):
+
+
+ class BackgroundWallpaperPane (Gtk.VBox):
+- def __init__(self, sidepage, gnome_background_schema):
++ def __init__(self, sidepage, cinnamon_background_schema):
+ Gtk.VBox.__init__(self)
+ self.set_spacing(5)
+
+- self._gnome_background_schema = gnome_background_schema
++ self._cinnamon_background_schema = cinnamon_background_schema
+ self._sidepage = sidepage
+
+ scw = Gtk.ScrolledWindow()
+@@ -263,15 +263,15 @@ def _on_selection_changed(self, iconview):
+ if wallpaper:
+ for key in wallpaper:
+ if key == "filename":
+- self._gnome_background_schema.set_string("picture-uri", "file://" + wallpaper[key])
++ self._cinnamon_background_schema.set_string("picture-uri", "file://" + wallpaper[key])
+ elif key == "pcolor":
+- self._gnome_background_schema.set_string("primary-color", wallpaper[key])
++ self._cinnamon_background_schema.set_string("primary-color", wallpaper[key])
+ elif key == "scolor":
+- self._gnome_background_schema.set_string("secondary-color", wallpaper[key])
++ self._cinnamon_background_schema.set_string("secondary-color", wallpaper[key])
+ elif key == "shade_type":
+- self._gnome_background_schema.set_string("color-shading-type", wallpaper[key])
++ self._cinnamon_background_schema.set_string("color-shading-type", wallpaper[key])
+ elif key == "options":
+- self._gnome_background_schema.set_string("picture-options", wallpaper[key])
++ self._cinnamon_background_schema.set_string("picture-options", wallpaper[key])
+ if (not "metadataFile" in wallpaper) or (wallpaper["metadataFile"] == ""):
+ self._sidepage.remove_wallpaper_button.set_sensitive(True)
+
+@@ -364,7 +364,7 @@ def run(self):
+ return res
+
+ class BackgroundSlideshowPane(Gtk.Table):
+- def __init__(self, sidepage, gnome_background_schema, cinnamon_background_schema):
++ def __init__(self, sidepage, cinnamon_background_schema):
+ Gtk.Table.__init__(self)
+ self.set_col_spacings(5)
+ self.set_row_spacings(5)
+@@ -445,12 +445,11 @@ def _do_update_list(self, folder, recursive, delay, transition_duration = 0):
+ f = open(filename, "w")
+ f.write(xml_data)
+ f.close()
+- Gio.Settings("org.gnome.desktop.background").set_string("picture-uri", "file://" + filename)
++ Gio.Settings("org.cinnamon.background").set_string("picture-uri", "file://" + filename)
+
+ class BackgroundSidePage (SidePage):
+ def __init__(self, name, icon, keywords, advanced, content_box):
+ SidePage.__init__(self, name, icon, keywords, advanced, content_box)
+- self._gnome_background_schema = Gio.Settings("org.gnome.desktop.background")
+ self._cinnamon_background_schema = Gio.Settings("org.cinnamon.background")
+ self._add_wallpapers_dialog = AddWallpapersDialog()
+
+@@ -515,8 +514,8 @@ def build(self, advanced):
+ self.mainbox.set_visible_window(False)
+ self.content_box.pack_start(self.mainbox, True, True, 3)
+
+- self.wallpaper_pane = BackgroundWallpaperPane(self, self._gnome_background_schema)
+- self.slideshow_pane = BackgroundSlideshowPane(self, self._gnome_background_schema, self._cinnamon_background_schema)
++ self.wallpaper_pane = BackgroundWallpaperPane(self, self._cinnamon_background_schema)
++ self.slideshow_pane = BackgroundSlideshowPane(self, self._cinnamon_background_schema)
+ if self._cinnamon_background_schema["mode"] == "slideshow":
+ self.mainbox.add(self.slideshow_pane)
+ else:
+@@ -536,21 +535,21 @@ def build(self, advanced):
+ l = Gtk.Label(_("Picture aspect"))
+ l.set_alignment(0, 0.5)
+ advanced_options_box.pack_start(l, False, False, 0)
+- self.picture_options = GSettingsComboBox("", "org.gnome.desktop.background", "picture-options", None, BACKGROUND_PICTURE_OPTIONS)
++ self.picture_options = GSettingsComboBox("", "org.cinnamon.background", "picture-options", None, BACKGROUND_PICTURE_OPTIONS)
+ advanced_options_box.pack_start(self.picture_options, False, False, 0)
+
+ l = Gtk.Label(_("Gradient"))
+ l.set_alignment(0, 0.5)
+ advanced_options_box.pack_start(l, False, False, 0)
+- self.color_shading_type = GSettingsComboBox("", "org.gnome.desktop.background", "color-shading-type", None, BACKGROUND_COLOR_SHADING_TYPES)
++ self.color_shading_type = GSettingsComboBox("", "org.cinnamon.background", "color-shading-type", None, BACKGROUND_COLOR_SHADING_TYPES)
+ advanced_options_box.pack_start(self.color_shading_type, False, False, 0)
+
+ hbox = Gtk.HBox()
+ l = Gtk.Label(_("Colors"))
+ hbox.pack_start(l, False, False, 2)
+- self.primary_color = GSettingsColorChooser("org.gnome.desktop.background", "primary-color", None)
++ self.primary_color = GSettingsColorChooser("org.cinnamon.background", "primary-color", None)
+ hbox.pack_start(self.primary_color, False, False, 2)
+- self.secondary_color = GSettingsColorChooser("org.gnome.desktop.background", "secondary-color", None)
++ self.secondary_color = GSettingsColorChooser("org.cinnamon.background", "secondary-color", None)
+ hbox.pack_start(self.secondary_color, False, False, 2)
+ advanced_options_box.pack_start(hbox, False, False, 0)
+ self.content_box.show_all()
+diff --git a/js/ui/main.js b/js/ui/main.js
+index 11920a4..5cae372 100644
+--- a/js/ui/main.js
++++ b/js/ui/main.js
+@@ -86,6 +86,7 @@ let _cssStylesheet = null;
+ let dynamicWorkspaces = null;
+ let nWorks = null;
+ let tracker = null;
++let backgroundManager = null;
+ let desktopShown;
+
+ let workspace_names = [];
+@@ -214,7 +215,7 @@ function start() {
+ // be predictable anyways.
+ tracker = Cinnamon.WindowTracker.get_default();
+ Cinnamon.AppUsage.get_default();
+-
++ backgroundManager = Cinnamon.BackgroundManager.get_default();
+ // The stage is always covered so Clutter doesn't need to clear it; however
+ // the color is used as the default contents for the Muffin root background
+ // actor so set it anyways.
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 51413aa..6efce18 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -105,6 +105,7 @@ cinnamon_public_headers_h = \
+ cinnamon-app-system.h \
+ cinnamon-app-usage.h \
+ cinnamon-arrow.h \
++ cinnamon-background-manager.h \
+ cinnamon-doc-system.h \
+ cinnamon-embedded-window.h \
+ cinnamon-generic-container.h \
+@@ -142,6 +143,7 @@ libcinnamon_la_SOURCES = \
+ cinnamon-app-system.c \
+ cinnamon-app-usage.c \
+ cinnamon-arrow.c \
++ cinnamon-background-manager.c \
+ cinnamon-doc-system.c \
+ cinnamon-embedded-window.c \
+ cinnamon-generic-container.c \
+diff --git a/src/cinnamon-background-manager.c b/src/cinnamon-background-manager.c
+new file mode 100644
+index 0000000..9d95250
+--- /dev/null
++++ b/src/cinnamon-background-manager.c
+@@ -0,0 +1,411 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
++ *
++ * Copyright © 2001 Ximian, Inc.
++ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
++ * Copyright 2007 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.
++ *
++ */
++
++#include "config.h"
++
++#include <sys/types.h>
++#include <sys/wait.h>
++#include <stdlib.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <string.h>
++#include <errno.h>
++
++#include <locale.h>
++
++#include <glib.h>
++#include <glib/gi18n.h>
++#include <gio/gio.h>
++#include <gdk/gdk.h>
++#include <gdk/gdkx.h>
++
++#define GNOME_DESKTOP_USE_UNSTABLE_API
++#include <libgnome-desktop/gnome-bg.h>
++#include <X11/Xatom.h>
++
++#include "cinnamon-background-manager.h"
++
++#define CINNAMON_BACKGROUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CINNAMON_TYPE_BACKGROUND_MANAGER, CinnamonBackgroundManagerPrivate))
++
++struct CinnamonBackgroundManagerPrivate
++{
++ GSettings *settings;
++ GnomeBG *bg;
++
++ GnomeBGCrossfade *fade;
++
++ GDBusProxy *proxy;
++ guint proxy_signal_id;
++};
++
++static void cinnamon_background_manager_class_init (CinnamonBackgroundManagerClass *klass);
++static void cinnamon_background_manager_init (CinnamonBackgroundManager *background_manager);
++static void cinnamon_background_manager_finalize (GObject *object);
++
++static void setup_bg (CinnamonBackgroundManager *manager);
++static void connect_screen_signals (CinnamonBackgroundManager *manager);
++
++G_DEFINE_TYPE (CinnamonBackgroundManager, cinnamon_background_manager, G_TYPE_OBJECT)
++
++static gpointer manager_object = NULL;
++
++static gboolean
++dont_draw_background (CinnamonBackgroundManager *manager)
++{
++ return !g_settings_get_boolean (manager->priv->settings,
++ "draw-background");
++}
++
++static void
++on_crossfade_finished (CinnamonBackgroundManager *manager)
++{
++ g_object_unref (manager->priv->fade);
++ manager->priv->fade = NULL;
++}
++
++static void
++draw_background (CinnamonBackgroundManager *manager,
++ gboolean use_crossfade)
++{
++ GdkDisplay *display;
++ int n_screens;
++ int i;
++
++ display = gdk_display_get_default ();
++ n_screens = gdk_display_get_n_screens (display);
++
++ for (i = 0; i < n_screens; ++i) {
++ GdkScreen *screen;
++ GdkWindow *root_window;
++ cairo_surface_t *surface;
++
++ screen = gdk_display_get_screen (display, i);
++
++ root_window = gdk_screen_get_root_window (screen);
++
++ surface = gnome_bg_create_surface (manager->priv->bg,
++ root_window,
++ gdk_screen_get_width (screen),
++ gdk_screen_get_height (screen),
++ TRUE);
++
++ if (use_crossfade) {
++
++ if (manager->priv->fade != NULL) {
++ g_object_unref (manager->priv->fade);
++ }
++
++ manager->priv->fade = gnome_bg_set_surface_as_root_with_crossfade (screen, surface);
++ g_signal_connect_swapped (manager->priv->fade, "finished",
++ G_CALLBACK (on_crossfade_finished),
++ manager);
++ } else {
++ gnome_bg_set_surface_as_root (screen, surface);
++ }
++
++ cairo_surface_destroy (surface);
++ }
++}
++
++static void
++on_bg_transitioned (GnomeBG *bg,
++ CinnamonBackgroundManager *manager)
++{
++ draw_background (manager, FALSE);
++}
++
++static gboolean
++settings_change_event_cb (GSettings *settings,
++ gpointer keys,
++ gint n_keys,
++ CinnamonBackgroundManager *manager)
++{
++ gnome_bg_load_from_preferences (manager->priv->bg,
++ manager->priv->settings);
++ return FALSE;
++}
++
++static void
++on_screen_size_changed (GdkScreen *screen,
++ CinnamonBackgroundManager *manager)
++{
++ draw_background (manager, FALSE);
++}
++
++static void
++watch_bg_preferences (CinnamonBackgroundManager *manager)
++{
++ g_signal_connect (manager->priv->settings,
++ "change-event",
++ G_CALLBACK (settings_change_event_cb),
++ manager);
++}
++
++static void
++on_bg_changed (GnomeBG *bg,
++ CinnamonBackgroundManager *manager)
++{
++ draw_background (manager, TRUE);
++}
++
++static void
++setup_bg (CinnamonBackgroundManager *manager)
++{
++ g_return_if_fail (manager->priv->bg == NULL);
++
++ manager->priv->bg = gnome_bg_new ();
++
++ g_signal_connect (manager->priv->bg,
++ "changed",
++ G_CALLBACK (on_bg_changed),
++ manager);
++
++ g_signal_connect (manager->priv->bg,
++ "transitioned",
++ G_CALLBACK (on_bg_transitioned),
++ manager);
++
++ connect_screen_signals (manager);
++ watch_bg_preferences (manager);
++ gnome_bg_load_from_preferences (manager->priv->bg,
++ manager->priv->settings);
++}
++
++static void
++setup_bg_and_draw_background (CinnamonBackgroundManager *manager)
++{
++ setup_bg (manager);
++ draw_background (manager, FALSE);
++}
++
++static void
++disconnect_session_manager_listener (CinnamonBackgroundManager *manager)
++{
++ if (manager->priv->proxy && manager->priv->proxy_signal_id) {
++ g_signal_handler_disconnect (manager->priv->proxy,
++ manager->priv->proxy_signal_id);
++ manager->priv->proxy_signal_id = 0;
++ }
++}
++
++static void
++on_session_manager_signal (GDBusProxy *proxy,
++ const gchar *sender_name,
++ const gchar *signal_name,
++ GVariant *parameters,
++ gpointer user_data)
++{
++ CinnamonBackgroundManager *manager = CINNAMON_BACKGROUND_MANAGER (user_data);
++
++ if (g_strcmp0 (signal_name, "SessionRunning") == 0) {
++ setup_bg_and_draw_background (manager);
++ disconnect_session_manager_listener (manager);
++ }
++}
++
++static void
++draw_background_after_session_loads (CinnamonBackgroundManager *manager)
++{
++ GError *error = NULL;
++ GDBusProxyFlags flags;
++
++ flags = G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
++ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
++ manager->priv->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
++ flags,
++ NULL, /* GDBusInterfaceInfo */
++ "org.gnome.SessionManager",
++ "/org/gnome/SessionManager",
++ "org.gnome.SessionManager",
++ NULL, /* GCancellable */
++ &error);
++ if (manager->priv->proxy == NULL) {
++ g_warning ("Could not listen to session manager: %s",
++ error->message);
++ g_error_free (error);
++ return;
++ }
++
++ manager->priv->proxy_signal_id = g_signal_connect (manager->priv->proxy,
++ "g-signal",
++ G_CALLBACK (on_session_manager_signal),
++ manager);
++}
++
++
++static void
++disconnect_screen_signals (CinnamonBackgroundManager *manager)
++{
++ GdkDisplay *display;
++ int i;
++ int n_screens;
++
++ display = gdk_display_get_default ();
++ n_screens = gdk_display_get_n_screens (display);
++
++ for (i = 0; i < n_screens; ++i) {
++ GdkScreen *screen;
++ screen = gdk_display_get_screen (display, i);
++ g_signal_handlers_disconnect_by_func (screen,
++ G_CALLBACK (on_screen_size_changed),
++ manager);
++ }
++}
++
++static void
++connect_screen_signals (CinnamonBackgroundManager *manager)
++{
++ GdkDisplay *display;
++ int i;
++ int n_screens;
++
++ display = gdk_display_get_default ();
++ n_screens = gdk_display_get_n_screens (display);
++
++ for (i = 0; i < n_screens; ++i) {
++ GdkScreen *screen;
++ screen = gdk_display_get_screen (display, i);
++ g_signal_connect (screen,
++ "monitors-changed",
++ G_CALLBACK (on_screen_size_changed),
++ manager);
++ g_signal_connect (screen,
++ "size-changed",
++ G_CALLBACK (on_screen_size_changed),
++ manager);
++ }
++}
++
++static void
++draw_background_changed (GSettings *settings,
++ const char *key,
++ CinnamonBackgroundManager *manager)
++{
++ if (dont_draw_background (manager) == FALSE)
++ setup_bg_and_draw_background (manager);
++}
++
++gboolean
++cinnamon_background_manager_start (CinnamonBackgroundManager *manager)
++{
++ manager->priv->settings = g_settings_new ("org.cinnamon.background");
++ g_signal_connect (manager->priv->settings, "changed::draw-background",
++ G_CALLBACK (draw_background_changed), manager);
++
++ setup_bg_and_draw_background (manager);
++ //draw_background_after_session_loads (manager);
++
++
++ return TRUE;
++}
++
++void
++cinnamon_background_manager_stop (CinnamonBackgroundManager *manager)
++{
++ CinnamonBackgroundManagerPrivate *p = manager->priv;
++
++ g_debug ("Stopping background manager");
++
++ disconnect_screen_signals (manager);
++
++ if (manager->priv->proxy) {
++ disconnect_session_manager_listener (manager);
++ g_object_unref (manager->priv->proxy);
++ }
++
++ g_signal_handlers_disconnect_by_func (manager->priv->settings,
++ settings_change_event_cb,
++ manager);
++
++ if (p->settings != NULL) {
++ g_object_unref (p->settings);
++ p->settings = NULL;
++ }
++
++ if (p->bg != NULL) {
++ g_object_unref (p->bg);
++ p->bg = NULL;
++ }
++}
++
++/**
++ * cinnamon_background_manager_get_default:
++ *
++ * Return Value: (transfer none): The global #CinnamonBackgroundManager singleton
++ */
++CinnamonBackgroundManager *
++cinnamon_background_manager_get_default ()
++{
++ static CinnamonBackgroundManager *instance = NULL;
++
++ if (instance == NULL)
++ instance = g_object_new (CINNAMON_TYPE_BACKGROUND_MANAGER, NULL);
++
++ return instance;
++}
++
++static GObject *
++cinnamon_background_manager_constructor (GType type,
++ guint n_construct_properties,
++ GObjectConstructParam *construct_properties)
++{
++ CinnamonBackgroundManager *background_manager;
++
++ background_manager = CINNAMON_BACKGROUND_MANAGER (G_OBJECT_CLASS (cinnamon_background_manager_parent_class)->constructor (type,
++ n_construct_properties,
++ construct_properties));
++
++ return G_OBJECT (background_manager);
++}
++
++static void
++cinnamon_background_manager_class_init (CinnamonBackgroundManagerClass *klass)
++{
++ GObjectClass *object_class = G_OBJECT_CLASS (klass);
++
++ object_class->constructor = cinnamon_background_manager_constructor;
++ object_class->finalize = cinnamon_background_manager_finalize;
++
++ g_type_class_add_private (klass, sizeof (CinnamonBackgroundManagerPrivate));
++}
++
++static void
++cinnamon_background_manager_init (CinnamonBackgroundManager *manager)
++{
++ manager->priv = CINNAMON_BACKGROUND_MANAGER_GET_PRIVATE (manager);
++ cinnamon_background_manager_start (manager);
++}
++
++static void
++cinnamon_background_manager_finalize (GObject *object)
++{
++ CinnamonBackgroundManager *background_manager;
++
++ g_return_if_fail (object != NULL);
++ g_return_if_fail (CINNAMON_IS_BACKGROUND_MANAGER (object));
++
++ background_manager = CINNAMON_BACKGROUND_MANAGER (object);
++
++ g_return_if_fail (background_manager->priv != NULL);
++
++ G_OBJECT_CLASS (cinnamon_background_manager_parent_class)->finalize (object);
++}
+diff --git a/src/cinnamon-background-manager.h b/src/cinnamon-background-manager.h
+new file mode 100644
+index 0000000..9a56e32
+--- /dev/null
++++ b/src/cinnamon-background-manager.h
+@@ -0,0 +1,57 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
++ *
++ * 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.
++ *
++ */
++
++#ifndef __CINNAMON_BACKGROUND_MANAGER_H
++#define __CINNAMON_BACKGROUND_MANAGER_H
++
++#include <glib-object.h>
++
++G_BEGIN_DECLS
++
++#define CINNAMON_TYPE_BACKGROUND_MANAGER (cinnamon_background_manager_get_type ())
++#define CINNAMON_BACKGROUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CINNAMON_TYPE_BACKGROUND_MANAGER, CinnamonBackgroundManager))
++#define CINNAMON_BACKGROUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CINNAMON_TYPE_BACKGROUND_MANAGER, CinnamonBackgroundManagerClass))
++#define CINNAMON_IS_BACKGROUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CINNAMON_TYPE_BACKGROUND_MANAGER))
++#define CINNAMON_IS_BACKGROUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CINNAMON_TYPE_BACKGROUND_MANAGER))
++#define CINNAMON_BACKGROUND_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CINNAMON_TYPE_BACKGROUND_MANAGER, CinnamonBackgroundManagerClass))
++
++typedef struct CinnamonBackgroundManagerPrivate CinnamonBackgroundManagerPrivate;
++
++typedef struct
++{
++ GObject parent;
++ CinnamonBackgroundManagerPrivate *priv;
++} CinnamonBackgroundManager;
++
++typedef struct
++{
++ GObjectClass parent_class;
++} CinnamonBackgroundManagerClass;
++
++GType cinnamon_background_manager_get_type (void);
++
++CinnamonBackgroundManager *cinnamon_background_manager_get_default (void);
++
++gboolean cinnamon_background_manager_start (CinnamonBackgroundManager *manager);
++void cinnamon_background_manager_stop (CinnamonBackgroundManager *manager);
++
++G_END_DECLS
++
++#endif /* __CINNAMON_BACKGROUND_MANAGER_H */
+--
+1.8.1.6
+
+
+From 590a48961f2c7a1b18fb914a1d7212ffcdf03017 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Tue, 16 Apr 2013 18:28:16 -0400
+Subject: [PATCH 04/15] Change default background
+
+---
+ data/org.cinnamon.gschema.xml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in
+index 6f55477..35b0972 100644
+--- a/data/org.cinnamon.gschema.xml.in
++++ b/data/org.cinnamon.gschema.xml.in
+@@ -782,7 +782,7 @@
+ </_description>
+ </key>
+ <key name="picture-uri" type="s">
+- <default>'file://@datadir@/themes/Adwaita/backgrounds/adwaita-timed.xml'</default>
++ <default>'file:///usr/share/backgrounds/linuxmint/default_background.jpg'</default>
+ <_summary>Picture URI</_summary>
+ <_description>
+ URI to use for the background image. Not that the backend only supports
+--
+1.8.1.6
+
+
+From ac8b0954c7506ae88059e488539f88d55329f070 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Tue, 16 Apr 2013 18:41:16 -0400
+Subject: [PATCH 05/15] Use distro-agnostic background..
+
+---
+ data/org.cinnamon.gschema.xml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in
+index 35b0972..0d01089 100644
+--- a/data/org.cinnamon.gschema.xml.in
++++ b/data/org.cinnamon.gschema.xml.in
+@@ -782,7 +782,7 @@
+ </_description>
+ </key>
+ <key name="picture-uri" type="s">
+- <default>'file:///usr/share/backgrounds/linuxmint/default_background.jpg'</default>
++ <default>'file:///usr/share/themes/Adwaita/backgrounds/adwaita-timed.xml'</default>
+ <_summary>Picture URI</_summary>
+ <_description>
+ URI to use for the background image. Not that the backend only supports
+--
+1.8.1.6
+
+
+From 81dbccb60231744999463a5b84c7c36358570929 Mon Sep 17 00:00:00 2001
+From: dalcde <dalcde@yahoo.com.hk>
+Date: Mon, 15 Apr 2013 18:34:48 +0800
+Subject: [PATCH 06/15] [GDbus] Port DBus to GDBus (AltLinux patch)
+
+---
+ .../applets/brightness@cinnamon.org/applet.js | 39 ++--
+ .../cinnamon/applets/power@cinnamon.org/applet.js | 102 +++++----
+ .../cinnamon/applets/sound@cinnamon.org/applet.js | 244 +++++----------------
+ .../cinnamon/applets/xrandr@cinnamon.org/applet.js | 19 +-
+ js/misc/gnomeSession.js | 147 ++++---------
+ js/misc/modemManager.js | 79 ++++---
+ js/misc/screenSaver.js | 89 ++++----
+ js/ui/appletManager.js | 1 -
+ js/ui/automountManager.js | 106 +++++----
+ js/ui/autorunManager.js | 27 +--
+ js/ui/calendar.js | 71 +++---
+ js/ui/cinnamonDBus.js | 96 ++++----
+ js/ui/endSessionDialog.js | 79 ++++---
+ js/ui/keyboard.js | 48 ++--
+ js/ui/layout.js | 14 +-
+ js/ui/magnifierDBus.js | 134 +++++++----
+ js/ui/main.js | 6 -
+ js/ui/messageTray.js | 13 +-
+ js/ui/notificationDaemon.js | 193 ++++++++--------
+ js/ui/scripting.js | 34 ++-
+ 20 files changed, 688 insertions(+), 853 deletions(-)
+
+diff --git a/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js
+index 9cbda80..9087b25 100644
+--- a/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js
+@@ -5,7 +5,6 @@ const St = imports.gi.St;
+ const PopupMenu = imports.ui.popupMenu;
+ const GLib = imports.gi.GLib;
+ const Gio = imports.gi.Gio;
+-const DBus = imports.dbus;
+
+ /* constants */
+ const DimSettingsSchema = "org.gnome.settings-daemon.plugins.power";
+@@ -14,24 +13,25 @@ const DimSettingsBattery = "idle-dim-battery";
+ const PowerBusName = 'org.gnome.SettingsDaemon';
+ const PowerObjectPath = '/org/gnome/SettingsDaemon/Power';
+
+-/* DBus interface */
+-const PowerManagerInterface = {
+- name: 'org.gnome.SettingsDaemon.Power.Screen',
+- methods:
+- [
+- { name: 'GetPercentage', inSignature: '', outSignature: 'u' },
+- { name: 'SetPercentage', inSignature: 'u', outSignature: 'u' },
+- { name: 'StepUp', inSignature: '', outSignature: 'u' },
+- { name: 'StepDown', inSignature: '', outSignature: 'u' },
+- ],
+- signals:
+- [
+- { name: 'Changed', inSignature: '', outSignature: '' },
+- ]
+-};
++const PowerManagerInterface = <interface name="org.gnome.SettingsDaemon.Power.Screen">
++<method name="GetPercentage">
++ <arg type="u" direction="out"/>
++</method>
++<method name="SetPercentage">
++ <arg type="u" direction="in"/>
++ <arg type="u" direction="out"/>
++</method>
++<method name="StepUp">
++ <arg type="u" direction="out"/>
++</method>
++<method name="StepDown">
++ <arg type="u" direction="out"/>
++</method>
++<signal name="Changed" />
++</interface>;
+
+ /* DBus magic */
+-let PowerManagerProxy = DBus.makeProxyClass(PowerManagerInterface);
++const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(PowerManagerInterface);
+
+ /* TextImageMenuItem taken from sound@cinnamon.org applet */
+ let icon_path = "/usr/share/cinnamon/theme/";
+@@ -100,7 +100,7 @@ MyApplet.prototype = {
+ Applet.IconApplet.prototype._init.call(this, orientation, panel_height);
+
+ try {
+- this._proxy = new PowerManagerProxy(DBus.session, PowerBusName, PowerObjectPath);
++ this._proxy = new PowerManagerProxy(Gio.DBus.session, PowerBusName, PowerObjectPath);
+
+ this.menuManager = new PopupMenu.PopupMenuManager(this);
+ this.menu = new Applet.AppletPopupMenu(this, orientation);
+@@ -137,7 +137,8 @@ MyApplet.prototype = {
+ this.menu.addMenuItem(this._settingsMenu);
+
+ //get notified
+- this._proxy.connect('Changed', Lang.bind(this, this._getBrightness));
++ this._proxy.connectSignal('Changed', Lang.bind(this, this._getBrightness));
++
+ this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
+ } else {
+ this.set_applet_tooltip(_("Brightness"));
+diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
+index c342fe7..b6b2bcd 100644
+--- a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
+@@ -1,6 +1,5 @@
+ const Applet = imports.ui.applet;
+ const Gio = imports.gi.Gio;
+-const DBus = imports.dbus;
+ const Lang = imports.lang;
+ const St = imports.gi.St;
+ const PopupMenu = imports.ui.popupMenu;
+@@ -42,34 +41,46 @@ const LabelDisplay = {
+ TIME: 'time'
+ };
+
+-const PowerManagerInterface = {
+- name: 'org.gnome.SettingsDaemon.Power',
+- methods: [
+- { name: 'GetDevices', inSignature: '', outSignature: 'a(susdut)' },
+- { name: 'GetPrimaryDevice', inSignature: '', outSignature: '(susdut)' },
+- ],
+- signals: [
+- { name: 'PropertiesChanged', inSignature: 's,a{sv},a[s]' },
+- ],
+- properties: [
+- { name: 'Icon', signature: 's', access: 'read' },
+- ]
+-};
+-let PowerManagerProxy = DBus.makeProxyClass(PowerManagerInterface);
+-
+-const SettingsManagerInterface = {
+- name: 'org.freedesktop.DBus.Properties',
+- methods: [
+- { name: 'Get', inSignature: 's,s', outSignature: 'v' },
+- { name: 'GetAll', inSignature: 's', outSignature: 'a{sv}' },
+- { name: 'Set', inSignature: 's,s,v', outSignature: '' }
+- ],
+- signals: [
+- {name: 'PropertiesChanged', inSignature:'s,a{sv},a[s]', outSignature:''}
+- ]
+-};
+-
+-let SettingsManagerProxy = DBus.makeProxyClass(SettingsManagerInterface);
++const PowerManagerInterface = <interface name="org.gnome.SettingsDaemon.Power">
++<method name="GetDevices">
++ <arg type="a(susdut)" direction="out"/>
++</method>
++<method name="GetPrimaryDevice">
++ <arg type="(susdut)" direction="out"/>
++</method>
++<signal name="PropertiesChanged">
++ <arg type="s"/>
++ <arg type="a{sv}"/>
++ <arg type="a[s]"/>
++</signal>
++<property name="Icon" type="s" access="read" />
++</interface>;
++
++const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(PowerManagerInterface);
++
++const SettingsManagerInterface = <interface name="org.freedesktop.DBus.Properties">
++<method name="Get">
++ <arg type="s" direction="in"/>
++ <arg type="s" direction="in"/>
++ <arg type="v" direction="out"/>
++</method>
++<method name="GetAll">
++ <arg type="s" direction="in"/>
++ <arg type="a{sv}" direction="out"/>
++</method>
++<method name="Set">
++ <arg type="s" direction="in"/>
++ <arg type="s" direction="in"/>
++ <arg type="v" direction="in"/>
++</method>
++<signal name="PropertiesChanged">
++ <arg type="s"/>
++ <arg type="a{sv}"/>
++ <arg type="a[s]"/>
++</signal>
++</interface>;
++
++const SettingsManagerProxy = Gio.DBusProxy.makeProxyWrapper(SettingsManagerInterface);
+
+ function DeviceItem() {
+ this._init.apply(this, arguments);
+@@ -143,11 +154,11 @@ MyApplet.prototype = {
+ this.menuManager = new PopupMenu.PopupMenuManager(this);
+ this.menu = new Applet.AppletPopupMenu(this, orientation);
+ this.menuManager.addMenu(this.menu);
+-
+- this.set_applet_icon_symbolic_name('battery-missing');
+- this._proxy = new PowerManagerProxy(DBus.session, BUS_NAME, OBJECT_PATH);
+- this._smProxy = new SettingsManagerProxy(DBus.session, BUS_NAME, OBJECT_PATH);
+-
++
++ //this.set_applet_icon_symbolic_name('battery-missing');
++ this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH);
++ this._smProxy = new SettingsManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH);
++
+ let icon = this.actor.get_children()[0];
+ this.actor.remove_actor(icon);
+ let box = new St.BoxLayout({ name: 'batteryBox' });
+@@ -306,18 +317,19 @@ MyApplet.prototype = {
+ this._devicesChanged();
+ },
+
+- _devicesChanged: function() {
+- this.set_applet_icon_symbolic_name('battery-missing');
+- this._proxy.GetRemote('Icon', Lang.bind(this, function(icon, error) {
+- if (icon) {
+- let gicon = Gio.icon_new_for_string(icon);
+- this._applet_icon.gicon = gicon;
+- this.actor.show();
+- } else {
+- this.menu.close();
+- this.actor.hide();
+- }
+- }));
++
++ _devicesChanged: function() {
++ this.set_applet_icon_symbolic_name('battery-missing');
++ let icon = this._proxy.Icon;
++ if (icon) {
++ let gicon = Gio.icon_new_for_string(icon);
++ this.setGIcon(gicon);
++ this.actor.show();
++ } else {
++ this.menu.close();
++ this.actor.hide();
++ }
++
+ this._readPrimaryDevice();
+ this._readOtherDevices();
+ this._updateLabel();
+diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
+index 1113b1e..5bfaf26 100644
+--- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
+@@ -1,7 +1,6 @@
+ const Applet = imports.ui.applet;
+ const Mainloop = imports.mainloop;
+ const Gio = imports.gi.Gio;
+-const DBus = imports.dbus;
+ const Lang = imports.lang;
+ const Cinnamon = imports.gi.Cinnamon;
+ const Clutter = imports.gi.Clutter;
+@@ -12,90 +11,45 @@ const Gvc = imports.gi.Gvc;
+ const Pango = imports.gi.Pango;
+ const Tooltips = imports.ui.tooltips;
+
+-const PropIFace = {
+- name: 'org.freedesktop.DBus.Properties',
+- signals: [{ name: 'PropertiesChanged',
+- inSignature: 'a{sv}'}]
+-};
+-
+-const MediaServer2IFace = {
+- name: 'org.mpris.MediaPlayer2',
+- methods: [{ name: 'Raise',
+- inSignature: '',
+- outSignature: '' },
+- { name: 'Quit',
+- inSignature: '',
+- outSignature: '' }],
+- properties: [{ name: 'CanRaise',
+- signature: 'b',
+- access: 'read'},
+- { name: 'CanQuit',
+- signature: 'b',
+- access: 'read'}],
+-};
+-
+-const MediaServer2PlayerIFace = {
+- name: 'org.mpris.MediaPlayer2.Player',
+- methods: [{ name: 'PlayPause',
+- inSignature: '',
+- outSignature: '' },
+- { name: 'Pause',
+- inSignature: '',
+- outSignature: '' },
+- { name: 'Play',
+- inSignature: '',
+- outSignature: '' },
+- { name: 'Stop',
+- inSignature: '',
+- outSignature: '' },
+- { name: 'Next',
+- inSignature: '',
+- outSignature: '' },
+- { name: 'Previous',
+- inSignature: '',
+- outSignature: '' },
+- { name: 'SetPosition',
+- inSignature: 'a{ov}',
+- outSignature: '' }],
+- properties: [{ name: 'Metadata',
+- signature: 'a{sv}',
+- access: 'read'},
+- { name: 'Shuffle',
+- signature: 'b',
+- access: 'readwrite'},
+- { name: 'Rate',
+- signature: 'd',
+- access: 'readwrite'},
+- { name: 'LoopStatus',
+- signature: 'b',
+- access: 'readwrite'},
+- { name: 'Volume',
+- signature: 'd',
+- access: 'readwrite'},
+- { name: 'PlaybackStatus',
+- signature: 's',
+- access: 'read'},
+- { name: 'Position',
+- signature: 'x',
+- access: 'read'},
+- { name: 'CanGoNext',
+- signature: 'b',
+- access: 'read'},
+- { name: 'CanGoPrevious',
+- signature: 'b',
+- access: 'read'},
+- { name: 'CanPlay',
+- signature: 'b',
+- access: 'read'},
+- { name: 'CanPause',
+- signature: 'b',
+- access: 'read'},
+- { name: 'CanSeek',
+- signature: 'b',
+- access: 'read'}],
+- signals: [{ name: 'Seeked',
+- inSignature: 'x' }]
+-};
++const PropIFace = <interface name="org.freedesktop.DBus.Properties">
++<signal name="PropertiesChanged">
++ <arg type="a{sv}"/>
++</signal>
++</interface>;
++
++const MediaServer2IFace = <interface name="org.mpris.MediaPlayer2">
++<method name="Raise" />
++<method name="Quit" />
++<property name="CanRaise" type="b" access="read" />
++<property name="CanQuit" type="b" access="read" />
++</interface>;
++
++const MediaServer2PlayerIFace = <interface name="org.mpris.MediaPlayer2.Player">
++<method name="PlayPause" />
++<method name="Pause" />
++<method name="Play" />
++<method name="Stop" />
++<method name="Next" />
++<method name="Previous" />
++<method name="SetPosition">
++ <arg type="a{ov}" direction="in"/>
++</method>
++<property name='Metadata' access='read' type='a{sv}' />
++<property name='Shuffle' access='readwrite' type='b' />
++<property name='Rate' access='readwrite' type='d' />
++<property name='LoopStatus' access='readwrite' type='b' />
++<property name='Volume' access='readwrite' type='d' />
++<property name='PlaybackStatus' access='read' type='s' />
++<property name='Position' access='read' type='x' />
++<property name="CanGoNext" type="b" access="read" />
++<property name="CanGoPrevious" type="b" access="read" />
++<property name="CanPlay" type="b" access="read" />
++<property name="CanPause" type="b" access="read" />
++<property name="CanSeek" type="b" access="read" />
++<signal name="Seeked">
++ <arg type="x"/>
++</signal>
++</interface>;
+
+ /* global values */
+ let icon_path = "/usr/share/cinnamon/theme/";
+@@ -112,120 +66,20 @@ const VOLUME_ADJUSTMENT_STEP = 0.05; /* Volume adjustment step in % */
+ const ICON_SIZE = 28;
+
+
+-function Prop() {
+- this._init.apply(this, arguments);
++var PropProxy = Gio.DBusProxy.makeProxyWrapper(PropIFace);
++function Prop(owner, initCallback, cancellable) {
++ return new PropProxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable);
+ }
+
+-Prop.prototype = {
+- _init: function(owner) {
+- DBus.session.proxifyObject(this, owner, '/org/mpris/MediaPlayer2', this);
+- }
++var MediaServer2Proxy = Gio.DBusProxy.makeProxyWrapper(MediaServer2IFace);
++function MediaServer2(owner, initCallback, cancellable) {
++ return new MediaServer2Proxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable);
+ }
+-DBus.proxifyPrototype(Prop.prototype, PropIFace)
+
+-function MediaServer2() {
+- this._init.apply(this, arguments);
+-}
+-
+-MediaServer2.prototype = {
+- _init: function(owner) {
+- DBus.session.proxifyObject(this, owner, '/org/mpris/MediaPlayer2', this);
+- },
+- getRaise: function(callback) {
+- this.GetRemote('CanRaise', Lang.bind(this,
+- function(raise, ex) {
+- if (!ex)
+- callback(this, raise);
+- }));
+- },
+- getQuit: function(callback) {
+- this.GetRemote('CanQuit', Lang.bind(this,
+- function(quit, ex) {
+- if (!ex)
+- callback(this, quit);
+- }));
+- }
+-}
+-DBus.proxifyPrototype(MediaServer2.prototype, MediaServer2IFace)
+-
+-function MediaServer2Player() {
+- this._init.apply(this, arguments);
+-}
+-
+-MediaServer2Player.prototype = {
+- _init: function(owner) {
+- this._owner = owner;
+- DBus.session.proxifyObject(this, owner, '/org/mpris/MediaPlayer2', this);
+- },
+- getMetadata: function(callback) {
+- this.GetRemote('Metadata', Lang.bind(this,
+- function(metadata, ex) {
+- if (!ex)
+- callback(this, metadata);
+- }));
+- },
+- getPlaybackStatus: function(callback) {
+- this.GetRemote('PlaybackStatus', Lang.bind(this,
+- function(status, ex) {
+- if (!ex)
+- callback(this, status);
+- }));
+- },
+- getRate: function(callback) {
+- this.GetRemote('Rate', Lang.bind(this,
+- function(rate, ex) {
+- if (!ex)
+- callback(this, rate);
+- }));
+- },
+- getPosition: function(callback) {
+- this.GetRemote('Position', Lang.bind(this,
+- function(position, ex) {
+- if (!ex)
+- callback(this, position);
+- }));
+- },
+- getShuffle: function(callback) {
+- this.GetRemote('Shuffle', Lang.bind(this,
+- function(shuffle, ex) {
+- if (!ex)
+- callback(this, shuffle);
+- }));
+- },
+- setShuffle: function(value) {
+- this.SetRemote('Shuffle', value);
+- },
+- getVolume: function(callback) {
+- this.GetRemote('Volume', Lang.bind(this,
+- function(volume, ex) {
+- if (!ex)
+- callback(this, volume);
+- }));
+- },
+- setVolume: function(value) {
+- this.SetRemote('Volume', parseFloat(value));
+- },
+- getRepeat: function(callback) {
+- this.GetRemote('LoopStatus', Lang.bind(this,
+- function(repeat, ex) {
+- if (!ex) {
+- if (repeat == "None")
+- repeat = false
+- else
+- repeat = true
+- callback(this, repeat);
+- }
+- }));
+- },
+- setRepeat: function(value) {
+- if (value)
+- value = "Playlist"
+- else
+- value = "None"
+- this.SetRemote('LoopStatus', value);
+- }
++var MediaServer2PlayerProxy = Gio.DBusProxy.makeProxyWrapper(MediaServer2PlayerIFace);
++function MediaServer2Player(owner, initCallback, cancellable) {
++ return new MediaServer2PlayerProxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable);
+ }
+-DBus.proxifyPrototype(MediaServer2Player.prototype, MediaServer2PlayerIFace)
+
+ function TrackInfo() {
+ this._init.apply(this, arguments);
+@@ -715,7 +569,7 @@ MyApplet.prototype = {
+ this._players = {};
+ // watch players
+ for (var p=0; p<compatible_players.length; p++) {
+- DBus.session.watch_name('org.mpris.MediaPlayer2.'+compatible_players[p], false,
++ Gio.DBus.session.watch_name('org.mpris.MediaPlayer2.'+compatible_players[p], false,
+ Lang.bind(this, this._addPlayer),
+ Lang.bind(this, this._removePlayer)
+ );
+diff --git a/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js
+index 0dcf74d..c2d152a 100644
+--- a/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js
+@@ -1,6 +1,6 @@
+ /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
+
+-const DBus = imports.dbus;
++const Gio = imports.gi.Gio;
+ const Gdk = imports.gi.Gdk;
+ const GLib = imports.gi.GLib;
+ const GnomeDesktop = imports.gi.GnomeDesktop;
+@@ -22,13 +22,14 @@ let rotations = [ [ GnomeDesktop.RRRotation.ROTATION_0, N_("Normal") ],
+ [ GnomeDesktop.RRRotation.ROTATION_180, N_("Upside-down") ]
+ ];
+
+-const XRandr2Iface = {
+- name: 'org.gnome.SettingsDaemon.XRANDR_2',
+- methods: [
+- { name: 'ApplyConfiguration', inSignature: 'xx', outSignature: '' },
+- ]
+-};
+-let XRandr2 = DBus.makeProxyClass(XRandr2Iface);
++const XRandr2Iface = <interface name="org.gnome.SettingsDaemon.XRANDR_2">
++<method name="ApplyConfiguration">
++ <arg type="x" direction="in"/>
++ <arg type="x" direction="in"/>
++</method>
++</interface>;
++
++const XRandr2 = Gio.DBusProxy.makeProxyWrapper(XRandr2Iface);
+
+ function MyApplet(orientation, panel_height) {
+ this._init(orientation, panel_height);
+@@ -48,7 +49,7 @@ MyApplet.prototype = {
+ this.menu = new Applet.AppletPopupMenu(this, orientation);
+ this.menuManager.addMenu(this.menu);
+
+- this._proxy = new XRandr2(DBus.session, 'org.gnome.SettingsDaemon', '/org/gnome/SettingsDaemon/XRANDR');
++ this._proxy = new XRandr2(Gio.DBus.session, 'org.gnome.SettingsDaemon', '/org/gnome/SettingsDaemon/XRANDR');
+
+ try {
+ this._screen = new GnomeDesktop.RRScreen({ gdk_screen: Gdk.Screen.get_default() });
+diff --git a/js/misc/gnomeSession.js b/js/misc/gnomeSession.js
+index a2b61fd..e21d3a8 100644
+--- a/js/misc/gnomeSession.js
++++ b/js/misc/gnomeSession.js
+@@ -1,20 +1,18 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+-const DBus = imports.dbus;
++const Gio = imports.gi.Gio;
+ const Lang = imports.lang;
+ const Signals = imports.signals;
+
+-const PresenceIface = {
+- name: 'org.gnome.SessionManager.Presence',
+- methods: [{ name: 'SetStatus',
+- inSignature: 'u',
+- outSignature: '' }],
+- properties: [{ name: 'status',
+- signature: 'u',
+- access: 'readwrite' }],
+- signals: [{ name: 'StatusChanged',
+- inSignature: 'u' }]
+-};
++const PresenceIface = <interface name="org.gnome.SessionManager.Presence">
++<method name="SetStatus">
++ <arg type="u" direction="in"/>
++</method>
++<property name="status" type="u" access="readwrite"/>
++<signal name="StatusChanged">
++ <arg type="u" direction="out"/>
++</signal>
++</interface>;
+
+ const PresenceStatus = {
+ AVAILABLE: 0,
+@@ -23,104 +21,37 @@ const PresenceStatus = {
+ IDLE: 3
+ };
+
+-function Presence() {
+- this._init();
++var PresenceProxy = Gio.DBusProxy.makeProxyWrapper(PresenceIface);
++function Presence(initCallback, cancellable) {
++ return new PresenceProxy(Gio.DBus.session, 'org.gnome.SessionManager',
++ '/org/gnome/SessionManager/Presence', initCallback, cancellable);
+ }
+
+-Presence.prototype = {
+- _init: function() {
+- DBus.session.proxifyObject(this, 'org.gnome.SessionManager', '/org/gnome/SessionManager/Presence', this);
+- },
+-
+- getStatus: function(callback) {
+- this.GetRemote('status', Lang.bind(this,
+- function(status, ex) {
+- if (!ex)
+- callback(this, status);
+- }));
+- },
+-
+- setStatus: function(status) {
+- this.SetStatusRemote(status);
+- }
+-};
+-DBus.proxifyPrototype(Presence.prototype, PresenceIface);
+-
+-// Note inhibitors are immutable objects, so they don't
+-// change at runtime (changes always come in the form
+-// of new inhibitors)
+-const InhibitorIface = {
+- name: 'org.gnome.SessionManager.Inhibitor',
+- properties: [{ name: 'app_id',
+- signature: 's',
+- access: 'readonly' },
+- { name: 'client_id',
+- signature: 's',
+- access: 'readonly' },
+- { name: 'reason',
+- signature: 's',
+- access: 'readonly' },
+- { name: 'flags',
+- signature: 'u',
+- access: 'readonly' },
+- { name: 'toplevel_xid',
+- signature: 'u',
+- access: 'readonly' },
+- { name: 'cookie',
+- signature: 'u',
+- access: 'readonly' }],
+-};
+-
+-function Inhibitor(objectPath) {
+- this._init(objectPath);
++const InhibitorIface = <interface name="org.gnome.SessionManager.Inhibitor">
++<property name="app_id" type="s" access="read" />
++<property name="client_id" type="s" access="read" />
++<property name="reason" type="s" access="read" />
++<property name="flags" type="u" access="read" />
++<property name="toplevel_xid" type="u" access="read" />
++<property name="cookie" type="u" access="read" />
++</interface>;
++
++var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface);
++function Inhibitor(objectPath, initCallback, cancellable) {
++ return new InhibitorProxy(Gio.DBus.session, 'org.gnome.SessionManager', objectPath, initCallback, cancellable);
+ }
+
+-Inhibitor.prototype = {
+- _init: function(objectPath) {
+- DBus.session.proxifyObject(this,
+- 'org.gnome.SessionManager',
+- objectPath);
+- this.isLoaded = false;
+- this._loadingPropertiesCount = InhibitorIface.properties.length;
+- for (let i = 0; i < InhibitorIface.properties.length; i++) {
+- let propertyName = InhibitorIface.properties[i].name;
+- this.GetRemote(propertyName, Lang.bind(this,
+- function(value, exception) {
+- if (exception)
+- return;
+-
+- this[propertyName] = value;
+- this._loadingPropertiesCount--;
+-
+- if (this._loadingPropertiesCount == 0) {
+- this.isLoaded = true;
+- this.emit('is-loaded');
+- }
+- }));
+- }
+- },
+-};
+-DBus.proxifyPrototype(Inhibitor.prototype, InhibitorIface);
+-Signals.addSignalMethods(Inhibitor.prototype);
+-
+-
+-// Not the full interface, only the methods we use
+-const SessionManagerIface = {
+- name: 'org.gnome.SessionManager',
+- methods: [
+- { name: 'Logout', inSignature: 'u', outSignature: '' },
+- { name: 'Shutdown', inSignature: '', outSignature: '' },
+- { name: 'CanShutdown', inSignature: '', outSignature: 'b' }
+- ]
+-};
+-
+-function SessionManager() {
+- this._init();
++const SessionManagerIface = <interface name="org.gnome.SessionManager">
++<method name="Logout">
++ <arg type="u" direction="in" />
++</method>
++<method name="Shutdown" />
++<method name="CanShutdown">
++ <arg type="b" direction="out" />
++</method>
++</interface>;
++
++var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface);
++function SessionManager(initCallback, cancellable) {
++ return new SessionManagerProxy(Gio.DBus.session, 'org.gnome.SessionManager', '/org/gnome/SessionManager', initCallback, cancellable);
+ }
+-
+-SessionManager.prototype = {
+- _init: function() {
+- DBus.session.proxifyObject(this, 'org.gnome.SessionManager', '/org/gnome/SessionManager');
+- }
+-};
+-DBus.proxifyPrototype(SessionManager.prototype, SessionManagerIface);
+\ No newline at end of file
+diff --git a/js/misc/modemManager.js b/js/misc/modemManager.js
+index befd142..f35f925 100644
+--- a/js/misc/modemManager.js
++++ b/js/misc/modemManager.js
+@@ -1,6 +1,6 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+-const DBus = imports.dbus;
++const Gio = imports.gi.Gio;
+ const Lang = imports.lang;
+ const Cinnamon = imports.gi.Cinnamon;
+ const Signals = imports.signals;
+@@ -8,33 +8,43 @@ const Signals = imports.signals;
+ // The following are not the complete interfaces, just the methods we need
+ // (or may need in the future)
+
+-const ModemGsmNetworkInterface = {
+- name: 'org.freedesktop.ModemManager.Modem.Gsm.Network',
+- methods: [
+- { name: 'GetRegistrationInfo', inSignature: '', outSignature: 'uss' },
+- { name: 'GetSignalQuality', inSignature: '', outSignature: 'u' }
+- ],
+- properties: [
+- { name: 'AccessTechnology', signature: 'u', access: 'read' }
+- ],
+- signals: [
+- { name: 'SignalQuality', inSignature: 'u' },
+- { name: 'RegistrationInfo', inSignature: 'uss' }
+- ]
+-};
+-const ModemGsmNetworkProxy = DBus.makeProxyClass(ModemGsmNetworkInterface);
+-
+-const ModemCdmaInterface = {
+- name: 'org.freedesktop.ModemManager.Modem.Cdma',
+- methods: [
+- { name: 'GetSignalQuality', inSignature: '', outSignature: 'u' },
+- { name: 'GetServingSystem', inSignature: '', outSignature: 'usu' }
+- ],
+- signals: [
+- { name: 'SignalQuality', inSignature: 'u' }
+- ]
+-};
+-const ModemCdmaProxy = DBus.makeProxyClass(ModemCdmaInterface);
++const ModemGsmNetworkInterface = <interface name="org.freedesktop.ModemManager.Modem.Gsm.Network">
++<method name="GetRegistrationInfo">
++ <arg type="u" direction="out" />
++ <arg type="s" direction="out" />
++ <arg type="s" direction="out" />
++</method>
++<method name="GetSignalQuality">
++ <arg type="u" direction="out" />
++</method>
++<property name="AccessTechnology" type="u" access="read" />
++<signal name="SignalQuality">
++ <arg type="u" direction="out" />
++</signal>
++<signal name="RegistrationInfo">
++ <arg type="u" direction="out" />
++ <arg type="s" direction="out" />
++ <arg type="s" direction="out" />
++</signal>
++</interface>;
++
++const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface);
++
++const ModemCdmaInterface = <interface name="org.freedesktop.ModemManager.Modem.Cdma">
++<method name="GetSignalQuality">
++ <arg type="u" direction="out" />
++</method>
++<method name="GetServingSystem">
++ <arg type="u" direction="out" />
++ <arg type="s" direction="out" />
++ <arg type="u" direction="out" />
++</method>
++<signal name="SignalQuality">
++ <arg type="u" direction="out" />
++</signal>
++</interface>;
++
++const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface);
+
+ let _providersTable;
+ function _getProvidersTable() {
+@@ -50,17 +60,17 @@ function ModemGsm() {
+
+ ModemGsm.prototype = {
+ _init: function(path) {
+- this._proxy = new ModemGsmNetworkProxy(DBus.system, 'org.freedesktop.ModemManager', path);
++ this._proxy = new ModemGsmNetworkProxy(Gio.DBus.system, 'org.freedesktop.ModemManager', path);
+
+ this.signal_quality = 0;
+ this.operator_name = null;
+
+ // Code is duplicated because the function have different signatures
+- this._proxy.connect('SignalQuality', Lang.bind(this, function(proxy, quality) {
++ this._proxy.connectSignal('SignalQuality', Lang.bind(this, function(proxy, sender, [quality]) {
+ this.signal_quality = quality;
+ this.emit('notify::signal-quality');
+ }));
+- this._proxy.connect('RegistrationInfo', Lang.bind(this, function(proxy, status, code, name) {
++ this._proxy.connectSignal('RegistrationInfo', Lang.bind(this, function(proxy, sender, [status, code, name]) {
+ this.operator_name = this._findOperatorName(name, code);
+ this.emit('notify::operator-name');
+ }));
+@@ -154,12 +164,13 @@ function ModemCdma() {
+ }
+
+ ModemCdma.prototype = {
+- _init: function(path) {
+- this._proxy = new ModemCdmaProxy(DBus.system, 'org.freedesktop.ModemManager', path);
++ _init: function(path) {
++ this._proxy = new ModemCdmaProxy(Gio.DBus.system, 'org.freedesktop.ModemManager', path);
+
+ this.signal_quality = 0;
+ this.operator_name = null;
+- this._proxy.connect('SignalQuality', Lang.bind(this, function(proxy, quality) {
++ this._proxy.connect('SignalQuality', Lang.bind(this, function(proxy, sender, params) {
++ this.signal_quality = params[0];
+ this.signal_quality = quality;
+ this.emit('notify::signal-quality');
+
+diff --git a/js/misc/screenSaver.js b/js/misc/screenSaver.js
+index c471856..aec883f 100644
+--- a/js/misc/screenSaver.js
++++ b/js/misc/screenSaver.js
+@@ -1,53 +1,48 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+-const DBus = imports.dbus;
+ const Lang = imports.lang;
+-
+-const ScreenSaverIface = {
+- name: 'org.gnome.ScreenSaver',
+- methods: [{ name: 'GetActive',
+- inSignature: '',
+- outSignature: 'b' },
+- { name: 'Lock',
+- inSignature: '' },
+- { name: 'SetActive',
+- inSignature: 'b' }],
+- signals: [{ name: 'ActiveChanged',
+- inSignature: 'b' }]
+-};
++const Gio = imports.gi.Gio;
++
++const ScreenSaverIface = <interface name="org.gnome.ScreenSaver">
++<method name="GetActive">
++ <arg type="b" direction="out" />
++</method>
++<method name="Lock" />
++<method name="SetActive">
++ <arg type="b" direction="in" />
++</method>
++<signal name="ActiveChanged">
++ <arg type="b" direction="out" />
++</signal>
++</interface>;
++
++const ScreenSaverInfo = Gio.DBusInterfaceInfo.new_for_xml(ScreenSaverIface);
+
+ function ScreenSaverProxy() {
+- this._init();
++ var self = new Gio.DBusProxy({ g_connection: Gio.DBus.session,
++ g_interface_name: ScreenSaverInfo.name,
++ g_interface_info: ScreenSaverInfo,
++ g_name: 'org.gnome.ScreenSaver',
++ g_object_path: '/org/gnome/ScreenSaver',
++ g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START |
++ Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) });
++ self.init(null);
++ self.screenSaverActive = false;
++
++ self.connectSignal('ActiveChanged', function(proxy, senderName, [isActive]) {
++ self.screenSaverActive = isActive;
++ });
++ self.connect('notify::g-name-owner', function() {
++ if (self.g_name_owner) {
++ self.GetActiveRemote(function(result, excp) {
++ if (result) {
++ let [isActive] = result;
++ self.screenSaverActive = isActive;
++ }
++ });
++ } else
++ self.screenSaverActive = false;
++ });
++
++ return self;
+ }
+-
+-ScreenSaverProxy.prototype = {
+- _init: function() {
+- DBus.session.proxifyObject(this,
+- 'org.gnome.ScreenSaver',
+- '/org/gnome/ScreenSaver');
+-
+- DBus.session.watch_name('org.gnome.ScreenSaver',
+- false, // do not launch a name-owner if none exists
+- Lang.bind(this, this._onSSAppeared),
+- Lang.bind(this, this._onSSVanished));
+-
+- this.screenSaverActive = false;
+- this.connect('ActiveChanged',
+- Lang.bind(this, this._onActiveChanged));
+- },
+-
+- _onSSAppeared: function(owner) {
+- this.GetActiveRemote(Lang.bind(this, function(isActive) {
+- this.screenSaverActive = isActive;
+- }))
+- },
+-
+- _onSSVanished: function(oldOwner) {
+- this.screenSaverActive = false;
+- },
+-
+- _onActiveChanged: function(object, isActive) {
+- this.screenSaverActive = isActive;
+- }
+-};
+-DBus.proxifyPrototype(ScreenSaverProxy.prototype, ScreenSaverIface);
+diff --git a/js/ui/appletManager.js b/js/ui/appletManager.js
+index abf8136..830d80d 100644
+--- a/js/ui/appletManager.js
++++ b/js/ui/appletManager.js
+@@ -7,7 +7,6 @@ const Cinnamon = imports.gi.Cinnamon;
+ const Main = imports.ui.main;
+ const Applet = imports.ui.applet;
+ const Extension = imports.ui.extension;
+-const DBus = imports.dbus;
+
+ // Maps uuid -> metadata object
+ var appletMeta;
+diff --git a/js/ui/automountManager.js b/js/ui/automountManager.js
+index fa73bfe..f29f9f3 100644
+--- a/js/ui/automountManager.js
++++ b/js/ui/automountManager.js
+@@ -1,7 +1,6 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+ const Lang = imports.lang;
+-const DBus = imports.dbus;
+ const Mainloop = imports.mainloop;
+ const Gio = imports.gi.Gio;
+ const Params = imports.misc.params;
+@@ -15,63 +14,57 @@ const SETTING_ENABLE_AUTOMOUNT = 'automount';
+
+ const AUTORUN_EXPIRE_TIMEOUT_SECS = 10;
+
+-const ConsoleKitSessionIface = {
+- name: 'org.freedesktop.ConsoleKit.Session',
+- methods: [{ name: 'IsActive',
+- inSignature: '',
+- outSignature: 'b' }],
+- signals: [{ name: 'ActiveChanged',
+- inSignature: 'b' }]
+-};
++const ConsoleKitSessionIface = <interface name="org.freedesktop.ConsoleKit.Session">
++<method name="isActive">
++ <arg type="b" direction="out" />
++</method>
++<method name="ActiveChanged">
++ <arg type="b" direction="in" />
++</method>
++</interface>;
+
+-const ConsoleKitSessionProxy = DBus.makeProxyClass(ConsoleKitSessionIface);
++const ConsoleKitSessionProxy = Gio.DBusProxy.makeProxyWrapper(ConsoleKitSessionIface);
+
+-const ConsoleKitManagerIface = {
+- name: 'org.freedesktop.ConsoleKit.Manager',
+- methods: [{ name: 'GetCurrentSession',
+- inSignature: '',
+- outSignature: 'o' }]
+-};
++const ConsoleKitManagerIface = <interface name="org.freedesktop.ConsoleKit.Manager">
++<method name="GetCurrentSession">
++ <arg type="o" direction="out" />
++</method>
++</interface>;
+
+-function ConsoleKitManager() {
+- this._init();
+-};
+-
+-ConsoleKitManager.prototype = {
+- _init: function() {
+- this.sessionActive = true;
+-
+- DBus.system.proxifyObject(this,
+- 'org.freedesktop.ConsoleKit',
+- '/org/freedesktop/ConsoleKit/Manager');
++const ConsoleKitManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ConsoleKitManagerIface);
+
+- DBus.system.watch_name('org.freedesktop.ConsoleKit',
+- false, // do not launch a name-owner if none exists
+- Lang.bind(this, this._onManagerAppeared),
+- Lang.bind(this, this._onManagerVanished));
+- },
+-
+- _onManagerAppeared: function(owner) {
+- this.GetCurrentSessionRemote(Lang.bind(this, this._onCurrentSession));
+- },
+-
+- _onManagerVanished: function(oldOwner) {
+- this.sessionActive = true;
+- },
+-
+- _onCurrentSession: function(session) {
+- this._ckSession = new ConsoleKitSessionProxy(DBus.system, 'org.freedesktop.ConsoleKit', session);
+-
+- this._ckSession.connect
+- ('ActiveChanged', Lang.bind(this, function(object, isActive) {
+- this.sessionActive = isActive;
+- }));
+- this._ckSession.IsActiveRemote(Lang.bind(this, function(isActive) {
+- this.sessionActive = isActive;
+- }));
++function ConsoleKitManager() {
++ var self = new Gio.DBusProxy({ g_connection: Gio.DBus.system,
++ g_interface_name: ConsoleKitManagerInfo.name,
++ g_interface_info: ConsoleKitManagerInfo,
++ g_name: 'org.freedesktop.ConsoleKit',
++ g_object_path: '/org/freedesktop/ConsoleKit/Manager',
++ g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START |
++ Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) });
++
++ self._updateSessionActive = function() {
++ if (self.g_name_owner) {
++ self.GetCurrentSessionRemote(function([session]) {
++ self._ckSession = new ConsoleKitSessionProxy(Gio.DBus.system, 'org.freedesktop.ConsoleKit', session);
++
++ self._ckSession.connectSignal('ActiveChanged', function(object, senderName, [isActive]) {
++ self.sessionActive = isActive;
++ });
++ self._ckSession.IsActiveRemote(function([isActive]) {
++ self.sessionActive = isActive;
++ });
++ });
++ } else {
++ self.sessionActive = true;
++ }
+ }
+-};
+-DBus.proxifyPrototype(ConsoleKitManager.prototype, ConsoleKitManagerIface);
++ self.connect('notify::g-name-owner',
++ Lang.bind(self, self._updateSessionActive));
++
++ self._updateSessionActive();
++ self.init(null);
++ return self;
++}
+
+ function AutomountManager() {
+ this._init();
+@@ -85,9 +78,8 @@ AutomountManager.prototype = {
+ this.ckListener = new ConsoleKitManager();
+
+ this._ssProxy = new ScreenSaver.ScreenSaverProxy();
+- this._ssProxy.connect('ActiveChanged',
+- Lang.bind(this,
+- this._screenSaverActiveChanged));
++ this._ssProxy.connectSignal('ActiveChanged',
++ Lang.bind(this, this._screenSaverActiveChanged));
+
+ this._volumeMonitor = Gio.VolumeMonitor.get();
+
+@@ -110,7 +102,7 @@ AutomountManager.prototype = {
+ Mainloop.idle_add(Lang.bind(this, this._startupMountAll));
+ },
+
+- _screenSaverActiveChanged: function(object, isActive) {
++ _screenSaverActiveChanged: function(object, senderName, [isActive]) {
+ if (!isActive) {
+ this._volumeQueue.forEach(Lang.bind(this, function(volume) {
+ this._checkAndMountVolume(volume);
+diff --git a/js/ui/autorunManager.js b/js/ui/autorunManager.js
+index 02cd4da..99b6fbe 100644
+--- a/js/ui/autorunManager.js
++++ b/js/ui/autorunManager.js
+@@ -1,7 +1,6 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+ const Lang = imports.lang;
+-const DBus = imports.dbus;
+ const Gio = imports.gi.Gio;
+ const St = imports.gi.St;
+
+@@ -61,25 +60,19 @@ function startAppForMount(app, mount) {
+
+ /******************************************/
+
+-const HotplugSnifferIface = {
+- name: 'org.Cinnamon.HotplugSniffer',
+- methods: [{ name: 'SniffURI',
+- inSignature: 's',
+- outSignature: 'as' }]
+-};
+-
+-const HotplugSniffer = function() {
+- this._init();
+-};
++const HotplugSnifferIface = <interface name="org.Cinnamon.HotplugSniffer">
++<method name="SniffURI">
++ <arg type="s" direction="in" />
++ <arg type="as" direction="out" />
++</method>
++</interface>;
+
+-HotplugSniffer.prototype = {
+- _init: function() {
+- DBus.session.proxifyObject(this,
++const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface);
++function HotplugSniffer() {
++ return new HotplugSnifferProxy(Gio.DBus.session,
+ 'org.Cinnamon.HotplugSniffer',
+ '/org/Cinnamon/HotplugSniffer');
+- },
+-};
+-DBus.proxifyPrototype(HotplugSniffer.prototype, HotplugSnifferIface);
++}
+
+ function ContentTypeDiscoverer(callback) {
+ this._init(callback);
+diff --git a/js/ui/calendar.js b/js/ui/calendar.js
+index ff4777a..a97e2a9 100644
+--- a/js/ui/calendar.js
++++ b/js/ui/calendar.js
+@@ -1,6 +1,5 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+-const DBus = imports.dbus;
+ const Clutter = imports.gi.Clutter;
+ const Gio = imports.gi.Gio;
+ const Lang = imports.lang;
+@@ -194,30 +193,34 @@ EmptyEventSource.prototype = {
+ };
+ Signals.addSignalMethods(EmptyEventSource.prototype);
+
+-const CalendarServerIface = {
+- name: 'org.Cinnamon.CalendarServer',
+- methods: [{ name: 'GetEvents',
+- inSignature: 'xxb',
+- outSignature: 'a(sssbxxa{sv})' }],
+- signals: [{ name: 'Changed',
+- inSignature: '' }]
+-};
+-
+-const CalendarServer = function () {
+- this._init();
+-};
+-
+-CalendarServer.prototype = {
+- _init: function() {
+- DBus.session.proxifyObject(this, 'org.Cinnamon.CalendarServer', '/org/Cinnamon/CalendarServer');
+- }
+-};
+-
+-DBus.proxifyPrototype(CalendarServer.prototype, CalendarServerIface);
++const CalendarServerIface = <interface name="org.Cinnamon.CalendarServer">
++<method name="GetEvents">
++ <arg type="x" direction="in" />
++ <arg type="x" direction="in" />
++ <arg type="b" direction="in" />
++ <arg type="a(sssbxxa{sv})" direction="out" />
++</method>
++<signal name="Changed" />
++</interface>;
++
++const CalendarServerInfo = Gio.DBusInterfaceInfo.new_for_xml(CalendarServerIface);
++
++function CalendarServer() {
++ var self = new Gio.DBusProxy({ g_connection: Gio.DBus.session,
++ g_interface_name: CalendarServerInfo.name,
++ g_interface_info: CalendarServerInfo,
++ g_name: 'org.Cinnamon.CalendarServer',
++ g_object_path: '/org/Cinnamon/CalendarServer',
++ g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START |
++ Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) });
++
++ self.init(null);
++ return self;
++}
+
+ // an implementation that reads data from a session bus service
+-function DBusEventSource(owner) {
+- this._init(owner);
++function DBusEventSource() {
++ this._init();
+ }
+
+ function _datesEqual(a, b) {
+@@ -240,16 +243,18 @@ function _dateIntervalsOverlap(a0, a1, b0, b1)
+
+
+ DBusEventSource.prototype = {
+- _init: function(owner) {
++ _init: function() {
+ this._resetCache();
+
+- this._dbusProxy = new CalendarServer(owner);
+- this._dbusProxy.connect('Changed', Lang.bind(this, this._onChanged));
++ this._dbusProxy = new CalendarServer();
++ this._dbusProxy.connectSignal('Changed', Lang.bind(this, this._onChanged));
+
+- DBus.session.watch_name('org.Cinnamon.CalendarServer',
+- false, // do not launch a name-owner if none exists
+- Lang.bind(this, this._onNameAppeared),
+- Lang.bind(this, this._onNameVanished));
++ this._dbusProxy.connect('notify::g-name-owner', Lang.bind(this, function() {
++ if (this._dbusProxy.g_name_owner)
++ this._onNameAppeared();
++ else
++ this._onNameVanished();
++ }));
+ },
+
+ _resetCache: function() {
+@@ -272,7 +277,7 @@ DBusEventSource.prototype = {
+ this._loadEvents(false);
+ },
+
+- _onEventsReceived: function(appointments) {
++ _onEventsReceived: function([appointments]) {
+ let newEvents = [];
+ if (appointments != null) {
+ for (let n = 0; n < appointments.length; n++) {
+@@ -295,9 +300,9 @@ DBusEventSource.prototype = {
+
+ _loadEvents: function(forceReload) {
+ if (this._curRequestBegin && this._curRequestEnd){
+- let callFlags = 0;
++ let callFlags = Gio.DBusCallFlags.NO_AUTO_START;
+ if (forceReload)
+- callFlags |= DBus.CALL_FLAG_START;
++ callFlags = Gio.DBusCallFlags.NONE;
+ this._dbusProxy.GetEventsRemote(this._curRequestBegin.getTime() / 1000,
+ this._curRequestEnd.getTime() / 1000,
+ forceReload,
+diff --git a/js/ui/cinnamonDBus.js b/js/ui/cinnamonDBus.js
+index 600e92f..5d4eb1c 100644
+--- a/js/ui/cinnamonDBus.js
++++ b/js/ui/cinnamonDBus.js
+@@ -1,7 +1,7 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+-const DBus = imports.dbus;
+ const Lang = imports.lang;
++const Gio = imports.gi.Gio;
+
+ const Config = imports.misc.config;
+ const Flashspot = imports.ui.flashspot;
+@@ -9,48 +9,53 @@ const Main = imports.ui.main;
+ const AppletManager = imports.ui.appletManager;
+ const DeskletManager = imports.ui.deskletManager;
+
+-const CinnamonIface = {
+- name: 'org.Cinnamon',
+- methods: [{ name: 'Eval',
+- inSignature: 's',
+- outSignature: 'bs'
+- },
+- { name: 'ScreenshotArea',
+- inSignature: 'biiiibs',
+- outSignature: ''
+- },
+- { name: 'ScreenshotWindow',
+- inSignature: 'bbbs',
+- outSignature: ''
+- },
+- { name: 'Screenshot',
+- inSignature: 'bbs',
+- outSignature: ''
+- },
+- {
+- name: 'FlashArea',
+- inSignature: 'iiii',
+- outSignature: ''
+- },
+- {
+- name: 'highlightApplet',
+- inSignature: 'sb',
+- outSignature: ''
+- },
+- {
+- name: 'activateCallback',
+- inSignature: 'ssb',
+- outSignature: ''
+- }
+- ],
+- signals: [],
+- properties: [{ name: 'OverviewActive',
+- signature: 'b',
+- access: 'readwrite' },
+- { name: 'CinnamonVersion',
+- signature: 's',
+- access: 'read' }]
+-};
++
++const CinnamonIface = <interface name="org.Cinnamon">
++<method name="Eval">
++ <arg type="s" direction="in" name="script" />
++ <arg type="b" direction="out" name="success" />
++ <arg type="s" direction="out" name="result" />
++</method>
++<method name="ScreenshotArea">
++include_cursor
++ <arg type="b" direction="in" name="include_cursor"/>
++ <arg type="i" direction="in" name="x"/>
++ <arg type="i" direction="in" name="y"/>
++ <arg type="i" direction="in" name="width"/>
++ <arg type="i" direction="in" name="height"/>
++ <arg type="b" direction="in" name="flash"/>
++ <arg type="s" direction="in" name="filename"/>
++</method>
++<method name="ScreenshotWindow">
++ <arg type="b" direction="in" name="include_frame"/>
++ <arg type="b" direction="in" name="include_cursor"/>
++ <arg type="b" direction="in" name="flash"/>
++ <arg type="s" direction="in" name="filename"/>
++</method>
++<method name="Screenshot">
++ <arg type="b" direction="in" name="include_frame"/>
++ <arg type="b" direction="in" name="flash"/>
++ <arg type="s" direction="in" name="filename"/>
++</method>
++<method name="FlashArea">
++include_cursor
++ <arg type="i" direction="in" name="x"/>
++ <arg type="i" direction="in" name="y"/>
++ <arg type="i" direction="in" name="width"/>
++ <arg type="i" direction="in" name="height"/>
++</method>
++<method name="highlightApplet">
++ <arg type="s" direction="in" />
++ <arg type="b" direction="in" />
++</method>
++<method name="activateCallback">
++ <arg type="s" direction="in" />
++ <arg type="s" direction="in" />
++ <arg type="b" direction="in" />
++</method>
++<property name="OverviewActive" type="b" access="readwrite" />
++<property name="CinnamonVersion" type="s" access="read" />
++</interface>;
+
+ function Cinnamon() {
+ this._init();
+@@ -58,7 +63,8 @@ function Cinnamon() {
+
+ Cinnamon.prototype = {
+ _init: function() {
+- DBus.session.exportObject('/org/Cinnamon', this);
++ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(CinnamonIface, this);
++ this._dbusImpl.export(Gio.DBus.session, '/org/Cinnamon');
+ },
+
+ /**
+@@ -215,5 +221,3 @@ Cinnamon.prototype = {
+ CinnamonVersion: Config.PACKAGE_VERSION
+ };
+
+-DBus.conformExport(Cinnamon.prototype, CinnamonIface);
+-
+diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
+index e909f5f..4f1f7d0 100644
+--- a/js/ui/endSessionDialog.js
++++ b/js/ui/endSessionDialog.js
+@@ -18,19 +18,19 @@
+ * 02110-1335, USA.
+ */
+
+-const DBus = imports.dbus;
+ const Lang = imports.lang;
+ const Signals = imports.signals;
+
+ const AccountsService = imports.gi.AccountsService;
+ const Clutter = imports.gi.Clutter;
++const Gio = imports.gi.Gio;
+ const GLib = imports.gi.GLib;
+ const Gtk = imports.gi.Gtk;
+ const Pango = imports.gi.Pango;
+ const St = imports.gi.St;
+ const Cinnamon = imports.gi.Cinnamon;
+
+-const GnomeSession = imports.misc.gnomeSession
++const GnomeSession = imports.misc.gnomeSession;
+ const ModalDialog = imports.ui.modalDialog;
+ const Tweener = imports.ui.tweener;
+
+@@ -40,20 +40,20 @@ const _ITEM_ICON_SIZE = 48;
+ const _DIALOG_ICON_SIZE = 32;
+
+ const GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
+-
+-const EndSessionDialogIface = {
+- name: 'org.gnome.SessionManager.EndSessionDialog',
+- methods: [{ name: 'Open',
+- inSignature: 'uuuao',
+- outSignature: ''
+- }
+- ],
+- signals: [{ name: 'Canceled',
+- inSignature: '',
+- }],
+- properties: []
+-};
+-
++const EndSessionDialogIface = <interface name="org.gnome.SessionManager.EndSessionDialog">
++<method name="Open">
++ <arg type="u" direction="in" />
++ <arg type="u" direction="in" />
++ <arg type="u" direction="in" />
++ <arg type="ao" direction="in" />
++</method>
++<signal name="ConfirmedLogout" />
++<signal name="ConfirmedReboot" />
++<signal name="ConfirmedShutdown" />
++<signal name="Canceled" />
++<signal name="Closed" />
++</interface>;
++
+ const logoutDialogContent = {
+ subjectWithUser: _("Log Out %s"),
+ subject: _("Log Out"),
+@@ -230,8 +230,6 @@ function _setLabelText(label, text) {
+ function EndSessionDialog() {
+ if (_endSessionDialog == null) {
+ this._init();
+- DBus.session.exportObject('/org/gnome/SessionManager/EndSessionDialog',
+- this);
+ _endSessionDialog = this;
+ }
+
+@@ -328,6 +326,9 @@ EndSessionDialog.prototype = {
+ if (this._applicationList.get_children().length == 0)
+ scrollView.hide();
+ }));
++
++ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(EndSessionDialogIface, this);
++ this._dbusImpl.export(Gio.DBus.session, '/org/gnome/SessionManager/EndSessionDialog');
+ },
+
+ _onDestroy: function() {
+@@ -442,25 +443,19 @@ EndSessionDialog.prototype = {
+
+ close: function() {
+ ModalDialog.ModalDialog.prototype.close.call(this);
+- DBus.session.emit_signal('/org/gnome/SessionManager/EndSessionDialog',
+- 'org.gnome.SessionManager.EndSessionDialog',
+- 'Closed', '', []);
++ this._dbusImpl.emit_signal('Closed', null);
+ },
+
+ cancel: function() {
+ this._stopTimer();
+- DBus.session.emit_signal('/org/gnome/SessionManager/EndSessionDialog',
+- 'org.gnome.SessionManager.EndSessionDialog',
+- 'Canceled', '', []);
++ this._dbusImpl.emit_signal('Canceled', null);
+ this.close(global.get_current_time());
+ },
+
+ _confirm: function(signal) {
+ this._fadeOutDialog();
+ this._stopTimer();
+- DBus.session.emit_signal('/org/gnome/SessionManager/EndSessionDialog',
+- 'org.gnome.SessionManager.EndSessionDialog',
+- signal, '', []);
++ this._dbusImpl.emit_signal(signal, null);
+ },
+
+ _onOpened: function() {
+@@ -512,39 +507,41 @@ EndSessionDialog.prototype = {
+ this._updateContent();
+ },
+
+- OpenAsync: function(type, timestamp, totalSecondsToStayOpen, inhibitorObjectPaths, callback) {
++ OpenAsync: function(parameters, invocation) {
++ let [type, timestamp, totalSecondsToStayOpen, inhibitorObjectPaths] = parameters;
+ this._totalSecondsToStayOpen = totalSecondsToStayOpen;
+ this._inhibitors = [];
+ this._applicationList.destroy_children();
+ this._type = type;
+
+- if (!(this._type in DialogContent))
+- throw new DBus.DBusError('org.Cinnamon.ModalDialog.TypeError',
+- "Unknown dialog type requested");
++ if (!(this._type in DialogContent)) {
++ invocation.report_dbus_error('org.Cinnamon.ModalDialog.TypeError',
++ "Unknown dialog type requested");
++ return;
++ }
+
+ for (let i = 0; i < inhibitorObjectPaths.length; i++) {
+- let inhibitor = new GnomeSession.Inhibitor(inhibitorObjectPaths[i]);
++ let inhibitor = new GnomeSession.Inhibitor(inhibitorObjectPaths[i], Lang.bind(this, function(proxy, error) {
++ this._onInhibitorLoaded(proxy);
++ }));
+
+- inhibitor.connect('is-loaded',
+- Lang.bind(this, function() {
+- this._onInhibitorLoaded(inhibitor);
+- }));
+ this._inhibitors.push(inhibitor);
+ }
+
+ this._updateButtons();
+
+- if (!this.open(timestamp))
+- throw new DBus.DBusError('org.Cinnamon.ModalDialog.GrabError',
+- "Cannot grab pointer and keyboard");
++ if (!this.open(timestamp)) {
++ invocation.report_dbus_error('org.Cinnamon.ModalDialog.GrabError',
++ "Cannot grab pointer and keyboard");
++ return;
++ }
+
+ this._updateContent();
+
+ let signalId = this.connect('opened',
+ Lang.bind(this, function() {
+- callback();
++ invocation.return_value(null);
+ this.disconnect(signalId);
+ }));
+ }
+ };
+-DBus.conformExport(EndSessionDialog.prototype, EndSessionDialogIface);
+diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
+index f55cf93..69edb51 100644
+--- a/js/ui/keyboard.js
++++ b/js/ui/keyboard.js
+@@ -2,7 +2,6 @@
+
+ const Caribou = imports.gi.Caribou;
+ const Clutter = imports.gi.Clutter;
+-const DBus = imports.dbus;
+ const Gdk = imports.gi.Gdk;
+ const Gio = imports.gi.Gio;
+ const GLib = imports.gi.GLib;
+@@ -38,28 +37,27 @@ const PRETTY_KEYS = {
+ 'Alt_L': 'Alt'
+ };
+
+-const CaribouKeyboardIface = {
+- name: 'org.gnome.Caribou.Keyboard',
+- methods: [ { name: 'Show',
+- inSignature: 'u',
+- outSignature: ''
+- },
+- { name: 'Hide',
+- inSignature: 'u',
+- outSignature: ''
+- },
+- { name: 'SetCursorLocation',
+- inSignature: 'iiii',
+- outSignature: ''
+- },
+- { name: 'SetEntryLocation',
+- inSignature: 'iiii',
+- outSignature: ''
+- } ],
+- properties: [ { name: 'Name',
+- signature: 's',
+- access: 'read' } ]
+-};
++const CaribouKeyboardIface = <interface name='org.gnome.Caribou.Keyboard'>
++<method name='Show'>
++ <arg type='u' direction='in' />
++</method>
++<method name='Hide'>
++ <arg type='u' direction='in' />
++</method>
++<method name='SetCursorLocation'>
++ <arg type='i' direction='in' />
++ <arg type='i' direction='in' />
++ <arg type='i' direction='in' />
++ <arg type='i' direction='in' />
++</method>
++<method name='SetEntryLocation'>
++ <arg type='i' direction='in' />
++ <arg type='i' direction='in' />
++ <arg type='i' direction='in' />
++ <arg type='i' direction='in' />
++</method>
++<property name='Name' access='read' type='s' />
++</interface>;
+
+ function Key() {
+ this._init.apply(this, arguments);
+@@ -199,7 +197,8 @@ function Keyboard() {
+
+ Keyboard.prototype = {
+ _init: function () {
+- DBus.session.exportObject('/org/gnome/Caribou/Keyboard', this);
++ this._impl = Gio.DBusExportedObject.wrapJSObject(CaribouKeyboardIface, this);
++ this._impl.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard');
+
+ this.actor = null;
+
+@@ -541,7 +540,6 @@ Keyboard.prototype = {
+ return 'cinnamon';
+ }
+ };
+-DBus.conformExport(Keyboard.prototype, CaribouKeyboardIface);
+
+ function KeyboardSource() {
+ this._init.apply(this, arguments);
+diff --git a/js/ui/layout.js b/js/ui/layout.js
+index 76303b9..b97459e 100644
+--- a/js/ui/layout.js
++++ b/js/ui/layout.js
+@@ -488,12 +488,14 @@ Chrome.prototype = {
+
+ this._screenSaverActive = false;
+ this._screenSaverProxy = new ScreenSaver.ScreenSaverProxy();
+- this._screenSaverProxy.connect('ActiveChanged', Lang.bind(this, this._onScreenSaverActiveChanged));
+- this._screenSaverProxy.GetActiveRemote(Lang.bind(this,
+- function(result, err) {
+- if (!err)
+- this._onScreenSaverActiveChanged(this._screenSaverProxy, result);
+- }));
++ this._screenSaverProxy.connectSignal('ActiveChanged', Lang.bind(this, function(proxy, senderName, [isActive]) {
++ this._onScreenSaverActiveChanged(isActive);
++ }));
++ this._screenSaverProxy.GetActiveRemote(Lang.bind(this, function(result, err) {
++ if (!err)
++ this._onScreenSaverActiveChanged(result[0]);
++ }));
++
+
+ this._relayout();
+ },
+diff --git a/js/ui/magnifierDBus.js b/js/ui/magnifierDBus.js
+index 72bba26..4d21797 100644
+--- a/js/ui/magnifierDBus.js
++++ b/js/ui/magnifierDBus.js
+@@ -1,6 +1,6 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+-const DBus = imports.dbus;
++const Gio = imports.gi.Gio;
+ const Main = imports.ui.main;
+
+ const MAG_SERVICE_NAME = 'org.gnome.Magnifier';
+@@ -10,47 +10,85 @@ const ZOOM_SERVICE_PATH = '/org/gnome/Magnifier/ZoomRegion';
+
+ // Subset of gnome-mag's Magnifier dbus interface -- to be expanded. See:
+ // http://git.gnome.org/browse/gnome-mag/tree/xml/...Magnifier.xml
+-const MagnifierIface = {
+- name: MAG_SERVICE_NAME,
+- methods: [
+- { name: 'setActive', inSignature: 'b', outSignature: '' },
+- { name: 'isActive', inSignature: '', outSignature: 'b' },
+- { name: 'showCursor', inSignature: '', outSignature: '' },
+- { name: 'hideCursor', inSignature: '', outSignature: '' },
+- { name: 'createZoomRegion', inSignature: 'ddaiai', outSignature: 'o' },
+- { name: 'addZoomRegion', inSignature: 'o', outSignature: 'b' },
+- { name: 'getZoomRegions', inSignature: '', outSignature: 'ao' },
+- { name: 'clearAllZoomRegions', inSignature: '', outSignature: '' },
+- { name: 'fullScreenCapable', inSignature: '', outSignature: 'b' },
+-
+- { name: 'setCrosswireSize', inSignature: 'i', outSignature: '' },
+- { name: 'getCrosswireSize', inSignature: '', outSignature: 'i' },
+- { name: 'setCrosswireLength', inSignature: 'i', outSignature: '' },
+- { name: 'getCrosswireLength', inSignature: '', outSignature: 'i' },
+- { name: 'setCrosswireClip', inSignature: 'b', outSignature: '' },
+- { name: 'getCrosswireClip', inSignature: '', outSignature: 'b' },
+- { name: 'setCrosswireColor', inSignature: 'u', outSignature: '' },
+- { name: 'getCrosswireColor', inSignature: '', outSignature: 'u' }
+- ],
+- signals: [],
+- properties: []
+-};
++const MagnifierIface = <interface name={MAG_SERVICE_NAME}>
++<method name="setActive">
++ <arg type="b" direction="in" />
++</method>
++<method name="isActive">
++ <arg type="b" direction="out" />
++</method>
++<method name="showCursor" />
++<method name="hideCursor" />
++<method name="createZoomRegion">
++ <arg type="d" direction="in" />
++ <arg type="d" direction="in" />
++ <arg type="ai" direction="in" />
++ <arg type="ai" direction="in" />
++ <arg type="o" direction="out" />
++</method>
++<method name="addZoomRegion">
++ <arg type="o" direction="in" />
++ <arg type="b" direction="out" />
++</method>
++<method name="getZoomRegions">
++ <arg type="ao" direction="out" />
++</method>
++<method name="clearAllZoomRegions" />
++<method name="fullScreenCapable">
++ <arg type="b" direction="out" />
++</method>
++<method name="setCrosswireSize">
++ <arg type="i" direction="in" />
++</method>
++<method name="getCrosswireSize">
++ <arg type="i" direction="out" />
++</method>
++<method name="setCrosswireLength">
++ <arg type="i" direction="in" />
++</method>
++<method name="getCrosswireLength">
++ <arg type="i" direction="out" />
++</method>
++<method name="setCrosswireClip">
++ <arg type="b" direction="in" />
++</method>
++<method name="getCrosswireClip">
++ <arg type="b" direction="out" />
++</method>
++<method name="setCrosswireColor">
++ <arg type="u" direction="in" />
++</method>
++<method name="getCrosswireColor">
++ <arg type="u" direction="out" />
++</method>
++</interface>;
+
+ // Subset of gnome-mag's ZoomRegion dbus interface -- to be expanded. See:
+ // http://git.gnome.org/browse/gnome-mag/tree/xml/...ZoomRegion.xml
+-const ZoomRegionIface = {
+- name: ZOOM_SERVICE_NAME,
+- methods: [
+- { name: 'setMagFactor', inSignature: 'dd', outSignature: ''},
+- { name: 'getMagFactor', inSignature: '', outSignature: 'dd' },
+- { name: 'setRoi', inSignature: 'ai', outSignature: '' },
+- { name: 'getRoi', inSignature: '', outSignature: 'ai' },
+- { name: 'shiftContentsTo', inSignature: 'ii', outSignature: 'b' },
+- { name: 'moveResize', inSignature: 'ai', outSignature: '' }
+- ],
+- signals: [],
+- properties: []
+-};
++const ZoomRegionIface = <interface name={ZOOM_SERVICE_NAME}>
++<method name="setMagFactor">
++ <arg type="d" direction="in" />
++ <arg type="d" direction="in" />
++</method>
++<method name="getMagFactor">
++ <arg type="d" direction="out" />
++ <arg type="d" direction="out" />
++</method>
++<method name="setRoi">
++ <arg type="ai" direction="in" />
++</method>
++<method name="getRoi">
++ <arg type="ai" direction="out" />
++</method>
++<method name="shiftContentsTo">
++ <arg type="i" direction="in" />
++ <arg type="i" direction="in" />
++ <arg type="b" direction="out" />
++</method>
++<method name="moveResize">
++ <arg type="ai" direction="in" />
++</method>
++</interface>;
+
+ // For making unique ZoomRegion DBus proxy object paths of the form:
+ // '/org/gnome/Magnifier/ZoomRegion/zoomer0',
+@@ -64,7 +102,9 @@ function CinnamonMagnifier() {
+ CinnamonMagnifier.prototype = {
+ _init: function() {
+ this._zoomers = {};
+- DBus.session.exportObject(MAG_SERVICE_PATH, this);
++
++ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(MagnifierIface, this);
++ this._dbusImpl.export(Gio.DBus.session, MAG_SERVICE_PATH);
+ },
+
+ /**
+@@ -195,10 +235,10 @@ CinnamonMagnifier.prototype = {
+ Main.magnifier.clearAllZoomRegions();
+ for (let objectPath in this._zoomers) {
+ let proxyAndZoomer = this._zoomers[objectPath];
++ proxyAndZoomer.proxy.destroy();
+ proxyAndZoomer.proxy = null;
+ proxyAndZoomer.zoomRegion = null;
+ delete this._zoomers[objectPath];
+- DBus.session.unexportObject(proxyAndZoomer);
+ }
+ this._zoomers = {};
+ },
+@@ -300,8 +340,9 @@ function CinnamonMagnifierZoomRegion(zoomerObjectPath, zoomRegion) {
+ CinnamonMagnifierZoomRegion.prototype = {
+ _init: function(zoomerObjectPath, zoomRegion) {
+ this._zoomRegion = zoomRegion;
+- DBus.session.proxifyObject(this, ZOOM_SERVICE_NAME, zoomerObjectPath);
+- DBus.session.exportObject(zoomerObjectPath, this);
++
++ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(ZoomRegionIface, this);
++ this._dbusImpl.export(Gio.DBus.session, zoomerObjectPath);
+ },
+
+ /**
+@@ -376,8 +417,9 @@ CinnamonMagnifierZoomRegion.prototype = {
+ moveResize: function(viewPort) {
+ let viewRect = { x: viewPort[0], y: viewPort[1], width: viewPort[2] - viewPort[0], height: viewPort[3] - viewPort[1] };
+ this._zoomRegion.setViewPort(viewRect);
++ },
++
++ destroy: function() {
++ this._dbusImpl.unexport();
+ }
+ };
+-
+-DBus.conformExport(CinnamonMagnifier.prototype, MagnifierIface);
+-DBus.conformExport(CinnamonMagnifierZoomRegion.prototype, ZoomRegionIface);
+diff --git a/js/ui/main.js b/js/ui/main.js
+index 5cae372..180db5c 100644
+--- a/js/ui/main.js
++++ b/js/ui/main.js
+@@ -1,7 +1,6 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+ const Clutter = imports.gi.Clutter;
+-const DBus = imports.dbus;
+ const Gio = imports.gi.Gio;
+ const GLib = imports.gi.GLib;
+ const Gtk = imports.gi.Gtk;
+@@ -199,11 +198,6 @@ function start() {
+
+ cinnamonDBusService = new CinnamonDBus.Cinnamon();
+ lookingGlassDBusService = new LookingGlassDBus.CinnamonLookingGlass();
+- // Force a connection now; dbus.js will do this internally
+- // if we use its name acquisition stuff but we aren't right
+- // now; to do so we'd need to convert from its async calls
+- // back into sync ones.
+- DBus.session.flush();
+
+ // Ensure CinnamonWindowTracker and CinnamonAppUsage are initialized; this will
+ // also initialize CinnamonAppSystem first. CinnamonAppSystem
+diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
+index 18d6615..8bed028 100644
+--- a/js/ui/messageTray.js
++++ b/js/ui/messageTray.js
+@@ -1388,12 +1388,17 @@ function MessageTray() {
+
+ MessageTray.prototype = {
+ _init: function() {
+- this._presence = new GnomeSession.Presence();
++ this._presence = new GnomeSession.Presence(Lang.bind(this, function(proxy, error) {
++ this._onStatusChanged(proxy.status);
++ }));
++
+ this._userStatus = GnomeSession.PresenceStatus.AVAILABLE;
+ this._busy = false;
+ this._backFromAway = false;
+- this._presence.connect('StatusChanged', Lang.bind(this, this._onStatusChanged));
+- this._presence.getStatus(Lang.bind(this, this._onStatusChanged));
++ this._presence.connectSignal('StatusChanged', Lang.bind(this, function(proxy, senderName, [status]) {
++ this._onStatusChanged(status);
++ }));
++
+
+ this._notificationBin = new St.Bin();
+ this._notificationBin.hide();
+@@ -1548,7 +1553,7 @@ MessageTray.prototype = {
+ this._updateState();
+ },
+
+- _onStatusChanged: function(presence, status) {
++ _onStatusChanged: function(status) {
+ this._backFromAway = (this._userStatus == GnomeSession.PresenceStatus.IDLE && this._userStatus != status);
+ this._userStatus = status;
+
+diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
+index bee8ffd..b037e07 100644
+--- a/js/ui/notificationDaemon.js
++++ b/js/ui/notificationDaemon.js
+@@ -1,7 +1,7 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+ const Clutter = imports.gi.Clutter;
+-const DBus = imports.dbus;
++const Gio = imports.gi.Gio;
+ const GLib = imports.gi.GLib;
+ const Lang = imports.lang;
+ const Cinnamon = imports.gi.Cinnamon;
+@@ -14,49 +14,52 @@ const Params = imports.misc.params;
+
+ let nextNotificationId = 1;
+
+-// Should really be defined in dbus.js
+-const BusIface = {
+- name: 'org.freedesktop.DBus',
+- methods: [{ name: 'GetConnectionUnixProcessID',
+- inSignature: 's',
+- outSignature: 'i' }]
+-};
+-
+-const Bus = function () {
+- this._init();
+-};
+-
+-Bus.prototype = {
+- _init: function() {
+- DBus.session.proxifyObject(this, 'org.freedesktop.DBus', '/org/freedesktop/DBus');
+- }
+-};
++// Should really be defined in Gio.js
++const BusIface = <interface name="org.freedesktop.DBus">
++<method name="GetConnectionUnixProcessID">
++ <arg type="s" direction="in" />
++ <arg type="u" direction="out" />
++</method>
++</interface>;
++
++var BusProxy = Gio.DBusProxy.makeProxyWrapper(BusIface);
++function Bus() {
++ return new BusProxy(Gio.DBus.session, 'org.freedesktop.DBus', '/org/freedesktop/DBus');
++}
+
+-DBus.proxifyPrototype(Bus.prototype, BusIface);
+-
+-const NotificationDaemonIface = {
+- name: 'org.freedesktop.Notifications',
+- methods: [{ name: 'Notify',
+- inSignature: 'susssasa{sv}i',
+- outSignature: 'u'
+- },
+- { name: 'CloseNotification',
+- inSignature: 'u',
+- outSignature: ''
+- },
+- { name: 'GetCapabilities',
+- inSignature: '',
+- outSignature: 'as'
+- },
+- { name: 'GetServerInformation',
+- inSignature: '',
+- outSignature: 'ssss'
+- }],
+- signals: [{ name: 'NotificationClosed',
+- inSignature: 'uu' },
+- { name: 'ActionInvoked',
+- inSignature: 'us' }]
+-};
++const NotificationDaemonIface = <interface name="org.freedesktop.Notifications">
++<method name="Notify">
++ <arg type="s" direction="in"/>
++ <arg type="u" direction="in"/>
++ <arg type="s" direction="in"/>
++ <arg type="s" direction="in"/>
++ <arg type="s" direction="in"/>
++ <arg type="as" direction="in"/>
++ <arg type="a{sv}" direction="in"/>
++ <arg type="i" direction="in"/>
++ <arg type="u" direction="out"/>
++</method>
++<method name="CloseNotification">
++ <arg type="u" direction="in"/>
++</method>
++<method name="GetCapabilities">
++ <arg type="as" direction="out"/>
++</method>
++<method name="GetServerInformation">
++ <arg type="s" direction="out"/>
++ <arg type="s" direction="out"/>
++ <arg type="s" direction="out"/>
++ <arg type="s" direction="out"/>
++</method>
++<signal name="NotificationClosed">
++ <arg type="u"/>
++ <arg type="u"/>
++</signal>
++<signal name="ActionInvoked">
++ <arg type="u"/>
++ <arg type="s"/>
++</signal>
++</interface>;
+
+ const NotificationClosedReason = {
+ EXPIRED: 1,
+@@ -88,7 +91,8 @@ function NotificationDaemon() {
+
+ NotificationDaemon.prototype = {
+ _init: function() {
+- DBus.session.exportObject('/org/freedesktop/Notifications', this);
++ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(NotificationDaemonIface, this);
++ this._dbusImpl.export(Gio.DBus.session, '/org/freedesktop/Notifications');
+
+ this._sources = [];
+ this._senderToPid = {};
+@@ -213,8 +217,8 @@ NotificationDaemon.prototype = {
+ return source;
+ },
+
+- Notify: function(appName, replacesId, icon, summary, body,
+- actions, hints, timeout) {
++ NotifyAsync: function(params, invocation) {
++ let [appName, replacesId, icon, summary, body, actions, hints, timeout] = params;
+ let id;
+
+ let rewrites = rewriteRules[appName];
+@@ -257,51 +261,55 @@ NotificationDaemon.prototype = {
+ }
+ this._notifications[id] = ndata;
+
+- let sender = DBus.getCurrentMessageContext().sender;
++ let sender = invocation.get_sender();
+ let pid = this._senderToPid[sender];
+
+ let source = this._getSource(appName, pid, ndata, sender, null);
+
+ if (source) {
+ this._notifyForSource(source, ndata);
+- return id;
++ return invocation.return_value(GLib.Variant.new('(u)', [id]));
+ }
+
+ if (replacesId) {
+ // There's already a pending call to GetConnectionUnixProcessID,
+ // which will see the new notification data when it finishes,
+ // so we don't have to do anything.
+- return id;
++ return invocation.return_value(GLib.Variant.new('(u)', [id]));
+ }
+
+- this._busProxy.GetConnectionUnixProcessIDRemote(sender, Lang.bind(this,
+- function (pid, ex) {
+- // The app may have updated or removed the notification
+- ndata = this._notifications[id];
+- if (!ndata)
+- return;
+-
+- source = this._getSource(appName, pid, ndata, sender, null);
+-
+- // We only store sender-pid entries for persistent sources.
+- // Removing the entries once the source is destroyed
+- // would result in the entries associated with transient
+- // sources removed once the notification is shown anyway.
+- // However, keeping these pairs would mean that we would
+- // possibly remove an entry associated with a persistent
+- // source when a transient source for the same sender is
+- // distroyed.
+- if (!source.isTransient) {
+- this._senderToPid[sender] = pid;
+- source.connect('destroy', Lang.bind(this,
+- function() {
+- delete this._senderToPid[sender];
+- }));
+- }
+- this._notifyForSource(source, ndata);
+- }));
++ this._busProxy.GetConnectionUnixProcessIDRemote(sender, Lang.bind(this, function (result, excp) {
++ // The app may have updated or removed the notification
++ ndata = this._notifications[id];
++ if (!ndata)
++ return;
+
+- return id;
++ if (excp) {
++ logError(excp, 'Call to GetConnectionUnixProcessID failed');
++ return;
++ }
++
++ let [pid] = result;
++ source = this._getSource(appName, pid, ndata, sender);
++
++ // We only store sender-pid entries for persistent sources.
++ // Removing the entries once the source is destroyed
++ // would result in the entries associated with transient
++ // sources removed once the notification is shown anyway.
++ // However, keeping these pairs would mean that we would
++ // possibly remove an entry associated with a persistent
++ // source when a transient source for the same sender is
++ // distroyed.
++ if (!source.isTransient) {
++ this._senderToPid[sender] = pid;
++ source.connect('destroy', Lang.bind(this, function() {
++ delete this._senderToPid[sender];
++ }));
++ }
++ this._notifyForSource(source, ndata);
++ }));
++
++ return invocation.return_value(GLib.Variant.new('(u)', [id]));
+ },
+
+ _notifyForSource: function(source, ndata) {
+@@ -441,17 +449,13 @@ NotificationDaemon.prototype = {
+ },
+
+ _emitNotificationClosed: function(id, reason) {
+- DBus.session.emit_signal('/org/freedesktop/Notifications',
+- 'org.freedesktop.Notifications',
+- 'NotificationClosed', 'uu',
+- [id, reason]);
++ this._dbusImpl.emit_signal('NotificationClosed',
++ GLib.Variant.new('(uu)', [id, reason]));
+ },
+
+ _emitActionInvoked: function(id, action) {
+- DBus.session.emit_signal('/org/freedesktop/Notifications',
+- 'org.freedesktop.Notifications',
+- 'ActionInvoked', 'us',
+- [id, action]);
++ this._dbusImpl.emit_signal('ActionInvoked',
++ GLib.Variant.new('(us)', [id, action]));
+ },
+
+ _onTrayIconAdded: function(o, icon) {
+@@ -465,8 +469,6 @@ NotificationDaemon.prototype = {
+ }
+ };
+
+-DBus.conformExport(NotificationDaemon.prototype, NotificationDaemonIface);
+-
+ function Source(title, pid, sender, trayIcon) {
+ this._init(title, pid, sender, trayIcon);
+ }
+@@ -481,15 +483,12 @@ Source.prototype = {
+
+ this.pid = pid;
+ if (sender)
+- // TODO: dbus-glib implementation of watch_name() doesn’t return an id to be used for
+- // unwatch_name() or implement unwatch_name(), however when we move to using GDBus implementation,
+- // we should save the id here and call unwatch_name() with it in destroy().
+- // Moving to GDBus is the work in progress: https://bugzilla.gnome.org/show_bug.cgi?id=648651
+- // and https://bugzilla.gnome.org/show_bug.cgi?id=622921 .
+- DBus.session.watch_name(sender,
+- false,
+- null,
+- Lang.bind(this, this._onNameVanished));
++ this._nameWatcherId = Gio.DBus.session.watch_name(sender,
++ Gio.BusNameWatcherFlags.NONE,
++ null,
++ Lang.bind(this, this._onNameVanished));
++ else
++ this._nameWatcherId = 0;
+
+ this._setApp();
+ if (this.app)
+@@ -596,6 +595,10 @@ Source.prototype = {
+ },
+
+ destroy: function() {
++ if (this._nameWatcherId) {
++ Gio.DBus.session.unwatch_name(this._nameWatcherId);
++ this._nameWatcherId = 0;
++ }
+ MessageTray.Source.prototype.destroy.call(this);
+ }
+ };
+diff --git a/js/ui/scripting.js b/js/ui/scripting.js
+index 42c4f6d..9163d29 100644
+--- a/js/ui/scripting.js
++++ b/js/ui/scripting.js
+@@ -1,6 +1,5 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+-const DBus = imports.dbus;
+ const Gio = imports.gi.Gio;
+ const Mainloop = imports.mainloop;
+ const Meta = imports.gi.Meta;
+@@ -70,24 +69,21 @@ function waitLeisure() {
+ };
+ }
+
+-const PerfHelperIface = {
+- name: 'org.Cinnamon.PerfHelper',
+- methods: [{ name: 'CreateWindow', inSignature: 'iibb', outSignature: '' },
+- { name: 'WaitWindows', inSignature: '', outSignature: '' },
+- { name: 'DestroyWindows', inSignature: '', outSignature: ''}]
+-};
+-
+-const PerfHelper = function () {
+- this._init();
+-};
+-
+-PerfHelper.prototype = {
+- _init: function() {
+- DBus.session.proxifyObject(this, 'org.Cinnamon.PerfHelper', '/org/Cinnamon/PerfHelper');
+- }
+-};
+-
+-DBus.proxifyPrototype(PerfHelper.prototype, PerfHelperIface);
++const PerfHelperIface = <interface name="org.gnome.Shell.PerfHelper">
++<method name="CreateWindow">
++ <arg type="i" direction="in" />
++ <arg type="i" direction="in" />
++ <arg type="b" direction="in" />
++ <arg type="b" direction="in" />
++</method>
++<method name="WaitWindows" />
++<method name="DestroyWindows" />
++</interface>;
++
++var PerfHelperProxy = Gio.DBusProxy.makeProxyWrapper(PerfHelperIface);
++function PerfHelper() {
++ return new PerfHelperProxy(Gio.DBus.session, 'org.gnome.Shell.PerfHelper', '/org/gnome/Shell/PerfHelper');
++}
+
+ let _perfHelper = null;
+ function _getPerfHelper() {
+--
+1.8.1.6
+
+
+From d85e078c0ed09a8b9f8d3ea2ebec1043b6d150c1 Mon Sep 17 00:00:00 2001
+From: dalcde <dalcde@yahoo.com.hk>
+Date: Tue, 16 Apr 2013 16:58:30 +0800
+Subject: [PATCH 07/15] [GDBus][Sound/Power Applet] Fix dbus port issues
+
+---
+ .../cinnamon/applets/power@cinnamon.org/applet.js | 2 +-
+ .../cinnamon/applets/sound@cinnamon.org/applet.js | 83 ++++++++++------------
+ 2 files changed, 37 insertions(+), 48 deletions(-)
+
+diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
+index b6b2bcd..fad39ab 100644
+--- a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
+@@ -212,7 +212,7 @@ MyApplet.prototype = {
+ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+ this.menu.addSettingsAction(_("Power Settings"), 'power');
+
+- this._smProxy.connect('PropertiesChanged', Lang.bind(this, this._devicesChanged));
++ this._smProxy.connectSignal('PropertiesChanged', Lang.bind(this, this._devicesChanged));
+ this._devicesChanged();
+ }
+ catch (e) {
+diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
+index 5bfaf26..52b8cde 100644
+--- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
+@@ -37,7 +37,7 @@ const MediaServer2PlayerIFace = <interface name="org.mpris.MediaPlayer2.Player">
+ <property name='Metadata' access='read' type='a{sv}' />
+ <property name='Shuffle' access='readwrite' type='b' />
+ <property name='Rate' access='readwrite' type='d' />
+-<property name='LoopStatus' access='readwrite' type='b' />
++<property name='LoopStatus' access='readwrite' type='s' />
+ <property name='Volume' access='readwrite' type='d' />
+ <property name='PlaybackStatus' access='read' type='s' />
+ <property name='Position' access='read' type='x' />
+@@ -256,23 +256,20 @@ Player.prototype = {
+ this._trackControls.set_child(this.controls);
+ this.addActor(this._trackControls);
+
+- this._mediaServer.getRaise(Lang.bind(this, function(sender, raise) {
+- if (raise) {
+- this._raiseButton = new ControlButton('go-up',
+- Lang.bind(this, function () { this._mediaServer.RaiseRemote(); this._system_status_button.menu.actor.hide(); }));
+- this._raiseButtonTooltip = new Tooltips.Tooltip(this._raiseButton.button, _("Open Player"));
+- this.controls.add_actor(this._raiseButton.getActor());
+- }
+- }));
+-
+- this._mediaServer.getQuit(Lang.bind(this, function(sender, quit) {
+- if (quit) {
+- this._quitButton = new ControlButton('window-close',
+- Lang.bind(this, function () { this._mediaServer.QuitRemote(); }));
+- this.controls.add_actor(this._quitButton.getActor());
+- this._quitButtonTooltip = new Tooltips.Tooltip(this._quitButton.button, _("Quit Player"));
+- }
+- }));
++ let CanRaise = this._mediaServer.CanRaise;
++ let CanQuit = this._mediaServer.CanQuit;
++ if (CanRaise) {
++ this._raiseButton = new ControlButton('go-up',
++ Lang.bind(this, function () { this._mediaServer.RaiseRemote(); this._system_status_button.menu.actor.hide(); }));
++ this._raiseButtonTooltip = new Tooltips.Tooltip(this._raiseButton.button, _("Open Player"));
++ this.controls.add_actor(this._raiseButton.getActor());
++ }
++ if (CanQuit) {
++ this._quitButton = new ControlButton('window-close',
++ Lang.bind(this, function () { this._mediaServer.QuitRemote(); }));
++ this.controls.add_actor(this._quitButton.getActor());
++ this._quitButtonTooltip = new Tooltips.Tooltip(this._quitButton.button, _("Quit Player"));
++ }
+
+ /* this players don't support seek */
+ if (support_seek.indexOf(this._name) == -1)
+@@ -283,14 +280,14 @@ Player.prototype = {
+ this._currentTime = 0;
+ this._getPosition();
+
+- this._prop.connect('PropertiesChanged', Lang.bind(this, function(sender, iface, value) {
++ this._prop.connectSignal('PropertiesChanged', Lang.bind(this, function(sender, iface, value) {
+ if (value["PlaybackStatus"])
+- this._setStatus(iface, value["PlaybackStatus"]);
++ this._setStatus(value["PlaybackStatus"]);
+ if (value["Metadata"])
+- this._setMetadata(iface, value["Metadata"]);
++ this._setMetadata(value["Metadata"]);
+ }));
+
+- this._mediaServerPlayer.connect('Seeked', Lang.bind(this, function(sender, value) {
++ this._mediaServerPlayer.connectSignal('Seeked', Lang.bind(this, function(sender, iface, [value]) {
+ this._setPosition(sender, value);
+ }));
+
+@@ -315,19 +312,17 @@ Player.prototype = {
+ },
+
+ _getPosition: function() {
+- this._mediaServerPlayer.getPosition(Lang.bind(this,
+- this._setPosition
+- ));
++ this._setPosition(this._mediaServerPlayer.Position);
+ Mainloop.timeout_add(1000, Lang.bind(this, this._getPosition));
+ },
+
+- _setMetadata: function(sender, metadata) {
++ _setMetadata: function(metadata) {
+ if (metadata["mpris:length"]) {
+ // song length in secs
+- this._songLength = metadata["mpris:length"] / 1000000;
++ this._songLength = metadata["mpris:length"].unpack() / 1000000;
+ // FIXME upstream
+ if (this._name == "quodlibet")
+- this._songLength = metadata["mpris:length"] / 1000;
++ this._songLength = metadata["mpris:length"].unpack() / 1000;
+ // reset timer
+ this._stopTimer();
+ if (this._playerStatus == "Playing")
+@@ -338,15 +333,15 @@ Player.prototype = {
+ this._stopTimer();
+ }
+ if (metadata["xesam:artist"])
+- this._artist.setLabel(metadata["xesam:artist"].toString());
++ this._artist.setLabel(metadata["xesam:artist"].unpack());
+ else
+ this._artist.setLabel(_("Unknown Artist"));
+ if (metadata["xesam:album"])
+- this._album.setLabel(metadata["xesam:album"].toString());
++ this._album.setLabel(metadata["xesam:album"].unpack());
+ else
+ this._album.setLabel(_("Unknown Album"));
+ if (metadata["xesam:title"])
+- this._title.setLabel(metadata["xesam:title"].toString());
++ this._title.setLabel(metadata["xesam:title"].unpack());
+ else
+ this._title.setLabel(_("Unknown Title"));
+ /*if (metadata["mpris:trackid"]) {
+@@ -359,8 +354,8 @@ Player.prototype = {
+
+ let change = false;
+ if (metadata["mpris:artUrl"]) {
+- if (this._trackCoverFile != metadata["mpris:artUrl"].toString()) {
+- this._trackCoverFile = metadata["mpris:artUrl"].toString();
++ if (this._trackCoverFile != metadata["mpris:artUrl"].unpack()) {
++ this._trackCoverFile = metadata["mpris:artUrl"].unpack();
+ change = true;
+ }
+ }
+@@ -392,12 +387,10 @@ Player.prototype = {
+ },
+
+ _getMetadata: function() {
+- this._mediaServerPlayer.getMetadata(Lang.bind(this,
+- this._setMetadata
+- ));
++ this._setMetadata(this._mediaServerPlayer.Metadata);
+ },
+
+- _setStatus: function(sender, status) {
++ _setStatus: function(status) {
+ this._playerStatus = status;
+ if (status == "Playing") {
+ this._playButton.setIcon("media-playback-pause");
+@@ -416,15 +409,11 @@ Player.prototype = {
+ },
+
+ _getStatus: function() {
+- this._mediaServerPlayer.getPlaybackStatus(Lang.bind(this,
+- this._setStatus
+- ));
++ this._setStatus(this._mediaServerPlayer.PlaybackStatus);
+ },
+
+ _updateRate: function() {
+- this._mediaServerPlayer.getRate(Lang.bind(this, function(sender, rate) {
+- this._rate = rate;
+- }));
++ this._rate = this._mediaServerPlayer.Rate;
+ },
+
+ _updateTimer: function() {
+@@ -569,7 +558,7 @@ MyApplet.prototype = {
+ this._players = {};
+ // watch players
+ for (var p=0; p<compatible_players.length; p++) {
+- Gio.DBus.session.watch_name('org.mpris.MediaPlayer2.'+compatible_players[p], false,
++ Gio.DBus.session.watch_name('org.mpris.MediaPlayer2.'+compatible_players[p], Gio.BusNameWatcherFlags.NONE,
+ Lang.bind(this, this._addPlayer),
+ Lang.bind(this, this._removePlayer)
+ );
+@@ -700,7 +689,7 @@ MyApplet.prototype = {
+ return Object.keys(this._players).length;
+ },
+
+- _addPlayer: function(owner) {
++ _addPlayer: function(connection, owner) {
+ // ensure menu is empty
+ this._cleanup();
+ this._volumeControlShown = false;
+@@ -715,12 +704,12 @@ MyApplet.prototype = {
+ this._readOutput();
+ },
+
+- _removePlayer: function(owner) {
++ _removePlayer: function(connection, owner) {
+ delete this._players[owner];
+ this._cleanup();
+ this._volumeControlShown = false;
+ for (owner in this._players) {
+- this._addPlayer(owner);
++ this._addPlayer(connection, owner);
+ }
+ this.menu.emit('players-loaded', true);
+
+--
+1.8.1.6
+
+
+From 02da490ff9d33b050e7a10171b5795aee67d1645 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Fri, 19 Apr 2013 19:09:18 -0400
+Subject: [PATCH 08/15] Fix gicon error - power applet
+
+---
+ files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
+index fad39ab..3a13eab 100644
+--- a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
+@@ -323,7 +323,7 @@ MyApplet.prototype = {
+ let icon = this._proxy.Icon;
+ if (icon) {
+ let gicon = Gio.icon_new_for_string(icon);
+- this.setGIcon(gicon);
++ this._applet_icon.gicon = gicon
+ this.actor.show();
+ } else {
+ this.menu.close();
+--
+1.8.1.6
+
+
+From 3d78b5c929e7e3b0ee24d4b537492740e7bebf2f Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Fri, 19 Apr 2013 19:44:33 -0400
+Subject: [PATCH 09/15] Remove unused
+
+---
+ src/cinnamon-background-manager.c | 34 ----------------------------------
+ 1 file changed, 34 deletions(-)
+
+diff --git a/src/cinnamon-background-manager.c b/src/cinnamon-background-manager.c
+index 9d95250..67427ed 100644
+--- a/src/cinnamon-background-manager.c
++++ b/src/cinnamon-background-manager.c
+@@ -66,8 +66,6 @@ struct CinnamonBackgroundManagerPrivate
+
+ G_DEFINE_TYPE (CinnamonBackgroundManager, cinnamon_background_manager, G_TYPE_OBJECT)
+
+-static gpointer manager_object = NULL;
+-
+ static gboolean
+ dont_draw_background (CinnamonBackgroundManager *manager)
+ {
+@@ -223,36 +221,6 @@ struct CinnamonBackgroundManagerPrivate
+ }
+
+ static void
+-draw_background_after_session_loads (CinnamonBackgroundManager *manager)
+-{
+- GError *error = NULL;
+- GDBusProxyFlags flags;
+-
+- flags = G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
+- G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
+- manager->priv->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
+- flags,
+- NULL, /* GDBusInterfaceInfo */
+- "org.gnome.SessionManager",
+- "/org/gnome/SessionManager",
+- "org.gnome.SessionManager",
+- NULL, /* GCancellable */
+- &error);
+- if (manager->priv->proxy == NULL) {
+- g_warning ("Could not listen to session manager: %s",
+- error->message);
+- g_error_free (error);
+- return;
+- }
+-
+- manager->priv->proxy_signal_id = g_signal_connect (manager->priv->proxy,
+- "g-signal",
+- G_CALLBACK (on_session_manager_signal),
+- manager);
+-}
+-
+-
+-static void
+ disconnect_screen_signals (CinnamonBackgroundManager *manager)
+ {
+ GdkDisplay *display;
+@@ -312,8 +280,6 @@ struct CinnamonBackgroundManagerPrivate
+ G_CALLBACK (draw_background_changed), manager);
+
+ setup_bg_and_draw_background (manager);
+- //draw_background_after_session_loads (manager);
+-
+
+ return TRUE;
+ }
+--
+1.8.1.6
+
+
+From d08b882470b135591fb99bd9ff7c63619fcaea82 Mon Sep 17 00:00:00 2001
+From: dalcde <dalcde@yahoo.com.hk>
+Date: Sat, 20 Apr 2013 15:42:13 +0800
+Subject: [PATCH 10/15] [GDBus][Power applet] Some fixes and cleanup
+
+---
+ .../cinnamon/applets/power@cinnamon.org/applet.js | 52 ++++++----------------
+ 1 file changed, 14 insertions(+), 38 deletions(-)
+
+diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
+index 3a13eab..5f81d91 100644
+--- a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
+@@ -48,40 +48,11 @@ const PowerManagerInterface = <interface name="org.gnome.SettingsDaemon.Power">
+ <method name="GetPrimaryDevice">
+ <arg type="(susdut)" direction="out"/>
+ </method>
+-<signal name="PropertiesChanged">
+- <arg type="s"/>
+- <arg type="a{sv}"/>
+- <arg type="a[s]"/>
+-</signal>
+ <property name="Icon" type="s" access="read" />
+ </interface>;
+
+ const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(PowerManagerInterface);
+
+-const SettingsManagerInterface = <interface name="org.freedesktop.DBus.Properties">
+-<method name="Get">
+- <arg type="s" direction="in"/>
+- <arg type="s" direction="in"/>
+- <arg type="v" direction="out"/>
+-</method>
+-<method name="GetAll">
+- <arg type="s" direction="in"/>
+- <arg type="a{sv}" direction="out"/>
+-</method>
+-<method name="Set">
+- <arg type="s" direction="in"/>
+- <arg type="s" direction="in"/>
+- <arg type="v" direction="in"/>
+-</method>
+-<signal name="PropertiesChanged">
+- <arg type="s"/>
+- <arg type="a{sv}"/>
+- <arg type="a[s]"/>
+-</signal>
+-</interface>;
+-
+-const SettingsManagerProxy = Gio.DBusProxy.makeProxyWrapper(SettingsManagerInterface);
+-
+ function DeviceItem() {
+ this._init.apply(this, arguments);
+ }
+@@ -156,8 +127,16 @@ MyApplet.prototype = {
+ this.menuManager.addMenu(this.menu);
+
+ //this.set_applet_icon_symbolic_name('battery-missing');
+- this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH);
+- this._smProxy = new SettingsManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH);
++ this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH,
++ Lang.bind(this, function(proxy, error) {
++ if (error) {
++ global.log(error.message);
++
++ return;
++ }
++ this._proxy.connect('g-properties-changed', Lang.bind(this, this._devicesChanged));
++ this._devicesChanged();
++ }));
+
+ let icon = this.actor.get_children()[0];
+ this.actor.remove_actor(icon);
+@@ -211,9 +190,6 @@ MyApplet.prototype = {
+
+ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+ this.menu.addSettingsAction(_("Power Settings"), 'power');
+-
+- this._smProxy.connectSignal('PropertiesChanged', Lang.bind(this, this._devicesChanged));
+- this._devicesChanged();
+ }
+ catch (e) {
+ global.logError(e);
+@@ -245,14 +221,14 @@ MyApplet.prototype = {
+ },
+
+ _readPrimaryDevice: function() {
+- this._proxy.GetPrimaryDeviceRemote(Lang.bind(this, function(device, error) {
++ this._proxy.GetPrimaryDeviceRemote(Lang.bind(this, function(result, error) {
+ if (error) {
+ this._hasPrimary = false;
+ this._primaryDeviceId = null;
+ this._batteryItem.actor.hide();
+ return;
+ }
+- let [device_id, device_type, icon, percentage, state, seconds] = device;
++ let [[device_id, device_type, icon, percentage, state, seconds]] = result;
+ if (device_type == UPDeviceType.BATTERY) {
+ this._hasPrimary = true;
+ let time = Math.round(seconds / 60);
+@@ -290,7 +266,7 @@ MyApplet.prototype = {
+ },
+
+ _readOtherDevices: function() {
+- this._proxy.GetDevicesRemote(Lang.bind(this, function(devices, error) {
++ this._proxy.GetDevicesRemote(Lang.bind(this, function([devices], error) {
+ this._deviceItems.forEach(function(i) { i.destroy(); });
+ this._deviceItems = [];
+
+@@ -336,7 +312,7 @@ MyApplet.prototype = {
+ },
+
+ _updateLabel: function() {
+- this._proxy.GetDevicesRemote(Lang.bind(this, function(devices, error) {
++ this._proxy.GetDevicesRemote(Lang.bind(this, function([devices], error) {
+ if (error) {
+ this._mainLabel.set_text("");
+ return;
+--
+1.8.1.6
+
+
+From c93e9746b321ad6d0aa38ec28c15fe7b3f18f8f7 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Sat, 20 Apr 2013 10:59:54 -0400
+Subject: [PATCH 11/15] Move CLUTTER_DISABLE_XINPUT to session startup file
+
+---
+ files/usr/bin/gnome-session-cinnamon | 2 +-
+ src/main.c | 3 ---
+ 2 files changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/files/usr/bin/gnome-session-cinnamon b/files/usr/bin/gnome-session-cinnamon
+index 315f135..56c37f5 100755
+--- a/files/usr/bin/gnome-session-cinnamon
++++ b/files/usr/bin/gnome-session-cinnamon
+@@ -1,3 +1,3 @@
+ #! /bin/sh
+-exec gnome-session --session cinnamon "$@"
++exec CLUTTER_DISABLE_XINPUT=1 gnome-session --session cinnamon "$@"
+
+diff --git a/src/main.c b/src/main.c
+index 9d37975..418fb60 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -257,9 +257,6 @@
+
+ g_option_context_free (ctx);
+
+- /* Disable XInput extension - required for 3.8 compatibility */
+- g_setenv ("CLUTTER_DISABLE_XINPUT", "1", TRUE);
+-
+ meta_plugin_type_register (gnome_cinnamon_plugin_get_type ());
+
+ /* Prevent meta_init() from causing gtk to load gail and at-bridge */
+--
+1.8.1.6
+
+
+From de1719e63518884cad6c9d63d508f737eab35d49 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Sat, 20 Apr 2013 12:23:29 -0400
+Subject: [PATCH 12/15] Add Xinput disable to cinnamon2d
+
+---
+ files/usr/bin/cinnamon2d | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/files/usr/bin/cinnamon2d b/files/usr/bin/cinnamon2d
+index 1eced99..7f42517 100755
+--- a/files/usr/bin/cinnamon2d
++++ b/files/usr/bin/cinnamon2d
+@@ -1,2 +1,2 @@
+ #!/bin/bash
+-CLUTTER_PAINT=disable-clipped-redraws:disable-culling LIBGL_ALWAYS_SOFTWARE=1 CINNAMON_SOFTWARE_RENDERING=1 CINNAMON_SLOWDOWN_FACTOR=0.0001 MUFFIN_NO_SHADOWS=1 CLUTTER_DEFAULT_FPS=15 cinnamon $@
++CLUTTER_DISABLE_XINPUT=1 CLUTTER_PAINT=disable-clipped-redraws:disable-culling LIBGL_ALWAYS_SOFTWARE=1 CINNAMON_SOFTWARE_RENDERING=1 CINNAMON_SLOWDOWN_FACTOR=0.0001 MUFFIN_NO_SHADOWS=1 CLUTTER_DEFAULT_FPS=15 cinnamon $@
+--
+1.8.1.6
+
+
+From 15d57d1c15f34d44b23f74b21929d996d4465afb Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Sat, 20 Apr 2013 12:29:43 -0400
+Subject: [PATCH 13/15] Fix session file
+
+---
+ files/usr/bin/gnome-session-cinnamon | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/files/usr/bin/gnome-session-cinnamon b/files/usr/bin/gnome-session-cinnamon
+index 56c37f5..31c9eff 100755
+--- a/files/usr/bin/gnome-session-cinnamon
++++ b/files/usr/bin/gnome-session-cinnamon
+@@ -1,3 +1,3 @@
+ #! /bin/sh
+-exec CLUTTER_DISABLE_XINPUT=1 gnome-session --session cinnamon "$@"
++CLUTTER_DISABLE_XINPUT=1 exec gnome-session --session cinnamon "$@"
+
+--
+1.8.1.6
+
+
+From 03436393c322fd97d8216c3481d28cd34833c656 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Sat, 20 Apr 2013 12:36:45 -0400
+Subject: [PATCH 14/15] Add cinnamon3d command
+
+---
+ files/usr/bin/cinnamon3d | 2 ++
+ 1 file changed, 2 insertions(+)
+ create mode 100644 files/usr/bin/cinnamon3d
+
+diff --git a/files/usr/bin/cinnamon3d b/files/usr/bin/cinnamon3d
+new file mode 100644
+index 0000000..4891783
+--- /dev/null
++++ b/files/usr/bin/cinnamon3d
+@@ -0,0 +1,2 @@
++#!/bin/bash
++CLUTTER_DISABLE_XINPUT=1 cinnamon $@
+--
+1.8.1.6
+
+
+From 850da270967622b95be9e0c5edd8e230eb4be5a1 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Sat, 20 Apr 2013 12:37:26 -0400
+Subject: [PATCH 15/15] Fix perms
+
+---
+ files/usr/bin/cinnamon3d | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ mode change 100644 => 100755 files/usr/bin/cinnamon3d
+
+diff --git a/files/usr/bin/cinnamon3d b/files/usr/bin/cinnamon3d
+old mode 100644
+new mode 100755
+--
+1.8.1.6
+
diff --git a/community/clinica/PKGBUILD b/community/clinica/PKGBUILD
index 54794584f..e7ec9d64e 100644
--- a/community/clinica/PKGBUILD
+++ b/community/clinica/PKGBUILD
@@ -1,15 +1,15 @@
-# $Id: PKGBUILD 78165 2012-10-16 15:57:54Z bgyorgy $
+# $Id: PKGBUILD 88675 2013-04-21 22:16:41Z heftig $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Gianmarco Brocchi <gianmarcobrocchi@gmail.com>
pkgname=clinica
pkgver=0.2.1
-pkgrel=5
+pkgrel=6
pkgdesc="Simple medical records manager"
arch=('i686' 'x86_64')
url="https://launchpad.net/clinica-project"
license=('GPL3')
-depends=('libgee' 'libpeas' 'dconf')
+depends=('libgee06' 'libpeas' 'dconf')
makedepends=('vala' 'intltool' 'python')
optdepends=('python2-gobject: for Agenzia del Farmaco plugin')
install=clinica.install
diff --git a/community/couchdb/PKGBUILD b/community/couchdb/PKGBUILD
index c6dd92e95..d60f4c930 100644
--- a/community/couchdb/PKGBUILD
+++ b/community/couchdb/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 87877 2013-04-08 12:24:37Z spupykin $
+# $Id: PKGBUILD 88676 2013-04-21 22:16:43Z heftig $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
# Contributor: Michael Fellinger <m.fellinger@gmail.com>
pkgname=couchdb
pkgver=1.2.2
-pkgrel=1
+pkgrel=2
pkgdesc="A document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
arch=('i686' 'x86_64')
url="http://couchdb.apache.org"
diff --git a/community/cython/PKGBUILD b/community/cython/PKGBUILD
index d90482aa5..52bea4ed9 100644
--- a/community/cython/PKGBUILD
+++ b/community/cython/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 83887 2013-02-06 11:39:48Z spupykin $
+# $Id: PKGBUILD 88776 2013-04-22 10:14:05Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Igor Scabini <furester @ gmail.com>
pkgname=('cython' 'cython2')
pkgbase=cython
-pkgver=0.18
+pkgver=0.19
pkgrel=1
pkgdesc="C-Extensions for Python "
arch=(i686 x86_64)
@@ -12,7 +12,7 @@ url="http://www.cython.org"
license=('APACHE')
makedepends=('python-distribute' 'python2-distribute')
source=("http://cython.org/release/Cython-$pkgver.tar.gz")
-md5sums=('6a72d14e72f3df597b34ac326152f8d2')
+md5sums=('76989337dee4cf7afdcb5cde514423f8')
build() {
true
diff --git a/community/denemo/PKGBUILD b/community/denemo/PKGBUILD
index d48e7169f..bd1162ece 100644
--- a/community/denemo/PKGBUILD
+++ b/community/denemo/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 87840 2013-04-08 09:20:17Z spupykin $
+# $Id: PKGBUILD 88689 2013-04-21 22:17:06Z heftig $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Philipp Sandhaus <philipp.sandhaus@gmx.de>
# Contributor: Robert Emil Berge <filoktetes@linuxophic.org>
@@ -6,7 +6,7 @@
pkgname=denemo
pkgver=1.0.0
-pkgrel=1
+pkgrel=3
pkgdesc="A music score editor"
arch=('i686' 'x86_64')
url="http://www.denemo.org"
diff --git a/community/elinks/PKGBUILD b/community/elinks/PKGBUILD
index 6b6f6cd7a..2b9d1139c 100644
--- a/community/elinks/PKGBUILD
+++ b/community/elinks/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 81104 2012-12-12 00:47:30Z eric $
+# $Id: PKGBUILD 88677 2013-04-21 22:16:44Z heftig $
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
@@ -8,39 +8,19 @@
pkgname=elinks
pkgver=0.13
_commit="9313aae9062e1d9ff084858fa6844259cd8237d6"
-pkgrel=11
+pkgrel=12
pkgdesc="An advanced and well-established feature-rich text mode web browser."
arch=("i686" "x86_64")
url="http://elinks.or.cz"
license=('GPL')
-depends=('bzip2' 'expat>=2.0' 'gpm>=1.20.4' 'openssl' 'lua51' 'libidn' 'js'
+depends=('bzip2' 'expat>=2.0' 'gpm>=1.20.4' 'openssl' 'lua51' 'libidn' 'js185'
'gc' 'tre')
makedepends=('git')
-source=()
-md5sums=()
-
-__gitroot="http://elinks.cz/elinks.git"
-__gitname="elinks"
+source=("git+http://elinks.cz/elinks.git#commit=$_commit")
+md5sums=('SKIP')
build() {
- cd "$srcdir"
- msg "Connecting to GIT server...."
-
- if [ -d $__gitname ] ; then
- cd $__gitname && git pull origin
- msg "The local files are updated."
- else
- git clone $__gitroot
- fi
-
- msg "GIT checkout done or server timeout"
- msg "Starting make..."
-
- rm -rf "$srcdir/$__gitname-build"
- git clone "$srcdir/$__gitname" "$srcdir/$__gitname-build"
- cd "$srcdir/$__gitname-build"
- git checkout "$_commit"
-
+ cd elinks
[ -x configure ] || sh autogen.sh
./configure --prefix=/usr --mandir=/usr/share/man \
--sysconfdir=/etc \
@@ -51,7 +31,7 @@ build() {
}
package() {
- cd "$srcdir/$__gitname-build"
+ cd elinks
make DESTDIR="$pkgdir" install
rm -f "$pkgdir/usr/share/locale/locale.alias"
diff --git a/community/freewrl/PKGBUILD b/community/freewrl/PKGBUILD
index ec562da65..a5eddbbe9 100644
--- a/community/freewrl/PKGBUILD
+++ b/community/freewrl/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 78928 2012-10-27 23:44:21Z ebelanger $
+# $Id: PKGBUILD 88678 2013-04-21 22:16:45Z heftig $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=freewrl
pkgver=1.22.13.1
_pkgver=1.22.13
-pkgrel=3
+pkgrel=4
pkgdesc="VRML viewer"
arch=('i686' 'x86_64')
url="http://freewrl.sourceforge.net/"
diff --git a/community/gedit-plugins/PKGBUILD b/community/gedit-plugins/PKGBUILD
index 9db934a71..161682e5a 100644
--- a/community/gedit-plugins/PKGBUILD
+++ b/community/gedit-plugins/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 79119 2012-10-30 23:06:21Z heftig $
+# $Id: PKGBUILD 88687 2013-04-21 22:17:03Z heftig $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Hugo Doria <hugo@archlinux.org>
@@ -6,20 +6,20 @@
# Contributor: zhuqin <zhuqin83@gmail.com>
pkgname=gedit-plugins
-pkgver=3.6.1
+pkgver=3.8.1
pkgrel=1
pkgdesc="Plugins for gedit"
-arch=('x86_64' 'i686')
-license=('GPL')
+arch=(x86_64 i686)
+license=(GPL)
url="http://live.gnome.org/GeditPlugins"
-depends=('gedit' 'dbus-python')
+depends=(gedit python-dbus)
+makedepends=(intltool gnome-doc-utils vte3)
optdepends=('gucharmap: for charmap plugin'
'vte3: for embedded terminal')
-makedepends=('intltool' 'gnome-doc-utils' 'vte3')
options=('!libtool' '!emptydirs')
install=gedit-plugins.install
source=("http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz")
-sha256sums=('c5e92830e6029110bf1117bd9f31b23a9ad907210b8cb37039772f5bfcf6d174')
+sha256sums=('659d379f9edfbba2db37522991c734c5d50e03eb1f70985e978d93a718273141')
build() {
cd $pkgname-$pkgver
diff --git a/community/giggle/PKGBUILD b/community/giggle/PKGBUILD
index dc22aa950..13b652f78 100644
--- a/community/giggle/PKGBUILD
+++ b/community/giggle/PKGBUILD
@@ -1,31 +1,40 @@
-# $Id: PKGBUILD 79629 2012-11-09 09:55:35Z ibiru $
+# $Id: PKGBUILD 88688 2013-04-21 22:17:05Z heftig $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: neodreams <yanbrodeur@gmail.com>
pkgname=giggle
pkgver=0.7
-pkgrel=1
+pkgrel=2
pkgdesc="Git repository viewer"
-arch=('i686' 'x86_64')
+arch=(i686 x86_64)
url="http://live.gnome.org/giggle"
-license=('GPL')
-depends=('git' 'gtksourceview3' 'vte3')
-makedepends=('intltool' 'itstool')
-source=(http://ftp.gnome.org/pub/GNOME/sources/giggle/0.7/$pkgname-$pkgver.tar.xz)
+license=(GPL)
+depends=(git gtksourceview3 vte3 desktop-file-utils hicolor-icon-theme)
+makedepends=(intltool itstool)
options=(!libtool)
install=giggle.install
-sha256sums=('ae2e2237fa0d0999d99d0a0ee9b7ec147e80bd2472d59a045b2b01eb02261f59')
+source=(http://ftp.gnome.org/pub/GNOME/sources/giggle/0.7/$pkgname-$pkgver.tar.xz
+ gtksourceview3.7.patch)
+sha256sums=('ae2e2237fa0d0999d99d0a0ee9b7ec147e80bd2472d59a045b2b01eb02261f59'
+ 'ca0b841d11bb5072741784dbeb72705eddf8e2bde780b8712355d5b66e456b37')
-build() {
+prepare() {
cd $pkgname-$pkgver
+ patch -Np1 -i ../gtksourceview3.7.patch
+}
- ./configure \
- --prefix=/usr
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr
make
}
-package() {
+check() {
cd $pkgname-$pkgver
+ make check
+}
+package() {
+ cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
}
diff --git a/community/giggle/gtksourceview3.7.patch b/community/giggle/gtksourceview3.7.patch
new file mode 100644
index 000000000..eb86cdeef
--- /dev/null
+++ b/community/giggle/gtksourceview3.7.patch
@@ -0,0 +1,36 @@
+From 9999a7ff573b7f3320c2065e8d0eaf0fea32a41b Mon Sep 17 00:00:00 2001
+From: Dominique Leuenberger <dimstar@opensuse.org>
+Date: Wed, 03 Apr 2013 20:26:17 +0000
+Subject: Directly include gtksourcebuffer.h
+
+Until gtksourceview 3.7, it was included indirectly by gtksourceview.h.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=697220
+---
+diff --git a/src/giggle-diff-view.c b/src/giggle-diff-view.c
+index 3ded28d..ff6bbe3 100644
+--- a/src/giggle-diff-view.c
++++ b/src/giggle-diff-view.c
+@@ -29,6 +29,8 @@
+ #include <glib/gi18n.h>
+ #include <string.h>
+
++#include <gtksourceview/gtksourcebuffer.h>
++
+ typedef struct GiggleDiffViewPriv GiggleDiffViewPriv;
+ typedef struct GiggleDiffViewFile GiggleDiffViewFile;
+ typedef struct GiggleDiffViewHunk GiggleDiffViewHunk;
+diff --git a/src/giggle-view-file.c b/src/giggle-view-file.c
+index 130af4a..517858d 100644
+--- a/src/giggle-view-file.c
++++ b/src/giggle-view-file.c
+@@ -40,6 +40,7 @@
+
+ #include <gtksourceview/gtksourcelanguagemanager.h>
+ #include <gtksourceview/gtksourceview.h>
++#include <gtksourceview/gtksourcebuffer.h>
+
+ #define GIGGLE_TYPE_VIEW_FILE_SNAPSHOT (giggle_view_file_snapshot_get_type ())
+ #define GIGGLE_VIEW_FILE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIGGLE_TYPE_VIEW_FILE_SNAPSHOT, GiggleViewFileSnapshot))
+--
+cgit v0.9.1
diff --git a/community/gitg/PKGBUILD b/community/gitg/PKGBUILD
index 1bb606e4e..68d902e4f 100644
--- a/community/gitg/PKGBUILD
+++ b/community/gitg/PKGBUILD
@@ -1,36 +1,28 @@
-# $Id: PKGBUILD 57270 2011-10-25 06:09:22Z ebelanger $
-# Maintainer: Brad Fanella <bradfanella@archlinux.us>
-# Contributor: Blaž Tomžič <blaz.tomazic@gmail.com>
-# Contributor: Thomas Dziedzic < gostrc at gmail >
-# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
-# Contributor: M Rawash <mrawash@gmail.com>
-# Contributor: DonVla <donvla@users.sourceforge.net>
+# $Id: PKGBUILD 88690 2013-04-21 22:17:07Z heftig $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgname=gitg
-pkgver=0.2.5
+pkgver=0.2.7
pkgrel=1
pkgdesc='A GIT repository viewer based on GTK+'
arch=('i686' 'x86_64')
-url='http://trac.novowork.com/gitg/'
+url='https://git.gnome.org/browse/gitg/'
license=('GPL')
-depends=('dconf' 'gtksourceview3' 'git' 'desktop-file-utils' 'gsettings-desktop-schemas' \
+depends=('gtksourceview3' 'git' 'desktop-file-utils' 'gsettings-desktop-schemas' \
'hicolor-icon-theme')
makedepends=('intltool')
options=('!libtool')
-install="${pkgname}.install"
-source=("ftp://ftp.gnome.org/pub/GNOME/sources/gitg/0.2/${pkgname}-${pkgver}.tar.xz")
-sha256sums=('d3dfff65834d8371d43b2e91926af1421f8ec2128580dfeceb6925b6b1ce6d8c')
+install=gitg.install
+source=(ftp://ftp.gnome.org/pub/GNOME/sources/gitg/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz)
+sha1sums=('7b1428819666e4797d64dc94bb1624d5e7b75e6a')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- ./configure \
- --prefix=/usr
- make
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- make DESTDIR="${pkgdir}" install
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
}
diff --git a/community/gitg/gitg.install b/community/gitg/gitg.install
index 7b356a632..4b90c879e 100644
--- a/community/gitg/gitg.install
+++ b/community/gitg/gitg.install
@@ -1,19 +1,13 @@
-# Maintainer: Brad Fanella <bradfanella@archlinux.us>
-# Contributor: DonVla <donvla@users.sourceforge.net>
-# gitg install file
-
post_install() {
- usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
- update-desktop-database -q
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ glib-compile-schemas usr/share/glib-2.0/schemas
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}
post_upgrade() {
- post_install $1
+ post_install $1
}
post_remove() {
- usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
- update-desktop-database -q
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ post_install $1
}
diff --git a/community/gnome-applets/01_battstat_upower.patch b/community/gnome-applets/01_battstat_upower.patch
new file mode 100644
index 000000000..fa31e720b
--- /dev/null
+++ b/community/gnome-applets/01_battstat_upower.patch
@@ -0,0 +1,622 @@
+From 18a2f4aa3ba2c8c9fc3718b15a9ab366fdd35f05 Mon Sep 17 00:00:00 2001
+From: Joachim Breitner <mail@joachim-breitner.de>
+Date: Mon, 5 Jul 2010 12:20:04 +0200
+Subject: [PATCH] [battstat applet] upower support
+
+As HAL is being deprecated, the battstat applet is adjusted to talk to
+upower, using libupower-glib. (Bug #607254)
+---
+ battstat/Makefile.am | 6 +-
+ battstat/battstat-upower.c | 330 +++++++++++++++++++++++++++++++++++++++++
+ battstat/battstat-upower.h | 33 ++++
+ battstat/battstat_applet.c | 7 +-
+ battstat/docs/C/battstat.xml | 18 ++-
+ battstat/docs/de/battstat.xml | 22 +++-
+ battstat/docs/eu/battstat.xml | 20 ++-
+ battstat/power-management.c | 66 +++++++--
+ configure.in | 22 +++
+ 9 files changed, 493 insertions(+), 31 deletions(-)
+ create mode 100644 battstat/battstat-upower.c
+ create mode 100644 battstat/battstat-upower.h
+
+Index: gnome-applets-3.4.1/battstat/Makefile.am
+===================================================================
+--- gnome-applets-3.4.1.orig/battstat/Makefile.am 2012-04-13 19:02:29.000000000 +0200
++++ gnome-applets-3.4.1/battstat/Makefile.am 2012-04-19 00:28:17.246029051 +0200
+@@ -27,6 +27,7 @@
+ $(GNOME_APPLETS_CFLAGS) \
+ $(LIBNOTIFY_CFLAGS) \
+ $(HAL_CFLAGS) \
++ $(UPOWER_CFLAGS) \
+ $(APMINC) \
+ $(ACPIINC) \
+ $(WARN_CFLAGS) \
+@@ -48,13 +49,17 @@
+ acpi-freebsd.c \
+ acpi-freebsd.h \
+ battstat-hal.c \
+- battstat-hal.h
++ battstat-hal.h \
++ battstat-upower.c \
++ battstat-upower.h
+
+
+ battstat_applet_2_LDADD = \
+ $(GNOME_APPLETS_LIBS) \
+ $(LIBNOTIFY_LIBS) \
+ $(HAL_LIBS) \
++ $(UPOWER_LIBS) \
++ $(LIBM) \
+ $(APMLIB)
+
+ schemasdir = @GCONF_SCHEMA_FILE_DIR@
+Index: gnome-applets-3.4.1/battstat/battstat-upower.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gnome-applets-3.4.1/battstat/battstat-upower.c 2012-04-19 00:28:17.246029051 +0200
+@@ -0,0 +1,301 @@
++/*
++ * Copyright (C) 2010 by Joachim Breitner <mail@joachim-breitner.de>
++ *
++ * Based on battstat-hal.c:
++ * Copyright (C) 2005 by Ryan Lortie <desrt@desrt.ca>
++ *
++ * 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 Street #330, Boston, MA 02111-1307, USA.
++ *
++ * $Id$
++ */
++
++#include <config.h>
++
++#ifdef HAVE_UPOWER
++
++#include <upower.h>
++#include <math.h>
++
++#include "battstat-upower.h"
++
++static UpClient *upc;
++static void (*status_updated_callback) (void);
++
++
++/* status_updated_callback() can not be called directly because at the time of
++ * the device-remove signal, the device is not actually removed from the list
++ * of devices known to the up_client object (see libupower-glib/up-client.c in
++ * upower). Waiting for the next idle timer works around this issue and has has
++ * the additionaly benefit of possibly running status_updated_callback only
++ * once when several events happen very soon after each other.
++ */
++static gboolean status_update_scheduled;
++
++static gboolean
++update_status_idle (gpointer junk)
++{
++ if (status_updated_callback)
++ status_updated_callback ();
++
++ return status_update_scheduled = FALSE;
++}
++
++static void
++schedule_status_callback (void)
++{
++ if (status_update_scheduled)
++ return;
++
++ status_update_scheduled = TRUE;
++ g_idle_add (update_status_idle, NULL);
++}
++
++static void
++device_cb (UpClient *client, UpDevice *device, gpointer user_data) {
++ schedule_status_callback();
++}
++
++/* ---- public functions ---- */
++
++char *
++battstat_upower_initialise (void (*callback) (void))
++{
++ status_updated_callback = callback;
++
++ if( upc != NULL )
++ return g_strdup( "Already initialised!" );
++
++ if( (upc = up_client_new() ) == NULL )
++ goto error_out;
++
++ if (! up_client_enumerate_devices_sync( upc, NULL, NULL ) ) {
++ goto error_shutdownclient;
++ }
++
++ g_signal_connect_after( upc, "device-changed", device_cb, NULL );
++ g_signal_connect_after( upc, "device-added", device_cb, NULL );
++ g_signal_connect_after( upc, "device-removed", device_cb, NULL );
++
++ return NULL;
++
++error_shutdownclient:
++ g_object_unref( upc );
++ upc = NULL;
++
++error_out:
++ return "Can not initialize upower";
++}
++
++void
++battstat_upower_cleanup( void )
++{
++ if( upc == NULL )
++ return;
++
++ g_object_unref( upc );
++ upc = NULL;
++}
++
++#include "battstat.h"
++
++/* This function currently exists to allow the multiple batteries supported
++ * by the upower backend to appear as a single composite battery device (since
++ * at the current time this is all that battstat supports).
++ *
++ * This entire function is filled with logic to make multiple batteries
++ * appear as one "composite" battery. Comments included as appropriate.
++ *
++ * For more information about some of the assumptions made in the following
++ * code please see the following mailing list post and the resulting thread:
++ *
++ * http://lists.freedesktop.org/archives/hal/2005-July/002841.html
++ */
++void
++battstat_upower_get_battery_info( BatteryStatus *status )
++{
++
++ GPtrArray *devices = up_client_get_devices( upc );
++
++ /* The calculation to get overall percentage power remaining is as follows:
++ *
++ * Sum( Current charges ) / Sum( Full Capacities )
++ *
++ * We can't just take an average of all of the percentages since this
++ * doesn't deal with the case that one battery might have a larger
++ * capacity than the other.
++ *
++ * In order to do this calculation, we need to keep a running total of
++ * current charge and full capacities.
++ */
++ double current_charge_total = 0, full_capacity_total = 0;
++
++ /* Record the time remaining as reported by upower. This is used in the event
++ * that the system has exactly one battery (since, then, upower is capable
++ * of providing an accurate time remaining report and we should trust it.)
++ */
++ gint64 remaining_time = 0;
++
++ /* The total (dis)charge rate of the system is the sum of the rates of
++ * the individual batteries.
++ */
++ double rate_total = 0;
++
++ /* We need to know if we should report the composite battery as present
++ * at all. The logic is that if at least one actual battery is installed
++ * then the composite battery will be reported to exist.
++ */
++ int present = 0;
++
++ /* We need to know if we are on AC power or not. Eventually, we can look
++ * at the AC adaptor upower devices to determine that. For now, we assume that
++ * if any battery is discharging then we must not be on AC power. Else, by
++ * default, we must be on AC.
++ */
++ int on_ac_power = 1;
++
++ /* Finally, we consider the composite battery to be "charging" if at least
++ * one of the actual batteries in the system is charging.
++ */
++ int charging = 0;
++
++ /* For each physical battery bay... */
++ int i;
++ for( i = 0; i < devices->len; i++ )
++ {
++ UpDevice *upd = g_ptr_array_index( devices, i );
++
++ int type, state;
++ double current_charge, full_capacity, rate;
++ gint64 time_to_full, time_to_empty;
++
++ g_object_get( upd,
++ "kind", &type,
++ "state", &state,
++ "energy", &current_charge,
++ "energy-full", &full_capacity,
++ "energy-rate", &rate,
++ "time-to-full", &time_to_full,
++ "time-to-empty", &time_to_empty,
++ NULL );
++
++ /* Only count batteries here */
++
++ if (type != UP_DEVICE_KIND_BATTERY)
++ continue;
++
++ /* At least one battery present -> composite battery is present. */
++ present++;
++
++ /* At least one battery charging -> composite battery is charging. */
++ if( state == UP_DEVICE_STATE_CHARGING )
++ charging = 1;
++
++ /* At least one battery is discharging -> we're not on AC. */
++ if( state == UP_DEVICE_STATE_DISCHARGING )
++ on_ac_power = 0;
++
++ /* Sum the totals for current charge, design capacity, (dis)charge rate. */
++ current_charge_total += current_charge;
++ full_capacity_total += full_capacity;
++ rate_total += rate;
++
++ /* Record remaining time too, incase this is the only battery. */
++ remaining_time = (state == UP_DEVICE_STATE_DISCHARGING ? time_to_empty : time_to_full);
++ }
++
++ if( !present || full_capacity_total <= 0 || (charging && !on_ac_power) )
++ {
++ /* Either no battery is present or something has gone horribly wrong.
++ * In either case we must return that the composite battery is not
++ * present.
++ */
++ status->present = FALSE;
++ status->percent = 0;
++ status->minutes = -1;
++ status->on_ac_power = TRUE;
++ status->charging = FALSE;
++
++ g_ptr_array_unref( devices );
++ return;
++ }
++
++ /* Else, our composite battery is present. */
++ status->present = TRUE;
++
++ /* As per above, overall charge is:
++ *
++ * Sum( Current charges ) / Sum( Full Capacities )
++ */
++ status->percent = ( current_charge_total / full_capacity_total ) * 100.0 + 0.5;
++
++ if( present == 1 )
++ {
++ /* In the case of exactly one battery, report the time remaining figure
++ * from upower directly since it might have come from an authorative source
++ * (ie: the PMU or APM subsystem).
++ *
++ * upower gives remaining time in seconds with a 0 to mean that the
++ * remaining time is unknown. Battstat uses minutes and -1 for
++ * unknown time remaining.
++ */
++
++ if( remaining_time == 0 )
++ status->minutes = -1;
++ else
++ status->minutes = (remaining_time + 30) / 60;
++ }
++ /* Rest of cases to deal with multiple battery systems... */
++ else if( !on_ac_power && rate_total != 0 )
++ {
++ /* Then we're discharging. Calculate time remaining until at zero. */
++
++ double remaining;
++
++ remaining = current_charge_total;
++ remaining /= rate_total;
++ status->minutes = (int) floor( remaining * 60.0 + 0.5 );
++ }
++ else if( charging && rate_total != 0 )
++ {
++ /* Calculate time remaining until charged. For systems with more than
++ * one battery, this code is very approximate. The assumption is that if
++ * one battery reaches full charge before the other that the other will
++ * start charging faster due to the increase in available power (similar
++ * to how a laptop will charge faster if you're not using it).
++ */
++
++ double remaining;
++
++ remaining = full_capacity_total - current_charge_total;
++ if( remaining < 0 )
++ remaining = 0;
++ remaining /= rate_total;
++
++ status->minutes = (int) floor( remaining * 60.0 + 0.5 );
++ }
++ else
++ {
++ /* On AC power and not charging -or- rate is unknown. */
++ status->minutes = -1;
++ }
++
++ /* These are simple and well-explained above. */
++ status->charging = charging;
++ status->on_ac_power = on_ac_power;
++
++ g_ptr_array_unref( devices );
++}
++
++#endif /* HAVE_UPOWER */
+Index: gnome-applets-3.4.1/battstat/battstat-upower.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gnome-applets-3.4.1/battstat/battstat-upower.h 2012-04-19 00:28:17.254029051 +0200
+@@ -0,0 +1,33 @@
++/*
++ * Copyright (C) 2010 by Joachim Breitner <mail@joachim-breitner.de>
++ *
++ * Based on battstat-hal.h:
++ * Copyright (C) 2005 by Ryan Lortie <desrt@desrt.ca>
++ *
++ * 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 Street #330, Boston, MA 02111-1307, USA.
++ *
++ * $Id$
++ */
++
++#ifndef _battstat_upower_h_
++#define _battstat_upower_h_
++
++char *battstat_upower_initialise (void (*) (void));
++void battstat_upower_cleanup (void);
++
++#include "battstat.h"
++void battstat_upower_get_battery_info (BatteryStatus *status);
++
++#endif /* _battstat_upower_h_ */
+Index: gnome-applets-3.4.1/battstat/battstat_applet.c
+===================================================================
+--- gnome-applets-3.4.1.orig/battstat/battstat_applet.c 2012-04-13 19:02:29.000000000 +0200
++++ gnome-applets-3.4.1/battstat/battstat_applet.c 2012-04-19 00:28:17.254029051 +0200
+@@ -1188,9 +1188,12 @@
+
+ char *comments = g_strdup_printf ("%s\n\n%s",
+ _("This utility shows the status of your laptop battery."),
+- power_management_using_hal () ?
++ power_management_using_upower () ?
++ /* true */ _("upower backend enabled.") :
++ (power_management_using_hal () ?
+ /* true */ _("HAL backend enabled.") :
+- /* false */ _("Legacy (non-HAL) backend enabled."));
++ /* false */ _("Legacy (non-HAL) backend enabled.")
++ ));
+
+ gtk_show_about_dialog( NULL,
+ "version", VERSION,
+Index: gnome-applets-3.4.1/battstat/docs/C/battstat.xml
+===================================================================
+--- gnome-applets-3.4.1.orig/battstat/docs/C/battstat.xml 2012-04-15 15:49:58.000000000 +0200
++++ gnome-applets-3.4.1/battstat/docs/C/battstat.xml 2012-04-19 00:28:17.254029051 +0200
+@@ -226,10 +226,13 @@
+ <title>Power Management Backends</title>
+
+ <para>
+- The battery monitor supports a number of power management backends. If it
+- is available, the monitor will attempt to use the freedesktop.org
+- <ulink url="http://freedesktop.org/Software/hal">HAL (Hardware Abstraction
+- Layer)</ulink>. If it is unavailable or unsupported on your platform, the
++ The battery monitor supports a number of power management backends.
++ If it is available, the monitor will attempt to use the freedesktop.org
++ <ulink url="http://upower.freedesktop.org/">upower</ulink> interface.
++ If it is unavailable or unsupported on your platform, it will fall back
++ to the freedesktop.org
++ <ulink url="http://freedesktop.org/Software/hal">HAL (Hardware
++ Abstraction Layer)</ulink>. If that is also not availble, the
+ battery monitor will attempt direct access to the power management system.
+ </para>
+ <para>
+@@ -410,10 +413,10 @@
+ <sect2 id="battstat-troubleshooting-backends">
+ <title>Determining the backend</title>
+ <para>
+- If you are using the Hardware Abstraction Layer
+- (see <xref linkend="battstat-power-backends"/>) then that will be
+- indicated in the about dialog by placing a star next to the author of the
+- HAL backend.
++ If you are using the upower interface, or the the Hardware
++ Abstraction Layer (see <xref linkend="battstat-power-backends"/>) then
++ that will be indicated in the about dialog by placing a star next to the
++ author of the HAL backend.
+ <figure id="battstat-credits-hal">
+ <title>Check you're using the HAL backend</title>
+ <screenshot>
+Index: gnome-applets-3.4.1/battstat/power-management.c
+===================================================================
+--- gnome-applets-3.4.1.orig/battstat/power-management.c 2012-04-13 19:02:29.000000000 +0200
++++ gnome-applets-3.4.1/battstat/power-management.c 2012-04-19 00:28:17.254029051 +0200
+@@ -41,6 +41,7 @@
+
+ #include "battstat.h"
+ #include "battstat-hal.h"
++#include "battstat-upower.h"
+
+ #define ERR_ACPID _("Can't access ACPI events in /var/run/acpid.socket! " \
+ "Make sure the ACPI subsystem is working and " \
+@@ -66,6 +67,9 @@
+ #ifdef HAVE_HAL
+ static int using_hal;
+ #endif
++#ifdef HAVE_UPOWER
++static int using_upower;
++#endif
+
+ /*
+ * What follows is a series of platform-specific apm_readinfo functions
+@@ -390,6 +394,14 @@
+ return NULL;
+ }
+
++#ifdef HAVE_UPOWER
++ if( using_upower )
++ {
++ battstat_upower_get_battery_info( status );
++ return NULL;
++ }
++#endif
++
+ #ifdef HAVE_HAL
+ if( using_hal )
+ {
+@@ -430,27 +442,36 @@
+ const char *
+ power_management_initialise (int no_hal, void (*callback) (void))
+ {
++ char *err;
++ err = g_strdup( ":(" );
+ #ifdef __linux__
+ struct stat statbuf;
+ #endif
+-#ifdef HAVE_HAL
+- char *err;
++#ifdef HAVE_UPOWER
++ err = battstat_upower_initialise (callback);
+
+- if( no_hal )
+- err = g_strdup( ":(" );
+- else
+- err = battstat_hal_initialise (callback);
+-
+-
+- if( err == NULL ) /* HAL is up */
++ if( err == NULL ) /* UPOWER is up */
+ {
+ pm_initialised = 1;
+- using_hal = TRUE;
++ using_upower = TRUE;
+ return NULL;
++ }
++#endif
++
++#ifdef HAVE_HAL
++ if(! no_hal ) {
++ err = battstat_hal_initialise (callback);
++
++ if( err == NULL ) /* HAL is up */
++ {
++ pm_initialised = 1;
++ using_hal = TRUE;
++ return NULL;
++ }
+ }
+- else
+- /* fallback to legacy methods */
+- g_free( err );
++
++ /* fallback to legacy methods */
++ g_free( err );
+ #endif
+
+ #ifdef __linux__
+@@ -498,6 +519,15 @@
+ void
+ power_management_cleanup( void )
+ {
++#ifdef HAVE_UPOWER
++ if( using_upower )
++ {
++ battstat_upower_cleanup();
++ pm_initialised = 1;
++ return;
++ }
++#endif
++
+ #ifdef HAVE_HAL
+ if( using_hal )
+ {
+@@ -525,6 +555,16 @@
+ }
+
+ int
++power_management_using_upower( void )
++{
++#ifdef HAVE_UPOWER
++ return using_upower;
++#else
++ return 0;
++#endif
++}
++
++int
+ power_management_using_hal( void )
+ {
+ #ifdef HAVE_HAL
+Index: gnome-applets-3.4.1/configure.in
+===================================================================
+--- gnome-applets-3.4.1.orig/configure.in 2012-04-15 15:45:36.000000000 +0200
++++ gnome-applets-3.4.1/configure.in 2012-04-19 00:28:17.254029051 +0200
+@@ -23,6 +23,7 @@
+ LIBWNCK_REQUIRED=2.91.0
+ LIBNOTIFY_REQUIRED=0.7
+ HAL_REQUIRED=0.5.3
++UPOWER_REQUIRED=0.9.4
+ DBUS_REQUIRED=1.1.2
+ DBUS_GLIB_REQUIRED=0.74
+ PYGOBJECT_REQUIRED=2.26
+@@ -223,6 +224,30 @@
+ AC_SUBST(HAL_CFLAGS)
+ AC_SUBST(HAL_LIBS)
+
++dnl -- check for libupower-glib (optional) --------------------------------------------
++UPOWER_CFLAGS=
++UPOWER_LIBS=
++AC_ARG_WITH(upower,[ --without-upower build without upower support])
++
++if test "x$with_upower" != xno; then
++ PKG_CHECK_MODULES(UPOWER, upower-glib >= $UPOWER_REQUIRED,
++ HAVE_UPOWER="yes",
++ HAVE_UPOWER="no")
++
++ LT_LIB_M
++ if test "x$HAVE_UPOWER" = "xyes"; then
++ AC_DEFINE(HAVE_UPOWER, 1, [UPOWER available])
++ fi
++else
++ AC_MSG_WARN(["upower support disabled"])
++fi
++
++AC_SUBST(UPOWER_CFLAGS)
++AC_SUBST(UPOWER_LIBS)
++AC_SUBST(LIBM)
++
++
++
+ dnl -- check for gucharmap (optional) -----------------------------------------
+
+ PKG_CHECK_MODULES([GUCHARMAP],[gucharmap-2.90 >= $GUCHARMAP3_REQUIRED],
+@@ -739,5 +764,6 @@
+ Using DBUS: $HAVE_DBUS
+ Using NetworkManager: $HAVE_NETWORKMANAGER
+ Using HAL: $HAVE_HAL
++ Using UPOWER: $HAVE_UPOWER
+ Enabling IPv6: $have_ipv6
+ " >&2
diff --git a/community/gnome-applets/PKGBUILD b/community/gnome-applets/PKGBUILD
index 59699512e..193c879af 100644
--- a/community/gnome-applets/PKGBUILD
+++ b/community/gnome-applets/PKGBUILD
@@ -1,35 +1,61 @@
-# $Id: PKGBUILD 87904 2013-04-08 14:47:20Z heftig $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
+# $Id: PKGBUILD 88683 2013-04-21 22:16:53Z heftig $
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-applets
pkgver=3.5.92
-pkgrel=1
-pkgdesc="GNOME Applets"
-arch=(i686 x86_64)
+pkgrel=3
+pkgdesc="Small applications for the GNOME panel"
+arch=('i686' 'x86_64')
license=('GPL')
-depends=('gnome-panel' 'libgtop' 'gucharmap' 'libnotify')
-makedepends=('gnome-doc-utils' 'intltool' 'gnome-settings-daemon' 'networkmanager')
-options=(!emptydirs)
-url="http://www.gnome.org"
-install=gnome-applets.install
-source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
-sha256sums=('f6178cb702a39a4103fcb97e9a266bf6d05f05ac5064818f119c023d76170e83')
+depends=('cpupower' 'gucharmap' 'gstreamer0.10-base-plugins' 'gnome-panel' 'libgtop' 'upower')
+makedepends=('gnome-common' 'gnome-doc-utils' 'intltool' 'networkmanager' 'rarian')
+url="https://live.gnome.org/GnomeApplets"
+install=$pkgname.install
+source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
+ gnome-applets-cpupower.patch
+ disable-gweather-applet.patch
+ fix-autoconf.patch
+ 01_battstat_upower.patch)
+sha256sums=('f6178cb702a39a4103fcb97e9a266bf6d05f05ac5064818f119c023d76170e83'
+ '942276d7cc18224d9f5b1b57314746ad4d713ee0dcf4aedb25fa72e92db75e65'
+ '47f6b477c0f76ebb1e8ffc6fe9bd2fac9ac7f511f059cf4bb2687f8425bfb4a8'
+ '0acd58aee458345e378d5f77256e04b13e3a4c06b166aac390a92309b864e8a4'
+ '364c9264c76721b42e85eecc48443852ead1bd730d9de937dd2ae00889db836a')
build() {
cd "$pkgname-$pkgver"
- PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
- --sysconfdir=/etc --libexecdir=/usr/lib/gnome-applets \
- --localstatedir=/var --disable-static \
- --disable-scrollkeeper --disable-schemas-install \
- --without-hal
+
+ sed -i 's@^#!.*python$@#!/usr/bin/python2@' invest-applet/invest/*
+
+ # Use cpupower instead of cpufreq
+ patch -Np1 -i "$srcdir/gnome-applets-cpupower.patch"
+
+ # Add UPower support
+ patch -Np1 -i "$srcdir/01_battstat_upower.patch"
+
+ # Disable gweather applet, because it's not compatible with libgweather 3.8
+ patch -Np1 -i "$srcdir/disable-gweather-applet.patch"
+
+ # Fix build
+ patch -Np1 -i "$srcdir/fix-autoconf.patch"
+
+ # Turn off unneeded warnings
+ CFLAGS="$CFLAGS -w"
+
+ autoreconf -fi
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
+ --disable-static --disable-schemas-install --disable-scrollkeeper \
+ --enable-mixer-applet \
+ PYTHON=/usr/bin/python2
make
}
package() {
cd "$pkgname-$pkgver"
- make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" install
- install -m755 -d "$pkgdir/usr/share/gconf/schemas"
- gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain gnome-applets-3.0 "$pkgdir"/etc/gconf/schemas/*.schemas
- rm -f "$pkgdir"/etc/gconf/schemas/*.schemas
+ mkdir -m755 -p "$pkgdir/usr/share/gconf/schemas"
+ gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" "$pkgdir"/etc/gconf/schemas/*.schemas
+ rm -r "$pkgdir"/etc/gconf
}
diff --git a/community/gnome-applets/disable-gweather-applet.patch b/community/gnome-applets/disable-gweather-applet.patch
new file mode 100644
index 000000000..26f7e4d6b
--- /dev/null
+++ b/community/gnome-applets/disable-gweather-applet.patch
@@ -0,0 +1,12 @@
+diff -Naur gnome-applets-3.5.92.orig/configure.in gnome-applets-3.5.92/configure.in
+--- gnome-applets-3.5.92.orig/configure.in 2012-09-20 03:07:34.000000000 +0200
++++ gnome-applets-3.5.92/configure.in 2013-04-09 10:39:54.214243015 +0200
+@@ -251,7 +251,7 @@
+
+ dnl -- check for libgweather (required for gweather applet) ------------------
+ build_libgweather_applets=false
+-PKG_CHECK_MODULES(LIBGWEATHER, gweather-3.0 >= $GWEATHER_REQUIRED,
++PKG_CHECK_MODULES(LIBGWEATHER, gweather-3.0 >= $GWEATHER_REQUIRED gweather-3.0 <= 3.7,
+ build_libgweather_applets=true,
+ AC_MSG_WARN([libgweather not found. Not building the weather applet.]))
+ AC_SUBST(LIBGWEATHER_CFLAGS)
diff --git a/community/gnome-applets/fix-autoconf.patch b/community/gnome-applets/fix-autoconf.patch
new file mode 100644
index 000000000..fc36c743c
--- /dev/null
+++ b/community/gnome-applets/fix-autoconf.patch
@@ -0,0 +1,12 @@
+diff -Naur gnome-applets-3.5.92.orig/configure.in gnome-applets-3.5.92/configure.in
+--- gnome-applets-3.5.92.orig/configure.in 2012-09-20 03:07:34.000000000 +0200
++++ gnome-applets-3.5.92/configure.in 2013-04-09 09:48:48.427334056 +0200
+@@ -4,7 +4,7 @@
+ AC_INIT(gnome-applets, 3.5.92)
+ AC_PREREQ(2.59)
+
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar])
+ AC_CONFIG_MACRO_DIR(m4)
+ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
diff --git a/community/gnome-applets/gnome-applets-cpupower.patch b/community/gnome-applets/gnome-applets-cpupower.patch
new file mode 100644
index 000000000..134a617fc
--- /dev/null
+++ b/community/gnome-applets/gnome-applets-cpupower.patch
@@ -0,0 +1,12 @@
+diff -up gnome-applets-3.1.90/configure.in.cpupower gnome-applets-3.1.90/configure.in
+--- gnome-applets-3.1.90/configure.in.cpupower 2011-08-31 18:49:00.628945807 -0400
++++ gnome-applets-3.1.90/configure.in 2011-08-31 18:49:17.397946966 -0400
+@@ -518,7 +518,7 @@ AC_CHECK_HEADER(cpufreq.h, have_libcpufr
+ LIBCPUFREQ_LIBS=
+ if test "x$have_libcpufreq" = "xyes"; then
+ AC_DEFINE([HAVE_LIBCPUFREQ], [1], [Have libcpufreq.])
+- LIBCPUFREQ_LIBS=-lcpufreq
++ LIBCPUFREQ_LIBS=-lcpupower
+ fi
+ AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$have_libcpufreq = xyes)
+ AC_SUBST(LIBCPUFREQ_LIBS)
diff --git a/community/gnome-packagekit/PKGBUILD b/community/gnome-packagekit/PKGBUILD
index 85972a329..cb8d4df7e 100644
--- a/community/gnome-packagekit/PKGBUILD
+++ b/community/gnome-packagekit/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 85932 2013-03-09 04:07:22Z jconder $
+# $Id: PKGBUILD 88703 2013-04-21 22:24:13Z heftig $
# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
pkgname=gnome-packagekit
-pkgver=3.6.2
+pkgver=3.8.1
pkgrel=1
pkgdesc='Collection of graphical tools for PackageKit to be used in the GNOME desktop'
arch=('i686' 'x86_64')
@@ -16,7 +16,7 @@ optdepends=('polkit-gnome: required for privileged actions'
options=('!emptydirs' '!libtool')
install="$pkgname.install"
source=("http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz")
-sha256sums=('2db1069324cb85d8704bd1ffbbea3c29d57ba7b0d710f45f6563fd963517ef40')
+sha256sums=('fe0a6368ee5a67419c9332a3b0031ecf1e3e92aa2fe0eb30aa4273f6224d070a')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/community/gnome-panel/0001-Add-the-GNOME-Flashback-session.patch b/community/gnome-panel/0001-Add-the-GNOME-Flashback-session.patch
new file mode 100644
index 000000000..2c90a9fe2
--- /dev/null
+++ b/community/gnome-panel/0001-Add-the-GNOME-Flashback-session.patch
@@ -0,0 +1,95 @@
+From a5b951654b856d899e8c6a4116b4ccc4f18aac91 Mon Sep 17 00:00:00 2001
+From: Jeremy Bicha <jbicha@ubuntu.com>
+Date: Sun, 24 Feb 2013 17:22:29 -0500
+Subject: [PATCH] Add the GNOME Flashback session
+
+This was removed from gnome-session 3.7.4 so let's it add it back here
+(under new name)
+
+https://bugzilla.gnome.org/show_bug.cgi?id=694625
+---
+ data/Makefile.am | 18 +++++++++++++++++-
+ data/gnome-flashback.desktop.in | 7 +++++++
+ data/gnome-flashback.session.desktop.in | 3 +++
+ po/POTFILES.in | 2 ++
+ 4 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 data/gnome-flashback.desktop.in
+ create mode 100644 data/gnome-flashback.session.desktop.in
+
+diff --git a/data/Makefile.am b/data/Makefile.am
+index 83f82e2..84e1954 100644
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -30,17 +30,33 @@ gsettings_SCHEMAS = $(gsettings_schemas_in:.xml.in=.xml)
+
+ @GSETTINGS_RULES@
+
++sessiondir = $(datadir)/gnome-session/sessions
++session_in_files = gnome-flashback.session.desktop.in
++session_DATA = $(session_in_files:.session.desktop.in=.session)
++
++xsessiondir = $(datadir)/xsessions
++xsession_in_files = gnome-flashback.desktop.in
++xsession_DATA = $(xsession_in_files:.desktop.in=.desktop)
++
++%.session: %.session.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
++
++@INTLTOOL_DESKTOP_RULE@
++
+ default_layoutdir = $(datadir)/gnome-panel
+ default_layout_DATA = panel-default-layout.layout
+
+ EXTRA_DIST = \
+ $(gsettings_schemas_in_in) \
++ $(session_in_files) \
++ $(xsession_in_files) \
+ $(default_layout_DATA)
+
+ CLEANFILES = \
+ $(gsettings__enum_file) \
+ $(gsettings_SCHEMAS_in) \
+ $(gsettings_SCHEMAS) \
+- *.gschema.valid
++ *.gschema.valid \
++ $(session_DATA) \
++ $(xsession_DATA)
+
+ -include $(top_srcdir)/git.mk
+diff --git a/data/gnome-flashback.desktop.in b/data/gnome-flashback.desktop.in
+new file mode 100644
+index 0000000..4856f75
+--- /dev/null
++++ b/data/gnome-flashback.desktop.in
+@@ -0,0 +1,7 @@
++[Desktop Entry]
++_Name=GNOME Flashback
++_Comment=This session logs you into GNOME with the traditional panel
++Exec=gnome-session --session=gnome-flashback
++TryExec=gnome-session
++Icon=
++Type=Application
+diff --git a/data/gnome-flashback.session.desktop.in b/data/gnome-flashback.session.desktop.in
+new file mode 100644
+index 0000000..c012c58
+--- /dev/null
++++ b/data/gnome-flashback.session.desktop.in
+@@ -0,0 +1,3 @@
++[GNOME Session]
++_Name=GNOME Flashback
++RequiredComponents=gnome-panel;gnome-settings-daemon;gnome-screensaver;metacity;nautilus-classic;notification-daemon;
+diff --git a/po/POTFILES.in b/po/POTFILES.in
+index bc65c4c..a6aa6c7 100644
+--- a/po/POTFILES.in
++++ b/po/POTFILES.in
+@@ -23,6 +23,8 @@ applets/wncklet/window-menu.c
+ applets/wncklet/wncklet.c
+ applets/wncklet/workspace-switcher.c
+ [type: gettext/glade]applets/wncklet/workspace-switcher.ui
++data/gnome-flashback.desktop.in
++data/gnome-flashback.session.desktop.in
+ data/org.gnome.gnome-panel.applet.clock.gschema.xml.in.in
+ data/org.gnome.gnome-panel.applet.fish.gschema.xml.in.in
+ data/org.gnome.gnome-panel.applet.window-list.gschema.xml.in.in
+--
+1.7.10.4
+
diff --git a/community/gnome-panel/18_fix_force_quit_applet.patch b/community/gnome-panel/18_fix_force_quit_applet.patch
new file mode 100644
index 000000000..8a72c9262
--- /dev/null
+++ b/community/gnome-panel/18_fix_force_quit_applet.patch
@@ -0,0 +1,98 @@
+Description: Fix Force-Quit panel applet
+ This patch implements handling of XInput2 extension events in the applet.
+ Without this patch, the applet fails to recognize such events (either mouse
+ click for killing application, or escape key for exiting), hence freezing the
+ desktop.
+ .
+ Also fix the event mask in call of gdk_device_grab() for keyboard.
+Author: Sébastien Villemot <sebastien@debian.org>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698740
+Forwarded: no
+Last-Update: 2013-01-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/gnome-panel/panel-force-quit.c
++++ b/gnome-panel/panel-force-quit.c
+@@ -32,6 +32,8 @@
+ #include <X11/Xlib.h>
+ #include <X11/keysym.h>
+
++#include <X11/extensions/XInput2.h>
++
+ #include "panel-icon-names.h"
+ #include "panel-stock-icons.h"
+
+@@ -246,22 +248,23 @@
+
+ static void
+ handle_button_press_event (GtkWidget *popup,
+- XKeyEvent *event)
++ Display *display,
++ Window subwindow)
+ {
+ Window window;
+
+ remove_popup (popup);
+
+- if (event->subwindow == None)
++ if (subwindow == None)
+ return;
+
+ if (wm_state_atom == None)
+- wm_state_atom = XInternAtom (event->display, "WM_STATE", FALSE);
++ wm_state_atom = XInternAtom (display, "WM_STATE", FALSE);
+
+- window = find_managed_window (event->display, event->subwindow);
++ window = find_managed_window (display, subwindow);
+
+ if (window != None) {
+- if (!gdk_x11_window_lookup_for_display (gdk_x11_lookup_xdisplay (event->display), window))
++ if (!gdk_x11_window_lookup_for_display (gdk_x11_lookup_xdisplay (display), window))
+ kill_window_question ((gpointer) window);
+ }
+ }
+@@ -272,10 +275,12 @@
+ GtkWidget *popup)
+ {
+ XEvent *xevent = (XEvent *) gdk_xevent;
++ XIEvent *xiev;
++ XIDeviceEvent *xidev;
+
+ switch (xevent->type) {
+ case ButtonPress:
+- handle_button_press_event (popup, &xevent->xkey);
++ handle_button_press_event (popup, xevent->xbutton.display, xevent->xbutton.subwindow);
+ return GDK_FILTER_REMOVE;
+ case KeyPress:
+ if (xevent->xkey.keycode == XKeysymToKeycode (xevent->xany.display, XK_Escape)) {
+@@ -283,6 +288,21 @@
+ return GDK_FILTER_REMOVE;
+ }
+ break;
++ case GenericEvent:
++ xiev = (XIEvent *) xevent->xcookie.data;
++ xidev = (XIDeviceEvent *) xiev;
++ switch (xiev->evtype) {
++ case XI_KeyPress:
++ if (xidev->detail == XKeysymToKeycode (xevent->xany.display, XK_Escape)) {
++ remove_popup (popup);
++ return GDK_FILTER_REMOVE;
++ }
++ break;
++ case XI_ButtonPress:
++ handle_button_press_event (popup, xidev->display, xidev->child);
++ return GDK_FILTER_REMOVE;
++ }
++ break;
+ default:
+ break;
+ }
+@@ -331,7 +351,7 @@
+
+ status = gdk_device_grab (keyboard, root,
+ GDK_OWNERSHIP_NONE, FALSE,
+- GDK_KEY_PRESS | GDK_KEY_RELEASE,
++ GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK,
+ NULL, time);
+ if (status != GDK_GRAB_SUCCESS) {
+ g_warning ("Keyboard grab failed\n");
diff --git a/community/gnome-panel/PKGBUILD b/community/gnome-panel/PKGBUILD
index 664bc7945..e490594e4 100644
--- a/community/gnome-panel/PKGBUILD
+++ b/community/gnome-panel/PKGBUILD
@@ -1,38 +1,84 @@
-# $Id: PKGBUILD 87902 2013-04-08 14:46:15Z heftig $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
+# $Id: PKGBUILD 88684 2013-04-21 22:16:57Z heftig $
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Jan de Groot <jgc@archlinux.org>
-pkgname=gnome-panel
+pkgbase=gnome-panel
+pkgname=('gnome-panel' 'gnome-flashback-session')
pkgver=3.6.2
-pkgrel=1
+pkgrel=3
arch=('i686' 'x86_64')
license=('GPL')
-pkgdesc="The GNOME Panel"
-url="http://www.gnome.org"
-depends=('gnome-menus' 'gnome-desktop' 'evolution-data-server' 'librsvg' 'libwnck3' 'libsm' 'dconf'
- 'gconf' 'telepathy-glib')
-makedepends=('yelp-tools' 'intltool' 'gobject-introspection' 'networkmanager' 'libcanberra')
-install=gnome-panel.install
-groups=('gnome')
-provides=("gnome-panel-bonobo=${pkgver}")
-options=('!libtool' '!emptydirs')
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz)
-sha256sums=('a41c45c5512e796b8602ce50bf0d205993eab364c860aae31afa582d77b77079')
+pkgdesc="Legacy GNOME panel"
+url="https://live.gnome.org/GnomePanel"
+depends=('dconf' 'evolution-data-server' 'gconf' 'gnome-desktop' 'gnome-menus' 'librsvg'
+ 'libwnck3' 'telepathy-glib')
+makedepends=('gobject-introspection' 'intltool' 'yelp-tools' 'networkmanager' 'gnome-common')
+install=$pkgbase.install
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver:0:3}/$pkgbase-$pkgver.tar.xz
+ gnome-desktop-3.8.patch
+ drop-gweather-xml-include.patch
+ 18_fix_force_quit_applet.patch
+ logout-hang-workaround.patch
+ 0001-Add-the-GNOME-Flashback-session.patch
+ fix-autoconf.patch)
+sha256sums=('a41c45c5512e796b8602ce50bf0d205993eab364c860aae31afa582d77b77079'
+ '3a67f4b07a7dd356fad6b40a43983f3945123ed40080eb153396a481b34efc0c'
+ 'e3298c62bc577969817c5d6752be83a5129004fd344e4f7998a0d8aa61874305'
+ '9d742f675d9e09a032bfe00e0523a4ef7e234589a74a6086243bf335ce212775'
+ 'e98391114fe618d3c9530cd5ad88e5d0d0e3b62890e4494f7db6a76ec3613a47'
+ 'f313791d246749f18764ad4af13c4efe54483bc327fab371c47f9fbfc25b20a9'
+ '6828c097505d2dbbf465ed7ff694adbd646a0af2105c8dd864d1061bf0afea71')
build() {
- cd "$pkgname-$pkgver"
- PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc \
- --localstatedir=/var --disable-static \
- --libexecdir=/usr/lib/gnome-panel \
- --disable-scrollkeeper \
- --disable-schemas-compile
+ cd "$pkgbase-$pkgver"
+
+ # Port to gnome-desktop 3.8
+ patch -Np1 -i "$srcdir/gnome-desktop-3.8.patch"
+
+ # Fix build with libgweather 3.8
+ patch -Np0 -i "$srcdir/drop-gweather-xml-include.patch"
+
+ # Fix force quit applet to avoid freeze
+ patch -Np1 -i "$srcdir/18_fix_force_quit_applet.patch"
+
+ # Apply a workaround to avoid hang on logout for 15-20 sec
+ patch -Np1 -i "$srcdir/logout-hang-workaround.patch"
+
+ # Add GNOME Flashback session
+ # https://bugzilla.gnome.org/show_bug.cgi?id=694625
+ patch -Np1 -i "$srcdir/0001-Add-the-GNOME-Flashback-session.patch"
+
+ # Fix build
+ patch -Np1 -i "$srcdir/fix-autoconf.patch"
+
+ autoreconf -fi
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgbase \
+ --disable-static --disable-schemas-compile \
+ PYTHON=/usr/bin/python2
make
}
-package() {
- cd "$pkgname-$pkgver"
- make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install
+package_gnome-panel() {
+ cd "$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ # Remove unneeded script
+ rm "$pkgdir/usr/lib/gnome-panel/gnome-panel-add"
+
+ # Split out the session files
+ rm -r "$pkgdir"/usr/share/{gnome-session,xsessions}
+}
+
+package_gnome-flashback-session() {
+ pkgdesc="Shell for Gnome 3 which was initially called Gnome Fallback"
+ url="https://live.gnome.org/GnomeFlashback"
+ depends=('gnome-screensaver' 'gnome-panel' 'gnome-session' 'gnome-settings-daemon'
+ 'gnome-settings-daemon-compat' 'gnome-themes-standard' 'metacity' 'nautilus'
+ 'notification-daemon' 'polkit-gnome')
+ install=
- install -m755 -d "$pkgdir/usr/share/gconf/schemas"
- gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain gnome-panel-3.0 "$pkgdir"/etc/gconf/schemas/*.schemas
- rm -f "$pkgdir"/etc/gconf/schemas/*.schemas
+ cd "$pkgbase-$pkgver"
+ make -C data DESTDIR="$pkgdir" install-sessionDATA
+ make -C data DESTDIR="$pkgdir" install-xsessionDATA
}
diff --git a/community/gnome-panel/drop-gweather-xml-include.patch b/community/gnome-panel/drop-gweather-xml-include.patch
new file mode 100644
index 000000000..3b3a559f0
--- /dev/null
+++ b/community/gnome-panel/drop-gweather-xml-include.patch
@@ -0,0 +1,10 @@
+--- applets/clock/clock.c.orig 2012-12-25 14:38:00.101601746 -0600
++++ applets/clock/clock.c 2012-12-25 14:38:30.331443803 -0600
+@@ -54,7 +54,6 @@
+ #define GNOME_DESKTOP_USE_UNSTABLE_API
+ #include <libgnome-desktop/gnome-wall-clock.h>
+
+-#include <libgweather/gweather-xml.h>
+ #include <libgweather/location-entry.h>
+ #include <libgweather/timezone-menu.h>
+ #include <libgweather/gweather-enum-types.h>
diff --git a/community/gnome-panel/fix-autoconf.patch b/community/gnome-panel/fix-autoconf.patch
new file mode 100644
index 000000000..17d9e025c
--- /dev/null
+++ b/community/gnome-panel/fix-autoconf.patch
@@ -0,0 +1,11 @@
+diff -Naur gnome-panel-3.6.2.orig/configure.ac gnome-panel-3.6.2/configure.ac
+--- gnome-panel-3.6.2.orig/configure.ac 2012-11-12 18:51:14.000000000 +0100
++++ gnome-panel-3.6.2/configure.ac 2013-04-10 14:50:14.132509059 +0200
+@@ -1,6 +1,6 @@
+ AC_INIT([gnome-panel], [3.6.2],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-panel])
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar -Wno-portability])
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
diff --git a/community/gnome-panel/gnome-desktop-3.8.patch b/community/gnome-panel/gnome-desktop-3.8.patch
new file mode 100644
index 000000000..3c8823cd2
--- /dev/null
+++ b/community/gnome-panel/gnome-desktop-3.8.patch
@@ -0,0 +1,199 @@
+diff -Naur gnome-panel-3.6.2.orig/applets/clock/calendar-window.c gnome-panel-3.6.2/applets/clock/calendar-window.c
+--- gnome-panel-3.6.2.orig/applets/clock/calendar-window.c 2012-11-12 18:35:17.000000000 +0100
++++ gnome-panel-3.6.2/applets/clock/calendar-window.c 2013-04-08 23:10:30.451012763 +0200
+@@ -42,9 +42,6 @@
+ #include <glib/gi18n.h>
+ #include <gio/gio.h>
+
+-#define GNOME_DESKTOP_USE_UNSTABLE_API
+-#include <libgnome-desktop/gnome-desktop-utils.h>
+-
+ #include "calendar-window.h"
+
+ #include "clock.h"
+@@ -168,6 +165,13 @@
+ return;
+ }
+
++ /* FIXME: reintroduce terminal support if a proper GAppInfo port of gnome-panel is ever done */
++ if (terminal) {
++ g_printerr ("Terminal-based calendar/tasks applications are no longer supported, sorry. "
++ "Please configure a different application.\n");
++ return;
++ }
++
+ command_line = g_find_program_in_path (program);
+ if (command_line == NULL) {
+ g_printerr ("Cannot launch calendar/tasks application: %s in path\n", program);
+@@ -189,9 +193,6 @@
+ screen = gtk_widget_get_screen (calwin->priv->calendar);
+ error = NULL;
+
+- if (terminal)
+- gnome_desktop_prepend_terminal_to_vector (&argc, &argv);
+-
+ display = gdk_screen_make_display_name (screen);
+
+ result = g_spawn_async (NULL, /* working directory */
+diff -Naur gnome-panel-3.6.2.orig/gnome-panel/panel-run-dialog.c gnome-panel-3.6.2/gnome-panel/panel-run-dialog.c
+--- gnome-panel-3.6.2.orig/gnome-panel/panel-run-dialog.c 2012-11-12 18:35:17.000000000 +0100
++++ gnome-panel-3.6.2/gnome-panel/panel-run-dialog.c 2013-04-08 23:10:52.408175181 +0200
+@@ -25,6 +25,7 @@
+ * Havoc Pennington <hp@pobox.com>
+ * George Lebl <jirka@5z.com>
+ * Mark McLoughlin <mark@skynet.ie>
++ * Tom Tromey (Copyright (C) 1998)
+ */
+
+ #include <config.h>
+@@ -42,8 +43,6 @@
+ #include <gdk/gdkkeysyms.h>
+ #include <gmenu-tree.h>
+
+-#include <libgnome-desktop/gnome-desktop-utils.h>
+-
+ #include <libpanel-util/panel-error.h>
+ #include <libpanel-util/panel-glib.h>
+ #include <libpanel-util/panel-gtk.h>
+@@ -335,6 +334,132 @@
+ */
+ }
+
++
++/**
++ * panel_run_dialog_prepend_terminal_to_vector:
++ * @argc: a pointer to the vector size
++ * @argv: a pointer to the vector
++ *
++ * Description: Prepends a terminal (either the one configured as default in
++ * the user's GNOME setup, or one of the common xterm emulators) to the passed
++ * in vector, modifying it in the process. The vector should be allocated with
++ * #g_malloc, as this will #g_free the original vector. Also all elements must
++ * have been allocated separately. That is the standard glib/GNOME way of
++ * doing vectors however. If the integer that @argc points to is negative, the
++ * size will first be computed. Also note that passing in pointers to a vector
++ * that is empty, will just create a new vector for you.
++ **/
++/* TODO: throw out this function if there ever is a proper GAppInfo port */
++static void
++panel_run_dialog_prepend_terminal_to_vector (int *argc, char ***argv)
++{
++ char **real_argv;
++ int real_argc;
++ int i, j;
++ char **term_argv = NULL;
++ int term_argc = 0;
++ GSettings *settings;
++
++ gchar *terminal = NULL;
++
++ char **the_argv;
++
++ g_return_if_fail (argc != NULL);
++ g_return_if_fail (argv != NULL);
++
++ /* sanity */
++ if(*argv == NULL)
++ *argc = 0;
++
++ the_argv = *argv;
++
++ /* compute size if not given */
++ if (*argc < 0) {
++ for (i = 0; the_argv[i] != NULL; i++)
++ ;
++ *argc = i;
++ }
++
++ settings = g_settings_new ("org.gnome.desktop.default-applications.terminal");
++ terminal = g_settings_get_string (settings, "exec");
++
++ if (terminal) {
++ gchar *command_line;
++ gchar *exec_flag;
++
++ exec_flag = g_settings_get_string (settings, "exec-arg");
++
++ if (exec_flag == NULL)
++ command_line = g_strdup (terminal);
++ else
++ command_line = g_strdup_printf ("%s %s", terminal,
++ exec_flag);
++
++ g_shell_parse_argv (command_line,
++ &term_argc,
++ &term_argv,
++ NULL /* error */);
++
++ g_free (command_line);
++ g_free (exec_flag);
++ g_free (terminal);
++ }
++
++ g_object_unref (settings);
++
++ if (term_argv == NULL) {
++ char *check;
++
++ term_argc = 2;
++ term_argv = g_new0 (char *, 3);
++
++ check = g_find_program_in_path ("gnome-terminal");
++ if (check != NULL) {
++ term_argv[0] = check;
++ /* Note that gnome-terminal takes -x and
++ * as -e in gnome-terminal is broken we use that. */
++ term_argv[1] = g_strdup ("-x");
++ } else {
++ if (check == NULL)
++ check = g_find_program_in_path ("nxterm");
++ if (check == NULL)
++ check = g_find_program_in_path ("color-xterm");
++ if (check == NULL)
++ check = g_find_program_in_path ("rxvt");
++ if (check == NULL)
++ check = g_find_program_in_path ("xterm");
++ if (check == NULL)
++ check = g_find_program_in_path ("dtterm");
++ if (check == NULL) {
++ g_warning (_("Cannot find a terminal, using "
++ "xterm, even if it may not work"));
++ check = g_strdup ("xterm");
++ }
++ term_argv[0] = check;
++ term_argv[1] = g_strdup ("-e");
++ }
++ }
++
++ real_argc = term_argc + *argc;
++ real_argv = g_new (char *, real_argc + 1);
++
++ for (i = 0; i < term_argc; i++)
++ real_argv[i] = term_argv[i];
++
++ for (j = 0; j < *argc; j++, i++)
++ real_argv[i] = (char *)the_argv[j];
++
++ real_argv[i] = NULL;
++
++ g_free (*argv);
++ *argv = real_argv;
++ *argc = real_argc;
++
++ /* we use g_free here as we sucked all the inner strings
++ * out from it into real_argv */
++ g_free (term_argv);
++}
++
+ static gboolean
+ panel_run_dialog_launch_command (PanelRunDialog *dialog,
+ const char *command,
+@@ -354,7 +479,7 @@
+ screen = gtk_window_get_screen (GTK_WINDOW (dialog->run_dialog));
+
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->terminal_checkbox)))
+- gnome_desktop_prepend_terminal_to_vector (&argc, &argv);
++ panel_run_dialog_prepend_terminal_to_vector (&argc, &argv);
+
+ display = gdk_screen_make_display_name (screen);
+
diff --git a/community/gnome-panel/gnome-panel.install b/community/gnome-panel/gnome-panel.install
index 0f9324937..f7e8c46ac 100644
--- a/community/gnome-panel/gnome-panel.install
+++ b/community/gnome-panel/gnome-panel.install
@@ -1,24 +1,12 @@
-pkgname=gnome-panel
-
post_install() {
- gconfpkg --install $pkgname
glib-compile-schemas /usr/share/glib-2.0/schemas
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
}
-pre_upgrade() {
- pre_remove
-}
-
post_upgrade() {
post_install
}
-pre_remove() {
- gconfpkg --uninstall $pkgname
-}
-
post_remove() {
- glib-compile-schemas /usr/share/glib-2.0/schemas
- gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+ post_install
}
diff --git a/community/gnome-panel/logout-hang-workaround.patch b/community/gnome-panel/logout-hang-workaround.patch
new file mode 100644
index 000000000..0b13e35b6
--- /dev/null
+++ b/community/gnome-panel/logout-hang-workaround.patch
@@ -0,0 +1,15 @@
+diff -Naur gnome-panel-3.6.2.orig/gnome-panel/panel-session.c gnome-panel-3.6.2/gnome-panel/panel-session.c
+--- gnome-panel-3.6.2.orig/gnome-panel/panel-session.c 2012-09-03 17:41:42.000000000 +0200
++++ gnome-panel-3.6.2/gnome-panel/panel-session.c 2013-04-11 00:59:42.125864185 +0200
+@@ -69,11 +69,6 @@
+
+ egg_sm_client_set_mode (mode);
+
+- client = egg_sm_client_get ();
+-
+- g_signal_connect (client, "quit",
+- G_CALLBACK (panel_session_handle_quit), NULL);
+-
+ /* We don't want the WM to try and save/restore our
+ * window position */
+ gdk_x11_set_sm_client_id (NULL);
diff --git a/community/gnome-phone-manager/PKGBUILD b/community/gnome-phone-manager/PKGBUILD
index a84445874..9cb5ee7da 100644
--- a/community/gnome-phone-manager/PKGBUILD
+++ b/community/gnome-phone-manager/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 87900 2013-04-08 14:45:13Z heftig $
+# $Id: PKGBUILD 88702 2013-04-21 22:24:11Z heftig $
# Maintainer: Roman Kyrylych <roman@archlinux.org>
pkgname=gnome-phone-manager
-pkgver=0.68
-pkgrel=3
+pkgver=0.69
+pkgrel=1
pkgdesc="Control your mobile phone from your GNOME desktop."
arch=('i686' 'x86_64')
url="http://live.gnome.org/PhoneManager"
@@ -12,10 +12,10 @@ depends=('evolution-data-server' 'gnokii' 'gnome-bluetooth' 'gnome-icon-theme' '
makedepends=('intltool')
options=('!emptydirs' '!libtool')
install=gnome-phone-manager.install
-source=(ftp://ftp.archlinux.org/other/gnome-phone-manager/gnome-phone-manager-0.68-git20121019.tar.xz
+source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz
gnome-phone-manager-0.68-eds.patch)
-sha256sums=('885dfa80989c633a5ae8b118c9b7c903e18e44f0e9fc89e6a9bae05da87c9b15'
- '98d5c2d3034081eebbaa0dac85f53dcc40c8970114f5711aff8c37bab2931a66')
+sha256sums=('35e038ea3afaacdf451046e87af876096cf1520efc04fc3f5b63ea22e0297175'
+ '232a72108836ddd46d329993d166c38550e2923f161b4dc814d75af4ed5ccc79')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/community/gnome-phone-manager/gnome-phone-manager-0.68-eds.patch b/community/gnome-phone-manager/gnome-phone-manager-0.68-eds.patch
index 2a36de13a..924201196 100644
--- a/community/gnome-phone-manager/gnome-phone-manager-0.68-eds.patch
+++ b/community/gnome-phone-manager/gnome-phone-manager-0.68-eds.patch
@@ -1,7 +1,94 @@
-diff --git a/cut-n-paste/e-contact-entry/e-contact-entry.c b/cut-n-paste/e-contact-entry/e-contact-entry.c
-index dc8e2e3..d95e5b9 100644
---- a/cut-n-paste/e-contact-entry/e-contact-entry.c
-+++ b/cut-n-paste/e-contact-entry/e-contact-entry.c
+diff -up gnome-phone-manager-0.68/configure.eds gnome-phone-manager-0.68/configure
+--- gnome-phone-manager-0.68/configure.eds 2012-10-30 15:03:19.515929969 -0400
++++ gnome-phone-manager-0.68/configure 2012-10-30 15:03:54.979862209 -0400
+@@ -13939,12 +13939,12 @@ if test -n "$PHONEMGR_CFLAGS"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- \$GNOME_BLUETOOTH_REQS \$evo_pc_file libedataserverui-3.0
++ \$GNOME_BLUETOOTH_REQS \$evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- $GNOME_BLUETOOTH_REQS $evo_pc_file libedataserverui-3.0
++ $GNOME_BLUETOOTH_REQS $evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ ") 2>&5
+ ac_status=$?
+@@ -13952,7 +13952,7 @@ if test -n "$PHONEMGR_CFLAGS"; then
+ test $ac_status = 0; }; then
+ pkg_cv_PHONEMGR_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- $GNOME_BLUETOOTH_REQS $evo_pc_file libedataserverui-3.0
++ $GNOME_BLUETOOTH_REQS $evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ " 2>/dev/null`
+ else
+@@ -13967,12 +13967,12 @@ if test -n "$PHONEMGR_LIBS"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- \$GNOME_BLUETOOTH_REQS \$evo_pc_file libedataserverui-3.0
++ \$GNOME_BLUETOOTH_REQS \$evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- $GNOME_BLUETOOTH_REQS $evo_pc_file libedataserverui-3.0
++ $GNOME_BLUETOOTH_REQS $evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ ") 2>&5
+ ac_status=$?
+@@ -13980,7 +13980,7 @@ if test -n "$PHONEMGR_LIBS"; then
+ test $ac_status = 0; }; then
+ pkg_cv_PHONEMGR_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- $GNOME_BLUETOOTH_REQS $evo_pc_file libedataserverui-3.0
++ $GNOME_BLUETOOTH_REQS $evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ " 2>/dev/null`
+ else
+@@ -14004,13 +14004,13 @@ fi
+ if test $_pkg_short_errors_supported = yes; then
+ PHONEMGR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- $GNOME_BLUETOOTH_REQS $evo_pc_file libedataserverui-3.0
++ $GNOME_BLUETOOTH_REQS $evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ " 2>&1`
+ else
+ PHONEMGR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- $GNOME_BLUETOOTH_REQS $evo_pc_file libedataserverui-3.0
++ $GNOME_BLUETOOTH_REQS $evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ " 2>&1`
+ fi
+@@ -14019,7 +14019,7 @@ fi
+
+ as_fn_error $? "Package requirements (gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- $GNOME_BLUETOOTH_REQS $evo_pc_file libedataserverui-3.0
++ $GNOME_BLUETOOTH_REQS $evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ ) were not met:
+
+diff -up gnome-phone-manager-0.68/configure.in.eds gnome-phone-manager-0.68/configure.in
+--- gnome-phone-manager-0.68/configure.in.eds 2012-10-30 15:03:24.151921087 -0400
++++ gnome-phone-manager-0.68/configure.in 2012-10-30 15:03:33.865897797 -0400
+@@ -47,7 +47,7 @@ PKG_CHECK_MODULES(LIBGSM, glib-2.0 gobje
+
+ PKG_CHECK_MODULES(PHONEMGR, gtk+-3.0 >= 3.0 glib-2.0 >= 2.31.0
+ libcanberra-gtk3 gconf-2.0
+- $GNOME_BLUETOOTH_REQS $evo_pc_file libedataserverui-3.0
++ $GNOME_BLUETOOTH_REQS $evo_pc_file
+ gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
+ )
+
+diff -up gnome-phone-manager-0.68/cut-n-paste/e-contact-entry/e-contact-entry.c.eds gnome-phone-manager-0.68/cut-n-paste/e-contact-entry/e-contact-entry.c
+--- gnome-phone-manager-0.68/cut-n-paste/e-contact-entry/e-contact-entry.c.eds 2012-07-29 22:06:12.000000000 -0400
++++ gnome-phone-manager-0.68/cut-n-paste/e-contact-entry/e-contact-entry.c 2012-10-30 15:02:47.177996584 -0400
@@ -38,11 +38,6 @@
#include <glib.h>
#include <glib/gi18n.h>
@@ -32,7 +119,7 @@ index dc8e2e3..d95e5b9 100644
/* A list of EntryLookup structs we are searching */
GList *lookup_entries;
/* Number of characters to start searching at */
-@@ -227,7 +222,7 @@ e_contact_entry_display_func (EContact *contact)
+@@ -227,7 +222,7 @@ e_contact_entry_display_func (EContact *
emails = e_contact_get (contact, E_CONTACT_EMAIL);
for (l = emails; l != NULL; l = l->next) {
item = g_new0 (EContactEntyItem, 1);
@@ -41,7 +128,7 @@ index dc8e2e3..d95e5b9 100644
item->display_string = g_strdup_printf ("%s <%s>", (char*)e_contact_get_const (contact, E_CONTACT_NAME_OR_ORG), item->identifier);
items = g_list_prepend (items, item);
-@@ -276,22 +271,13 @@ view_contacts_added_cb (EBook *book, GList *contacts, gpointer user_data)
+@@ -276,22 +271,13 @@ view_contacts_added_cb (EBook *book, GLi
return;
photo = e_contact_get (contact, E_CONTACT_PHOTO);
@@ -64,7 +151,7 @@ index dc8e2e3..d95e5b9 100644
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
if (pixbuf) {
-@@ -339,16 +325,15 @@ view_contacts_added_cb (EBook *book, GList *contacts, gpointer user_data)
+@@ -339,16 +325,15 @@ view_contacts_added_cb (EBook *book, GLi
* The query on the EBookView has completed.
*/
static void
@@ -83,7 +170,7 @@ index dc8e2e3..d95e5b9 100644
}
/**
-@@ -373,8 +358,8 @@ bookview_cb (EBook *book, EBookStatus status, EBookView *book_view, gpointer clo
+@@ -373,8 +358,8 @@ bookview_cb (EBook *book, EBookStatus st
lookup->bookview = book_view;
g_object_add_weak_pointer ((GObject*)book_view, (gpointer*)&lookup->bookview);
@@ -94,7 +181,7 @@ index dc8e2e3..d95e5b9 100644
e_book_view_start (book_view);
}
-@@ -396,6 +381,7 @@ entry_changed_cb (GtkEditable *editable, gpointer user_data)
+@@ -396,6 +381,7 @@ entry_changed_cb (GtkEditable *editable,
if (lookup->bookview) {
e_book_view_stop (lookup->bookview);
g_object_unref (lookup->bookview);
@@ -102,7 +189,7 @@ index dc8e2e3..d95e5b9 100644
}
}
-@@ -410,7 +396,7 @@ entry_changed_cb (GtkEditable *editable, gpointer user_data)
+@@ -410,7 +396,7 @@ entry_changed_cb (GtkEditable *editable,
if (!lookup->open)
continue;
@@ -111,7 +198,7 @@ index dc8e2e3..d95e5b9 100644
g_signal_emit (entry, signals[ERROR], 0, _("Cannot create searchable view."));
}
}
-@@ -458,11 +444,12 @@ book_opened_cb (EBook *book, EBookStatus status, gpointer data)
+@@ -458,11 +444,12 @@ book_opened_cb (EBook *book, EBookStatus
*/
void
@@ -127,7 +214,7 @@ index dc8e2e3..d95e5b9 100644
g_return_if_fail (E_IS_CONTACT_ENTRY (entry));
-@@ -471,58 +458,48 @@ e_contact_entry_set_source_list (EContactEntry *entry,
+@@ -471,58 +458,48 @@ e_contact_entry_set_source_list (EContac
g_list_foreach (entry->priv->lookup_entries, (GFunc)lookup_entry_free, NULL);
g_list_free (entry->priv->lookup_entries);
}
@@ -174,23 +261,24 @@ index dc8e2e3..d95e5b9 100644
- uri = g_strdup_printf("%s/%s", e_source_group_peek_base_uri (group), e_source_peek_relative_uri (source));
- e_source_set_absolute_uri (s, uri);
- g_free (uri);
-+ for (link = list; link != NULL; link = g_list_next (link)) {
-+ ESource *source = E_SOURCE (link->data);
-+ EntryLookup *lookup;
-
+-
- /* Now add those to the lookup entries list */
- lookup = g_new0 (EntryLookup, 1);
- lookup->entry = entry;
- lookup->status = E_BOOK_ERROR_OK;
- lookup->open = FALSE;
++ for (link = list; link != NULL; link = g_list_next (link)) {
++ ESource *source = E_SOURCE (link->data);
++ EntryLookup *lookup;
+
+- if ((lookup->book = e_book_new (s, &error)) == NULL) {
+- /* TODO handle this better, fire the error signal I guess */
+ /* Now add those to the lookup entries list */
+ lookup = g_new0 (EntryLookup, 1);
+ lookup->entry = entry;
+ lookup->status = E_BOOK_ERROR_OK;
+ lookup->open = FALSE;
-
-- if ((lookup->book = e_book_new (s, &error)) == NULL) {
-- /* TODO handle this better, fire the error signal I guess */
++
+ if ((lookup->book = e_book_new (source, &error)) == NULL) {
+ /* TODO handle this better, fire the error signal I guess */
+ if (error) {
@@ -212,7 +300,7 @@ index dc8e2e3..d95e5b9 100644
}
}
-@@ -530,12 +507,12 @@ e_contact_entry_set_source_list (EContactEntry *entry,
+@@ -530,12 +507,12 @@ e_contact_entry_set_source_list (EContac
g_signal_emit (entry, signals[STATE_CHANGE], 0, FALSE);
}
@@ -228,7 +316,7 @@ index dc8e2e3..d95e5b9 100644
}
void
-@@ -601,8 +578,8 @@ e_contact_entry_set_property (GObject *object, guint property_id, const GValue *
+@@ -601,8 +578,8 @@ e_contact_entry_set_property (GObject *o
entry = E_CONTACT_ENTRY (object);
switch (property_id) {
@@ -239,7 +327,7 @@ index dc8e2e3..d95e5b9 100644
break;
case PROP_COMPLETE_LENGTH:
e_contact_entry_set_complete_length (entry, g_value_get_int (value));
-@@ -620,8 +597,8 @@ e_contact_entry_get_property (GObject *object, guint property_id, GValue *value,
+@@ -620,8 +597,8 @@ e_contact_entry_get_property (GObject *o
entry = E_CONTACT_ENTRY (object);
switch (property_id) {
@@ -250,7 +338,7 @@ index dc8e2e3..d95e5b9 100644
break;
case PROP_COMPLETE_LENGTH:
g_value_set_int (value, e_contact_entry_get_complete_length (entry));
-@@ -644,7 +621,7 @@ e_contact_entry_finalize (GObject *object)
+@@ -644,7 +621,7 @@ e_contact_entry_finalize (GObject *objec
g_list_free (entry->priv->lookup_entries);
g_object_unref (entry->priv->completion);
g_object_unref (entry->priv->store);
@@ -259,7 +347,7 @@ index dc8e2e3..d95e5b9 100644
if (entry->priv->display_destroy) {
entry->priv->display_destroy (entry->priv->display_func);
-@@ -657,7 +634,7 @@ e_contact_entry_finalize (GObject *object)
+@@ -657,7 +634,7 @@ e_contact_entry_finalize (GObject *objec
static void
reset_search_fields (EContactEntry *entry)
{
@@ -268,7 +356,7 @@ index dc8e2e3..d95e5b9 100644
g_free (entry->priv->search_fields);
entry->priv->search_fields = g_new0 (EContactField, G_N_ELEMENTS (fields));
-@@ -716,9 +693,9 @@ e_contact_entry_class_init (EContactEntryClass *klass)
+@@ -716,9 +693,9 @@ e_contact_entry_class_init (EContactEntr
object_class->finalize = e_contact_entry_finalize;
/* Properties */
@@ -289,10 +377,9 @@ index dc8e2e3..d95e5b9 100644
}
if (lookup->book) {
g_object_unref (lookup->book);
-diff --git a/cut-n-paste/e-contact-entry/e-contact-entry.h b/cut-n-paste/e-contact-entry/e-contact-entry.h
-index bf6b39b..6fedef7 100644
---- a/cut-n-paste/e-contact-entry/e-contact-entry.h
-+++ b/cut-n-paste/e-contact-entry/e-contact-entry.h
+diff -up gnome-phone-manager-0.68/cut-n-paste/e-contact-entry/e-contact-entry.h.eds gnome-phone-manager-0.68/cut-n-paste/e-contact-entry/e-contact-entry.h
+--- gnome-phone-manager-0.68/cut-n-paste/e-contact-entry/e-contact-entry.h.eds 2012-07-29 22:06:12.000000000 -0400
++++ gnome-phone-manager-0.68/cut-n-paste/e-contact-entry/e-contact-entry.h 2012-10-30 15:02:47.177996584 -0400
@@ -23,10 +23,8 @@
#ifndef CONTACT_ENTRY_H
#define CONTACT_ENTRY_H
@@ -316,10 +403,9 @@ index bf6b39b..6fedef7 100644
void e_contact_entry_set_complete_length(EContactEntry *entry, int length);
int e_contact_entry_get_complete_length(EContactEntry *entry);
-diff --git a/libgsm/phonemgr-utils.c b/libgsm/phonemgr-utils.c
-index 4e62e10..baef34f 100644
---- a/libgsm/phonemgr-utils.c
-+++ b/libgsm/phonemgr-utils.c
+diff -up gnome-phone-manager-0.68/libgsm/phonemgr-utils.c.eds gnome-phone-manager-0.68/libgsm/phonemgr-utils.c
+--- gnome-phone-manager-0.68/libgsm/phonemgr-utils.c.eds 2012-07-29 22:06:12.000000000 -0400
++++ gnome-phone-manager-0.68/libgsm/phonemgr-utils.c 2012-10-30 15:02:47.177996584 -0400
@@ -27,7 +27,7 @@
#include <glib.h>
#include <glib/gstdio.h>
@@ -329,21 +415,19 @@ index 4e62e10..baef34f 100644
#include <gnokii.h>
#include <bluetooth/bluetooth.h>
-diff --git a/src/e-phone-entry.c b/src/e-phone-entry.c
-index 5d25622..38f4c2f 100644
---- a/src/e-phone-entry.c
-+++ b/src/e-phone-entry.c
-@@ -31,8 +31,7 @@
+diff -up gnome-phone-manager-0.68/src/e-phone-entry.c.eds gnome-phone-manager-0.68/src/e-phone-entry.c
+--- gnome-phone-manager-0.68/src/e-phone-entry.c.eds 2012-07-29 22:06:12.000000000 -0400
++++ gnome-phone-manager-0.68/src/e-phone-entry.c 2012-10-30 15:04:13.471829767 -0400
+@@ -31,8 +31,6 @@
#include <gtk/gtk.h>
#include <string.h>
-#include <libedataserver/e-source-list.h>
-#include <libedataserverui/e-client-utils.h>
-+#include <libedataserverui/libedataserverui.h>
#include "e-phone-entry.h"
#define CONTACT_FORMAT "%s (%s)"
-@@ -181,25 +180,25 @@ e_phone_entry_finalize (GObject *object)
+@@ -181,25 +179,25 @@ e_phone_entry_finalize (GObject *object)
}
static void
diff --git a/community/gnome-screensaver/PKGBUILD b/community/gnome-screensaver/PKGBUILD
index 909802f6b..0c64c1d6d 100644
--- a/community/gnome-screensaver/PKGBUILD
+++ b/community/gnome-screensaver/PKGBUILD
@@ -1,37 +1,44 @@
-# $Id: PKGBUILD 87889 2013-04-08 14:39:56Z heftig $
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# $Id: PKGBUILD 88685 2013-04-21 22:16:59Z heftig $
+# 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=1
-pkgdesc="Screensaver designed to integrate well with the GNOME desktop."
+pkgrel=3
+pkgdesc="Legacy GNOME screensaver"
arch=('i686' 'x86_64')
license=('GPL')
url="http://live.gnome.org/GnomeScreensaver"
backup=(etc/pam.d/gnome-screensaver)
-depends=('dbus-glib' 'libgnomekbd' 'gnome-desktop' 'gsettings-desktop-schemas' 'libsystemd')
-makedepends=('pkgconfig' 'intltool' 'libxss')
-groups=('gnome')
-options=(!emptydirs)
-install=gnome-screensaver.install
+depends=('dbus-glib' 'libgnomekbd' 'gnome-desktop')
+makedepends=('intltool' 'gnome-common')
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
- gnome-screensaver.pam)
+ gnome-screensaver.pam
+ move-desktop-file.patch
+ fix-autoconf.patch)
sha256sums=('f39b78d4f7fed748c7f0a31d694112fb907c6d3c4e63db22eb858df07e962cd0'
- 'c19870c4f2d6e91ba0eea2603753a74e0c5c82ff5fa3cacb1198027a38d0a6cb')
+ 'b6ea9e2eb586d94bcabb617a8f1c2958111df87afdbb51f645882bccdc15cbda'
+ '4bb96f62aa069c83b629204a79a3f63b146bcaf773569aee8b5dd23fbcd88974'
+ 'c4da9c18b543ecbc781c1f103321b324a855bdd0979fd36b437f6033736ad4bb')
build() {
- cd $pkgname-$pkgver
- ./configure --prefix=/usr --sysconfdir=/etc \
- --libexecdir=/usr/lib/gnome-screensaver \
- --localstatedir=/var \
- --with-mit-ext --with-systemd
+ cd "$pkgname-$pkgver"
+ # Upstream patch that moves gnome-screensaver desktop file out of autostart
+ patch -Np1 -i "$srcdir/move-desktop-file.patch"
+
+ # Fix build
+ patch -Np1 -i "$srcdir/fix-autoconf.patch"
+
+ autoreconf -fi
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
+ --with-mit-ext
make
}
package() {
- cd $pkgname-$pkgver
+ cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
install -Dm644 ../gnome-screensaver.pam "$pkgdir/etc/pam.d/gnome-screensaver"
}
diff --git a/community/gnome-screensaver/fix-autoconf.patch b/community/gnome-screensaver/fix-autoconf.patch
new file mode 100644
index 000000000..653b42bc8
--- /dev/null
+++ b/community/gnome-screensaver/fix-autoconf.patch
@@ -0,0 +1,12 @@
+diff -Naur gnome-screensaver-3.6.1.orig/configure.ac gnome-screensaver-3.6.1/configure.ac
+--- gnome-screensaver-3.6.1.orig/configure.ac 2012-10-16 04:28:59.000000000 +0200
++++ gnome-screensaver-3.6.1/configure.ac 2013-04-10 14:24:44.844833193 +0200
+@@ -10,7 +10,7 @@
+ AM_INIT_AUTOMAKE([1.10 no-dist-gzip dist-xz tar-ustar])
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+
+ AM_MAINTAINER_MODE([enable])
+
diff --git a/community/gnome-screensaver/gnome-screensaver.install b/community/gnome-screensaver/gnome-screensaver.install
deleted file mode 100644
index d1a42c6ce..000000000
--- a/community/gnome-screensaver/gnome-screensaver.install
+++ /dev/null
@@ -1,7 +0,0 @@
-pkgname=gnome-screensaver
-
-pre_upgrade() {
- if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then
- gconfpkg --uninstall ${pkgname}
- fi
-}
diff --git a/community/gnome-screensaver/gnome-screensaver.pam b/community/gnome-screensaver/gnome-screensaver.pam
index 453dae646..8d3baf085 100644
--- a/community/gnome-screensaver/gnome-screensaver.pam
+++ b/community/gnome-screensaver/gnome-screensaver.pam
@@ -1,3 +1,3 @@
#%PAM-1.0
-auth required pam_unix_auth.so nullok
-auth optional pam_gnome_keyring.so
+auth substack system-login
+-auth optional pam_gnome_keyring.so
diff --git a/community/gnome-screensaver/move-desktop-file.patch b/community/gnome-screensaver/move-desktop-file.patch
new file mode 100644
index 000000000..d918405ad
--- /dev/null
+++ b/community/gnome-screensaver/move-desktop-file.patch
@@ -0,0 +1,34 @@
+From 1940dc6bc8ad5ee2c029714efb1276c05ca80bd4 Mon Sep 17 00:00:00 2001
+From: Tim Lunn <tim@feathertop.org>
+Date: Thu, 18 Oct 2012 23:08:56 +0000
+Subject: move gnome-screensaver desktop file out of autostart
+
+https://bugzilla.gnome.org/show_bug.cgi?id=683060
+---
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1dd5d46..97ffa07 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -47,7 +47,7 @@ noinst_PROGRAMS = \
+ test-window \
+ $(NULL)
+
+-desktopdir = $(sysconfdir)/xdg/autostart
++desktopdir = $(datadir)/applications
+ desktop_in_files = gnome-screensaver.desktop.in
+ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ @INTLTOOL_DESKTOP_RULE@
+diff --git a/src/gnome-screensaver.desktop.in.in b/src/gnome-screensaver.desktop.in.in
+index fae80c4..82d6d6f 100644
+--- a/src/gnome-screensaver.desktop.in.in
++++ b/src/gnome-screensaver.desktop.in.in
+@@ -5,7 +5,6 @@ _Comment=Launch screensaver and locker program
+ Icon=preferences-desktop-screensaver
+ Exec=gnome-screensaver
+ OnlyShowIn=GNOME;
+-AutostartCondition=GNOME3 if-session gnome-fallback
+ NoDisplay=true
+ X-GNOME-Autostart-Phase=Application
+ X-GNOME-Autostart-Notify=true
+--
+cgit v0.9.1
diff --git a/community/gnome-settings-daemon-compat/PKGBUILD b/community/gnome-settings-daemon-compat/PKGBUILD
new file mode 100644
index 000000000..314d38cd1
--- /dev/null
+++ b/community/gnome-settings-daemon-compat/PKGBUILD
@@ -0,0 +1,61 @@
+# $Id: PKGBUILD 88700 2013-04-21 22:24:08Z heftig $
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+
+pkgname=gnome-settings-daemon-compat
+_pkgname=gnome-settings-daemon
+pkgver=3.6.4
+pkgrel=1
+pkgdesc="Compatibility package that provides background and mount helpers for the Gnome Flashback session"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gnome-desktop')
+makedepends=('docbook-xsl' 'ibus' 'intltool' 'libcanberra' 'libnotify' 'libpulse' 'libwacom' 'nss' 'upower' 'xf86-input-wacom')
+url="https://live.gnome.org/GnomeFlashback"
+source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.xz
+ standalone-background-helper.patch
+ draw-background-unconditionally.patch
+ sessionisactive-port.patch
+ flashback-rename.patch
+ remove-libgsd-dependency.patch)
+sha256sums=('3db993f2dbabc0c9d06a309bb12c9a7104b9cdda414ac4b1c301f5114a441c15'
+ '4c2206b9654bd2b2729297870696c87906e2386b492bae1052b94148e5ea370f'
+ '1b6b8216434b766e1389e876cba5d6ab61498c5824f6d2cc5d67dcf58a07842a'
+ '0821f469cd168f3a131da513a5f9dd352c06f9bc31d57d79de4dc063fa2de915'
+ '57c66068f06599ea682325e9f5b92b751d8f0a4322b53371698f8539f709b101'
+ '730f11d5689892fbab9aa2896f3720e813d17e2455f34fd3a0751e49f5b4c26c')
+
+build() {
+ cd $_pkgname-$pkgver
+
+ # Build background helper as a stand alone binary
+ patch -Np1 -i ../standalone-background-helper.patch
+
+ # Always draw background
+ patch -Np1 -i ../draw-background-unconditionally.patch
+
+ # Port to gnome-session's SessionIsActive property
+ patch -Np1 -i ../sessionisactive-port.patch
+
+ # Remove libgsd dependency
+ patch -Np1 -i ../remove-libgsd-dependency.patch
+
+ # GNOME Fallback renamed to Flashback
+ patch -Np1 -i ../flashback-rename.patch
+
+ autoreconf -fi
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$_pkgname \
+ --disable-static --enable-systemd
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=656231
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+
+ make -C plugins/automount
+ make -C plugins/background
+}
+
+package() {
+ cd $_pkgname-$pkgver
+ make -C plugins/automount DESTDIR="$pkgdir" install
+ make -C plugins/background DESTDIR="$pkgdir" install
+}
diff --git a/community/gnome-settings-daemon-compat/draw-background-unconditionally.patch b/community/gnome-settings-daemon-compat/draw-background-unconditionally.patch
new file mode 100644
index 000000000..c279420de
--- /dev/null
+++ b/community/gnome-settings-daemon-compat/draw-background-unconditionally.patch
@@ -0,0 +1,162 @@
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-manager.c gnome-settings-daemon-3.6.4/plugins/background/gsd-background-manager.c
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-manager.c 2013-01-10 14:37:58.000000000 +0100
++++ gnome-settings-daemon-3.6.4/plugins/background/gsd-background-manager.c 2013-04-10 16:33:15.858860586 +0200
+@@ -69,110 +69,6 @@
+
+ static gpointer manager_object = NULL;
+
+-static gboolean
+-dont_draw_background (GsdBackgroundManager *manager)
+-{
+- return !g_settings_get_boolean (manager->priv->settings,
+- "draw-background");
+-}
+-
+-static gboolean
+-nautilus_is_drawing_background (GsdBackgroundManager *manager)
+-{
+- Atom window_id_atom;
+- Window nautilus_xid;
+- Atom actual_type;
+- int actual_format;
+- unsigned long nitems;
+- unsigned long bytes_after;
+- unsigned char *data;
+- Atom wmclass_atom;
+- gboolean running;
+- gint error;
+- gboolean show_desktop_icons;
+-
+- show_desktop_icons = g_settings_get_boolean (manager->priv->settings,
+- "show-desktop-icons");
+- if (! show_desktop_icons) {
+- return FALSE;
+- }
+-
+- window_id_atom = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+- "NAUTILUS_DESKTOP_WINDOW_ID", True);
+-
+- if (window_id_atom == None) {
+- return FALSE;
+- }
+-
+- XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+- GDK_ROOT_WINDOW (),
+- window_id_atom,
+- 0,
+- 1,
+- False,
+- XA_WINDOW,
+- &actual_type,
+- &actual_format,
+- &nitems,
+- &bytes_after,
+- &data);
+-
+- if (data != NULL) {
+- nautilus_xid = *(Window *) data;
+- XFree (data);
+- } else {
+- return FALSE;
+- }
+-
+- if (actual_type != XA_WINDOW) {
+- return FALSE;
+- }
+- if (actual_format != 32) {
+- return FALSE;
+- }
+-
+- wmclass_atom = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "WM_CLASS", False);
+-
+- gdk_error_trap_push ();
+-
+- XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+- nautilus_xid,
+- wmclass_atom,
+- 0,
+- 24,
+- False,
+- XA_STRING,
+- &actual_type,
+- &actual_format,
+- &nitems,
+- &bytes_after,
+- &data);
+-
+- error = gdk_error_trap_pop ();
+-
+- if (error == BadWindow) {
+- return FALSE;
+- }
+-
+- if (actual_type == XA_STRING &&
+- nitems == 24 &&
+- bytes_after == 0 &&
+- actual_format == 8 &&
+- data != NULL &&
+- !strcmp ((char *)data, "desktop_window") &&
+- !strcmp ((char *)data + strlen ((char *)data) + 1, "Nautilus")) {
+- running = TRUE;
+- } else {
+- running = FALSE;
+- }
+-
+- if (data != NULL) {
+- XFree (data);
+- }
+-
+- return running;
+-}
+-
+ static void
+ on_crossfade_finished (GsdBackgroundManager *manager)
+ {
+@@ -189,11 +85,6 @@
+ int i;
+
+
+- if (nautilus_is_drawing_background (manager) ||
+- dont_draw_background (manager)) {
+- return;
+- }
+-
+ gnome_settings_profile_start (NULL);
+
+ display = gdk_display_get_default ();
+@@ -408,8 +299,7 @@
+ const char *key,
+ GsdBackgroundManager *manager)
+ {
+- if (dont_draw_background (manager) == FALSE)
+- setup_bg_and_draw_background (manager);
++ setup_bg_and_draw_background (manager);
+ }
+
+ gboolean
+@@ -422,24 +312,8 @@
+ gnome_settings_profile_start (NULL);
+
+ manager->priv->settings = g_settings_new ("org.gnome.desktop.background");
+- g_signal_connect (manager->priv->settings, "changed::draw-background",
+- G_CALLBACK (draw_background_changed), manager);
+
+- /* If this is set, nautilus will draw the background and is
+- * almost definitely in our session. however, it may not be
+- * running yet (so is_nautilus_running() will fail). so, on
+- * startup, just don't do anything if this key is set so we
+- * don't waste time setting the background only to have
+- * nautilus overwrite it.
+- */
+- show_desktop_icons = g_settings_get_boolean (manager->priv->settings,
+- "show-desktop-icons");
+-
+- if (!show_desktop_icons) {
+- setup_bg (manager);
+- } else {
+- draw_background_after_session_loads (manager);
+- }
++ setup_bg (manager);
+
+ gnome_settings_profile_end (NULL);
+
diff --git a/community/gnome-settings-daemon-compat/flashback-rename.patch b/community/gnome-settings-daemon-compat/flashback-rename.patch
new file mode 100644
index 000000000..2aaa9ce22
--- /dev/null
+++ b/community/gnome-settings-daemon-compat/flashback-rename.patch
@@ -0,0 +1,18 @@
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/automount/gnome-fallback-mount-helper.desktop.in.in gnome-settings-daemon-3.6.4/plugins/automount/gnome-fallback-mount-helper.desktop.in.in
+--- gnome-settings-daemon-3.6.4.orig/plugins/automount/gnome-fallback-mount-helper.desktop.in.in 2013-01-10 14:37:58.000000000 +0100
++++ gnome-settings-daemon-3.6.4/plugins/automount/gnome-fallback-mount-helper.desktop.in.in 2013-04-10 16:58:35.356800871 +0200
+@@ -9,4 +9,4 @@
+ NoDisplay=true
+ OnlyShowIn=GNOME;Unity;
+ X-GNOME-Autostart-Notify=true
+-AutostartCondition=GNOME3 if-session gnome-fallback
++AutostartCondition=GNOME3 if-session gnome-flashback
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/gnome-fallback-background-helper.desktop.in.in gnome-settings-daemon-3.6.4/plugins/background/gnome-fallback-background-helper.desktop.in.in
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/gnome-fallback-background-helper.desktop.in.in 2013-04-10 15:57:02.136341000 +0200
++++ gnome-settings-daemon-3.6.4/plugins/background/gnome-fallback-background-helper.desktop.in.in 2013-04-10 16:58:57.593982808 +0200
+@@ -9,4 +9,4 @@
+ NoDisplay=true
+ OnlyShowIn=GNOME;Unity;
+ X-GNOME-Autostart-Notify=true
+-AutostartCondition=GNOME3 if-session gnome-fallback
++AutostartCondition=GNOME3 if-session gnome-flashback
diff --git a/community/gnome-settings-daemon-compat/remove-libgsd-dependency.patch b/community/gnome-settings-daemon-compat/remove-libgsd-dependency.patch
new file mode 100644
index 000000000..b843ac2ce
--- /dev/null
+++ b/community/gnome-settings-daemon-compat/remove-libgsd-dependency.patch
@@ -0,0 +1,160 @@
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/automount/gsd-automount-manager.c gnome-settings-daemon-3.6.4/plugins/automount/gsd-automount-manager.c
+--- gnome-settings-daemon-3.6.4.orig/plugins/automount/gsd-automount-manager.c 2013-04-10 17:19:51.796298000 +0200
++++ gnome-settings-daemon-3.6.4/plugins/automount/gsd-automount-manager.c 2013-04-10 17:31:27.382311947 +0200
+@@ -28,13 +28,43 @@
+ #include <glib/gi18n.h>
+ #include <gio/gio.h>
+
+-#include "gnome-settings-profile.h"
+-#include "gnome-settings-session.h"
+ #include "gsd-automount-manager.h"
+ #include "gsd-autorun.h"
+
+ #define GSD_AUTOMOUNT_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_AUTOMOUNT_MANAGER, GsdAutomountManagerPrivate))
+
++#define GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager"
++#define GNOME_SESSION_DBUS_OBJECT "/org/gnome/SessionManager"
++#define GNOME_SESSION_DBUS_INTERFACE "org.gnome.SessionManager"
++
++GDBusProxy *
++get_session_proxy (void)
++{
++ static GDBusProxy *session_proxy;
++ GError *error = NULL;
++
++ if (session_proxy != NULL) {
++ g_object_ref (session_proxy);
++ } else {
++ session_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
++ G_DBUS_PROXY_FLAGS_NONE,
++ NULL,
++ GNOME_SESSION_DBUS_NAME,
++ GNOME_SESSION_DBUS_OBJECT,
++ GNOME_SESSION_DBUS_INTERFACE,
++ NULL,
++ &error);
++ if (error) {
++ g_warning ("Failed to connect to the session manager: %s", error->message);
++ g_error_free (error);
++ } else {
++ g_object_add_weak_pointer (G_OBJECT (session_proxy), (gpointer*)&session_proxy);
++ }
++ }
++
++ return session_proxy;
++}
++
+ struct GsdAutomountManagerPrivate
+ {
+ GSettings *settings;
+@@ -315,7 +345,7 @@
+ static void
+ do_initialize_session (GsdAutomountManager *manager)
+ {
+- manager->priv->session = gnome_settings_session_get_session_proxy ();
++ manager->priv->session = get_session_proxy ();
+ g_signal_connect (manager->priv->session, "g-properties-changed",
+ G_CALLBACK (session_props_changed), manager);
+ session_props_changed (manager->priv->session, NULL, NULL, manager);
+@@ -490,13 +520,10 @@
+ GError **error)
+ {
+ g_debug ("Starting automounting manager");
+- gnome_settings_profile_start (NULL);
+
+ manager->priv->settings = g_settings_new ("org.gnome.desktop.media-handling");
+ setup_automounter (manager);
+
+- gnome_settings_profile_end (NULL);
+-
+ return TRUE;
+ }
+
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/automount/Makefile.am gnome-settings-daemon-3.6.4/plugins/automount/Makefile.am
+--- gnome-settings-daemon-3.6.4.orig/plugins/automount/Makefile.am 2013-01-10 14:37:58.000000000 +0100
++++ gnome-settings-daemon-3.6.4/plugins/automount/Makefile.am 2013-04-10 17:33:09.697997021 +0200
+@@ -8,7 +8,6 @@
+ gsd-autorun.h
+
+ gnome_fallback_mount_helper_CPPFLAGS = \
+- -I$(top_srcdir)/gnome-settings-daemon \
+ -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
+ $(AM_CPPFLAGS)
+
+@@ -20,8 +19,7 @@
+ gnome_fallback_mount_helper_LDADD = \
+ $(SETTINGS_PLUGIN_LIBS) \
+ $(SYSTEMD_LIBS) \
+- $(AUTOMOUNT_LIBS) \
+- $(top_builddir)/gnome-settings-daemon/libgsd.la
++ $(AUTOMOUNT_LIBS)
+
+ autostartdir = $(sysconfdir)/xdg/autostart
+ autostart_in_files = gnome-fallback-mount-helper.desktop.in
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-manager.c gnome-settings-daemon-3.6.4/plugins/background/gsd-background-manager.c
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-manager.c 2013-04-10 17:19:51.792965000 +0200
++++ gnome-settings-daemon-3.6.4/plugins/background/gsd-background-manager.c 2013-04-10 17:22:46.930334951 +0200
+@@ -42,7 +42,6 @@
+ #include <libgnome-desktop/gnome-bg.h>
+ #include <X11/Xatom.h>
+
+-#include "gnome-settings-profile.h"
+ #include "gsd-background-manager.h"
+
+ #define GSD_BACKGROUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_BACKGROUND_MANAGER, GsdBackgroundManagerPrivate))
+@@ -85,8 +84,6 @@
+ int i;
+
+
+- gnome_settings_profile_start (NULL);
+-
+ display = gdk_display_get_default ();
+ n_screens = gdk_display_get_n_screens (display);
+
+@@ -121,8 +118,6 @@
+
+ cairo_surface_destroy (surface);
+ }
+-
+- gnome_settings_profile_end (NULL);
+ }
+
+ static void
+@@ -309,14 +304,11 @@
+ gboolean show_desktop_icons;
+
+ g_debug ("Starting background manager");
+- gnome_settings_profile_start (NULL);
+
+ manager->priv->settings = g_settings_new ("org.gnome.desktop.background");
+
+ setup_bg (manager);
+
+- gnome_settings_profile_end (NULL);
+-
+ return TRUE;
+ }
+
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/Makefile.am gnome-settings-daemon-3.6.4/plugins/background/Makefile.am
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/Makefile.am 2013-04-10 17:43:32.768975155 +0200
++++ gnome-settings-daemon-3.6.4/plugins/background/Makefile.am 2013-04-10 17:43:19.115328380 +0200
+@@ -6,18 +6,16 @@
+ gsd-background-manager.h
+
+ gnome_fallback_background_helper_CPPFLAGS = \
+- -I$(top_srcdir)/gnome-settings-daemon \
+ -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
+ $(AM_CPPFLAGS)
+
+ gnome_fallback_background_helper_CFLAGS = \
+ $(SETTINGS_PLUGIN_CFLAGS) \
+ $(BACKGROUND_CFLAGS)
+
+ gnome_fallback_background_helper_LDADD = \
+ $(SETTINGS_PLUGIN_LIBS) \
+- $(BACKGROUND_LIBS) \
+- $(top_builddir)/gnome-settings-daemon/libgsd.la
++ $(BACKGROUND_LIBS)
+
+ autostartdir = $(sysconfdir)/xdg/autostart
+ autostart_in_files = gnome-fallback-background-helper.desktop.in
diff --git a/community/gnome-settings-daemon-compat/sessionisactive-port.patch b/community/gnome-settings-daemon-compat/sessionisactive-port.patch
new file mode 100644
index 000000000..dc5fd260e
--- /dev/null
+++ b/community/gnome-settings-daemon-compat/sessionisactive-port.patch
@@ -0,0 +1,73 @@
+From 32b0b2d85629ae765543df1d940a5ca3c37dcec1 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters@verbum.org>
+Date: Tue, 06 Nov 2012 22:47:05 +0000
+Subject: [wip] Port to gnome-session's SessionIsActive property
+
+Rather than maintaining the systemd code here, monitor gnome-session's
+SessionIsActive property. This allows us to drop the compile-time
+dependency on systemd.
+
+The power plugin is declared dependent on systemd at runtime, but the
+rest of the code should operate in more "basic functionality" mode.
+---
+(limited to 'plugins/automount')
+
+diff --git a/plugins/automount/gsd-automount-manager.c b/plugins/automount/gsd-automount-manager.c
+index 7912f19..d8e9e07 100644
+--- a/plugins/automount/gsd-automount-manager.c
++++ b/plugins/automount/gsd-automount-manager.c
+@@ -42,7 +42,7 @@ struct GsdAutomountManagerPrivate
+ GVolumeMonitor *volume_monitor;
+ unsigned int automount_idle_id;
+
+- GnomeSettingsSession *session;
++ GDBusProxy *session;
+ gboolean session_is_active;
+ gboolean screensaver_active;
+ guint ss_watch_id;
+@@ -288,17 +288,21 @@ mount_added_callback (GVolumeMonitor *monitor,
+
+
+ static void
+-session_state_changed (GnomeSettingsSession *session, GParamSpec *pspec, gpointer user_data)
++session_props_changed (GDBusProxy *session, GVariant *v, char **props, gpointer user_data)
+ {
+ GsdAutomountManager *manager = user_data;
+ GsdAutomountManagerPrivate *p = manager->priv;
++ GVariant *active_v = NULL;
++ gboolean is_active;
+
+- if (gnome_settings_session_get_state (session) == GNOME_SETTINGS_SESSION_STATE_ACTIVE) {
+- p->session_is_active = TRUE;
+- }
+- else {
+- p->session_is_active = FALSE;
+- }
++ active_v = g_dbus_proxy_get_cached_property (session, "SessionIsActive");
++ if (!active_v)
++ return;
++
++ g_variant_get (active_v, "b", &is_active);
++ g_variant_unref (active_v);
++ g_printerr ("AUTOMOUNT: session is active: %d -> %d\n", p->session_is_active, is_active);
++ p->session_is_active = is_active;
+
+ if (!p->session_is_active) {
+ if (p->volume_queue != NULL) {
+@@ -311,10 +315,10 @@ session_state_changed (GnomeSettingsSession *session, GParamSpec *pspec, gpointe
+ static void
+ do_initialize_session (GsdAutomountManager *manager)
+ {
+- manager->priv->session = gnome_settings_session_new ();
+- g_signal_connect (manager->priv->session, "notify::state",
+- G_CALLBACK (session_state_changed), manager);
+- session_state_changed (manager->priv->session, NULL, manager);
++ manager->priv->session = gnome_settings_session_get_session_proxy ();
++ g_signal_connect (manager->priv->session, "g-properties-changed",
++ G_CALLBACK (session_props_changed), manager);
++ session_props_changed (manager->priv->session, NULL, NULL, manager);
+ }
+
+ #define SCREENSAVER_NAME "org.gnome.ScreenSaver"
+--
+cgit v0.9.1
diff --git a/community/gnome-settings-daemon-compat/standalone-background-helper.patch b/community/gnome-settings-daemon-compat/standalone-background-helper.patch
new file mode 100644
index 000000000..ccbd18f9b
--- /dev/null
+++ b/community/gnome-settings-daemon-compat/standalone-background-helper.patch
@@ -0,0 +1,437 @@
+diff -Naur gnome-settings-daemon-3.6.4.orig/data/org.gnome.settings-daemon.plugins.gschema.xml.in.in gnome-settings-daemon-3.6.4/data/org.gnome.settings-daemon.plugins.gschema.xml.in.in
+--- gnome-settings-daemon-3.6.4.orig/data/org.gnome.settings-daemon.plugins.gschema.xml.in.in 2013-01-10 14:37:58.000000000 +0100
++++ gnome-settings-daemon-3.6.4/data/org.gnome.settings-daemon.plugins.gschema.xml.in.in 2013-04-10 17:39:36.446882275 +0200
+@@ -2,7 +2,6 @@
+ <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.settings-daemon.plugins" path="/org/gnome/settings-daemon/plugins/">
+ <child name="a11y-keyboard" schema="org.gnome.settings-daemon.plugins.a11y-keyboard"/>
+ <child name="a11y-settings" schema="org.gnome.settings-daemon.plugins.a11y-settings"/>
+- <child name="background" schema="org.gnome.settings-daemon.plugins.background"/>
+ <child name="clipboard" schema="org.gnome.settings-daemon.plugins.clipboard"/>
+ <child name="color" schema="org.gnome.settings-daemon.plugins.color"/>
+ <child name="cursor" schema="org.gnome.settings-daemon.plugins.cursor"/>
+@@ -45,18 +44,6 @@
+ <_summary>Priority to use for this plugin</_summary>
+ <_description>Priority to use for this plugin in gnome-settings-daemon startup queue</_description>
+ </key>
+- </schema>
+- <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.settings-daemon.plugins.background" path="/org/gnome/settings-daemon/plugins/background/">
+- <key name="active" type="b">
+- <default>true</default>
+- <_summary>Activation of this plugin</_summary>
+- <_description>Whether this plugin would be activated by gnome-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 gnome-settings-daemon startup queue</_description>
+- </key>
+ </schema>
+ <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.settings-daemon.plugins.clipboard" path="/org/gnome/settings-daemon/plugins/clipboard/">
+ <key name="active" type="b">
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/background.gnome-settings-plugin.in gnome-settings-daemon-3.6.4/plugins/background/background.gnome-settings-plugin.in
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/background.gnome-settings-plugin.in 2012-04-07 15:21:20.000000000 +0200
++++ gnome-settings-daemon-3.6.4/plugins/background/background.gnome-settings-plugin.in 1970-01-01 01:00:00.000000000 +0100
+@@ -1,8 +0,0 @@
+-[GNOME Settings Plugin]
+-Module=background
+-IAge=0
+-_Name=Background
+-_Description=Background plugin
+-Authors=
+-Copyright=Copyright © 2007
+-Website=
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/gnome-fallback-background-helper.c gnome-settings-daemon-3.6.4/plugins/background/gnome-fallback-background-helper.c
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/gnome-fallback-background-helper.c 1970-01-01 01:00:00.000000000 +0100
++++ gnome-settings-daemon-3.6.4/plugins/background/gnome-fallback-background-helper.c 2013-04-10 17:39:36.450215685 +0200
+@@ -0,0 +1,65 @@
++/* -*- 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.h>
++#include <glib/gi18n.h>
++#include <unistd.h>
++#include <gtk/gtk.h>
++
++#include "gsd-background-manager.h"
++
++int
++main (int argc,
++ char **argv)
++{
++ GMainLoop *loop;
++ GsdBackgroundManager *manager;
++ GError *error = NULL;
++
++ g_type_init ();
++ gtk_init (&argc, &argv);
++
++ bindtextdomain (GETTEXT_PACKAGE, GNOME_SETTINGS_LOCALEDIR);
++ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
++ textdomain (GETTEXT_PACKAGE);
++
++ loop = g_main_loop_new (NULL, FALSE);
++ manager = gsd_background_manager_new ();
++
++ gsd_background_manager_start (manager, &error);
++
++ if (error != NULL) {
++ g_printerr ("Unable to start the background manager: %s",
++ error->message);
++
++ g_error_free (error);
++ _exit (1);
++ }
++
++ g_main_loop_run (loop);
++
++ gsd_background_manager_stop (manager);
++ g_main_loop_unref (loop);
++
++ return 0;
++}
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/gnome-fallback-background-helper.desktop.in.in gnome-settings-daemon-3.6.4/plugins/background/gnome-fallback-background-helper.desktop.in.in
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/gnome-fallback-background-helper.desktop.in.in 1970-01-01 01:00:00.000000000 +0100
++++ gnome-settings-daemon-3.6.4/plugins/background/gnome-fallback-background-helper.desktop.in.in 2013-04-10 17:39:36.450215685 +0200
+@@ -0,0 +1,12 @@
++[Desktop Entry]
++_Name=Background Helper
++_Comment=Draw desktop background
++Exec=@LIBEXECDIR@/gnome-fallback-background-helper
++Icon=desktop
++Terminal=false
++Type=Application
++Categories=
++NoDisplay=true
++OnlyShowIn=GNOME;Unity;
++X-GNOME-Autostart-Notify=true
++AutostartCondition=GNOME3 if-session gnome-fallback
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-plugin.c gnome-settings-daemon-3.6.4/plugins/background/gsd-background-plugin.c
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-plugin.c 2013-01-10 14:37:58.000000000 +0100
++++ gnome-settings-daemon-3.6.4/plugins/background/gsd-background-plugin.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,104 +0,0 @@
+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+- *
+- * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+- *
+- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+- *
+- */
+-
+-#include "config.h"
+-
+-#include <glib/gi18n-lib.h>
+-#include <gmodule.h>
+-
+-#include "gnome-settings-plugin.h"
+-#include "gsd-background-plugin.h"
+-#include "gsd-background-manager.h"
+-
+-struct GsdBackgroundPluginPrivate {
+- GsdBackgroundManager *manager;
+-};
+-
+-#define GSD_BACKGROUND_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_BACKGROUND_PLUGIN, GsdBackgroundPluginPrivate))
+-
+-GNOME_SETTINGS_PLUGIN_REGISTER (GsdBackgroundPlugin, gsd_background_plugin)
+-
+-static void
+-gsd_background_plugin_init (GsdBackgroundPlugin *plugin)
+-{
+- plugin->priv = GSD_BACKGROUND_PLUGIN_GET_PRIVATE (plugin);
+-
+- g_debug ("GsdBackgroundPlugin initializing");
+-
+- plugin->priv->manager = gsd_background_manager_new ();
+-}
+-
+-static void
+-gsd_background_plugin_finalize (GObject *object)
+-{
+- GsdBackgroundPlugin *plugin;
+-
+- g_return_if_fail (object != NULL);
+- g_return_if_fail (GSD_IS_BACKGROUND_PLUGIN (object));
+-
+- g_debug ("GsdBackgroundPlugin finalizing");
+-
+- plugin = GSD_BACKGROUND_PLUGIN (object);
+-
+- g_return_if_fail (plugin->priv != NULL);
+-
+- if (plugin->priv->manager != NULL) {
+- g_object_unref (plugin->priv->manager);
+- }
+-
+- G_OBJECT_CLASS (gsd_background_plugin_parent_class)->finalize (object);
+-}
+-
+-static void
+-impl_activate (GnomeSettingsPlugin *plugin)
+-{
+- gboolean res;
+- GError *error;
+-
+- g_debug ("Activating background plugin");
+-
+- error = NULL;
+- res = gsd_background_manager_start (GSD_BACKGROUND_PLUGIN (plugin)->priv->manager, &error);
+- if (! res) {
+- g_warning ("Unable to start background manager: %s", error->message);
+- g_error_free (error);
+- }
+-}
+-
+-static void
+-impl_deactivate (GnomeSettingsPlugin *plugin)
+-{
+- g_debug ("Deactivating background plugin");
+- gsd_background_manager_stop (GSD_BACKGROUND_PLUGIN (plugin)->priv->manager);
+-}
+-
+-static void
+-gsd_background_plugin_class_init (GsdBackgroundPluginClass *klass)
+-{
+- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+- GnomeSettingsPluginClass *plugin_class = GNOME_SETTINGS_PLUGIN_CLASS (klass);
+-
+- object_class->finalize = gsd_background_plugin_finalize;
+-
+- plugin_class->activate = impl_activate;
+- plugin_class->deactivate = impl_deactivate;
+-
+- g_type_class_add_private (klass, sizeof (GsdBackgroundPluginPrivate));
+-}
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-plugin.h gnome-settings-daemon-3.6.4/plugins/background/gsd-background-plugin.h
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-plugin.h 2013-01-10 14:37:58.000000000 +0100
++++ gnome-settings-daemon-3.6.4/plugins/background/gsd-background-plugin.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,59 +0,0 @@
+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+- *
+- * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+- *
+- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+- *
+- */
+-
+-#ifndef __GSD_BACKGROUND_PLUGIN_H__
+-#define __GSD_BACKGROUND_PLUGIN_H__
+-
+-#include <glib.h>
+-#include <glib-object.h>
+-#include <gmodule.h>
+-
+-#include "gnome-settings-plugin.h"
+-
+-G_BEGIN_DECLS
+-
+-#define GSD_TYPE_BACKGROUND_PLUGIN (gsd_background_plugin_get_type ())
+-#define GSD_BACKGROUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_BACKGROUND_PLUGIN, GsdBackgroundPlugin))
+-#define GSD_BACKGROUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_BACKGROUND_PLUGIN, GsdBackgroundPluginClass))
+-#define GSD_IS_BACKGROUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_BACKGROUND_PLUGIN))
+-#define GSD_IS_BACKGROUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_BACKGROUND_PLUGIN))
+-#define GSD_BACKGROUND_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_BACKGROUND_PLUGIN, GsdBackgroundPluginClass))
+-
+-typedef struct GsdBackgroundPluginPrivate GsdBackgroundPluginPrivate;
+-
+-typedef struct
+-{
+- GnomeSettingsPlugin parent;
+- GsdBackgroundPluginPrivate *priv;
+-} GsdBackgroundPlugin;
+-
+-typedef struct
+-{
+- GnomeSettingsPluginClass parent_class;
+-} GsdBackgroundPluginClass;
+-
+-GType gsd_background_plugin_get_type (void) G_GNUC_CONST;
+-
+-/* All the plugins must implement this function */
+-G_MODULE_EXPORT GType register_gnome_settings_plugin (GTypeModule *module);
+-
+-G_END_DECLS
+-
+-#endif /* __GSD_BACKGROUND_PLUGIN_H__ */
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/Makefile.am gnome-settings-daemon-3.6.4/plugins/background/Makefile.am
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/Makefile.am 2013-01-10 14:37:58.000000000 +0100
++++ gnome-settings-daemon-3.6.4/plugins/background/Makefile.am 2013-04-10 17:40:20.117885180 +0200
+@@ -1,80 +1,34 @@
+-NULL =
++libexec_PROGRAMS = gnome-fallback-background-helper
+
+-plugin_name = background
++gnome_fallback_background_helper_SOURCES = \
++ gnome-fallback-background-helper.c \
++ gsd-background-manager.c \
++ gsd-background-manager.h
+
+-libexec_PROGRAMS = gsd-test-background
+-
+-gsd_test_background_SOURCES = \
+- test-background.c \
+- gsd-background-manager.h \
+- gsd-background-manager.c \
+- $(NULL)
+-
+-gsd_test_background_CPPFLAGS = \
++gnome_fallback_background_helper_CPPFLAGS = \
+ -I$(top_srcdir)/gnome-settings-daemon \
+- -I$(top_srcdir)/plugins/common \
+ -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
+ $(AM_CPPFLAGS)
+
+-gsd_test_background_CFLAGS = \
+- $(PLUGIN_CFLAGS) \
++gnome_fallback_background_helper_CFLAGS = \
+ $(SETTINGS_PLUGIN_CFLAGS) \
+- $(BACKGROUND_CFLAGS) \
+- $(AM_CFLAGS)
+-
+-gsd_test_background_LDADD = \
+- $(top_builddir)/gnome-settings-daemon/libgsd.la \
+- $(SETTINGS_PLUGIN_LIBS) \
+- $(BACKGROUND_LIBS) \
+- $(NULL)
+-
+-plugin_LTLIBRARIES = \
+- libbackground.la \
+- $(NULL)
+-
+-libbackground_la_SOURCES = \
+- gsd-background-plugin.h \
+- gsd-background-plugin.c \
+- gsd-background-manager.h \
+- gsd-background-manager.c \
+- $(NULL)
++ $(BACKGROUND_CFLAGS)
+
+-libbackground_la_CPPFLAGS = \
+- -I$(top_srcdir)/gnome-settings-daemon \
+- -I$(top_srcdir)/plugins/background/libbackground \
+- -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
+- $(AM_CPPFLAGS)
+-
+-libbackground_la_CFLAGS = \
+- $(SETTINGS_PLUGIN_CFLAGS) \
+- $(BACKGROUND_CFLAGS) \
+- $(AM_CFLAGS)
+-
+-libbackground_la_LDFLAGS = \
+- $(GSD_PLUGIN_LDFLAGS) \
+- $(NULL)
+-
+-libbackground_la_LIBADD = \
++gnome_fallback_background_helper_LDADD = \
+ $(SETTINGS_PLUGIN_LIBS) \
+ $(BACKGROUND_LIBS) \
+- $(NULL)
+-
+-plugin_in_files = \
+- background.gnome-settings-plugin.in \
+- $(NULL)
++ $(top_builddir)/gnome-settings-daemon/libgsd.la
+
+-plugin_DATA = $(plugin_in_files:.gnome-settings-plugin.in=.gnome-settings-plugin)
++autostartdir = $(sysconfdir)/xdg/autostart
++autostart_in_files = gnome-fallback-background-helper.desktop.in
++autostart_in_in_files = gnome-fallback-background-helper.desktop.in.in
++autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
+
+-EXTRA_DIST = \
+- $(plugin_in_files) \
+- $(NULL)
++$(autostart_in_files): $(autostart_in_in_files)
++ @sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
+
+-CLEANFILES = \
+- $(plugin_DATA) \
+- $(NULL)
++@INTLTOOL_DESKTOP_RULE@
+
+-DISTCLEANFILES = \
+- $(plugin_DATA) \
+- $(NULL)
++EXTRA_DIST = $(autostart_in_in_files)
+
+-@GSD_INTLTOOL_PLUGIN_RULE@
++CLEANFILES = $(autostart_DATA) $(autostart_in_files)
+diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/test-background.c gnome-settings-daemon-3.6.4/plugins/background/test-background.c
+--- gnome-settings-daemon-3.6.4.orig/plugins/background/test-background.c 2012-06-01 22:02:53.000000000 +0200
++++ gnome-settings-daemon-3.6.4/plugins/background/test-background.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,7 +0,0 @@
+-#define NEW gsd_background_manager_new
+-#define START gsd_background_manager_start
+-#define STOP gsd_background_manager_stop
+-#define MANAGER GsdBackgroundManager
+-#include "gsd-background-manager.h"
+-
+-#include "test-plugin.h"
+diff -Naur gnome-settings-daemon-3.6.4.orig/po/POTFILES.in gnome-settings-daemon-3.6.4/po/POTFILES.in
+--- gnome-settings-daemon-3.6.4.orig/po/POTFILES.in 2013-01-10 14:37:58.000000000 +0100
++++ gnome-settings-daemon-3.6.4/po/POTFILES.in 2013-04-10 17:39:36.450215685 +0200
+@@ -21,9 +21,9 @@
+ [type: gettext/glade]plugins/a11y-keyboard/gsd-a11y-preferences-dialog.ui
+ [type: gettext/ini]plugins/a11y-settings/a11y-settings.gnome-settings-plugin.in
+ plugins/automount/gnome-fallback-mount-helper.desktop.in.in
++plugins/automount/gnome-fallback-background-helper.desktop.in.in
+ plugins/automount/gsd-automount-manager.c
+ plugins/automount/gsd-autorun.c
+-[type: gettext/ini]plugins/background/background.gnome-settings-plugin.in
+ [type: gettext/ini]plugins/clipboard/clipboard.gnome-settings-plugin.in
+ [type: gettext/ini]plugins/color/color.gnome-settings-plugin.in
+ plugins/color/gsd-color-manager.c
+diff -Naur gnome-settings-daemon-3.6.4.orig/po/POTFILES.skip gnome-settings-daemon-3.6.4/po/POTFILES.skip
+--- gnome-settings-daemon-3.6.4.orig/po/POTFILES.skip 2012-04-07 18:58:07.000000000 +0200
++++ gnome-settings-daemon-3.6.4/po/POTFILES.skip 2013-04-10 17:39:36.453549095 +0200
+@@ -20,6 +20,7 @@
+ data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in
+ data/org.gnome.settings-daemon.plugins.xrandr.gschema.xml.in
+ data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in
++plugins/automount/gnome-fallback-background-helper.desktop.in
+ plugins/automount/gnome-fallback-mount-helper.desktop.in
+ plugins/power/org.gnome.settings-daemon.plugins.power.policy.in
+ plugins/wacom/org.gnome.settings-daemon.plugins.wacom.policy.in
diff --git a/community/gnome-settings-daemon-updates/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch b/community/gnome-settings-daemon-updates/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch
deleted file mode 100644
index ceee6db82..000000000
--- a/community/gnome-settings-daemon-updates/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch
+++ /dev/null
@@ -1,1476 +0,0 @@
-From f418ff2cd04b233dbffc1129e856630d8c96cd07 Mon Sep 17 00:00:00 2001
-From: Richard Hughes <richard@hughsie.com>
-Date: Fri, 21 Sep 2012 11:56:53 +0100
-Subject: [PATCH] power and media-keys: Use logind for suspending and
- rebooting the system
-
-Use the new logind features to suspend and resume but making sure we opt out
-of logind handling the sleep and power keys, and also inhibiting for lid close
-auto-suspend if there is an external monitor connected.
-
-Also use a delay inihibit for logind so that we can do actions on suspend like
-blanking the screen using the screensaver and also poking the screensaver on
-resume.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=680689
-
-Conflicts:
- plugins/power/gsd-power-manager.c
----
- plugins/common/Makefile.am | 4 +-
- plugins/common/gsd-power-helper.c | 203 --------
- plugins/common/gsd-power-helper.h | 35 --
- plugins/media-keys/gsd-media-keys-manager.c | 156 +++++--
- plugins/power/gsd-power-manager.c | 697 +++++++++++++++++++---------
- 5 files changed, 594 insertions(+), 501 deletions(-)
- delete mode 100644 plugins/common/gsd-power-helper.c
- delete mode 100644 plugins/common/gsd-power-helper.h
-
-diff --git a/plugins/common/Makefile.am b/plugins/common/Makefile.am
-index 7e50db4..b0e907c 100644
---- a/plugins/common/Makefile.am
-+++ b/plugins/common/Makefile.am
-@@ -6,9 +6,7 @@ libcommon_la_SOURCES = \
- gsd-keygrab.c \
- gsd-keygrab.h \
- gsd-input-helper.c \
-- gsd-input-helper.h \
-- gsd-power-helper.c \
-- gsd-power-helper.h
-+ gsd-input-helper.h
-
- libcommon_la_CPPFLAGS = \
- $(AM_CPPFLAGS)
-diff --git a/plugins/common/gsd-power-helper.c b/plugins/common/gsd-power-helper.c
-deleted file mode 100644
-index 27d0eda..0000000
---- a/plugins/common/gsd-power-helper.c
-+++ /dev/null
-@@ -1,203 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2012 Bastien Nocera <hadess@hadess.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 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.
-- *
-- */
--
--#include "config.h"
--
--#include "gsd-power-helper.h"
--
--#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
--#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
--#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
--
--#define CONSOLEKIT_DBUS_NAME "org.freedesktop.ConsoleKit"
--#define CONSOLEKIT_DBUS_PATH_MANAGER "/org/freedesktop/ConsoleKit/Manager"
--#define CONSOLEKIT_DBUS_INTERFACE_MANAGER "org.freedesktop.ConsoleKit.Manager"
--
--#ifdef HAVE_SYSTEMD
--static void
--systemd_stop (void)
--{
-- GDBusConnection *bus;
--
-- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
-- g_dbus_connection_call (bus,
-- SYSTEMD_DBUS_NAME,
-- SYSTEMD_DBUS_PATH,
-- SYSTEMD_DBUS_INTERFACE,
-- "PowerOff",
-- g_variant_new ("(b)", FALSE),
-- NULL, 0, G_MAXINT, NULL, NULL, NULL);
-- g_object_unref (bus);
--}
--
--static void
--systemd_suspend (void)
--{
-- GDBusConnection *bus;
--
-- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
-- g_dbus_connection_call (bus,
-- SYSTEMD_DBUS_NAME,
-- SYSTEMD_DBUS_PATH,
-- SYSTEMD_DBUS_INTERFACE,
-- "Suspend",
-- g_variant_new ("(b)", TRUE),
-- NULL, 0, G_MAXINT, NULL, NULL, NULL);
-- g_object_unref (bus);
--}
--
--static void
--systemd_hibernate (void)
--{
-- GDBusConnection *bus;
--
-- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
-- g_dbus_connection_call (bus,
-- SYSTEMD_DBUS_NAME,
-- SYSTEMD_DBUS_PATH,
-- SYSTEMD_DBUS_INTERFACE,
-- "Hibernate",
-- g_variant_new ("(b)", TRUE),
-- NULL, 0, G_MAXINT, NULL, NULL, NULL);
-- g_object_unref (bus);
--}
--
--#else /* HAVE_SYSTEMD */
--
--static void
--consolekit_stop_cb (GObject *source_object,
-- GAsyncResult *res,
-- gpointer user_data)
--{
-- GVariant *result;
-- GError *error = NULL;
--
-- result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object),
-- res,
-- &error);
-- if (result == NULL) {
-- g_warning ("couldn't stop using ConsoleKit: %s",
-- error->message);
-- g_error_free (error);
-- } else {
-- g_variant_unref (result);
-- }
--}
--
--static void
--consolekit_stop (void)
--{
-- GError *error = NULL;
-- GDBusProxy *proxy;
--
-- /* power down the machine in a safe way */
-- proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
-- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
-- NULL,
-- CONSOLEKIT_DBUS_NAME,
-- CONSOLEKIT_DBUS_PATH_MANAGER,
-- CONSOLEKIT_DBUS_INTERFACE_MANAGER,
-- NULL, &error);
-- if (proxy == NULL) {
-- g_warning ("cannot connect to ConsoleKit: %s",
-- error->message);
-- g_error_free (error);
-- return;
-- }
-- g_dbus_proxy_call (proxy,
-- "Stop",
-- NULL,
-- G_DBUS_CALL_FLAGS_NONE,
-- -1, NULL,
-- consolekit_stop_cb, NULL);
-- g_object_unref (proxy);
--}
--static void
--upower_sleep_cb (GObject *source_object,
-- GAsyncResult *res,
-- gpointer user_data)
--{
-- GVariant *result;
-- GError *error = NULL;
--
-- result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object),
-- res,
-- &error);
-- if (result == NULL) {
-- g_warning ("couldn't sleep using UPower: %s",
-- error->message);
-- g_error_free (error);
-- } else {
-- g_variant_unref (result);
-- }
--}
--
--static void
--upower_suspend (GDBusProxy *upower_proxy)
--{
-- g_dbus_proxy_call (upower_proxy,
-- "Suspend",
-- NULL,
-- G_DBUS_CALL_FLAGS_NONE,
-- -1, NULL,
-- upower_sleep_cb, NULL);
--}
--
--static void
--upower_hibernate (GDBusProxy *upower_proxy)
--{
-- g_dbus_proxy_call (upower_proxy,
-- "Hibernate",
-- NULL,
-- G_DBUS_CALL_FLAGS_NONE,
-- -1, NULL,
-- upower_sleep_cb, NULL);
--}
--#endif /* HAVE_SYSTEMD */
--
--void
--gsd_power_suspend (GDBusProxy *upower_proxy)
--{
--#ifdef HAVE_SYSTEMD
-- systemd_suspend ();
--#else
-- upower_suspend (upower_proxy);
--#endif
--}
--
--void
--gsd_power_poweroff (void)
--{
--#ifdef HAVE_SYSTEMD
-- systemd_stop ();
--#else
-- consolekit_stop ();
--#endif
--}
--
--void
--gsd_power_hibernate (GDBusProxy *upower_proxy)
--{
--#ifdef HAVE_SYSTEMD
-- systemd_hibernate ();
--#else
-- upower_hibernate (upower_proxy);
--#endif
--}
-diff --git a/plugins/common/gsd-power-helper.h b/plugins/common/gsd-power-helper.h
-deleted file mode 100644
-index e3be14f..0000000
---- a/plugins/common/gsd-power-helper.h
-+++ /dev/null
-@@ -1,35 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2012 Bastien Nocera <hadess@hadess.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 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.
-- */
--
--#ifndef __GSD_POWER_HELPER_H
--#define __GSD_POWER_HELPER_H
--
--#include <glib.h>
--
--G_BEGIN_DECLS
--
--#include <gio/gio.h>
--
--void gsd_power_suspend (GDBusProxy *upower_proxy);
--void gsd_power_hibernate (GDBusProxy *upower_proxy);
--void gsd_power_poweroff (void);
--
--G_END_DECLS
--
--#endif /* __GSD_POWER_HELPER_H */
-diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
-index 9c84d7f..a2f277e 100644
---- a/plugins/media-keys/gsd-media-keys-manager.c
-+++ b/plugins/media-keys/gsd-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>
-@@ -51,7 +52,6 @@
- #include "shortcuts-list.h"
- #include "gsd-osd-window.h"
- #include "gsd-input-helper.h"
--#include "gsd-power-helper.h"
- #include "gsd-enums.h"
-
- #include <canberra.h>
-@@ -105,6 +105,10 @@ static const gchar introspection_xml[] =
- #define KEY_CURRENT_INPUT_SOURCE "current"
- #define KEY_INPUT_SOURCES "sources"
-
-+#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
-+#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
-+#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
-+
- #define GSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_MEDIA_KEYS_MANAGER, GsdMediaKeysManagerPrivate))
-
- typedef struct {
-@@ -148,10 +152,13 @@ struct GsdMediaKeysManagerPrivate
-
- /* Power stuff */
- GSettings *power_settings;
-- GDBusProxy *upower_proxy;
- GDBusProxy *power_screen_proxy;
- GDBusProxy *power_keyboard_proxy;
-
-+ /* systemd stuff */
-+ GDBusProxy *logind_proxy;
-+ gint inhibit_keys_fd;
-+
- /* Multihead stuff */
- GdkScreen *current_screen;
- GSList *screens;
-@@ -1618,6 +1625,38 @@ do_toggle_contrast_action (GsdMediaKeysManager *manager)
- }
-
- static void
-+power_action_suspend (GsdMediaKeysManager *manager)
-+{
-+#ifndef HAVE_SYSTEMD
-+ g_warning ("no systemd support");
-+ return;
-+#endif
-+ g_dbus_proxy_call (manager->priv->logind_proxy,
-+ "Suspend",
-+ g_variant_new ("(b)", TRUE),
-+ G_DBUS_CALL_FLAGS_NONE,
-+ G_MAXINT,
-+ manager->priv->bus_cancellable,
-+ NULL, NULL);
-+}
-+
-+static void
-+power_action_hibernate (GsdMediaKeysManager *manager)
-+{
-+#ifndef HAVE_SYSTEMD
-+ g_warning ("no systemd support");
-+ return;
-+#endif
-+ g_dbus_proxy_call (manager->priv->logind_proxy,
-+ "Hibernate",
-+ g_variant_new ("(b)", TRUE),
-+ G_DBUS_CALL_FLAGS_NONE,
-+ G_MAXINT,
-+ manager->priv->bus_cancellable,
-+ NULL, NULL);
-+}
-+
-+static void
- do_config_power_action (GsdMediaKeysManager *manager,
- const gchar *config_key)
- {
-@@ -1627,14 +1666,14 @@ do_config_power_action (GsdMediaKeysManager *manager,
- config_key);
- switch (action_type) {
- case GSD_POWER_ACTION_SUSPEND:
-- gsd_power_suspend (manager->priv->upower_proxy);
-+ power_action_suspend (manager);
- break;
- case GSD_POWER_ACTION_INTERACTIVE:
- case GSD_POWER_ACTION_SHUTDOWN:
- gnome_session_shutdown (manager);
- break;
- case GSD_POWER_ACTION_HIBERNATE:
-- gsd_power_hibernate (manager->priv->upower_proxy);
-+ power_action_hibernate (manager);
- break;
- case GSD_POWER_ACTION_BLANK:
- case GSD_POWER_ACTION_NOTHING:
-@@ -2248,6 +2287,7 @@ gsd_media_keys_manager_stop (GsdMediaKeysManager *manager)
- }
- #endif /* HAVE_GUDEV */
-
-+ g_clear_object (&priv->logind_proxy);
- if (priv->settings) {
- g_object_unref (priv->settings);
- priv->settings = NULL;
-@@ -2268,11 +2308,6 @@ gsd_media_keys_manager_stop (GsdMediaKeysManager *manager)
- priv->power_keyboard_proxy = NULL;
- }
-
-- if (priv->upower_proxy) {
-- g_object_unref (priv->upower_proxy);
-- priv->upower_proxy = NULL;
-- }
--
- if (priv->cancellable != NULL) {
- g_cancellable_cancel (priv->cancellable);
- g_object_unref (priv->cancellable);
-@@ -2363,9 +2398,85 @@ gsd_media_keys_manager_class_init (GsdMediaKeysManagerClass *klass)
- }
-
- static void
-+inhibit_done (GObject *source,
-+ GAsyncResult *result,
-+ gpointer user_data)
-+{
-+ GDBusProxy *proxy = G_DBUS_PROXY (source);
-+ GsdMediaKeysManager *manager = GSD_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
- gsd_media_keys_manager_init (GsdMediaKeysManager *manager)
- {
-+ GError *error;
-+ GDBusConnection *bus;
-+
-+ error = NULL;
- manager->priv = GSD_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 (),
-+ "GNOME handling keypresses",
-+ "block"),
-+ 0,
-+ G_MAXINT,
-+ NULL,
-+ NULL,
-+ inhibit_done,
-+ manager);
-+
- }
-
- static void
-@@ -2382,6 +2493,8 @@ gsd_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 (gsd_media_keys_manager_parent_class)->finalize (object);
- }
-@@ -2401,21 +2514,6 @@ xrandr_ready_cb (GObject *source_object,
- }
-
- static void
--upower_ready_cb (GObject *source_object,
-- GAsyncResult *res,
-- GsdMediaKeysManager *manager)
--{
-- GError *error = NULL;
--
-- manager->priv->upower_proxy = g_dbus_proxy_new_finish (res, &error);
-- if (manager->priv->upower_proxy == NULL) {
-- g_warning ("Failed to get proxy for upower: %s",
-- error->message);
-- g_error_free (error);
-- }
--}
--
--static void
- power_screen_ready_cb (GObject *source_object,
- GAsyncResult *res,
- GsdMediaKeysManager *manager)
-@@ -2517,16 +2615,6 @@ register_manager (GsdMediaKeysManager *manager)
- manager->priv->bus_cancellable,
- (GAsyncReadyCallback) on_bus_gotten,
- manager);
--
-- g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
-- G_DBUS_PROXY_FLAGS_NONE,
-- NULL,
-- "org.freedesktop.UPower",
-- "/org/freedesktop/UPower",
-- "org.freedesktop.UPower",
-- NULL,
-- (GAsyncReadyCallback) upower_ready_cb,
-- manager);
- }
-
- GsdMediaKeysManager *
-diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
-index 1c594d8..bb7224c 100644
---- a/plugins/power/gsd-power-manager.c
-+++ b/plugins/power/gsd-power-manager.c
-@@ -1,7 +1,7 @@
- /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
-- * Copyright (C) 2011 Richard Hughes <richard@hughsie.com>
-+ * Copyright (C) 2011-2012 Richard Hughes <richard@hughsie.com>
- * Copyright (C) 2011 Ritesh Khadgaray <khadgaray@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
-@@ -32,6 +32,7 @@
- #include <libupower-glib/upower.h>
- #include <libnotify/notify.h>
- #include <canberra-gtk.h>
-+#include <gio/gunixfdlist.h>
-
- #define GNOME_DESKTOP_USE_UNSTABLE_API
- #include <libgnome-desktop/gnome-rr.h>
-@@ -43,7 +44,6 @@
- #include "gnome-settings-session.h"
- #include "gsd-enums.h"
- #include "gsd-power-manager.h"
--#include "gsd-power-helper.h"
-
- #define GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager"
- #define GNOME_SESSION_DBUS_PATH "/org/gnome/SessionManager"
-@@ -78,6 +78,10 @@
- #define GSD_POWER_MANAGER_RECALL_DELAY 30 /* seconds */
- #define GSD_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 */
-
-@@ -193,15 +197,21 @@ struct GsdPowerManagerPrivate
- ca_context *canberra_context;
- ca_proplist *critical_alert_loop_props;
- guint32 critical_alert_timeout_id;
-- GDBusProxy *screensaver_proxy;
- GDBusProxy *session_proxy;
- GDBusProxy *session_presence_proxy;
- GpmIdletime *idletime;
- GsdPowerIdleMode current_idle_mode;
-- guint lid_close_safety_timer_id;
- 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;
-+ guint inhibit_lid_switch_timer_id;
- };
-
- enum {
-@@ -218,8 +228,8 @@ static GIcon *engine_get_icon (GsdPowerManager *manager);
- static gchar *engine_get_summary (GsdPowerManager *manager);
- static void do_power_action_type (GsdPowerManager *manager, GsdPowerActionType action_type);
- static void do_lid_closed_action (GsdPowerManager *manager);
--static void lock_screensaver (GsdPowerManager *manager);
--static void kill_lid_close_safety_timer (GsdPowerManager *manager);
-+static void uninhibit_lid_switch (GsdPowerManager *manager);
-+static gboolean external_monitor_is_connected (GnomeRRScreen *screen);
-
- G_DEFINE_TYPE (GsdPowerManager, gsd_power_manager, G_TYPE_OBJECT)
-
-@@ -2049,6 +2059,57 @@ gnome_session_shutdown (void)
- }
-
- static void
-+action_poweroff (GsdPowerManager *manager)
-+{
-+ if (manager->priv->logind_proxy == NULL) {
-+ g_warning ("no systemd support");
-+ return;
-+ }
-+ g_dbus_proxy_call (manager->priv->logind_proxy,
-+ "PowerOff",
-+ g_variant_new ("(b)", FALSE),
-+ G_DBUS_CALL_FLAGS_NONE,
-+ G_MAXINT,
-+ NULL,
-+ NULL,
-+ NULL);
-+}
-+
-+static void
-+action_suspend (GsdPowerManager *manager)
-+{
-+ if (manager->priv->logind_proxy == NULL) {
-+ g_warning ("no systemd support");
-+ return;
-+ }
-+ g_dbus_proxy_call (manager->priv->logind_proxy,
-+ "Suspend",
-+ g_variant_new ("(b)", FALSE),
-+ G_DBUS_CALL_FLAGS_NONE,
-+ G_MAXINT,
-+ NULL,
-+ NULL,
-+ NULL);
-+}
-+
-+static void
-+action_hibernate (GsdPowerManager *manager)
-+{
-+ if (manager->priv->logind_proxy == NULL) {
-+ g_warning ("no systemd support");
-+ return;
-+ }
-+ g_dbus_proxy_call (manager->priv->logind_proxy,
-+ "Hibernate",
-+ g_variant_new ("(b)", FALSE),
-+ G_DBUS_CALL_FLAGS_NONE,
-+ G_MAXINT,
-+ NULL,
-+ NULL,
-+ NULL);
-+}
-+
-+static void
- do_power_action_type (GsdPowerManager *manager,
- GsdPowerActionType action_type)
- {
-@@ -2057,19 +2118,19 @@ do_power_action_type (GsdPowerManager *manager,
-
- switch (action_type) {
- case GSD_POWER_ACTION_SUSPEND:
-- gsd_power_suspend (manager->priv->upower_proxy);
-+ action_suspend (manager);
- break;
- case GSD_POWER_ACTION_INTERACTIVE:
- gnome_session_shutdown ();
- break;
- case GSD_POWER_ACTION_HIBERNATE:
-- gsd_power_hibernate (manager->priv->upower_proxy);
-+ action_hibernate (manager);
- break;
- case GSD_POWER_ACTION_SHUTDOWN:
- /* this is only used on critically low battery where
- * hibernate is not available and is marginally better
- * than just powering down the computer mid-write */
-- gsd_power_poweroff ();
-+ action_poweroff (manager);
- break;
- case GSD_POWER_ACTION_BLANK:
- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
-@@ -2141,85 +2202,20 @@ upower_kbd_toggle (GsdPowerManager *manager,
- return ret;
- }
-
--static void
--do_lid_open_action (GsdPowerManager *manager)
--{
-- gboolean ret;
-- GError *error = NULL;
--
-- /* play a sound, using sounds from the naming spec */
-- ca_context_play (manager->priv->canberra_context, 0,
-- CA_PROP_EVENT_ID, "lid-open",
-- /* TRANSLATORS: this is the sound description */
-- CA_PROP_EVENT_DESCRIPTION, _("Lid has been opened"),
-- NULL);
--
-- /* ensure we turn the panel back on after lid open */
-- 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 lid open: %s",
-- error->message);
-- g_clear_error (&error);
-- }
--
-- /* only toggle keyboard if present and already toggled off */
-- if (manager->priv->upower_kdb_proxy != NULL &&
-- manager->priv->kbd_brightness_old != -1) {
-- ret = upower_kbd_toggle (manager, &error);
-- if (!ret) {
-- g_warning ("failed to turn the kbd backlight on: %s",
-- error->message);
-- g_error_free (error);
-- }
-- }
--
-- kill_lid_close_safety_timer (manager);
--}
--
- static gboolean
--is_on (GnomeRROutput *output)
-+inhibit_lid_switch_timer_cb (GsdPowerManager *manager)
- {
-- GnomeRRCrtc *crtc;
--
-- crtc = gnome_rr_output_get_crtc (output);
-- if (!crtc)
-- return FALSE;
-- return gnome_rr_crtc_get_current_mode (crtc) != NULL;
--}
--
--static gboolean
--non_laptop_outputs_are_all_off (GnomeRRScreen *screen)
--{
-- GnomeRROutput **outputs;
-- int i;
--
-- outputs = gnome_rr_screen_list_outputs (screen);
-- for (i = 0; outputs[i] != NULL; i++) {
-- if (gnome_rr_output_is_laptop (outputs[i]))
-- continue;
--
-- if (is_on (outputs[i]))
-- return FALSE;
-+ if (!external_monitor_is_connected (manager->priv->x11_screen) ||
-+ g_settings_get_boolean (manager->priv->settings,
-+ "lid-close-suspend-with-external-monitor")) {
-+ g_debug ("no external monitors for a while; uninhibiting lid close");
-+ uninhibit_lid_switch (manager);
-+ manager->priv->inhibit_lid_switch_timer_id = 0;
-+ return G_SOURCE_REMOVE;
- }
-
-- return TRUE;
--}
--
--/* Timeout callback used to check conditions when the laptop's lid is closed but
-- * the machine is not suspended yet. We try to suspend again, so that the laptop
-- * won't overheat if placed in a backpack.
-- */
--static gboolean
--lid_close_safety_timer_cb (GsdPowerManager *manager)
--{
-- manager->priv->lid_close_safety_timer_id = 0;
--
-- g_debug ("lid has been closed for a while; trying to suspend again");
-- do_lid_closed_action (manager);
--
-- return FALSE;
-+ g_debug ("external monitor still there; trying again later");
-+ return G_SOURCE_CONTINUE;
- }
-
- /* Sets up a timer to be triggered some seconds after closing the laptop lid
-@@ -2227,82 +2223,73 @@ lid_close_safety_timer_cb (GsdPowerManager *manager)
- * again in the timeout handler to see if we can suspend then.
- */
- static void
--setup_lid_close_safety_timer (GsdPowerManager *manager)
-+setup_inhibit_lid_switch_timer (GsdPowerManager *manager)
- {
-- if (manager->priv->lid_close_safety_timer_id != 0)
-+ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
-+ g_debug ("lid close safety timer already set up");
- return;
-+ }
-+
-+ g_debug ("setting up lid close safety timer");
-
-- manager->priv->lid_close_safety_timer_id = g_timeout_add_seconds (GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT,
-- (GSourceFunc) lid_close_safety_timer_cb,
-+ manager->priv->inhibit_lid_switch_timer_id = g_timeout_add_seconds (GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT,
-+ (GSourceFunc) inhibit_lid_switch_timer_cb,
- manager);
-- g_source_set_name_by_id (manager->priv->lid_close_safety_timer_id, "[GsdPowerManager] lid close safety timer");
-+ g_source_set_name_by_id (manager->priv->inhibit_lid_switch_timer_id, "[GsdPowerManager] lid close safety timer");
- }
-
- static void
--kill_lid_close_safety_timer (GsdPowerManager *manager)
-+restart_inhibit_lid_switch_timer (GsdPowerManager *manager)
- {
-- if (manager->priv->lid_close_safety_timer_id != 0) {
-- g_source_remove (manager->priv->lid_close_safety_timer_id);
-- manager->priv->lid_close_safety_timer_id = 0;
-+ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
-+ g_debug ("restarting lid close safety timer");
-+ g_source_remove (manager->priv->inhibit_lid_switch_timer_id);
-+ manager->priv->inhibit_lid_switch_timer_id = 0;
-+ setup_inhibit_lid_switch_timer (manager);
- }
- }
-
- static void
--suspend_with_lid_closed (GsdPowerManager *manager)
-+do_lid_open_action (GsdPowerManager *manager)
- {
- gboolean ret;
- GError *error = NULL;
-- GsdPowerActionType action_type;
-
-- /* maybe lock the screen if the lid is closed */
-- lock_screensaver (manager);
--
-- /* we have different settings depending on AC state */
-- if (up_client_get_on_battery (manager->priv->up_client)) {
-- action_type = g_settings_get_enum (manager->priv->settings,
-- "lid-close-battery-action");
-- } else {
-- action_type = g_settings_get_enum (manager->priv->settings,
-- "lid-close-ac-action");
-- }
--
-- /* check we won't melt when the lid is closed */
-- if (action_type != GSD_POWER_ACTION_SUSPEND &&
-- action_type != GSD_POWER_ACTION_HIBERNATE) {
-- if (up_client_get_lid_force_sleep (manager->priv->up_client)) {
-- g_warning ("to prevent damage, now forcing suspend");
-- do_power_action_type (manager, GSD_POWER_ACTION_SUSPEND);
-- return;
-- }
-- }
-+ /* play a sound, using sounds from the naming spec */
-+ ca_context_play (manager->priv->canberra_context, 0,
-+ CA_PROP_EVENT_ID, "lid-open",
-+ /* TRANSLATORS: this is the sound description */
-+ CA_PROP_EVENT_DESCRIPTION, _("Lid has been opened"),
-+ NULL);
-
-- /* ensure we turn the panel back on after resume */
-+ /* ensure we turn the panel back on after lid open */
- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
-- GNOME_RR_DPMS_OFF,
-+ GNOME_RR_DPMS_ON,
- &error);
- if (!ret) {
-- g_warning ("failed to turn the panel off after lid close: %s",
-+ g_warning ("failed to turn the panel on after lid open: %s",
- error->message);
- g_clear_error (&error);
- }
-
-- /* only toggle keyboard if present and not already toggled */
-- if (manager->priv->upower_kdb_proxy &&
-- manager->priv->kbd_brightness_old == -1) {
-+ /* only toggle keyboard if present and already toggled off */
-+ if (manager->priv->upower_kdb_proxy != NULL &&
-+ manager->priv->kbd_brightness_old != -1) {
- ret = upower_kbd_toggle (manager, &error);
- if (!ret) {
-- g_warning ("failed to turn the kbd backlight off: %s",
-+ g_warning ("failed to turn the kbd backlight on: %s",
- error->message);
- g_error_free (error);
- }
- }
--
-- do_power_action_type (manager, action_type);
- }
-
- static void
- do_lid_closed_action (GsdPowerManager *manager)
- {
-+ gboolean ret;
-+ GError *error = NULL;
-+
- /* play a sound, using sounds from the naming spec */
- ca_context_play (manager->priv->canberra_context, 0,
- CA_PROP_EVENT_ID, "lid-close",
-@@ -2310,21 +2297,22 @@ do_lid_closed_action (GsdPowerManager *manager)
- CA_PROP_EVENT_DESCRIPTION, _("Lid has been closed"),
- NULL);
-
-+ /* turn the panel off if the lid is closed (mainly for Dells...) */
-+ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
-+ GNOME_RR_DPMS_OFF,
-+ &error);
-+ if (!ret) {
-+ g_warning ("failed to turn the panel off after lid close: %s",
-+ error->message);
-+ g_error_free (error);
-+ }
-+
- /* refresh RANDR so we get an accurate view of what monitors are plugged in when the lid is closed */
- gnome_rr_screen_refresh (manager->priv->x11_screen, NULL); /* NULL-GError */
-
-- /* perform policy action */
-- if (g_settings_get_boolean (manager->priv->settings, "lid-close-suspend-with-external-monitor")
-- || non_laptop_outputs_are_all_off (manager->priv->x11_screen)) {
-- g_debug ("lid is closed; suspending or hibernating");
-- suspend_with_lid_closed (manager);
-- } else {
-- g_debug ("lid is closed; not suspending nor hibernating since some external monitor outputs are still active");
-- setup_lid_close_safety_timer (manager);
-- }
-+ restart_inhibit_lid_switch_timer (manager);
- }
-
--
- static void
- up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
- {
-@@ -2344,6 +2332,7 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
- if (manager->priv->lid_is_closed == tmp)
- return;
- manager->priv->lid_is_closed = tmp;
-+ g_debug ("up changed: lid is now %s", tmp ? "closed" : "open");
-
- /* fake a keypress */
- if (tmp)
-@@ -3302,30 +3291,6 @@ gsd_power_manager_class_init (GsdPowerManagerClass *klass)
- }
-
- static void
--sleep_cb_screensaver_proxy_ready_cb (GObject *source_object,
-- GAsyncResult *res,
-- gpointer user_data)
--{
-- GError *error = NULL;
-- GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
--
-- manager->priv->screensaver_proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
-- if (manager->priv->screensaver_proxy == NULL) {
-- g_warning ("Could not connect to gnome-screensaver: %s",
-- error->message);
-- g_error_free (error);
-- return;
-- }
--
-- /* Finish the upower_notify_sleep_cb() call by locking the screen */
-- g_debug ("gnome-screensaver activated, doing gnome-screensaver lock");
-- g_dbus_proxy_call (manager->priv->screensaver_proxy,
-- "Lock",
-- NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-- NULL, NULL, NULL);
--}
--
--static void
- idle_dbus_signal_cb (GDBusProxy *proxy,
- const gchar *sender_name,
- const gchar *signal_name,
-@@ -3477,75 +3442,38 @@ out:
- }
-
- static void
--lock_screensaver (GsdPowerManager *manager)
-+lock_screensaver (GsdPowerManager *manager,
-+ GSourceFunc done_cb)
- {
- gboolean do_lock;
-
- do_lock = g_settings_get_boolean (manager->priv->settings_screensaver,
- "lock-enabled");
-- if (!do_lock)
-+ if (!do_lock && done_cb) {
-+ done_cb (manager);
- return;
--
-- if (manager->priv->screensaver_proxy != NULL) {
-- g_debug ("doing gnome-screensaver lock");
-- g_dbus_proxy_call (manager->priv->screensaver_proxy,
-- "Lock",
-- NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-- NULL, NULL, NULL);
-- } else {
-- /* 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,
-- GsdPowerManager *manager)
--{
-- lock_screensaver (manager);
--}
--
--static void
--upower_notify_resume_cb (UpClient *client,
-- UpSleepKind sleep_kind,
-- GsdPowerManager *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);
- }
-
-- /* 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);
-- }
-+ g_dbus_connection_call (manager->priv->connection,
-+ GS_DBUS_NAME,
-+ GS_DBUS_PATH,
-+ GS_DBUS_INTERFACE,
-+ "Lock",
-+ NULL, NULL,
-+ G_DBUS_CALL_FLAGS_NONE, -1,
-+ NULL, NULL, NULL);
-+
-+ /* Wait until gnome-shell shield animation is done
-+ *
-+ * FIXME: the shell should mark the lock as active
-+ * when the shield is down, then we could wait for
-+ * that. This would also fix the problem that we wait
-+ * needlessly when the shell has already locked the
-+ * screen because it is initiating the suspend.
-+ *
-+ * https://bugzilla.gnome.org/show_bug.cgi?id=685053
-+ */
-+ g_timeout_add (500, done_cb, manager);
- }
-
- static void
-@@ -3755,6 +3683,287 @@ out:
- return ret;
- }
-
-+static void
-+inhibit_lid_switch_done (GObject *source,
-+ GAsyncResult *result,
-+ gpointer user_data)
-+{
-+ GDBusProxy *proxy = G_DBUS_PROXY (source);
-+ GsdPowerManager *manager = GSD_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 (GsdPowerManager *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
-+uninhibit_lid_switch (GsdPowerManager *manager)
-+{
-+ if (manager->priv->inhibit_lid_switch_fd == -1) {
-+ g_debug ("no lid-switch inhibitor");
-+ return;
-+ }
-+ g_debug ("Removing lid switch system inhibitor");
-+ close (manager->priv->inhibit_lid_switch_fd);
-+ manager->priv->inhibit_lid_switch_fd = -1;
-+ manager->priv->inhibit_lid_switch_taken = FALSE;
-+}
-+
-+static void
-+inhibit_suspend_done (GObject *source,
-+ GAsyncResult *result,
-+ gpointer user_data)
-+{
-+ GDBusProxy *proxy = G_DBUS_PROXY (source);
-+ GsdPowerManager *manager = GSD_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 (GsdPowerManager *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 (),
-+ "GNOME needs to lock the screen",
-+ "delay"),
-+ 0,
-+ G_MAXINT,
-+ NULL,
-+ NULL,
-+ inhibit_suspend_done,
-+ manager);
-+}
-+
-+static void
-+uninhibit_suspend (GsdPowerManager *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 gboolean
-+randr_output_is_on (GnomeRROutput *output)
-+{
-+ GnomeRRCrtc *crtc;
-+
-+ crtc = gnome_rr_output_get_crtc (output);
-+ if (!crtc)
-+ return FALSE;
-+ return gnome_rr_crtc_get_current_mode (crtc) != NULL;
-+}
-+
-+static gboolean
-+external_monitor_is_connected (GnomeRRScreen *screen)
-+{
-+ GnomeRROutput **outputs;
-+ guint i;
-+
-+ if (g_file_test ("/tmp/external_connected", G_FILE_TEST_EXISTS))
-+ return TRUE;
-+
-+ /* see if we have more than one screen plugged in */
-+ outputs = gnome_rr_screen_list_outputs (screen);
-+ for (i = 0; outputs[i] != NULL; i++) {
-+ if (randr_output_is_on (outputs[i]) &&
-+ !gnome_rr_output_is_laptop (outputs[i]))
-+ return TRUE;
-+ }
-+
-+ return FALSE;
-+}
-+
-+static void
-+on_randr_event (GnomeRRScreen *screen, gpointer user_data)
-+{
-+ GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
-+
-+ /* when a second monitor is plugged in, we take the
-+ * handle-lid-switch inhibitor lock of logind to prevent
-+ * it from suspending.
-+ *
-+ * Uninhibiting is done in the inhibit_lid_switch_timer,
-+ * since we want to give users a few seconds when unplugging
-+ * and replugging an external monitor, not suspend right away.
-+ */
-+ if (external_monitor_is_connected (screen) &&
-+ !g_settings_get_boolean (manager->priv->settings,
-+ "lid-close-suspend-with-external-monitor")) {
-+ inhibit_lid_switch (manager);
-+ setup_inhibit_lid_switch_timer (manager);
-+ }
-+ else {
-+ restart_inhibit_lid_switch_timer (manager);
-+ }
-+}
-+
-+static gboolean
-+screen_lock_done_cb (gpointer data)
-+{
-+ GsdPowerManager *manager = data;
-+
-+ /* lift the delay inhibit, so logind can proceed */
-+ uninhibit_suspend (manager);
-+
-+ return FALSE;
-+}
-+
-+static void
-+handle_suspend_actions (GsdPowerManager *manager)
-+{
-+ gboolean ret;
-+ GError *error = NULL;
-+
-+ /* 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);
-+ }
-+
-+ lock_screensaver (manager, screen_lock_done_cb);
-+}
-+
-+static void
-+handle_resume_actions (GsdPowerManager *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
-+logind_proxy_signal_cb (GDBusProxy *proxy,
-+ const gchar *sender_name,
-+ const gchar *signal_name,
-+ GVariant *parameters,
-+ gpointer user_data)
-+{
-+ GsdPowerManager *manager = GSD_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);
-+ }
-+}
-+
- gboolean
- gsd_power_manager_start (GsdPowerManager *manager,
- GError **error)
-@@ -3764,6 +3973,25 @@ gsd_power_manager_start (GsdPowerManager *manager,
- g_debug ("Starting power manager");
- gnome_settings_profile_start (NULL);
-
-+ 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);
-+ if (manager->priv->logind_proxy == NULL) {
-+ g_warning ("no systemd support");
-+ return FALSE;
-+ }
-+ 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);
-+
- /* track the active session */
- manager->priv->session = gnome_settings_session_new ();
- g_signal_connect (manager->priv->session, "notify::state",
-@@ -3778,10 +4006,6 @@ gsd_power_manager_start (GsdPowerManager *manager,
- G_CALLBACK (engine_settings_key_changed_cb), manager);
- manager->priv->settings_screensaver = g_settings_new ("org.gnome.desktop.screensaver");
- manager->priv->up_client = up_client_new ();
-- 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);
- 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);
-@@ -3895,6 +4119,9 @@ gsd_power_manager_start (GsdPowerManager *manager,
- G_CALLBACK (idle_idletime_reset_cb), manager);
- g_signal_connect (manager->priv->idletime, "alarm-expired",
- G_CALLBACK (idle_idletime_alarm_expired_cb), manager);
-+ g_signal_connect (manager->priv->x11_screen, "changed", G_CALLBACK (on_randr_event), manager);
-+ /* set up initial state */
-+ on_randr_event (manager->priv->x11_screen, manager);
-
- /* ensure the default dpms timeouts are cleared */
- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
-@@ -3927,6 +4154,11 @@ gsd_power_manager_stop (GsdPowerManager *manager)
- {
- g_debug ("Stopping power manager");
-
-+ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
-+ g_source_remove (manager->priv->inhibit_lid_switch_timer_id);
-+ manager->priv->inhibit_lid_switch_timer_id = 0;
-+ }
-+
- if (manager->priv->bus_cancellable != NULL) {
- g_cancellable_cancel (manager->priv->bus_cancellable);
- g_object_unref (manager->priv->bus_cancellable);
-@@ -3938,8 +4170,6 @@ gsd_power_manager_stop (GsdPowerManager *manager)
- manager->priv->introspection_data = NULL;
- }
-
-- kill_lid_close_safety_timer (manager);
--
- g_signal_handlers_disconnect_by_data (manager->priv->up_client, manager);
-
- g_clear_object (&manager->priv->connection);
-@@ -3947,6 +4177,19 @@ gsd_power_manager_stop (GsdPowerManager *manager)
- g_clear_object (&manager->priv->settings);
- g_clear_object (&manager->priv->settings_screensaver);
- g_clear_object (&manager->priv->up_client);
-+
-+ 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;
-+ }
-+
-+ g_clear_object (&manager->priv->logind_proxy);
- g_clear_object (&manager->priv->x11_screen);
-
- g_ptr_array_unref (manager->priv->devices_array);
-@@ -3980,6 +4223,8 @@ static void
- gsd_power_manager_init (GsdPowerManager *manager)
- {
- manager->priv = GSD_POWER_MANAGER_GET_PRIVATE (manager);
-+ manager->priv->inhibit_lid_switch_fd = -1;
-+ manager->priv->inhibit_suspend_fd = -1;
- }
-
- static void
---
-1.8.0
-
diff --git a/community/gnome-settings-daemon-updates/PKGBUILD b/community/gnome-settings-daemon-updates/PKGBUILD
index e4125e240..ba4a392af 100644
--- a/community/gnome-settings-daemon-updates/PKGBUILD
+++ b/community/gnome-settings-daemon-updates/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 82410 2013-01-16 23:40:08Z jconder $
+# $Id: PKGBUILD 88701 2013-04-21 22:24:09Z heftig $
# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
_pkgname=gnome-settings-daemon
pkgname=$_pkgname-updates
-pkgver=3.6.4
-pkgrel=2
+pkgver=3.8.1
+pkgrel=1
pkgdesc="Updates plugin for the GNOME Settings daemon"
arch=('i686' 'x86_64')
license=('GPL')
@@ -14,28 +14,20 @@ options=('!emptydirs' '!libtool')
install=$_pkgname.install
url="http://www.gnome.org"
source=("http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.xz"
- '0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch'
'arch.patch')
-sha256sums=('3db993f2dbabc0c9d06a309bb12c9a7104b9cdda414ac4b1c301f5114a441c15'
- 'dbea64c93db308cbcae52cf0c512986c6f07a0bd5023b0641255416af863011e'
+sha256sums=('367a770ec7affff3c85a43bc39ced5a02a1b1761780d954329f6b21c0f2efcee'
'32f18a02698bb24aa8ae293eb7bf74a8261e3ce2c5149d259a87bd14500089ea')
build() {
cd "$srcdir/$_pkgname-$pkgver"
- patch -Np1 -i "$srcdir/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch"
patch -Np1 -i "$srcdir/arch.patch"
- aclocal
- autoconf
- automake --add-missing
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib/gnome-settings-daemon \
- --disable-static \
- --enable-systemd \
- --disable-ibus
+ --disable-static
#https://bugzilla.gnome.org/show_bug.cgi?id=656231
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
diff --git a/community/gnote/PKGBUILD b/community/gnote/PKGBUILD
index 761cdf404..90582160b 100644
--- a/community/gnote/PKGBUILD
+++ b/community/gnote/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 82837 2013-01-24 20:04:23Z ioni $
+# $Id: PKGBUILD 88699 2013-04-21 22:24:06Z heftig $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: uastasi <uastasi@archlinux.us>
pkgname=gnote
-pkgver=3.6.2
+pkgver=3.8.0
pkgrel=1
pkgdesc="A note taking application."
arch=('i686' 'x86_64')
@@ -13,7 +13,7 @@ makedepends=('intltool' 'itstool' 'boost')
options=('!libtool')
install=gnote.install
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
-sha256sums=('38f3b069874658f281445e04b8376d946580e4a5e39620f7e30fdd8216d46c1e')
+sha256sums=('603e2cc8782f910a5b4fdfd3588d955d59f0f4ddcd5685d1f2feadb955e0e9e6')
build() {
cd $pkgname-$pkgver
diff --git a/community/gtksourceviewmm/PKGBUILD b/community/gtksourceviewmm/PKGBUILD
index 208e12cbb..1b7d00a51 100644
--- a/community/gtksourceviewmm/PKGBUILD
+++ b/community/gtksourceviewmm/PKGBUILD
@@ -1,10 +1,10 @@
-#$Id: PKGBUILD 82071 2013-01-07 09:40:20Z arodseth $
+#$Id: PKGBUILD 88691 2013-04-21 22:17:11Z heftig $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
pkgname=gtksourceviewmm
pkgver=3.2.0
-pkgrel=2
+pkgrel=4
pkgdesc='C++ bindings for the gtksourceview library'
arch=('x86_64' 'i686')
url='http://projects.gnome.org/gtksourceviewmm/'
diff --git a/community/gtranslator/PKGBUILD b/community/gtranslator/PKGBUILD
index 82881fd7c..6c4e2d718 100644
--- a/community/gtranslator/PKGBUILD
+++ b/community/gtranslator/PKGBUILD
@@ -1,31 +1,31 @@
-# $Id: PKGBUILD 87242 2013-03-28 21:28:56Z bgyorgy $
+# $Id: PKGBUILD 88692 2013-04-21 22:17:13Z heftig $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Christer Solskogen (solskogen@carebears.mine.nu)
pkgname=gtranslator
pkgver=2.91.6
-pkgrel=3
-pkgdesc="An enhanced gettext po file editor for the GNOME"
-arch=('i686' 'x86_64')
-url="http://projects.gnome.org/gtranslator/"
+pkgrel=4
+pkgdesc='Enhanced gettext po file editor for the GNOME'
+arch=('x86_64' 'i686')
+url='http://projects.gnome.org/gtranslator/'
license=('GPL')
depends=('desktop-file-utils' 'gdl' 'gettext' 'gtksourceview3' 'gtkspell3' 'iso-codes' 'libgda' 'libpeas' 'gsettings-desktop-schemas' 'hicolor-icon-theme' 'dconf')
makedepends=('intltool' 'itstool' 'gnome-doc-utils' 'gucharmap' 'json-glib' 'gnome-common' 'yelp-tools')
optdepends=('gucharmap: for charmap plugin'
'json-glib: for open-tran plugin')
options=('!libtool')
-install=$pkgname.install
-changelog=$pkgname.changelog
-source=(http://ftp.acc.umu.se/pub/GNOME/sources/$pkgname/2.91/$pkgname-$pkgver.tar.xz
- gtkspell3-port.patch)
+install="$pkgname.install"
+source=("http://ftp.acc.umu.se/pub/GNOME/sources/$pkgname/2.91/$pkgname-$pkgver.tar.xz"
+ 'gtkspell3-port.patch')
sha256sums=('a1fd4b17b1f32cc7223a31d34e34f95b20acc7b5a23768351a34ff0b7a4bcdf6'
'29afb55c692869cbd47d0181ddd93acdd53f5b236ebabd9a96a983da66d4cb9d')
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
+ cd "$srcdir/$pkgname-$pkgver"
- # Port to the new gtkspell3
+ # port to the new gtkspell3
patch -Np1 -i "$srcdir/gtkspell3-port.patch"
autoreconf -fi
@@ -34,7 +34,9 @@ build() {
}
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
+ cd "$srcdir/$pkgname-$pkgver"
- make DESTDIR=${pkgdir} install
+ make DESTDIR="$pkgdir" install
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/gwibber/PKGBUILD b/community/gwibber/PKGBUILD
index 378218f5d..6bf243222 100644
--- a/community/gwibber/PKGBUILD
+++ b/community/gwibber/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 87240 2013-03-28 21:28:09Z bgyorgy $
+# $Id: PKGBUILD 88679 2013-04-21 22:16:47Z heftig $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
pkgname=gwibber
pkgver=3.6.0
-pkgrel=3
+pkgrel=4
pkgdesc="Microblogging client for GNOME, which supports Facebook, Identi.ca, Twitter, Flickr, Foursquare, Sina and Sohu"
arch=('i686' 'x86_64')
url="http://gwibber.com/"
license=('GPL')
-depends=('libgee' 'account-plugins' 'libnotify' 'libsoup' 'dee' 'json-glib' 'gtkspell3' 'python2-dbus' 'python2-gobject' 'python2-gobject2' 'python2-httplib2' 'python2-oauth' 'python2-imaging' 'python2-xdg' 'dconf')
+depends=('libgee06' 'account-plugins' 'libnotify' 'libsoup' 'dee' 'json-glib' 'gtkspell3' 'python2-dbus' 'python2-gobject' 'python2-gobject2' 'python2-httplib2' 'python2-oauth' 'python2-imaging' 'python2-xdg' 'dconf')
makedepends=('intltool' 'vala')
options=('!libtool')
install=$pkgname.install
diff --git a/community/ktoblzcheck/PKGBUILD b/community/ktoblzcheck/PKGBUILD
index 22fa63751..f898512e5 100644
--- a/community/ktoblzcheck/PKGBUILD
+++ b/community/ktoblzcheck/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 80490 2012-11-22 19:42:25Z spupykin $
+# $Id: PKGBUILD 88778 2013-04-22 10:14:34Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Philipp Sandhaus <philipp.sandhaus@gmx.de>
pkgname=ktoblzcheck
-pkgver=1.40
+pkgver=1.41
pkgrel=1
pkgdesc="A library to check account numbers and bank codes of German banks"
arch=(i686 x86_64)
@@ -14,7 +14,7 @@ depends=('gcc-libs' 'python')
optdepends=('perl')
source=(http://downloads.sourceforge.net/sourceforge/ktoblzcheck/ktoblzcheck-$pkgver.tar.gz
ktoblzcheck-python3.patch)
-md5sums=('fe29ec3ef8b48adf0302fd9d2607580b'
+md5sums=('48f6d0086d780d1c101b17b5b63706f3'
'a81a697bb3aaeffb7fac0ad7d9166e3f')
build() {
diff --git a/community/metacity/PKGBUILD b/community/metacity/PKGBUILD
index 4919a27eb..5955d5b88 100644
--- a/community/metacity/PKGBUILD
+++ b/community/metacity/PKGBUILD
@@ -1,30 +1,46 @@
-# $Id: PKGBUILD 87887 2013-04-08 14:38:04Z heftig $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
+# $Id: PKGBUILD 88686 2013-04-21 22:17:01Z heftig $
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=metacity
pkgver=2.34.13
-pkgrel=1
-pkgdesc="A window manager for GNOME"
-arch=(i686 x86_64)
+pkgrel=4
+pkgdesc="Legacy GNOME window manager"
+arch=('i686' 'x86_64')
license=('GPL')
-depends=('dconf' 'gtk2' 'gsettings-desktop-schemas' 'libcanberra' 'libgtop' 'libsm' 'startup-notification' 'zenity')
-makedepends=('intltool' 'yelp-tools')
-url="http://www.gnome.org"
-groups=('gnome')
-options=('!libtool' '!emptydirs')
+depends=('dconf' 'libcanberra' 'libgtop' 'gsettings-desktop-schemas' 'gtk2' 'startup-notification' 'zenity')
+makedepends=('intltool' 'itstool')
+url="https://live.gnome.org/Metacity"
+options=('!libtool')
install=metacity.install
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
- fix_compositing_startup.patch)
+ fix_compositing_startup.patch
+ fix_force_quit.patch
+ fix_shadows.patch
+ enable_compositing.patch)
sha256sums=('8cf4dbf0da0a6f36357ce7db7f829ec685908a7792453c662fb8184572b91075'
- '5094a0ffe3eb8289ed752829877c2e1b743eddf938ad3fc92fb4574b42765ae2')
+ '5094a0ffe3eb8289ed752829877c2e1b743eddf938ad3fc92fb4574b42765ae2'
+ '917760ac3375894ebb4052dfc7c8dff1ac556fb81033d7a7caf02123ceede50d'
+ 'a0981477e9b3fd108fd03b7637bfd1f17a1f6cb13ec703d86b424b55076096f3'
+ 'e53c1c20e19cd3d94d05d08045c7a9a373ce52051928ccc69bf3068081f30f9a')
build() {
cd "$pkgname-$pkgver"
- patch -Np1 -i "${srcdir}/fix_compositing_startup.patch"
- ./configure --prefix=/usr --sysconfdir=/etc \
- --libexecdir=/usr/lib/metacity \
- --localstatedir=/var --disable-static \
- --disable-schemas-compile
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=658036
+ patch -Np1 -i "$srcdir/fix_compositing_startup.patch"
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=687938
+ patch -Np1 -i "$srcdir/fix_force_quit.patch"
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=648340
+ patch -Np1 -i "$srcdir/fix_shadows.patch"
+
+ # Enable compositing by default (required for the desktop rendering feature of nautilus)
+ patch -Np1 -i "$srcdir/enable_compositing.patch"
+
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
+ --disable-static --disable-schemas-compile
make
}
diff --git a/community/metacity/enable_compositing.patch b/community/metacity/enable_compositing.patch
new file mode 100644
index 000000000..3c5f09666
--- /dev/null
+++ b/community/metacity/enable_compositing.patch
@@ -0,0 +1,12 @@
+diff -Naur metacity-2.34.13.orig/src/org.gnome.metacity.gschema.xml.in metacity-2.34.13/src/org.gnome.metacity.gschema.xml.in
+--- metacity-2.34.13.orig/src/org.gnome.metacity.gschema.xml.in 2012-02-15 18:31:44.000000000 +0100
++++ metacity-2.34.13/src/org.gnome.metacity.gschema.xml.in 2013-04-10 20:14:39.837033219 +0200
+@@ -3,7 +3,7 @@
+ <schema id="org.gnome.metacity" path="/org/gnome/metacity/"
+ gettext-domain="@GETTEXT_PACKAGE@">
+ <key name="compositing-manager" type="b">
+- <default>false</default>
++ <default>true</default>
+ <_summary>Compositing Manager</_summary>
+ <_description>
+ Determines whether Metacity is a compositing manager.
diff --git a/community/metacity/fix_force_quit.patch b/community/metacity/fix_force_quit.patch
new file mode 100644
index 000000000..020f427c4
--- /dev/null
+++ b/community/metacity/fix_force_quit.patch
@@ -0,0 +1,222 @@
+diff -Naur metacity-2.34.13.orig/src/core/delete.c metacity-2.34.13/src/core/delete.c
+--- metacity-2.34.13.orig/src/core/delete.c 2011-11-10 15:14:34.000000000 +0100
++++ metacity-2.34.13/src/core/delete.c 2012-11-08 21:36:48.373976906 +0100
+@@ -90,23 +90,41 @@
+ return;
+ }
+
+- window_title = g_locale_from_utf8 (window->title, -1, NULL, NULL, NULL);
++ /* This is to get a better string if the title isn't representable
++ * in the locale encoding; actual conversion to UTF-8 is done inside
++ * meta_show_dialog */
++
++ if (window->title && window->title[0])
++ {
++ tmp = g_locale_from_utf8 (window->title, -1, NULL, NULL, NULL);
++ if (tmp == NULL)
++ window_title = NULL;
++ else
++ window_title = window->title;
++ g_free (tmp);
++ }
++ else
++ {
++ window_title = NULL;
++ }
+
+ /* Translators: %s is a window title */
+- tmp = g_strdup_printf (_("<tt>%s</tt> is not responding."),
+- window_title);
++ if (window_title)
++ tmp = g_markup_printf_escaped (_("<tt>%s</tt> is not responding."),
++ window_title);
++ else
++ tmp = g_strdup (_("Application is not responding."));
++
+ window_content = g_strdup_printf (
+ "<big><b>%s</b></big>\n\n<i>%s</i>",
+ tmp,
+ _("You may choose to wait a short while for it to "
+ "continue or force the application to quit entirely."));
+
+- g_free (window_title);
+-
+ dialog_pid =
+ meta_show_dialog ("--question",
+- window_content, 0,
+- window->screen->number,
++ window_content, NULL,
++ window->screen->screen_name,
+ _("_Wait"), _("_Force Quit"), window->xwindow,
+ NULL, NULL);
+
+diff -Naur metacity-2.34.13.orig/src/core/session.c metacity-2.34.13/src/core/session.c
+--- metacity-2.34.13.orig/src/core/session.c 2011-11-10 15:14:34.000000000 +0100
++++ metacity-2.34.13/src/core/session.c 2012-11-08 21:35:56.896216322 +0100
+@@ -1809,7 +1809,7 @@
+ "and will have to be restarted manually next time "
+ "you log in."),
+ "240",
+- meta_screen_get_screen_number (meta_get_display()->active_screen),
++ meta_get_display()->active_screen->screen_name,
+ NULL, NULL,
+ None,
+ columns,
+diff -Naur metacity-2.34.13.orig/src/core/util.c metacity-2.34.13/src/core/util.c
+--- metacity-2.34.13.orig/src/core/util.c 2011-11-10 15:14:34.000000000 +0100
++++ metacity-2.34.13/src/core/util.c 2012-11-08 21:36:41.373828115 +0100
+@@ -538,11 +538,30 @@
+ }
+ }
+
++/* Command line arguments are passed in the locale encoding; in almost
++ * all cases, we'd hope that is UTF-8 and no conversion is necessary.
++ * If it's not UTF-8, then it's possible that the message isn't
++ * representable in the locale encoding.
++ */
++static void
++append_argument (GPtrArray *args,
++ const char *arg)
++{
++ char *locale_arg = g_locale_from_utf8 (arg, -1, NULL, NULL, NULL);
++
++ /* This is cheesy, but it's better to have a few ???'s in the dialog
++ * for an unresponsive application than no dialog at all appear */
++ if (!locale_arg)
++ locale_arg = g_strdup ("???");
++
++ g_ptr_array_add (args, locale_arg);
++}
++
+ GPid
+ meta_show_dialog (const char *type,
+ const char *message,
+ const char *timeout,
+- const gint screen_number,
++ const char *display,
+ const char *ok_text,
+ const char *cancel_text,
+ const int transient_for,
+@@ -550,61 +569,58 @@
+ GSList *entries)
+ {
+ GError *error = NULL;
+- char *screen_number_text = g_strdup_printf("%d", screen_number);
+ GSList *tmp;
+- int i=0;
+ GPid child_pid;
+- const char **argvl = g_malloc(sizeof (char*) *
+- (17 +
+- g_slist_length (columns)*2 +
+- g_slist_length (entries)));
+-
+- argvl[i++] = "zenity";
+- argvl[i++] = type;
+- argvl[i++] = "--screen";
+- argvl[i++] = screen_number_text;
+- argvl[i++] = "--class";
+- argvl[i++] = "metacity-dialog";
+- argvl[i++] = "--title";
++ GPtrArray *args;
++
++ args = g_ptr_array_new ();
++
++ append_argument (args, "zenity");
++ append_argument (args, type);
++ append_argument (args, "--display");
++ append_argument (args, display);
++ append_argument (args, "--class");
++ append_argument (args, "metaicty-dialog");
++ append_argument (args, "--title");
+ /* Translators: This is the title used on dialog boxes */
+- argvl[i++] = _("Metacity");
+- argvl[i++] = "--text";
+- argvl[i++] = message;
+-
++ append_argument (args, _("Metacity"));
++ append_argument (args, "--text");
++ append_argument (args, message);
++
+ if (timeout)
+ {
+- argvl[i++] = "--timeout";
+- argvl[i++] = timeout;
++ append_argument (args, "--timeout");
++ append_argument (args, timeout);
+ }
+
+ if (ok_text)
+ {
+- argvl[i++] = "--ok-label";
+- argvl[i++] = ok_text;
++ append_argument (args, "--ok-label");
++ append_argument (args, ok_text);
+ }
+
+ if (cancel_text)
+ {
+- argvl[i++] = "--cancel-label";
+- argvl[i++] = cancel_text;
++ append_argument (args, "--cancel-label");
++ append_argument (args, cancel_text);
+ }
+-
++
+ tmp = columns;
+ while (tmp)
+ {
+- argvl[i++] = "--column";
+- argvl[i++] = tmp->data;
++ append_argument (args, "--column");
++ append_argument (args, tmp->data);
+ tmp = tmp->next;
+ }
+
+ tmp = entries;
+ while (tmp)
+ {
+- argvl[i++] = tmp->data;
++ append_argument (args, tmp->data);
+ tmp = tmp->next;
+ }
+-
+- argvl[i] = NULL;
++
++ g_ptr_array_add (args, NULL); /* NULL-terminate */
+
+ if (transient_for)
+ {
+@@ -615,7 +631,7 @@
+
+ g_spawn_async (
+ "/",
+- (gchar**) argvl, /* ugh */
++ (gchar**) args->pdata,
+ NULL,
+ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
+ NULL, NULL,
+@@ -626,8 +642,7 @@
+ if (transient_for)
+ unsetenv ("WINDOWID");
+
+- g_free (argvl);
+- g_free (screen_number_text);
++ g_ptr_array_free (args, TRUE);
+
+ if (error)
+ {
+diff -Naur metacity-2.34.13.orig/src/include/util.h metacity-2.34.13/src/include/util.h
+--- metacity-2.34.13.orig/src/include/util.h 2011-11-10 15:14:34.000000000 +0100
++++ metacity-2.34.13/src/include/util.h 2012-11-08 21:36:27.206860608 +0100
+@@ -99,9 +99,9 @@
+ void meta_free_gslist_and_elements (GSList *list_to_deep_free);
+
+ GPid meta_show_dialog (const char *type,
+- const char *title,
+ const char *message,
+- gint timeout,
++ const char *timeout,
++ const char *display,
+ const char *ok_text,
+ const char *cancel_text,
+ const int transient_for,
diff --git a/community/metacity/fix_shadows.patch b/community/metacity/fix_shadows.patch
new file mode 100644
index 000000000..8d4bf9939
--- /dev/null
+++ b/community/metacity/fix_shadows.patch
@@ -0,0 +1,39 @@
+diff -Naur metacity-2.34.13.orig/src/compositor/compositor-xrender.c metacity-2.34.13/src/compositor/compositor-xrender.c
+--- metacity-2.34.13.orig/src/compositor/compositor-xrender.c 2011-11-10 15:14:34.000000000 +0100
++++ metacity-2.34.13/src/compositor/compositor-xrender.c 2012-11-09 13:51:42.492411570 +0100
+@@ -905,35 +905,6 @@
+ }
+ }
+
+- /* Never put a shadow around shaped windows */
+- if (cw->shaped) {
+- meta_verbose ("Window has no shadow as it is shaped\n");
+- return FALSE;
+- }
+-
+- /* Don't put shadow around DND icon windows */
+- if (cw->type == META_COMP_WINDOW_DND ||
+- cw->type == META_COMP_WINDOW_DESKTOP) {
+- meta_verbose ("Window has no shadow as it is DND or Desktop\n");
+- return FALSE;
+- }
+-
+- if (cw->mode != WINDOW_ARGB) {
+- meta_verbose ("Window has shadow as it is not ARGB\n");
+- return TRUE;
+- }
+-
+- if (cw->type == META_COMP_WINDOW_MENU ||
+- cw->type == META_COMP_WINDOW_DROP_DOWN_MENU) {
+- meta_verbose ("Window has shadow as it is a menu\n");
+- return TRUE;
+- }
+-
+- if (cw->type == META_COMP_WINDOW_TOOLTIP) {
+- meta_verbose ("Window has shadow as it is a tooltip\n");
+- return TRUE;
+- }
+-
+ meta_verbose ("Window has no shadow as it fell through\n");
+ return FALSE;
+ }
diff --git a/community/muffin/PKGBUILD b/community/muffin/PKGBUILD
index e77f3c76d..8732424f9 100644
--- a/community/muffin/PKGBUILD
+++ b/community/muffin/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 85924 2013-03-09 00:51:47Z faidoc $
+# $Id: PKGBUILD 88697 2013-04-21 22:24:03Z heftig $
# Contributor: Adam Hani Schakaki <adam@schakaki.net>
# Contributor: Ner0
pkgname=muffin
-pkgver=1.7.2
+pkgver=1.7.3
pkgrel=1
pkgdesc="Cinnamon window manager based on Mutter"
arch=('i686' 'x86_64')
@@ -11,20 +11,16 @@ url="https://github.com/linuxmint/muffin"
license=('GPL')
depends=('libsm' 'clutter' 'gobject-introspection' 'gsettings-desktop-schemas' \
'libcanberra' 'startup-notification' 'zenity' 'dconf')
-makedepends=('intltool' 'gnome-doc-utils')
-provides=('muffin-wm')
-conflicts=('muffin-wm')
-replaces=('muffin-wm')
+makedepends=('intltool' 'gnome-doc-utils' 'gnome-common')
options=('!libtool' '!emptydirs')
install=$pkgname.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/muffin/tarball/$pkgver")
-md5sums=('c39cd212959c7de8f834abe9e3fee8da')
+md5sums=('30e329da6af10e825dace490f13e445f')
build() {
cd linuxmint-muffin-*
- autoreconf -vfi
- PYTHON=python2 ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/muffin \
+ PYTHON=python2 ./autogen.sh --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/muffin \
--localstatedir=/var --disable-static --disable-schemas-compile
make
}
diff --git a/community/nemiver/PKGBUILD b/community/nemiver/PKGBUILD
index 8c6f3a4e7..1c36a5330 100644
--- a/community/nemiver/PKGBUILD
+++ b/community/nemiver/PKGBUILD
@@ -1,17 +1,16 @@
-# $Id: PKGBUILD 82907 2013-01-25 12:43:46Z arodseth $
+# $Id: PKGBUILD 88693 2013-04-21 22:17:15Z heftig $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: jordz <jordz@archlinux.us>
pkgname=nemiver
pkgver=0.9.4
-pkgrel=1
+pkgrel=2
pkgdesc='C/C++ debugger for GNOME'
arch=('x86_64' 'i686')
license=('GPL')
url='http://www.gnome.org/projects/nemiver/'
-depends=('gdlmm' 'gdb' 'gtksourceviewmm' 'libgtop' 'vte3' 'ghex' 'dconf' 'gsettings-desktop-schemas' 'itstool')
-makedepends=('boost' 'intltool' 'gnome-doc-utils')
-install=nemiver.install
+depends=('gdlmm' 'gdb' 'gtksourceviewmm' 'libgtop' 'vte3' 'ghex' 'dconf' 'gsettings-desktop-schemas')
+makedepends=('boost' 'intltool' 'itstool')
source=("http://ftp.acc.umu.se/pub/GNOME/sources/nemiver/0.9/$pkgname-$pkgver.tar.xz")
options=('!libtool' '!emptydirs')
sha256sums=('12cc5b6092ba720f2524f59928bee4d736e5e5ffeeffb6fd06f99695f17d683f')
diff --git a/community/nemiver/nemiver.install b/community/nemiver/nemiver.install
deleted file mode 100644
index f6a1886e7..000000000
--- a/community/nemiver/nemiver.install
+++ /dev/null
@@ -1,15 +0,0 @@
-post_upgrade() {
- usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
- #update-desktop-database -q
- #gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
-}
-
-post_install() {
- post_upgrade
-}
-
-post_remove() {
- post_upgrade
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/community/nemo/PKGBUILD b/community/nemo/PKGBUILD
index 778009bb6..f2b15964c 100644
--- a/community/nemo/PKGBUILD
+++ b/community/nemo/PKGBUILD
@@ -1,33 +1,39 @@
-# $Id: PKGBUILD 86851 2013-03-22 21:28:54Z faidoc $
+# $Id: PKGBUILD 88773 2013-04-22 09:44:29Z faidoc $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: Ner0
pkgname=nemo
-pkgver=1.7.2
-pkgrel=1
+pkgver=1.7.3
+pkgrel=2
pkgdesc="Cinnamon file manager (Nautilus fork)"
arch=('i686' 'x86_64')
url="https://github.com/linuxmint/nemo"
license=('GPL')
depends=('libexif' 'gvfs' 'dconf' 'desktop-file-utils' 'exempi' 'python2'
- 'gnome-desktop' 'gnome-icon-theme' 'libnotify' 'libtracker-sparql')
+ 'gnome-desktop' 'gnome-icon-theme' 'libnotify' 'libtracker-sparql'
+ 'cinnamon')
makedepends=('gtk-doc' 'gobject-introspection' 'intltool' 'gnome-common')
optdepends=('gksu: Open as Root')
-provides=('nemo-fm')
-replaces=('nemo-fm')
-conflicts=('nemo-fm')
options=('!emptydirs' '!libtool')
install=nemo.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/nemo/tarball/$pkgver"
- "use-terminal-config.patch")
-md5sums=('809cf58f472a9e5de628a763d441b246'
- '6cca080cc8fe3df7e725c0f8cd5fa485')
+ "tracker-0.16.patch"
+ "remove-desktop-background.patch")
+md5sums=('04c021da543e2562b712107c2be9a8c2'
+ '9e170cc74eee901634b3367b06a209c6'
+ '700b595dfcf06e39f9dc3bdb7c81e086')
build() {
cd linuxmint-nemo-*
- # Read the default terminal app from GSettings
- patch -Np1 -i ../use-terminal-config.patch
+ # Python2 fix
+ sed -i 's/bin\/python/bin\/python2/g' files/usr/share/nemo/actions/myaction.py
+
+ # https://github.com/linuxmint/nemo/pull/258
+ patch -Np1 -i ../tracker-0.16.patch
+
+ # https://github.com/linuxmint/nemo/pull/263
+ patch -Np1 -i ../remove-desktop-background.patch
./autogen.sh --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --disable-static \
@@ -43,7 +49,4 @@ package() {
cd linuxmint-nemo-*
make DESTDIR="$pkgdir/" install
-
- # Python2 fix
- sed -i 's/bin\/python/bin\/python2/g' "${pkgdir}/usr/share/nemo/actions/myaction.py"
}
diff --git a/community/nemo/remove-desktop-background.patch b/community/nemo/remove-desktop-background.patch
new file mode 100644
index 000000000..793d5650c
--- /dev/null
+++ b/community/nemo/remove-desktop-background.patch
@@ -0,0 +1,964 @@
+From 5f82ebba474f6c1068a21f51ded2b0e26869ecaf Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Mon, 15 Apr 2013 18:44:35 -0400
+Subject: [PATCH 1/4] Don't render the background. Need to fix selected icon
+ style
+
+---
+ src/nemo-desktop-icon-view.c | 18 +++---------------
+ src/nemo-desktop-window.c | 15 ++++++++++++++-
+ 2 files changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/src/nemo-desktop-icon-view.c b/src/nemo-desktop-icon-view.c
+index b903c5b..37cd8cb 100644
+--- a/src/nemo-desktop-icon-view.c
++++ b/src/nemo-desktop-icon-view.c
+@@ -243,16 +243,6 @@ struct NemoDesktopIconViewDetails
+ static void
+ real_begin_loading (NemoView *object)
+ {
+- NemoIconContainer *icon_container;
+- NemoDesktopIconView *view;
+-
+- view = NEMO_DESKTOP_ICON_VIEW (object);
+-
+- icon_container = get_icon_container (view);
+- if (view->details->background == NULL) {
+- view->details->background = nemo_desktop_background_new (icon_container);
+- }
+-
+ NEMO_VIEW_CLASS (nemo_desktop_icon_view_parent_class)->begin_loading (object);
+ }
+
+@@ -298,11 +288,6 @@ struct NemoDesktopIconViewDetails
+ nemo_view_update_menus,
+ icon_view);
+
+- if (icon_view->details->background != NULL) {
+- g_object_unref (icon_view->details->background);
+- icon_view->details->background = NULL;
+- }
+-
+ G_OBJECT_CLASS (nemo_desktop_icon_view_parent_class)->dispose (object);
+ }
+
+@@ -652,6 +637,9 @@ struct NemoDesktopIconViewDetails
+ G_CALLBACK (nemo_view_update_menus),
+ desktop_icon_view);
+
++ GdkRGBA transparent = { 0, 0, 0, 0 };
++ gtk_widget_override_background_color (GTK_WIDGET (icon_container), GTK_STATE_FLAG_NORMAL, &transparent);
++
+ have_cinnamon_settings = g_find_program_in_path ("cinnamon-settings") != NULL;
+ }
+
+diff --git a/src/nemo-desktop-window.c b/src/nemo-desktop-window.c
+index 9c80c62..2d5c4e8 100644
+--- a/src/nemo-desktop-window.c
++++ b/src/nemo-desktop-window.c
+@@ -97,6 +97,7 @@ struct NemoDesktopWindowDetails {
+ g_signal_connect_swapped (nemo_preferences, "changed::" NEMO_PREFERENCES_DESKTOP_IS_HOME_DIR,
+ G_CALLBACK (nemo_desktop_window_update_directory),
+ window);
++
+ }
+
+ static void
+@@ -189,6 +190,12 @@ struct NemoDesktopWindowDetails {
+ /* Chain up to realize our children */
+ GTK_WIDGET_CLASS (nemo_desktop_window_parent_class)->map (widget);
+ gdk_window_lower (gtk_widget_get_window (widget));
++
++ GdkWindow *window;
++ GdkRGBA transparent = { 0, 0, 0, 0 };
++
++ window = gtk_widget_get_window (widget);
++ gdk_window_set_background_rgba (window, &transparent);
+ }
+
+ static void
+@@ -254,6 +261,7 @@ struct NemoDesktopWindowDetails {
+ {
+ NemoDesktopWindow *window;
+ NemoDesktopWindowDetails *details;
++ GdkVisual *visual;
+
+ window = NEMO_DESKTOP_WINDOW (widget);
+ details = window->details;
+@@ -261,7 +269,12 @@ struct NemoDesktopWindowDetails {
+ /* Make sure we get keyboard events */
+ gtk_widget_set_events (widget, gtk_widget_get_events (widget)
+ | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
+-
++
++ visual = gdk_screen_get_rgba_visual (gtk_widget_get_screen (widget));
++ if (visual) {
++ gtk_widget_set_visual (widget, visual);
++ }
++
+ /* Do the work of realizing. */
+ GTK_WIDGET_CLASS (nemo_desktop_window_parent_class)->realize (widget);
+
+--
+1.8.1.5
+
+
+From 6b013acb8f0ad855d042d0e8d51350c539a37c21 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Mon, 15 Apr 2013 20:03:03 -0400
+Subject: [PATCH 2/4] Remove nemo-desktop-background, the desktop window makes
+ a transparent background and just uses the existing rendered background from
+ muffin/g-s-d
+
+---
+ libnemo-private/Makefile.am | 2 -
+ libnemo-private/nemo-desktop-background.c | 578 ------------------------------
+ libnemo-private/nemo-desktop-background.h | 65 ----
+ src/nemo-desktop-icon-view.c | 26 +-
+ 4 files changed, 13 insertions(+), 658 deletions(-)
+ delete mode 100644 libnemo-private/nemo-desktop-background.c
+ delete mode 100644 libnemo-private/nemo-desktop-background.h
+
+diff --git a/libnemo-private/Makefile.am b/libnemo-private/Makefile.am
+index 3b46318..5fd797c 100644
+--- a/libnemo-private/Makefile.am
++++ b/libnemo-private/Makefile.am
+@@ -81,8 +81,6 @@ libnemo_private_la_SOURCES = \
+ nemo-debug.h \
+ nemo-default-file-icon.c \
+ nemo-default-file-icon.h \
+- nemo-desktop-background.c \
+- nemo-desktop-background.h \
+ nemo-desktop-directory-file.c \
+ nemo-desktop-directory-file.h \
+ nemo-desktop-directory.c \
+diff --git a/libnemo-private/nemo-desktop-background.c b/libnemo-private/nemo-desktop-background.c
+deleted file mode 100644
+index f8dc979..0000000
+--- a/libnemo-private/nemo-desktop-background.c
++++ /dev/null
+@@ -1,578 +0,0 @@
+-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+-
+-/*
+- * nemo-desktop-background.c: Helper object to handle desktop background
+- * changes.
+- *
+- * Copyright (C) 2000 Eazel, Inc.
+- * Copyright (C) 2010 Cosimo Cecchi <cosimoc@gnome.org>
+- *
+- * 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.
+- *
+- * Authors: Darin Adler <darin@bentspoon.com>
+- * Cosimo Cecchi <cosimoc@gnome.org>
+- */
+-
+-#include <config.h>
+-
+-#include "nemo-desktop-background.h"
+-
+-#include <eel/eel-gdk-extensions.h>
+-#include <eel/eel-gtk-extensions.h>
+-
+-#include "nemo-global-preferences.h"
+-
+-#define GNOME_DESKTOP_USE_UNSTABLE_API
+-#include <libgnome-desktop/gnome-bg.h>
+-#include <gdesktop-enums.h>
+-
+-#include <gtk/gtk.h>
+-#include <string.h>
+-
+-static void init_fade (NemoDesktopBackground *self);
+-static void free_fade (NemoDesktopBackground *self);
+-static void queue_background_change (NemoDesktopBackground *self);
+-
+-static NemoDesktopBackground *singleton = NULL;
+-
+-G_DEFINE_TYPE (NemoDesktopBackground, nemo_desktop_background, G_TYPE_OBJECT);
+-
+-enum {
+- PROP_WIDGET = 1,
+- NUM_PROPERTIES,
+-};
+-
+-struct NemoDesktopBackgroundDetails {
+-
+- GtkWidget *widget;
+- GnomeBG *bg;
+-
+- /* Realized data: */
+- cairo_surface_t *background_surface;
+- GnomeBGCrossfade *fade;
+- int background_entire_width;
+- int background_entire_height;
+- GdkColor default_color;
+-
+- /* Desktop screen size watcher */
+- gulong screen_size_handler;
+- /* Desktop monitors configuration watcher */
+- gulong screen_monitors_handler;
+- guint change_idle_id;
+-};
+-
+-
+-static gboolean
+-background_settings_change_event_cb (GSettings *settings,
+- gpointer keys,
+- gint n_keys,
+- gpointer user_data);
+-
+-
+-static void
+-free_fade (NemoDesktopBackground *self)
+-{
+- if (self->details->fade != NULL) {
+- g_object_unref (self->details->fade);
+- self->details->fade = NULL;
+- }
+-}
+-
+-static void
+-free_background_surface (NemoDesktopBackground *self)
+-{
+- cairo_surface_t *surface;
+-
+- surface = self->details->background_surface;
+- if (surface != NULL) {
+- cairo_surface_destroy (surface);
+- self->details->background_surface = NULL;
+- }
+-}
+-
+-static void
+-nemo_desktop_background_finalize (GObject *object)
+-{
+- NemoDesktopBackground *self;
+-
+- self = NEMO_DESKTOP_BACKGROUND (object);
+-
+- g_signal_handlers_disconnect_by_func (gnome_background_preferences,
+- background_settings_change_event_cb,
+- self);
+-
+- free_background_surface (self);
+- free_fade (self);
+-
+- g_clear_object (&self->details->bg);
+-
+- G_OBJECT_CLASS (nemo_desktop_background_parent_class)->finalize (object);
+-}
+-
+-static void
+-nemo_desktop_background_unrealize (NemoDesktopBackground *self)
+-{
+- free_background_surface (self);
+-
+- self->details->background_entire_width = 0;
+- self->details->background_entire_height = 0;
+- self->details->default_color.red = 0xffff;
+- self->details->default_color.green = 0xffff;
+- self->details->default_color.blue = 0xffff;
+-}
+-
+-static void
+-nemo_desktop_background_set_image_uri (NemoDesktopBackground *self,
+- const char *image_uri)
+-{
+- char *filename;
+-
+- if (image_uri != NULL) {
+- filename = g_filename_from_uri (image_uri, NULL, NULL);
+- }
+- else {
+- filename = NULL;
+- }
+-
+- gnome_bg_set_filename (self->details->bg, filename);
+-
+- g_free (filename);
+-}
+-
+-static void
+-init_fade (NemoDesktopBackground *self)
+-{
+- GtkWidget *widget;
+- gboolean do_fade;
+-
+- widget = self->details->widget;
+-
+- if (widget == NULL || !gtk_widget_get_realized (widget))
+- return;
+-
+- do_fade = g_settings_get_boolean (nemo_desktop_preferences,
+- NEMO_PREFERENCES_DESKTOP_BACKGROUND_FADE);
+-
+- if (!do_fade) {
+- return;
+- }
+-
+- if (self->details->fade == NULL) {
+- GdkWindow *window;
+- GdkScreen *screen;
+- int old_width, old_height, width, height;
+-
+- /* If this was the result of a screen size change,
+- * we don't want to crossfade
+- */
+- window = gtk_widget_get_window (widget);
+- old_width = gdk_window_get_width (window);
+- old_height = gdk_window_get_height (window);
+-
+- screen = gtk_widget_get_screen (widget);
+- width = gdk_screen_get_width (screen);
+- height = gdk_screen_get_height (screen);
+-
+- if (old_width == width && old_height == height) {
+- self->details->fade = gnome_bg_crossfade_new (width, height);
+- g_signal_connect_swapped (self->details->fade,
+- "finished",
+- G_CALLBACK (free_fade),
+- self);
+- }
+- }
+-
+- if (self->details->fade != NULL && !gnome_bg_crossfade_is_started (self->details->fade)) {
+- cairo_surface_t *start_surface;
+-
+- if (self->details->background_surface == NULL) {
+- start_surface = gnome_bg_get_surface_from_root (gtk_widget_get_screen (widget));
+- } else {
+- start_surface = cairo_surface_reference (self->details->background_surface);
+- }
+- gnome_bg_crossfade_set_start_surface (self->details->fade,
+- start_surface);
+- cairo_surface_destroy (start_surface);
+- }
+-}
+-
+-static void
+-screen_size_changed (GdkScreen *screen,
+- NemoDesktopBackground *self)
+-{
+- queue_background_change (self);
+-}
+-
+-static gboolean
+-nemo_desktop_background_ensure_realized (NemoDesktopBackground *self)
+-{
+- int entire_width;
+- int entire_height;
+- GdkScreen *screen;
+- GdkWindow *window;
+-
+- screen = gtk_widget_get_screen (self->details->widget);
+- entire_height = gdk_screen_get_height (screen);
+- entire_width = gdk_screen_get_width (screen);
+-
+- /* If the window size is the same as last time, don't update */
+- if (entire_width == self->details->background_entire_width &&
+- entire_height == self->details->background_entire_height) {
+- return FALSE;
+- }
+-
+- free_background_surface (self);
+-
+- window = gtk_widget_get_window (self->details->widget);
+- self->details->background_surface = gnome_bg_create_surface (self->details->bg,
+- window,
+- entire_width, entire_height,
+- TRUE);
+-
+- /* We got the surface and everything, so we don't care about a change
+- that is pending (unless things actually change after this time) */
+- g_object_set_data (G_OBJECT (self),
+- "ignore-pending-change", GINT_TO_POINTER (TRUE));
+-
+- self->details->background_entire_width = entire_width;
+- self->details->background_entire_height = entire_height;
+-
+- return TRUE;
+-}
+-
+-static void
+-on_fade_finished (GnomeBGCrossfade *fade,
+- GdkWindow *window,
+- gpointer user_data)
+-{
+- NemoDesktopBackground *self = user_data;
+-
+- nemo_desktop_background_ensure_realized (self);
+- gnome_bg_set_surface_as_root (gdk_window_get_screen (window),
+- self->details->background_surface);
+-}
+-
+-static gboolean
+-fade_to_surface (NemoDesktopBackground *self,
+- GdkWindow *window,
+- cairo_surface_t *surface)
+-{
+- if (self->details->fade == NULL) {
+- return FALSE;
+- }
+-
+- if (!gnome_bg_crossfade_set_end_surface (self->details->fade,
+- surface)) {
+- return FALSE;
+- }
+-
+- if (!gnome_bg_crossfade_is_started (self->details->fade)) {
+- gnome_bg_crossfade_start (self->details->fade, window);
+- g_signal_connect (self->details->fade,
+- "finished",
+- G_CALLBACK (on_fade_finished), self);
+- }
+-
+- return gnome_bg_crossfade_is_started (self->details->fade);
+-}
+-
+-static void
+-nemo_desktop_background_set_up_widget (NemoDesktopBackground *self)
+-{
+- GdkWindow *window;
+- gboolean in_fade = FALSE;
+- GtkWidget *widget;
+-
+- widget = self->details->widget;
+-
+- if (!gtk_widget_get_realized (widget)) {
+- return;
+- }
+-
+- nemo_desktop_background_ensure_realized (self);
+- window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
+-
+- in_fade = fade_to_surface (self, window,
+- self->details->background_surface);
+-
+- if (!in_fade) {
+- cairo_pattern_t *pattern;
+-
+- pattern = cairo_pattern_create_for_surface (self->details->background_surface);
+- gdk_window_set_background_pattern (window, pattern);
+- cairo_pattern_destroy (pattern);
+-
+- gnome_bg_set_surface_as_root (gtk_widget_get_screen (widget),
+- self->details->background_surface);
+- }
+-}
+-
+-static gboolean
+-background_changed_cb (NemoDesktopBackground *self)
+-{
+- self->details->change_idle_id = 0;
+-
+- nemo_desktop_background_unrealize (self);
+- nemo_desktop_background_set_up_widget (self);
+-
+- gtk_widget_queue_draw (self->details->widget);
+-
+- return FALSE;
+-}
+-
+-static void
+-queue_background_change (NemoDesktopBackground *self)
+-{
+- if (self->details->change_idle_id != 0) {
+- g_source_remove (self->details->change_idle_id);
+- }
+-
+- self->details->change_idle_id =
+- g_idle_add ((GSourceFunc) background_changed_cb, self);
+-}
+-
+-static void
+-nemo_desktop_background_changed (GnomeBG *bg,
+- gpointer user_data)
+-{
+- NemoDesktopBackground *self;
+-
+- self = user_data;
+- init_fade (self);
+- queue_background_change (self);
+-}
+-
+-static void
+-nemo_desktop_background_transitioned (GnomeBG *bg,
+- gpointer user_data)
+-{
+- NemoDesktopBackground *self;
+-
+- self = user_data;
+- free_fade (self);
+- queue_background_change (self);
+-}
+-
+-static void
+-widget_realize_cb (GtkWidget *widget,
+- gpointer user_data)
+-{
+- GdkScreen *screen;
+- NemoDesktopBackground *self = user_data;
+-
+- screen = gtk_widget_get_screen (widget);
+-
+- if (self->details->screen_size_handler > 0) {
+- g_signal_handler_disconnect (screen,
+- self->details->screen_size_handler);
+- }
+- self->details->screen_size_handler =
+- g_signal_connect (screen, "size_changed",
+- G_CALLBACK (screen_size_changed), self);
+-
+- if (self->details->screen_monitors_handler > 0) {
+- g_signal_handler_disconnect (screen,
+- self->details->screen_monitors_handler);
+- }
+- self->details->screen_monitors_handler =
+- g_signal_connect (screen, "monitors-changed",
+- G_CALLBACK (screen_size_changed), self);
+- nemo_desktop_background_set_up_widget (self);
+-}
+-
+-static void
+-widget_unrealize_cb (GtkWidget *widget,
+- gpointer user_data)
+-{
+- NemoDesktopBackground *self = user_data;
+-
+- if (self->details->screen_size_handler > 0) {
+- g_signal_handler_disconnect (gtk_widget_get_screen (GTK_WIDGET (widget)),
+- self->details->screen_size_handler);
+- self->details->screen_size_handler = 0;
+- }
+- if (self->details->screen_monitors_handler > 0) {
+- g_signal_handler_disconnect (gtk_widget_get_screen (GTK_WIDGET (widget)),
+- self->details->screen_monitors_handler);
+- self->details->screen_monitors_handler = 0;
+- }
+-}
+-
+-static void
+-on_widget_destroyed (GtkWidget *widget,
+- gpointer user_data)
+-{
+- NemoDesktopBackground *self = user_data;
+-
+- if (self->details->change_idle_id != 0) {
+- g_source_remove (self->details->change_idle_id);
+- self->details->change_idle_id = 0;
+- }
+-
+- free_fade (self);
+- self->details->widget = NULL;
+-}
+-
+-static gboolean
+-background_change_event_idle_cb (NemoDesktopBackground *self)
+-{
+- gnome_bg_load_from_preferences (self->details->bg,
+- gnome_background_preferences);
+-
+- g_object_unref (self);
+-
+- return FALSE;
+-}
+-
+-static gboolean
+-background_settings_change_event_cb (GSettings *settings,
+- gpointer keys,
+- gint n_keys,
+- gpointer user_data)
+-{
+- NemoDesktopBackground *self = user_data;
+-
+- /* Need to defer signal processing otherwise
+- * we would make the dconf backend deadlock.
+- */
+- g_idle_add ((GSourceFunc) background_change_event_idle_cb,
+- g_object_ref (self));
+-
+- return FALSE;
+-}
+-
+-static void
+-nemo_desktop_background_constructed (GObject *obj)
+-{
+- NemoDesktopBackground *self;
+- GtkWidget *widget;
+-
+- self = NEMO_DESKTOP_BACKGROUND (obj);
+-
+- if (G_OBJECT_CLASS (nemo_desktop_background_parent_class)->constructed != NULL) {
+- G_OBJECT_CLASS (nemo_desktop_background_parent_class)->constructed (obj);
+- }
+-
+- widget = self->details->widget;
+-
+- g_assert (widget != NULL);
+-
+- g_signal_connect_object (widget, "destroy",
+- G_CALLBACK (on_widget_destroyed), self, 0);
+- g_signal_connect_object (widget, "realize",
+- G_CALLBACK (widget_realize_cb), self, 0);
+- g_signal_connect_object (widget, "unrealize",
+- G_CALLBACK (widget_unrealize_cb), self, 0);
+-
+- gnome_bg_load_from_preferences (self->details->bg,
+- gnome_background_preferences);
+-
+- /* Let's receive batch change events instead of every single one */
+- g_signal_connect (gnome_background_preferences,
+- "change-event",
+- G_CALLBACK (background_settings_change_event_cb),
+- self);
+-
+- queue_background_change (self);
+-}
+-
+-static void
+-nemo_desktop_background_set_property (GObject *object,
+- guint property_id,
+- const GValue *value,
+- GParamSpec *pspec)
+-{
+- NemoDesktopBackground *self;
+-
+- self = NEMO_DESKTOP_BACKGROUND (object);
+-
+- switch (property_id) {
+- case PROP_WIDGET:
+- self->details->widget = g_value_get_object (value);
+- break;
+- default:
+- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+- break;
+- }
+-}
+-
+-static GObject *
+-nemo_desktop_background_constructor (GType type,
+- guint n_construct_params,
+- GObjectConstructParam *construct_params)
+-{
+- GObject *retval;
+-
+- if (singleton != NULL) {
+- return g_object_ref (singleton);
+- }
+-
+- retval = G_OBJECT_CLASS (nemo_desktop_background_parent_class)->constructor
+- (type, n_construct_params, construct_params);
+-
+- singleton = NEMO_DESKTOP_BACKGROUND (retval);
+- g_object_add_weak_pointer (retval, (gpointer) &singleton);
+-
+- return retval;
+-}
+-
+-static void
+-nemo_desktop_background_class_init (NemoDesktopBackgroundClass *klass)
+-{
+- GObjectClass *object_class;
+- GParamSpec *pspec;
+-
+- object_class = G_OBJECT_CLASS (klass);
+- object_class->finalize = nemo_desktop_background_finalize;
+- object_class->set_property = nemo_desktop_background_set_property;
+- object_class->constructor = nemo_desktop_background_constructor;
+- object_class->constructed = nemo_desktop_background_constructed;
+-
+- pspec = g_param_spec_object ("widget", "The widget for this background",
+- "The widget that gets its background set",
+- NEMO_TYPE_ICON_CONTAINER,
+- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+- g_object_class_install_property (object_class, PROP_WIDGET, pspec);
+-
+- g_type_class_add_private (klass, sizeof (NemoDesktopBackgroundDetails));
+-}
+-
+-static void
+-nemo_desktop_background_init (NemoDesktopBackground *self)
+-{
+- self->details =
+- G_TYPE_INSTANCE_GET_PRIVATE (self,
+- NEMO_TYPE_DESKTOP_BACKGROUND,
+- NemoDesktopBackgroundDetails);
+-
+- self->details->bg = gnome_bg_new ();
+- self->details->default_color.red = 0xffff;
+- self->details->default_color.green = 0xffff;
+- self->details->default_color.blue = 0xffff;
+-
+- g_signal_connect (self->details->bg, "changed",
+- G_CALLBACK (nemo_desktop_background_changed), self);
+- g_signal_connect (self->details->bg, "transitioned",
+- G_CALLBACK (nemo_desktop_background_transitioned), self);
+-}
+-
+-NemoDesktopBackground *
+-nemo_desktop_background_new (NemoIconContainer *container)
+-{
+- return g_object_new (NEMO_TYPE_DESKTOP_BACKGROUND,
+- "widget", container,
+- NULL);
+-}
+diff --git a/libnemo-private/nemo-desktop-background.h b/libnemo-private/nemo-desktop-background.h
+deleted file mode 100644
+index 8755cb1..0000000
+--- a/libnemo-private/nemo-desktop-background.h
++++ /dev/null
+@@ -1,65 +0,0 @@
+-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+-
+-/*
+- * nemo-desktop-background.c: Helper object to handle desktop background
+- * changes.
+- *
+- * Copyright (C) 2000 Eazel, Inc.
+- * Copyright (C) 2010 Cosimo Cecchi <cosimoc@gnome.org>
+- *
+- * 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.
+- *
+- * Authors: Darin Adler <darin@bentspoon.com>
+- * Cosimo Cecchi <cosimoc@gnome.org>
+- */
+-
+-#ifndef __NAUTILIUS_DESKTOP_BACKGROUND_H__
+-#define __NAUTILIUS_DESKTOP_BACKGROUND_H__
+-
+-#include <gtk/gtk.h>
+-
+-#include "nemo-icon-container.h"
+-
+-typedef struct NemoDesktopBackground NemoDesktopBackground;
+-typedef struct NemoDesktopBackgroundClass NemoDesktopBackgroundClass;
+-
+-#define NEMO_TYPE_DESKTOP_BACKGROUND nemo_desktop_background_get_type()
+-#define NEMO_DESKTOP_BACKGROUND(obj) \
+- (G_TYPE_CHECK_INSTANCE_CAST ((obj), NEMO_TYPE_DESKTOP_BACKGROUND, NemoDesktopBackground))
+-#define NEMO_DESKTOP_BACKGROUND_CLASS(klass) \
+- (G_TYPE_CHECK_CLASS_CAST ((klass), NEMO_TYPE_DESKTOP_BACKGROUND, NemoDesktopBackgroundClass))
+-#define NEMO_IS_DESKTOP_BACKGROUND(obj) \
+- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NEMO_TYPE_DESKTOP_BACKGROUND))
+-#define NEMO_IS_DESKTOP_BACKGROUND_CLASS(klass) \
+- (G_TYPE_CHECK_CLASS_TYPE ((klass), NEMO_TYPE_DESKTOP_BACKGROUND))
+-#define NEMO_DESKTOP_BACKGROUND_GET_CLASS(obj) \
+- (G_TYPE_INSTANCE_GET_CLASS ((obj), NEMO_TYPE_DESKTOP_BACKGROUND, NemoDesktopBackgroundClass))
+-
+-GType nemo_desktop_background_get_type (void);
+-NemoDesktopBackground * nemo_desktop_background_new (NemoIconContainer *container);
+-
+-typedef struct NemoDesktopBackgroundDetails NemoDesktopBackgroundDetails;
+-
+-struct NemoDesktopBackground {
+- GObject parent;
+- NemoDesktopBackgroundDetails *details;
+-};
+-
+-struct NemoDesktopBackgroundClass {
+- GObjectClass parent_class;
+-};
+-
+-#endif /* __NAUTILIUS_DESKTOP_BACKGROUND_H__ */
+diff --git a/src/nemo-desktop-icon-view.c b/src/nemo-desktop-icon-view.c
+index 37cd8cb..5dec8b5 100644
+--- a/src/nemo-desktop-icon-view.c
++++ b/src/nemo-desktop-icon-view.c
+@@ -41,7 +41,6 @@
+ #include <fcntl.h>
+ #include <gdk/gdkx.h>
+ #include <glib/gi18n.h>
+-#include <libnemo-private/nemo-desktop-background.h>
+ #include <libnemo-private/nemo-desktop-icon-file.h>
+ #include <libnemo-private/nemo-directory-notify.h>
+ #include <libnemo-private/nemo-file-changes-queue.h>
+@@ -76,8 +75,6 @@ struct NemoDesktopIconViewDetails
+ gulong delayed_init_signal;
+ guint reload_desktop_timeout;
+ gboolean pending_rescan;
+-
+- NemoDesktopBackground *background;
+ };
+
+ static void default_zoom_level_changed (gpointer user_data);
+@@ -240,12 +237,6 @@ struct NemoDesktopIconViewDetails
+ return GDK_FILTER_CONTINUE;
+ }
+
+-static void
+-real_begin_loading (NemoView *object)
+-{
+- NEMO_VIEW_CLASS (nemo_desktop_icon_view_parent_class)->begin_loading (object);
+-}
+-
+ static const char *
+ real_get_id (NemoView *view)
+ {
+@@ -300,7 +291,6 @@ struct NemoDesktopIconViewDetails
+
+ G_OBJECT_CLASS (class)->dispose = nemo_desktop_icon_view_dispose;
+
+- vclass->begin_loading = real_begin_loading;
+ vclass->merge_menus = real_merge_menus;
+ vclass->update_menus = real_update_menus;
+ vclass->get_view_id = real_get_id;
+@@ -428,6 +418,17 @@ struct NemoDesktopIconViewDetails
+ desktop_icon_view);
+ }
+
++static void
++desktop_icon_container_realize (GtkWidget *widget,
++ NemoDesktopIconView *desktop_icon_view)
++{
++ GdkWindow *bin_window;
++ GdkRGBA transparent = { 0, 0, 0, 0 };
++
++ bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
++ gdk_window_set_background_rgba (bin_window, &transparent);
++}
++
+ static NemoZoomLevel
+ get_default_zoom_level (void)
+ {
+@@ -614,6 +615,8 @@ struct NemoDesktopIconViewDetails
+
+ g_signal_connect_object (icon_container, "middle_click",
+ G_CALLBACK (nemo_desktop_icon_view_handle_middle_click), desktop_icon_view, 0);
++ g_signal_connect_object (icon_container, "realize",
++ G_CALLBACK (desktop_icon_container_realize), desktop_icon_view, 0);
+ g_signal_connect_object (desktop_icon_view, "realize",
+ G_CALLBACK (realized_callback), desktop_icon_view, 0);
+ g_signal_connect_object (desktop_icon_view, "unrealize",
+@@ -637,9 +640,6 @@ struct NemoDesktopIconViewDetails
+ G_CALLBACK (nemo_view_update_menus),
+ desktop_icon_view);
+
+- GdkRGBA transparent = { 0, 0, 0, 0 };
+- gtk_widget_override_background_color (GTK_WIDGET (icon_container), GTK_STATE_FLAG_NORMAL, &transparent);
+-
+ have_cinnamon_settings = g_find_program_in_path ("cinnamon-settings") != NULL;
+ }
+
+--
+1.8.1.5
+
+
+From b40990397b6fff55878481a806a1b5574e43951f Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Mon, 15 Apr 2013 20:14:40 -0400
+Subject: [PATCH 3/4] Forgot an include
+
+---
+ libnemo-private/nemo-icon-dnd.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/libnemo-private/nemo-icon-dnd.c b/libnemo-private/nemo-icon-dnd.c
+index 017c6a7..2ed073c 100644
+--- a/libnemo-private/nemo-icon-dnd.c
++++ b/libnemo-private/nemo-icon-dnd.c
+@@ -52,7 +52,6 @@
+ #include <gtk/gtk.h>
+ #include <glib/gi18n.h>
+
+-#include <libnemo-private/nemo-desktop-background.h>
+ #include <libnemo-private/nemo-file-utilities.h>
+ #include <libnemo-private/nemo-file-changes-queue.h>
+ #include <stdio.h>
+--
+1.8.1.5
+
+
+From 020d4dc15fa9c0e1303cef7795e45e688ede7726 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Tue, 16 Apr 2013 18:00:01 -0400
+Subject: [PATCH 4/4] Change to use cinnamon background keys
+
+---
+ libnemo-private/nemo-global-preferences.c | 2 +-
+ libnemo-private/nemo-global-preferences.h | 2 +-
+ src/nemo-places-sidebar.c | 2 +-
+ src/nemo-view.c | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libnemo-private/nemo-global-preferences.c b/libnemo-private/nemo-global-preferences.c
+index d3ad20a..336afc3 100644
+--- a/libnemo-private/nemo-global-preferences.c
++++ b/libnemo-private/nemo-global-preferences.c
+@@ -76,7 +76,7 @@
+ nemo_desktop_preferences = g_settings_new("org.nemo.desktop");
+ nemo_tree_sidebar_preferences = g_settings_new("org.nemo.sidebar-panels.tree");
+ gnome_lockdown_preferences = g_settings_new("org.gnome.desktop.lockdown");
+- gnome_background_preferences = g_settings_new("org.gnome.desktop.background");
++ cinnamon_background_preferences = g_settings_new("org.cinnamon.background");
+ gnome_media_handling_preferences = g_settings_new("org.gnome.desktop.media-handling");
+ gnome_terminal_preferences = g_settings_new("org.gnome.desktop.default-applications.terminal");
+ }
+diff --git a/libnemo-private/nemo-global-preferences.h b/libnemo-private/nemo-global-preferences.h
+index 2b9c56a..c1ec61a 100644
+--- a/libnemo-private/nemo-global-preferences.h
++++ b/libnemo-private/nemo-global-preferences.h
+@@ -226,7 +226,7 @@ enum
+ GSettings *nemo_tree_sidebar_preferences;
+ GSettings *nemo_window_state;
+ GSettings *gnome_lockdown_preferences;
+-GSettings *gnome_background_preferences;
++GSettings *cinnamon_background_preferences;
+ GSettings *gnome_media_handling_preferences;
+ GSettings *gnome_terminal_preferences;
+
+diff --git a/src/nemo-places-sidebar.c b/src/nemo-places-sidebar.c
+index a0bc4d4..ca32193 100644
+--- a/src/nemo-places-sidebar.c
++++ b/src/nemo-places-sidebar.c
+@@ -3825,7 +3825,7 @@ static void expand_or_collapse_category (NemoPlacesSidebar *sidebar,
+ bookmarks_popup_menu_detach_cb,
+ sidebar);
+
+- g_signal_handlers_disconnect_by_func (gnome_background_preferences,
++ g_signal_handlers_disconnect_by_func (cinnamon_background_preferences,
+ desktop_setting_changed_callback,
+ sidebar);
+
+diff --git a/src/nemo-view.c b/src/nemo-view.c
+index ab03b44..3ece32a 100644
+--- a/src/nemo-view.c
++++ b/src/nemo-view.c
+@@ -6945,7 +6945,7 @@ static void slot_changed_pane (NemoWindowSlot *slot,
+
+ uri = nemo_file_info_get_uri (file);
+
+- g_settings_set_string (gnome_background_preferences,
++ g_settings_set_string (cinnamon_background_preferences,
+ "picture-uri", uri);
+ g_free (uri);
+ }
+--
+1.8.1.5
+
diff --git a/community/nemo/tracker-0.16.patch b/community/nemo/tracker-0.16.patch
new file mode 100644
index 000000000..49964678d
--- /dev/null
+++ b/community/nemo/tracker-0.16.patch
@@ -0,0 +1,33 @@
+From 88459a57ac2fcf06400ade5c6d0189bf1aa2334d Mon Sep 17 00:00:00 2001
+From: Nick Black <nick.black@sprezzatech.com>
+Date: Fri, 12 Apr 2013 17:10:46 -0400
+Subject: [PATCH] build with tracker 0.16
+
+---
+ configure.in | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index ec72f73..21afbe4 100644
+--- a/configure.in
++++ b/configure.in
+@@ -249,11 +249,13 @@ AC_ARG_ENABLE(tracker,
+
+ build_tracker=no
+ if test "x$enable_tracker" != "xno"; then
+- PKG_CHECK_MODULES(TRACKER, tracker-sparql-0.14,
++ PKG_CHECK_MODULES(TRACKER, tracker-sparql-0.16,
+ [build_tracker=yes],
+- [PKG_CHECK_MODULES(TRACKER, tracker-sparql-0.12,
++ [PKG_CHECK_MODULES(TRACKER, tracker-sparql-0.14,
++ [build_tracker=yes],
++ [PKG_CHECK_MODULES(TRACKER, tracker-sparql-0.12,
+ [build_tracker=yes],
+- [build_tracker=no])])
++ [build_tracker=no])])])
+ if test "x$build_tracker" = "xyes"; then
+ AC_DEFINE(ENABLE_TRACKER, 1, [Define to enable Tracker support])
+ fi
+--
+1.8.1.5
+
diff --git a/community/nemo/use-terminal-config.patch b/community/nemo/use-terminal-config.patch
deleted file mode 100644
index a6af75d48..000000000
--- a/community/nemo/use-terminal-config.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -Naur linuxmint-nemo-63f7b44.orig/libnemo-private/nemo-global-preferences.c linuxmint-nemo-63f7b44/libnemo-private/nemo-global-preferences.c
---- linuxmint-nemo-63f7b44.orig/libnemo-private/nemo-global-preferences.c 2013-02-19 17:30:18.000000000 +0100
-+++ linuxmint-nemo-63f7b44/libnemo-private/nemo-global-preferences.c 2013-03-04 04:05:13.472897136 +0100
-@@ -77,5 +77,6 @@
- nemo_tree_sidebar_preferences = g_settings_new("org.nemo.sidebar-panels.tree");
- gnome_lockdown_preferences = g_settings_new("org.gnome.desktop.lockdown");
- gnome_background_preferences = g_settings_new("org.gnome.desktop.background");
-- gnome_media_handling_preferences = g_settings_new("org.gnome.desktop.media-handling");
-+ gnome_media_handling_preferences = g_settings_new("org.gnome.desktop.media-handling");
-+ gnome_terminal_preferences = g_settings_new("org.gnome.desktop.default-applications.terminal");
- }
-diff -Naur linuxmint-nemo-63f7b44.orig/libnemo-private/nemo-global-preferences.h linuxmint-nemo-63f7b44/libnemo-private/nemo-global-preferences.h
---- linuxmint-nemo-63f7b44.orig/libnemo-private/nemo-global-preferences.h 2013-02-19 17:30:18.000000000 +0100
-+++ linuxmint-nemo-63f7b44/libnemo-private/nemo-global-preferences.h 2013-03-04 04:49:20.581767625 +0100
-@@ -211,6 +211,9 @@
- #define GNOME_DESKTOP_MEDIA_HANDLING_AUTOMOUNT_OPEN "automount-open"
- #define GNOME_DESKTOP_MEDIA_HANDLING_AUTORUN "autorun-never"
-
-+/* Terminal */
-+#define GNOME_DESKTOP_TERMINAL_EXEC "exec"
-+
- void nemo_global_preferences_init (void);
- char *nemo_global_preferences_get_default_folder_viewer_preference_as_iid (void);
-
-@@ -224,6 +227,7 @@
- GSettings *gnome_lockdown_preferences;
- GSettings *gnome_background_preferences;
- GSettings *gnome_media_handling_preferences;
-+GSettings *gnome_terminal_preferences;
-
- G_END_DECLS
-
-diff -Naur linuxmint-nemo-63f7b44.orig/src/nemo-view.c linuxmint-nemo-63f7b44/src/nemo-view.c
---- linuxmint-nemo-63f7b44.orig/src/nemo-view.c 2013-02-19 17:30:18.000000000 +0100
-+++ linuxmint-nemo-63f7b44/src/nemo-view.c 2013-03-04 04:14:47.222310992 +0100
-@@ -6716,7 +6716,8 @@
- open_in_terminal (gchar *location)
- {
- gchar *argv[2];
-- argv[0] = "x-terminal-emulator";
-+ argv[0] = g_settings_get_string (gnome_terminal_preferences,
-+ GNOME_DESKTOP_TERMINAL_EXEC);
- argv[1] = NULL;
- g_spawn_async(location, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
- }
diff --git a/community/notion/PKGBUILD b/community/notion/PKGBUILD
index 7baeaa3d5..a94cee35b 100644
--- a/community/notion/PKGBUILD
+++ b/community/notion/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 81125 2012-12-12 00:49:36Z eric $
+# $Id: PKGBUILD 88793 2013-04-22 10:31:24Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Eugen Zagorodniy e dot zagorodniy at gmail dot com
# Contributor: aunoor
pkgname=notion
-pkgver=20121114
+pkgver=20130422
pkgrel=1
pkgdesc="Tabbed tiling, window manager. Fork of Ion3"
url="http://sourceforge.net/projects/notion/"
@@ -16,51 +16,41 @@ makedepends=('git' 'pkgconfig' 'libxinerama' 'libxrandr'
'rubber' 'latex2html' 'texlive-htmlxml' 'texlive-latexextra')
provides=('libtu' 'libextl')
changelog=ChangleLog
-_gitroots=("git://notion.git.sourceforge.net/gitroot/notion/notion"
- "git://notion.git.sourceforge.net/gitroot/notion/libtu"
- "git://notion.git.sourceforge.net/gitroot/notion/libextl"
- "git://notion.git.sourceforge.net/gitroot/notion/notion-doc"
- "git://notion.git.sourceforge.net/gitroot/notion/mod_xinerama"
- "git://notion.git.sourceforge.net/gitroot/notion/mod_xkbevents"
- "git://notion.git.sourceforge.net/gitroot/notion/mod_xrandr"
- "git://notion.git.sourceforge.net/gitroot/notion/mod_notionflux"
- "git://notion.git.sourceforge.net/gitroot/notion/contrib")
-md5sums=()
-md5sums=()
+source=("git://notion.git.sourceforge.net/gitroot/notion/notion"
+ "git://notion.git.sourceforge.net/gitroot/notion/libtu"
+ "git://notion.git.sourceforge.net/gitroot/notion/libextl"
+ "git://notion.git.sourceforge.net/gitroot/notion/notion-doc"
+ "git://notion.git.sourceforge.net/gitroot/notion/mod_xinerama"
+ "git://notion.git.sourceforge.net/gitroot/notion/mod_xkbevents"
+ "git://notion.git.sourceforge.net/gitroot/notion/mod_xrandr"
+ "git://notion.git.sourceforge.net/gitroot/notion/mod_notionflux"
+ "git://notion.git.sourceforge.net/gitroot/notion/contrib")
+md5sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
build() {
cd ${srcdir}
- # git clone
- for _gitroot in ${_gitroots[@]}; do
- msg "Connecting to the git repository..."
- _gitname=`basename ${_gitroot}`
- if [ -d ${srcdir}/${_gitname} ]; then
- pushd ${srcdir}/${_gitname}
- git pull origin
- popd
- else
- git clone --depth 1 ${_gitroot}
- fi
- msg "GIT checkout done or server timeout"
- done
-
- # copy to notion-build
- rm -rf ${srcdir}/notion-build
- cp -r ${srcdir}/notion ${srcdir}/notion-build
for i in libextl libtu mod_xinerama mod_xkbevents mod_xrandr mod_notionflux notion-doc; do
- cp -r ${srcdir}/$i ${srcdir}/notion-build/
+ cp -r ${srcdir}/$i ${srcdir}/notion/
done
# build notion
- cd ${srcdir}/notion-build
+ cd ${srcdir}/notion
msg "Starting make..."
sed -e 's/^\(PREFIX=\).*$/\1\/usr/' \
-e 's/^\(ETCDIR=\).*$/\1\/etc\/notion/' \
-e 's/^\(LUA_DIR=\).*$/\1\/usr/' \
-e 's/^\(X11_PREFIX=\).*/\1\/usr/' \
-i system-autodetect.mk
- make INCLUDES=-I${srcdir}/notion-build
+ make INCLUDES=-I${srcdir}/notion
# build doc and modules
for i in mod_xinerama mod_xkbevents mod_xrandr; do
@@ -71,7 +61,7 @@ build() {
}
package() {
- cd ${srcdir}/notion-build
+ cd ${srcdir}/notion
# notion
make PREFIX=${pkgdir}/usr ETCDIR=${pkgdir}/etc/notion install
diff --git a/community/shotwell/PKGBUILD b/community/shotwell/PKGBUILD
index c196db66f..7726c625c 100644
--- a/community/shotwell/PKGBUILD
+++ b/community/shotwell/PKGBUILD
@@ -1,16 +1,16 @@
-# $Id: PKGBUILD 87716 2013-04-05 10:40:18Z spupykin $
+# $Id: PKGBUILD 88680 2013-04-21 22:16:49Z heftig $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Joeny Ang <ang(dot)joeny(at)gmail(dot)com>
pkgname=shotwell
pkgver=0.14.1
-pkgrel=1
+pkgrel=3
pkgdesc="A digital photo organizer designed for the GNOME desktop environment"
arch=('i686' 'x86_64')
url="http://yorba.org/shotwell/"
license=('LGPL2.1')
-depends=('libgee' 'libwebkit3' 'libgexiv2' 'libraw' 'rest'
+depends=('libgee06' 'libwebkit3' 'libgexiv2' 'libraw' 'rest'
'desktop-file-utils' 'dconf' 'hicolor-icon-theme' 'json-glib'
'gst-plugins-base' 'libgphoto2')
makedepends=('intltool' 'vala>=0.17.2' 'libunique3')
diff --git a/community/synapse/PKGBUILD b/community/synapse/PKGBUILD
index c54dbcd3a..c6a3accf1 100644
--- a/community/synapse/PKGBUILD
+++ b/community/synapse/PKGBUILD
@@ -1,22 +1,22 @@
-# $Id: PKGBUILD 81698 2012-12-27 01:23:31Z fyan $
+# $Id: PKGBUILD 88681 2013-04-21 22:16:50Z heftig $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Alessio Sergi <asergi at archlinux dot us>
pkgname=synapse
pkgver=0.2.10
-pkgrel=3
+pkgrel=5
pkgdesc="A semantic file launcher"
arch=('i686' 'x86_64')
url="https://launchpad.net/synapse-project"
license=('GPL3')
-depends=('gtkhotkey' 'hicolor-icon-theme' 'json-glib' 'libgee' 'libnotify' \
+depends=('gtkhotkey' 'hicolor-icon-theme' 'json-glib' 'libgee06' 'libnotify' \
'libunique' 'libzeitgeist' 'rest' 'xdg-utils')
makedepends=('intltool' 'vala')
optdepends=('banshee: banshee plugin'
'bc: calculator plugin'
'devhelp: documentation plugin'
'gnome-screensaver: screensaver plugin'
- 'gnome-utils: dictionary plugin'
+ 'gnome-dictionary: dictionary plugin'
'openssh: ssh plugin'
'pastebinit: pastebin plugin'
'rhythmbox: rhythmbox plugin'
diff --git a/community/ubuntuone-client-gnome/PKGBUILD b/community/ubuntuone-client-gnome/PKGBUILD
index d3cbd7d1a..c1c9c1c7b 100644
--- a/community/ubuntuone-client-gnome/PKGBUILD
+++ b/community/ubuntuone-client-gnome/PKGBUILD
@@ -1,24 +1,29 @@
-# $Id: PKGBUILD 87514 2013-04-02 00:47:12Z bgyorgy $
+# $Id: PKGBUILD 88682 2013-04-21 22:16:52Z heftig $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
pkgname=ubuntuone-client-gnome
pkgver=4.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="Some plug-ins, extensions, and data for integrating Ubuntu One features in some core parts of GNOME"
arch=('i686' 'x86_64')
url="https://launchpad.net/ubuntuone-client-gnome"
license=('GPL')
depends=('nautilus' 'gconf' 'ubuntuone-client')
makedepends=('intltool' 'gnome-settings-daemon')
-optdepends=('gnome-settings-daemon: shows a warning when Ubuntu One runs out of space')
options=('!libtool')
install=$pkgname.install
-source=(https://launchpad.net/ubuntuone-client-gnome/stable-4-2/$pkgver/+download/$pkgname-$pkgver.tar.gz)
-md5sums=('e2f5e4ef6f4eca6ffcf838b3aa46c3ef')
+source=(https://launchpad.net/ubuntuone-client-gnome/stable-4-2/$pkgver/+download/$pkgname-$pkgver.tar.gz
+ disable-gsd-plugin.patch)
+md5sums=('e2f5e4ef6f4eca6ffcf838b3aa46c3ef'
+ 'e2b1b677844c3b61530f3653808b6644')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ # Disable gsd plugin, as it's not compatible with gnome-settings-daemon 3.8
+ patch -Np1 -i "$srcdir/disable-gsd-plugin.patch"
+
+ autoreconf -fi
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--disable-static --disable-schemas-compile
make
diff --git a/community/ubuntuone-client-gnome/disable-gsd-plugin.patch b/community/ubuntuone-client-gnome/disable-gsd-plugin.patch
new file mode 100644
index 000000000..2199536e2
--- /dev/null
+++ b/community/ubuntuone-client-gnome/disable-gsd-plugin.patch
@@ -0,0 +1,21 @@
+diff -Naur ubuntuone-client-gnome-4.2.0.orig/configure.ac ubuntuone-client-gnome-4.2.0/configure.ac
+--- ubuntuone-client-gnome-4.2.0.orig/configure.ac 2013-03-26 20:48:40.000000000 +0100
++++ ubuntuone-client-gnome-4.2.0/configure.ac 2013-04-09 22:26:38.135983473 +0200
+@@ -5,7 +5,7 @@
+ AC_CONFIG_SRCDIR([config.h.in])
+
+ AM_INIT_AUTOMAKE([1.10 foreign])
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+
+ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
+diff -Naur ubuntuone-client-gnome-4.2.0.orig/Makefile.am ubuntuone-client-gnome-4.2.0/Makefile.am
+--- ubuntuone-client-gnome-4.2.0.orig/Makefile.am 2013-03-21 18:13:58.000000000 +0100
++++ ubuntuone-client-gnome-4.2.0/Makefile.am 2013-04-09 22:22:05.109626589 +0200
+@@ -1,4 +1,4 @@
+-SUBDIRS = gsd nautilus po
++SUBDIRS = nautilus po
+
+ # Shut libtoolize up
+ ACLOCAL_AMFLAGS = -I m4
diff --git a/community/virtualbox-modules-lts/PKGBUILD b/community/virtualbox-modules-lts/PKGBUILD
index dd6ecae95..4dba9fb7f 100644
--- a/community/virtualbox-modules-lts/PKGBUILD
+++ b/community/virtualbox-modules-lts/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 88157 2013-04-12 15:58:47Z seblu $
+# $Id: PKGBUILD 88762 2013-04-22 09:40:39Z tpowa $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Sébastien Luttringer
@@ -6,7 +6,7 @@
pkgbase=virtualbox-modules-lts
pkgname=('virtualbox-host-modules-lts' 'virtualbox-guest-modules-lts')
pkgver=4.2.12
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
diff --git a/community/virtualbox-modules/PKGBUILD b/community/virtualbox-modules/PKGBUILD
index 3941dbe84..7d2e3f867 100644
--- a/community/virtualbox-modules/PKGBUILD
+++ b/community/virtualbox-modules/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 88161 2013-04-12 16:17:46Z seblu $
+# $Id: PKGBUILD 88763 2013-04-22 09:42:07Z tpowa $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Sébastien Luttringer
pkgbase=virtualbox-modules
pkgname=('virtualbox-host-modules' 'virtualbox-guest-modules')
pkgver=4.2.12
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
diff --git a/community/xdebug/PKGBUILD b/community/xdebug/PKGBUILD
index 505bd2f59..d35adfd72 100644
--- a/community/xdebug/PKGBUILD
+++ b/community/xdebug/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 88528 2013-04-19 10:32:46Z spupykin $
+# $Id: PKGBUILD 88795 2013-04-22 10:32:02Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Jonathan Wiersma <arch aur at jonw dot org>
# Contributor: Jonathan Wiersma <arch aur at jonw dot org>
@@ -6,7 +6,7 @@
pkgname=xdebug
pkgver=2.2.2
-pkgrel=1
+pkgrel=2
pkgdesc="PHP debugging extension"
arch=('i686' 'x86_64')
url="http://www.xdebug.org"
@@ -22,8 +22,6 @@ md5sums=('5687bca6270b9668721090d780c7c966'
'68de800943369d4c76bdf7eb35c8463b')
build() {
- local PHPVER=`php -r 'echo phpversion();'`
-
cd $srcdir/$pkgname-$pkgver
phpize
./configure --prefix=/usr --enable-xdebug
@@ -35,12 +33,14 @@ build() {
}
package() {
+ local PHPVER=`php -r 'echo phpversion();'`
+
cd $srcdir/$pkgname-$pkgver/debugclient
make DESTDIR=$pkgdir install
cd $srcdir/$pkgname-$pkgver
if [ "$PHPVER" \< "5.3.0" ] ; then
- install -D -m 744 modules/xdebug.so $pkgdir/usr/lib/php/xdebug.so
+ install -D -m 744 modules/xdebug.so $pkgdir/usr/lib/php/modules/xdebug.so
install -D -m 644 $srcdir/xdebug-5.2.ini $pkgdir/etc/php/conf.d/xdebug.ini
else
install -D -m 744 modules/xdebug.so $pkgdir/usr/lib/php/modules/xdebug.so
diff --git a/community/xsettings-client/PKGBUILD b/community/xsettings-client/PKGBUILD
index afef330ad..d314d7aa4 100644
--- a/community/xsettings-client/PKGBUILD
+++ b/community/xsettings-client/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 65273 2012-02-20 12:44:47Z spupykin $
+# $Id: PKGBUILD 88791 2013-04-22 10:19:12Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Alois Belaska <lloyd@centrum.cz>
@@ -11,12 +11,16 @@ license=('GPL')
url="http://matchbox-project.org"
depends=('libx11')
options=('!libtool')
-source=(http://matchbox-project.org/sources/optional-dependencies/Xsettings-client-$pkgver.tar.gz)
+source=(http://downloads.yoctoproject.org/releases/matchbox/optional-dependencies/Xsettings-client-$pkgver.tar.gz)
md5sums=('c14aa9db6c097e0306dac97fb7da1add')
build() {
cd $srcdir/Xsettings-client-$pkgver
./configure --prefix=/usr
make
+}
+
+package() {
+ cd $srcdir/Xsettings-client-$pkgver
make DESTDIR=$pkgdir install
}
diff --git a/community/zeitgeist-datahub/PKGBUILD b/community/zeitgeist-datahub/PKGBUILD
deleted file mode 100644
index 535899a65..000000000
--- a/community/zeitgeist-datahub/PKGBUILD
+++ /dev/null
@@ -1,29 +0,0 @@
-# $Id: PKGBUILD 79124 2012-10-30 23:06:48Z heftig $
-# Maintainer: Balló György <ballogyor+arch at gmail dot com>
-# Contributor: Leontius Adhika Pradhana <leon@leapon.net>
-# Contributor: Ner0
-
-pkgname=zeitgeist-datahub
-pkgver=0.9.5
-pkgrel=2
-pkgdesc="Provides passive plugins which insert events into Zeitgeist"
-arch=('i686' 'x86_64')
-url="https://launchpad.net/zeitgeist-datahub"
-license=('GPL3')
-depends=('libzeitgeist' 'json-glib' 'gtk2' 'telepathy-glib' 'zeitgeist')
-makedepends=('intltool' 'vala')
-source=(http://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz)
-md5sums=('b2b76b82b67363c45e5fe4f39a172775')
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
- make
-}
-
-package() {
- cd "$srcdir/$pkgname-$pkgver"
-
- make DESTDIR="$pkgdir/" install
-}