From 24fe8e7ee25cb33bd1b5223b6b165f7ebc16442f Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Sun, 11 May 2014 09:20:24 -0400 Subject: [PATCH] queue: Fix compile errors related to recent changes Signed-off-by: Anna Schumaker --- gui/model.cpp | 4 ++-- gui/queue.cpp | 2 +- gui/tabs.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gui/model.cpp b/gui/model.cpp index 07f2b3bc..2df9d69c 100644 --- a/gui/model.cpp +++ b/gui/model.cpp @@ -69,7 +69,7 @@ unsigned int QueueModel :: iter_to_id(const Gtk::TreeIter &iter) unsigned int QueueModel::path_to_id(const Gtk::TreePath &path) { - return queue->operator[](path[0]); + return queue->operator[](path[0])->id; } @@ -186,7 +186,7 @@ void QueueModel::get_value_vfunc(const Gtk::TreeIter &iter, int column, return; row = GPOINTER_TO_UINT(iter.gobj()->user_data); - track = tagdb :: lookup((*queue)[row]); + track = queue->operator[](row); switch (column) { case 0: diff --git a/gui/queue.cpp b/gui/queue.cpp index 94c5e6fc..b0d17838 100644 --- a/gui/queue.cpp +++ b/gui/queue.cpp @@ -218,7 +218,7 @@ void QueueTab :: on_post_init() tab_init_random(); tab_init_repeat(); - bool active = (tab_pq->get_flags() & Q_ENABLED) == Q_ENABLED; + bool active = (tab_pq->has_flag(Q_ENABLED)); q_switch.set_active(active); q_switch.property_active().signal_changed().connect( sigc::mem_fun(*this, &QueueTab :: on_switch_changed)); diff --git a/gui/tabs.cpp b/gui/tabs.cpp index 74e7e938..309001be 100644 --- a/gui/tabs.cpp +++ b/gui/tabs.cpp @@ -71,14 +71,14 @@ void Tab :: tab_finish_init() void Tab :: tab_init_random() { - tab_random->set_active(tab_pq->get_flags() & Q_RANDOM); + tab_random->set_active(tab_pq->has_flag(Q_RANDOM)); tab_random->signal_toggled().connect(sigc::mem_fun(*this, &Tab::on_random_toggled)); } void Tab :: tab_init_repeat() { - tab_repeat->set_active(tab_pq->get_flags() & Q_REPEAT); + tab_repeat->set_active(tab_pq->has_flag(Q_REPEAT)); tab_repeat->signal_toggled().connect(sigc::mem_fun(*this, &Tab::on_repeat_toggled)); } @@ -355,7 +355,7 @@ bool Tab :: on_filter_visible(const Gtk::TreeIter &iter) return true; pq_id = tab_model->iter_to_id(iter); - it = visible_ids.find(tab_pq->operator[](pq_id)); + it = visible_ids.find(tab_pq->operator[](pq_id)->id); return it != visible_ids.end(); } @@ -522,7 +522,7 @@ void post_init_tabs() unsigned int tab = 0; for (tab = 0; tab < deck::size(); tab++) { - if ((deck :: get(tab)->get_flags() & Q_ENABLED) == Q_ENABLED) + if ((deck :: get(tab)->has_flag(Q_ENABLED))) break; } get_widget("o_notebook")->set_current_page(tab);