Merge lp:~midori/midori/noWinforGcr into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6906
Merged at revision: 6911
Proposed branch: lp:~midori/midori/noWinforGcr
Merge into: lp:midori
Diff against target: 151 lines (+19/-10)
4 files modified
CMakeLists.txt (+3/-1)
midori/midori-locationaction.c (+7/-2)
midori/midori-session.c (+1/-1)
midori/midori-view.c (+8/-6)
To merge this branch: bzr merge lp:~midori/midori/noWinforGcr
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+253875@code.launchpad.net

Commit message

No Gcr on Win for the moment

To post a comment you must log in.
lp:~midori/midori/noWinforGcr updated
6906. By Cris Dywan

Replace some HAVE_GCR with soup 2.34

And notably fix the misplaced #else in commit

Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-03-23 22:07:04 +0000
3+++ CMakeLists.txt 2015-03-24 23:03:55 +0000
4@@ -187,7 +187,9 @@
5 set(PKGS ${PKGS} zeitgeist-1.0)
6 endif()
7
8-if (${DEPS_libsoup-gnome-2.4_VERSION} VERSION_GREATER "2.34.0")
9+if (WIN32)
10+ add_definitions("-DGCR_VERSION=\"No\"")
11+elseif (${DEPS_libsoup-gnome-2.4_VERSION} VERSION_GREATER "2.34.0")
12 if (USE_GTK3)
13 pkg_check_modules(GCR REQUIRED gcr-3>=2.32)
14 else ()
15
16=== modified file 'midori/midori-locationaction.c'
17--- midori/midori-locationaction.c 2015-03-22 16:59:59 +0000
18+++ midori/midori-locationaction.c 2015-03-24 23:03:55 +0000
19@@ -1322,7 +1322,9 @@
20 return message;
21 }
22 #endif
23+#endif
24
25+#ifdef HAVE_GCR
26 typedef enum {
27 MIDORI_CERT_TRUST,
28 MIDORI_CERT_REVOKE,
29@@ -1369,6 +1371,7 @@
30 }
31 gtk_widget_destroy (dialog);
32 }
33+#endif
34
35 const gchar*
36 midori_location_action_tls_flags_to_string (GTlsCertificateFlags tls_flags)
37@@ -1418,6 +1421,7 @@
38 return;
39 }
40
41+ #ifdef HAVE_GCR
42 GByteArray* der_cert;
43 GcrCertificate* gcr_cert;
44
45@@ -1447,6 +1451,8 @@
46 g_object_set_data_full (G_OBJECT (dialog), "gcr-cert", gcr_cert, (GDestroyNotify)g_object_unref);
47 g_signal_connect (dialog, "response",
48 G_CALLBACK (midori_location_action_cert_response_cb), gcr_cert);
49+ #endif
50+
51 /* With GTK+2 the scrolled contents can't communicate a natural size to the window */
52 #if !GTK_CHECK_VERSION (3, 0, 0)
53 gtk_window_set_default_size (GTK_WINDOW (dialog), 250, 200);
54@@ -1462,7 +1468,6 @@
55
56 g_object_unref (tls_cert);
57 }
58-#endif
59
60 static void
61 midori_location_action_engine_activate_cb (GtkWidget* menuitem,
62@@ -1542,7 +1547,7 @@
63 gtk_box_pack_start (GTK_BOX (hbox),
64 gtk_label_new (gtk_entry_get_icon_tooltip_text (GTK_ENTRY (widget), icon_pos)), FALSE, FALSE, 0);
65 gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE, 0);
66- #if defined (HAVE_LIBSOUP_2_34_0)
67+ #ifdef HAVE_LIBSOUP_2_34_0
68 midori_location_action_show_page_info (widget, GTK_BOX (content_area), dialog);
69 #endif
70 g_signal_connect (dialog, "destroy", G_CALLBACK (gtk_widget_destroyed), &dialog);
71
72=== modified file 'midori/midori-session.c'
73--- midori/midori-session.c 2013-10-25 21:49:56 +0000
74+++ midori/midori-session.c 2015-03-24 23:03:55 +0000
75@@ -236,7 +236,7 @@
76 g_signal_connect (settings, "notify::proxy-type",
77 G_CALLBACK (soup_session_settings_notify_http_proxy_cb), session);
78
79- #if defined (HAVE_LIBSOUP_2_34_0)
80+ #ifdef HAVE_LIBSOUP_2_34_0
81 g_signal_connect (session, "request-started",
82 G_CALLBACK (midori_soup_session_request_started_cb), session);
83 #endif
84
85=== modified file 'midori/midori-view.c'
86--- midori/midori-view.c 2015-03-22 16:59:59 +0000
87+++ midori/midori-view.c 2015-03-24 23:03:55 +0000
88@@ -27,7 +27,7 @@
89 #include <gcr/gcr.h>
90 #endif
91
92-#if !defined (HAVE_WEBKIT2) && defined (HAVE_LIBSOUP_2_29_91)
93+#if !defined (HAVE_WEBKIT2) && defined (HAVE_LIBSOUP_2_34_0)
94 SoupMessage*
95 midori_map_get_message (SoupMessage* message);
96 #endif
97@@ -478,7 +478,7 @@
98 midori_tab_set_load_status (MIDORI_TAB (view), load_status);
99 }
100
101-#if defined (HAVE_LIBSOUP_2_34_0)
102+#ifdef HAVE_LIBSOUP_2_34_0
103 /**
104 * midori_view_get_tls_info
105 * @view: a #MidoriView
106@@ -591,7 +591,7 @@
107 #endif
108 return TRUE;
109 }
110- #if defined (HAVE_LIBSOUP_2_34_0)
111+ #ifdef HAVE_GCR
112 else if (/* midori_tab_get_special (MIDORI_TAB (view)) && */ !strncmp (uri, "https", 5))
113 {
114 /* We show an error page if the certificate is invalid.
115@@ -723,9 +723,9 @@
116 g_object_set (view, "title", NULL, NULL);
117 midori_view_unset_icon (view);
118
119+ #ifdef HAVE_LIBSOUP_2_34_0
120 if (!strncmp (uri, "https", 5))
121 {
122- #if defined (HAVE_LIBSOUP_2_34_0)
123 #ifdef HAVE_WEBKIT2
124 void* request = NULL;
125 #else
126@@ -738,6 +738,7 @@
127 gchar* hostname;
128 if (midori_view_get_tls_info (view, request, &tls_cert, &tls_flags, &hostname))
129 midori_tab_set_security (MIDORI_TAB (view), MIDORI_SECURITY_TRUSTED);
130+ #ifdef HAVE_GCR
131 else if (!midori_tab_get_special (MIDORI_TAB (view)) && tls_cert != NULL)
132 {
133 GcrCertificate* gcr_cert;
134@@ -759,15 +760,16 @@
135 }
136 g_object_unref (gcr_cert);
137 }
138+ #endif
139 else
140- #endif
141 midori_tab_set_security (MIDORI_TAB (view), MIDORI_SECURITY_UNKNOWN);
142- #if defined (HAVE_LIBSOUP_2_34_0)
143+ #ifdef HAVE_GCR
144 if (tls_cert != NULL)
145 g_object_unref (tls_cert);
146 g_free (hostname);
147 #endif
148 }
149+ #endif
150 else
151 midori_tab_set_security (MIDORI_TAB (view), MIDORI_SECURITY_NONE);
152

Subscribers

People subscribed via source and target branches

to all changes: