gui: Implement on_track_removed() in the Tab class
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
9eef2ad35d
commit
3b206948e1
22
gui/tabs.cpp
22
gui/tabs.cpp
|
@ -80,6 +80,13 @@ void Tab :: on_track_added(unsigned int row)
|
||||||
tab_runtime_changed();
|
tab_runtime_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Tab :: on_track_removed(unsigned int row)
|
||||||
|
{
|
||||||
|
tab_model->on_row_deleted(row);
|
||||||
|
tab_set_size();
|
||||||
|
tab_runtime_changed();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -231,13 +238,6 @@ void Tab :: tab_ban_selected()
|
||||||
|
|
||||||
void Tab :: on_post_init() {}
|
void Tab :: on_post_init() {}
|
||||||
|
|
||||||
void Tab :: on_track_deleted(unsigned int row)
|
|
||||||
{
|
|
||||||
tab_model->on_row_deleted(row);
|
|
||||||
tab_set_size();
|
|
||||||
tab_runtime_changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Tab :: on_track_changed(unsigned int row)
|
void Tab :: on_track_changed(unsigned int row)
|
||||||
{
|
{
|
||||||
tab_model->on_row_changed(row);
|
tab_model->on_row_changed(row);
|
||||||
|
@ -417,13 +417,6 @@ static Tab *cur_tab()
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_track_deleted(Queue *pq, unsigned int row)
|
|
||||||
{
|
|
||||||
Tab *tab = find_tab(pq);
|
|
||||||
if (tab)
|
|
||||||
tab->on_track_deleted(row);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void on_track_changed(Queue *pq, unsigned int row)
|
static void on_track_changed(Queue *pq, unsigned int row)
|
||||||
{
|
{
|
||||||
Tab *tab = find_tab(pq);
|
Tab *tab = find_tab(pq);
|
||||||
|
@ -487,7 +480,6 @@ static void init_menu_item(const std::string &pq, unsigned int n)
|
||||||
void init_tabs()
|
void init_tabs()
|
||||||
{
|
{
|
||||||
struct Callbacks *cb = get_callbacks();
|
struct Callbacks *cb = get_callbacks();
|
||||||
cb->on_queue_track_del = on_track_deleted;
|
|
||||||
cb->on_queue_track_changed = on_track_changed;
|
cb->on_queue_track_changed = on_track_changed;
|
||||||
|
|
||||||
/* Notebook signals */
|
/* Notebook signals */
|
||||||
|
|
|
@ -54,6 +54,7 @@ public:
|
||||||
* QNotifier implementation
|
* QNotifier implementation
|
||||||
*/
|
*/
|
||||||
void on_track_added(unsigned int);
|
void on_track_added(unsigned int);
|
||||||
|
void on_track_removed(unsigned int);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* More helper functions
|
* More helper functions
|
||||||
|
@ -76,7 +77,6 @@ public:
|
||||||
* internal callback functions that can be overridden if necessary
|
* internal callback functions that can be overridden if necessary
|
||||||
*/
|
*/
|
||||||
virtual void on_post_init();
|
virtual void on_post_init();
|
||||||
virtual void on_track_deleted(unsigned int);
|
|
||||||
virtual void on_track_changed(unsigned int);
|
virtual void on_track_changed(unsigned int);
|
||||||
virtual bool on_key_press_event(const std::string &);
|
virtual bool on_key_press_event(const std::string &);
|
||||||
virtual void on_show_rc_menu();
|
virtual void on_show_rc_menu();
|
||||||
|
|
Loading…
Reference in New Issue