From e446ededa913aaadd2fd8f4e5e2f75b6705dcdbe Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Dec 08 2010 20:28:50 +0000 Subject: Adding upstream patch http://git.gnome.org/browse/gnome-screensaver/commit/?id=a3388633c5f55b08df4f3af48b0dc2f0ef06d143 --- diff --git a/gnome-screensaver-2.91.1-size-request.patch b/gnome-screensaver-2.91.1-size-request.patch new file mode 100644 index 0000000..8125afb --- /dev/null +++ b/gnome-screensaver-2.91.1-size-request.patch @@ -0,0 +1,94 @@ +From a3388633c5f55b08df4f3af48b0dc2f0ef06d143 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Thu, 02 Dec 2010 11:57:03 +0000 +Subject: Remove and correct usages of size_request to fix compile + +--- +diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c +index 70f324e..20a0eda 100644 +--- a/src/gs-lock-plug.c ++++ b/src/gs-lock-plug.c +@@ -870,28 +870,6 @@ forward_key_events (GSLockPlug *plug) + } + + static void +-gs_lock_plug_size_request (GtkWidget *widget, +- GtkRequisition *requisition) +-{ +- int mod_width; +- int mod_height; +- +- if (GTK_WIDGET_CLASS (gs_lock_plug_parent_class)->size_request) { +- GTK_WIDGET_CLASS (gs_lock_plug_parent_class)->size_request (widget, requisition); +- } +- +- mod_width = requisition->height * 1.3; +- mod_height = requisition->width / 1.6; +- if (requisition->width < mod_width) { +- /* if the dialog is tall fill out the width */ +- requisition->width = mod_width; +- } else if (requisition->height < mod_height) { +- /* if the dialog is wide fill out the height */ +- requisition->height = mod_height; +- } +-} +- +-static void + gs_lock_plug_set_logout_enabled (GSLockPlug *plug, + gboolean logout_enabled) + { +@@ -1082,7 +1060,6 @@ gs_lock_plug_class_init (GSLockPlugClass *klass) + widget_class->style_set = gs_lock_plug_style_set; + widget_class->show = gs_lock_plug_show; + widget_class->hide = gs_lock_plug_hide; +- widget_class->size_request = gs_lock_plug_size_request; + + klass->close = gs_lock_plug_close; + +diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c +index 0c1e729..eaaba36 100644 +--- a/src/gs-window-x11.c ++++ b/src/gs-window-x11.c +@@ -2104,6 +2104,30 @@ gs_window_real_visibility_notify_event (GtkWidget *widget, + } + + static void ++gs_window_real_get_preferred_width (GtkWidget *widget, ++ gint *minimal_width, ++ gint *natural_width) ++{ ++ GtkRequisition requisition; ++ ++ gs_window_real_size_request (widget, &requisition); ++ ++ *minimal_width = *natural_width = requisition.width; ++} ++ ++static void ++gs_window_real_get_preferred_height (GtkWidget *widget, ++ gint *minimal_height, ++ gint *natural_height) ++{ ++ GtkRequisition requisition; ++ ++ gs_window_real_size_request (widget, &requisition); ++ ++ *minimal_height = *natural_height = requisition.height; ++} ++ ++static void + gs_window_class_init (GSWindowClass *klass) + { + GObjectClass *object_class = G_OBJECT_CLASS (klass); +@@ -2121,7 +2145,8 @@ gs_window_class_init (GSWindowClass *klass) + widget_class->motion_notify_event = gs_window_real_motion_notify_event; + widget_class->button_press_event = gs_window_real_button_press_event; + widget_class->scroll_event = gs_window_real_scroll_event; +- widget_class->size_request = gs_window_real_size_request; ++ widget_class->get_preferred_width = gs_window_real_get_preferred_width; ++ widget_class->get_preferred_height = gs_window_real_get_preferred_height; + widget_class->grab_broken_event = gs_window_real_grab_broken; + widget_class->visibility_notify_event = gs_window_real_visibility_notify_event; + +-- +cgit v0.8.3.1 diff --git a/gnome-screensaver.spec b/gnome-screensaver.spec index f68040a..73a85fc 100644 --- a/gnome-screensaver.spec +++ b/gnome-screensaver.spec @@ -25,6 +25,7 @@ Patch1: gnome-screensaver-2.20.0-default-theme.patch Patch2: gnome-screensaver-2.26.0-securitytoken.patch Patch7: gnome-screensaver-2.20.0-blank-by-default.patch Patch8: gnome-screensaver-2.20.0-selinux-permit.patch +Patch9: gnome-screensaver-2.91.1-size-request.patch URL: http://www.gnome.org BuildRequires: gtk3-devel => %{gtk3_version} @@ -73,6 +74,7 @@ simple, sane, secure defaults and be well integrated with the desktop. #%patch2 -p1 -b .securitytoken %patch7 -p1 -b .blank-by-default %patch8 -p1 -b .selinux-permit +%patch9 -p1 -b .size-request autoreconf -f -i