/*
* Geeqie
* (C) 2004 John Ellis
- * Copyright (C) 2008 - 2010 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
*
* Author: John Ellis
*
DEBUG_1("HUP detected, closing client.");
DEBUG_1("client count %d", g_list_length(rc->clients));
-
+
g_source_remove(client->channel_id);
close(client->fd);
g_free(client);
}
rc = g_new0(RemoteConnection, 1);
-
+
rc->server = TRUE;
rc->fd = fd;
rc->path = g_strdup(path);
channel = g_io_channel_unix_new(rc->fd);
- g_io_channel_set_flags(channel, G_IO_FLAG_NONBLOCK, NULL);
-
+ g_io_channel_set_flags(channel, G_IO_FLAG_NONBLOCK, NULL);
+
rc->channel_id = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, G_IO_IN,
remote_server_read_cb, rc, NULL);
g_io_channel_unref(channel);
ret = FALSE;
}
}
-
+
/* restore the original signal handler */
sigaction(SIGPIPE, &old_action, NULL);
static void gr_get_sidecars(const gchar *text, GIOChannel *channel, gpointer data)
{
gchar *filename = expand_tilde(text);
- FileData *fd = file_data_new_simple(filename);
-
+ FileData *fd = file_data_new_group(filename);
+
GList *work;
if (fd->parent) fd = fd->parent;
static void gr_get_destination(const gchar *text, GIOChannel *channel, gpointer data)
{
gchar *filename = expand_tilde(text);
- FileData *fd = file_data_new_simple(filename);
-
+ FileData *fd = file_data_new_group(filename);
+
if (fd->change && fd->change->dest)
{
g_io_channel_write_chars(channel, fd->change->dest, -1, NULL, NULL);
{
gchar *filename = expand_tilde(text);
- view_window_new(file_data_new_simple(filename));
+ view_window_new(file_data_new_group(filename));
g_free(filename);
}
new = (!collection_get_first(remote_data->command_collection));
}
- if (collection_add(remote_data->command_collection, file_data_new_simple(text), FALSE) && new)
+ if (collection_add(remote_data->command_collection, file_data_new_group(text), FALSE) && new)
{
layout_image_set_collection(NULL, remote_data->command_collection,
collection_get_first(remote_data->command_collection));
{
RemoteConnection *remote_connection = remote_server_open(path);
RemoteData *remote_data = g_new(RemoteData, 1);
-
+
remote_data->command_collection = command_collection;
remote_server_subscribe(remote_connection, remote_cb, remote_data);