~midori/midori/cmake-make-dist

« back to all changes in this revision

Viewing changes to midori/midori-download.vala

  • Committer: Tarmac
  • Author(s): Paweł Forysiuk, Christian Dywan
  • Date: 2013-11-05 18:00:59 UTC
  • mfrom: (6448.1.33 less-warnings)
  • Revision ID: tarmac-20131105180059-dypdrl07lyejesr3
Resolve compiler warnings in current trunk

Add EXTRA_WARNINGS flag to increase verbosity
Respect VALAC for the Vala compiler if defined
Sort out Vala 0.16 build issues
Make warnings fatal for bzr builds

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
*/
11
11
 
12
12
namespace Sokoke {
 
13
#if !HAVE_WEBKIT2
13
14
    extern static bool show_uri (Gdk.Screen screen, string uri, uint32 timestamp) throws Error;
14
15
    extern static bool message_dialog (Gtk.MessageType type, string short, string detailed, bool modal);
 
16
#endif
15
17
}
16
18
 
17
19
namespace Midori {
263
265
        }
264
266
 
265
267
        public static string? get_extension_for_uri (string uri, out string basename = null) {
266
 
            if (&basename != null)
267
 
                basename = null;
 
268
            basename = null;
268
269
            /* Find the last slash and the last period *after* the last slash. */
269
270
            int last_slash = uri.last_index_of_char ('/');
270
271
            /* Huh, URI without slashes? */
277
278
            int query = uri.last_index_of_char ('?', period);
278
279
            /* The extension, or "." if it ended with a period */
279
280
            string extension = uri.substring (period, query - period);
280
 
            if (&basename != null)
281
 
                basename = uri.substring (0, period);
 
281
            basename = uri.substring (0, period);
282
282
            return extension;
283
283
 
284
284
        }