mirror of
https://github.com/alexkay/spek.git
synced 2025-06-09 20:02:19 +03:00
Use the official binding g_filename_from_uri
This commit is contained in:
parent
e4e8e6bb23
commit
49ee0af067
@ -113,12 +113,10 @@ namespace Spek {
|
|||||||
string[] files = data.get_uris ();
|
string[] files = data.get_uris ();
|
||||||
if (files.length > 0) {
|
if (files.length > 0) {
|
||||||
try {
|
try {
|
||||||
string hostname;
|
open_file (Filename.from_uri (files[0]));
|
||||||
var file = filename_from_uri (files[0], out hostname);
|
|
||||||
open_file (file);
|
|
||||||
drag_finish (cx, true, false, time);
|
drag_finish (cx, true, false, time);
|
||||||
return;
|
return;
|
||||||
} catch {}
|
} catch (ConvertError e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
drag_finish (cx, false, false, time);
|
drag_finish (cx, false, false, time);
|
||||||
|
@ -14,9 +14,3 @@ namespace Config {
|
|||||||
public const string PKGDATADIR; /* /usr/local/share/spek */
|
public const string PKGDATADIR; /* /usr/local/share/spek */
|
||||||
public const string PKGLIBDIR; /* /usr/local/lib/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;
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user