fix polkit-gnomes use opf actions
This commit is contained in:
parent
50dcefffe8
commit
82c2195962
@ -16,7 +16,7 @@
|
|||||||
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
|
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
|
||||||
Name: gtk2
|
Name: gtk2
|
||||||
Version: %{base_version}
|
Version: %{base_version}
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: http://download.gnome.org/sources/gtk+/2.15/gtk+-%{version}.tar.bz2
|
Source: http://download.gnome.org/sources/gtk+/2.15/gtk+-%{version}.tar.bz2
|
||||||
@ -31,6 +31,9 @@ Patch2: workaround.patch
|
|||||||
# http://bugzilla.redhat.com/show_bug.cgi?id=478400
|
# http://bugzilla.redhat.com/show_bug.cgi?id=478400
|
||||||
Patch3: default_printer.patch
|
Patch3: default_printer.patch
|
||||||
|
|
||||||
|
# fixed upstream
|
||||||
|
Patch4: polkit-action.patch
|
||||||
|
|
||||||
BuildRequires: atk-devel >= %{atk_version}
|
BuildRequires: atk-devel >= %{atk_version}
|
||||||
BuildRequires: pango-devel >= %{pango_version}
|
BuildRequires: pango-devel >= %{pango_version}
|
||||||
BuildRequires: glib2-devel >= %{glib2_version}
|
BuildRequires: glib2-devel >= %{glib2_version}
|
||||||
@ -124,6 +127,7 @@ GTK+ widget toolkit.
|
|||||||
%patch0 -p1 -b .lib64
|
%patch0 -p1 -b .lib64
|
||||||
%patch2 -p1 -b .workaround
|
%patch2 -p1 -b .workaround
|
||||||
%patch3 -p0 -b .default-printer
|
%patch3 -p0 -b .default-printer
|
||||||
|
%patch4 -p1 -b .polkit-action
|
||||||
|
|
||||||
%build
|
%build
|
||||||
libtoolize --force --copy
|
libtoolize --force --copy
|
||||||
@ -320,6 +324,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/gtk-2.0
|
%{_datadir}/gtk-2.0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 6 2009 Matthias Clasen <mclasen@redhat.com> - 2.15.3-2
|
||||||
|
- Fix PolicyKit-gnome's use of actions
|
||||||
|
|
||||||
* Mon Feb 2 2009 Matthias Clasen <mclasen@redhat.com> - 2.15.3-1
|
* Mon Feb 2 2009 Matthias Clasen <mclasen@redhat.com> - 2.15.3-1
|
||||||
- Update to 2.15.3
|
- Update to 2.15.3
|
||||||
|
|
||||||
|
124
polkit-action.patch
Normal file
124
polkit-action.patch
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
diff -up gtk+-2.15.3/gtk/gtkaction.c.polkit gtk+-2.15.3/gtk/gtkaction.c
|
||||||
|
--- gtk+-2.15.3/gtk/gtkaction.c.polkit 2009-02-06 22:24:40.000000000 -0500
|
||||||
|
+++ gtk+-2.15.3/gtk/gtkaction.c 2009-02-06 22:25:35.000000000 -0500
|
||||||
|
@@ -1509,8 +1509,6 @@ gtk_action_set_icon_name (GtkAction *a
|
||||||
|
|
||||||
|
g_return_if_fail (GTK_IS_ACTION (action));
|
||||||
|
|
||||||
|
- g_return_if_fail (GTK_IS_ACTION (action));
|
||||||
|
-
|
||||||
|
tmp = action->private_data->icon_name;
|
||||||
|
action->private_data->icon_name = g_strdup (icon_name);
|
||||||
|
g_free (tmp);
|
||||||
|
@@ -1604,6 +1602,8 @@ gtk_action_block_activate_from (GtkActio
|
||||||
|
|
||||||
|
g_signal_handlers_block_by_func (proxy, G_CALLBACK (gtk_action_activate),
|
||||||
|
action);
|
||||||
|
+
|
||||||
|
+ gtk_action_block_activate (action);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -1630,6 +1630,8 @@ gtk_action_unblock_activate_from (GtkAct
|
||||||
|
|
||||||
|
g_signal_handlers_unblock_by_func (proxy, G_CALLBACK (gtk_action_activate),
|
||||||
|
action);
|
||||||
|
+
|
||||||
|
+ gtk_action_unblock_activate (action);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
diff -up gtk+-2.15.3/gtk/gtkcheckmenuitem.c.polkit gtk+-2.15.3/gtk/gtkcheckmenuitem.c
|
||||||
|
--- gtk+-2.15.3/gtk/gtkcheckmenuitem.c.polkit 2009-02-06 22:24:48.000000000 -0500
|
||||||
|
+++ gtk+-2.15.3/gtk/gtkcheckmenuitem.c 2009-02-06 22:25:41.000000000 -0500
|
||||||
|
@@ -188,7 +188,7 @@ gtk_check_menu_item_activatable_reset (G
|
||||||
|
|
||||||
|
parent_activatable_iface->reset (activatable, action);
|
||||||
|
|
||||||
|
- if (!action)
|
||||||
|
+ if (!GTK_IS_TOGGLE_ACTION (action))
|
||||||
|
return;
|
||||||
|
|
||||||
|
gtk_action_block_activate (action);
|
||||||
|
diff -up gtk+-2.15.3/gtk/gtkimagemenuitem.c.polkit gtk+-2.15.3/gtk/gtkimagemenuitem.c
|
||||||
|
--- gtk+-2.15.3/gtk/gtkimagemenuitem.c.polkit 2009-02-06 22:24:55.000000000 -0500
|
||||||
|
+++ gtk+-2.15.3/gtk/gtkimagemenuitem.c 2009-02-06 22:25:47.000000000 -0500
|
||||||
|
@@ -601,7 +601,7 @@ activatable_update_icon_name (GtkImageMe
|
||||||
|
|
||||||
|
image = gtk_image_menu_item_get_image (image_menu_item);
|
||||||
|
|
||||||
|
- if (GTK_IS_IMAGE (image) && icon_name &&
|
||||||
|
+ if (GTK_IS_IMAGE (image) &&
|
||||||
|
(gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_EMPTY ||
|
||||||
|
gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_ICON_NAME))
|
||||||
|
{
|
||||||
|
diff -up gtk+-2.15.3/gtk/gtktogglebutton.c.polkit gtk+-2.15.3/gtk/gtktogglebutton.c
|
||||||
|
--- gtk+-2.15.3/gtk/gtktogglebutton.c.polkit 2009-02-06 22:25:06.000000000 -0500
|
||||||
|
+++ gtk+-2.15.3/gtk/gtktogglebutton.c 2009-02-06 22:25:53.000000000 -0500
|
||||||
|
@@ -188,7 +188,7 @@ gtk_toggle_button_activatable_reset (Gtk
|
||||||
|
|
||||||
|
parent_activatable_iface->reset (activatable, action);
|
||||||
|
|
||||||
|
- if (!action)
|
||||||
|
+ if (!GTK_IS_TOGGLE_ACTION (action))
|
||||||
|
return;
|
||||||
|
|
||||||
|
button = GTK_TOGGLE_BUTTON (activatable);
|
||||||
|
diff -up gtk+-2.15.3/gtk/gtktoggletoolbutton.c.polkit gtk+-2.15.3/gtk/gtktoggletoolbutton.c
|
||||||
|
--- gtk+-2.15.3/gtk/gtktoggletoolbutton.c.polkit 2009-02-06 22:25:16.000000000 -0500
|
||||||
|
+++ gtk+-2.15.3/gtk/gtktoggletoolbutton.c 2009-02-06 22:25:59.000000000 -0500
|
||||||
|
@@ -346,7 +346,7 @@ gtk_toggle_tool_button_activatable_reset
|
||||||
|
|
||||||
|
parent_activatable_iface->reset (activatable, action);
|
||||||
|
|
||||||
|
- if (!action)
|
||||||
|
+ if (!GTK_IS_TOGGLE_ACTION (action))
|
||||||
|
return;
|
||||||
|
|
||||||
|
button = GTK_TOGGLE_TOOL_BUTTON (activatable);
|
||||||
|
diff -up gtk+-2.15.3/gtk/gtktoolbutton.c.polkit gtk+-2.15.3/gtk/gtktoolbutton.c
|
||||||
|
--- gtk+-2.15.3/gtk/gtktoolbutton.c.polkit 2009-02-06 22:25:24.000000000 -0500
|
||||||
|
+++ gtk+-2.15.3/gtk/gtktoolbutton.c 2009-02-06 22:26:03.000000000 -0500
|
||||||
|
@@ -760,24 +760,9 @@ gtk_tool_button_activatable_update (GtkA
|
||||||
|
button = GTK_TOOL_BUTTON (activatable);
|
||||||
|
|
||||||
|
if (strcmp (property_name, "short-label") == 0)
|
||||||
|
- {
|
||||||
|
- if (!gtk_action_get_stock_id (action) &&
|
||||||
|
- !gtk_action_get_icon_name (action))
|
||||||
|
- {
|
||||||
|
- gtk_tool_button_set_use_underline (button, TRUE);
|
||||||
|
- gtk_tool_button_set_label (button, gtk_action_get_short_label (action));
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ gtk_tool_button_set_label (button, gtk_action_get_short_label (action));
|
||||||
|
else if (strcmp (property_name, "stock-id") == 0)
|
||||||
|
- {
|
||||||
|
- if (gtk_action_get_stock_id (action))
|
||||||
|
- {
|
||||||
|
- gtk_tool_button_set_label (button, NULL);
|
||||||
|
- gtk_tool_button_set_icon_name (button, NULL);
|
||||||
|
- }
|
||||||
|
- gtk_tool_button_set_icon_widget (button, NULL);
|
||||||
|
- gtk_tool_button_set_stock_id (button, gtk_action_get_stock_id (action));
|
||||||
|
- }
|
||||||
|
+ gtk_tool_button_set_stock_id (button, gtk_action_get_stock_id (action));
|
||||||
|
else if (strcmp (property_name, "gicon") == 0)
|
||||||
|
{
|
||||||
|
const gchar *stock_id = gtk_action_get_stock_id (action);
|
||||||
|
@@ -800,14 +785,7 @@ gtk_tool_button_activatable_update (GtkA
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (strcmp (property_name, "icon-name") == 0)
|
||||||
|
- {
|
||||||
|
- if (gtk_action_get_icon_name (action))
|
||||||
|
- {
|
||||||
|
- gtk_tool_button_set_label (button, NULL);
|
||||||
|
- gtk_tool_button_set_stock_id (button, NULL);
|
||||||
|
- }
|
||||||
|
- gtk_tool_button_set_icon_name (button, gtk_action_get_icon_name (action));
|
||||||
|
- }
|
||||||
|
+ gtk_tool_button_set_icon_name (button, gtk_action_get_icon_name (action));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
Loading…
Reference in New Issue
Block a user