~gnome3-team/gnome-screensaver/ubuntu

« back to all changes in this revision

Viewing changes to debian/patches/00git_size_request.patch

  • Committer: Robert Ancell
  • Date: 2010-12-10 04:26:24 UTC
  • Revision ID: robert.ancell@canonical.com-20101210042624-dtb0yaeaamwewuus
* New upstream release
* debian/control:
  - Bump build-depends on libgnome-desktop-3-dev
  - Build-depend on libxklavier-dev
* debian/patches/00git_gdk_window_get_geometry.patch:
  - Build with the latest GTK
* debian/patches/00git_gnome_bg.patch:
* debian/patches/00git_gnome_rr.patch:
* debian/patches/00git_size_request.patch:
* debian/patches/01_libxklavier.patch:
  - Applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
5
 
 
6
 
---
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)
12
 
 }
13
 
 
14
 
 static void
15
 
-gs_lock_plug_size_request (GtkWidget      *widget,
16
 
-                           GtkRequisition *requisition)
17
 
-{
18
 
-        int mod_width;
19
 
-        int mod_height;
20
 
-
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);
23
 
-        }
24
 
-
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;
33
 
-        }
34
 
-}
35
 
-
36
 
-static void
37
 
 gs_lock_plug_set_logout_enabled (GSLockPlug *plug,
38
 
                                  gboolean    logout_enabled)
39
 
 {
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;
45
 
 
46
 
         klass->close = gs_lock_plug_close;
47
 
 
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,
53
 
 }
54
 
 
55
 
 static void
56
 
+gs_window_real_get_preferred_width (GtkWidget *widget,
57
 
+                               gint      *minimal_width,
58
 
+                               gint      *natural_width)
59
 
+{
60
 
+       GtkRequisition requisition;
61
 
+
62
 
+       gs_window_real_size_request (widget, &requisition);
63
 
+
64
 
+       *minimal_width = *natural_width = requisition.width;
65
 
+}
66
 
+
67
 
+static void
68
 
+gs_window_real_get_preferred_height (GtkWidget *widget,
69
 
+                                gint      *minimal_height,
70
 
+                                gint      *natural_height)
71
 
+{
72
 
+       GtkRequisition requisition;
73
 
+
74
 
+       gs_window_real_size_request (widget, &requisition);
75
 
+
76
 
+       *minimal_height = *natural_height = requisition.height;
77
 
+}
78
 
+
79
 
+static void
80
 
 gs_window_class_init (GSWindowClass *klass)
81
 
 {
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;
92
 
 
93
 
--
94
 
cgit v0.8.3.1