cleanup comments
[melted_gui] / src / ui.c
index 6e3b915..50da745 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -229,6 +229,30 @@ static GtkWidget* pane_library_buttons(GtkWidget* top, omnplay_instance_t* app)
     return hbox;
 }
 
+static GtkWidget* pane_library_search_buttons(GtkWidget* top, omnplay_instance_t* app)
+{
+    GtkWidget* hbox;
+
+    hbox = gtk_hbox_new (FALSE, 0);
+    gtk_widget_show (hbox);
+
+    /* text entry */
+    gtk_box_pack_start (GTK_BOX (hbox),
+        app->library.search = gtk_entry_new(),
+            TRUE, TRUE, 0);
+    gtk_widget_show(app->library.search);
+
+    /* playlist modify buttons */
+    gtk_box_pack_start (GTK_BOX (hbox),
+        ui_create_button(top, app, BUTTON_LIBRARY_FIND),
+            FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (hbox),
+        ui_create_button(top, app, BUTTON_LIBRARY_FIND_NEXT),
+            FALSE, FALSE, 0);
+
+    return hbox;
+}
+
 static GtkWidget* pane_library(GtkWidget* top, omnplay_instance_t* app)
 {
     GtkWidget* vbox;
@@ -242,11 +266,16 @@ static GtkWidget* pane_library(GtkWidget* top, omnplay_instance_t* app)
         pane_library_buttons(top, app),
         FALSE, FALSE, 0);
 
-    /* add buttons box */
+    /* add grid */
     gtk_box_pack_start (GTK_BOX (vbox),
         pane_library_grid(top, app),
         TRUE, TRUE, 0);
 
+    /* add search buttons */
+    gtk_box_pack_start (GTK_BOX (vbox),
+        pane_library_search_buttons(top, app),
+        FALSE, FALSE, 0);
+
     return vbox;
 }
 
@@ -255,11 +284,14 @@ static GtkWidget* create_channel_status(GtkWidget* top, omnplay_instance_t* app,
     GtkWidget* vbox;
     GtkWidget* hbox;
     GtkWidget* frame;
+    char name[PATH_MAX];
     omnplay_player_t* player;
 
     player = &app->players.item[idx];
 
-    frame = gtk_frame_new(player->name);
+    snprintf(name, sizeof(name), "%c [%s]", idx + 'A', player->name);
+
+    frame = gtk_frame_new(name);
     gtk_widget_show(frame);
 
     vbox = gtk_vbox_new(FALSE, 0);
@@ -690,18 +722,16 @@ void ui_library_refresh(omnplay_instance_t* app, GtkWidget **p_win, GtkWidget **
     gtk_window_set_default_size(GTK_WINDOW(win), 250, 100);
     gtk_window_set_modal(GTK_WINDOW(win), TRUE);
     gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(app->window));
+//    gtk_window_set_deletable(GTK_WINDOW(win), FALSE);
+//    gtk_window_set_resizable(GTK_WINDOW(win), FALSE);
 
     box = gtk_vbox_new(FALSE, 0);
     gtk_widget_show(box);
     gtk_container_add(GTK_CONTAINER(win), box);
 
     label = create_label(NULL, "Requsting status...", NULL, 0),
-    gtk_widget_show(label);
     gtk_box_pack_start (GTK_BOX(box), label, TRUE, TRUE, 0);
 
-    gtk_window_present(GTK_WINDOW(win));
-    gtk_widget_show(win);
-
     *p_win = win;
     *p_label = label;
 };