fix root dir type
[melted_gui] / src / library.c
index c42838a..f800a69 100644 (file)
@@ -67,7 +67,7 @@ static int library_init_load(instance_t* app)
     gtk_tree_store_append(tree_store, &iter, NULL);
     gtk_tree_store_set(tree_store, &iter,
         0, app->library.icons[0],
-        1, "<dir>>",
+        1, "<dir>",
         2, "LIBRARY",
         3, NULL,
         4, NULL,
@@ -142,6 +142,7 @@ static void on_library_row_expanded
     mvcp_dir dir;
     mvcp_dir_entry_t *e;
     instance_t* app = (instance_t*)user_data;
+    char msg[PATH_MAX];
 
 //    g_warning("on_library_row_expanded: HERE");
 
@@ -183,15 +184,25 @@ static void on_library_row_expanded
         e = (mvcp_dir_entry_t*)malloc(sizeof(mvcp_dir_entry_t));
         *e = dir_entry;
 
+        snprintf(msg, sizeof(msg), "probing [%s]", e->full);
+        ui_set_status(app, msg, 0);
+
+        gdk_threads_leave();
+
         if(!e->dir && mvcp_ok == mvcp_probe_clip( app->library.handle[0], e->full, &list_entry))
         {
             list_e = (mvcp_list_entry_t*)malloc(sizeof(mvcp_list_entry_t));
             *list_e = list_entry;
         };
 
+        gdk_threads_enter();
+
         library_add_item(app, GTK_TREE_STORE(model), iter, e, list_e);
     };
 
+    snprintf(msg, sizeof(msg), "read [%s] done", p);
+    ui_set_status(app, msg, 0);
+
     /* restore cursor */
     gdk_window_set_cursor(gtk_widget_get_toplevel(GTK_WIDGET(treeview))->window, NULL);
 
@@ -269,7 +280,8 @@ void library_init(instance_t* app)
     app->library.handle[0] = mvcp_init(app->library.handle[1]);
     if(mvcp_connect(app->library.handle[0]) != mvcp_ok)
     {
-        g_warning("library_init: failed to connect to server %s", app->players.host);
+        g_warning("library_init: failed to connect to server %s:%d",
+            app->players.host, app->library.port);
         return;
     };