ocarina: Initialize playlists during startup

I plan on replacing the playlist code eventually, but for now I want to
see how everything looks.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-08-01 08:19:31 -04:00
parent a11613d3ad
commit 90355962e4
4 changed files with 18 additions and 11 deletions

View File

@ -13,6 +13,9 @@ string lib_file(const string &);
/* window.cpp */
void init_window();
/* body/playlist.cpp */
void init_playlist();
/* status.cpp */
void update_status();

View File

@ -32,6 +32,11 @@ static void on_page_reordered(GtkWidget *t, GtkWidget *page, guint num, gpointer
gtk_notebook_reorder_child(GTK_NOTEBOOK(tabs), page, n);
}
void init_playlist()
{
tabs = get_widget("PlaylistTabs");
}
namespace ocarina
{

View File

@ -4,6 +4,7 @@
#include <libsaria/idle.h>
#include <ocarina/ocarina.h>
#include <ocarina/playlist.h>
/*#include <libsaria/libsaria.h>
@ -107,12 +108,13 @@ static void init(int argc, char **argv)
/* Initialize window */
init_window();
init_playlist();
/* Show any widgets that need showing */
/* ocarina::window::init();
ocarina::body::init();
ocarina::body::init();*/
ocarina::playlist::init();
ocarina::init_pipe();*/
/* ocarina::init_pipe();*/
gtk_timeout_add(100, timeout_poll, NULL);
}

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAdjustment" id="PauseAdjustment">
<property name="upper">256</property>
<property name="step_increment">1</property>
@ -20,6 +21,9 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tab_pos">left</property>
<property name="scrollable">True</property>
<property name="tab_border">0</property>
<property name="tab_hborder">0</property>
</object>
<packing>
<property name="expand">True</property>
@ -72,7 +76,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<child>
<object class="GtkImage" id="image1">
@ -96,7 +99,6 @@
<property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<child>
@ -122,7 +124,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<child>
@ -146,7 +147,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<child>
@ -172,7 +172,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<child>
@ -287,8 +286,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0.5</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
@ -309,8 +306,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
<property name="group">NoPause</property>
</object>
@ -328,6 +323,8 @@
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="adjustment">PauseAdjustment</property>
</object>
<packing>