gui: Remove C++ playlist code

And notebook switching code in playlist.c

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2016-01-22 14:44:15 -05:00
parent 7995e381c0
commit d769140e35
6 changed files with 0 additions and 71 deletions

View File

@ -75,7 +75,6 @@ int main(int argc, char **argv)
gui_playlist_init();
gui_audio_init();
plist :: init();
init_tabs();
post_init_tabs();

View File

@ -2,7 +2,6 @@
* Copyright 2016 (c) Anna Schumaker.
*/
#include <core/collection.h>
#include <core/tempq.h>
#include <gui/builder.h>
#include <gui/playlist.h>
#include <gui/sidebar.h>
@ -34,7 +33,6 @@ static void __playlist_add(GtkTreeIter *parent, const gchar *name,
void __playlist_selection_changed(GtkTreeSelection *selection, gpointer data)
{
GtkNotebook *notebook = GTK_NOTEBOOK(gui_builder_widget("o_notebook"));
GtkStack *stack = GTK_STACK(gui_builder_widget("o_stack"));
GtkTreeModel *model = GTK_TREE_MODEL(p_store);
GtkTreeIter iter;
@ -43,7 +41,6 @@ void __playlist_selection_changed(GtkTreeSelection *selection, gpointer data)
gtk_tree_model_get(model, &iter, P_SB_PLAYLIST, &p_cur, -1);
gtk_stack_set_visible_child_name(stack, "queues");
gtk_notebook_set_current_page(notebook, tempq_count() + 2);
gui_sidebar_selected(SB_PLAYLIST,
gui_queue(playlist_get_queue()));
playlist_select(p_cur);

View File

@ -1,45 +0,0 @@
/*
* Copyright 2014 (c) Anna Schumaker.
*/
extern "C" {
#include <core/audio.h>
#include <core/collection.h>
#include <core/playlist.h>
#include <gui/builder.h>
#include <gui/playlist.h>
#include <gui/queue.h>
}
#include <gui/tabs.h>
#include <gui/queue/label.h>
static class PlaylistTab : public Tab {
private:
PlaylistLabel *playlist_label;
public:
PlaylistTab() : Tab(playlist_get_queue())
{
tab_builder->add_from_file(gui :: share_file("QueueLabel.ui"));
tab_builder->get_widget_derived("PlaylistLabel", playlist_label);
playlist_label->init(tab_pq);
tab_label = playlist_label;
tab_vbox.pack_start(*tab_window, true, true);
Glib :: wrap(GTK_NOTEBOOK(gui_builder_widget("o_notebook")),
false)->insert_page(tab_vbox, *playlist_label, 0);
}
~PlaylistTab()
{
tab_unmap();
}
} *p_tab;
void plist :: init()
{
p_tab = new PlaylistTab;
}

View File

@ -61,14 +61,6 @@ void HistoryLabel :: set_size()
PlaylistLabel :: PlaylistLabel(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> builder)
: QueueLabel(cobject, builder)
{
}
TempLabel :: TempLabel(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> builder)
: QueueLabel(cobject, builder)

View File

@ -22,11 +22,4 @@ void on_pq_created(queue *, unsigned int);
void post_init_queue_tabs();
/* playlist.cpp */
namespace plist
{
void init();
}
#endif /* OCARINA_H */

View File

@ -43,13 +43,6 @@ public:
class PlaylistLabel : public QueueLabel {
public:
PlaylistLabel(BaseObjectType *, const Glib::RefPtr<Gtk::Builder>);
};
class TempLabel : public QueueLabel {
public:
Gtk::Label *temp_number;