Use the official binding g_filename_from_uri

This commit is contained in:
Alexander Kojevnikov 2010-05-19 19:41:27 +10:00
parent e4e8e6bb23
commit 49ee0af067
2 changed files with 2 additions and 10 deletions

View File

@ -113,12 +113,10 @@ namespace Spek {
string[] files = data.get_uris ();
if (files.length > 0) {
try {
string hostname;
var file = filename_from_uri (files[0], out hostname);
open_file (file);
open_file (Filename.from_uri (files[0]));
drag_finish (cx, true, false, time);
return;
} catch {}
} catch (ConvertError e) {}
}
}
drag_finish (cx, false, false, time);

View File

@ -14,9 +14,3 @@ namespace Config {
public const string PKGDATADIR; /* /usr/local/share/spek */
public const string PKGLIBDIR; /* /usr/local/lib/spek */
}
// TODO: file a bug to have this included
[CCode (cprefix = "G", lower_case_cprefix = "g_", cheader_filename = "glib.h", gir_namespace = "GLib", gir_version = "2.0")]
namespace GLib {
public static string filename_from_uri (string uri, out string hostname) throws Error;
}