summaryrefslogtreecommitdiff
path: root/src/gui/panels/updating.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-06-01 21:33:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-06-01 21:33:51 (GMT)
commitf0fa987133468d7d3cae7894d813b852782bf895 (patch)
tree51b78b6f2751c8aa0c82cf6265e0f6a87eadfae5 /src/gui/panels/updating.c
parente060d9a9f29c0d7708e7002c2e1fc4962020ba94 (diff)
Setup more control when updating panels.
Diffstat (limited to 'src/gui/panels/updating.c')
-rw-r--r--src/gui/panels/updating.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/gui/panels/updating.c b/src/gui/panels/updating.c
index 824898a..a54a1af 100644
--- a/src/gui/panels/updating.c
+++ b/src/gui/panels/updating.c
@@ -29,7 +29,6 @@
#include "updating-int.h"
#include "../../core/global.h"
-#include "../../core/queue.h"
#include "../../glibext/delayed-int.h"
#include "../../glibext/signal.h"
@@ -146,6 +145,32 @@ const char *g_updatable_panel_setup(const GUpdatablePanel *panel, unsigned int u
/******************************************************************************
* *
* Paramètres : panel = panneau ciblé par une mise à jour. *
+* *
+* Description : Obtient le groupe de travail dédié à une mise à jour. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+wgroup_id_t g_updatable_panel_get_group(const GUpdatablePanel *panel)
+{
+ wgroup_id_t result; /* Identifiant à retourner */
+ GUpdatablePanelIface *iface; /* Interface utilisée */
+
+ iface = G_UPDATABLE_PANEL_GET_IFACE(panel);
+
+ result = iface->get_group(panel);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = panneau ciblé par une mise à jour. *
* uid = identifiant de la phase de traitement. *
* data = données préparées par l'appelant. *
* *
@@ -446,6 +471,8 @@ static void conclude_panel_update(GPanelUpdate *update, GUpdatablePanel *panel)
void run_panel_update(GUpdatablePanel *panel, unsigned int uid)
{
+ GWorkQueue *queue; /* Gestionnaire de tâches */
+ wgroup_id_t gid; /* Groupe de travail à utiliser*/
GPanelUpdate *update; /* Procédure de mise à jour */
update = g_panel_update_new(panel, uid);
@@ -455,6 +482,10 @@ void run_panel_update(GUpdatablePanel *panel, unsigned int uid)
g_updatable_panel_introduce(panel, uid, update->data);
- g_work_queue_schedule_work(get_work_queue(), G_DELAYED_WORK(update), DEFAULT_WORK_GROUP);
+ queue = get_work_queue();
+
+ gid = g_updatable_panel_get_group(panel);
+
+ g_work_queue_schedule_work(queue, G_DELAYED_WORK(update), gid);
}