rpms/control-center/devel make-default.patch, NONE, 1.1 control-center.spec, 1.359, 1.360
Matthias Clasen (mclasen)
fedora-extras-commits at redhat.com
Sat May 3 04:02:22 UTC 2008
- Previous message (by thread): rpms/kernel/devel linux-2.6-defaults-pci_no_msi.patch, NONE, 1.1 linux-2.6-drm-fix-master-perm.patch, NONE, 1.1 linux-2.6-drm-modesetting-oops-fixes.patch, NONE, 1.1 linux-2.6-libata-ata_piix-check-sidpr.patch, NONE, 1.1 linux-2.6-libata-force-hardreset-in-sleep-mode.patch, NONE, 1.1 linux-2.6-md-fix-oops-in-rdev_attr_store.patch, NONE, 1.1 linux-2.6-wireless-pending-too.patch, 1.5, 1.6 linux-2.6.25-sparc64-semctl.patch, NONE, 1.1 patch-2.6.25.1.bz2.sign, NONE, 1.1 .cvsignore, 1.809, 1.810 kernel.spec, 1.623, 1.624 linux-2.6-sata-eeepc-faster.patch, 1.2, 1.3 linux-2.6-wireless-pending.patch, 1.45, 1.46 sources, 1.770, 1.771 upstream, 1.689, 1.690
- Next message (by thread): rpms/control-center/devel make-default.patch,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/extras/rpms/control-center/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26145
Modified Files:
control-center.spec
Added Files:
make-default.patch
Log Message:
Add a button to set the default background
make-default.patch:
--- NEW FILE make-default.patch ---
diff -up gnome-control-center-2.23.1/capplets/appearance/appearance-desktop.c.make-default gnome-control-center-2.23.1/capplets/appearance/appearance-desktop.c
--- gnome-control-center-2.23.1/capplets/appearance/appearance-desktop.c.make-default 2008-05-02 23:43:45.000000000 -0400
+++ gnome-control-center-2.23.1/capplets/appearance/appearance-desktop.c 2008-05-02 23:50:10.000000000 -0400
@@ -31,6 +31,9 @@
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include <libgnomeui/gnome-bg.h>
+#include <dbus/dbus-glib.h>
+#include <polkit-gnome/polkit-gnome.h>
+
enum {
TARGET_URI_LIST,
TARGET_BGIMAGE
@@ -890,6 +893,49 @@ wp_select_after_realize (GtkWidget *widg
select_item (data, item, TRUE);
}
+static void
+set_background (GtkAction *action, gpointer data)
+{
+ DBusGProxy *proxy;
+ DBusGConnection *connection;
+ GError *error;
+ char *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
+ };
+
+ 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;
+ }
+
+ dbus_g_proxy_call (proxy, "SetSystem",
+ &error,
+ G_TYPE_STRV, keys,
+ G_TYPE_STRV, NULL,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
+
+ g_object_unref (proxy);
+}
+
void
desktop_init (AppearanceData *data,
const gchar **uris)
@@ -899,6 +945,9 @@ desktop_init (AppearanceData *data,
GtkFileFilter *filter;
const gchar *pictures;
const gchar *start_dir;
+ PolKitAction *pk_action;
+ PolKitGnomeAction *action;
+ GtkWidget *widget, *box, *button;
g_object_set (gtk_settings_get_default (), "gtk-tooltip-timeout", 500, NULL);
@@ -1069,6 +1118,26 @@ desktop_init (AppearanceData *data,
g_signal_connect (data->wp_filesel, "update-preview",
(GCallback) wp_update_preview, data);
+
+ widget = glade_xml_get_widget (data->xml, "background_vbox");
+ box = gtk_hbox_new (FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (widget), box, FALSE, FALSE, 0);
+
+ pk_action = polkit_action_new ();
+ polkit_action_set_action_id (pk_action, "org.gnome.gconf.defaults.set-default-background");
+
+ action = polkit_gnome_action_new_default ("set-system",
+ pk_action,
+ _("Make Default"),
+ _("Set the current background as the system-wide default"));
+ g_object_set (action, "no-visible", FALSE, NULL);
+
+ polkit_action_unref (pk_action);
+ button = polkit_gnome_action_create_button (action);
+ gtk_box_pack_end (GTK_BOX (box), button, FALSE, FALSE, 0);
+
+ g_signal_connect (action, "activate",
+ G_CALLBACK (set_background), NULL);
}
void
diff -up gnome-control-center-2.23.1/capplets/appearance/Makefile.am.make-default gnome-control-center-2.23.1/capplets/appearance/Makefile.am
--- gnome-control-center-2.23.1/capplets/appearance/Makefile.am.make-default 2008-05-02 23:50:20.000000000 -0400
+++ gnome-control-center-2.23.1/capplets/appearance/Makefile.am 2008-05-02 23:53:37.000000000 -0400
@@ -66,3 +66,14 @@ INCLUDES = \
-DWALLPAPER_DATADIR="\"$(wallpaperdir)\""
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
+
+polkitdir = $(datadir)/PolicyKit/policy
+polkit_in_files = org.gnome.gconf.defaults.policy.in
+
+ at INTLTOOL_POLICY_RULE@
+polkit_DATA = $(polkit_in_files:.policy.in=.policy)
+
+check:
+ $(POLKIT_POLICY_FILE_VALIDATE) $(polkit_DATA)
+
+EXTRA_DIST = $(polkit_in_files)
diff -up gnome-control-center-2.23.1/capplets/appearance/org.gnome.gconf.defaults.policy.in.make-default gnome-control-center-2.23.1/capplets/appearance/org.gnome.gconf.defaults.policy.in
--- gnome-control-center-2.23.1/capplets/appearance/org.gnome.gconf.defaults.policy.in.make-default 2008-05-02 23:49:43.000000000 -0400
+++ gnome-control-center-2.23.1/capplets/appearance/org.gnome.gconf.defaults.policy.in 2008-05-02 23:57:52.000000000 -0400
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
+<policyconfig>
+ <vendor>The GNOME Project</vendor>
+ <vendor_url>http://www.gnome.org</vendor_url>
+ <icon_name>gnome-settings-theme</icon_name>
+
+ <action id="org.gnome.gconf.defaults.set-default-background">
+ <description>Change the default background image</description>
+ <message>Privileges are required to change the default background</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.gnome.gconf.defaults.set-system.prefix">/desktop/gnome/background</annotate>
+ </action>
+
+</policyconfig>
diff -up gnome-control-center-2.23.1/configure.in.make-default gnome-control-center-2.23.1/configure.in
--- gnome-control-center-2.23.1/configure.in.make-default 2008-05-02 23:43:45.000000000 -0400
+++ gnome-control-center-2.23.1/configure.in 2008-05-02 23:43:45.000000000 -0400
@@ -105,6 +105,7 @@ PKG_CHECK_MODULES(TYPING, glib-2.0 > 2.1
PKG_CHECK_MODULES(LIBBACKGROUND, glib-2.0 gobject-2.0 gdk-2.0 gconf-2.0)
PKG_CHECK_MODULES(LIBSOUNDS, gio-2.0 libgnome-2.0 libgnomeui-2.0)
PKG_CHECK_MODULES(GSD_DBUS, gnome-settings-daemon)
+PKG_CHECK_MODULES(POLKIT_GNOME, polkit-gnome)
gtk_lib_dir=`$PKG_CONFIG --variable libdir gtk+-2.0`
gtk_binary_version=`$PKG_CONFIG --variable gtk_binary_version gtk+-2.0`
diff -up gnome-control-center-2.23.1/po/POTFILES.in.make-default gnome-control-center-2.23.1/po/POTFILES.in
--- gnome-control-center-2.23.1/po/POTFILES.in.make-default 2008-05-02 23:54:01.000000000 -0400
+++ gnome-control-center-2.23.1/po/POTFILES.in 2008-05-02 23:54:51.000000000 -0400
@@ -21,6 +21,7 @@ capplets/appearance/data/gnome-theme-ins
capplets/appearance/data/gnome-theme-package.xml.in
capplets/appearance/gnome-wp-info.c
capplets/appearance/gnome-wp-item.c
+capplets/appearance/org.gnome.gconf.defaults.policy.in
capplets/appearance/theme-installer.c
capplets/appearance/theme-save.c
capplets/appearance/theme-util.c
Index: control-center.spec
===================================================================
RCS file: /cvs/extras/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.359
retrieving revision 1.360
diff -u -r1.359 -r1.360
--- control-center.spec 25 Apr 2008 19:03:20 -0000 1.359
+++ control-center.spec 3 May 2008 04:01:43 -0000 1.360
@@ -22,7 +22,7 @@
Summary: GNOME Control Center
Name: control-center
Version: 2.23.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
License: GPLv2+ and GFDL
Group: User Interface/Desktops
@@ -35,6 +35,8 @@
# Fix some useless warnings in libslab
# http://bugzilla.gnome.org/show_bug.cgi?id=439398
Patch6: gnome-control-center-2.19.90-no-warnings.patch
+#
+Patch7: make-default.patch
# call the Fedora/RHEL graphical passwd changing apps
Patch95: control-center-2.21.92-passwd.patch
@@ -108,6 +110,7 @@
BuildRequires: dbus-devel >= 0.90
BuildRequires: dbus-glib-devel >= 0.70
BuildRequires: scrollkeeper
+BuildRequires: PolicyKit-gnome-devel
Requires(preun): GConf2
Requires(pre): GConf2
@@ -164,6 +167,7 @@
pushd libslab
%patch6 -p0 -b .warnings
popd
+%patch7 -p1 -b .make-default
# vendor configuration patches
%patch95 -p1 -b .passwd
@@ -348,6 +352,9 @@
%dir %{_datadir}/gnome-control-center/keybindings
%changelog
+* Fri May 2 2008 Matthias Clasen <mclasen at redhat.com> - 2.23.1-2
+- Add a button to change the default background
+
* Fri Apr 25 2008 Matthias Clasen <mclasen at redhat.com> - 2.23.1-1
- Update to 2.23.1
- Previous message (by thread): rpms/kernel/devel linux-2.6-defaults-pci_no_msi.patch, NONE, 1.1 linux-2.6-drm-fix-master-perm.patch, NONE, 1.1 linux-2.6-drm-modesetting-oops-fixes.patch, NONE, 1.1 linux-2.6-libata-ata_piix-check-sidpr.patch, NONE, 1.1 linux-2.6-libata-force-hardreset-in-sleep-mode.patch, NONE, 1.1 linux-2.6-md-fix-oops-in-rdev_attr_store.patch, NONE, 1.1 linux-2.6-wireless-pending-too.patch, 1.5, 1.6 linux-2.6.25-sparc64-semctl.patch, NONE, 1.1 patch-2.6.25.1.bz2.sign, NONE, 1.1 .cvsignore, 1.809, 1.810 kernel.spec, 1.623, 1.624 linux-2.6-sata-eeepc-faster.patch, 1.2, 1.3 linux-2.6-wireless-pending.patch, 1.45, 1.46 sources, 1.770, 1.771 upstream, 1.689, 1.690
- Next message (by thread): rpms/control-center/devel make-default.patch,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list