Commit a0ef2026 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

add to catalog: use a GthVfsTree instead of a GthSourceTree

It was almost the same widget.
parent 30482861
......@@ -264,15 +264,6 @@ add_close_button_clicked_cb (GtkWidget *widget,
}
static void
source_tree_open_cb (GthFolderTree *folder_tree,
GFile *file,
gpointer user_data)
{
add_button_clicked_cb (NULL, (DialogData *)user_data);
}
static void
update_sensitivity (DialogData *data)
{
......@@ -291,6 +282,14 @@ update_sensitivity (DialogData *data)
}
static void
source_tree_changed_cb (GthVfsTree *folder_tree,
gpointer user_data)
{
update_sensitivity ((DialogData *) user_data);
}
static void
source_tree_selection_changed_cb (GtkTreeSelection *treeselection,
gpointer user_data)
......@@ -654,7 +653,6 @@ void
dlg_add_to_catalog (GthBrowser *browser)
{
DialogData *data;
GFile *base;
GtkTreeSelection *selection;
if (gth_browser_get_dialog (browser, ADD_TO_CATALOG_DIALOG_NAME)) {
......@@ -674,10 +672,7 @@ dlg_add_to_catalog (GthBrowser *browser)
data->add_data->parent_window = data->add_data->dialog = data->dialog;
add_data_ref (data->add_data);
base = g_file_new_for_uri ("catalog:///");
data->source_tree = gth_source_tree_new (base);
g_object_unref (base);
data->source_tree = gth_vfs_tree_new ("catalog:///");
gtk_widget_show (data->source_tree);
gtk_container_add (GTK_CONTAINER (GET_WIDGET ("catalog_list_scrolled_window")), data->source_tree);
......@@ -695,8 +690,8 @@ dlg_add_to_catalog (GthBrowser *browser)
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (data->dialog));
g_signal_connect (G_OBJECT (data->source_tree),
"open",
G_CALLBACK (source_tree_open_cb),
"changed",
G_CALLBACK (source_tree_changed_cb),
data);
g_signal_connect (G_OBJECT (GET_WIDGET ("add_button")),
"clicked",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment