diff --git a/srcpkgs/gnome-settings-daemon-compat/patches/draw-background-unconditionally.patch b/srcpkgs/gnome-settings-daemon-compat/patches/draw-background-unconditionally.patch new file mode 100644 index 0000000000..c279420de6 --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/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/srcpkgs/gnome-settings-daemon-compat/patches/move-desktop-file.patch b/srcpkgs/gnome-settings-daemon-compat/patches/move-desktop-file.patch new file mode 100644 index 0000000000..fe92727676 --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/move-desktop-file.patch @@ -0,0 +1,60 @@ +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-04-24 23:13:10.169941000 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/automount/gnome-fallback-mount-helper.desktop.in.in 2013-04-24 23:13:41.064001562 +0200 +@@ -9,4 +9,3 @@ + 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/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-04-24 23:13:12.830004000 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/automount/Makefile.am 2013-04-24 23:13:36.613896914 +0200 +@@ -21,7 +21,7 @@ + $(SYSTEMD_LIBS) \ + $(AUTOMOUNT_LIBS) + +-autostartdir = $(sysconfdir)/xdg/autostart ++autostartdir = $(datadir)/applications + autostart_in_files = gnome-fallback-mount-helper.desktop.in + autostart_in_in_files = gnome-fallback-mount-helper.desktop.in.in + autostart_DATA = $(autostart_in_files:.desktop.in=.desktop) +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-24 23:13:07.229872000 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/background/gnome-fallback-background-helper.desktop.in.in 2013-04-24 23:13:43.670729520 +0200 +@@ -9,4 +9,3 @@ + 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/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-24 23:13:04.913151000 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/background/Makefile.am 2013-04-24 23:13:47.907495798 +0200 +@@ -17,7 +17,7 @@ + $(SETTINGS_PLUGIN_LIBS) \ + $(BACKGROUND_LIBS) + +-autostartdir = $(sysconfdir)/xdg/autostart ++autostartdir = $(datadir)/applications + 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) +diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in gnome-settings-daemon-3.6.4/plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in 2013-04-24 23:12:58.579668000 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in 2013-04-24 23:13:51.747586073 +0200 +@@ -9,4 +9,3 @@ + 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/media-keys/Makefile.am gnome-settings-daemon-3.6.4/plugins/media-keys/Makefile.am +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/Makefile.am 2013-04-24 23:13:02.026416000 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/Makefile.am 2013-04-24 23:13:54.570985777 +0200 +@@ -75,7 +75,7 @@ + $(MEDIA_KEYS_LIBS) \ + -lm + +-autostartdir = $(sysconfdir)/xdg/autostart ++autostartdir = $(datadir)/applications + autostart_in_files = gnome-fallback-media-keys-helper.desktop.in + autostart_in_in_files = gnome-fallback-media-keys-helper.desktop.in.in + autostart_DATA = $(autostart_in_files:.desktop.in=.desktop) diff --git a/srcpkgs/gnome-settings-daemon-compat/patches/remove-libgsd-dependency.patch b/srcpkgs/gnome-settings-daemon-compat/patches/remove-libgsd-dependency.patch new file mode 100644 index 0000000000..b843ac2ce1 --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/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/srcpkgs/gnome-settings-daemon-compat/patches/revert-input-sources.patch b/srcpkgs/gnome-settings-daemon-compat/patches/revert-input-sources.patch new file mode 100644 index 0000000000..dc769de4ea --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/revert-input-sources.patch @@ -0,0 +1,123 @@ +From cc45fec342713745f391533a202976e97670f9e5 Mon Sep 17 00:00:00 2001 +From: Rui Matos +Date: Wed, 12 Dec 2012 09:31:40 +0000 +Subject: Revert "media-keys: Add key bindings to switch input sources" + +These are now provided by gnome-shell. + +This reverts commit fc58c347900f906e304591135ca6c13d9950ab4d. + +https://bugzilla.gnome.org/show_bug.cgi?id=690106 +--- +diff --git a/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in.in +index b56b5d1..25e5f3e 100644 +--- a/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in.in ++++ b/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in.in +@@ -175,16 +175,6 @@ + <_summary>Magnifier zoom out + <_description>Binding for the magnifier to zoom out + +- +- '' +- <_summary>Switch input source +- <_description>Binding to select the next input source +- +- +- '' +- <_summary>Switch input source backward +- <_description>Binding to select the previous input source +- + + + +diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c +index e5977d0..cd6fbc2 100644 +--- a/plugins/media-keys/gsd-media-keys-manager.c ++++ b/plugins/media-keys/gsd-media-keys-manager.c +@@ -98,10 +98,6 @@ static const gchar introspection_xml[] = + #define VOLUME_STEP 6 /* percents for one volume button press */ + #define MAX_VOLUME 65536.0 + +-#define GNOME_DESKTOP_INPUT_SOURCES_DIR "org.gnome.desktop.input-sources" +-#define KEY_CURRENT_INPUT_SOURCE "current" +-#define KEY_INPUT_SOURCES "sources" +- + #define GSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_MEDIA_KEYS_MANAGER, GsdMediaKeysManagerPrivate)) + + typedef struct { +@@ -1807,40 +1803,6 @@ do_keyboard_brightness_action (GsdMediaKeysManager *manager, + } + + static void +-do_switch_input_source_action (GsdMediaKeysManager *manager, +- MediaKeyType type) +-{ +- GSettings *settings; +- GVariant *sources; +- gint i, n; +- +- settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR); +- sources = g_settings_get_value (settings, KEY_INPUT_SOURCES); +- +- n = g_variant_n_children (sources); +- if (n < 2) +- goto out; +- +- i = g_settings_get_uint (settings, KEY_CURRENT_INPUT_SOURCE); +- +- if (type == SWITCH_INPUT_SOURCE_KEY) +- i += 1; +- else +- i -= 1; +- +- if (i < 0) +- i = n - 1; +- else if (i >= n) +- i = 0; +- +- g_settings_set_uint (settings, KEY_CURRENT_INPUT_SOURCE, i); +- +- out: +- g_variant_unref (sources); +- g_object_unref (settings); +-} +- +-static void + do_custom_action (GsdMediaKeysManager *manager, + MediaKey *key, + gint64 timestamp) +@@ -1999,10 +1961,6 @@ do_action (GsdMediaKeysManager *manager, + case BATTERY_KEY: + do_execute_desktop (manager, "gnome-power-statistics.desktop", timestamp); + break; +- case SWITCH_INPUT_SOURCE_KEY: +- case SWITCH_INPUT_SOURCE_BACKWARD_KEY: +- do_switch_input_source_action (manager, type); +- break; + /* Note, no default so compiler catches missing keys */ + case CUSTOM_KEY: + g_assert_not_reached (); +diff --git a/plugins/media-keys/shortcuts-list.h b/plugins/media-keys/shortcuts-list.h +index a16d0e7..437ed2c 100644 +--- a/plugins/media-keys/shortcuts-list.h ++++ b/plugins/media-keys/shortcuts-list.h +@@ -80,8 +80,6 @@ typedef enum { + KEYBOARD_BRIGHTNESS_DOWN_KEY, + KEYBOARD_BRIGHTNESS_TOGGLE_KEY, + BATTERY_KEY, +- SWITCH_INPUT_SOURCE_KEY, +- SWITCH_INPUT_SOURCE_BACKWARD_KEY, + CUSTOM_KEY + } MediaKeyType; + +@@ -148,8 +146,6 @@ static struct { + { KEYBOARD_BRIGHTNESS_UP_KEY, NULL, "XF86KbdBrightnessUp" }, + { KEYBOARD_BRIGHTNESS_DOWN_KEY, NULL, "XF86KbdBrightnessDown" }, + { KEYBOARD_BRIGHTNESS_TOGGLE_KEY, NULL, "XF86KbdLightOnOff" }, +- { SWITCH_INPUT_SOURCE_KEY, "switch-input-source", NULL }, +- { SWITCH_INPUT_SOURCE_BACKWARD_KEY, "switch-input-source-backward", NULL }, + { BATTERY_KEY, NULL, "XF86Battery" }, + }; + +-- +cgit v0.9.1 diff --git a/srcpkgs/gnome-settings-daemon-compat/patches/series b/srcpkgs/gnome-settings-daemon-compat/patches/series new file mode 100644 index 0000000000..007cc2ae33 --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/series @@ -0,0 +1,8 @@ +standalone-background-helper.patch +standalone-media-keys-helper.patch +draw-background-unconditionally.patch +sessionisactive-port.patch +revert-input-sources.patch +xinput.patch +remove-libgsd-dependency.patch +move-desktop-file.patch diff --git a/srcpkgs/gnome-settings-daemon-compat/patches/sessionisactive-port.patch b/srcpkgs/gnome-settings-daemon-compat/patches/sessionisactive-port.patch new file mode 100644 index 0000000000..dc5fd260e6 --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/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/srcpkgs/gnome-settings-daemon-compat/patches/standalone-background-helper.patch b/srcpkgs/gnome-settings-daemon-compat/patches/standalone-background-helper.patch new file mode 100644 index 0000000000..b52de042ff --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/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 ++_Comment=Background plugin ++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/background/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/background/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/srcpkgs/gnome-settings-daemon-compat/patches/standalone-media-keys-helper.patch b/srcpkgs/gnome-settings-daemon-compat/patches/standalone-media-keys-helper.patch new file mode 100644 index 0000000000..61be1737ef --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/standalone-media-keys-helper.patch @@ -0,0 +1,564 @@ +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-04-24 03:11:02.893859531 +0200 ++++ gnome-settings-daemon-3.6.4/data/org.gnome.settings-daemon.plugins.gschema.xml.in.in 2013-04-24 13:43:11.128884064 +0200 +@@ -9,7 +9,6 @@ + + + +- + + + +diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gnome-fallback-media-keys-helper.c gnome-settings-daemon-3.6.4/plugins/media-keys/gnome-fallback-media-keys-helper.c +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gnome-fallback-media-keys-helper.c 1970-01-01 01:00:00.000000000 +0100 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/gnome-fallback-media-keys-helper.c 2013-04-24 13:43:11.132217470 +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-media-keys-manager.h" ++ ++int ++main (int argc, ++ char **argv) ++{ ++ GMainLoop *loop; ++ GsdMediaKeysManager *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_media_keys_manager_new (); ++ ++ gsd_media_keys_manager_start (manager, &error); ++ ++ if (error != NULL) { ++ g_printerr ("Unable to start the media-keys manager: %s", ++ error->message); ++ ++ g_error_free (error); ++ _exit (1); ++ } ++ ++ g_main_loop_run (loop); ++ ++ gsd_media_keys_manager_stop (manager); ++ g_main_loop_unref (loop); ++ ++ return 0; ++} +diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in gnome-settings-daemon-3.6.4/plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in 1970-01-01 01:00:00.000000000 +0100 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in 2013-04-24 13:43:11.132217470 +0200 +@@ -0,0 +1,12 @@ ++[Desktop Entry] ++_Name=Media keys ++_Comment=Media keys plugin ++Exec=@LIBEXECDIR@/gnome-fallback-media-keys-helper ++Icon=multimedia ++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/media-keys/gsd-media-keys-manager.c gnome-settings-daemon-3.6.4/plugins/media-keys/gsd-media-keys-manager.c +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gsd-media-keys-manager.c 2013-01-10 14:37:58.000000000 +0100 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/gsd-media-keys-manager.c 2013-04-24 13:43:11.132217470 +0200 +@@ -44,7 +44,6 @@ + #include + #endif + +-#include "gnome-settings-profile.h" + #include "gsd-marshal.h" + #include "gsd-media-keys-manager.h" + +@@ -622,8 +621,6 @@ + char **custom_paths; + int i; + +- gnome_settings_profile_start (NULL); +- + gdk_error_trap_push (); + + manager->priv->keys = g_ptr_array_new_with_free_func ((GDestroyNotify) media_key_free); +@@ -661,8 +658,6 @@ + gdk_flush (); + if (gdk_error_trap_pop ()) + g_warning ("Grab failed for some keys, another application may already have access the them."); +- +- gnome_settings_profile_end (NULL); + } + + static void +@@ -2090,7 +2085,6 @@ + char *theme_name; + + g_debug ("Starting media_keys manager"); +- gnome_settings_profile_start (NULL); + + manager->priv->settings = g_settings_new (SETTINGS_BINDING_DIR); + g_signal_connect (G_OBJECT (manager->priv->settings), "changed", +@@ -2137,19 +2131,14 @@ + + /* Start filtering the events */ + for (l = manager->priv->screens; l != NULL; l = l->next) { +- gnome_settings_profile_start ("gdk_window_add_filter"); +- + g_debug ("adding key filter for screen: %d", + gdk_screen_get_number (l->data)); + + gdk_window_add_filter (gdk_screen_get_root_window (l->data), + (GdkFilterFunc) filter_key_events, + manager); +- gnome_settings_profile_end ("gdk_window_add_filter"); + } + +- gnome_settings_profile_end (NULL); +- + manager->priv->start_idle_id = 0; + + return FALSE; +@@ -2161,8 +2150,6 @@ + { + const char * const subsystems[] = { "input", "usb", "sound", NULL }; + +- gnome_settings_profile_start (NULL); +- + if (supports_xinput2_devices (&manager->priv->opcode) == FALSE) { + g_debug ("No Xinput2 support, disabling plugin"); + return TRUE; +@@ -2179,8 +2166,6 @@ + * The rest (grabbing and setting the keys) can happen in an + * idle. + */ +- gnome_settings_profile_start ("gvc_mixer_control_new"); +- + manager->priv->volume = gvc_mixer_control_new ("GNOME Volume Control Media Keys"); + + g_signal_connect (manager->priv->volume, +@@ -2198,14 +2183,10 @@ + + gvc_mixer_control_open (manager->priv->volume); + +- gnome_settings_profile_end ("gvc_mixer_control_new"); +- + manager->priv->start_idle_id = g_idle_add ((GSourceFunc) start_media_keys_idle_cb, manager); + + register_manager (manager_object); + +- gnome_settings_profile_end (NULL); +- + return TRUE; + } + +diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gsd-media-keys-plugin.c gnome-settings-daemon-3.6.4/plugins/media-keys/gsd-media-keys-plugin.c +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gsd-media-keys-plugin.c 2013-01-10 14:37:58.000000000 +0100 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/gsd-media-keys-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-media-keys-plugin.h" +-#include "gsd-media-keys-manager.h" +- +-struct GsdMediaKeysPluginPrivate { +- GsdMediaKeysManager *manager; +-}; +- +-#define GSD_MEDIA_KEYS_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_MEDIA_KEYS_PLUGIN, GsdMediaKeysPluginPrivate)) +- +-GNOME_SETTINGS_PLUGIN_REGISTER (GsdMediaKeysPlugin, gsd_media_keys_plugin) +- +-static void +-gsd_media_keys_plugin_init (GsdMediaKeysPlugin *plugin) +-{ +- plugin->priv = GSD_MEDIA_KEYS_PLUGIN_GET_PRIVATE (plugin); +- +- g_debug ("GsdMediaKeysPlugin initializing"); +- +- plugin->priv->manager = gsd_media_keys_manager_new (); +-} +- +-static void +-gsd_media_keys_plugin_finalize (GObject *object) +-{ +- GsdMediaKeysPlugin *plugin; +- +- g_return_if_fail (object != NULL); +- g_return_if_fail (GSD_IS_MEDIA_KEYS_PLUGIN (object)); +- +- g_debug ("GsdMediaKeysPlugin finalizing"); +- +- plugin = GSD_MEDIA_KEYS_PLUGIN (object); +- +- g_return_if_fail (plugin->priv != NULL); +- +- if (plugin->priv->manager != NULL) { +- g_object_unref (plugin->priv->manager); +- } +- +- G_OBJECT_CLASS (gsd_media_keys_plugin_parent_class)->finalize (object); +-} +- +-static void +-impl_activate (GnomeSettingsPlugin *plugin) +-{ +- gboolean res; +- GError *error; +- +- g_debug ("Activating media_keys plugin"); +- +- error = NULL; +- res = gsd_media_keys_manager_start (GSD_MEDIA_KEYS_PLUGIN (plugin)->priv->manager, &error); +- if (! res) { +- g_warning ("Unable to start media_keys manager: %s", error->message); +- g_error_free (error); +- } +-} +- +-static void +-impl_deactivate (GnomeSettingsPlugin *plugin) +-{ +- g_debug ("Deactivating media_keys plugin"); +- gsd_media_keys_manager_stop (GSD_MEDIA_KEYS_PLUGIN (plugin)->priv->manager); +-} +- +-static void +-gsd_media_keys_plugin_class_init (GsdMediaKeysPluginClass *klass) +-{ +- GObjectClass *object_class = G_OBJECT_CLASS (klass); +- GnomeSettingsPluginClass *plugin_class = GNOME_SETTINGS_PLUGIN_CLASS (klass); +- +- object_class->finalize = gsd_media_keys_plugin_finalize; +- +- plugin_class->activate = impl_activate; +- plugin_class->deactivate = impl_deactivate; +- +- g_type_class_add_private (klass, sizeof (GsdMediaKeysPluginPrivate)); +-} +diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gsd-media-keys-plugin.h gnome-settings-daemon-3.6.4/plugins/media-keys/gsd-media-keys-plugin.h +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/gsd-media-keys-plugin.h 2013-01-10 14:37:58.000000000 +0100 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/gsd-media-keys-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_MEDIA_KEYS_PLUGIN_H__ +-#define __GSD_MEDIA_KEYS_PLUGIN_H__ +- +-#include +-#include +-#include +- +-#include "gnome-settings-plugin.h" +- +-G_BEGIN_DECLS +- +-#define GSD_TYPE_MEDIA_KEYS_PLUGIN (gsd_media_keys_plugin_get_type ()) +-#define GSD_MEDIA_KEYS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_MEDIA_KEYS_PLUGIN, GsdMediaKeysPlugin)) +-#define GSD_MEDIA_KEYS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_MEDIA_KEYS_PLUGIN, GsdMediaKeysPluginClass)) +-#define GSD_IS_MEDIA_KEYS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_MEDIA_KEYS_PLUGIN)) +-#define GSD_IS_MEDIA_KEYS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_MEDIA_KEYS_PLUGIN)) +-#define GSD_MEDIA_KEYS_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_MEDIA_KEYS_PLUGIN, GsdMediaKeysPluginClass)) +- +-typedef struct GsdMediaKeysPluginPrivate GsdMediaKeysPluginPrivate; +- +-typedef struct +-{ +- GnomeSettingsPlugin parent; +- GsdMediaKeysPluginPrivate *priv; +-} GsdMediaKeysPlugin; +- +-typedef struct +-{ +- GnomeSettingsPluginClass parent_class; +-} GsdMediaKeysPluginClass; +- +-GType gsd_media_keys_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_MEDIA_KEYS_PLUGIN_H__ */ +diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/media-keys/Makefile.am gnome-settings-daemon-3.6.4/plugins/media-keys/Makefile.am +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/Makefile.am 2013-01-10 14:37:58.000000000 +0100 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/Makefile.am 2013-04-24 14:26:01.414463895 +0200 +@@ -1,17 +1,11 @@ + icondir = $(datadir)/icons/hicolor + context = actions + +-plugin_name = media-keys +- +-NULL = +- + SUBDIRS = cut-n-paste +-plugin_LTLIBRARIES = libmedia-keys.la + + BUILT_SOURCES = \ + gsd-marshal.h \ +- gsd-marshal.c \ +- $(NULL) ++ gsd-marshal.c + + gsd-marshal.c: gsd-marshal.list + $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=gsd_marshal $< --header --body --internal > $@ +@@ -19,62 +13,16 @@ + gsd-marshal.h: gsd-marshal.list + $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=gsd_marshal $< --header --internal > $@ + +-libmedia_keys_la_SOURCES = \ +- gsd-media-keys-plugin.h \ +- gsd-media-keys-plugin.c \ +- gsd-media-keys-manager.h \ +- gsd-media-keys-manager.c \ +- gsd-osd-window.c \ +- gsd-osd-window.h \ +- gsd-osd-window-private.h \ +- shortcuts-list.h \ +- $(BUILT_SOURCES) \ +- $(NULL) +- +-libmedia_keys_la_CPPFLAGS = \ +- -I$(top_srcdir)/data/ \ +- -I$(top_srcdir)/gnome-settings-daemon \ +- -I$(top_srcdir)/plugins/common \ +- -I$(top_srcdir)/plugins/media-keys/cut-n-paste \ +- -DBINDIR=\"$(bindir)\" \ +- -DPIXMAPDIR=\""$(pkgdatadir)"\" \ +- -DGTKBUILDERDIR=\""$(pkgdatadir)"\" \ +- -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \ +- $(AM_CPPFLAGS) +- +-libmedia_keys_la_CFLAGS = \ +- $(PLUGIN_CFLAGS) \ +- $(SETTINGS_PLUGIN_CFLAGS) \ +- $(MEDIA_KEYS_CFLAGS) \ +- $(AM_CFLAGS) +- +-libmedia_keys_la_LDFLAGS = \ +- $(GSD_PLUGIN_LDFLAGS) +- +-libmedia_keys_la_LIBADD = \ +- $(top_builddir)/plugins/common/libcommon.la \ +- $(top_builddir)/plugins/media-keys/cut-n-paste/libgvc.la \ +- $(MEDIA_KEYS_LIBS) \ +- $(SETTINGS_PLUGIN_LIBS) \ +- -lm +- +-plugin_in_files = \ +- media-keys.gnome-settings-plugin.in +- +-plugin_DATA = $(plugin_in_files:.gnome-settings-plugin.in=.gnome-settings-plugin) +- + noinst_PROGRAMS = test-media-window + + test_media_window_SOURCES = \ + gsd-osd-window.c \ + gsd-osd-window.h \ + gsd-osd-window-private.h \ +- test-media-window.c \ +- $(NULL) ++ test-media-window.c + + test_media_window_CPPFLAGS = \ + -I$(top_srcdir)/data/ \ +- -I$(top_srcdir)/gnome-settings-daemon \ + -I$(top_srcdir)/plugins/common \ + -I$(top_srcdir)/plugins/media-keys/cut-n-paste \ + -DDATADIR=\""$(datadir)"\" \ +@@ -93,21 +41,19 @@ + $(SETTINGS_PLUGIN_LIBS) \ + -lm + +-libexec_PROGRAMS = gsd-test-media-keys ++libexec_PROGRAMS = gnome-fallback-media-keys-helper + +-gsd_test_media_keys_SOURCES = \ ++gnome_fallback_media_keys_helper_SOURCES = \ + gsd-media-keys-manager.c \ + gsd-media-keys-manager.h \ + gsd-osd-window.c \ + gsd-osd-window.h \ + gsd-osd-window-private.h \ +- test-media-keys.c \ +- $(BUILT_SOURCES) \ +- $(NULL) ++ gnome-fallback-media-keys-helper.c \ ++ $(BUILT_SOURCES) + +-gsd_test_media_keys_CPPFLAGS = \ ++gnome_fallback_media_keys_helper_CPPFLAGS = \ + -I$(top_srcdir)/data/ \ +- -I$(top_srcdir)/gnome-settings-daemon \ + -I$(top_srcdir)/plugins/common \ + -I$(top_srcdir)/plugins/media-keys/cut-n-paste \ + -DBINDIR=\"$(bindir)\" \ +@@ -116,14 +62,12 @@ + -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \ + $(AM_CPPFLAGS) + +-gsd_test_media_keys_CFLAGS = \ ++gnome_fallback_media_keys_helper_CFLAGS = \ + $(PLUGIN_CFLAGS) \ + $(SETTINGS_PLUGIN_CFLAGS) \ +- $(MEDIA_KEYS_CFLAGS) \ +- $(AM_CFLAGS) ++ $(MEDIA_KEYS_CFLAGS) + +-gsd_test_media_keys_LDADD = \ +- $(top_builddir)/gnome-settings-daemon/libgsd.la \ ++gnome_fallback_media_keys_helper_LDADD = \ + $(top_builddir)/plugins/common/libcommon.la \ + $(top_builddir)/plugins/media-keys/cut-n-paste/libgvc.la \ + $(SETTINGS_DAEMON_LIBS) \ +@@ -131,17 +75,24 @@ + $(MEDIA_KEYS_LIBS) \ + -lm + ++autostartdir = $(sysconfdir)/xdg/autostart ++autostart_in_files = gnome-fallback-media-keys-helper.desktop.in ++autostart_in_in_files = gnome-fallback-media-keys-helper.desktop.in.in ++autostart_DATA = $(autostart_in_files:.desktop.in=.desktop) ++ ++$(autostart_in_files): $(autostart_in_in_files) ++ @sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@ ++ ++@INTLTOOL_DESKTOP_RULE@ ++ + EXTRA_DIST = \ + gsd-marshal.list \ + README.media-keys-API \ + test-media-window-clutter.c \ +- $(plugin_in_files) ++ $(autostart_in_in_files) + + CLEANFILES = \ + $(BUILT_SOURCES) \ +- $(plugin_DATA) +- +-DISTCLEANFILES = \ +- $(plugin_DATA) ++ $(autostart_DATA) \ ++ $(autostart_in_files) + +-@GSD_INTLTOOL_PLUGIN_RULE@ +diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/media-keys/media-keys.gnome-settings-plugin.in gnome-settings-daemon-3.6.4/plugins/media-keys/media-keys.gnome-settings-plugin.in +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/media-keys.gnome-settings-plugin.in 2012-04-07 15:21:20.000000000 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/media-keys.gnome-settings-plugin.in 1970-01-01 01:00:00.000000000 +0100 +@@ -1,8 +0,0 @@ +-[GNOME Settings Plugin] +-Module=media-keys +-IAge=0 +-_Name=Media keys +-_Description=Media keys plugin +-Authors= +-Copyright=Copyright © 2007 +-Website= +diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/media-keys/test-media-keys.c gnome-settings-daemon-3.6.4/plugins/media-keys/test-media-keys.c +--- gnome-settings-daemon-3.6.4.orig/plugins/media-keys/test-media-keys.c 2012-06-01 22:02:53.000000000 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/media-keys/test-media-keys.c 1970-01-01 01:00:00.000000000 +0100 +@@ -1,7 +0,0 @@ +-#define NEW gsd_media_keys_manager_new +-#define START gsd_media_keys_manager_start +-#define STOP gsd_media_keys_manager_stop +-#define MANAGER GsdMediaKeysManager +-#include "gsd-media-keys-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-04-24 03:11:02.897192946 +0200 ++++ gnome-settings-daemon-3.6.4/po/POTFILES.in 2013-04-24 13:43:11.132217470 +0200 +@@ -34,7 +34,7 @@ + [type: gettext/ini]plugins/keyboard/keyboard.gnome-settings-plugin.in + plugins/media-keys/cut-n-paste/gvc-mixer-control.c + plugins/media-keys/gsd-media-keys-manager.c +-[type: gettext/ini]plugins/media-keys/media-keys.gnome-settings-plugin.in ++plugins/media-keys/gnome-fallback-media-keys-helper.desktop.in.in + plugins/mouse/gsd-mouse-manager.c + [type: gettext/ini]plugins/mouse/mouse.gnome-settings-plugin.in + plugins/power/gpm-common.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 2013-04-24 03:11:02.897192946 +0200 ++++ gnome-settings-daemon-3.6.4/po/POTFILES.skip 2013-04-24 13:43:11.132217470 +0200 +@@ -22,5 +22,6 @@ + data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in + plugins/background/gnome-fallback-background-helper.desktop.in + plugins/automount/gnome-fallback-mount-helper.desktop.in ++plugins/media-keys/gnome-fallback-media-keys-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/srcpkgs/gnome-settings-daemon-compat/patches/xinput.patch b/srcpkgs/gnome-settings-daemon-compat/patches/xinput.patch new file mode 100644 index 0000000000..67c8082cbb --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/patches/xinput.patch @@ -0,0 +1,36 @@ +From 14f92b1479aa065edf3f0aa86b87d4c4ff1fe2ba Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Thu, 07 Feb 2013 04:14:22 +0000 +Subject: Fix media-keys handling with GTK+ 3.7.8 + +GDK now requests XI 2.3 and if the X server supports that +version, subsequent requests for a lower version yield +a BadValue. Therefore, we need to change the code in +gsd-input-helper.c to request 2.3 as well. +--- +diff --git a/plugins/common/gsd-input-helper.c b/plugins/common/gsd-input-helper.c +index 54427af..d5d2a2a 100644 +--- a/plugins/common/gsd-input-helper.c ++++ b/plugins/common/gsd-input-helper.c +@@ -144,18 +144,11 @@ supports_xinput2_devices (int *opcode) + gdk_error_trap_push (); + + major = 2; +- minor = 0; ++ minor = 3; + + if (XIQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor) != Success) { + gdk_error_trap_pop_ignored (); +- /* try for 2.2, maybe gtk has already announced 2.2 support */ +- gdk_error_trap_push (); +- major = 2; +- minor = 2; +- if (XIQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor) != Success) { +- gdk_error_trap_pop_ignored (); + return FALSE; +- } + } + gdk_error_trap_pop_ignored (); + +-- +cgit v0.9.1 diff --git a/srcpkgs/gnome-settings-daemon-compat/template b/srcpkgs/gnome-settings-daemon-compat/template new file mode 100644 index 0000000000..5ff1bd1d8c --- /dev/null +++ b/srcpkgs/gnome-settings-daemon-compat/template @@ -0,0 +1,42 @@ +# Template file for 'gnome-settings-daemon-compat' +pkgname=gnome-settings-daemon-compat +version=3.6.4 +revision=1 +patch_args="-Np1" +wrksrc="gnome-settings-daemon-${version}" +hostmakedepends="pkg-config automake libtool intltool gettext-devel libxslt docbook-xsl" +makedepends="glib-devel gtk+3-devel gsettings-desktop-schemas-devel + gnome-settings-daemon-devel gnome-desktop-devel lcms2-devel upower-devel + libnotify-devel ibus-devel pulseaudio-devel libcanberra-devel + colord-devel libgudev-devel libwacom-devel cups-devel systemd-devel" +short_desc="GNOME settings daemon compatibility package for the gnome flashback session" +maintainer="Juan RP " +homepage="https://live.gnome.org/GnomeFlashback" +license="GPL-3" +distfiles="${GNOME_SITE}/gnome-settings-daemon/3.6/gnome-settings-daemon-$version.tar.xz" +checksum=3db993f2dbabc0c9d06a309bb12c9a7104b9cdda414ac4b1c301f5114a441c15 + +do_configure() { + autoreconf -fi + ./configure ${configure_args} --disable-static --enable-systemd +} + +do_build() { + make ${makejobs} -C plugins/common + make ${makejobs} -C plugins/automount + make ${makejobs} -C plugins/background + make ${makejobs} -C plugins/media-keys +} + +do_install() { + make -C plugins/automount DESTDIR=${DESTDIR} install + make -C plugins/background DESTDIR=${DESTDIR} install + make -C plugins/media-keys DESTDIR=${DESTDIR} install +} + +gnome-settings-daemon-compat_package() { + depends="gnome-settings-daemon" + pkg_install() { + vmove all + } +}