1
From a3388633c5f55b08df4f3af48b0dc2f0ef06d143 Mon Sep 17 00:00:00 2001
2
From: Richard Hughes <richard@hughsie.com>
3
Date: Thu, 02 Dec 2010 11:57:03 +0000
4
Subject: Remove and correct usages of size_request to fix compile
7
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
8
index 70f324e..20a0eda 100644
9
--- a/src/gs-lock-plug.c
10
+++ b/src/gs-lock-plug.c
11
@@ -870,28 +870,6 @@ forward_key_events (GSLockPlug *plug)
15
-gs_lock_plug_size_request (GtkWidget *widget,
16
- GtkRequisition *requisition)
21
- if (GTK_WIDGET_CLASS (gs_lock_plug_parent_class)->size_request) {
22
- GTK_WIDGET_CLASS (gs_lock_plug_parent_class)->size_request (widget, requisition);
25
- mod_width = requisition->height * 1.3;
26
- mod_height = requisition->width / 1.6;
27
- if (requisition->width < mod_width) {
28
- /* if the dialog is tall fill out the width */
29
- requisition->width = mod_width;
30
- } else if (requisition->height < mod_height) {
31
- /* if the dialog is wide fill out the height */
32
- requisition->height = mod_height;
37
gs_lock_plug_set_logout_enabled (GSLockPlug *plug,
38
gboolean logout_enabled)
40
@@ -1082,7 +1060,6 @@ gs_lock_plug_class_init (GSLockPlugClass *klass)
41
widget_class->style_set = gs_lock_plug_style_set;
42
widget_class->show = gs_lock_plug_show;
43
widget_class->hide = gs_lock_plug_hide;
44
- widget_class->size_request = gs_lock_plug_size_request;
46
klass->close = gs_lock_plug_close;
48
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
49
index 0c1e729..eaaba36 100644
50
--- a/src/gs-window-x11.c
51
+++ b/src/gs-window-x11.c
52
@@ -2104,6 +2104,30 @@ gs_window_real_visibility_notify_event (GtkWidget *widget,
56
+gs_window_real_get_preferred_width (GtkWidget *widget,
57
+ gint *minimal_width,
58
+ gint *natural_width)
60
+ GtkRequisition requisition;
62
+ gs_window_real_size_request (widget, &requisition);
64
+ *minimal_width = *natural_width = requisition.width;
68
+gs_window_real_get_preferred_height (GtkWidget *widget,
69
+ gint *minimal_height,
70
+ gint *natural_height)
72
+ GtkRequisition requisition;
74
+ gs_window_real_size_request (widget, &requisition);
76
+ *minimal_height = *natural_height = requisition.height;
80
gs_window_class_init (GSWindowClass *klass)
82
GObjectClass *object_class = G_OBJECT_CLASS (klass);
83
@@ -2121,7 +2145,8 @@ gs_window_class_init (GSWindowClass *klass)
84
widget_class->motion_notify_event = gs_window_real_motion_notify_event;
85
widget_class->button_press_event = gs_window_real_button_press_event;
86
widget_class->scroll_event = gs_window_real_scroll_event;
87
- widget_class->size_request = gs_window_real_size_request;
88
+ widget_class->get_preferred_width = gs_window_real_get_preferred_width;
89
+ widget_class->get_preferred_height = gs_window_real_get_preferred_height;
90
widget_class->grab_broken_event = gs_window_real_grab_broken;
91
widget_class->visibility_notify_event = gs_window_real_visibility_notify_event;