Merge lp:~tuxator/midori/glib-bump into lp:midori
- glib-bump
- Merge into trunk
Proposed by
Paweł Forysiuk
Status: | Merged |
---|---|
Approved by: | Cris Dywan |
Approved revision: | 6236 |
Merged at revision: | 6236 |
Proposed branch: | lp:~tuxator/midori/glib-bump |
Merge into: | lp:midori |
Diff against target: |
359 lines (+3/-155) 11 files modified
extensions/cookie-manager/cookie-manager-page.c (+0/-8) extensions/feed-panel/feed-panel.c (+0/-8) extensions/status-clock.c (+0/-9) katze/gtk3-compat.h (+0/-9) katze/midori-paths.vala (+0/-6) midori/midori-app.c (+0/-6) midori/midori-download.vala (+0/-6) midori/midori-preferences.c (+0/-2) midori/sokoke.c (+0/-31) panels/midori-history.c (+2/-54) wscript (+1/-16) |
To merge this branch: | bzr merge lp:~tuxator/midori/glib-bump |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cris Dywan | Approve | ||
Review via email:
|
Commit message
Bump glib2 version to 2.32.4
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'extensions/cookie-manager/cookie-manager-page.c' | |||
2 | --- extensions/cookie-manager/cookie-manager-page.c 2013-06-21 23:18:01 +0000 | |||
3 | +++ extensions/cookie-manager/cookie-manager-page.c 2013-06-26 21:57:40 +0000 | |||
4 | @@ -660,17 +660,9 @@ | |||
5 | 660 | if (cookie->expires != NULL) | 660 | if (cookie->expires != NULL) |
6 | 661 | { | 661 | { |
7 | 662 | time_t expiration_time = soup_date_to_time_t(cookie->expires); | 662 | time_t expiration_time = soup_date_to_time_t(cookie->expires); |
8 | 663 | #if GLIB_CHECK_VERSION (2, 26, 0) | ||
9 | 664 | GDateTime* date = g_date_time_new_from_unix_local(expiration_time); | 663 | GDateTime* date = g_date_time_new_from_unix_local(expiration_time); |
10 | 665 | expires = g_date_time_format(date, "%c"); | 664 | expires = g_date_time_format(date, "%c"); |
11 | 666 | g_date_time_unref(date); | 665 | g_date_time_unref(date); |
12 | 667 | #else | ||
13 | 668 | static gchar date_fmt[512]; | ||
14 | 669 | const struct tm *tm = localtime(&expiration_time); | ||
15 | 670 | /* Some GCC versions falsely complain about "%c" */ | ||
16 | 671 | strftime(date_fmt, sizeof(date_fmt), "%c", tm); | ||
17 | 672 | expires = g_strdup(date_fmt); | ||
18 | 673 | #endif | ||
19 | 674 | } | 666 | } |
20 | 675 | else | 667 | else |
21 | 676 | expires = g_strdup(_("At the end of the session")); | 668 | expires = g_strdup(_("At the end of the session")); |
22 | 677 | 669 | ||
23 | === modified file 'extensions/feed-panel/feed-panel.c' | |||
24 | --- extensions/feed-panel/feed-panel.c 2013-06-21 23:18:01 +0000 | |||
25 | +++ extensions/feed-panel/feed-panel.c 2013-06-26 21:57:40 +0000 | |||
26 | @@ -359,17 +359,9 @@ | |||
27 | 359 | g_assert (KATZE_IS_ARRAY (parent)); | 359 | g_assert (KATZE_IS_ARRAY (parent)); |
28 | 360 | if (added) | 360 | if (added) |
29 | 361 | { | 361 | { |
30 | 362 | #if GLIB_CHECK_VERSION (2, 26, 0) | ||
31 | 363 | GDateTime* date = g_date_time_new_from_unix_local (added); | 362 | GDateTime* date = g_date_time_new_from_unix_local (added); |
32 | 364 | gchar* pretty = g_date_time_format (date, "%c"); | 363 | gchar* pretty = g_date_time_format (date, "%c"); |
33 | 365 | g_date_time_unref (date); | 364 | g_date_time_unref (date); |
34 | 366 | #else | ||
35 | 367 | static gchar date_fmt[512]; | ||
36 | 368 | const struct tm *tm = localtime (&added); | ||
37 | 369 | /* Some GCC versions falsely complain about "%c" */ | ||
38 | 370 | strftime (date_fmt, sizeof (date_fmt), "%c", tm); | ||
39 | 371 | gchar* pretty = g_strdup (date_fmt); | ||
40 | 372 | #endif | ||
41 | 373 | 365 | ||
42 | 374 | /* i18n: The local date a feed was last updated */ | 366 | /* i18n: The local date a feed was last updated */ |
43 | 375 | gchar* last_updated = g_strdup_printf (C_("Feed", "Last updated: %s."), pretty); | 367 | gchar* last_updated = g_strdup_printf (C_("Feed", "Last updated: %s."), pretty); |
44 | 376 | 368 | ||
45 | === modified file 'extensions/status-clock.c' | |||
46 | --- extensions/status-clock.c 2012-12-05 20:12:30 +0000 | |||
47 | +++ extensions/status-clock.c 2013-06-26 21:57:40 +0000 | |||
48 | @@ -48,21 +48,12 @@ | |||
49 | 48 | GtkWidget* label = g_object_get_data (G_OBJECT (browser), "clock-label"); | 48 | GtkWidget* label = g_object_get_data (G_OBJECT (browser), "clock-label"); |
50 | 49 | const gchar* format = midori_extension_get_string (extension, "format"); | 49 | const gchar* format = midori_extension_get_string (extension, "format"); |
51 | 50 | 50 | ||
52 | 51 | #if GLIB_CHECK_VERSION (2, 26, 0) | ||
53 | 52 | GDateTime* date = g_date_time_new_now_local (); | 51 | GDateTime* date = g_date_time_new_now_local (); |
54 | 53 | gint seconds = g_date_time_get_seconds (date); | 52 | gint seconds = g_date_time_get_seconds (date); |
55 | 54 | gchar* pretty = g_date_time_format (date, format); | 53 | gchar* pretty = g_date_time_format (date, format); |
56 | 55 | gtk_label_set_label (GTK_LABEL (label), pretty); | 54 | gtk_label_set_label (GTK_LABEL (label), pretty); |
57 | 56 | g_free (pretty); | 55 | g_free (pretty); |
58 | 57 | g_date_time_unref (date); | 56 | g_date_time_unref (date); |
59 | 58 | #else | ||
60 | 59 | time_t rawtime = time (NULL); | ||
61 | 60 | struct tm *tm = localtime (&rawtime); | ||
62 | 61 | gint seconds = tm->tm_sec; | ||
63 | 62 | char date_fmt[512]; | ||
64 | 63 | strftime (date_fmt, sizeof (date_fmt), format, tm); | ||
65 | 64 | gtk_label_set_label (GTK_LABEL (label), date_fmt); | ||
66 | 65 | #endif | ||
67 | 66 | 57 | ||
68 | 67 | if (g_strstr_len (format, -1, "%c") | 58 | if (g_strstr_len (format, -1, "%c") |
69 | 68 | || g_strstr_len (format, -1, "%N") | 59 | || g_strstr_len (format, -1, "%N") |
70 | 69 | 60 | ||
71 | === modified file 'katze/gtk3-compat.h' | |||
72 | --- katze/gtk3-compat.h 2013-06-20 21:19:42 +0000 | |||
73 | +++ katze/gtk3-compat.h 2013-06-26 21:57:40 +0000 | |||
74 | @@ -41,15 +41,6 @@ | |||
75 | 41 | gtk_widget_get_preferred_size(wdgt, req, NULL) | 41 | gtk_widget_get_preferred_size(wdgt, req, NULL) |
76 | 42 | #endif | 42 | #endif |
77 | 43 | 43 | ||
78 | 44 | #if !GLIB_CHECK_VERSION (2, 32, 0) | ||
79 | 45 | #define G_SOURCE_REMOVE FALSE | ||
80 | 46 | #define G_SOURCE_CONTINUE TRUE | ||
81 | 47 | #endif | ||
82 | 48 | |||
83 | 49 | #if !GLIB_CHECK_VERSION (2, 30, 0) | ||
84 | 50 | #define g_format_size(sz) g_format_size_for_display ((goffset)sz) | ||
85 | 51 | #endif | ||
86 | 52 | |||
87 | 53 | #if GTK_CHECK_VERSION (3, 0, 0) | 44 | #if GTK_CHECK_VERSION (3, 0, 0) |
88 | 54 | #define GTK_DIALOG_NO_SEPARATOR 0 | 45 | #define GTK_DIALOG_NO_SEPARATOR 0 |
89 | 55 | #endif | 46 | #endif |
90 | 56 | 47 | ||
91 | === modified file 'katze/midori-paths.vala' | |||
92 | --- katze/midori-paths.vala 2013-06-19 20:27:53 +0000 | |||
93 | +++ katze/midori-paths.vala 2013-06-26 21:57:40 +0000 | |||
94 | @@ -272,18 +272,12 @@ | |||
95 | 272 | 272 | ||
96 | 273 | public static string make_tmp_dir (string tmpl) { | 273 | public static string make_tmp_dir (string tmpl) { |
97 | 274 | assert (tmp_dir != null); | 274 | assert (tmp_dir != null); |
98 | 275 | #if HAVE_GLIB_2_30 | ||
99 | 276 | try { | 275 | try { |
100 | 277 | return DirUtils.make_tmp (tmpl); | 276 | return DirUtils.make_tmp (tmpl); |
101 | 278 | } | 277 | } |
102 | 279 | catch (Error error) { | 278 | catch (Error error) { |
103 | 280 | GLib.error (error.message); | 279 | GLib.error (error.message); |
104 | 281 | } | 280 | } |
105 | 282 | #else | ||
106 | 283 | string folder = Path.build_path (Path.DIR_SEPARATOR_S, Environment.get_tmp_dir (), tmpl); | ||
107 | 284 | DirUtils.mkdtemp (folder); | ||
108 | 285 | return folder; | ||
109 | 286 | #endif | ||
110 | 287 | } | 281 | } |
111 | 288 | 282 | ||
112 | 289 | public static void init_exec_path (string[] new_command_line) { | 283 | public static void init_exec_path (string[] new_command_line) { |
113 | 290 | 284 | ||
114 | === modified file 'midori/midori-app.c' | |||
115 | --- midori/midori-app.c 2013-05-30 11:08:14 +0000 | |||
116 | +++ midori/midori-app.c 2013-06-26 21:57:40 +0000 | |||
117 | @@ -1371,12 +1371,6 @@ | |||
118 | 1371 | } | 1371 | } |
119 | 1372 | #endif | 1372 | #endif |
120 | 1373 | 1373 | ||
121 | 1374 | /* libSoup uses threads, therefore if WebKit is built with libSoup | ||
122 | 1375 | * or Midori is using it, we need to initialize threads. */ | ||
123 | 1376 | #if !GLIB_CHECK_VERSION (2, 32, 0) | ||
124 | 1377 | if (!g_thread_supported ()) g_thread_init (NULL); | ||
125 | 1378 | #endif | ||
126 | 1379 | |||
127 | 1380 | /* Midori.Paths uses GFile */ | 1374 | /* Midori.Paths uses GFile */ |
128 | 1381 | g_type_init (); | 1375 | g_type_init (); |
129 | 1382 | /* Preserve argument vector */ | 1376 | /* Preserve argument vector */ |
130 | 1383 | 1377 | ||
131 | === modified file 'midori/midori-download.vala' | |||
132 | --- midori/midori-download.vala 2013-06-03 22:48:08 +0000 | |||
133 | +++ midori/midori-download.vala 2013-06-26 21:57:40 +0000 | |||
134 | @@ -50,12 +50,6 @@ | |||
135 | 50 | #endif | 50 | #endif |
136 | 51 | } | 51 | } |
137 | 52 | 52 | ||
138 | 53 | #if !HAVE_GLIB_2_30 | ||
139 | 54 | private static string format_size (uint64 size) { | ||
140 | 55 | return format_size_for_display ((int64)size); | ||
141 | 56 | } | ||
142 | 57 | #endif | ||
143 | 58 | |||
144 | 59 | public static string get_tooltip (WebKit.Download download) { | 53 | public static string get_tooltip (WebKit.Download download) { |
145 | 60 | #if !HAVE_WEBKIT2 | 54 | #if !HAVE_WEBKIT2 |
146 | 61 | string filename = Path.get_basename (download.destination_uri); | 55 | string filename = Path.get_basename (download.destination_uri); |
147 | 62 | 56 | ||
148 | === modified file 'midori/midori-preferences.c' | |||
149 | --- midori/midori-preferences.c 2013-06-19 20:24:37 +0000 | |||
150 | +++ midori/midori-preferences.c 2013-06-26 21:57:40 +0000 | |||
151 | @@ -484,7 +484,6 @@ | |||
152 | 484 | g_signal_connect (settings, "notify::proxy-type", | 484 | g_signal_connect (settings, "notify::proxy-type", |
153 | 485 | G_CALLBACK (midori_preferences_notify_proxy_type_cb), entry); | 485 | G_CALLBACK (midori_preferences_notify_proxy_type_cb), entry); |
154 | 486 | midori_preferences_notify_proxy_type_cb (settings, NULL, entry); | 486 | midori_preferences_notify_proxy_type_cb (settings, NULL, entry); |
155 | 487 | #if GLIB_CHECK_VERSION (2, 26, 0) | ||
156 | 488 | INDENTED_ADD (gtk_event_box_new ()); | 487 | INDENTED_ADD (gtk_event_box_new ()); |
157 | 489 | label = gtk_label_new (NULL); | 488 | label = gtk_label_new (NULL); |
158 | 490 | GString* proxy_types = g_string_new (NULL); | 489 | GString* proxy_types = g_string_new (NULL); |
159 | @@ -504,7 +503,6 @@ | |||
160 | 504 | g_signal_connect (settings, "notify::proxy-type", | 503 | g_signal_connect (settings, "notify::proxy-type", |
161 | 505 | G_CALLBACK (midori_preferences_notify_proxy_type_cb), label); | 504 | G_CALLBACK (midori_preferences_notify_proxy_type_cb), label); |
162 | 506 | midori_preferences_notify_proxy_type_cb (settings, NULL, label); | 505 | midori_preferences_notify_proxy_type_cb (settings, NULL, label); |
163 | 507 | #endif | ||
164 | 508 | #ifndef HAVE_WEBKIT2 | 506 | #ifndef HAVE_WEBKIT2 |
165 | 509 | if (soup_session_get_feature (webkit_get_default_session (), SOUP_TYPE_CACHE)) | 507 | if (soup_session_get_feature (webkit_get_default_session (), SOUP_TYPE_CACHE)) |
166 | 510 | { | 508 | { |
167 | 511 | 509 | ||
168 | === modified file 'midori/sokoke.c' | |||
169 | --- midori/sokoke.c 2013-06-21 20:49:53 +0000 | |||
170 | +++ midori/sokoke.c 2013-06-26 21:57:40 +0000 | |||
171 | @@ -148,14 +148,6 @@ | |||
172 | 148 | return NULL; | 148 | return NULL; |
173 | 149 | 149 | ||
174 | 150 | info = g_app_info_get_default_for_uri_scheme (scheme); | 150 | info = g_app_info_get_default_for_uri_scheme (scheme); |
175 | 151 | #if !GLIB_CHECK_VERSION (2, 28, 0) | ||
176 | 152 | if (!info) | ||
177 | 153 | { | ||
178 | 154 | gchar* type = g_strdup_printf ("x-scheme-handler/%s", scheme); | ||
179 | 155 | info = g_app_info_get_default_for_type (type, FALSE); | ||
180 | 156 | g_free (type); | ||
181 | 157 | } | ||
182 | 158 | #endif | ||
183 | 159 | if (scheme_ptr != NULL) | 151 | if (scheme_ptr != NULL) |
184 | 160 | *scheme_ptr = scheme; | 152 | *scheme_ptr = scheme; |
185 | 161 | else | 153 | else |
186 | @@ -191,10 +183,6 @@ | |||
187 | 191 | return ShellExecuteEx (&info); | 183 | return ShellExecuteEx (&info); |
188 | 192 | #else | 184 | #else |
189 | 193 | 185 | ||
190 | 194 | #if !GLIB_CHECK_VERSION (2, 28, 0) | ||
191 | 195 | GAppInfo* info; | ||
192 | 196 | gchar* scheme; | ||
193 | 197 | #endif | ||
194 | 198 | GtkWidget* dialog; | 186 | GtkWidget* dialog; |
195 | 199 | GtkWidget* box; | 187 | GtkWidget* box; |
196 | 200 | gchar* filename; | 188 | gchar* filename; |
197 | @@ -211,25 +199,6 @@ | |||
198 | 211 | if (gtk_show_uri (screen, uri, timestamp, error)) | 199 | if (gtk_show_uri (screen, uri, timestamp, error)) |
199 | 212 | return TRUE; | 200 | return TRUE; |
200 | 213 | 201 | ||
201 | 214 | #if !GLIB_CHECK_VERSION (2, 28, 0) | ||
202 | 215 | info = sokoke_default_for_uri (uri, &scheme); | ||
203 | 216 | if (info) | ||
204 | 217 | { | ||
205 | 218 | gchar* argument = g_strdup (&uri[scheme - uri]); | ||
206 | 219 | GList* uris = g_list_prepend (NULL, argument); | ||
207 | 220 | if (g_app_info_launch_uris (info, uris, NULL, NULL)) | ||
208 | 221 | { | ||
209 | 222 | g_list_free (uris); | ||
210 | 223 | g_free (scheme); | ||
211 | 224 | g_object_unref (info); | ||
212 | 225 | return TRUE; | ||
213 | 226 | } | ||
214 | 227 | g_list_free (uris); | ||
215 | 228 | g_free (scheme); | ||
216 | 229 | g_object_unref (info); | ||
217 | 230 | } | ||
218 | 231 | #endif | ||
219 | 232 | |||
220 | 233 | { | 202 | { |
221 | 234 | gchar* command = g_strconcat ("xdg-open ", uri, NULL); | 203 | gchar* command = g_strconcat ("xdg-open ", uri, NULL); |
222 | 235 | gboolean result = g_spawn_command_line_async (command, error); | 204 | gboolean result = g_spawn_command_line_async (command, error); |
223 | 236 | 205 | ||
224 | === modified file 'panels/midori-history.c' | |||
225 | --- panels/midori-history.c 2013-06-21 23:18:01 +0000 | |||
226 | +++ panels/midori-history.c 2013-06-26 21:57:40 +0000 | |||
227 | @@ -117,37 +117,12 @@ | |||
228 | 117 | return STOCK_HISTORY; | 117 | return STOCK_HISTORY; |
229 | 118 | } | 118 | } |
230 | 119 | 119 | ||
231 | 120 | #if !GLIB_CHECK_VERSION (2, 26, 0) | ||
232 | 121 | static gint | ||
233 | 122 | sokoke_days_between (const time_t* day1, | ||
234 | 123 | const time_t* day2) | ||
235 | 124 | { | ||
236 | 125 | GDate* date1; | ||
237 | 126 | GDate* date2; | ||
238 | 127 | gint age; | ||
239 | 128 | |||
240 | 129 | date1 = g_date_new (); | ||
241 | 130 | date2 = g_date_new (); | ||
242 | 131 | |||
243 | 132 | g_date_set_time_t (date1, *day1); | ||
244 | 133 | g_date_set_time_t (date2, *day2); | ||
245 | 134 | |||
246 | 135 | age = g_date_days_between (date1, date2); | ||
247 | 136 | |||
248 | 137 | g_date_free (date1); | ||
249 | 138 | g_date_free (date2); | ||
250 | 139 | |||
251 | 140 | return age; | ||
252 | 141 | } | ||
253 | 142 | #endif | ||
254 | 143 | |||
255 | 144 | static gchar* | 120 | static gchar* |
256 | 145 | midori_history_format_date (KatzeItem *item) | 121 | midori_history_format_date (KatzeItem *item) |
257 | 146 | { | 122 | { |
258 | 147 | gint64 day = katze_item_get_added (item); | 123 | gint64 day = katze_item_get_added (item); |
259 | 148 | gchar* sdate; | 124 | gchar* sdate; |
260 | 149 | gint age; | 125 | gint age; |
261 | 150 | #if GLIB_CHECK_VERSION (2, 26, 0) | ||
262 | 151 | GDateTime* now = g_date_time_new_now_local (); | 126 | GDateTime* now = g_date_time_new_now_local (); |
263 | 152 | GDateTime* then = g_date_time_new_from_unix_local (day); | 127 | GDateTime* then = g_date_time_new_from_unix_local (day); |
264 | 153 | age = g_date_time_get_day_of_year (now) - g_date_time_get_day_of_year (then); | 128 | age = g_date_time_get_day_of_year (now) - g_date_time_get_day_of_year (then); |
265 | @@ -167,31 +142,7 @@ | |||
266 | 167 | sdate = g_date_time_format (then, "%x"); | 142 | sdate = g_date_time_format (then, "%x"); |
267 | 168 | g_date_time_unref (now); | 143 | g_date_time_unref (now); |
268 | 169 | g_date_time_unref (then); | 144 | g_date_time_unref (then); |
294 | 170 | #else | 145 | |
270 | 171 | gchar token[50]; | ||
271 | 172 | time_t current_time; | ||
272 | 173 | |||
273 | 174 | current_time = time (NULL); | ||
274 | 175 | age = sokoke_days_between ((time_t*)&day, ¤t_time); | ||
275 | 176 | |||
276 | 177 | /* A negative age is a date in the future, the clock is probably off */ | ||
277 | 178 | if (age < -1) | ||
278 | 179 | sdate = g_strdup (""); | ||
279 | 180 | else if (age > 7 || age < 0) | ||
280 | 181 | { | ||
281 | 182 | strftime (token, sizeof (token), "%x", localtime ((time_t*)&day)); | ||
282 | 183 | sdate = g_strdup (token); | ||
283 | 184 | } | ||
284 | 185 | else if (age > 6) | ||
285 | 186 | sdate = g_strdup (_("A week ago")); | ||
286 | 187 | else if (age > 1) | ||
287 | 188 | sdate = g_strdup_printf (ngettext ("%d day ago", | ||
288 | 189 | "%d days ago", (gint)age), (gint)age); | ||
289 | 190 | else if (age == 0) | ||
290 | 191 | sdate = g_strdup (_("Today")); | ||
291 | 192 | else | ||
292 | 193 | sdate = g_strdup (_("Yesterday")); | ||
293 | 194 | #endif | ||
295 | 195 | return sdate; | 146 | return sdate; |
296 | 196 | } | 147 | } |
297 | 197 | 148 | ||
298 | @@ -466,7 +417,6 @@ | |||
299 | 466 | gtk_tree_model_get (model, &iter, 0, &today, -1); | 417 | gtk_tree_model_get (model, &iter, 0, &today, -1); |
300 | 467 | 418 | ||
301 | 468 | day = katze_item_get_added (today); | 419 | day = katze_item_get_added (today); |
302 | 469 | #if GLIB_CHECK_VERSION (2, 26, 0) | ||
303 | 470 | has_today = g_date_time_get_day_of_month ( | 420 | has_today = g_date_time_get_day_of_month ( |
304 | 471 | g_date_time_new_from_unix_local (day)) | 421 | g_date_time_new_from_unix_local (day)) |
305 | 472 | == g_date_time_get_day_of_month ( | 422 | == g_date_time_get_day_of_month ( |
306 | @@ -475,10 +425,8 @@ | |||
307 | 475 | g_date_time_new_from_unix_local (day)) | 425 | g_date_time_new_from_unix_local (day)) |
308 | 476 | == g_date_time_get_day_of_year ( | 426 | == g_date_time_get_day_of_year ( |
309 | 477 | g_date_time_new_from_unix_local (current_time)); | 427 | g_date_time_new_from_unix_local (current_time)); |
310 | 478 | #else | ||
311 | 479 | has_today = sokoke_days_between ((time_t*)&day, ¤t_time) == 0; | ||
312 | 480 | #endif | ||
313 | 481 | g_object_unref (today); | 428 | g_object_unref (today); |
314 | 429 | |||
315 | 482 | if (has_today) | 430 | if (has_today) |
316 | 483 | { | 431 | { |
317 | 484 | gchar* tooltip = g_markup_escape_text (katze_item_get_uri (item), -1); | 432 | gchar* tooltip = g_markup_escape_text (katze_item_get_uri (item), -1); |
318 | 485 | 433 | ||
319 | === modified file 'wscript' | |||
320 | --- wscript 2013-06-22 19:53:16 +0000 | |||
321 | +++ wscript 2013-06-26 21:57:40 +0000 | |||
322 | @@ -219,11 +219,7 @@ | |||
323 | 219 | 219 | ||
324 | 220 | conf.check (lib='m') | 220 | conf.check (lib='m') |
325 | 221 | check_pkg ('gmodule-2.0') | 221 | check_pkg ('gmodule-2.0') |
331 | 222 | check_pkg ('gio-2.0', '2.22.0') | 222 | check_pkg ('gio-2.0', '2.32.4') |
327 | 223 | if check_version (conf.env['GIO_VERSION'], 2, 30, 0) \ | ||
328 | 224 | and check_version (conf.env['VALAC_VERSION'], 0, 16, 0): | ||
329 | 225 | # Older Vala doesn't have GLib 2.30 bindings | ||
330 | 226 | conf.env.append_value ('VALAFLAGS', '-D HAVE_GLIB_2_30') | ||
332 | 227 | 223 | ||
333 | 228 | args = '' | 224 | args = '' |
334 | 229 | if Options.platform == 'win32': | 225 | if Options.platform == 'win32': |
335 | @@ -302,10 +298,6 @@ | |||
336 | 302 | conf.env['docs'] = option_enabled ('docs') | 298 | conf.env['docs'] = option_enabled ('docs') |
337 | 303 | if 'LINGUAS' in os.environ: conf.env['LINGUAS'] = os.environ['LINGUAS'] | 299 | if 'LINGUAS' in os.environ: conf.env['LINGUAS'] = os.environ['LINGUAS'] |
338 | 304 | 300 | ||
339 | 305 | if not check_version (conf.env['GIO_VERSION'], 2, 26, 0): | ||
340 | 306 | conf.env['addons'] = False | ||
341 | 307 | Utils.pprint ('YELLOW', 'Glib < 2.26.0, disabling addons') | ||
342 | 308 | |||
343 | 309 | conf.check (header_name='unistd.h') | 301 | conf.check (header_name='unistd.h') |
344 | 310 | if not conf.env['HAVE_UNIQUE']: | 302 | if not conf.env['HAVE_UNIQUE']: |
345 | 311 | if Options.platform == 'win32': | 303 | if Options.platform == 'win32': |
346 | @@ -366,13 +358,6 @@ | |||
347 | 366 | Utils.pprint ('RED', 'unique 1.0.4 found, this version is erroneous.') | 358 | Utils.pprint ('RED', 'unique 1.0.4 found, this version is erroneous.') |
348 | 367 | Utils.pprint ('RED', 'Please use an older or newer version.') | 359 | Utils.pprint ('RED', 'Please use an older or newer version.') |
349 | 368 | sys.exit (1) | 360 | sys.exit (1) |
350 | 369 | if check_version (conf.env['LIBSOUP_VERSION'], 2, 33, 4) \ | ||
351 | 370 | and check_version (conf.env['GIO_VERSION'], 2, 32, 1) \ | ||
352 | 371 | and not check_version (conf.env['GIO_VERSION'], 2, 32, 3): | ||
353 | 372 | Utils.pprint ('RED', 'libsoup >= 2.33.4 found with glib >= 2.32.1 < 2.32.3:') | ||
354 | 373 | Utils.pprint ('RED', 'This combination breaks the download GUI.') | ||
355 | 374 | Utils.pprint ('RED', 'See https://bugs.launchpad.net/midori/+bug/780133/comments/14') | ||
356 | 375 | sys.exit (1) | ||
357 | 376 | 361 | ||
358 | 377 | def set_options (opt): | 362 | def set_options (opt): |
359 | 378 | def add_enable_option (option, desc, group=None, disable=False): | 363 | def add_enable_option (option, desc, group=None, disable=False): |
Looks decent.