File tree Expand file tree Collapse file tree 8 files changed +7
-61
lines changed
Expand file tree Collapse file tree 8 files changed +7
-61
lines changed Original file line number Diff line number Diff line change 88You'll need the following dependencies:
99* libcamel1.2-dev
1010* libedataserver1.2-dev
11- * libedataserverui1.2-dev
11+ * libedataserverui1.2-dev >=3.45.1
1212* libfolks-dev
1313* libgee-0.8-dev
1414* libglib2.0-dev
Original file line number Diff line number Diff line change @@ -21,16 +21,9 @@ basic_command = [
2121 ' --use-svg-images'
2222]
2323
24- if libedataserverui_dep.version().version_compare(' >=3.45.1' )
25- basic_command += [
26- ' --pkg' , ' webkit2gtk-4.1' ,
27- ' --define=HAS_SOUP_3'
28- ]
29- else
30- basic_command += [
31- ' --pkg' , ' webkit2gtk-4.0' ,
32- ]
33- endif
24+ basic_command += [
25+ ' --pkg' , ' webkit2gtk-4.0' ,
26+ ]
3427
3528all_doc_target = custom_target (
3629 ' full documentation' ,
Original file line number Diff line number Diff line change @@ -17,15 +17,9 @@ gee_dep = dependency('gee-0.8')
1717handy_dep = dependency (' libhandy-1' , version : ' >=1.1.90' )
1818camel_dep = dependency (' camel-1.2' , version : ' >= 3.28' )
1919libedataserver_dep = dependency (' libedataserver-1.2' , version : ' >= 3.28' )
20- libedataserverui_dep = dependency (' libedataserverui-1.2' , version : ' >= 3.28' )
21- if libedataserverui_dep.version().version_compare(' >=3.45.1' )
22- add_project_arguments (' --define=HAS_SOUP_3' , language : ' vala' )
23- webkit2_dep = dependency (' webkit2gtk-4.1' )
24- webkit2_web_extension_dep = dependency (' webkit2gtk-web-extension-4.1' )
25- else
26- webkit2_dep = dependency (' webkit2gtk-4.0' , version : ' >=2.28' )
27- webkit2_web_extension_dep = dependency (' webkit2gtk-web-extension-4.0' , version : ' >=2.28' )
28- endif
20+ libedataserverui_dep = dependency (' libedataserverui-1.2' , version : ' >=3.45.1' )
21+ webkit2_dep = dependency (' webkit2gtk-4.1' )
22+ webkit2_web_extension_dep = dependency (' webkit2gtk-web-extension-4.1' )
2923libportal_dep = dependency (' libportal' )
3024libportal_gtk_dep = dependency (' libportal-gtk3' )
3125folks_dep = dependency (' folks' )
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ public class Mail.Application : Gtk.Application {
6161 string to = null ;
6262
6363 try {
64- #if HAS_SOUP_3
6564 GLib . Uri ? mailto= null ;
6665 try {
6766 mailto = GLib . Uri . parse (mailto_uri, GLib . UriFlags . NONE );
@@ -86,26 +85,6 @@ public class Mail.Application : Gtk.Application {
8685 new Composer (to, mailto. get_query ()). present ();
8786 });
8887 }
89- #else
90- Soup . URI mailto = new Soup .URI (mailto_uri);
91- if (mailto == null ) {
92- throw new OptionError .BAD_VALUE (" Argument is not a URL." );
93- }
94-
95- if (mailto. scheme != " mailto" ) {
96- throw new OptionError .BAD_VALUE (" Cannot open non-mailto: URL" );
97- }
98-
99- to = Soup . URI. decode (mailto. path);
100-
101- if (main_window. is_session_started) {
102- new Composer (to, mailto. query). present ();
103- } else {
104- main_window. session_started. connect (() = > {
105- new Composer (to, mailto. query). present ();
106- });
107- }
108- #endif
10988 } catch (OptionError e) {
11089 warning (" Argument parsing error. %s " , e. message);
11190 }
Original file line number Diff line number Diff line change @@ -375,11 +375,7 @@ public class Mail.Composer : Hdy.ApplicationWindow {
375375 foreach (unowned string param in params) {
376376 var terms = param. split (" =" );
377377 if (terms. length == 2 ) {
378- #if HAS_SOUP_3
379378 result[terms[0 ]. down ()] = (GLib . Uri . unescape_string (terms[1 ]));
380- #else
381- result[terms[0 ]. down ()] = (Soup . URI. decode (terms[1 ]));
382- #endif
383379 } else {
384380 critical (" Invalid mailto URL" );
385381 }
@@ -517,11 +513,7 @@ public class Mail.Composer : Hdy.ApplicationWindow {
517513 private void on_mouse_target_changed (WebKit .WebView web_view , WebKit .HitTestResult hit_test , uint mods ) {
518514 if (hit_test. context_is_link ()) {
519515 var url = hit_test. get_link_uri ();
520- #if HAS_SOUP_3
521516 var hover_url = url != null ? GLib . Uri . unescape_string (url) : null ;
522- #else
523- var hover_url = url != null ? Soup . URI. decode (url) : null ;
524- #endif
525517
526518 if (hover_url == null ) {
527519 message_url_overlay. hide ();
Original file line number Diff line number Diff line change @@ -136,11 +136,7 @@ public class Mail.MainWindow : Hdy.ApplicationWindow {
136136 message_overlay. no_show_all = true ;
137137
138138 message_list. hovering_over_link. connect ((label, url) = > {
139- #if HAS_SOUP_3
140139 var hover_url = url != null ? GLib . Uri . unescape_string (url) : null ;
141- #else
142- var hover_url = url != null ? Soup . URI. decode (url) : null ;
143- #endif
144140
145141 if (hover_url == null ) {
146142 message_overlay. hide ();
Original file line number Diff line number Diff line change @@ -258,11 +258,7 @@ public class Mail.WebView : WebKit.WebView {
258258 }
259259
260260 private bool handle_internal_response (WebKit .URISchemeRequest request ) {
261- #if HAS_SOUP_3
262261 string uri = GLib . Uri . unescape_string (request. get_uri ());
263- #else
264- string uri = Soup . URI. decode (request. get_uri ());
265- #endif
266262 InputStream ? buf = this . internal_resources[uri];
267263 if (buf != null ) {
268264 request. finish (buf, - 1 , null );
Original file line number Diff line number Diff line change @@ -186,17 +186,13 @@ public class Mail.Page : Object {
186186
187187 private bool on_send_request (WebKit .WebPage page , WebKit .URIRequest request , WebKit .URIResponse ? response ) {
188188 bool should_load = false ;
189- #if HAS_SOUP_3
190189 GLib . Uri ? uri = null ;
191190 try {
192191 uri = GLib . Uri . parse (request. get_uri (), GLib . UriFlags . NONE );
193192 } catch (Error e) {
194193 warning (" Could not parse uri: %s " , e. message);
195194 return should_load;
196195 }
197- #else
198- Soup . URI? uri = new Soup .URI (request. get_uri ());
199- #endif
200196 if (uri != null && uri. get_scheme () in ALLOWED_SCHEMES ) {
201197 // Always load internal resources
202198 should_load = true ;
You can’t perform that action at this time.
0 commit comments