From 0d7ab04a19d80e715d23248cc19e184d7e19bf4e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 27 Sep 2013 12:30:49 +0200 Subject: [PATCH] Remove cinnamon and required deps (ENOTIME/ENOPOWER to maintain it). --- .../cinnamon/patches/fallback-helpers.patch | 20 - .../patches/fix-control-center-check.patch | 12 - srcpkgs/cinnamon/patches/gnome-3.8.patch | 4186 ----------------- srcpkgs/cinnamon/patches/idle-dim.patch | 35 - .../cinnamon/patches/keyboard_applet.patch | 142 - .../patches/switch-applications.patch | 31 - srcpkgs/cinnamon/template | 61 - .../draw-background-unconditionally.patch | 162 - .../patches/move-desktop-file.patch | 60 - .../patches/remove-libgsd-dependency.patch | 160 - .../patches/revert-input-sources.patch | 123 - .../patches/series | 8 - .../patches/sessionisactive-port.patch | 73 - .../standalone-background-helper.patch | 437 -- .../standalone-media-keys-helper.patch | 564 --- .../patches/xinput.patch | 36 - srcpkgs/gnome-settings-daemon-compat/template | 43 - srcpkgs/libmuffin | 1 - srcpkgs/libmuffin-devel | 1 - srcpkgs/muffin/template | 51 - 20 files changed, 6206 deletions(-) delete mode 100644 srcpkgs/cinnamon/patches/fallback-helpers.patch delete mode 100644 srcpkgs/cinnamon/patches/fix-control-center-check.patch delete mode 100644 srcpkgs/cinnamon/patches/gnome-3.8.patch delete mode 100644 srcpkgs/cinnamon/patches/idle-dim.patch delete mode 100644 srcpkgs/cinnamon/patches/keyboard_applet.patch delete mode 100644 srcpkgs/cinnamon/patches/switch-applications.patch delete mode 100644 srcpkgs/cinnamon/template delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/draw-background-unconditionally.patch delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/move-desktop-file.patch delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/remove-libgsd-dependency.patch delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/revert-input-sources.patch delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/series delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/sessionisactive-port.patch delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/standalone-background-helper.patch delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/standalone-media-keys-helper.patch delete mode 100644 srcpkgs/gnome-settings-daemon-compat/patches/xinput.patch delete mode 100644 srcpkgs/gnome-settings-daemon-compat/template delete mode 120000 srcpkgs/libmuffin delete mode 120000 srcpkgs/libmuffin-devel delete mode 100644 srcpkgs/muffin/template diff --git a/srcpkgs/cinnamon/patches/fallback-helpers.patch b/srcpkgs/cinnamon/patches/fallback-helpers.patch deleted file mode 100644 index b6810cdbae5..00000000000 --- a/srcpkgs/cinnamon/patches/fallback-helpers.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon2d.session linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon2d.session ---- linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon2d.session 2013-04-15 15:55:01.000000000 +0200 -+++ linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon2d.session 2013-04-25 01:30:35.435650613 +0200 -@@ -1,5 +1,5 @@ - [GNOME Session] - Name=Cinnamon (Software Rendering) --RequiredComponents=cinnamon2d;gnome-settings-daemon; -+RequiredComponents=cinnamon2d;gnome-settings-daemon;gnome-fallback-media-keys-helper;gnome-fallback-mount-helper; - DesktopName=GNOME - -diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon.session linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon.session ---- linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon.session 2013-04-15 15:55:01.000000000 +0200 -+++ linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon.session 2013-04-25 01:30:33.645607769 +0200 -@@ -1,5 +1,5 @@ - [GNOME Session] - Name=Cinnamon --RequiredComponents=cinnamon;gnome-settings-daemon; -+RequiredComponents=cinnamon;gnome-settings-daemon;gnome-fallback-media-keys-helper;gnome-fallback-mount-helper; - DesktopName=GNOME - diff --git a/srcpkgs/cinnamon/patches/fix-control-center-check.patch b/srcpkgs/cinnamon/patches/fix-control-center-check.patch deleted file mode 100644 index 981b1c1a543..00000000000 --- a/srcpkgs/cinnamon/patches/fix-control-center-check.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur cinnamon-1.7.1.orig/files/usr/bin/cinnamon-settings cinnamon-1.7.1/files/usr/bin/cinnamon-settings ---- cinnamon-1.7.1.orig/files/usr/bin/cinnamon-settings 2013-02-21 17:23:45.000000000 +0100 -+++ cinnamon-1.7.1/files/usr/bin/cinnamon-settings 2013-03-03 03:03:24.151209998 +0100 -@@ -7,7 +7,7 @@ - if os.path.exists("/usr/lib/cinnamon-settings/modules/cs_%s.py" % module): - print "Python module" - os.execvp("/usr/lib/cinnamon-settings/cinnamon-settings.py", ("",) + tuple(sys.argv[1:])) -- elif os.path.exists("/usr/bin/cinnamon-control-center"): -+ elif os.path.exists("/usr/lib/cinnamon-control-center-1/panels"): - print "Unknown module %s, using cinnamon-control-center" % module - os.execvp("/usr/lib/cinnamon-settings/cinnamon-settings.py", ("",) + tuple(sys.argv[1:])) - elif os.path.exists("/usr/bin/gnome-control-center"): \ No newline at end of file diff --git a/srcpkgs/cinnamon/patches/gnome-3.8.patch b/srcpkgs/cinnamon/patches/gnome-3.8.patch deleted file mode 100644 index b79ea497af1..00000000000 --- a/srcpkgs/cinnamon/patches/gnome-3.8.patch +++ /dev/null @@ -1,4186 +0,0 @@ -From 2ba97ed278777fcb96b86cd58e9176536585ad2d Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Fri, 19 Apr 2013 13:19:50 -0400 -Subject: [PATCH 01/16] Disable XInput on cinnamon startup (for 3.8 compat) - This has no effect on < 1.14 clutter - ---- - src/main.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/main.c b/src/main.c -index 418fb60..ac90d91 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -260,6 +260,7 @@ - meta_plugin_type_register (gnome_cinnamon_plugin_get_type ()); - - /* Prevent meta_init() from causing gtk to load gail and at-bridge */ -+ g_setenv ("CLUTTER_DISABLE_XINPUT", "1", TRUE); - g_setenv ("NO_GAIL", "1", TRUE); - g_setenv ("NO_AT_BRIDGE", "1", TRUE); - meta_init (); --- -1.8.1.6 - - -From 72133f97fbd99c78169cec49e18b97da3edba524 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Fri, 19 Apr 2013 13:21:40 -0400 -Subject: [PATCH 02/16] Explain change - ---- - src/main.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/main.c b/src/main.c -index ac90d91..9d37975 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -257,10 +257,12 @@ - - g_option_context_free (ctx); - -+ /* Disable XInput extension - required for 3.8 compatibility */ -+ g_setenv ("CLUTTER_DISABLE_XINPUT", "1", TRUE); -+ - meta_plugin_type_register (gnome_cinnamon_plugin_get_type ()); - - /* Prevent meta_init() from causing gtk to load gail and at-bridge */ -- g_setenv ("CLUTTER_DISABLE_XINPUT", "1", TRUE); - g_setenv ("NO_GAIL", "1", TRUE); - g_setenv ("NO_AT_BRIDGE", "1", TRUE); - meta_init (); --- -1.8.1.6 - - -From 28210e29e3e0d81c68320b9511574a168f5779e4 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Tue, 16 Apr 2013 17:01:30 -0400 -Subject: [PATCH 03/16] Add backgroundManager - this is needed for gnome 3.8 - compatibility, as gnome-settings-daemon no longer handles the desktop - background. - ---- - configure.ac | 7 +- - data/org.cinnamon.gschema.xml.in | 71 +++- - .../cinnamon-settings/modules/cs_backgrounds.py | 31 +- - js/ui/main.js | 3 +- - src/Makefile.am | 2 + - src/cinnamon-background-manager.c | 411 +++++++++++++++++++++ - src/cinnamon-background-manager.h | 57 +++ - 7 files changed, 562 insertions(+), 20 deletions(-) - create mode 100644 src/cinnamon-background-manager.c - create mode 100644 src/cinnamon-background-manager.h - -diff --git a/configure.ac b/configure.ac -index 0aa47c5..a2a9479 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -68,6 +68,7 @@ GTK_MIN_VERSION=3.0.0 - GIO_MIN_VERSION=2.29.10 - POLKIT_MIN_VERSION=0.100 - STARTUP_NOTIFICATION_MIN_VERSION=0.11 -+GNOME_DESKTOP_MIN_VERSION=3.0.0 - - # Collect more than 20 libraries for a prize! - PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $GIO_MIN_VERSION -@@ -82,7 +83,8 @@ PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $GIO_MIN_VERSION - gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION - libcanberra - polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes -- libnm-glib libnm-util gnome-keyring-1) -+ libnm-glib libnm-util gnome-keyring-1 -+ gnome-desktop-3.0 >= GNOME_DESKTOP_MIN_VERSION) - - PKG_CHECK_MODULES(CINNAMON_PERF_HELPER, gtk+-3.0 gio-2.0) - -@@ -106,7 +108,8 @@ AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier) - CFLAGS=$saved_CFLAGS - LIBS=$saved_LIBS - --PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 gnome-desktop-3.0 >= 2.90.0 x11) -+PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 -+ gnome-desktop-3.0 >= GNOME_DESKTOP_MIN_VERSION x11) - PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-3.0) - PKG_CHECK_MODULES(TRAY, gtk+-3.0) - PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0) -diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in -index f12f8c5..939ea70 100644 ---- a/data/org.cinnamon.gschema.xml.in -+++ b/data/org.cinnamon.gschema.xml.in -@@ -746,6 +746,23 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - "wallpaper" -@@ -776,8 +793,60 @@ - This key defines the delay for the slideshow. - - -+ -+ true -+ <_summary>Draw Desktop Background -+ <_description>Have GNOME draw the desktop background. -+ -+ -+ 'zoom' -+ <_summary>Picture Options -+ <_description> -+ Determines how the image set by wallpaper_filename is rendered. -+ Possible values are "none", "wallpaper", "centered", "scaled", -+ "stretched", "zoom", "spanned". -+ -+ -+ -+ 'file://@datadir@/themes/Adwaita/backgrounds/adwaita-timed.xml' -+ <_summary>Picture URI -+ <_description> -+ URI to use for the background image. Not that the backend only supports -+ local (file://) URIs. -+ -+ -+ -+ -+ 100 -+ <_summary>Picture Opacity -+ <_description> -+ Opacity with which to draw the background picture. -+ -+ -+ -+ '#023c88' -+ <_summary>Primary Color -+ <_description> -+ Left or Top color when drawing gradients, or the solid color. -+ -+ -+ -+ '#5789ca' -+ <_summary>Secondary Color -+ <_description> -+ Right or Bottom color when drawing gradients, not used for solid color. -+ -+ -+ -+ 'solid' -+ <_summary>Color Shading Type -+ <_description> -+ How to shade the background color. Possible values are "horizontal", -+ "vertical", and "solid". -+ -+ - -- -+ - - - "" ---- linuxmint-Cinnamon-a464dc9.orig/files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py 2013-04-30 18:01:56.000000000 +0200 -+++ linuxmint-Cinnamon-a464dc9/files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py 2013-04-30 23:36:46.718385152 +0200 -@@ -232,11 +232,11 @@ - - - class BackgroundWallpaperPane (Gtk.VBox): -- def __init__(self, sidepage, gnome_background_schema): -+ def __init__(self, sidepage, cinnamon_background_schema): - Gtk.VBox.__init__(self) - self.set_spacing(5) - -- self._gnome_background_schema = gnome_background_schema -+ self._cinnamon_background_schema = cinnamon_background_schema - self._sidepage = sidepage - - scw = Gtk.ScrolledWindow() -@@ -263,15 +263,15 @@ - if wallpaper: - for key in wallpaper: - if key == "filename": -- self._gnome_background_schema.set_string("picture-uri", "file://" + wallpaper[key]) -+ self._cinnamon_background_schema.set_string("picture-uri", "file://" + wallpaper[key]) - elif key == "pcolor": -- self._gnome_background_schema.set_string("primary-color", wallpaper[key]) -+ self._cinnamon_background_schema.set_string("primary-color", wallpaper[key]) - elif key == "scolor": -- self._gnome_background_schema.set_string("secondary-color", wallpaper[key]) -+ self._cinnamon_background_schema.set_string("secondary-color", wallpaper[key]) - elif key == "shade_type": -- self._gnome_background_schema.set_string("color-shading-type", wallpaper[key]) -+ self._cinnamon_background_schema.set_string("color-shading-type", wallpaper[key]) - elif key == "options": -- self._gnome_background_schema.set_string("picture-options", wallpaper[key]) -+ self._cinnamon_background_schema.set_string("picture-options", wallpaper[key]) - if (not "metadataFile" in wallpaper) or (wallpaper["metadataFile"] == ""): - self._sidepage.remove_wallpaper_button.set_sensitive(True) - -@@ -445,12 +445,11 @@ - f = open(filename, "w") - f.write(xml_data) - f.close() -- Gio.Settings("org.gnome.desktop.background").set_string("picture-uri", "file://" + filename) -+ Gio.Settings("org.cinnamon.background").set_string("picture-uri", "file://" + filename) - - class BackgroundSidePage (SidePage): - def __init__(self, name, icon, keywords, advanced, content_box): - SidePage.__init__(self, name, icon, keywords, advanced, content_box, -1) -- self._gnome_background_schema = Gio.Settings("org.gnome.desktop.background") - self._cinnamon_background_schema = Gio.Settings("org.cinnamon.background") - self._add_wallpapers_dialog = AddWallpapersDialog() - -@@ -515,8 +514,8 @@ - self.mainbox.set_visible_window(False) - self.content_box.pack_start(self.mainbox, True, True, 3) - -- self.wallpaper_pane = BackgroundWallpaperPane(self, self._gnome_background_schema) -- self.slideshow_pane = BackgroundSlideshowPane(self, self._gnome_background_schema, self._cinnamon_background_schema) -+ self.wallpaper_pane = BackgroundWallpaperPane(self, self._cinnamon_background_schema) -+ self.slideshow_pane = BackgroundSlideshowPane(self, self._cinnamon_background_schema, self._cinnamon_background_schema) - if self._cinnamon_background_schema["mode"] == "slideshow": - self.mainbox.add(self.slideshow_pane) - else: -@@ -536,21 +535,21 @@ - l = Gtk.Label(_("Picture aspect")) - l.set_alignment(0, 0.5) - advanced_options_box.pack_start(l, False, False, 0) -- self.picture_options = GSettingsComboBox("", "org.gnome.desktop.background", "picture-options", None, BACKGROUND_PICTURE_OPTIONS) -+ self.picture_options = GSettingsComboBox("", "org.cinnamon.background", "picture-options", None, BACKGROUND_PICTURE_OPTIONS) - advanced_options_box.pack_start(self.picture_options, False, False, 0) - - l = Gtk.Label(_("Gradient")) - l.set_alignment(0, 0.5) - advanced_options_box.pack_start(l, False, False, 0) -- self.color_shading_type = GSettingsComboBox("", "org.gnome.desktop.background", "color-shading-type", None, BACKGROUND_COLOR_SHADING_TYPES) -+ self.color_shading_type = GSettingsComboBox("", "org.cinnamon.background", "color-shading-type", None, BACKGROUND_COLOR_SHADING_TYPES) - advanced_options_box.pack_start(self.color_shading_type, False, False, 0) - - hbox = Gtk.HBox() - l = Gtk.Label(_("Colors")) - hbox.pack_start(l, False, False, 2) -- self.primary_color = GSettingsColorChooser("org.gnome.desktop.background", "primary-color", None) -+ self.primary_color = GSettingsColorChooser("org.cinnamon.background", "primary-color", None) - hbox.pack_start(self.primary_color, False, False, 2) -- self.secondary_color = GSettingsColorChooser("org.gnome.desktop.background", "secondary-color", None) -+ self.secondary_color = GSettingsColorChooser("org.cinnamon.background", "secondary-color", None) - hbox.pack_start(self.secondary_color, False, False, 2) - advanced_options_box.pack_start(hbox, False, False, 0) - self.content_box.show_all() - -diff --git a/js/ui/main.js b/js/ui/main.js -index 74154ab..99aee95 100644 ---- a/js/ui/main.js -+++ b/js/ui/main.js -@@ -86,6 +86,7 @@ let _cssStylesheet = null; - let dynamicWorkspaces = null; - let nWorks = null; - let tracker = null; -+let backgroundManager = null; - let desktopShown; - - let workspace_names = []; -@@ -214,7 +215,7 @@ function start() { - // be predictable anyways. - tracker = Cinnamon.WindowTracker.get_default(); - Cinnamon.AppUsage.get_default(); -- -+ backgroundManager = Cinnamon.BackgroundManager.get_default(); - // The stage is always covered so Clutter doesn't need to clear it; however - // the color is used as the default contents for the Muffin root background - // actor so set it anyways. -diff --git a/src/Makefile.am b/src/Makefile.am -index 3bab29c..6bac83c 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -105,6 +105,7 @@ cinnamon_public_headers_h = \ - cinnamon-app-system.h \ - cinnamon-app-usage.h \ - cinnamon-arrow.h \ -+ cinnamon-background-manager.h \ - cinnamon-doc-system.h \ - cinnamon-embedded-window.h \ - cinnamon-generic-container.h \ -@@ -142,6 +143,7 @@ libcinnamon_la_SOURCES = \ - cinnamon-app-system.c \ - cinnamon-app-usage.c \ - cinnamon-arrow.c \ -+ cinnamon-background-manager.c \ - cinnamon-doc-system.c \ - cinnamon-embedded-window.c \ - cinnamon-generic-container.c \ -diff --git a/src/cinnamon-background-manager.c b/src/cinnamon-background-manager.c -new file mode 100644 -index 0000000..9d95250 ---- /dev/null -+++ b/src/cinnamon-background-manager.c -@@ -0,0 +1,411 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- -+ * -+ * Copyright © 2001 Ximian, Inc. -+ * Copyright (C) 2007 William Jon McCann -+ * Copyright 2007 Red Hat, Inc. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ */ -+ -+#include "config.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#define GNOME_DESKTOP_USE_UNSTABLE_API -+#include -+#include -+ -+#include "cinnamon-background-manager.h" -+ -+#define CINNAMON_BACKGROUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CINNAMON_TYPE_BACKGROUND_MANAGER, CinnamonBackgroundManagerPrivate)) -+ -+struct CinnamonBackgroundManagerPrivate -+{ -+ GSettings *settings; -+ GnomeBG *bg; -+ -+ GnomeBGCrossfade *fade; -+ -+ GDBusProxy *proxy; -+ guint proxy_signal_id; -+}; -+ -+static void cinnamon_background_manager_class_init (CinnamonBackgroundManagerClass *klass); -+static void cinnamon_background_manager_init (CinnamonBackgroundManager *background_manager); -+static void cinnamon_background_manager_finalize (GObject *object); -+ -+static void setup_bg (CinnamonBackgroundManager *manager); -+static void connect_screen_signals (CinnamonBackgroundManager *manager); -+ -+G_DEFINE_TYPE (CinnamonBackgroundManager, cinnamon_background_manager, G_TYPE_OBJECT) -+ -+static gpointer manager_object = NULL; -+ -+static gboolean -+dont_draw_background (CinnamonBackgroundManager *manager) -+{ -+ return !g_settings_get_boolean (manager->priv->settings, -+ "draw-background"); -+} -+ -+static void -+on_crossfade_finished (CinnamonBackgroundManager *manager) -+{ -+ g_object_unref (manager->priv->fade); -+ manager->priv->fade = NULL; -+} -+ -+static void -+draw_background (CinnamonBackgroundManager *manager, -+ gboolean use_crossfade) -+{ -+ GdkDisplay *display; -+ int n_screens; -+ int i; -+ -+ display = gdk_display_get_default (); -+ n_screens = gdk_display_get_n_screens (display); -+ -+ for (i = 0; i < n_screens; ++i) { -+ GdkScreen *screen; -+ GdkWindow *root_window; -+ cairo_surface_t *surface; -+ -+ screen = gdk_display_get_screen (display, i); -+ -+ root_window = gdk_screen_get_root_window (screen); -+ -+ surface = gnome_bg_create_surface (manager->priv->bg, -+ root_window, -+ gdk_screen_get_width (screen), -+ gdk_screen_get_height (screen), -+ TRUE); -+ -+ if (use_crossfade) { -+ -+ if (manager->priv->fade != NULL) { -+ g_object_unref (manager->priv->fade); -+ } -+ -+ manager->priv->fade = gnome_bg_set_surface_as_root_with_crossfade (screen, surface); -+ g_signal_connect_swapped (manager->priv->fade, "finished", -+ G_CALLBACK (on_crossfade_finished), -+ manager); -+ } else { -+ gnome_bg_set_surface_as_root (screen, surface); -+ } -+ -+ cairo_surface_destroy (surface); -+ } -+} -+ -+static void -+on_bg_transitioned (GnomeBG *bg, -+ CinnamonBackgroundManager *manager) -+{ -+ draw_background (manager, FALSE); -+} -+ -+static gboolean -+settings_change_event_cb (GSettings *settings, -+ gpointer keys, -+ gint n_keys, -+ CinnamonBackgroundManager *manager) -+{ -+ gnome_bg_load_from_preferences (manager->priv->bg, -+ manager->priv->settings); -+ return FALSE; -+} -+ -+static void -+on_screen_size_changed (GdkScreen *screen, -+ CinnamonBackgroundManager *manager) -+{ -+ draw_background (manager, FALSE); -+} -+ -+static void -+watch_bg_preferences (CinnamonBackgroundManager *manager) -+{ -+ g_signal_connect (manager->priv->settings, -+ "change-event", -+ G_CALLBACK (settings_change_event_cb), -+ manager); -+} -+ -+static void -+on_bg_changed (GnomeBG *bg, -+ CinnamonBackgroundManager *manager) -+{ -+ draw_background (manager, TRUE); -+} -+ -+static void -+setup_bg (CinnamonBackgroundManager *manager) -+{ -+ g_return_if_fail (manager->priv->bg == NULL); -+ -+ manager->priv->bg = gnome_bg_new (); -+ -+ g_signal_connect (manager->priv->bg, -+ "changed", -+ G_CALLBACK (on_bg_changed), -+ manager); -+ -+ g_signal_connect (manager->priv->bg, -+ "transitioned", -+ G_CALLBACK (on_bg_transitioned), -+ manager); -+ -+ connect_screen_signals (manager); -+ watch_bg_preferences (manager); -+ gnome_bg_load_from_preferences (manager->priv->bg, -+ manager->priv->settings); -+} -+ -+static void -+setup_bg_and_draw_background (CinnamonBackgroundManager *manager) -+{ -+ setup_bg (manager); -+ draw_background (manager, FALSE); -+} -+ -+static void -+disconnect_session_manager_listener (CinnamonBackgroundManager *manager) -+{ -+ if (manager->priv->proxy && manager->priv->proxy_signal_id) { -+ g_signal_handler_disconnect (manager->priv->proxy, -+ manager->priv->proxy_signal_id); -+ manager->priv->proxy_signal_id = 0; -+ } -+} -+ -+static void -+on_session_manager_signal (GDBusProxy *proxy, -+ const gchar *sender_name, -+ const gchar *signal_name, -+ GVariant *parameters, -+ gpointer user_data) -+{ -+ CinnamonBackgroundManager *manager = CINNAMON_BACKGROUND_MANAGER (user_data); -+ -+ if (g_strcmp0 (signal_name, "SessionRunning") == 0) { -+ setup_bg_and_draw_background (manager); -+ disconnect_session_manager_listener (manager); -+ } -+} -+ -+static void -+draw_background_after_session_loads (CinnamonBackgroundManager *manager) -+{ -+ GError *error = NULL; -+ GDBusProxyFlags flags; -+ -+ flags = G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | -+ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START; -+ manager->priv->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, -+ flags, -+ NULL, /* GDBusInterfaceInfo */ -+ "org.gnome.SessionManager", -+ "/org/gnome/SessionManager", -+ "org.gnome.SessionManager", -+ NULL, /* GCancellable */ -+ &error); -+ if (manager->priv->proxy == NULL) { -+ g_warning ("Could not listen to session manager: %s", -+ error->message); -+ g_error_free (error); -+ return; -+ } -+ -+ manager->priv->proxy_signal_id = g_signal_connect (manager->priv->proxy, -+ "g-signal", -+ G_CALLBACK (on_session_manager_signal), -+ manager); -+} -+ -+ -+static void -+disconnect_screen_signals (CinnamonBackgroundManager *manager) -+{ -+ GdkDisplay *display; -+ int i; -+ int n_screens; -+ -+ display = gdk_display_get_default (); -+ n_screens = gdk_display_get_n_screens (display); -+ -+ for (i = 0; i < n_screens; ++i) { -+ GdkScreen *screen; -+ screen = gdk_display_get_screen (display, i); -+ g_signal_handlers_disconnect_by_func (screen, -+ G_CALLBACK (on_screen_size_changed), -+ manager); -+ } -+} -+ -+static void -+connect_screen_signals (CinnamonBackgroundManager *manager) -+{ -+ GdkDisplay *display; -+ int i; -+ int n_screens; -+ -+ display = gdk_display_get_default (); -+ n_screens = gdk_display_get_n_screens (display); -+ -+ for (i = 0; i < n_screens; ++i) { -+ GdkScreen *screen; -+ screen = gdk_display_get_screen (display, i); -+ g_signal_connect (screen, -+ "monitors-changed", -+ G_CALLBACK (on_screen_size_changed), -+ manager); -+ g_signal_connect (screen, -+ "size-changed", -+ G_CALLBACK (on_screen_size_changed), -+ manager); -+ } -+} -+ -+static void -+draw_background_changed (GSettings *settings, -+ const char *key, -+ CinnamonBackgroundManager *manager) -+{ -+ if (dont_draw_background (manager) == FALSE) -+ setup_bg_and_draw_background (manager); -+} -+ -+gboolean -+cinnamon_background_manager_start (CinnamonBackgroundManager *manager) -+{ -+ manager->priv->settings = g_settings_new ("org.cinnamon.background"); -+ g_signal_connect (manager->priv->settings, "changed::draw-background", -+ G_CALLBACK (draw_background_changed), manager); -+ -+ setup_bg_and_draw_background (manager); -+ //draw_background_after_session_loads (manager); -+ -+ -+ return TRUE; -+} -+ -+void -+cinnamon_background_manager_stop (CinnamonBackgroundManager *manager) -+{ -+ CinnamonBackgroundManagerPrivate *p = manager->priv; -+ -+ g_debug ("Stopping background manager"); -+ -+ disconnect_screen_signals (manager); -+ -+ if (manager->priv->proxy) { -+ disconnect_session_manager_listener (manager); -+ g_object_unref (manager->priv->proxy); -+ } -+ -+ g_signal_handlers_disconnect_by_func (manager->priv->settings, -+ settings_change_event_cb, -+ manager); -+ -+ if (p->settings != NULL) { -+ g_object_unref (p->settings); -+ p->settings = NULL; -+ } -+ -+ if (p->bg != NULL) { -+ g_object_unref (p->bg); -+ p->bg = NULL; -+ } -+} -+ -+/** -+ * cinnamon_background_manager_get_default: -+ * -+ * Return Value: (transfer none): The global #CinnamonBackgroundManager singleton -+ */ -+CinnamonBackgroundManager * -+cinnamon_background_manager_get_default () -+{ -+ static CinnamonBackgroundManager *instance = NULL; -+ -+ if (instance == NULL) -+ instance = g_object_new (CINNAMON_TYPE_BACKGROUND_MANAGER, NULL); -+ -+ return instance; -+} -+ -+static GObject * -+cinnamon_background_manager_constructor (GType type, -+ guint n_construct_properties, -+ GObjectConstructParam *construct_properties) -+{ -+ CinnamonBackgroundManager *background_manager; -+ -+ background_manager = CINNAMON_BACKGROUND_MANAGER (G_OBJECT_CLASS (cinnamon_background_manager_parent_class)->constructor (type, -+ n_construct_properties, -+ construct_properties)); -+ -+ return G_OBJECT (background_manager); -+} -+ -+static void -+cinnamon_background_manager_class_init (CinnamonBackgroundManagerClass *klass) -+{ -+ GObjectClass *object_class = G_OBJECT_CLASS (klass); -+ -+ object_class->constructor = cinnamon_background_manager_constructor; -+ object_class->finalize = cinnamon_background_manager_finalize; -+ -+ g_type_class_add_private (klass, sizeof (CinnamonBackgroundManagerPrivate)); -+} -+ -+static void -+cinnamon_background_manager_init (CinnamonBackgroundManager *manager) -+{ -+ manager->priv = CINNAMON_BACKGROUND_MANAGER_GET_PRIVATE (manager); -+ cinnamon_background_manager_start (manager); -+} -+ -+static void -+cinnamon_background_manager_finalize (GObject *object) -+{ -+ CinnamonBackgroundManager *background_manager; -+ -+ g_return_if_fail (object != NULL); -+ g_return_if_fail (CINNAMON_IS_BACKGROUND_MANAGER (object)); -+ -+ background_manager = CINNAMON_BACKGROUND_MANAGER (object); -+ -+ g_return_if_fail (background_manager->priv != NULL); -+ -+ G_OBJECT_CLASS (cinnamon_background_manager_parent_class)->finalize (object); -+} -diff --git a/src/cinnamon-background-manager.h b/src/cinnamon-background-manager.h -new file mode 100644 -index 0000000..9a56e32 ---- /dev/null -+++ b/src/cinnamon-background-manager.h -@@ -0,0 +1,57 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- -+ * -+ * Copyright (C) 2007 William Jon McCann -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ */ -+ -+#ifndef __CINNAMON_BACKGROUND_MANAGER_H -+#define __CINNAMON_BACKGROUND_MANAGER_H -+ -+#include -+ -+G_BEGIN_DECLS -+ -+#define CINNAMON_TYPE_BACKGROUND_MANAGER (cinnamon_background_manager_get_type ()) -+#define CINNAMON_BACKGROUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CINNAMON_TYPE_BACKGROUND_MANAGER, CinnamonBackgroundManager)) -+#define CINNAMON_BACKGROUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CINNAMON_TYPE_BACKGROUND_MANAGER, CinnamonBackgroundManagerClass)) -+#define CINNAMON_IS_BACKGROUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CINNAMON_TYPE_BACKGROUND_MANAGER)) -+#define CINNAMON_IS_BACKGROUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CINNAMON_TYPE_BACKGROUND_MANAGER)) -+#define CINNAMON_BACKGROUND_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CINNAMON_TYPE_BACKGROUND_MANAGER, CinnamonBackgroundManagerClass)) -+ -+typedef struct CinnamonBackgroundManagerPrivate CinnamonBackgroundManagerPrivate; -+ -+typedef struct -+{ -+ GObject parent; -+ CinnamonBackgroundManagerPrivate *priv; -+} CinnamonBackgroundManager; -+ -+typedef struct -+{ -+ GObjectClass parent_class; -+} CinnamonBackgroundManagerClass; -+ -+GType cinnamon_background_manager_get_type (void); -+ -+CinnamonBackgroundManager *cinnamon_background_manager_get_default (void); -+ -+gboolean cinnamon_background_manager_start (CinnamonBackgroundManager *manager); -+void cinnamon_background_manager_stop (CinnamonBackgroundManager *manager); -+ -+G_END_DECLS -+ -+#endif /* __CINNAMON_BACKGROUND_MANAGER_H */ --- -1.8.1.6 - - -From c971d472a88f8ea725b2bef33715016e111732d9 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Tue, 16 Apr 2013 18:28:16 -0400 -Subject: [PATCH 04/16] Change default background - ---- - data/org.cinnamon.gschema.xml.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in -index 939ea70..6d8c82d 100644 ---- a/data/org.cinnamon.gschema.xml.in -+++ b/data/org.cinnamon.gschema.xml.in -@@ -808,7 +808,7 @@ - - - -- 'file://@datadir@/themes/Adwaita/backgrounds/adwaita-timed.xml' -+ 'file:///usr/share/backgrounds/linuxmint/default_background.jpg' - <_summary>Picture URI - <_description> - URI to use for the background image. Not that the backend only supports --- -1.8.1.6 - - -From 0147459229b449757bac9a92c173c4bd3c2f9eca Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Tue, 16 Apr 2013 18:41:16 -0400 -Subject: [PATCH 05/16] Use distro-agnostic background.. - ---- - data/org.cinnamon.gschema.xml.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in -index 6d8c82d..567dca8 100644 ---- a/data/org.cinnamon.gschema.xml.in -+++ b/data/org.cinnamon.gschema.xml.in -@@ -808,7 +808,7 @@ - - - -- 'file:///usr/share/backgrounds/linuxmint/default_background.jpg' -+ 'file:///usr/share/themes/Adwaita/backgrounds/adwaita-timed.xml' - <_summary>Picture URI - <_description> - URI to use for the background image. Not that the backend only supports --- -1.8.1.6 - - -From 706d244a9dbe2ace9860044e2245a285d8473f47 Mon Sep 17 00:00:00 2001 -From: dalcde -Date: Mon, 15 Apr 2013 18:34:48 +0800 -Subject: [PATCH 06/16] [GDbus] Port DBus to GDBus (AltLinux patch) - ---- - .../applets/brightness@cinnamon.org/applet.js | 39 +- - .../cinnamon/applets/power@cinnamon.org/applet.js | 102 ++-- - .../cinnamon/applets/sound@cinnamon.org/applet.js | 511 ++++++--------------- - .../cinnamon/applets/xrandr@cinnamon.org/applet.js | 19 +- - js/misc/gnomeSession.js | 147 ++---- - js/misc/modemManager.js | 79 ++-- - js/misc/screenSaver.js | 89 ++-- - js/ui/appletManager.js | 1 - - js/ui/automountManager.js | 106 ++--- - js/ui/autorunManager.js | 27 +- - js/ui/calendar.js | 71 +-- - js/ui/cinnamonDBus.js | 96 ++-- - js/ui/endSessionDialog.js | 79 ++-- - js/ui/keyboard.js | 48 +- - js/ui/layout.js | 14 +- - js/ui/magnifierDBus.js | 134 ++++-- - js/ui/main.js | 6 - - js/ui/messageTray.js | 13 +- - js/ui/notificationDaemon.js | 193 ++++---- - js/ui/scripting.js | 34 +- - 20 files changed, 774 insertions(+), 1034 deletions(-) - -diff --git a/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js -index 9cbda80..9087b25 100644 ---- a/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js -@@ -5,7 +5,6 @@ const St = imports.gi.St; - const PopupMenu = imports.ui.popupMenu; - const GLib = imports.gi.GLib; - const Gio = imports.gi.Gio; --const DBus = imports.dbus; - - /* constants */ - const DimSettingsSchema = "org.gnome.settings-daemon.plugins.power"; -@@ -14,24 +13,25 @@ const DimSettingsBattery = "idle-dim-battery"; - const PowerBusName = 'org.gnome.SettingsDaemon'; - const PowerObjectPath = '/org/gnome/SettingsDaemon/Power'; - --/* DBus interface */ --const PowerManagerInterface = { -- name: 'org.gnome.SettingsDaemon.Power.Screen', -- methods: -- [ -- { name: 'GetPercentage', inSignature: '', outSignature: 'u' }, -- { name: 'SetPercentage', inSignature: 'u', outSignature: 'u' }, -- { name: 'StepUp', inSignature: '', outSignature: 'u' }, -- { name: 'StepDown', inSignature: '', outSignature: 'u' }, -- ], -- signals: -- [ -- { name: 'Changed', inSignature: '', outSignature: '' }, -- ] --}; -+const PowerManagerInterface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; - - /* DBus magic */ --let PowerManagerProxy = DBus.makeProxyClass(PowerManagerInterface); -+const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(PowerManagerInterface); - - /* TextImageMenuItem taken from sound@cinnamon.org applet */ - let icon_path = "/usr/share/cinnamon/theme/"; -@@ -100,7 +100,7 @@ MyApplet.prototype = { - Applet.IconApplet.prototype._init.call(this, orientation, panel_height); - - try { -- this._proxy = new PowerManagerProxy(DBus.session, PowerBusName, PowerObjectPath); -+ this._proxy = new PowerManagerProxy(Gio.DBus.session, PowerBusName, PowerObjectPath); - - this.menuManager = new PopupMenu.PopupMenuManager(this); - this.menu = new Applet.AppletPopupMenu(this, orientation); -@@ -137,7 +137,8 @@ MyApplet.prototype = { - this.menu.addMenuItem(this._settingsMenu); - - //get notified -- this._proxy.connect('Changed', Lang.bind(this, this._getBrightness)); -+ this._proxy.connectSignal('Changed', Lang.bind(this, this._getBrightness)); -+ - this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent)); - } else { - this.set_applet_tooltip(_("Brightness")); -diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -index c342fe7..b6b2bcd 100644 ---- a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -@@ -1,6 +1,5 @@ - const Applet = imports.ui.applet; - const Gio = imports.gi.Gio; --const DBus = imports.dbus; - const Lang = imports.lang; - const St = imports.gi.St; - const PopupMenu = imports.ui.popupMenu; -@@ -42,34 +41,46 @@ const LabelDisplay = { - TIME: 'time' - }; - --const PowerManagerInterface = { -- name: 'org.gnome.SettingsDaemon.Power', -- methods: [ -- { name: 'GetDevices', inSignature: '', outSignature: 'a(susdut)' }, -- { name: 'GetPrimaryDevice', inSignature: '', outSignature: '(susdut)' }, -- ], -- signals: [ -- { name: 'PropertiesChanged', inSignature: 's,a{sv},a[s]' }, -- ], -- properties: [ -- { name: 'Icon', signature: 's', access: 'read' }, -- ] --}; --let PowerManagerProxy = DBus.makeProxyClass(PowerManagerInterface); -- --const SettingsManagerInterface = { -- name: 'org.freedesktop.DBus.Properties', -- methods: [ -- { name: 'Get', inSignature: 's,s', outSignature: 'v' }, -- { name: 'GetAll', inSignature: 's', outSignature: 'a{sv}' }, -- { name: 'Set', inSignature: 's,s,v', outSignature: '' } -- ], -- signals: [ -- {name: 'PropertiesChanged', inSignature:'s,a{sv},a[s]', outSignature:''} -- ] --}; -- --let SettingsManagerProxy = DBus.makeProxyClass(SettingsManagerInterface); -+const PowerManagerInterface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; -+ -+const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(PowerManagerInterface); -+ -+const SettingsManagerInterface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; -+ -+const SettingsManagerProxy = Gio.DBusProxy.makeProxyWrapper(SettingsManagerInterface); - - function DeviceItem() { - this._init.apply(this, arguments); -@@ -143,11 +154,11 @@ MyApplet.prototype = { - this.menuManager = new PopupMenu.PopupMenuManager(this); - this.menu = new Applet.AppletPopupMenu(this, orientation); - this.menuManager.addMenu(this.menu); -- -+ - //this.set_applet_icon_symbolic_name('battery-missing'); -- this._proxy = new PowerManagerProxy(DBus.session, BUS_NAME, OBJECT_PATH); -- this._smProxy = new SettingsManagerProxy(DBus.session, BUS_NAME, OBJECT_PATH); -- -+ this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH); -+ this._smProxy = new SettingsManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH); -+ - let icon = this.actor.get_children()[0]; - this.actor.remove_actor(icon); - let box = new St.BoxLayout({ name: 'batteryBox' }); -@@ -306,18 +317,19 @@ MyApplet.prototype = { - this._devicesChanged(); - }, - -- _devicesChanged: function() { -- this._proxy.GetRemote('Icon', Lang.bind(this, function(icon, error) { -- if (icon) { -- this.set_applet_icon_symbolic_name('battery-missing'); -- let gicon = Gio.icon_new_for_string(icon); -- this._applet_icon.gicon = gicon; -- this.actor.show(); -- } else { -- this.menu.close(); -- this.actor.hide(); -- } -- })); -+ -+ _devicesChanged: function() { -+ this.set_applet_icon_symbolic_name('battery-missing'); -+ let icon = this._proxy.Icon; -+ if (icon) { -+ let gicon = Gio.icon_new_for_string(icon); -+ this.setGIcon(gicon); -+ this.actor.show(); -+ } else { -+ this.menu.close(); -+ this.actor.hide(); -+ } -+ - this._readPrimaryDevice(); - this._readOtherDevices(); - this._updateLabel(); -diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -index 50c4e1e..c8427ac 100644 ---- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -@@ -1,7 +1,6 @@ - const Applet = imports.ui.applet; - const Mainloop = imports.mainloop; - const Gio = imports.gi.Gio; --const DBus = imports.dbus; - const Lang = imports.lang; - const Cinnamon = imports.gi.Cinnamon; - const Clutter = imports.gi.Clutter; -@@ -12,95 +11,50 @@ const Gvc = imports.gi.Gvc; - const Pango = imports.gi.Pango; - const Tooltips = imports.ui.tooltips; - --const PropIFace = { -- name: 'org.freedesktop.DBus.Properties', -- signals: [{ name: 'PropertiesChanged', -- inSignature: 'a{sv}'}] --}; -- --const MediaServer2IFace = { -- name: 'org.mpris.MediaPlayer2', -- methods: [{ name: 'Raise', -- inSignature: '', -- outSignature: '' }, -- { name: 'Quit', -- inSignature: '', -- outSignature: '' }], -- properties: [{ name: 'CanRaise', -- signature: 'b', -- access: 'read'}, -- { name: 'CanQuit', -- signature: 'b', -- access: 'read'}], --}; -- --const MediaServer2PlayerIFace = { -- name: 'org.mpris.MediaPlayer2.Player', -- methods: [{ name: 'PlayPause', -- inSignature: '', -- outSignature: '' }, -- { name: 'Pause', -- inSignature: '', -- outSignature: '' }, -- { name: 'Play', -- inSignature: '', -- outSignature: '' }, -- { name: 'Stop', -- inSignature: '', -- outSignature: '' }, -- { name: 'Next', -- inSignature: '', -- outSignature: '' }, -- { name: 'Previous', -- inSignature: '', -- outSignature: '' }, -- { name: 'SetPosition', -- inSignature: 'ox', -- outSignature: '' }], -- properties: [{ name: 'Metadata', -- signature: 'a{sv}', -- access: 'read'}, -- { name: 'Shuffle', -- signature: 'b', -- access: 'readwrite'}, -- { name: 'Rate', -- signature: 'd', -- access: 'readwrite'}, -- { name: 'LoopStatus', -- signature: 'b', -- access: 'readwrite'}, -- { name: 'Volume', -- signature: 'd', -- access: 'readwrite'}, -- { name: 'PlaybackStatus', -- signature: 's', -- access: 'read'}, -- { name: 'Position', -- signature: 'x', -- access: 'read'}, -- { name: 'CanGoNext', -- signature: 'b', -- access: 'read'}, -- { name: 'CanGoPrevious', -- signature: 'b', -- access: 'read'}, -- { name: 'CanPlay', -- signature: 'b', -- access: 'read'}, -- { name: 'CanPause', -- signature: 'b', -- access: 'read'}, -- { name: 'CanSeek', -- signature: 'b', -- access: 'read'}], -- signals: [{ name: 'Seeked', -- inSignature: 'x' }] --}; -+const PropIFace = -+ -+ -+ -+; -+ -+const MediaServer2IFace = -+ -+ -+ -+ -+; -+ -+const MediaServer2PlayerIFace = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; - - /* global values */ - let icon_path = "/usr/share/cinnamon/theme/"; --let compatible_players = [ "clementine", "mpd", "exaile", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "guayadeque", "amarok", "googlemusicframe", "xbmc", "noise", "xnoise", "gmusicbrowser", "spotify", "audacious", "vlc", "beatbox", "songbird", "pithos", "gnome-mplayer", "nuvolaplayer", "qmmp" ]; --let support_seek = [ "clementine", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "amarok", "noise", "xnoise", "gmusicbrowser", "spotify", "vlc", "beatbox", "gnome-mplayer", "qmmp" ]; -+let compatible_players = [ "clementine", "mpd", "exaile", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "guayadeque", "amarok", "googlemusicframe", "xbmc", "noise", "xnoise", "gmusicbrowser", "spotify", "audacious", "vlc", "beatbox", "songbird", "pithos", "gnome-mplayer", "nuvolaplayer" ]; -+let support_seek = [ "clementine", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "amarok", "noise", "xnoise", "gmusicbrowser", "spotify", "vlc", "beatbox", "gnome-mplayer" ]; - /* dummy vars for translation */ - let x = _("Playing"); - x = _("Paused"); -@@ -112,131 +66,20 @@ const VOLUME_ADJUSTMENT_STEP = 0.05; /* Volume adjustment step in % */ - const ICON_SIZE = 28; - - --function Prop() { -- this._init.apply(this, arguments); --} -- --Prop.prototype = { -- _init: function(owner) { -- DBus.session.proxifyObject(this, owner, '/org/mpris/MediaPlayer2', this); -- } --} --DBus.proxifyPrototype(Prop.prototype, PropIFace) -- --function MediaServer2() { -- this._init.apply(this, arguments); --} -- --MediaServer2.prototype = { -- _init: function(owner) { -- DBus.session.proxifyObject(this, owner, '/org/mpris/MediaPlayer2', this); -- }, -- getRaise: function(callback) { -- this.GetRemote('CanRaise', Lang.bind(this, -- function(raise, ex) { -- if (!ex) -- callback(this, raise); -- })); -- }, -- getQuit: function(callback) { -- this.GetRemote('CanQuit', Lang.bind(this, -- function(quit, ex) { -- if (!ex) -- callback(this, quit); -- })); -- } -+var PropProxy = Gio.DBusProxy.makeProxyWrapper(PropIFace); -+function Prop(owner, initCallback, cancellable) { -+ return new PropProxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable); - } --DBus.proxifyPrototype(MediaServer2.prototype, MediaServer2IFace) - --function MediaServer2Player() { -- this._init.apply(this, arguments); -+var MediaServer2Proxy = Gio.DBusProxy.makeProxyWrapper(MediaServer2IFace); -+function MediaServer2(owner, initCallback, cancellable) { -+ return new MediaServer2Proxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable); - } - --MediaServer2Player.prototype = { -- _init: function(owner) { -- this._owner = owner; -- DBus.session.proxifyObject(this, owner, '/org/mpris/MediaPlayer2', this); -- }, -- getMetadata: function(callback) { -- this.GetRemote('Metadata', Lang.bind(this, -- function(metadata, ex) { -- if (!ex) -- callback(this, metadata); -- })); -- }, -- getPlaybackStatus: function(callback) { -- this.GetRemote('PlaybackStatus', Lang.bind(this, -- function(status, ex) { -- if (!ex) -- callback(this, status); -- })); -- }, -- getRate: function(callback) { -- this.GetRemote('Rate', Lang.bind(this, -- function(rate, ex) { -- if (!ex) -- callback(this, rate); -- })); -- }, -- getPosition: function(callback) { -- this.GetRemote('Position', Lang.bind(this, -- function(position, ex) { -- if (!ex) -- callback(this, position); -- })); -- }, -- setPosition: function(value) { -- this.SetRemote('Position', value); -- }, -- getShuffle: function(callback) { -- this.GetRemote('Shuffle', Lang.bind(this, -- function(shuffle, ex) { -- if (!ex) -- callback(this, shuffle); -- })); -- }, -- setShuffle: function(value) { -- this.SetRemote('Shuffle', value); -- }, -- getVolume: function(callback) { -- this.GetRemote('Volume', Lang.bind(this, -- function(volume, ex) { -- if (!ex) -- callback(this, volume); -- })); -- }, -- setVolume: function(value) { -- this.SetRemote('Volume', parseFloat(value)); -- }, -- getRepeat: function(callback) { -- this.GetRemote('LoopStatus', Lang.bind(this, -- function(repeat, ex) { -- if (!ex) { -- if (repeat == "None") -- repeat = false -- else -- repeat = true -- callback(this, repeat); -- } -- })); -- }, -- setRepeat: function(value) { -- if (value) -- value = "Playlist" -- else -- value = "None" -- this.SetRemote('LoopStatus', value); -- }, -- getCanSeek: function(callback) { -- this.GetRemote('CanSeek', Lang.bind(this, -- function(canSeek, err) { -- if (!err) { -- callback(this, canSeek); -- } -- })); -- } -+var MediaServer2PlayerProxy = Gio.DBusProxy.makeProxyWrapper(MediaServer2PlayerIFace); -+function MediaServer2Player(owner, initCallback, cancellable) { -+ return new MediaServer2PlayerProxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable); - } --DBus.proxifyPrototype(MediaServer2Player.prototype, MediaServer2PlayerIFace) - - function TrackInfo() { - this._init.apply(this, arguments); -@@ -355,7 +198,6 @@ Player.prototype = { - _init: function(system_status_button, owner) { - PopupMenu.PopupMenuSection.prototype._init.call(this); - -- this.showPosition = true; // @todo: Get from settings - this._owner = owner; - this._system_status_button = system_status_button; - this._name = this._owner.split('.')[3]; -@@ -389,7 +231,7 @@ Player.prototype = { - this.infos_top.add_actor(this._artist.getActor()); - this.infos_bottom.add_actor(this._album.getActor()); - this.infos_top.add_actor(this._title.getActor()); -- -+ this.infos_bottom.add_actor(this._time.getActor()); - this._trackInfosTop.set_child(this.infos_top); - this._trackInfosBottom.set_child(this.infos_bottom); - ---- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -@@ -414,45 +414,20 @@ - this._trackControls.set_child(this.controls); - this.addActor(this._trackControls); - -- this._seekControls = new St.Bin({style_class: 'sound-seek', x_align: St.Align.START}); -- this.seekControls = new St.BoxLayout({style_class: 'sound-seek-box'}); -- this.seekControls.add_actor(this._time.getActor()); -- -- this._positionSlider = new PopupMenu.PopupSliderMenuItem(0); -- this._positionSlider.connect('value-changed', Lang.bind(this, function(item) { -- let time = item._value * this._songLength; -- this._time.setLabel(this._formatTime(time) + " / " + this._formatTime(this._songLength)); -- })); -- this._positionSlider.connect('drag-end', Lang.bind(this, function(item) { -- let time = item._value * this._songLength; -- this._time.setLabel(this._formatTime(time) + " / " + this._formatTime(this._songLength)); -- this._wantedSeekValue = Math.round(time * 1000000); -- this._mediaServerPlayer.SetPositionRemote(this._trackObj, time * 1000000); -- })); -- -- this.sliderBin = new St.Bin({style_class: 'sound-seek-slider'}); -- this.sliderBin.set_child(this._positionSlider.actor); -- this.seekControls.add_actor(this.sliderBin); -- this._seekControls.set_child(this.seekControls); -- this.addActor(this._seekControls); -- -- this._mediaServer.getRaise(Lang.bind(this, function(sender, raise) { -- if (raise) { -- this._raiseButton = new ControlButton('go-up', -- Lang.bind(this, function () { this._mediaServer.RaiseRemote(); this._system_status_button.menu.actor.hide(); })); -- this._raiseButtonTooltip = new Tooltips.Tooltip(this._raiseButton.button, _("Open Player")); -- this.controls.add_actor(this._raiseButton.getActor()); -- } -- })); -- -- this._mediaServer.getQuit(Lang.bind(this, function(sender, quit) { -- if (quit) { -- this._quitButton = new ControlButton('window-close', -- Lang.bind(this, function () { this._mediaServer.QuitRemote(); })); -- this.controls.add_actor(this._quitButton.getActor()); -- this._quitButtonTooltip = new Tooltips.Tooltip(this._quitButton.button, _("Quit Player")); -- } -- })); -+ let CanRaise = this._mediaServer.CanRaise; -+ let CanQuit = this._mediaServer.CanQuit; -+ if (CanRaise) { -+ this._raiseButton = new ControlButton('go-up', -+ Lang.bind(this, function () { this._mediaServer.RaiseRemote(); this._system_status_button.menu.actor.hide(); })); -+ this._raiseButtonTooltip = new Tooltips.Tooltip(this._raiseButton.button, _("Open Player")); -+ this.controls.add_actor(this._raiseButton.getActor()); -+ } -+ if (CanQuit) { -+ this._quitButton = new ControlButton('window-close', -+ Lang.bind(this, function () { this._mediaServer.QuitRemote(); })); -+ this.controls.add_actor(this._quitButton.getActor()); -+ this._quitButtonTooltip = new Tooltips.Tooltip(this._quitButton.button, _("Quit Player")); -+ } - - /* this players don't support seek */ - if (support_seek.indexOf(this._name) == -1) { -@@ -465,39 +440,23 @@ - this._getMetadata(); - this._currentTime = 0; - this._getPosition(); -- this._wantedSeekValue = 0; -- this._updatePositionSlider(); - -- this._prop.connect('PropertiesChanged', Lang.bind(this, function(sender, iface, value) { -+ this._prop.connectSignal('PropertiesChanged', Lang.bind(this, function(sender, iface, value) { - if (value["PlaybackStatus"]) -- this._setStatus(iface, value["PlaybackStatus"]); -+ this._setStatus(value["PlaybackStatus"]); - if (value["Metadata"]) -- this._setMetadata(iface, value["Metadata"]); -- //qmmp -- if(sender._dbusBusName == 'org.mpris.MediaPlayer2.qmmp') { -+ this._setMetadata(value["Metadata"]); -+ // qmmp -+ if (sender._dbusBusName == 'org.mpris.MediaPlayer2.qmmp') { - if (value["playbackStatus"]) -- this._setStatus(iface, value["playbackStatus"]); -+ this._setStatus(value["playbackStatus"]); - if (value["metadata"]) -- this._setMetadata(sender, value["metadata"]); -- } -- })); -- -- this._mediaServerPlayer.connect('Seeked', Lang.bind(this, function(sender, value) { -- if (value > 0) { -- this._setPosition(value); -- } -- // Seek initiated by the position slider -- else if (this._wantedSeekValue > 0) { -- // Some broken gstreamer players (Banshee) reports always 0 -- // when the track is seeked so we set the position at the -- // value we set on the slider -- this._setPosition(this._wantedSeekValue); -+ this._setMetadata(value["metadata"]); - } -- // Seek value send by the player -- else -- this._setPosition(value); -+ })); - -- this._wantedSeekValue = 0; -+ this._mediaServerPlayer.connectSignal('Seeked', Lang.bind(this, function(sender, iface, [value]) { -+ this._setPosition(sender, value); - })); - - Mainloop.timeout_add(1000, Lang.bind(this, this._getPosition)); - -@@ -512,45 +303,26 @@ Player.prototype = { - this._playerInfo.setText(this._getName() + " - " + _(status)); - }, - -- _updatePositionSlider: function(position) { -- this._mediaServerPlayer.getCanSeek(Lang.bind(this, function(sender, canSeek) { -- this._canSeek = canSeek; -- -- if (this._songLength == 0 || position == false) -- this._canSeek = false -- -- // Clem: The following code was commented out. When the next song started, it resulted in hiding the sound menu, making it hard for the user to repeatedly click on the next song button. -- // There's probably a better fix and this was not tested with players which don't support seeking, but it fixes the regression created by the slider (apparently when the slider is hidden it closes the menu) -- // if (this._playerStatus == "Playing" && this._canSeek && this.showPosition) -- // this._positionSlider.actor.show(); -- // else -- // this._positionSlider.actor.hide(); -- })); -- }, -- -- _setPosition: function(value) { -- if (value == null && this._playerStatus != 'Stopped') { -- this._updatePositionSlider(false); -- } -- else { -- this._currentTime = value / 1000000; -- this._updateTimer(); -- } -+ _setPosition: function(sender, value) { -+ this._stopTimer(); -+ this._currentTime = value / 1000000; -+ this._updateTimer(); -+ if (this._playerStatus == "Playing") -+ this._runTimer(); - }, - - _getPosition: function() { -- this._mediaServerPlayer.getPosition(Lang.bind(this, function(sender, value) { -- this._setPosition(value); -- })); -+ this._setPosition(this._mediaServerPlayer.Position); -+ Mainloop.timeout_add(1000, Lang.bind(this, this._getPosition)); - }, - -- _setMetadata: function(sender, metadata) { -+ _setMetadata: function(metadata) { - if (metadata["mpris:length"]) { - // song length in secs -- this._songLength = metadata["mpris:length"] / 1000000; -+ this._songLength = metadata["mpris:length"].unpack() / 1000000; - // FIXME upstream - if (this._name == "quodlibet") -- this._songLength = metadata["mpris:length"] / 1000; -+ this._songLength = metadata["mpris:length"].unpack() / 1000; - // reset timer - this._stopTimer(); - if (this._playerStatus == "Playing") -@@ -559,26 +333,29 @@ Player.prototype = { - this._stopTimer(); - } - if (metadata["xesam:artist"]) -- this._artist.setLabel(metadata["xesam:artist"].toString()); -+ this._artist.setLabel(metadata["xesam:artist"].unpack()); - else - this._artist.setLabel(_("Unknown Artist")); - if (metadata["xesam:album"]) -- this._album.setLabel(metadata["xesam:album"].toString()); -+ this._album.setLabel(metadata["xesam:album"].unpack()); - else - this._album.setLabel(_("Unknown Album")); - if (metadata["xesam:title"]) -- this._title.setLabel(metadata["xesam:title"].toString()); -+ this._title.setLabel(metadata["xesam:title"].unpack()); - else - this._title.setLabel(_("Unknown Title")); -- -- if (metadata["mpris:trackid"]) { -- this._trackObj = metadata["mpris:trackid"]; -- } -+ /*if (metadata["mpris:trackid"]) { -+ this._trackId = { -+ _init: function() { -+ DBus.session.proxifyObject(this, this._owner, metadata["mpris:trackid"]); -+ } -+ } -+ }*/ - - let change = false; - if (metadata["mpris:artUrl"]) { -- if (this._trackCoverFile != metadata["mpris:artUrl"].toString()) { -- this._trackCoverFile = metadata["mpris:artUrl"].toString(); -+ if (this._trackCoverFile != metadata["mpris:artUrl"].unpack()) { -+ this._trackCoverFile = metadata["mpris:artUrl"].unpack(); - change = true; - } - } -@@ -600,8 +377,7 @@ Player.prototype = { - cover.read_async(null, null, Lang.bind(this, this._onReadCover)); - } - else { -- cover_path = decodeURIComponent(this._trackCoverFile); -- cover_path = cover_path.replace("file://", ""); -+ cover_path = decodeURIComponent(this._trackCoverFile.substr(7)); - this._showCover(cover_path); - } - } -@@ -611,13 +387,10 @@ Player.prototype = { - }, - - _getMetadata: function() { -- this._mediaServerPlayer.getMetadata(Lang.bind(this, -- this._setMetadata -- )); -+ this._setMetadata(this._mediaServerPlayer.Metadata); - }, - -- _setStatus: function(sender, status) { -- this._updatePositionSlider(); -+ _setStatus: function(status) { - this._playerStatus = status; - if (status == "Playing") { - this._playButton.setIcon("media-playback-pause"); -@@ -631,53 +404,39 @@ Player.prototype = { - this._playButton.setIcon("media-playback-start"); - this._stopTimer(); - } -- - this._playerInfo.setImage("player-" + status.toLowerCase()); - this._setName(status); - }, - - _getStatus: function() { -- this._mediaServerPlayer.getPlaybackStatus(Lang.bind(this, -- this._setStatus -- )); -+ this._setStatus(this._mediaServerPlayer.PlaybackStatus); - }, - - _updateRate: function() { -- this._mediaServerPlayer.getRate(Lang.bind(this, function(sender, rate) { -- this._rate = rate; -- })); -+ this._rate = this._mediaServerPlayer.Rate; - }, - - _updateTimer: function() { -- if (this.showPosition && this._canSeek) { -- if (!isNaN(this._currentTime) && !isNaN(this._songLength) && this._currentTime > 0) -- this._positionSlider.setValue(this._currentTime / this._songLength); -- else -- this._positionSlider.setValue(0); -- } - this._time.setLabel(this._formatTime(this._currentTime) + " / " + this._formatTime(this._songLength)); - }, - - _runTimer: function() { -- if (this._playerStatus == 'Playing') { -- this._timeoutId = Mainloop.timeout_add_seconds(1, Lang.bind(this, this._runTimer)); -- this._currentTime += 1; -- this._updateTimer(); -- } -+ /*if (!Tweener.resumeTweens(this)) { -+ Tweener.addTween(this, -+ { time: this._songLength - this._currentTime, -+ transition: 'linear', -+ onUpdate: Lang.bind(this, this._updateTimer) }); -+ }*/ - }, - - _pauseTimer: function() { -- if (this._timeoutId != 0) { -- Mainloop.source_remove(this._timeoutId); -- this._timeoutId = 0; -- } -- this._updateTimer(); -+ //Tweener.pauseTweens(this); - }, - - _stopTimer: function() { -+ /*Tweener.removeTweens(this); - this._currentTime = 0; -- this._pauseTimer(); -- this._updateTimer(); -+ this._updateTimer();*/ - }, - - _formatTime: function(s) { -@@ -771,7 +530,7 @@ MediaPlayerLauncher.prototype = { - }, - - activate: function (event) { -- this._menu.actor.hide(); -+ this._menu.actor.hide(); - this._app.activate_full(-1, event.get_time()); - return true; - } -@@ -799,7 +558,7 @@ MyApplet.prototype = { - this._players = {}; - // watch players - for (var p=0; p 0){ -@@ -1137,19 +896,19 @@ MyApplet.prototype = { - this._mutedChanged (null, null, '_output'); - this._volumeChanged (null, null, '_output'); - let sinks = this._control.get_sinks(); -- this._selectDeviceItem.menu.removeAll(); -- for (let i = 0; i < sinks.length; i++) { -- let sink = sinks[i]; -- let menuItem = new PopupMenu.PopupMenuItem(sink.get_description()); -- if (sinks[i].get_id() == this._output.get_id()) { -- menuItem.setShowDot(true); -- } -- menuItem.connect('activate', Lang.bind(this, function() { -- log('Changing default sink to ' + sink.get_description()); -- this._control.set_default_sink(sink); -- })); -- this._selectDeviceItem.menu.addMenuItem(menuItem); -- } -+ this._selectDeviceItem.menu.removeAll(); -+ for (let i = 0; i < sinks.length; i++) { -+ let sink = sinks[i]; -+ let menuItem = new PopupMenu.PopupMenuItem(sink.get_description()); -+ if (sinks[i].get_id() == this._output.get_id()) { -+ menuItem.setShowDot(true); -+ } -+ menuItem.connect('activate', Lang.bind(this, function() { -+ log('Changing default sink to ' + sink.get_description()); -+ this._control.set_default_sink(sink); -+ })); -+ this._selectDeviceItem.menu.addMenuItem(menuItem); -+ } - } else { - this._outputSlider.setValue(0); - this.setIconName('audio-volume-muted-symbolic'); -diff --git a/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js -index 0dcf74d..c2d152a 100644 ---- a/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js -@@ -1,6 +1,6 @@ - /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ - --const DBus = imports.dbus; -+const Gio = imports.gi.Gio; - const Gdk = imports.gi.Gdk; - const GLib = imports.gi.GLib; - const GnomeDesktop = imports.gi.GnomeDesktop; -@@ -22,13 +22,14 @@ let rotations = [ [ GnomeDesktop.RRRotation.ROTATION_0, N_("Normal") ], - [ GnomeDesktop.RRRotation.ROTATION_180, N_("Upside-down") ] - ]; - --const XRandr2Iface = { -- name: 'org.gnome.SettingsDaemon.XRANDR_2', -- methods: [ -- { name: 'ApplyConfiguration', inSignature: 'xx', outSignature: '' }, -- ] --}; --let XRandr2 = DBus.makeProxyClass(XRandr2Iface); -+const XRandr2Iface = -+ -+ -+ -+ -+; -+ -+const XRandr2 = Gio.DBusProxy.makeProxyWrapper(XRandr2Iface); - - function MyApplet(orientation, panel_height) { - this._init(orientation, panel_height); -@@ -48,7 +49,7 @@ MyApplet.prototype = { - this.menu = new Applet.AppletPopupMenu(this, orientation); - this.menuManager.addMenu(this.menu); - -- this._proxy = new XRandr2(DBus.session, 'org.gnome.SettingsDaemon', '/org/gnome/SettingsDaemon/XRANDR'); -+ this._proxy = new XRandr2(Gio.DBus.session, 'org.gnome.SettingsDaemon', '/org/gnome/SettingsDaemon/XRANDR'); - - try { - this._screen = new GnomeDesktop.RRScreen({ gdk_screen: Gdk.Screen.get_default() }); -diff --git a/js/misc/gnomeSession.js b/js/misc/gnomeSession.js -index a2b61fd..e21d3a8 100644 ---- a/js/misc/gnomeSession.js -+++ b/js/misc/gnomeSession.js -@@ -1,20 +1,18 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - --const DBus = imports.dbus; -+const Gio = imports.gi.Gio; - const Lang = imports.lang; - const Signals = imports.signals; - --const PresenceIface = { -- name: 'org.gnome.SessionManager.Presence', -- methods: [{ name: 'SetStatus', -- inSignature: 'u', -- outSignature: '' }], -- properties: [{ name: 'status', -- signature: 'u', -- access: 'readwrite' }], -- signals: [{ name: 'StatusChanged', -- inSignature: 'u' }] --}; -+const PresenceIface = -+ -+ -+ -+ -+ -+ -+ -+; - - const PresenceStatus = { - AVAILABLE: 0, -@@ -23,104 +21,37 @@ const PresenceStatus = { - IDLE: 3 - }; - --function Presence() { -- this._init(); -+var PresenceProxy = Gio.DBusProxy.makeProxyWrapper(PresenceIface); -+function Presence(initCallback, cancellable) { -+ return new PresenceProxy(Gio.DBus.session, 'org.gnome.SessionManager', -+ '/org/gnome/SessionManager/Presence', initCallback, cancellable); - } - --Presence.prototype = { -- _init: function() { -- DBus.session.proxifyObject(this, 'org.gnome.SessionManager', '/org/gnome/SessionManager/Presence', this); -- }, -- -- getStatus: function(callback) { -- this.GetRemote('status', Lang.bind(this, -- function(status, ex) { -- if (!ex) -- callback(this, status); -- })); -- }, -- -- setStatus: function(status) { -- this.SetStatusRemote(status); -- } --}; --DBus.proxifyPrototype(Presence.prototype, PresenceIface); -- --// Note inhibitors are immutable objects, so they don't --// change at runtime (changes always come in the form --// of new inhibitors) --const InhibitorIface = { -- name: 'org.gnome.SessionManager.Inhibitor', -- properties: [{ name: 'app_id', -- signature: 's', -- access: 'readonly' }, -- { name: 'client_id', -- signature: 's', -- access: 'readonly' }, -- { name: 'reason', -- signature: 's', -- access: 'readonly' }, -- { name: 'flags', -- signature: 'u', -- access: 'readonly' }, -- { name: 'toplevel_xid', -- signature: 'u', -- access: 'readonly' }, -- { name: 'cookie', -- signature: 'u', -- access: 'readonly' }], --}; -- --function Inhibitor(objectPath) { -- this._init(objectPath); -+const InhibitorIface = -+ -+ -+ -+ -+ -+ -+; -+ -+var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface); -+function Inhibitor(objectPath, initCallback, cancellable) { -+ return new InhibitorProxy(Gio.DBus.session, 'org.gnome.SessionManager', objectPath, initCallback, cancellable); - } - --Inhibitor.prototype = { -- _init: function(objectPath) { -- DBus.session.proxifyObject(this, -- 'org.gnome.SessionManager', -- objectPath); -- this.isLoaded = false; -- this._loadingPropertiesCount = InhibitorIface.properties.length; -- for (let i = 0; i < InhibitorIface.properties.length; i++) { -- let propertyName = InhibitorIface.properties[i].name; -- this.GetRemote(propertyName, Lang.bind(this, -- function(value, exception) { -- if (exception) -- return; -- -- this[propertyName] = value; -- this._loadingPropertiesCount--; -- -- if (this._loadingPropertiesCount == 0) { -- this.isLoaded = true; -- this.emit('is-loaded'); -- } -- })); -- } -- }, --}; --DBus.proxifyPrototype(Inhibitor.prototype, InhibitorIface); --Signals.addSignalMethods(Inhibitor.prototype); -- -- --// Not the full interface, only the methods we use --const SessionManagerIface = { -- name: 'org.gnome.SessionManager', -- methods: [ -- { name: 'Logout', inSignature: 'u', outSignature: '' }, -- { name: 'Shutdown', inSignature: '', outSignature: '' }, -- { name: 'CanShutdown', inSignature: '', outSignature: 'b' } -- ] --}; -- --function SessionManager() { -- this._init(); -+const SessionManagerIface = -+ -+ -+ -+ -+ -+ -+ -+; -+ -+var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface); -+function SessionManager(initCallback, cancellable) { -+ return new SessionManagerProxy(Gio.DBus.session, 'org.gnome.SessionManager', '/org/gnome/SessionManager', initCallback, cancellable); - } -- --SessionManager.prototype = { -- _init: function() { -- DBus.session.proxifyObject(this, 'org.gnome.SessionManager', '/org/gnome/SessionManager'); -- } --}; --DBus.proxifyPrototype(SessionManager.prototype, SessionManagerIface); -\ No newline at end of file -diff --git a/js/misc/modemManager.js b/js/misc/modemManager.js -index befd142..f35f925 100644 ---- a/js/misc/modemManager.js -+++ b/js/misc/modemManager.js -@@ -1,6 +1,6 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - --const DBus = imports.dbus; -+const Gio = imports.gi.Gio; - const Lang = imports.lang; - const Cinnamon = imports.gi.Cinnamon; - const Signals = imports.signals; -@@ -8,33 +8,43 @@ const Signals = imports.signals; - // The following are not the complete interfaces, just the methods we need - // (or may need in the future) - --const ModemGsmNetworkInterface = { -- name: 'org.freedesktop.ModemManager.Modem.Gsm.Network', -- methods: [ -- { name: 'GetRegistrationInfo', inSignature: '', outSignature: 'uss' }, -- { name: 'GetSignalQuality', inSignature: '', outSignature: 'u' } -- ], -- properties: [ -- { name: 'AccessTechnology', signature: 'u', access: 'read' } -- ], -- signals: [ -- { name: 'SignalQuality', inSignature: 'u' }, -- { name: 'RegistrationInfo', inSignature: 'uss' } -- ] --}; --const ModemGsmNetworkProxy = DBus.makeProxyClass(ModemGsmNetworkInterface); -- --const ModemCdmaInterface = { -- name: 'org.freedesktop.ModemManager.Modem.Cdma', -- methods: [ -- { name: 'GetSignalQuality', inSignature: '', outSignature: 'u' }, -- { name: 'GetServingSystem', inSignature: '', outSignature: 'usu' } -- ], -- signals: [ -- { name: 'SignalQuality', inSignature: 'u' } -- ] --}; --const ModemCdmaProxy = DBus.makeProxyClass(ModemCdmaInterface); -+const ModemGsmNetworkInterface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; -+ -+const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface); -+ -+const ModemCdmaInterface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; -+ -+const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface); - - let _providersTable; - function _getProvidersTable() { -@@ -50,17 +60,17 @@ function ModemGsm() { - - ModemGsm.prototype = { - _init: function(path) { -- this._proxy = new ModemGsmNetworkProxy(DBus.system, 'org.freedesktop.ModemManager', path); -+ this._proxy = new ModemGsmNetworkProxy(Gio.DBus.system, 'org.freedesktop.ModemManager', path); - - this.signal_quality = 0; - this.operator_name = null; - - // Code is duplicated because the function have different signatures -- this._proxy.connect('SignalQuality', Lang.bind(this, function(proxy, quality) { -+ this._proxy.connectSignal('SignalQuality', Lang.bind(this, function(proxy, sender, [quality]) { - this.signal_quality = quality; - this.emit('notify::signal-quality'); - })); -- this._proxy.connect('RegistrationInfo', Lang.bind(this, function(proxy, status, code, name) { -+ this._proxy.connectSignal('RegistrationInfo', Lang.bind(this, function(proxy, sender, [status, code, name]) { - this.operator_name = this._findOperatorName(name, code); - this.emit('notify::operator-name'); - })); -@@ -154,12 +164,13 @@ function ModemCdma() { - } - - ModemCdma.prototype = { -- _init: function(path) { -- this._proxy = new ModemCdmaProxy(DBus.system, 'org.freedesktop.ModemManager', path); -+ _init: function(path) { -+ this._proxy = new ModemCdmaProxy(Gio.DBus.system, 'org.freedesktop.ModemManager', path); - - this.signal_quality = 0; - this.operator_name = null; -- this._proxy.connect('SignalQuality', Lang.bind(this, function(proxy, quality) { -+ this._proxy.connect('SignalQuality', Lang.bind(this, function(proxy, sender, params) { -+ this.signal_quality = params[0]; - this.signal_quality = quality; - this.emit('notify::signal-quality'); - -diff --git a/js/misc/screenSaver.js b/js/misc/screenSaver.js -index c471856..aec883f 100644 ---- a/js/misc/screenSaver.js -+++ b/js/misc/screenSaver.js -@@ -1,53 +1,48 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - --const DBus = imports.dbus; - const Lang = imports.lang; -- --const ScreenSaverIface = { -- name: 'org.gnome.ScreenSaver', -- methods: [{ name: 'GetActive', -- inSignature: '', -- outSignature: 'b' }, -- { name: 'Lock', -- inSignature: '' }, -- { name: 'SetActive', -- inSignature: 'b' }], -- signals: [{ name: 'ActiveChanged', -- inSignature: 'b' }] --}; -+const Gio = imports.gi.Gio; -+ -+const ScreenSaverIface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; -+ -+const ScreenSaverInfo = Gio.DBusInterfaceInfo.new_for_xml(ScreenSaverIface); - - function ScreenSaverProxy() { -- this._init(); -+ var self = new Gio.DBusProxy({ g_connection: Gio.DBus.session, -+ g_interface_name: ScreenSaverInfo.name, -+ g_interface_info: ScreenSaverInfo, -+ g_name: 'org.gnome.ScreenSaver', -+ g_object_path: '/org/gnome/ScreenSaver', -+ g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START | -+ Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) }); -+ self.init(null); -+ self.screenSaverActive = false; -+ -+ self.connectSignal('ActiveChanged', function(proxy, senderName, [isActive]) { -+ self.screenSaverActive = isActive; -+ }); -+ self.connect('notify::g-name-owner', function() { -+ if (self.g_name_owner) { -+ self.GetActiveRemote(function(result, excp) { -+ if (result) { -+ let [isActive] = result; -+ self.screenSaverActive = isActive; -+ } -+ }); -+ } else -+ self.screenSaverActive = false; -+ }); -+ -+ return self; - } -- --ScreenSaverProxy.prototype = { -- _init: function() { -- DBus.session.proxifyObject(this, -- 'org.gnome.ScreenSaver', -- '/org/gnome/ScreenSaver'); -- -- DBus.session.watch_name('org.gnome.ScreenSaver', -- false, // do not launch a name-owner if none exists -- Lang.bind(this, this._onSSAppeared), -- Lang.bind(this, this._onSSVanished)); -- -- this.screenSaverActive = false; -- this.connect('ActiveChanged', -- Lang.bind(this, this._onActiveChanged)); -- }, -- -- _onSSAppeared: function(owner) { -- this.GetActiveRemote(Lang.bind(this, function(isActive) { -- this.screenSaverActive = isActive; -- })) -- }, -- -- _onSSVanished: function(oldOwner) { -- this.screenSaverActive = false; -- }, -- -- _onActiveChanged: function(object, isActive) { -- this.screenSaverActive = isActive; -- } --}; --DBus.proxifyPrototype(ScreenSaverProxy.prototype, ScreenSaverIface); -diff --git a/js/ui/appletManager.js b/js/ui/appletManager.js -index abf8136..830d80d 100644 ---- a/js/ui/appletManager.js -+++ b/js/ui/appletManager.js -@@ -7,7 +7,6 @@ const Cinnamon = imports.gi.Cinnamon; - const Main = imports.ui.main; - const Applet = imports.ui.applet; - const Extension = imports.ui.extension; --const DBus = imports.dbus; - - // Maps uuid -> metadata object - var appletMeta; -diff --git a/js/ui/automountManager.js b/js/ui/automountManager.js -index fa73bfe..f29f9f3 100644 ---- a/js/ui/automountManager.js -+++ b/js/ui/automountManager.js -@@ -1,7 +1,6 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - - const Lang = imports.lang; --const DBus = imports.dbus; - const Mainloop = imports.mainloop; - const Gio = imports.gi.Gio; - const Params = imports.misc.params; -@@ -15,63 +14,57 @@ const SETTING_ENABLE_AUTOMOUNT = 'automount'; - - const AUTORUN_EXPIRE_TIMEOUT_SECS = 10; - --const ConsoleKitSessionIface = { -- name: 'org.freedesktop.ConsoleKit.Session', -- methods: [{ name: 'IsActive', -- inSignature: '', -- outSignature: 'b' }], -- signals: [{ name: 'ActiveChanged', -- inSignature: 'b' }] --}; -+const ConsoleKitSessionIface = -+ -+ -+ -+ -+ -+ -+; - --const ConsoleKitSessionProxy = DBus.makeProxyClass(ConsoleKitSessionIface); -+const ConsoleKitSessionProxy = Gio.DBusProxy.makeProxyWrapper(ConsoleKitSessionIface); - --const ConsoleKitManagerIface = { -- name: 'org.freedesktop.ConsoleKit.Manager', -- methods: [{ name: 'GetCurrentSession', -- inSignature: '', -- outSignature: 'o' }] --}; -+const ConsoleKitManagerIface = -+ -+ -+ -+; - --function ConsoleKitManager() { -- this._init(); --}; -- --ConsoleKitManager.prototype = { -- _init: function() { -- this.sessionActive = true; -- -- DBus.system.proxifyObject(this, -- 'org.freedesktop.ConsoleKit', -- '/org/freedesktop/ConsoleKit/Manager'); -+const ConsoleKitManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ConsoleKitManagerIface); - -- DBus.system.watch_name('org.freedesktop.ConsoleKit', -- false, // do not launch a name-owner if none exists -- Lang.bind(this, this._onManagerAppeared), -- Lang.bind(this, this._onManagerVanished)); -- }, -- -- _onManagerAppeared: function(owner) { -- this.GetCurrentSessionRemote(Lang.bind(this, this._onCurrentSession)); -- }, -- -- _onManagerVanished: function(oldOwner) { -- this.sessionActive = true; -- }, -- -- _onCurrentSession: function(session) { -- this._ckSession = new ConsoleKitSessionProxy(DBus.system, 'org.freedesktop.ConsoleKit', session); -- -- this._ckSession.connect -- ('ActiveChanged', Lang.bind(this, function(object, isActive) { -- this.sessionActive = isActive; -- })); -- this._ckSession.IsActiveRemote(Lang.bind(this, function(isActive) { -- this.sessionActive = isActive; -- })); -+function ConsoleKitManager() { -+ var self = new Gio.DBusProxy({ g_connection: Gio.DBus.system, -+ g_interface_name: ConsoleKitManagerInfo.name, -+ g_interface_info: ConsoleKitManagerInfo, -+ g_name: 'org.freedesktop.ConsoleKit', -+ g_object_path: '/org/freedesktop/ConsoleKit/Manager', -+ g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START | -+ Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) }); -+ -+ self._updateSessionActive = function() { -+ if (self.g_name_owner) { -+ self.GetCurrentSessionRemote(function([session]) { -+ self._ckSession = new ConsoleKitSessionProxy(Gio.DBus.system, 'org.freedesktop.ConsoleKit', session); -+ -+ self._ckSession.connectSignal('ActiveChanged', function(object, senderName, [isActive]) { -+ self.sessionActive = isActive; -+ }); -+ self._ckSession.IsActiveRemote(function([isActive]) { -+ self.sessionActive = isActive; -+ }); -+ }); -+ } else { -+ self.sessionActive = true; -+ } - } --}; --DBus.proxifyPrototype(ConsoleKitManager.prototype, ConsoleKitManagerIface); -+ self.connect('notify::g-name-owner', -+ Lang.bind(self, self._updateSessionActive)); -+ -+ self._updateSessionActive(); -+ self.init(null); -+ return self; -+} - - function AutomountManager() { - this._init(); -@@ -85,9 +78,8 @@ AutomountManager.prototype = { - this.ckListener = new ConsoleKitManager(); - - this._ssProxy = new ScreenSaver.ScreenSaverProxy(); -- this._ssProxy.connect('ActiveChanged', -- Lang.bind(this, -- this._screenSaverActiveChanged)); -+ this._ssProxy.connectSignal('ActiveChanged', -+ Lang.bind(this, this._screenSaverActiveChanged)); - - this._volumeMonitor = Gio.VolumeMonitor.get(); - -@@ -110,7 +102,7 @@ AutomountManager.prototype = { - Mainloop.idle_add(Lang.bind(this, this._startupMountAll)); - }, - -- _screenSaverActiveChanged: function(object, isActive) { -+ _screenSaverActiveChanged: function(object, senderName, [isActive]) { - if (!isActive) { - this._volumeQueue.forEach(Lang.bind(this, function(volume) { - this._checkAndMountVolume(volume); -diff --git a/js/ui/autorunManager.js b/js/ui/autorunManager.js -index 02cd4da..99b6fbe 100644 ---- a/js/ui/autorunManager.js -+++ b/js/ui/autorunManager.js -@@ -1,7 +1,6 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - - const Lang = imports.lang; --const DBus = imports.dbus; - const Gio = imports.gi.Gio; - const St = imports.gi.St; - -@@ -61,25 +60,19 @@ function startAppForMount(app, mount) { - - /******************************************/ - --const HotplugSnifferIface = { -- name: 'org.Cinnamon.HotplugSniffer', -- methods: [{ name: 'SniffURI', -- inSignature: 's', -- outSignature: 'as' }] --}; -- --const HotplugSniffer = function() { -- this._init(); --}; -+const HotplugSnifferIface = -+ -+ -+ -+ -+; - --HotplugSniffer.prototype = { -- _init: function() { -- DBus.session.proxifyObject(this, -+const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface); -+function HotplugSniffer() { -+ return new HotplugSnifferProxy(Gio.DBus.session, - 'org.Cinnamon.HotplugSniffer', - '/org/Cinnamon/HotplugSniffer'); -- }, --}; --DBus.proxifyPrototype(HotplugSniffer.prototype, HotplugSnifferIface); -+} - - function ContentTypeDiscoverer(callback) { - this._init(callback); -diff --git a/js/ui/calendar.js b/js/ui/calendar.js -index ff4777a..a97e2a9 100644 ---- a/js/ui/calendar.js -+++ b/js/ui/calendar.js -@@ -1,6 +1,5 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - --const DBus = imports.dbus; - const Clutter = imports.gi.Clutter; - const Gio = imports.gi.Gio; - const Lang = imports.lang; -@@ -194,30 +193,34 @@ EmptyEventSource.prototype = { - }; - Signals.addSignalMethods(EmptyEventSource.prototype); - --const CalendarServerIface = { -- name: 'org.Cinnamon.CalendarServer', -- methods: [{ name: 'GetEvents', -- inSignature: 'xxb', -- outSignature: 'a(sssbxxa{sv})' }], -- signals: [{ name: 'Changed', -- inSignature: '' }] --}; -- --const CalendarServer = function () { -- this._init(); --}; -- --CalendarServer.prototype = { -- _init: function() { -- DBus.session.proxifyObject(this, 'org.Cinnamon.CalendarServer', '/org/Cinnamon/CalendarServer'); -- } --}; -- --DBus.proxifyPrototype(CalendarServer.prototype, CalendarServerIface); -+const CalendarServerIface = -+ -+ -+ -+ -+ -+ -+ -+; -+ -+const CalendarServerInfo = Gio.DBusInterfaceInfo.new_for_xml(CalendarServerIface); -+ -+function CalendarServer() { -+ var self = new Gio.DBusProxy({ g_connection: Gio.DBus.session, -+ g_interface_name: CalendarServerInfo.name, -+ g_interface_info: CalendarServerInfo, -+ g_name: 'org.Cinnamon.CalendarServer', -+ g_object_path: '/org/Cinnamon/CalendarServer', -+ g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START | -+ Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) }); -+ -+ self.init(null); -+ return self; -+} - - // an implementation that reads data from a session bus service --function DBusEventSource(owner) { -- this._init(owner); -+function DBusEventSource() { -+ this._init(); - } - - function _datesEqual(a, b) { -@@ -240,16 +243,18 @@ function _dateIntervalsOverlap(a0, a1, b0, b1) - - - DBusEventSource.prototype = { -- _init: function(owner) { -+ _init: function() { - this._resetCache(); - -- this._dbusProxy = new CalendarServer(owner); -- this._dbusProxy.connect('Changed', Lang.bind(this, this._onChanged)); -+ this._dbusProxy = new CalendarServer(); -+ this._dbusProxy.connectSignal('Changed', Lang.bind(this, this._onChanged)); - -- DBus.session.watch_name('org.Cinnamon.CalendarServer', -- false, // do not launch a name-owner if none exists -- Lang.bind(this, this._onNameAppeared), -- Lang.bind(this, this._onNameVanished)); -+ this._dbusProxy.connect('notify::g-name-owner', Lang.bind(this, function() { -+ if (this._dbusProxy.g_name_owner) -+ this._onNameAppeared(); -+ else -+ this._onNameVanished(); -+ })); - }, - - _resetCache: function() { -@@ -272,7 +277,7 @@ DBusEventSource.prototype = { - this._loadEvents(false); - }, - -- _onEventsReceived: function(appointments) { -+ _onEventsReceived: function([appointments]) { - let newEvents = []; - if (appointments != null) { - for (let n = 0; n < appointments.length; n++) { -@@ -295,9 +300,9 @@ DBusEventSource.prototype = { - - _loadEvents: function(forceReload) { - if (this._curRequestBegin && this._curRequestEnd){ -- let callFlags = 0; -+ let callFlags = Gio.DBusCallFlags.NO_AUTO_START; - if (forceReload) -- callFlags |= DBus.CALL_FLAG_START; -+ callFlags = Gio.DBusCallFlags.NONE; - this._dbusProxy.GetEventsRemote(this._curRequestBegin.getTime() / 1000, - this._curRequestEnd.getTime() / 1000, - forceReload, -diff --git a/js/ui/cinnamonDBus.js b/js/ui/cinnamonDBus.js -index 600e92f..5d4eb1c 100644 ---- a/js/ui/cinnamonDBus.js -+++ b/js/ui/cinnamonDBus.js -@@ -1,7 +1,7 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - --const DBus = imports.dbus; - const Lang = imports.lang; -+const Gio = imports.gi.Gio; - - const Config = imports.misc.config; - const Flashspot = imports.ui.flashspot; -@@ -9,48 +9,53 @@ const Main = imports.ui.main; - const AppletManager = imports.ui.appletManager; - const DeskletManager = imports.ui.deskletManager; - --const CinnamonIface = { -- name: 'org.Cinnamon', -- methods: [{ name: 'Eval', -- inSignature: 's', -- outSignature: 'bs' -- }, -- { name: 'ScreenshotArea', -- inSignature: 'biiiibs', -- outSignature: '' -- }, -- { name: 'ScreenshotWindow', -- inSignature: 'bbbs', -- outSignature: '' -- }, -- { name: 'Screenshot', -- inSignature: 'bbs', -- outSignature: '' -- }, -- { -- name: 'FlashArea', -- inSignature: 'iiii', -- outSignature: '' -- }, -- { -- name: 'highlightApplet', -- inSignature: 'sb', -- outSignature: '' -- }, -- { -- name: 'activateCallback', -- inSignature: 'ssb', -- outSignature: '' -- } -- ], -- signals: [], -- properties: [{ name: 'OverviewActive', -- signature: 'b', -- access: 'readwrite' }, -- { name: 'CinnamonVersion', -- signature: 's', -- access: 'read' }] --}; -+ -+const CinnamonIface = -+ -+ -+ -+ -+ -+ -+include_cursor -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+include_cursor -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; - - function Cinnamon() { - this._init(); -@@ -58,7 +63,8 @@ function Cinnamon() { - - Cinnamon.prototype = { - _init: function() { -- DBus.session.exportObject('/org/Cinnamon', this); -+ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(CinnamonIface, this); -+ this._dbusImpl.export(Gio.DBus.session, '/org/Cinnamon'); - }, - - /** -@@ -215,5 +221,3 @@ Cinnamon.prototype = { - CinnamonVersion: Config.PACKAGE_VERSION - }; - --DBus.conformExport(Cinnamon.prototype, CinnamonIface); -- -diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js -index e909f5f..4f1f7d0 100644 ---- a/js/ui/endSessionDialog.js -+++ b/js/ui/endSessionDialog.js -@@ -18,19 +18,19 @@ - * 02110-1335, USA. - */ - --const DBus = imports.dbus; - const Lang = imports.lang; - const Signals = imports.signals; - - const AccountsService = imports.gi.AccountsService; - const Clutter = imports.gi.Clutter; -+const Gio = imports.gi.Gio; - const GLib = imports.gi.GLib; - const Gtk = imports.gi.Gtk; - const Pango = imports.gi.Pango; - const St = imports.gi.St; - const Cinnamon = imports.gi.Cinnamon; - --const GnomeSession = imports.misc.gnomeSession -+const GnomeSession = imports.misc.gnomeSession; - const ModalDialog = imports.ui.modalDialog; - const Tweener = imports.ui.tweener; - -@@ -40,20 +40,20 @@ const _ITEM_ICON_SIZE = 48; - const _DIALOG_ICON_SIZE = 32; - - const GSM_SESSION_MANAGER_LOGOUT_FORCE = 2; -- --const EndSessionDialogIface = { -- name: 'org.gnome.SessionManager.EndSessionDialog', -- methods: [{ name: 'Open', -- inSignature: 'uuuao', -- outSignature: '' -- } -- ], -- signals: [{ name: 'Canceled', -- inSignature: '', -- }], -- properties: [] --}; -- -+const EndSessionDialogIface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; -+ - const logoutDialogContent = { - subjectWithUser: _("Log Out %s"), - subject: _("Log Out"), -@@ -230,8 +230,6 @@ function _setLabelText(label, text) { - function EndSessionDialog() { - if (_endSessionDialog == null) { - this._init(); -- DBus.session.exportObject('/org/gnome/SessionManager/EndSessionDialog', -- this); - _endSessionDialog = this; - } - -@@ -328,6 +326,9 @@ EndSessionDialog.prototype = { - if (this._applicationList.get_children().length == 0) - scrollView.hide(); - })); -+ -+ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(EndSessionDialogIface, this); -+ this._dbusImpl.export(Gio.DBus.session, '/org/gnome/SessionManager/EndSessionDialog'); - }, - - _onDestroy: function() { -@@ -442,25 +443,19 @@ EndSessionDialog.prototype = { - - close: function() { - ModalDialog.ModalDialog.prototype.close.call(this); -- DBus.session.emit_signal('/org/gnome/SessionManager/EndSessionDialog', -- 'org.gnome.SessionManager.EndSessionDialog', -- 'Closed', '', []); -+ this._dbusImpl.emit_signal('Closed', null); - }, - - cancel: function() { - this._stopTimer(); -- DBus.session.emit_signal('/org/gnome/SessionManager/EndSessionDialog', -- 'org.gnome.SessionManager.EndSessionDialog', -- 'Canceled', '', []); -+ this._dbusImpl.emit_signal('Canceled', null); - this.close(global.get_current_time()); - }, - - _confirm: function(signal) { - this._fadeOutDialog(); - this._stopTimer(); -- DBus.session.emit_signal('/org/gnome/SessionManager/EndSessionDialog', -- 'org.gnome.SessionManager.EndSessionDialog', -- signal, '', []); -+ this._dbusImpl.emit_signal(signal, null); - }, - - _onOpened: function() { -@@ -512,39 +507,41 @@ EndSessionDialog.prototype = { - this._updateContent(); - }, - -- OpenAsync: function(type, timestamp, totalSecondsToStayOpen, inhibitorObjectPaths, callback) { -+ OpenAsync: function(parameters, invocation) { -+ let [type, timestamp, totalSecondsToStayOpen, inhibitorObjectPaths] = parameters; - this._totalSecondsToStayOpen = totalSecondsToStayOpen; - this._inhibitors = []; - this._applicationList.destroy_children(); - this._type = type; - -- if (!(this._type in DialogContent)) -- throw new DBus.DBusError('org.Cinnamon.ModalDialog.TypeError', -- "Unknown dialog type requested"); -+ if (!(this._type in DialogContent)) { -+ invocation.report_dbus_error('org.Cinnamon.ModalDialog.TypeError', -+ "Unknown dialog type requested"); -+ return; -+ } - - for (let i = 0; i < inhibitorObjectPaths.length; i++) { -- let inhibitor = new GnomeSession.Inhibitor(inhibitorObjectPaths[i]); -+ let inhibitor = new GnomeSession.Inhibitor(inhibitorObjectPaths[i], Lang.bind(this, function(proxy, error) { -+ this._onInhibitorLoaded(proxy); -+ })); - -- inhibitor.connect('is-loaded', -- Lang.bind(this, function() { -- this._onInhibitorLoaded(inhibitor); -- })); - this._inhibitors.push(inhibitor); - } - - this._updateButtons(); - -- if (!this.open(timestamp)) -- throw new DBus.DBusError('org.Cinnamon.ModalDialog.GrabError', -- "Cannot grab pointer and keyboard"); -+ if (!this.open(timestamp)) { -+ invocation.report_dbus_error('org.Cinnamon.ModalDialog.GrabError', -+ "Cannot grab pointer and keyboard"); -+ return; -+ } - - this._updateContent(); - - let signalId = this.connect('opened', - Lang.bind(this, function() { -- callback(); -+ invocation.return_value(null); - this.disconnect(signalId); - })); - } - }; --DBus.conformExport(EndSessionDialog.prototype, EndSessionDialogIface); -diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js -index f55cf93..69edb51 100644 ---- a/js/ui/keyboard.js -+++ b/js/ui/keyboard.js -@@ -2,7 +2,6 @@ - - const Caribou = imports.gi.Caribou; - const Clutter = imports.gi.Clutter; --const DBus = imports.dbus; - const Gdk = imports.gi.Gdk; - const Gio = imports.gi.Gio; - const GLib = imports.gi.GLib; -@@ -38,28 +37,27 @@ const PRETTY_KEYS = { - 'Alt_L': 'Alt' - }; - --const CaribouKeyboardIface = { -- name: 'org.gnome.Caribou.Keyboard', -- methods: [ { name: 'Show', -- inSignature: 'u', -- outSignature: '' -- }, -- { name: 'Hide', -- inSignature: 'u', -- outSignature: '' -- }, -- { name: 'SetCursorLocation', -- inSignature: 'iiii', -- outSignature: '' -- }, -- { name: 'SetEntryLocation', -- inSignature: 'iiii', -- outSignature: '' -- } ], -- properties: [ { name: 'Name', -- signature: 's', -- access: 'read' } ] --}; -+const CaribouKeyboardIface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; - - function Key() { - this._init.apply(this, arguments); -@@ -199,7 +197,8 @@ function Keyboard() { - - Keyboard.prototype = { - _init: function () { -- DBus.session.exportObject('/org/gnome/Caribou/Keyboard', this); -+ this._impl = Gio.DBusExportedObject.wrapJSObject(CaribouKeyboardIface, this); -+ this._impl.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard'); - - this.actor = null; - -@@ -541,7 +540,6 @@ Keyboard.prototype = { - return 'cinnamon'; - } - }; --DBus.conformExport(Keyboard.prototype, CaribouKeyboardIface); - - function KeyboardSource() { - this._init.apply(this, arguments); -diff --git a/js/ui/layout.js b/js/ui/layout.js -index 3446e7a..7523b6f 100644 ---- a/js/ui/layout.js -+++ b/js/ui/layout.js -@@ -488,12 +488,14 @@ Chrome.prototype = { - - this._screenSaverActive = false; - this._screenSaverProxy = new ScreenSaver.ScreenSaverProxy(); -- this._screenSaverProxy.connect('ActiveChanged', Lang.bind(this, this._onScreenSaverActiveChanged)); -- this._screenSaverProxy.GetActiveRemote(Lang.bind(this, -- function(result, err) { -- if (!err) -- this._onScreenSaverActiveChanged(this._screenSaverProxy, result); -- })); -+ this._screenSaverProxy.connectSignal('ActiveChanged', Lang.bind(this, function(proxy, senderName, [isActive]) { -+ this._onScreenSaverActiveChanged(isActive); -+ })); -+ this._screenSaverProxy.GetActiveRemote(Lang.bind(this, function(result, err) { -+ if (!err) -+ this._onScreenSaverActiveChanged(result[0]); -+ })); -+ - - this._relayout(); - }, -diff --git a/js/ui/magnifierDBus.js b/js/ui/magnifierDBus.js -index 72bba26..4d21797 100644 ---- a/js/ui/magnifierDBus.js -+++ b/js/ui/magnifierDBus.js -@@ -1,6 +1,6 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - --const DBus = imports.dbus; -+const Gio = imports.gi.Gio; - const Main = imports.ui.main; - - const MAG_SERVICE_NAME = 'org.gnome.Magnifier'; -@@ -10,47 +10,85 @@ const ZOOM_SERVICE_PATH = '/org/gnome/Magnifier/ZoomRegion'; - - // Subset of gnome-mag's Magnifier dbus interface -- to be expanded. See: - // http://git.gnome.org/browse/gnome-mag/tree/xml/...Magnifier.xml --const MagnifierIface = { -- name: MAG_SERVICE_NAME, -- methods: [ -- { name: 'setActive', inSignature: 'b', outSignature: '' }, -- { name: 'isActive', inSignature: '', outSignature: 'b' }, -- { name: 'showCursor', inSignature: '', outSignature: '' }, -- { name: 'hideCursor', inSignature: '', outSignature: '' }, -- { name: 'createZoomRegion', inSignature: 'ddaiai', outSignature: 'o' }, -- { name: 'addZoomRegion', inSignature: 'o', outSignature: 'b' }, -- { name: 'getZoomRegions', inSignature: '', outSignature: 'ao' }, -- { name: 'clearAllZoomRegions', inSignature: '', outSignature: '' }, -- { name: 'fullScreenCapable', inSignature: '', outSignature: 'b' }, -- -- { name: 'setCrosswireSize', inSignature: 'i', outSignature: '' }, -- { name: 'getCrosswireSize', inSignature: '', outSignature: 'i' }, -- { name: 'setCrosswireLength', inSignature: 'i', outSignature: '' }, -- { name: 'getCrosswireLength', inSignature: '', outSignature: 'i' }, -- { name: 'setCrosswireClip', inSignature: 'b', outSignature: '' }, -- { name: 'getCrosswireClip', inSignature: '', outSignature: 'b' }, -- { name: 'setCrosswireColor', inSignature: 'u', outSignature: '' }, -- { name: 'getCrosswireColor', inSignature: '', outSignature: 'u' } -- ], -- signals: [], -- properties: [] --}; -+const MagnifierIface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; - - // Subset of gnome-mag's ZoomRegion dbus interface -- to be expanded. See: - // http://git.gnome.org/browse/gnome-mag/tree/xml/...ZoomRegion.xml --const ZoomRegionIface = { -- name: ZOOM_SERVICE_NAME, -- methods: [ -- { name: 'setMagFactor', inSignature: 'dd', outSignature: ''}, -- { name: 'getMagFactor', inSignature: '', outSignature: 'dd' }, -- { name: 'setRoi', inSignature: 'ai', outSignature: '' }, -- { name: 'getRoi', inSignature: '', outSignature: 'ai' }, -- { name: 'shiftContentsTo', inSignature: 'ii', outSignature: 'b' }, -- { name: 'moveResize', inSignature: 'ai', outSignature: '' } -- ], -- signals: [], -- properties: [] --}; -+const ZoomRegionIface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; - - // For making unique ZoomRegion DBus proxy object paths of the form: - // '/org/gnome/Magnifier/ZoomRegion/zoomer0', -@@ -64,7 +102,9 @@ function CinnamonMagnifier() { - CinnamonMagnifier.prototype = { - _init: function() { - this._zoomers = {}; -- DBus.session.exportObject(MAG_SERVICE_PATH, this); -+ -+ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(MagnifierIface, this); -+ this._dbusImpl.export(Gio.DBus.session, MAG_SERVICE_PATH); - }, - - /** -@@ -195,10 +235,10 @@ CinnamonMagnifier.prototype = { - Main.magnifier.clearAllZoomRegions(); - for (let objectPath in this._zoomers) { - let proxyAndZoomer = this._zoomers[objectPath]; -+ proxyAndZoomer.proxy.destroy(); - proxyAndZoomer.proxy = null; - proxyAndZoomer.zoomRegion = null; - delete this._zoomers[objectPath]; -- DBus.session.unexportObject(proxyAndZoomer); - } - this._zoomers = {}; - }, -@@ -300,8 +340,9 @@ function CinnamonMagnifierZoomRegion(zoomerObjectPath, zoomRegion) { - CinnamonMagnifierZoomRegion.prototype = { - _init: function(zoomerObjectPath, zoomRegion) { - this._zoomRegion = zoomRegion; -- DBus.session.proxifyObject(this, ZOOM_SERVICE_NAME, zoomerObjectPath); -- DBus.session.exportObject(zoomerObjectPath, this); -+ -+ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(ZoomRegionIface, this); -+ this._dbusImpl.export(Gio.DBus.session, zoomerObjectPath); - }, - - /** -@@ -376,8 +417,9 @@ CinnamonMagnifierZoomRegion.prototype = { - moveResize: function(viewPort) { - let viewRect = { x: viewPort[0], y: viewPort[1], width: viewPort[2] - viewPort[0], height: viewPort[3] - viewPort[1] }; - this._zoomRegion.setViewPort(viewRect); -+ }, -+ -+ destroy: function() { -+ this._dbusImpl.unexport(); - } - }; -- --DBus.conformExport(CinnamonMagnifier.prototype, MagnifierIface); --DBus.conformExport(CinnamonMagnifierZoomRegion.prototype, ZoomRegionIface); -diff --git a/js/ui/main.js b/js/ui/main.js -index 99aee95..b602915 100644 ---- a/js/ui/main.js -+++ b/js/ui/main.js -@@ -1,7 +1,6 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - - const Clutter = imports.gi.Clutter; --const DBus= imports.dbus; - const Gio = imports.gi.Gio; - const GLib = imports.gi.GLib; - const Gtk = imports.gi.Gtk; -@@ -199,11 +198,6 @@ function start() { - - cinnamonDBusService = new CinnamonDBus.Cinnamon(); - lookingGlassDBusService = new LookingGlassDBus.CinnamonLookingGlass(); -- // Force a connection now; dbus.js will do this internally -- // if we use its name acquisition stuff but we aren't right -- // now; to do so we'd need to convert from its async calls -- // back into sync ones. -- DBus.session.flush(); - - // Ensure CinnamonWindowTracker and CinnamonAppUsage are initialized; this will - // also initialize CinnamonAppSystem first. CinnamonAppSystem -diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js -index 18d6615..8bed028 100644 ---- a/js/ui/messageTray.js -+++ b/js/ui/messageTray.js -@@ -1388,12 +1388,17 @@ function MessageTray() { - - MessageTray.prototype = { - _init: function() { -- this._presence = new GnomeSession.Presence(); -+ this._presence = new GnomeSession.Presence(Lang.bind(this, function(proxy, error) { -+ this._onStatusChanged(proxy.status); -+ })); -+ - this._userStatus = GnomeSession.PresenceStatus.AVAILABLE; - this._busy = false; - this._backFromAway = false; -- this._presence.connect('StatusChanged', Lang.bind(this, this._onStatusChanged)); -- this._presence.getStatus(Lang.bind(this, this._onStatusChanged)); -+ this._presence.connectSignal('StatusChanged', Lang.bind(this, function(proxy, senderName, [status]) { -+ this._onStatusChanged(status); -+ })); -+ - - this._notificationBin = new St.Bin(); - this._notificationBin.hide(); -@@ -1548,7 +1553,7 @@ MessageTray.prototype = { - this._updateState(); - }, - -- _onStatusChanged: function(presence, status) { -+ _onStatusChanged: function(status) { - this._backFromAway = (this._userStatus == GnomeSession.PresenceStatus.IDLE && this._userStatus != status); - this._userStatus = status; - -diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js -index bee8ffd..b037e07 100644 ---- a/js/ui/notificationDaemon.js -+++ b/js/ui/notificationDaemon.js -@@ -1,7 +1,7 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - - const Clutter = imports.gi.Clutter; --const DBus = imports.dbus; -+const Gio = imports.gi.Gio; - const GLib = imports.gi.GLib; - const Lang = imports.lang; - const Cinnamon = imports.gi.Cinnamon; -@@ -14,49 +14,52 @@ const Params = imports.misc.params; - - let nextNotificationId = 1; - --// Should really be defined in dbus.js --const BusIface = { -- name: 'org.freedesktop.DBus', -- methods: [{ name: 'GetConnectionUnixProcessID', -- inSignature: 's', -- outSignature: 'i' }] --}; -- --const Bus = function () { -- this._init(); --}; -- --Bus.prototype = { -- _init: function() { -- DBus.session.proxifyObject(this, 'org.freedesktop.DBus', '/org/freedesktop/DBus'); -- } --}; -+// Should really be defined in Gio.js -+const BusIface = -+ -+ -+ -+ -+; -+ -+var BusProxy = Gio.DBusProxy.makeProxyWrapper(BusIface); -+function Bus() { -+ return new BusProxy(Gio.DBus.session, 'org.freedesktop.DBus', '/org/freedesktop/DBus'); -+} - --DBus.proxifyPrototype(Bus.prototype, BusIface); -- --const NotificationDaemonIface = { -- name: 'org.freedesktop.Notifications', -- methods: [{ name: 'Notify', -- inSignature: 'susssasa{sv}i', -- outSignature: 'u' -- }, -- { name: 'CloseNotification', -- inSignature: 'u', -- outSignature: '' -- }, -- { name: 'GetCapabilities', -- inSignature: '', -- outSignature: 'as' -- }, -- { name: 'GetServerInformation', -- inSignature: '', -- outSignature: 'ssss' -- }], -- signals: [{ name: 'NotificationClosed', -- inSignature: 'uu' }, -- { name: 'ActionInvoked', -- inSignature: 'us' }] --}; -+const NotificationDaemonIface = -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+; - - const NotificationClosedReason = { - EXPIRED: 1, -@@ -88,7 +91,8 @@ function NotificationDaemon() { - - NotificationDaemon.prototype = { - _init: function() { -- DBus.session.exportObject('/org/freedesktop/Notifications', this); -+ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(NotificationDaemonIface, this); -+ this._dbusImpl.export(Gio.DBus.session, '/org/freedesktop/Notifications'); - - this._sources = []; - this._senderToPid = {}; -@@ -213,8 +217,8 @@ NotificationDaemon.prototype = { - return source; - }, - -- Notify: function(appName, replacesId, icon, summary, body, -- actions, hints, timeout) { -+ NotifyAsync: function(params, invocation) { -+ let [appName, replacesId, icon, summary, body, actions, hints, timeout] = params; - let id; - - let rewrites = rewriteRules[appName]; -@@ -257,51 +261,55 @@ NotificationDaemon.prototype = { - } - this._notifications[id] = ndata; - -- let sender = DBus.getCurrentMessageContext().sender; -+ let sender = invocation.get_sender(); - let pid = this._senderToPid[sender]; - - let source = this._getSource(appName, pid, ndata, sender, null); - - if (source) { - this._notifyForSource(source, ndata); -- return id; -+ return invocation.return_value(GLib.Variant.new('(u)', [id])); - } - - if (replacesId) { - // There's already a pending call to GetConnectionUnixProcessID, - // which will see the new notification data when it finishes, - // so we don't have to do anything. -- return id; -+ return invocation.return_value(GLib.Variant.new('(u)', [id])); - } - -- this._busProxy.GetConnectionUnixProcessIDRemote(sender, Lang.bind(this, -- function (pid, ex) { -- // The app may have updated or removed the notification -- ndata = this._notifications[id]; -- if (!ndata) -- return; -- -- source = this._getSource(appName, pid, ndata, sender, null); -- -- // We only store sender-pid entries for persistent sources. -- // Removing the entries once the source is destroyed -- // would result in the entries associated with transient -- // sources removed once the notification is shown anyway. -- // However, keeping these pairs would mean that we would -- // possibly remove an entry associated with a persistent -- // source when a transient source for the same sender is -- // distroyed. -- if (!source.isTransient) { -- this._senderToPid[sender] = pid; -- source.connect('destroy', Lang.bind(this, -- function() { -- delete this._senderToPid[sender]; -- })); -- } -- this._notifyForSource(source, ndata); -- })); -+ this._busProxy.GetConnectionUnixProcessIDRemote(sender, Lang.bind(this, function (result, excp) { -+ // The app may have updated or removed the notification -+ ndata = this._notifications[id]; -+ if (!ndata) -+ return; - -- return id; -+ if (excp) { -+ logError(excp, 'Call to GetConnectionUnixProcessID failed'); -+ return; -+ } -+ -+ let [pid] = result; -+ source = this._getSource(appName, pid, ndata, sender); -+ -+ // We only store sender-pid entries for persistent sources. -+ // Removing the entries once the source is destroyed -+ // would result in the entries associated with transient -+ // sources removed once the notification is shown anyway. -+ // However, keeping these pairs would mean that we would -+ // possibly remove an entry associated with a persistent -+ // source when a transient source for the same sender is -+ // distroyed. -+ if (!source.isTransient) { -+ this._senderToPid[sender] = pid; -+ source.connect('destroy', Lang.bind(this, function() { -+ delete this._senderToPid[sender]; -+ })); -+ } -+ this._notifyForSource(source, ndata); -+ })); -+ -+ return invocation.return_value(GLib.Variant.new('(u)', [id])); - }, - - _notifyForSource: function(source, ndata) { -@@ -441,17 +449,13 @@ NotificationDaemon.prototype = { - }, - - _emitNotificationClosed: function(id, reason) { -- DBus.session.emit_signal('/org/freedesktop/Notifications', -- 'org.freedesktop.Notifications', -- 'NotificationClosed', 'uu', -- [id, reason]); -+ this._dbusImpl.emit_signal('NotificationClosed', -+ GLib.Variant.new('(uu)', [id, reason])); - }, - - _emitActionInvoked: function(id, action) { -- DBus.session.emit_signal('/org/freedesktop/Notifications', -- 'org.freedesktop.Notifications', -- 'ActionInvoked', 'us', -- [id, action]); -+ this._dbusImpl.emit_signal('ActionInvoked', -+ GLib.Variant.new('(us)', [id, action])); - }, - - _onTrayIconAdded: function(o, icon) { -@@ -465,8 +469,6 @@ NotificationDaemon.prototype = { - } - }; - --DBus.conformExport(NotificationDaemon.prototype, NotificationDaemonIface); -- - function Source(title, pid, sender, trayIcon) { - this._init(title, pid, sender, trayIcon); - } -@@ -481,15 +483,12 @@ Source.prototype = { - - this.pid = pid; - if (sender) -- // TODO: dbus-glib implementation of watch_name() doesn’t return an id to be used for -- // unwatch_name() or implement unwatch_name(), however when we move to using GDBus implementation, -- // we should save the id here and call unwatch_name() with it in destroy(). -- // Moving to GDBus is the work in progress: https://bugzilla.gnome.org/show_bug.cgi?id=648651 -- // and https://bugzilla.gnome.org/show_bug.cgi?id=622921 . -- DBus.session.watch_name(sender, -- false, -- null, -- Lang.bind(this, this._onNameVanished)); -+ this._nameWatcherId = Gio.DBus.session.watch_name(sender, -+ Gio.BusNameWatcherFlags.NONE, -+ null, -+ Lang.bind(this, this._onNameVanished)); -+ else -+ this._nameWatcherId = 0; - - this._setApp(); - if (this.app) -@@ -596,6 +595,10 @@ Source.prototype = { - }, - - destroy: function() { -+ if (this._nameWatcherId) { -+ Gio.DBus.session.unwatch_name(this._nameWatcherId); -+ this._nameWatcherId = 0; -+ } - MessageTray.Source.prototype.destroy.call(this); - } - }; -diff --git a/js/ui/scripting.js b/js/ui/scripting.js -index 42c4f6d..9163d29 100644 ---- a/js/ui/scripting.js -+++ b/js/ui/scripting.js -@@ -1,6 +1,5 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - --const DBus = imports.dbus; - const Gio = imports.gi.Gio; - const Mainloop = imports.mainloop; - const Meta = imports.gi.Meta; -@@ -70,24 +69,21 @@ function waitLeisure() { - }; - } - --const PerfHelperIface = { -- name: 'org.Cinnamon.PerfHelper', -- methods: [{ name: 'CreateWindow', inSignature: 'iibb', outSignature: '' }, -- { name: 'WaitWindows', inSignature: '', outSignature: '' }, -- { name: 'DestroyWindows', inSignature: '', outSignature: ''}] --}; -- --const PerfHelper = function () { -- this._init(); --}; -- --PerfHelper.prototype = { -- _init: function() { -- DBus.session.proxifyObject(this, 'org.Cinnamon.PerfHelper', '/org/Cinnamon/PerfHelper'); -- } --}; -- --DBus.proxifyPrototype(PerfHelper.prototype, PerfHelperIface); -+const PerfHelperIface = -+ -+ -+ -+ -+ -+ -+ -+ -+; -+ -+var PerfHelperProxy = Gio.DBusProxy.makeProxyWrapper(PerfHelperIface); -+function PerfHelper() { -+ return new PerfHelperProxy(Gio.DBus.session, 'org.gnome.Shell.PerfHelper', '/org/gnome/Shell/PerfHelper'); -+} - - let _perfHelper = null; - function _getPerfHelper() { --- -1.8.1.6 - - -From 135d2228bbf6d3b1be5f90e0e599cd3880e06d93 Mon Sep 17 00:00:00 2001 -From: dalcde -Date: Tue, 16 Apr 2013 16:58:30 +0800 -Subject: [PATCH 07/16] [GDBus][Sound/Power Applet] Fix dbus port issues - ---- - files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -index b6b2bcd..fad39ab 100644 ---- a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -@@ -212,7 +212,7 @@ MyApplet.prototype = { - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - this.menu.addSettingsAction(_("Power Settings"), 'power'); - -- this._smProxy.connect('PropertiesChanged', Lang.bind(this, this._devicesChanged)); -+ this._smProxy.connectSignal('PropertiesChanged', Lang.bind(this, this._devicesChanged)); - this._devicesChanged(); - } - catch (e) { --- -1.8.1.6 - - -From 5880ce34538ec2791b5e58cc3ffc07e41c189c82 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Fri, 19 Apr 2013 19:09:18 -0400 -Subject: [PATCH 08/16] Fix gicon error - power applet - ---- - files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -index fad39ab..3a13eab 100644 ---- a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -@@ -323,7 +323,7 @@ MyApplet.prototype = { - let icon = this._proxy.Icon; - if (icon) { - let gicon = Gio.icon_new_for_string(icon); -- this.setGIcon(gicon); -+ this._applet_icon.gicon = gicon - this.actor.show(); - } else { - this.menu.close(); --- -1.8.1.6 - - -From 647bd58c93541acdba11cd11d586d2cb08a0a4eb Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Fri, 19 Apr 2013 19:44:33 -0400 -Subject: [PATCH 09/16] Remove unused - ---- - src/cinnamon-background-manager.c | 34 ---------------------------------- - 1 file changed, 34 deletions(-) - -diff --git a/src/cinnamon-background-manager.c b/src/cinnamon-background-manager.c -index 9d95250..67427ed 100644 ---- a/src/cinnamon-background-manager.c -+++ b/src/cinnamon-background-manager.c -@@ -66,8 +66,6 @@ struct CinnamonBackgroundManagerPrivate - - G_DEFINE_TYPE (CinnamonBackgroundManager, cinnamon_background_manager, G_TYPE_OBJECT) - --static gpointer manager_object = NULL; -- - static gboolean - dont_draw_background (CinnamonBackgroundManager *manager) - { -@@ -223,36 +221,6 @@ struct CinnamonBackgroundManagerPrivate - } - - static void --draw_background_after_session_loads (CinnamonBackgroundManager *manager) --{ -- GError *error = NULL; -- GDBusProxyFlags flags; -- -- flags = G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | -- G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START; -- manager->priv->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, -- flags, -- NULL, /* GDBusInterfaceInfo */ -- "org.gnome.SessionManager", -- "/org/gnome/SessionManager", -- "org.gnome.SessionManager", -- NULL, /* GCancellable */ -- &error); -- if (manager->priv->proxy == NULL) { -- g_warning ("Could not listen to session manager: %s", -- error->message); -- g_error_free (error); -- return; -- } -- -- manager->priv->proxy_signal_id = g_signal_connect (manager->priv->proxy, -- "g-signal", -- G_CALLBACK (on_session_manager_signal), -- manager); --} -- -- --static void - disconnect_screen_signals (CinnamonBackgroundManager *manager) - { - GdkDisplay *display; -@@ -312,8 +280,6 @@ struct CinnamonBackgroundManagerPrivate - G_CALLBACK (draw_background_changed), manager); - - setup_bg_and_draw_background (manager); -- //draw_background_after_session_loads (manager); -- - - return TRUE; - } --- -1.8.1.6 - - -From 7a8233638187d00798cf3a4b66a27d707eaec804 Mon Sep 17 00:00:00 2001 -From: dalcde -Date: Sat, 20 Apr 2013 15:42:13 +0800 -Subject: [PATCH 10/16] [GDBus][Power applet] Some fixes and cleanup - ---- - .../cinnamon/applets/power@cinnamon.org/applet.js | 52 ++++++---------------- - 1 file changed, 14 insertions(+), 38 deletions(-) - -diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -index 3a13eab..5f81d91 100644 ---- a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js -@@ -48,40 +48,11 @@ const PowerManagerInterface = - - - -- -- -- -- -- - - ; - - const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(PowerManagerInterface); - --const SettingsManagerInterface = -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --; -- --const SettingsManagerProxy = Gio.DBusProxy.makeProxyWrapper(SettingsManagerInterface); -- - function DeviceItem() { - this._init.apply(this, arguments); - } -@@ -156,8 +127,16 @@ MyApplet.prototype = { - this.menuManager.addMenu(this.menu); - - //this.set_applet_icon_symbolic_name('battery-missing'); -- this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH); -- this._smProxy = new SettingsManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH); -+ this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH, -+ Lang.bind(this, function(proxy, error) { -+ if (error) { -+ global.log(error.message); -+ -+ return; -+ } -+ this._proxy.connect('g-properties-changed', Lang.bind(this, this._devicesChanged)); -+ this._devicesChanged(); -+ })); - - let icon = this.actor.get_children()[0]; - this.actor.remove_actor(icon); -@@ -211,9 +190,6 @@ MyApplet.prototype = { - - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - this.menu.addSettingsAction(_("Power Settings"), 'power'); -- -- this._smProxy.connectSignal('PropertiesChanged', Lang.bind(this, this._devicesChanged)); -- this._devicesChanged(); - } - catch (e) { - global.logError(e); -@@ -245,14 +221,14 @@ MyApplet.prototype = { - }, - - _readPrimaryDevice: function() { -- this._proxy.GetPrimaryDeviceRemote(Lang.bind(this, function(device, error) { -+ this._proxy.GetPrimaryDeviceRemote(Lang.bind(this, function(result, error) { - if (error) { - this._hasPrimary = false; - this._primaryDeviceId = null; - this._batteryItem.actor.hide(); - return; - } -- let [device_id, device_type, icon, percentage, state, seconds] = device; -+ let [[device_id, device_type, icon, percentage, state, seconds]] = result; - if (device_type == UPDeviceType.BATTERY) { - this._hasPrimary = true; - let time = Math.round(seconds / 60); -@@ -290,7 +266,7 @@ MyApplet.prototype = { - }, - - _readOtherDevices: function() { -- this._proxy.GetDevicesRemote(Lang.bind(this, function(devices, error) { -+ this._proxy.GetDevicesRemote(Lang.bind(this, function([devices], error) { - this._deviceItems.forEach(function(i) { i.destroy(); }); - this._deviceItems = []; - -@@ -336,7 +312,7 @@ MyApplet.prototype = { - }, - - _updateLabel: function() { -- this._proxy.GetDevicesRemote(Lang.bind(this, function(devices, error) { -+ this._proxy.GetDevicesRemote(Lang.bind(this, function([devices], error) { - if (error) { - this._mainLabel.set_text(""); - return; --- -1.8.1.6 - - -From 1a74c4a4d010a6ddcd2350b1ea298710bc1c08b1 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Sat, 20 Apr 2013 10:59:54 -0400 -Subject: [PATCH 11/16] Move CLUTTER_DISABLE_XINPUT to session startup file - ---- - files/usr/bin/gnome-session-cinnamon | 2 +- - src/main.c | 3 --- - 2 files changed, 1 insertion(+), 4 deletions(-) - -diff --git a/files/usr/bin/gnome-session-cinnamon b/files/usr/bin/gnome-session-cinnamon -index 315f135..56c37f5 100755 ---- a/files/usr/bin/gnome-session-cinnamon -+++ b/files/usr/bin/gnome-session-cinnamon -@@ -1,3 +1,3 @@ - #! /bin/sh --exec gnome-session --session cinnamon "$@" -+exec CLUTTER_DISABLE_XINPUT=1 gnome-session --session cinnamon "$@" - -diff --git a/src/main.c b/src/main.c -index 9d37975..418fb60 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -257,9 +257,6 @@ - - g_option_context_free (ctx); - -- /* Disable XInput extension - required for 3.8 compatibility */ -- g_setenv ("CLUTTER_DISABLE_XINPUT", "1", TRUE); -- - meta_plugin_type_register (gnome_cinnamon_plugin_get_type ()); - - /* Prevent meta_init() from causing gtk to load gail and at-bridge */ --- -1.8.1.6 - - -From dfa107fd874866da2f634c65a90e2c13a447464c Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Sat, 20 Apr 2013 12:23:29 -0400 -Subject: [PATCH 12/16] Add Xinput disable to cinnamon2d - ---- - files/usr/bin/cinnamon2d | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/files/usr/bin/cinnamon2d b/files/usr/bin/cinnamon2d -index 1eced99..7f42517 100755 ---- a/files/usr/bin/cinnamon2d -+++ b/files/usr/bin/cinnamon2d -@@ -1,2 +1,2 @@ - #!/bin/bash --CLUTTER_PAINT=disable-clipped-redraws:disable-culling LIBGL_ALWAYS_SOFTWARE=1 CINNAMON_SOFTWARE_RENDERING=1 CINNAMON_SLOWDOWN_FACTOR=0.0001 MUFFIN_NO_SHADOWS=1 CLUTTER_DEFAULT_FPS=15 cinnamon $@ -+CLUTTER_DISABLE_XINPUT=1 CLUTTER_PAINT=disable-clipped-redraws:disable-culling LIBGL_ALWAYS_SOFTWARE=1 CINNAMON_SOFTWARE_RENDERING=1 CINNAMON_SLOWDOWN_FACTOR=0.0001 MUFFIN_NO_SHADOWS=1 CLUTTER_DEFAULT_FPS=15 cinnamon $@ --- -1.8.1.6 - - -From 28b39b2372a571ddcc1298f34f2d7e653f6b2e96 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Sat, 20 Apr 2013 12:29:43 -0400 -Subject: [PATCH 13/16] Fix session file - ---- - files/usr/bin/gnome-session-cinnamon | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/files/usr/bin/gnome-session-cinnamon b/files/usr/bin/gnome-session-cinnamon -index 56c37f5..31c9eff 100755 ---- a/files/usr/bin/gnome-session-cinnamon -+++ b/files/usr/bin/gnome-session-cinnamon -@@ -1,3 +1,3 @@ - #! /bin/sh --exec CLUTTER_DISABLE_XINPUT=1 gnome-session --session cinnamon "$@" -+CLUTTER_DISABLE_XINPUT=1 exec gnome-session --session cinnamon "$@" - --- -1.8.1.6 - - -From aba3a7666d3679e5803862af07edc47e7b093b11 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Sat, 20 Apr 2013 12:36:45 -0400 -Subject: [PATCH 14/16] Add cinnamon3d command - ---- - files/usr/bin/cinnamon3d | 2 ++ - 1 file changed, 2 insertions(+) - create mode 100644 files/usr/bin/cinnamon3d - -diff --git a/files/usr/bin/cinnamon3d b/files/usr/bin/cinnamon3d -new file mode 100644 -index 0000000..4891783 ---- /dev/null -+++ b/files/usr/bin/cinnamon3d -@@ -0,0 +1,2 @@ -+#!/bin/bash -+CLUTTER_DISABLE_XINPUT=1 cinnamon $@ --- -1.8.1.6 - - -From 3e1cdf6d88ade9abe5a0b8773b565d345c01f2cb Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Sat, 20 Apr 2013 12:37:26 -0400 -Subject: [PATCH 15/16] Fix perms - ---- - files/usr/bin/cinnamon3d | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - mode change 100644 => 100755 files/usr/bin/cinnamon3d - -diff --git a/files/usr/bin/cinnamon3d b/files/usr/bin/cinnamon3d -old mode 100644 -new mode 100755 --- -1.8.1.6 - - -From 7904eaf179918f4f97b328f2b5f340776544ca49 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Mon, 22 Apr 2013 18:27:39 -0400 -Subject: [PATCH 16/16] Sledgehammer merge of: - -f251f0b77d01cb9a80212b1dce2538c60a5bf59e - -Don't ask... ---- - .../share/cinnamon/applets/sound@cinnamon.org/applet.js | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -index c8427ac..a7b2e09 100644 ---- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -@@ -53,8 +53,8 @@ const MediaServer2PlayerIFace = - - /* global values */ - let icon_path = "/usr/share/cinnamon/theme/"; --let compatible_players = [ "clementine", "mpd", "exaile", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "guayadeque", "amarok", "googlemusicframe", "xbmc", "noise", "xnoise", "gmusicbrowser", "spotify", "audacious", "vlc", "beatbox", "songbird", "pithos", "gnome-mplayer", "nuvolaplayer" ]; --let support_seek = [ "clementine", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "amarok", "noise", "xnoise", "gmusicbrowser", "spotify", "vlc", "beatbox", "gnome-mplayer" ]; -+let compatible_players = [ "clementine", "mpd", "exaile", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "guayadeque", "amarok", "googlemusicframe", "xbmc", "noise", "xnoise", "gmusicbrowser", "spotify", "audacious", "vlc", "beatbox", "songbird", "pithos", "gnome-mplayer", "nuvolaplayer", "qmmp"]; -+let support_seek = [ "clementine", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "amarok", "noise", "xnoise", "gmusicbrowser", "spotify", "vlc", "beatbox", "gnome-mplayer", "qmmp" ]; - /* dummy vars for translation */ - let x = _("Playing"); - x = _("Paused"); - -@@ -377,7 +384,8 @@ Player.prototype = { - cover.read_async(null, null, Lang.bind(this, this._onReadCover)); - } - else { -- cover_path = decodeURIComponent(this._trackCoverFile.substr(7)); -+ cover_path = decodeURIComponent(this._trackCoverFile); -+ cover_path = cover_path.replace("file://", ""); - this._showCover(cover_path); - } - } --- -1.8.1.6 - -From 1f209cec0fa0e9d12b3c29884302f4b8e70ff4c9 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Thu, 9 May 2013 11:48:08 -0400 -Subject: [PATCH] Fix notifications and other stuff - ---- - .../cinnamon/applets/sound@cinnamon.org/applet.js | 2 +- - js/ui/notificationDaemon.js | 7 +- - src/main.c | 169 ++++++++++++--------- - 3 files changed, 103 insertions(+), 75 deletions(-) - -diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js -index b037e07..58b2df3 100644 ---- a/js/ui/notificationDaemon.js -+++ b/js/ui/notificationDaemon.js -@@ -220,7 +220,12 @@ NotificationDaemon.prototype = { - NotifyAsync: function(params, invocation) { - let [appName, replacesId, icon, summary, body, actions, hints, timeout] = params; - let id; -- -+ -+ for (let hint in hints) { -+ // unpack the variants -+ hints[hint] = hints[hint].deep_unpack(); -+ } -+ - let rewrites = rewriteRules[appName]; - if (rewrites) { - for (let i = 0; i < rewrites.length; i++) { -diff --git a/src/main.c b/src/main.c -index 418fb60..773fb65 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -34,99 +34,122 @@ - #define OVERRIDES_SCHEMA "org.cinnamon.overrides" - - static void -+cinnamon_dbus_acquire_name (GDBusProxy *bus, -+ guint32 request_name_flags, -+ guint32 *request_name_result, -+ gchar *name, -+ gboolean fatal) -+{ -+ GError *error = NULL; -+ GVariant *request_name_variant; -+ -+ if (!(request_name_variant = g_dbus_proxy_call_sync (bus, -+ "RequestName", -+ g_variant_new ("(su)", name, request_name_flags), -+ 0, /* call flags */ -+ -1, /* timeout */ -+ NULL, /* cancellable */ -+ &error))) -+ { -+ g_printerr ("failed to acquire %s: %s\n", name, error->message); -+ if (!fatal) -+ return; -+ exit (1); -+ } -+ g_variant_get (request_name_variant, "(u)", request_name_result); -+} -+ -+static void -+cinnamon_dbus_acquire_names (GDBusProxy *bus, -+ guint32 request_name_flags, -+ gchar *name, -+ gboolean fatal, ...) G_GNUC_NULL_TERMINATED; -+ -+static void -+cinnamon_dbus_acquire_names (GDBusProxy *bus, -+ guint32 request_name_flags, -+ gchar *name, -+ gboolean fatal, ...) -+{ -+ va_list al; -+ guint32 request_name_result; -+ va_start (al, fatal); -+ for (;;) -+ { -+ cinnamon_dbus_acquire_name (bus, -+ request_name_flags, -+ &request_name_result, -+ name, fatal); -+ name = va_arg (al, gchar *); -+ if (!name) -+ break; -+ fatal = va_arg (al, gboolean); -+ } -+ va_end (al); -+} -+ -+static void - cinnamon_dbus_init (gboolean replace) - { -+ GDBusConnection *session; -+ GDBusProxy *bus; - GError *error = NULL; -- DBusGConnection *session; -- DBusGProxy *bus; - guint32 request_name_flags; - guint32 request_name_result; - -- /** TODO: -- * In the future we should use GDBus for this. However, in -- * order to do that, we need to port all of the JavaScript -- * code. Otherwise, the name will be claimed on the wrong -- * connection. -- */ -- session = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); -+ session = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); - -- bus = dbus_g_proxy_new_for_name (session, -- DBUS_SERVICE_DBUS, -- DBUS_PATH_DBUS, -- DBUS_INTERFACE_DBUS); -+ if (error) { -+ g_printerr ("Failed to connect to session bus: %s", error->message); -+ exit (1); -+ } - -- request_name_flags = DBUS_NAME_FLAG_DO_NOT_QUEUE | DBUS_NAME_FLAG_ALLOW_REPLACEMENT; -+ bus = g_dbus_proxy_new_sync (session, -+ G_DBUS_PROXY_FLAGS_NONE, -+ NULL, /* interface info */ -+ "org.freedesktop.DBus", -+ "/org/freedesktop/DBus", -+ "org.freedesktop.DBus", -+ NULL, /* cancellable */ -+ &error); -+ -+ request_name_flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT; - if (replace) - request_name_flags |= DBUS_NAME_FLAG_REPLACE_EXISTING; -- if (!dbus_g_proxy_call (bus, "RequestName", &error, -- G_TYPE_STRING, CINNAMON_DBUS_SERVICE, -- G_TYPE_UINT, request_name_flags, -- G_TYPE_INVALID, -- G_TYPE_UINT, &request_name_result, -- G_TYPE_INVALID)) -- { -- g_printerr ("failed to acquire org.Cinnamon: %s\n", error->message); -- exit (1); -- } -+ -+ cinnamon_dbus_acquire_name (bus, -+ request_name_flags, -+ &request_name_result, -+ CINNAMON_DBUS_SERVICE, TRUE); - if (!(request_name_result == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER - || request_name_result == DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER)) - { -- g_printerr ("%s already exists on bus and --replace not specified\n", -- CINNAMON_DBUS_SERVICE); -+ g_printerr (CINNAMON_DBUS_SERVICE " already exists on bus and --replace not specified\n"); - exit (1); - } - -- /* Also grab org.gnome.Panel to replace any existing panel process */ -- if (!dbus_g_proxy_call (bus, "RequestName", &error, G_TYPE_STRING, -- "org.gnome.Panel", G_TYPE_UINT, -- DBUS_NAME_FLAG_REPLACE_EXISTING | request_name_flags, -- G_TYPE_INVALID, G_TYPE_UINT, -- &request_name_result, G_TYPE_INVALID)) -- { -- g_print ("failed to acquire org.gnome.Panel: %s\n", error->message); -- exit (1); -- } -- -- /* ...and the org.gnome.Magnifier service. -- */ -- if (!dbus_g_proxy_call (bus, "RequestName", &error, -- G_TYPE_STRING, MAGNIFIER_DBUS_SERVICE, -- G_TYPE_UINT, DBUS_NAME_FLAG_REPLACE_EXISTING | request_name_flags, -- G_TYPE_INVALID, -- G_TYPE_UINT, &request_name_result, -- G_TYPE_INVALID)) -- { -- g_print ("failed to acquire %s: %s\n", MAGNIFIER_DBUS_SERVICE, error->message); -- /* Failing to acquire the magnifer service is not fatal. Log the error, -- * but keep going. */ -- } -- -- /* ...and the org.freedesktop.Notifications service; we always -- * specify REPLACE_EXISTING to ensure we kill off -- * notification-daemon if it was running. -+ /* -+ * We always specify REPLACE_EXISTING to ensure we kill off -+ * the existing service if it was running. - */ -- if (!dbus_g_proxy_call (bus, "RequestName", &error, -- G_TYPE_STRING, "org.freedesktop.Notifications", -- G_TYPE_UINT, DBUS_NAME_FLAG_REPLACE_EXISTING | request_name_flags, -- G_TYPE_INVALID, -- G_TYPE_UINT, &request_name_result, -- G_TYPE_INVALID)) -- { -- g_print ("failed to acquire org.freedesktop.Notifications: %s\n", error->message); -- } -+ request_name_flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE; - -+ cinnamon_dbus_acquire_names (bus, -+ request_name_flags, -+ /* Also grab org.gnome.Panel to replace any existing panel process */ -+ "org.gnome.Panel", TRUE, -+ /* ...and the org.gnome.Magnifier service. */ -+ MAGNIFIER_DBUS_SERVICE, FALSE, -+ /* ...and the org.freedesktop.Notifications service. */ -+ "org.freedesktop.Notifications", FALSE, -+ NULL); - /* ...and the on-screen keyboard service */ -- if (!dbus_g_proxy_call (bus, "RequestName", &error, -- G_TYPE_STRING, "org.gnome.Caribou.Keyboard", -- G_TYPE_UINT, DBUS_NAME_FLAG_REPLACE_EXISTING, -- G_TYPE_INVALID, -- G_TYPE_UINT, &request_name_result, -- G_TYPE_INVALID)) -- { -- g_print ("failed to acquire org.gnome.Caribou.Keyboard: %s\n", error->message); -- } -- -+ cinnamon_dbus_acquire_name (bus, -+ DBUS_NAME_FLAG_REPLACE_EXISTING, -+ &request_name_result, -+ "org.gnome.Caribou.Keyboard", FALSE); - g_object_unref (bus); -+ g_object_unref (session); - } - - static void --- -1.8.1.6 - ---- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -+++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js -@@ -801,7 +801,7 @@ - this._players = {}; - // watch players - for (var p=0; p 1) { -+ let sources = this._ipsettings.get_value('sources'); -+ if (sources.n_children() > 1) { - this.actor.show(); - } else { - this.menu.close(); -@@ -141,25 +142,29 @@ - for (let i = 0; i < this._labelActors.length; i++) - this._labelActors[i].destroy(); - -- let short_names = this._adjustGroupNames(this._config.get_short_group_names()); -- - this._selectedLayout = null; - this._layoutItems = [ ]; - this._labelActors = [ ]; -- for (let i = 0; i < groups.length; i++) { -- let icon_name = this._config.get_group_name(i); -+ for (let i = 0; i < sources.n_children(); i++) { -+ let [type, id] = sources.get_child_value(i).deep_unpack(); -+ let displayName = id; -+ let shortName = id; -+ let xkbLayout = id; -+ if (type == 'xkb') { -+ [_exists, displayName, shortName, xkbLayout, _xkbVariant] = this._xkbInfo.get_layout_info(id); -+ } // TODO: errorhandling, handle 'ibus' -+ let icon_name = xkbLayout; // FIXME: Really? - let actor; - if (this._showFlags) - actor = new St.Icon({ icon_name: icon_name, icon_type: St.IconType.FULLCOLOR, style_class: 'popup-menu-icon' }); - else -- actor = new St.Label({ text: short_names[i] }); -- let item = new LayoutMenuItem(this._config, i, actor, groups[i]); -- item._short_group_name = short_names[i]; -+ actor = new St.Label({ text: shortName }); -+ let item = new LayoutMenuItem(this._ipsettings, id, i, actor, displayName); - item._icon_name = icon_name; - this._layoutItems.push(item); - this.menu.addMenuItem(item, i); - -- let shortLabel = new St.Label({ text: short_names[i] }); -+ let shortLabel = new St.Label({ text: shortName }); - this._labelActors.push(shortLabel); - } - -@@ -167,17 +172,17 @@ - }, - - _syncGroup: function() { -- let selected = this._config.get_current_group(); -+ let current = this._ipsettings.get_uint('current'); - - if (this._selectedLayout) { - this._selectedLayout.setShowDot(false); - this._selectedLayout = null; - } - -- let item = this._layoutItems[selected]; -+ let item = this._layoutItems[current]; - item.setShowDot(true); - -- let selectedLabel = this._labelActors[selected]; -+ let selectedLabel = this._labelActors[current]; - - if (this._showFlags) { - this.set_applet_icon_name(item._icon_name); diff --git a/srcpkgs/cinnamon/patches/switch-applications.patch b/srcpkgs/cinnamon/patches/switch-applications.patch deleted file mode 100644 index 1254a7ce459..00000000000 --- a/srcpkgs/cinnamon/patches/switch-applications.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py linuxmint-Cinnamon-b41bad0/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py ---- linuxmint-Cinnamon-b41bad0.orig/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py 2013-04-15 15:55:01.000000000 +0200 -+++ linuxmint-Cinnamon-b41bad0/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py 2013-04-24 21:19:49.262020614 +0200 -@@ -43,8 +43,8 @@ - # Cinnamon stuff - [_("Toggle Scale"), "org.gnome.desktop.wm.keybindings", "switch-to-workspace-down", True, "cinnamon"], - [_("Toggle Expo"), "org.gnome.desktop.wm.keybindings", "switch-to-workspace-up", True, "cinnamon"], -- [_("Cycle through open windows"), "org.gnome.desktop.wm.keybindings", "switch-windows", True, "cinnamon"], -- [_("Cycle backwards though open windows"), "org.gnome.desktop.wm.keybindings", "switch-windows-backward", True, "cinnamon"], -+ [_("Cycle through open windows"), "org.gnome.desktop.wm.keybindings", "switch-applications", True, "cinnamon"], -+ [_("Cycle backwards though open windows"), "org.gnome.desktop.wm.keybindings", "switch-applications-backward", True, "cinnamon"], - [_("Run dialog (must restart Cinnamon)"), "org.gnome.desktop.wm.keybindings", "panel-run-dialog", True, "cinnamon"], - [_("Menu button (must restart Cinnamon)"), "org.cinnamon.muffin", "overlay-key", False, "cinnamon"], - -diff -Naur linuxmint-Cinnamon-b41bad0.orig/js/ui/windowManager.js linuxmint-Cinnamon-b41bad0/js/ui/windowManager.js ---- linuxmint-Cinnamon-b41bad0.orig/js/ui/windowManager.js 2013-04-15 15:55:01.000000000 +0200 -+++ linuxmint-Cinnamon-b41bad0/js/ui/windowManager.js 2013-04-24 21:21:22.447677094 +0200 -@@ -131,11 +131,11 @@ - Lang.bind(this, this._showWorkspaceSwitcher)); - Meta.keybindings_set_custom_handler('switch-to-workspace-down', - Lang.bind(this, this._showWorkspaceSwitcher)); -- Meta.keybindings_set_custom_handler('switch-windows', -+ Meta.keybindings_set_custom_handler('switch-applications', - Lang.bind(this, this._startAppSwitcher)); - Meta.keybindings_set_custom_handler('switch-group', - Lang.bind(this, this._startAppSwitcher)); -- Meta.keybindings_set_custom_handler('switch-windows-backward', -+ Meta.keybindings_set_custom_handler('switch-applications-backward', - Lang.bind(this, this._startAppSwitcher)); - Meta.keybindings_set_custom_handler('switch-group-backward', - Lang.bind(this, this._startAppSwitcher)); diff --git a/srcpkgs/cinnamon/template b/srcpkgs/cinnamon/template deleted file mode 100644 index 272df6d34e7..00000000000 --- a/srcpkgs/cinnamon/template +++ /dev/null @@ -1,61 +0,0 @@ -# Template file for 'cinnamon' -pkgname=cinnamon -version=1.8.8 -revision=3 -patch_args="-Np1" -short_desc="The Cinnamon desktop (gnome-shell fork)" -maintainer="Juan RP " -license="GPL-2" -homepage="http://cinnamon.linuxmint.com/" -long_desc=" - Cinnamon is a Linux desktop which provides advanced innovative features and - a traditional user experience. - - The desktop layout is similar to Gnome 2. - The underlying technology is forked from Gnome Shell. - The emphasis is put on making users feel at home and providing them with an - easy to use and comfortable desktop experience." - -build_style=gnu-configure - -configure_args="--disable-schemas-compile --enable-compile-warnings=yes - --disable-static --with-ca-certificates=/etc/ssl/certs/ca-certificates.crt - --with-session-tracking=systemd" - -hostmakedepends="pkg-config which gnome-common gettext-devel - gnome-doc-utils intltool gobject-introspection>=1.36.0_2" - -makedepends="dbus-glib-devel libxml2-devel gtk+3-devel - libmuffin-devel>=1.8_2 gjs-devel gnome-menus-devel>=3.8 GConf-devel - libsoup-devel libcanberra-devel libcroco-devel MesaLib-devel clutter-devel>=1.14 - polkit-devel NetworkManager-devel libgnome-keyring-devel>=3.8 systemd-devel - gnome-desktop-devel>=3.8 pulseaudio-devel startup-notification-devel - gnome-settings-daemon-compat caribou mesa-demos python-gconf - python-lxml python-imaging" - - -do_fetch() { - local url="git://github.com/linuxmint/Cinnamon.git" - msg_normal "Fetching source from $url ...\n" - git clone -b ${version} $url ${pkgname}-${version} -} - -pre_configure() { - _cur="/usr/lib/gnome-session/gnome-session-check-accelerated" - _new="/usr/libexec/gnome-session-check-accelerated" - - # Fix path to gnome-session-check-accelerated - sed -i -e "s|${_cur}|${_new}|g" \ - files/usr/share/gnome-session/sessions/cinnamon.session - ./autogen.sh -} - -cinnamon_package() { - pycompile_dirs="usr/lib/cinnamon-settings usr/lib/cinnamon-menu-editor" - depends="desktop-file-utils caribou pulseaudio mesa-demos - libmuffin>=1.8.2 muffin>=1.8.2 gnome-settings-daemon-compat - python-gconf python-lxml python-imaging" - pkg_install() { - vmove all - } -} diff --git a/srcpkgs/gnome-settings-daemon-compat/patches/draw-background-unconditionally.patch b/srcpkgs/gnome-settings-daemon-compat/patches/draw-background-unconditionally.patch deleted file mode 100644 index c279420de6a..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/draw-background-unconditionally.patch +++ /dev/null @@ -1,162 +0,0 @@ -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 deleted file mode 100644 index fe927276764..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/move-desktop-file.patch +++ /dev/null @@ -1,60 +0,0 @@ -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 deleted file mode 100644 index b843ac2ce1c..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/remove-libgsd-dependency.patch +++ /dev/null @@ -1,160 +0,0 @@ -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 deleted file mode 100644 index dc769de4ea0..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/revert-input-sources.patch +++ /dev/null @@ -1,123 +0,0 @@ -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 deleted file mode 100644 index 007cc2ae33b..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/series +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index dc5fd260e6b..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/sessionisactive-port.patch +++ /dev/null @@ -1,73 +0,0 @@ -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 deleted file mode 100644 index b52de042ff0..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/standalone-background-helper.patch +++ /dev/null @@ -1,437 +0,0 @@ -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 deleted file mode 100644 index 61be1737efe..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/standalone-media-keys-helper.patch +++ /dev/null @@ -1,564 +0,0 @@ -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 deleted file mode 100644 index 67c8082cbb7..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/patches/xinput.patch +++ /dev/null @@ -1,36 +0,0 @@ -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 deleted file mode 100644 index 2a124546b9f..00000000000 --- a/srcpkgs/gnome-settings-daemon-compat/template +++ /dev/null @@ -1,43 +0,0 @@ -# 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 xf86-input-wacom-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 - } -} diff --git a/srcpkgs/libmuffin b/srcpkgs/libmuffin deleted file mode 120000 index 2fe6f88e3f7..00000000000 --- a/srcpkgs/libmuffin +++ /dev/null @@ -1 +0,0 @@ -muffin \ No newline at end of file diff --git a/srcpkgs/libmuffin-devel b/srcpkgs/libmuffin-devel deleted file mode 120000 index 2fe6f88e3f7..00000000000 --- a/srcpkgs/libmuffin-devel +++ /dev/null @@ -1 +0,0 @@ -muffin \ No newline at end of file diff --git a/srcpkgs/muffin/template b/srcpkgs/muffin/template deleted file mode 100644 index 89eec83602c..00000000000 --- a/srcpkgs/muffin/template +++ /dev/null @@ -1,51 +0,0 @@ -# Template file for 'muffin' -pkgname=muffin -version=1.8.2 -revision=1 -build_style=gnu-configure -configure_args="--disable-static" -hostmakedepends="which automake gettext-devel pkg-config intltool - gnome-doc-utils gnome-common>=3.7.4_2 gobject-introspection>=1.36.0_2" -makedepends="clutter-devel>=1.14 GConf-devel libcanberra-devel libXxf86vm-devel - libSM-devel startup-notification-devel gsettings-desktop-schemas-devel>=3.8 zenity" -short_desc="The Cinnamon window manager" -maintainer="Juan RP " -license="GPL-3" -homepage="http://github.com/linuxmint/muffin.git" - - -do_fetch() { - local url="git://github.com/linuxmint/muffin.git" - msg_normal "Fetching source from $url ...\n" - git clone -b ${version} $url ${pkgname}-${version} -} - -pre_configure() { - ./autogen.sh -} - -libmuffin_package() { - short_desc+=" - runtime library" - pkg_install() { - vmove "usr/lib/*.so.*" - vmove "usr/lib/muffin/*.typelib" - } -} - -libmuffin-devel_package() { - depends="libmuffin-${version}_${revision}" - short_desci+=" - development files" - pkg_install() { - vmove usr/include - vmove usr/lib/pkgconfig - vmove "usr/lib/*.so" - vmove "usr/lib/muffin/*.gir" - } -} - -muffin_package() { - depends="zenity desktop-file-utils gsettings-desktop-schemas>=3.8" - pkg_install() { - vmove all - } -}