From d769140e3525ad33c5a1e006e890be0a41ff326d Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Fri, 22 Jan 2016 14:44:15 -0500 Subject: [PATCH] gui: Remove C++ playlist code And notebook switching code in playlist.c Signed-off-by: Anna Schumaker --- gui/ocarina.cpp | 1 - gui/playlist.c | 3 --- gui/playlist_tab.cpp | 45 --------------------------------------- gui/queue/label.cpp | 8 ------- include/gui/ocarina.h | 7 ------ include/gui/queue/label.h | 7 ------ 6 files changed, 71 deletions(-) delete mode 100644 gui/playlist_tab.cpp diff --git a/gui/ocarina.cpp b/gui/ocarina.cpp index 969b104c..1e232ce9 100644 --- a/gui/ocarina.cpp +++ b/gui/ocarina.cpp @@ -75,7 +75,6 @@ int main(int argc, char **argv) gui_playlist_init(); gui_audio_init(); - plist :: init(); init_tabs(); post_init_tabs(); diff --git a/gui/playlist.c b/gui/playlist.c index da3ef6aa..cb319f6b 100644 --- a/gui/playlist.c +++ b/gui/playlist.c @@ -2,7 +2,6 @@ * Copyright 2016 (c) Anna Schumaker. */ #include -#include #include #include #include @@ -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); diff --git a/gui/playlist_tab.cpp b/gui/playlist_tab.cpp deleted file mode 100644 index 6612c2a3..00000000 --- a/gui/playlist_tab.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2014 (c) Anna Schumaker. - */ -extern "C" { -#include -#include -#include -#include -#include -#include -} -#include -#include - - -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; -} diff --git a/gui/queue/label.cpp b/gui/queue/label.cpp index 157631be..7e5f12e7 100644 --- a/gui/queue/label.cpp +++ b/gui/queue/label.cpp @@ -61,14 +61,6 @@ void HistoryLabel :: set_size() -PlaylistLabel :: PlaylistLabel(BaseObjectType *cobject, - const Glib::RefPtr builder) - : QueueLabel(cobject, builder) -{ -} - - - TempLabel :: TempLabel(BaseObjectType *cobject, const Glib::RefPtr builder) : QueueLabel(cobject, builder) diff --git a/include/gui/ocarina.h b/include/gui/ocarina.h index 77619c72..2315c533 100644 --- a/include/gui/ocarina.h +++ b/include/gui/ocarina.h @@ -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 */ diff --git a/include/gui/queue/label.h b/include/gui/queue/label.h index eaa749b9..89479e11 100644 --- a/include/gui/queue/label.h +++ b/include/gui/queue/label.h @@ -43,13 +43,6 @@ public: -class PlaylistLabel : public QueueLabel { -public: - PlaylistLabel(BaseObjectType *, const Glib::RefPtr); -}; - - - class TempLabel : public QueueLabel { public: Gtk::Label *temp_number;