From: Maksym Veremeyenko Date: Sat, 25 Jun 2011 11:04:54 +0000 (+0300) Subject: mininal status string implementation X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=4c546648c90359fcbc9695c1c9139d7368462c09;p=omnplay mininal status string implementation --- diff --git a/src/omnplay.cpp b/src/omnplay.cpp index 8c2bafc..ae8cc9b 100644 --- a/src/omnplay.cpp +++ b/src/omnplay.cpp @@ -1302,7 +1302,7 @@ void omnplay_playlist_normalize(omnplay_instance_t* app) void omnplay_set_status(omnplay_instance_t* app, char* str) { gdk_threads_enter(); -// gtk_label_set_text(GTK_LABEL(data), str); + gtk_label_set_text(GTK_LABEL(app->status_label), str); gdk_flush(); gdk_threads_leave(); }; diff --git a/src/omnplay.h b/src/omnplay.h index f5051e5..de3c756 100644 --- a/src/omnplay.h +++ b/src/omnplay.h @@ -130,6 +130,7 @@ typedef struct omnplay_instance GtkWidget *playlist_grid; GtkWidget *library_grid; GtkWidget *buttons[BUTTON_LAST + 1]; + GtkWidget *status_label; struct { omnplay_player_t item[MAX_PLAYERS]; diff --git a/src/ui.c b/src/ui.c index 97d01be..a202491 100644 --- a/src/ui.c +++ b/src/ui.c @@ -560,6 +560,7 @@ static GtkWidget* pane_top(GtkWidget* top, omnplay_instance_t* app) GtkWidget* ui_omnplay (omnplay_instance_t* app) { GtkWidget *wnd; + GtkWidget* vbox; wnd = gtk_window_new (GTK_WINDOW_TOPLEVEL); GLADE_HOOKUP_OBJECT_NO_REF (wnd, wnd, "omnplay_window"); @@ -567,8 +568,17 @@ GtkWidget* ui_omnplay (omnplay_instance_t* app) gtk_window_set_title (GTK_WINDOW (wnd), _("Omneon Player")); gtk_window_set_default_size (GTK_WINDOW (wnd), 1024, 768); - gtk_container_add (GTK_CONTAINER (wnd), - pane_top(wnd, app)); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); + + gtk_container_add(GTK_CONTAINER(wnd), vbox); + + gtk_box_pack_start (GTK_BOX (vbox), + pane_top(wnd, app), + TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox), + app->status_label = create_label(wnd, "omnplay started", NULL, GTK_JUSTIFY_LEFT), + FALSE, FALSE, 0); app->playlist.block_icons[OMNPLAY_PLAYLIST_ITEM_BLOCK_BEGIN] = create_pixbuf("block_type_block_start_16x16.png");