summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Perier <mrpouet@gentoo.org>2009-11-17 18:58:32 +0000
committerRomain Perier <mrpouet@gentoo.org>2009-11-17 18:58:32 +0000
commitd732089bf860923e0e4269f23090d9acebf97f25 (patch)
tree1c3174600e0a58ac944f4f90727ac1b0e1e05329 /gnome-base/gnome-control-center
parentReplaced 1.15.5 with fixed 1.15.5.1 (http://packages.qa.debian.org/d/dpkg/new... (diff)
downloadgentoo-2-d732089bf860923e0e4269f23090d9acebf97f25.tar.gz
gentoo-2-d732089bf860923e0e4269f23090d9acebf97f25.tar.bz2
gentoo-2-d732089bf860923e0e4269f23090d9acebf97f25.zip
Add functionality for setting the default background for gdm, per bug #293439. Many thanks to Peter Henriksson. Fix QA.
(Portage version: 2.2_rc50/cvs/Linux x86_64)
Diffstat (limited to 'gnome-base/gnome-control-center')
-rw-r--r--gnome-base/gnome-control-center/ChangeLog11
-rw-r--r--gnome-base/gnome-control-center/files/gnome-control-center-2.28.1-gdm-default-bg.patch160
-rw-r--r--gnome-base/gnome-control-center/gnome-control-center-2.28.1-r1.ebuild95
3 files changed, 265 insertions, 1 deletions
diff --git a/gnome-base/gnome-control-center/ChangeLog b/gnome-base/gnome-control-center/ChangeLog
index 364e4aba2bf3..c837cbad5c23 100644
--- a/gnome-base/gnome-control-center/ChangeLog
+++ b/gnome-base/gnome-control-center/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for gnome-base/gnome-control-center
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/ChangeLog,v 1.39 2009/11/05 20:38:58 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/ChangeLog,v 1.40 2009/11/17 18:58:31 mrpouet Exp $
+
+*gnome-control-center-2.28.1-r1 (17 Nov 2009)
+
+ 17 Nov 2009; Romain Perier <mrpouet@gentoo.org>
+ +gnome-control-center-2.28.1-r1.ebuild,
+ +files/gnome-control-center-2.28.1-gdm-default-bg.patch:
+ Add functionality for setting the default background for gdm,
+ per bug #293439. Many thanks to Peter Henriksson. Fix QA.
+
05 Nov 2009; Markus Meier <maekke@gentoo.org>
gnome-control-center-2.26.0.ebuild:
diff --git a/gnome-base/gnome-control-center/files/gnome-control-center-2.28.1-gdm-default-bg.patch b/gnome-base/gnome-control-center/files/gnome-control-center-2.28.1-gdm-default-bg.patch
new file mode 100644
index 000000000000..bfd44cf7c768
--- /dev/null
+++ b/gnome-base/gnome-control-center/files/gnome-control-center-2.28.1-gdm-default-bg.patch
@@ -0,0 +1,160 @@
+From d97abc9405b138f9d5ed600b85a9c1d0a97f1877 Mon Sep 17 00:00:00 2001
+From: Peter Henriksson <peter.henriksson@gmail.com>
+Date: Mon, 16 Nov 2009 23:45:56 +0100
+Subject: [PATCH] Add functionality for setting the default background
+
+Rebased patch from gnome bug #536531.
+---
+ capplets/appearance/appearance-desktop.c | 115 ++++++++++++++++++++++++++++++
+ 1 files changed, 115 insertions(+), 0 deletions(-)
+
+diff --git a/capplets/appearance/appearance-desktop.c b/capplets/appearance/appearance-desktop.c
+index b0043dc..2568e35 100644
+--- a/capplets/appearance/appearance-desktop.c
++++ b/capplets/appearance/appearance-desktop.c
+@@ -30,6 +30,7 @@
+ #include <gconf/gconf-client.h>
+ #include <libgnomeui/gnome-desktop-thumbnail.h>
+ #include <libgnomeui/gnome-bg.h>
++#include <dbus/dbus-glib.h>
+
+ enum {
+ TARGET_URI_LIST,
+@@ -984,6 +985,100 @@ wp_select_after_realize (GtkWidget *widget,
+ select_item (data, item, TRUE);
+ }
+
++static char *background_keys[7] = {
++ "/desktop/gnome/background/picture_filename",
++ "/desktop/gnome/background/picture_opacity",
++ "/desktop/gnome/background/picture_options",
++ "/desktop/gnome/background/color_shading_type",
++ "/desktop/gnome/background/primary_color",
++ "/desktop/gnome/background/secondary_color",
++ NULL
++};
++
++static void
++set_background (GtkAction *action, gpointer data)
++{
++ AppearanceData *adata = (AppearanceData *)data;
++ DBusGProxy *proxy;
++ DBusGConnection *connection;
++ GError *error;
++
++ gconf_client_suggest_sync (adata->client, NULL);
++
++ error = NULL;
++ connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
++ if (error != NULL) {
++ g_warning ("failed to get system bus connection: %s", error->message);
++ g_error_free (error);
++ return;
++ }
++
++ proxy = dbus_g_proxy_new_for_name (connection,
++ "org.gnome.GConf.Defaults",
++ "/",
++ "org.gnome.GConf.Defaults");
++ if (proxy == NULL) {
++ g_warning ("Cannot connect to defaults mechanism");
++ return;
++ }
++
++ if (!dbus_g_proxy_call (proxy, "SetSystem",
++ &error,
++ G_TYPE_STRV, background_keys,
++ G_TYPE_STRV, NULL,
++ G_TYPE_INVALID,
++ G_TYPE_INVALID)) {
++ g_warning ("error calling SetSystem: %s\n", error->message);
++ g_error_free (error);
++ }
++
++ g_object_unref (proxy);
++}
++
++static void
++check_can_set_background (GtkAction *action)
++{
++ DBusGProxy *proxy;
++ DBusGConnection *connection;
++ GError *error;
++ guint result;
++
++ result = 0;
++
++ error = NULL;
++ connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
++ if (error != NULL) {
++ g_warning ("failed to get system bus connection: %s", error->message);
++ g_error_free (error);
++ goto out;
++ }
++
++ proxy = dbus_g_proxy_new_for_name (connection,
++ "org.gnome.GConf.Defaults",
++ "/",
++ "org.gnome.GConf.Defaults");
++ if (proxy == NULL) {
++ g_warning ("Cannot connect to defaults mechanism");
++ goto out;
++ }
++
++ if (!dbus_g_proxy_call (proxy, "CanSetSystem",
++ &error,
++ G_TYPE_STRV, background_keys,
++ G_TYPE_INVALID,
++ G_TYPE_UINT, &result,
++ G_TYPE_INVALID)) {
++ g_warning ("error calling CanSetSystem: %s\n", error->message);
++ g_error_free (error);
++ }
++
++ g_print ("calling CanSetSystem: %d\n", result);
++ g_object_unref (proxy);
++
++out:
++ gtk_action_set_visible (action, result != 0);
++}
++
+ static GdkPixbuf *buttons[3];
+
+ static void
+@@ -1146,6 +1241,8 @@ desktop_init (AppearanceData *data,
+ {
+ GtkWidget *add_button, *w;
+ GtkCellRenderer *cr;
++ GtkAction *action;
++ GtkWidget *widget, *box, *button;
+ char *url;
+
+ g_object_set (gtk_settings_get_default (), "gtk-tooltip-timeout", 500, NULL);
+@@ -1295,6 +1392,24 @@ desktop_init (AppearanceData *data,
+ /* create the file selector later to save time on startup */
+ data->wp_filesel = NULL;
+
++ widget = appearance_capplet_get_widget (data, "background_vbox");
++ box = gtk_hbox_new (FALSE, 0);
++ gtk_box_pack_end (GTK_BOX (widget), box, FALSE, FALSE, 0);
++
++ action = gtk_action_new ("set-system",
++ _("Make Default"),
++ _("Set the current background as the system-wide default"),
++ NULL);
++ check_can_set_background (action);
++
++ button = gtk_button_new ();
++ gtk_activatable_set_related_action (GTK_ACTIVATABLE (button), action);
++ gtk_widget_set_no_show_all (button, TRUE);
++ g_object_unref (action);
++
++ gtk_box_pack_end (GTK_BOX (box), button, FALSE, FALSE, 0);
++
++ g_signal_connect (action, "activate", G_CALLBACK (set_background), data);
+ }
+
+ void
+--
+1.6.5.2
+
diff --git a/gnome-base/gnome-control-center/gnome-control-center-2.28.1-r1.ebuild b/gnome-base/gnome-control-center/gnome-control-center-2.28.1-r1.ebuild
new file mode 100644
index 000000000000..c91168c639f5
--- /dev/null
+++ b/gnome-base/gnome-control-center/gnome-control-center-2.28.1-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/gnome-control-center-2.28.1-r1.ebuild,v 1.1 2009/11/17 18:58:31 mrpouet Exp $
+
+EAPI="2"
+
+inherit eutils gnome2
+
+DESCRIPTION="The gnome2 Desktop configuration tool"
+HOMEPAGE="http://www.gnome.org/"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="eds"
+
+RDEPEND="x11-libs/libXft
+ >=x11-libs/libXi-1.2
+ >=x11-libs/gtk+-2.15.0
+ >=dev-libs/glib-2.17.4
+ >=gnome-base/gconf-2.0
+ >=gnome-base/librsvg-2.0
+ >=gnome-base/nautilus-2.6
+ >=media-libs/fontconfig-1
+ >=dev-libs/dbus-glib-0.73
+ >=x11-libs/libxklavier-4.0
+ >=x11-wm/metacity-2.23.1
+ >=gnome-base/libgnomekbd-2.27.4
+ >=gnome-base/gnome-desktop-2.27.90
+ >=gnome-base/gnome-menus-2.11.1
+ gnome-base/gnome-settings-daemon
+
+ dev-libs/libunique
+ x11-libs/pango
+ dev-libs/libxml2
+ media-libs/freetype
+ >=media-libs/libcanberra-0.4[gtk]
+
+ eds? ( >=gnome-extra/evolution-data-server-1.7.90 )
+
+ x11-apps/xmodmap
+ x11-libs/libXScrnSaver
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXxf86misc
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXcursor"
+DEPEND="${RDEPEND}
+ x11-proto/scrnsaverproto
+ x11-proto/xextproto
+ x11-proto/xproto
+ x11-proto/xf86miscproto
+ x11-proto/kbproto
+ x11-proto/randrproto
+ x11-proto/renderproto
+
+ sys-devel/gettext
+ >=dev-util/intltool-0.40
+ >=dev-util/pkgconfig-0.19
+ dev-util/desktop-file-utils
+
+ app-text/scrollkeeper
+ >=app-text/gnome-doc-utils-0.10.1"
+# Needed for autoreconf
+# gnome-base/gnome-common
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+pkg_setup() {
+ G2CONF="${G2CONF}
+ --disable-update-mimedb
+ --disable-static
+ $(use_enable eds aboutme)"
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Fix intltoolize broken file, see upstream #577133
+ sed "s:'\^\$\$lang\$\$':\^\$\$lang\$\$:g" -i po/Makefile.in.in || die "sed failed"
+
+ # Fix compilation on fbsd, bug #256958
+ epatch "${FILESDIR}/${PN}-2.24.0.1-fbsd.patch"
+ # Add functionality for setting the default background in gdm,
+ # bug 293439.
+ epatch "${FILESDIR}/${P}-gdm-default-bg.patch"
+}
+
+src_install() {
+ gnome2_src_install
+ # gmodule is used to load plugins
+ # (on POSIX systems gmodule uses dlopen)
+ find "${D}" -name "*.la" -delete || die "remove of la files failed"
+}