2018-06-12 01:56:21 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2018-09-12 01:10:50 +00:00
|
|
|
#define ROWS 30
|
|
|
|
|
2018-09-15 13:12:35 +00:00
|
|
|
GSList *pending = NULL;
|
2018-09-12 03:04:17 +00:00
|
|
|
guint active = 0;
|
|
|
|
|
|
|
|
static void
|
|
|
|
got_files (GObject *enumerate,
|
|
|
|
GAsyncResult *res,
|
|
|
|
gpointer store);
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
start_enumerate (GListStore *store)
|
2018-06-12 01:56:21 +00:00
|
|
|
{
|
|
|
|
GFileEnumerator *enumerate;
|
2018-09-12 03:04:17 +00:00
|
|
|
GFile *file = g_object_get_data (G_OBJECT (store), "file");
|
|
|
|
GError *error = NULL;
|
2018-09-12 01:10:50 +00:00
|
|
|
|
2018-06-12 01:56:21 +00:00
|
|
|
enumerate = g_file_enumerate_children (file,
|
|
|
|
G_FILE_ATTRIBUTE_STANDARD_TYPE
|
2018-09-16 08:31:16 +00:00
|
|
|
"," G_FILE_ATTRIBUTE_STANDARD_ICON
|
2018-06-12 01:56:21 +00:00
|
|
|
"," G_FILE_ATTRIBUTE_STANDARD_NAME,
|
|
|
|
0,
|
|
|
|
NULL,
|
2018-09-12 03:04:17 +00:00
|
|
|
&error);
|
|
|
|
|
2018-06-12 01:56:21 +00:00
|
|
|
if (enumerate == NULL)
|
2018-09-12 03:04:17 +00:00
|
|
|
{
|
2018-09-15 13:12:35 +00:00
|
|
|
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_TOO_MANY_OPEN_FILES) && active)
|
2018-09-12 03:04:17 +00:00
|
|
|
{
|
|
|
|
g_clear_error (&error);
|
|
|
|
pending = g_slist_prepend (pending, g_object_ref (store));
|
|
|
|
return TRUE;
|
|
|
|
}
|
2018-06-12 01:56:21 +00:00
|
|
|
|
2018-09-12 03:04:17 +00:00
|
|
|
g_clear_error (&error);
|
|
|
|
g_object_unref (store);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2018-06-12 01:56:21 +00:00
|
|
|
|
2018-09-12 03:04:17 +00:00
|
|
|
if (active > 20)
|
2018-06-12 01:56:21 +00:00
|
|
|
{
|
2018-09-12 03:04:17 +00:00
|
|
|
g_object_unref (enumerate);
|
|
|
|
pending = g_slist_prepend (pending, g_object_ref (store));
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
active++;
|
|
|
|
g_file_enumerator_next_files_async (enumerate,
|
|
|
|
g_file_is_native (file) ? 5000 : 100,
|
|
|
|
G_PRIORITY_DEFAULT_IDLE,
|
|
|
|
NULL,
|
|
|
|
got_files,
|
|
|
|
g_object_ref (store));
|
|
|
|
|
|
|
|
g_object_unref (enumerate);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
got_files (GObject *enumerate,
|
|
|
|
GAsyncResult *res,
|
|
|
|
gpointer store)
|
|
|
|
{
|
|
|
|
GList *l, *files;
|
|
|
|
GFile *file = g_object_get_data (store, "file");
|
|
|
|
GPtrArray *array;
|
|
|
|
|
|
|
|
files = g_file_enumerator_next_files_finish (G_FILE_ENUMERATOR (enumerate), res, NULL);
|
|
|
|
if (files == NULL)
|
|
|
|
{
|
|
|
|
g_object_unref (store);
|
|
|
|
if (pending)
|
|
|
|
{
|
|
|
|
GListStore *store = pending->data;
|
|
|
|
pending = g_slist_remove (pending, store);
|
|
|
|
start_enumerate (store);
|
|
|
|
}
|
|
|
|
active--;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
array = g_ptr_array_new ();
|
|
|
|
g_ptr_array_new_with_free_func (g_object_unref);
|
|
|
|
for (l = files; l; l = l->next)
|
|
|
|
{
|
|
|
|
GFileInfo *info = l->data;
|
|
|
|
GFile *child;
|
2018-06-12 01:56:21 +00:00
|
|
|
|
|
|
|
child = g_file_get_child (file, g_file_info_get_name (info));
|
2018-09-16 08:31:16 +00:00
|
|
|
g_object_set_data_full (G_OBJECT (info), "file", child, g_object_unref);
|
|
|
|
g_ptr_array_add (array, info);
|
2018-06-12 01:56:21 +00:00
|
|
|
}
|
2018-09-16 08:31:16 +00:00
|
|
|
g_list_free (files);
|
2018-06-12 01:56:21 +00:00
|
|
|
|
2018-09-12 03:04:17 +00:00
|
|
|
g_list_store_splice (store, g_list_model_get_n_items (store), 0, array->pdata, array->len);
|
|
|
|
g_ptr_array_unref (array);
|
|
|
|
|
|
|
|
g_file_enumerator_next_files_async (G_FILE_ENUMERATOR (enumerate),
|
|
|
|
g_file_is_native (file) ? 5000 : 100,
|
|
|
|
G_PRIORITY_DEFAULT_IDLE,
|
|
|
|
NULL,
|
|
|
|
got_files,
|
|
|
|
store);
|
|
|
|
}
|
|
|
|
|
2018-09-14 02:54:36 +00:00
|
|
|
static int
|
|
|
|
compare_files (gconstpointer first,
|
|
|
|
gconstpointer second,
|
|
|
|
gpointer unused)
|
|
|
|
{
|
2018-09-16 08:31:16 +00:00
|
|
|
GFile *first_file, *second_file;
|
2018-09-14 02:54:36 +00:00
|
|
|
char *first_path, *second_path;
|
|
|
|
int result;
|
|
|
|
#if 0
|
|
|
|
GFileType first_type, second_type;
|
|
|
|
|
|
|
|
/* This is a bit slow, because each g_file_query_file_type() does a stat() */
|
|
|
|
first_type = g_file_query_file_type (G_FILE (first), G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
|
|
|
|
second_type = g_file_query_file_type (G_FILE (second), G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
|
|
|
|
|
|
|
|
if (first_type == G_FILE_TYPE_DIRECTORY && second_type != G_FILE_TYPE_DIRECTORY)
|
|
|
|
return -1;
|
|
|
|
if (first_type != G_FILE_TYPE_DIRECTORY && second_type == G_FILE_TYPE_DIRECTORY)
|
|
|
|
return 1;
|
|
|
|
#endif
|
|
|
|
|
2018-09-16 08:31:16 +00:00
|
|
|
first_file = g_object_get_data (G_OBJECT (first), "file");
|
|
|
|
second_file = g_object_get_data (G_OBJECT (second), "file");
|
|
|
|
first_path = g_file_get_path (first_file);
|
|
|
|
second_path = g_file_get_path (second_file);
|
2018-09-14 02:54:36 +00:00
|
|
|
|
2018-10-24 18:48:45 +00:00
|
|
|
result = g_ascii_strcasecmp (first_path, second_path);
|
2018-09-14 02:54:36 +00:00
|
|
|
|
|
|
|
g_free (first_path);
|
|
|
|
g_free (second_path);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2018-09-12 03:04:17 +00:00
|
|
|
static GListModel *
|
2018-09-16 08:31:16 +00:00
|
|
|
create_list_model_for_directory (gpointer file)
|
2018-09-12 03:04:17 +00:00
|
|
|
{
|
2018-09-14 02:54:36 +00:00
|
|
|
GtkSortListModel *sort;
|
2018-09-12 03:04:17 +00:00
|
|
|
GListStore *store;
|
|
|
|
|
|
|
|
if (g_file_query_file_type (file, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) != G_FILE_TYPE_DIRECTORY)
|
|
|
|
return NULL;
|
2018-06-12 01:56:21 +00:00
|
|
|
|
2018-09-16 08:31:16 +00:00
|
|
|
store = g_list_store_new (G_TYPE_FILE_INFO);
|
2018-09-12 03:04:17 +00:00
|
|
|
g_object_set_data_full (G_OBJECT (store), "file", g_object_ref (file), g_object_unref);
|
|
|
|
|
2018-09-14 02:54:36 +00:00
|
|
|
if (!start_enumerate (store))
|
2018-09-12 03:04:17 +00:00
|
|
|
return NULL;
|
2018-09-14 02:54:36 +00:00
|
|
|
|
|
|
|
sort = gtk_sort_list_model_new (G_LIST_MODEL (store),
|
|
|
|
compare_files,
|
|
|
|
NULL, NULL);
|
|
|
|
g_object_unref (store);
|
|
|
|
return G_LIST_MODEL (sort);
|
2018-06-12 01:56:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
2018-09-01 02:59:06 +00:00
|
|
|
create_widget_for_model (gpointer item,
|
2018-06-12 01:56:21 +00:00
|
|
|
gpointer root)
|
|
|
|
{
|
|
|
|
GtkWidget *row, *box, *child;
|
2018-09-16 08:31:16 +00:00
|
|
|
GFileInfo *info;
|
2018-09-01 02:59:06 +00:00
|
|
|
GFile *file;
|
2018-06-12 01:56:21 +00:00
|
|
|
guint depth;
|
2018-09-16 08:31:16 +00:00
|
|
|
GIcon *icon;
|
2018-06-12 01:56:21 +00:00
|
|
|
|
|
|
|
row = gtk_list_box_row_new ();
|
2018-09-12 01:10:50 +00:00
|
|
|
gtk_widget_set_vexpand (row, TRUE);
|
2018-06-12 01:56:21 +00:00
|
|
|
|
2018-09-16 08:31:16 +00:00
|
|
|
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
2018-06-12 01:56:21 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (row), box);
|
|
|
|
|
2018-09-01 02:59:06 +00:00
|
|
|
depth = gtk_tree_list_row_get_depth (item);
|
2018-06-12 01:56:21 +00:00
|
|
|
if (depth > 0)
|
|
|
|
{
|
|
|
|
child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
|
|
|
gtk_widget_set_size_request (child, 16 * depth, 0);
|
|
|
|
gtk_container_add (GTK_CONTAINER (box), child);
|
|
|
|
}
|
|
|
|
|
2018-09-01 02:59:06 +00:00
|
|
|
if (gtk_tree_list_row_is_expandable (item))
|
|
|
|
{
|
|
|
|
GtkWidget *title, *arrow;
|
|
|
|
|
|
|
|
child = g_object_new (GTK_TYPE_BOX, "css-name", "expander", NULL);
|
|
|
|
|
|
|
|
title = g_object_new (GTK_TYPE_TOGGLE_BUTTON, "css-name", "title", NULL);
|
|
|
|
gtk_button_set_relief (GTK_BUTTON (title), GTK_RELIEF_NONE);
|
|
|
|
g_object_bind_property (item, "expanded", title, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
|
|
|
g_object_set_data_full (G_OBJECT (title), "make-sure-its-not-unreffed", g_object_ref (item), g_object_unref);
|
|
|
|
gtk_container_add (GTK_CONTAINER (child), title);
|
|
|
|
|
|
|
|
arrow = g_object_new (GTK_TYPE_SPINNER, "css-name", "arrow", NULL);
|
|
|
|
gtk_container_add (GTK_CONTAINER (title), arrow);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
child = gtk_image_new (); /* empty whatever */
|
|
|
|
}
|
2018-06-12 01:56:21 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (box), child);
|
|
|
|
|
2018-09-16 08:31:16 +00:00
|
|
|
info = gtk_tree_list_row_get_item (item);
|
|
|
|
|
|
|
|
icon = g_file_info_get_icon (info);
|
|
|
|
if (icon)
|
|
|
|
{
|
|
|
|
child = gtk_image_new_from_gicon (icon);
|
|
|
|
gtk_container_add (GTK_CONTAINER (box), child);
|
|
|
|
}
|
|
|
|
|
|
|
|
file = g_object_get_data (G_OBJECT (info), "file");
|
2018-06-12 01:56:21 +00:00
|
|
|
child = gtk_label_new (g_file_get_basename (file));
|
2018-09-16 08:31:16 +00:00
|
|
|
g_object_unref (info);
|
2018-09-01 02:59:06 +00:00
|
|
|
|
2018-06-12 01:56:21 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (box), child);
|
|
|
|
|
|
|
|
return row;
|
|
|
|
}
|
|
|
|
|
2018-09-16 08:31:16 +00:00
|
|
|
static GListModel *
|
|
|
|
create_list_model_for_file_info (gpointer file_info,
|
|
|
|
gpointer unused)
|
|
|
|
{
|
|
|
|
GFile *file = g_object_get_data (file_info, "file");
|
|
|
|
|
|
|
|
if (file == NULL)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
return create_list_model_for_directory (file);
|
|
|
|
}
|
|
|
|
|
2018-09-12 01:10:50 +00:00
|
|
|
static void
|
|
|
|
update_adjustment (GListModel *model,
|
|
|
|
guint position,
|
|
|
|
guint removed,
|
|
|
|
guint added,
|
|
|
|
GtkAdjustment *adjustment)
|
|
|
|
{
|
|
|
|
gtk_adjustment_set_upper (adjustment, MAX (ROWS, g_list_model_get_n_items (model)));
|
2018-09-14 02:54:36 +00:00
|
|
|
}
|
|
|
|
|
2018-09-15 13:12:35 +00:00
|
|
|
static gboolean
|
|
|
|
update_statusbar (GtkStatusbar *statusbar)
|
2018-09-14 02:54:36 +00:00
|
|
|
{
|
2018-09-15 13:12:35 +00:00
|
|
|
GListModel *model = g_object_get_data (G_OBJECT (statusbar), "model");
|
|
|
|
GString *string = g_string_new (NULL);
|
|
|
|
guint n;
|
|
|
|
gboolean result = G_SOURCE_REMOVE;
|
|
|
|
|
2018-09-14 02:54:36 +00:00
|
|
|
gtk_statusbar_remove_all (statusbar, 0);
|
|
|
|
|
2018-09-15 13:12:35 +00:00
|
|
|
n = g_list_model_get_n_items (model);
|
|
|
|
g_string_append_printf (string, "%u", n);
|
|
|
|
if (GTK_IS_FILTER_LIST_MODEL (model))
|
|
|
|
{
|
|
|
|
guint n_unfiltered = g_list_model_get_n_items (gtk_filter_list_model_get_model (GTK_FILTER_LIST_MODEL (model)));
|
|
|
|
if (n != n_unfiltered)
|
|
|
|
g_string_append_printf (string, "/%u", n_unfiltered);
|
|
|
|
}
|
|
|
|
g_string_append (string, " items");
|
|
|
|
|
|
|
|
if (pending || active)
|
|
|
|
{
|
|
|
|
g_string_append_printf (string, " (%u directories remaining)", active + g_slist_length (pending));
|
|
|
|
result = G_SOURCE_CONTINUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_statusbar_push (statusbar, 0, string->str);
|
|
|
|
g_free (string->str);
|
|
|
|
|
|
|
|
return result;
|
2018-09-13 00:33:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
match_file (gpointer item, gpointer data)
|
|
|
|
{
|
|
|
|
GtkWidget *search_entry = data;
|
2018-09-16 08:31:16 +00:00
|
|
|
GFileInfo *info = gtk_tree_list_row_get_item (item);
|
|
|
|
GFile *file = g_object_get_data (G_OBJECT (info), "file");
|
2018-09-13 00:33:32 +00:00
|
|
|
char *path;
|
|
|
|
gboolean result;
|
|
|
|
|
|
|
|
path = g_file_get_path (file);
|
|
|
|
|
2019-02-28 19:31:36 +00:00
|
|
|
result = strstr (path, gtk_editable_get_text (GTK_EDITABLE (search_entry))) != NULL;
|
2018-09-13 00:33:32 +00:00
|
|
|
|
2018-09-16 08:31:16 +00:00
|
|
|
g_object_unref (info);
|
2018-09-13 00:33:32 +00:00
|
|
|
g_free (path);
|
|
|
|
|
|
|
|
return result;
|
2018-09-12 01:10:50 +00:00
|
|
|
}
|
|
|
|
|
2020-02-10 03:24:47 +00:00
|
|
|
static void
|
|
|
|
quit_cb (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
gboolean *done = data;
|
|
|
|
|
|
|
|
*done = TRUE;
|
|
|
|
|
|
|
|
g_main_context_wakeup (NULL);
|
|
|
|
}
|
|
|
|
|
2018-06-12 01:56:21 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
2018-09-12 01:10:50 +00:00
|
|
|
GtkAdjustment *adjustment;
|
2018-09-14 02:54:36 +00:00
|
|
|
GtkWidget *win, *hbox, *vbox, *scrollbar, *listbox, *search_entry, *statusbar;
|
2018-09-12 01:10:50 +00:00
|
|
|
GListModel *dirmodel;
|
|
|
|
GtkTreeListModel *tree;
|
2018-09-13 00:33:32 +00:00
|
|
|
GtkFilterListModel *filter;
|
2018-09-12 01:10:50 +00:00
|
|
|
GtkSliceListModel *slice;
|
2018-06-12 01:56:21 +00:00
|
|
|
GFile *root;
|
2020-02-10 03:24:47 +00:00
|
|
|
gboolean done = FALSE;
|
2018-06-12 01:56:21 +00:00
|
|
|
|
|
|
|
gtk_init ();
|
|
|
|
|
|
|
|
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
|
|
gtk_window_set_default_size (GTK_WINDOW (win), 400, 600);
|
2020-02-10 03:24:47 +00:00
|
|
|
g_signal_connect (win, "destroy", G_CALLBACK (quit_cb), &done);
|
2018-06-12 01:56:21 +00:00
|
|
|
|
2018-09-13 00:33:32 +00:00
|
|
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
|
|
|
gtk_container_add (GTK_CONTAINER (win), vbox);
|
|
|
|
|
|
|
|
search_entry = gtk_search_entry_new ();
|
|
|
|
gtk_container_add (GTK_CONTAINER (vbox), search_entry);
|
|
|
|
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
|
|
|
gtk_search_entry_set_key_capture_widget (GTK_SEARCH_ENTRY (search_entry), hbox);
|
|
|
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
2018-06-12 01:56:21 +00:00
|
|
|
|
|
|
|
listbox = gtk_list_box_new ();
|
2018-09-12 01:10:50 +00:00
|
|
|
gtk_widget_set_hexpand (listbox, TRUE);
|
2018-09-13 00:33:32 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (hbox), listbox);
|
2018-06-12 01:56:21 +00:00
|
|
|
|
2018-09-12 01:10:50 +00:00
|
|
|
if (argc > 1)
|
|
|
|
root = g_file_new_for_commandline_arg (argv[1]);
|
|
|
|
else
|
|
|
|
root = g_file_new_for_path (g_get_current_dir ());
|
2018-09-16 08:31:16 +00:00
|
|
|
dirmodel = create_list_model_for_directory (root);
|
2018-09-12 01:10:50 +00:00
|
|
|
tree = gtk_tree_list_model_new (FALSE,
|
|
|
|
dirmodel,
|
|
|
|
TRUE,
|
2018-09-16 08:31:16 +00:00
|
|
|
create_list_model_for_file_info,
|
2018-09-12 01:10:50 +00:00
|
|
|
NULL, NULL);
|
2018-06-12 01:56:21 +00:00
|
|
|
g_object_unref (dirmodel);
|
2018-09-12 01:10:50 +00:00
|
|
|
|
2018-09-13 00:33:32 +00:00
|
|
|
filter = gtk_filter_list_model_new (G_LIST_MODEL (tree),
|
|
|
|
match_file,
|
|
|
|
search_entry,
|
|
|
|
NULL);
|
|
|
|
g_signal_connect_swapped (search_entry, "search-changed", G_CALLBACK (gtk_filter_list_model_refilter), filter);
|
|
|
|
slice = gtk_slice_list_model_new (G_LIST_MODEL (filter), 0, ROWS);
|
2018-09-12 01:10:50 +00:00
|
|
|
|
2018-06-12 01:56:21 +00:00
|
|
|
gtk_list_box_bind_model (GTK_LIST_BOX (listbox),
|
2018-09-12 01:10:50 +00:00
|
|
|
G_LIST_MODEL (slice),
|
2018-06-12 01:56:21 +00:00
|
|
|
create_widget_for_model,
|
|
|
|
root, g_object_unref);
|
2018-09-12 01:10:50 +00:00
|
|
|
|
|
|
|
adjustment = gtk_adjustment_new (0,
|
|
|
|
0, MAX (g_list_model_get_n_items (G_LIST_MODEL (tree)), ROWS),
|
|
|
|
1, ROWS - 1,
|
|
|
|
ROWS);
|
|
|
|
g_object_bind_property (adjustment, "value", slice, "offset", 0);
|
2018-09-13 00:33:32 +00:00
|
|
|
g_signal_connect (filter, "items-changed", G_CALLBACK (update_adjustment), adjustment);
|
2018-09-12 01:10:50 +00:00
|
|
|
|
|
|
|
scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, adjustment);
|
2018-09-13 00:33:32 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (hbox), scrollbar);
|
2018-09-12 01:10:50 +00:00
|
|
|
|
2018-09-14 02:54:36 +00:00
|
|
|
statusbar = gtk_statusbar_new ();
|
2018-09-15 13:12:35 +00:00
|
|
|
gtk_widget_add_tick_callback (statusbar, (GtkTickCallback) update_statusbar, NULL, NULL);
|
|
|
|
g_object_set_data (G_OBJECT (statusbar), "model", filter);
|
|
|
|
g_signal_connect_swapped (filter, "items-changed", G_CALLBACK (update_statusbar), statusbar);
|
|
|
|
update_statusbar (GTK_STATUSBAR (statusbar));
|
2018-09-14 02:54:36 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (vbox), statusbar);
|
|
|
|
|
2018-09-12 01:10:50 +00:00
|
|
|
g_object_unref (tree);
|
2018-09-13 00:33:32 +00:00
|
|
|
g_object_unref (filter);
|
2018-09-12 01:10:50 +00:00
|
|
|
g_object_unref (slice);
|
2018-06-12 01:56:21 +00:00
|
|
|
|
|
|
|
gtk_widget_show (win);
|
|
|
|
|
2020-02-10 03:24:47 +00:00
|
|
|
while (!done)
|
|
|
|
g_main_context_iteration (NULL, TRUE);
|
2018-06-12 01:56:21 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|