app: port file_open_from_command_line() to GFile
Use g_file_new_for_commandline_arg() and remove file_utils_any_to_file().
This commit is contained in:
@ -39,7 +39,7 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gchar *uri;
|
||||
GFile *file;
|
||||
gboolean as_new;
|
||||
} OpenData;
|
||||
|
||||
@ -269,7 +269,7 @@ gimp_dbus_service_open_idle (GimpDBusService *service)
|
||||
|
||||
if (data)
|
||||
{
|
||||
file_open_from_command_line (service->gimp, data->uri, data->as_new,
|
||||
file_open_from_command_line (service->gimp, data->file, data->as_new,
|
||||
NULL, /* FIXME monitor */
|
||||
0 /* FIXME monitor */);
|
||||
|
||||
@ -290,7 +290,7 @@ gimp_dbus_service_open_data_new (GimpDBusService *service,
|
||||
{
|
||||
OpenData *data = g_slice_new (OpenData);
|
||||
|
||||
data->uri = g_strdup (uri);
|
||||
data->file = g_file_new_for_uri (uri);
|
||||
data->as_new = as_new;
|
||||
|
||||
return data;
|
||||
@ -299,6 +299,6 @@ gimp_dbus_service_open_data_new (GimpDBusService *service,
|
||||
static void
|
||||
gimp_dbus_service_open_data_free (OpenData *data)
|
||||
{
|
||||
g_free (data->uri);
|
||||
g_object_unref (data->file);
|
||||
g_slice_free (OpenData, data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user