rpms/control-center/devel 0001-Port-about-me-to-PolicyKit-1.0.patch, NONE, 1.1 control-center.spec, 1.465, 1.466 make-default.patch, 1.11, 1.12 polkit1.patch, 1.5, NONE
Bastien Nocera
hadess at fedoraproject.org
Fri Aug 14 12:58:15 UTC 2009
Author: hadess
Update of /cvs/pkgs/rpms/control-center/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2326
Modified Files:
control-center.spec make-default.patch
Added Files:
0001-Port-about-me-to-PolicyKit-1.0.patch
Removed Files:
polkit1.patch
Log Message:
* Fri Aug 14 2009 Bastien Nocera <bnocera at redhat.com> 2.27.5-1
- Update to 2.27.5
- Port PolicyKit patches to latest version
- Disable gecos patch, needs porting to GtkBuilder
0001-Port-about-me-to-PolicyKit-1.0.patch:
capplets/about-me/Makefile.am | 3 +--
capplets/about-me/gnome-about-me.c | 37 -------------------------------------
configure.in | 6 ------
3 files changed, 1 insertion(+), 45 deletions(-)
--- NEW FILE 0001-Port-about-me-to-PolicyKit-1.0.patch ---
>From fcff611fdd771580e303db0f36638c2f9e0f3f8e Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Fri, 14 Aug 2009 12:12:29 +0100
Subject: [PATCH] Port about-me to PolicyKit 1.0
Remove the polkit-gnome dependency. It's unlikely that admins
would require a password for the user to enroll themselves,
and we can't modify other users' fingerprints either.
---
capplets/about-me/Makefile.am | 3 +-
capplets/about-me/gnome-about-me.c | 37 ------------------------------------
configure.in | 5 ----
3 files changed, 1 insertions(+), 44 deletions(-)
diff --git a/capplets/about-me/Makefile.am b/capplets/about-me/Makefile.am
index 32ebdaa..ab2d8df 100644
--- a/capplets/about-me/Makefile.am
+++ b/capplets/about-me/Makefile.am
@@ -23,7 +23,7 @@ gnome_about_me_SOURCES = \
if BUILD_ABOUTME
bin_PROGRAMS = gnome-about-me
-gnome_about_me_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(LIBEBOOK_LIBS) $(POLKIT_GNOME_LIBS)
+gnome_about_me_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(LIBEBOOK_LIBS)
gnome_about_me_LDFLAGS = -export-dynamic
@INTLTOOL_DESKTOP_RULE@
@@ -37,7 +37,6 @@ ui_DATA = $(ui_files)
INCLUDES = \
$(GNOMECC_CAPPLETS_CFLAGS) \
$(LIBEBOOK_CFLAGS) \
- $(POLKIT_GNOME_CFLAGS) \
-DDATADIR="\"$(datadir)\"" \
-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
-DGNOMECC_UI_DIR="\"$(uidir)\"" \
diff --git a/capplets/about-me/gnome-about-me.c b/capplets/about-me/gnome-about-me.c
index 8119c3c..5a40874 100644
--- a/capplets/about-me/gnome-about-me.c
+++ b/capplets/about-me/gnome-about-me.c
@@ -35,10 +35,6 @@
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include <libgnomeui/gnome-desktop-thumbnail.h>
-#ifdef HAVE_POLKIT
-#include <polkit-gnome/polkit-gnome.h>
-#endif
-
#include "e-image-chooser.h"
#include "gnome-about-me-password.h"
#include "gnome-about-me-fingerprint.h"
@@ -167,28 +163,6 @@ about_me_error (GtkWindow *parent, gchar *str)
gtk_widget_destroy (dialog);
}
-#ifdef HAVE_POLKIT
-static GtkWidget *
-create_fingerprint_button (const char *msg, const char *name)
-{
- GtkWidget *button;
- PolKitAction *action;
- PolKitGnomeAction *gaction;
-
- action = polkit_action_new_from_string_representation ("net.reactivated.fprint.device.enroll");
- gaction = polkit_gnome_action_new_default (name,
- action,
- msg,
- NULL);
- polkit_action_unref (action);
-
- button = polkit_gnome_action_create_button (gaction);
- g_object_unref (gaction);
-
- return button;
-}
-#endif /* HAVE_POLKIT */
-
/********************/
static void
about_me_destroy (GnomeAboutMe *me)
@@ -1011,19 +985,8 @@ about_me_setup_dialog (void)
g_signal_connect (widget, "clicked",
G_CALLBACK (about_me_image_clicked_cb), me);
-#ifdef HAVE_POLKIT
- gtk_widget_destroy (WID ("enable_fingerprint_button"));
- gtk_widget_destroy (WID ("disable_fingerprint_button"));
-
- me->enable_fingerprint_button = create_fingerprint_button (_("Enable _Fingerprint Login..."), "enable-action");
- gtk_container_add (GTK_CONTAINER (WID("buttons_vbox")), me->enable_fingerprint_button);
-
- me->disable_fingerprint_button = create_fingerprint_button (_("Disable _Fingerprint Login..."), "disable-action");
- gtk_container_add (GTK_CONTAINER (WID("buttons_vbox")), me->disable_fingerprint_button);
-#else
me->enable_fingerprint_button = WID ("enable_fingerprint_button");
me->disable_fingerprint_button = WID ("disable_fingerprint_button");
-#endif /* HAVE_POLKIT */
g_signal_connect (me->enable_fingerprint_button, "clicked",
G_CALLBACK (about_me_fingerprint_button_clicked_cb), me);
diff --git a/configure.in b/configure.in
index d3cd6bb..eefca87 100644
--- a/configure.in
+++ b/configure.in
@@ -228,11 +228,6 @@ if test "x$enable_aboutme" = "xyes"; then
PKG_CHECK_MODULES(LIBEBOOK, [libebook-1.2 >= 1.7.90],
[AC_DEFINE([HAVE_LIBEBOOK], 1,
[Define if evolution-data-server libebook-1.2 is available])])
- dnl PolicyKit-gnome is optional
- PKG_CHECK_MODULES(POLKIT_GNOME, [polkit-gnome],
- [AC_DEFINE([HAVE_POLKIT], 1,
- [Define if PolicyKit-gnome is available])],
- has_polkit=false)
fi
AM_CONDITIONAL(BUILD_ABOUTME, test "x$enable_aboutme" = "xyes")
--
1.6.2.5
Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.465
retrieving revision 1.466
diff -u -p -r1.465 -r1.466
--- control-center.spec 10 Aug 2009 16:14:28 -0000 1.465
+++ control-center.spec 14 Aug 2009 12:58:15 -0000 1.466
@@ -1,3 +1,4 @@
+%define _default_patch_fuzz 2
%define gettext_package gnome-control-center-2.0
%define glib2_version 2.13.0
@@ -46,9 +47,8 @@ Patch30: default-layout-toggle.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=546036
Patch33: notification-theme.patch
-# http://bugzilla.redhat.com/show_bug.cgi?id=498365
-# http://bugzilla.gnome.org/show_bug.cgi?id=536531
-Patch37: polkit1.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=591796
+Patch37: 0001-Port-about-me-to-PolicyKit-1.0.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=588729
Patch45: mnemonic.patch
@@ -183,7 +183,7 @@ utilities.
# vendor configuration patches
%patch95 -p1 -b .passwd
-%patch96 -p1 -b .gecos
+#%patch96 -p1 -b .gecos
%patch99 -p1 -b .default-apps
%patch7 -p1 -b .make-default
@@ -358,6 +358,11 @@ fi
%dir %{_datadir}/gnome-control-center/keybindings
%changelog
+* Fri Aug 14 2009 Bastien Nocera <bnocera at redhat.com> 2.27.5-1
+- Update to 2.27.5
+- Port PolicyKit patches to latest version
+- Disable gecos patch, needs porting to GtkBuilder
+
* Mon Aug 3 2009 Matthias Clasen <mclasen at redhat.com> - 2.27.4-5
- Fix a lost mnemonic
make-default.patch:
appearance-desktop.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 116 insertions(+), 1 deletion(-)
Index: make-default.patch
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/make-default.patch,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- make-default.patch 16 Jul 2009 00:59:22 -0000 1.11
+++ make-default.patch 14 Aug 2009 12:58:15 -0000 1.12
@@ -1,20 +1,49 @@
-diff -up gnome-control-center-2.27.4/capplets/appearance/appearance-desktop.c.make-default gnome-control-center-2.27.4/capplets/appearance/appearance-desktop.c
---- gnome-control-center-2.27.4/capplets/appearance/appearance-desktop.c.make-default 2009-07-15 11:12:52.000000000 -0400
-+++ gnome-control-center-2.27.4/capplets/appearance/appearance-desktop.c 2009-07-15 17:08:10.808068841 -0400
-@@ -31,6 +31,9 @@
+From e47d2eefeea93a34848ee67ea0794d1fc88fe89f Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Fri, 14 Aug 2009 12:49:52 +0100
+Subject: [PATCH] =?utf-8?q?Bug=20536531=20=E2=80=93=20Allow=20setting=20the=20default=20background?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+The new gdm uses the system-wide default background for the login
+screen. This patch allows configuring this using the normal
+configuration tool for the desktop background.
+
+Add a "Make default" button to the background tab of the appearance
+capplet. It depends on the gconf-defaults service and uses
+PolicyKit for access control.
+---
+ capplets/appearance/appearance-desktop.c | 116 ++++++++++++++++++++++++++++++
+ 1 files changed, 116 insertions(+), 0 deletions(-)
+
+diff --git a/capplets/appearance/appearance-desktop.c b/capplets/appearance/appearance-desktop.c
+index bf2f5a1..a5ff367 100644
+--- a/capplets/appearance/appearance-desktop.c
++++ b/capplets/appearance/appearance-desktop.c
+@@ -31,6 +31,8 @@
#include <libgnomeui/gnome-desktop-thumbnail.h>
#include <libgnomeui/gnome-bg.h>
+#include <dbus/dbus-glib.h>
-+#include <polkit-gnome/polkit-gnome.h>
+
enum {
TARGET_URI_LIST,
TARGET_BGIMAGE
-@@ -992,12 +995,61 @@ wp_select_after_realize (GtkWidget *widg
+@@ -991,12 +993,108 @@ 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)
+{
@@ -22,15 +51,6 @@ diff -up gnome-control-center-2.27.4/cap
+ 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
-+ };
+
+ gconf_client_suggest_sync (adata->client, NULL);
+
@@ -51,14 +71,61 @@ diff -up gnome-control-center-2.27.4/cap
+ return;
+ }
+
-+ dbus_g_proxy_call (proxy, "SetSystem",
-+ &error,
-+ G_TYPE_STRV, keys,
-+ G_TYPE_STRV, NULL,
-+ G_TYPE_INVALID,
-+ G_TYPE_INVALID);
++ 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);
+}
+
void
@@ -67,34 +134,36 @@ diff -up gnome-control-center-2.27.4/cap
{
GtkWidget *add_button;
GtkCellRenderer *cr;
-+ PolKitAction *pk_action;
-+ PolKitGnomeAction *action;
++ GtkAction *action;
+ GtkWidget *widget, *box, *button;
g_object_set (gtk_settings_get_default (), "gtk-tooltip-timeout", 500, NULL);
-@@ -1118,6 +1170,24 @@ desktop_init (AppearanceData *data,
+@@ -1117,6 +1215,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);
-+
-+ 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);
++
++ action = gtk_action_new ("set-system",
++ _("Make Default"),
++ _("Set the current background as the system-wide default"),
++ NULL);
++ check_can_set_background (action);
+
-+ polkit_action_unref (pk_action);
-+ button = polkit_gnome_action_create_button (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.2.5
+
--- polkit1.patch DELETED ---
More information about the scm-commits
mailing list