Replace g_idle_add_full()
with IdleRegister
(#3767)
This commit is contained in:
@@ -24,14 +24,6 @@
|
||||
#include "soundman.h"
|
||||
#include "rtimage.h"
|
||||
|
||||
int processLoadedBatchQueueUIThread (void* data)
|
||||
{
|
||||
|
||||
BatchQueue* bq = static_cast<BatchQueue*>(data);
|
||||
bq->resizeLoadedQueue();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Glib::ustring makeFolderLabel(Glib::ustring path)
|
||||
{
|
||||
if (!Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) {
|
||||
@@ -185,11 +177,22 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog)
|
||||
|
||||
show_all ();
|
||||
|
||||
if (batchQueue->loadBatchQueue ()) {
|
||||
g_idle_add_full (G_PRIORITY_LOW, processLoadedBatchQueueUIThread, batchQueue, nullptr);
|
||||
if (batchQueue->loadBatchQueue()) {
|
||||
const auto func = [](gpointer data) -> gboolean {
|
||||
static_cast<BatchQueue*>(data)->resizeLoadedQueue();
|
||||
|
||||
return FALSE;
|
||||
};
|
||||
|
||||
idle_register.add(func, batchQueue, G_PRIORITY_LOW);
|
||||
}
|
||||
}
|
||||
|
||||
BatchQueuePanel::~BatchQueuePanel()
|
||||
{
|
||||
idle_register.destroy();
|
||||
}
|
||||
|
||||
void BatchQueuePanel::init (RTWindow *parent)
|
||||
{
|
||||
this->parent = parent;
|
||||
|
Reference in New Issue
Block a user