gui: Disable Q_NOTIFY_REMOVED for temporary queues
Using this notification was causing segmentation faults when Ocarina was closed with at least one temporary queue. I can handle everything I need directly in the GUI without problems, so this notification really isn't necessary. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
d0d00521db
commit
f15ed8635a
|
@ -64,7 +64,8 @@ private:
|
|||
public:
|
||||
QueueTab(Queue *, unsigned int num);
|
||||
~QueueTab();
|
||||
void on_remove();
|
||||
|
||||
void on_track_removed(unsigned int);
|
||||
|
||||
/**
|
||||
* Helper functions
|
||||
|
@ -168,17 +169,22 @@ QueueTab :: QueueTab(Queue *pq, unsigned int num)
|
|||
gui :: get_widget<Gtk::Notebook>("o_notebook")->insert_page(q_vbox, q_tab_box, num);
|
||||
gui :: get_widget<Gtk::Notebook>("o_notebook")->set_tab_reorderable(q_vbox);
|
||||
q_vbox.show_all();
|
||||
tab_pq->unset_flag(Q_NOTIFY_REMOVE);
|
||||
}
|
||||
|
||||
QueueTab :: ~QueueTab() {}
|
||||
|
||||
void QueueTab :: on_remove()
|
||||
QueueTab :: ~QueueTab()
|
||||
{
|
||||
queue_mapping.erase(tab_widget);
|
||||
tab_unmap();
|
||||
gui :: get_widget<Gtk::Notebook>("o_notebook")->remove_page(q_vbox);
|
||||
renumber_queues();
|
||||
delete this;
|
||||
}
|
||||
|
||||
void QueueTab :: on_track_removed(unsigned int row)
|
||||
{
|
||||
this->Tab :: on_track_removed(row);
|
||||
if (tab_pq->size() == 0)
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
|
@ -296,6 +302,7 @@ void QueueTab :: queue_set_sensitive(bool sensitive)
|
|||
void QueueTab :: on_close_clicked()
|
||||
{
|
||||
deck :: destroy(tab_pq);
|
||||
delete this;
|
||||
}
|
||||
|
||||
void QueueTab :: on_switch_changed()
|
||||
|
|
|
@ -53,9 +53,9 @@ public:
|
|||
/**
|
||||
* QNotifier implementation
|
||||
*/
|
||||
virtual void on_remove();
|
||||
void on_remove();
|
||||
void on_track_added(unsigned int);
|
||||
void on_track_removed(unsigned int);
|
||||
virtual void on_track_removed(unsigned int);
|
||||
void on_track_updated(unsigned int);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue