From d1d93fafb9ef98fdd0c9a5a486c179c03cbbfb33 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 23 Apr 2013 01:16:16 -0700 Subject: Tue Apr 23 01:16:16 PDT 2013 --- community/gnome-settings-daemon-compat/PKGBUILD | 61 +++ .../draw-background-unconditionally.patch | 162 ++++++++ .../flashback-rename.patch | 18 + .../remove-libgsd-dependency.patch | 160 ++++++++ .../sessionisactive-port.patch | 73 ++++ .../standalone-background-helper.patch | 437 +++++++++++++++++++++ 6 files changed, 911 insertions(+) create mode 100644 community/gnome-settings-daemon-compat/PKGBUILD create mode 100644 community/gnome-settings-daemon-compat/draw-background-unconditionally.patch create mode 100644 community/gnome-settings-daemon-compat/flashback-rename.patch create mode 100644 community/gnome-settings-daemon-compat/remove-libgsd-dependency.patch create mode 100644 community/gnome-settings-daemon-compat/sessionisactive-port.patch create mode 100644 community/gnome-settings-daemon-compat/standalone-background-helper.patch (limited to 'community/gnome-settings-daemon-compat') 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 +# Contributor: Jan Alexander Steffens (heftig) + +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 + #include + +-#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 + #include + +-#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 +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 @@ + + + +- + + + +@@ -45,18 +44,6 @@ + <_summary>Priority to use for this plugin + <_description>Priority to use for this plugin in gnome-settings-daemon startup queue + +- +- +- +- true +- <_summary>Activation of this plugin +- <_description>Whether this plugin would be activated by gnome-settings-daemon or not +- +- +- 97 +- <_summary>Priority to use for this plugin +- <_description>Priority to use for this plugin in gnome-settings-daemon startup queue +- + + + +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 ++ */ ++ ++#include "config.h" ++ ++#include ++#include ++#include ++#include ++ ++#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 +- * +- * 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 +-#include +- +-#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 +- * +- * 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 +-#include +-#include +- +-#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 -- cgit v1.2.3-54-g00ecf