gui: Remove some old code
All that is left in the giant commented out section is right click menu stuff. Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
parent
ff925cf573
commit
6f7ce86091
94
gui/tabs.cpp
94
gui/tabs.cpp
|
@ -495,100 +495,6 @@ static void prepare_rc_menu()
|
|||
};
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ocarina class definition
|
||||
*/
|
||||
/*class OcarinaPage : public Gtk::VBox {
|
||||
private:
|
||||
unsigned int init_flags;
|
||||
Gtk::Notebook *notebook;
|
||||
OcarinaTab *tab;
|
||||
*/
|
||||
/* Filter state */
|
||||
// std::set<unsigned int> visible_ids;
|
||||
|
||||
/* Page widgets */
|
||||
/* Gtk::HBox page_toolbar;
|
||||
Gtk::SearchEntry page_entry;
|
||||
Gtk::ToggleButton page_repeat;
|
||||
Gtk::ScrolledWindow page_scroll;
|
||||
Gtk::HBox page_viewbox;
|
||||
Gtk::TreeView page_view;
|
||||
|
||||
void setup_common(Playqueue *, unsigned int);
|
||||
void setup_toolbar();
|
||||
void setup_treeview();
|
||||
void setup_columns();
|
||||
void set_tab_size();
|
||||
|
||||
public:
|
||||
Gtk::ToggleButton page_random;
|
||||
Glib::RefPtr<PlayqueueModel> model;
|
||||
Glib::RefPtr<Gtk::TreeModelFilter> filter;
|
||||
|
||||
OcarinaPage(Playqueue *, unsigned int, unsigned int);
|
||||
~OcarinaPage();
|
||||
bool is_current_tab();
|
||||
void check_pq_flags();
|
||||
void queue_selected(bool);
|
||||
|
||||
void on_close_clicked();
|
||||
void on_row_inserted(unsigned int);
|
||||
void on_row_deleted(unsigned int);
|
||||
void on_row_changed(unsigned int);
|
||||
void on_runtime_changed();
|
||||
void on_random_toggled();
|
||||
void on_repeat_toggled();
|
||||
void on_row_activated(const Gtk::TreePath &, Gtk::TreeViewColumn *);
|
||||
void on_column_clicked(unsigned int);
|
||||
void on_entry_changed();
|
||||
bool on_entry_key_released(GdkEventKey *);
|
||||
bool on_filter_visible(const Gtk::TreeIter &);
|
||||
void on_page_renumbered();
|
||||
bool on_add_to_pq(unsigned int);
|
||||
bool on_delete_selected();
|
||||
bool on_favorite_selected();
|
||||
bool on_view_key_pressed(GdkEventKey *);
|
||||
bool on_view_button_pressed(GdkEventButton *);
|
||||
void on_focus_search();
|
||||
};
|
||||
|
||||
bool OcarinaPage::on_favorite_selected()
|
||||
{
|
||||
Glib::RefPtr<Gtk::TreeSelection> sel = page_view.get_selection();
|
||||
if (sel->count_selected_rows() == 0)
|
||||
return true;
|
||||
|
||||
std::vector<Gtk::TreeModel::Path>::iterator it;
|
||||
std::vector<Gtk::TreeModel::Path> rows = sel->get_selected_rows();
|
||||
for (it = rows.begin(); it != rows.end(); it++) {
|
||||
unsigned int id = model->path_to_id(filter->convert_path_to_child_path(*it));
|
||||
playlist :: add("Favorites", id);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OcarinaPage::on_view_key_pressed(GdkEventKey *event)
|
||||
{
|
||||
std::string key = gdk_keyval_name(event->keyval);
|
||||
|
||||
if (key.size() >= 3) {
|
||||
if (key.substr(0, 3) == "KP_")
|
||||
key = key.substr(3);
|
||||
}
|
||||
|
||||
if (key >= "0" && key <= "9") {
|
||||
unsigned int n = atoi(key.c_str());
|
||||
return on_add_to_pq(n);
|
||||
} else if (key == "f")
|
||||
return on_favorite_selected();
|
||||
else if (key == "Delete")
|
||||
return on_delete_selected();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OcarinaPage::on_view_button_pressed(GdkEventButton *button)
|
||||
{
|
||||
Gtk::Menu *menu;
|
||||
|
|
Loading…
Reference in New Issue