Merge lp:~macslow/notify-osd/fix-375408 into lp:notify-osd/trunk

Proposed by Mirco Müller
Status: Merged
Approved by: Mirco Müller
Approved revision: 393
Merged at revision: not available
Proposed branch: lp:~macslow/notify-osd/fix-375408
Merge into: lp:notify-osd/trunk
Diff against target: None lines
To merge this branch: bzr merge lp:~macslow/notify-osd/fix-375408
Reviewer Review Type Date Requested Status
Mirco Müller (community) Abstain
Neil J. Patel (community) Approve
Review via email: mp+11779@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Due to some people having huge multi-monitor setups the max. values for the desktop-struts were to small causing bubbles being wrongly positioned on such big multi-screen setups, because fallback max. values were too small (see LP: #375408). This branch fixes the issue.

Revision history for this message
Neil J. Patel (njpatel) wrote :

Looks good. Approved.

Fwiw, G_PARAM_STATIC_STRINGS is also a useful param in addition to the one you use, it just means that the strings you used for the nick, blurb and description are static, so glib doesn't copy them, just reference.

I normally always forget to use it, but I thought I'd share :D

review: Approve
Revision history for this message
Mirco Müller (macslow) wrote :

> Looks good. Approved.
>
> Fwiw, G_PARAM_STATIC_STRINGS is also a useful param in addition to the one you
> use, it just means that the strings you used for the nick, blurb and
> description are static, so glib doesn't copy them, just reference.
>
> I normally always forget to use it, but I thought I'd share :D

Added your suggestion in rev 394.

review: Abstain
lp:~macslow/notify-osd/fix-375408 updated
394. By Mirco Müller

added G_PARAM_STATIC_STRINGS to instruct glib to reference strings for property-name/nick/blurb instead of copying them

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/defaults.c'
2--- src/defaults.c 2009-09-10 13:16:07 +0000
3+++ src/defaults.c 2009-09-15 12:38:22 +0000
4@@ -1350,7 +1350,7 @@
5 "desktop-width",
6 "Width of desktop in pixels",
7 0,
8- 4096,
9+ G_MAXINT,
10 gdk_screen_get_width (screen),
11 G_PARAM_CONSTRUCT |
12 G_PARAM_READWRITE);
13@@ -1363,7 +1363,7 @@
14 "desktop-height",
15 "Height of desktop in pixels",
16 0,
17- 4096,
18+ G_MAXINT,
19 gdk_screen_get_height (screen),
20 G_PARAM_CONSTRUCT |
21 G_PARAM_READWRITE);
22@@ -1376,7 +1376,7 @@
23 "desktop-top",
24 "Top of desktop in pixels",
25 0,
26- 4096,
27+ G_MAXINT,
28 0,
29 G_PARAM_CONSTRUCT |
30 G_PARAM_READWRITE);
31@@ -1389,8 +1389,8 @@
32 "desktop-bottom",
33 "Bottom of desktop in pixels",
34 0,
35- 4096,
36- 4096,
37+ G_MAXINT,
38+ G_MAXINT,
39 G_PARAM_CONSTRUCT |
40 G_PARAM_READWRITE);
41 g_object_class_install_property (gobject_class,
42@@ -1402,7 +1402,7 @@
43 "desktop-left",
44 "Left of desktop in pixels",
45 0,
46- 4096,
47+ G_MAXINT,
48 0,
49 G_PARAM_CONSTRUCT |
50 G_PARAM_READWRITE);
51@@ -1415,8 +1415,8 @@
52 "desktop-right",
53 "Right of desktop in pixels",
54 0,
55- 4096,
56- 4096,
57+ G_MAXINT,
58+ G_MAXINT,
59 G_PARAM_CONSTRUCT |
60 G_PARAM_READWRITE);
61 g_object_class_install_property (gobject_class,
62
63=== modified file 'tests/test-defaults.c'
64--- tests/test-defaults.c 2009-09-10 13:11:32 +0000
65+++ tests/test-defaults.c 2009-09-15 12:38:22 +0000
66@@ -58,7 +58,7 @@
67 Defaults* defaults = NULL;
68
69 defaults = defaults_new ();
70- g_assert_cmpint (defaults_get_desktop_width (defaults), <=, 4096);
71+ g_assert_cmpint (defaults_get_desktop_width (defaults), <=, G_MAXINT);
72 g_assert_cmpint (defaults_get_desktop_width (defaults), >=, 640);
73 g_object_unref (defaults);
74 }
75@@ -70,7 +70,7 @@
76 Defaults* defaults = NULL;
77
78 defaults = defaults_new ();
79- g_assert_cmpint (defaults_get_desktop_height (defaults), <=, 4096);
80+ g_assert_cmpint (defaults_get_desktop_height (defaults), <=, G_MAXINT);
81 g_assert_cmpint (defaults_get_desktop_height (defaults), >=, 600);
82 g_object_unref (defaults);
83 }
84@@ -82,7 +82,7 @@
85 Defaults* defaults = NULL;
86
87 defaults = defaults_new ();
88- g_assert_cmpint (defaults_get_desktop_top (defaults), <=, 4096);
89+ g_assert_cmpint (defaults_get_desktop_top (defaults), <=, G_MAXINT);
90 g_assert_cmpint (defaults_get_desktop_top (defaults), >=, 0);
91 g_object_unref (defaults);
92 }
93@@ -94,7 +94,7 @@
94 Defaults* defaults = NULL;
95
96 defaults = defaults_new ();
97- g_assert_cmpint (defaults_get_desktop_bottom (defaults), <=, 4096);
98+ g_assert_cmpint (defaults_get_desktop_bottom (defaults), <=, G_MAXINT);
99 g_assert_cmpint (defaults_get_desktop_bottom (defaults), >=, 0);
100 g_object_unref (defaults);
101 }
102@@ -106,7 +106,7 @@
103 Defaults* defaults = NULL;
104
105 defaults = defaults_new ();
106- g_assert_cmpint (defaults_get_desktop_left (defaults), <=, 4096);
107+ g_assert_cmpint (defaults_get_desktop_left (defaults), <=, G_MAXINT);
108 g_assert_cmpint (defaults_get_desktop_left (defaults), >=, 0);
109 g_object_unref (defaults);
110 }
111@@ -118,7 +118,7 @@
112 Defaults* defaults = NULL;
113
114 defaults = defaults_new ();
115- g_assert_cmpint (defaults_get_desktop_right (defaults), <=, 4096);
116+ g_assert_cmpint (defaults_get_desktop_right (defaults), <=, G_MAXINT);
117 g_assert_cmpint (defaults_get_desktop_right (defaults), >=, 0);
118 g_object_unref (defaults);
119 }
120@@ -130,7 +130,7 @@
121 Defaults* defaults = NULL;
122
123 defaults = defaults_new ();
124- g_assert_cmpint (defaults_get_stack_height (defaults), <=, 4096);
125+ g_assert_cmpint (defaults_get_stack_height (defaults), <=, G_MAXINT);
126 g_assert_cmpint (defaults_get_stack_height (defaults), >=, 0);
127 g_object_unref (defaults);
128 }

Subscribers

People subscribed via source and target branches