ocarina: Created footer tabs
I'm going to use a ribbon-ish interface for the footer and work the settings pages in with the now playing widgets to make things easier to find. Right now, I created everything with placeholders. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
3d11ea47ba
commit
8f43bf62e4
|
@ -16,7 +16,11 @@ namespace ocarina
|
|||
{
|
||||
|
||||
void init();
|
||||
|
||||
GtkWidget *playlist_init();
|
||||
GtkWidget *footer_init();
|
||||
GtkWidget *now_playing_page();
|
||||
GtkWidget *general_page();
|
||||
GtkWidget *library_page();
|
||||
}
|
||||
|
||||
}; /* Namespace: ocarina */
|
||||
|
|
|
@ -12,7 +12,11 @@ namespace ocarina
|
|||
{
|
||||
content = gtk_vbox_new(FALSE, 0);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(content), playlist_init(), TRUE, TRUE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(content), footer_init(), FALSE, FALSE, 0);
|
||||
|
||||
gtk_widget_show(content);
|
||||
window::set_content(content);
|
||||
}
|
||||
|
||||
}; /* Namespace: ocarina */
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker
|
||||
#include <ocarina/ocarina.h>
|
||||
#include <ocarina/body.h>
|
||||
|
||||
static GtkWidget *footer;
|
||||
|
||||
static void add_page(string text, GtkWidget *page)
|
||||
{
|
||||
GtkWidget *label = gtk_label_new(text.c_str());
|
||||
gtk_notebook_append_page(GTK_NOTEBOOK(footer), page, label);
|
||||
gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(footer),
|
||||
page, TRUE, TRUE, GTK_PACK_START);
|
||||
gtk_widget_show(label);
|
||||
}
|
||||
|
||||
namespace ocarina
|
||||
{
|
||||
|
||||
GtkWidget *body::footer_init()
|
||||
{
|
||||
footer = gtk_notebook_new();
|
||||
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(footer), GTK_POS_TOP);
|
||||
|
||||
add_page("Now Playing", now_playing_page());
|
||||
add_page("Library Settings", library_page());
|
||||
add_page("General Settings", general_page());
|
||||
|
||||
gtk_widget_show(footer);
|
||||
return footer;
|
||||
};
|
||||
|
||||
}; /* Namespace: ocarina */
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker
|
||||
#include <ocarina/ocarina.h>
|
||||
#include <ocarina/body.h>
|
||||
|
||||
namespace ocarina
|
||||
{
|
||||
|
||||
GtkWidget *body::general_page()
|
||||
{
|
||||
GtkWidget *label = gtk_label_new("Future general settings page");
|
||||
gtk_widget_show(label);
|
||||
return label;
|
||||
}
|
||||
|
||||
}; /* Namespace: ocarina */
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker
|
||||
#include <ocarina/ocarina.h>
|
||||
#include <ocarina/body.h>
|
||||
|
||||
namespace ocarina
|
||||
{
|
||||
|
||||
GtkWidget *body::library_page()
|
||||
{
|
||||
GtkWidget *label = gtk_label_new("Future library page");
|
||||
gtk_widget_show(label);
|
||||
return label;
|
||||
}
|
||||
|
||||
}; /* Namespace: ocarina */
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker
|
||||
#include <ocarina/ocarina.h>
|
||||
#include <ocarina/body.h>
|
||||
|
||||
namespace ocarina
|
||||
{
|
||||
|
||||
GtkWidget *body::now_playing_page()
|
||||
{
|
||||
GtkWidget *label = gtk_label_new("Future now playing page");
|
||||
gtk_widget_show(label);
|
||||
return label;
|
||||
}
|
||||
|
||||
}; /* Namespace: ocarina */
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker
|
||||
#include <ocarina/ocarina.h>
|
||||
#include <ocarina/body.h>
|
||||
|
||||
static GtkWidget *tabs;
|
||||
|
||||
namespace ocarina
|
||||
{
|
||||
|
||||
GtkWidget *body::playlist_init()
|
||||
{
|
||||
tabs = gtk_notebook_new();
|
||||
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(tabs), GTK_POS_LEFT);
|
||||
gtk_widget_show(tabs);
|
||||
return tabs;
|
||||
};
|
||||
|
||||
}; /* Namespace: ocarina */
|
Loading…
Reference in New Issue