summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorO H <olaf@aepfle.de>2021-05-02 20:13:55 +0000
committerAndre Miranda <andreldm@xfce.org>2021-05-02 20:13:55 +0000
commitf0424c98a56f6911167da8273efcdacbccbc0db1 (patch)
treee62bc70c06f7a523435bd94e7b5b5d9b6b4d4ecf
parent4dcdf975dc033adf7f0926b6eda739dd089cc08b (diff)
downloadthunar-volman-f0424c98a56f6911167da8273efcdacbccbc0db1.tar.gz
Remove GSourceFunc casts (!5)
Convert the callback into a real GSourceFunc. Signed-off-by: Olaf Hering <olaf@aepfle.de>
-rw-r--r--thunar-volman/main.c2
-rw-r--r--thunar-volman/tvm-block-device.c9
-rw-r--r--thunar-volman/tvm-context.c3
-rw-r--r--thunar-volman/tvm-context.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/thunar-volman/main.c b/thunar-volman/main.c
index 2312017..d5bdc28 100644
--- a/thunar-volman/main.c
+++ b/thunar-volman/main.c
@@ -159,7 +159,7 @@ main (int argc,
context = tvm_context_new (client, device, channel, loop, &error);
/* handle the new device in an idle handler */
- g_idle_add ((GSourceFunc) tvm_context_run, context);
+ g_idle_add (tvm_context_run, context);
/* release channel and device */
g_object_unref (device);
diff --git a/thunar-volman/tvm-block-device.c b/thunar-volman/tvm-block-device.c
index bba3b5e..0660e5e 100644
--- a/thunar-volman/tvm-block-device.c
+++ b/thunar-volman/tvm-block-device.c
@@ -717,13 +717,12 @@ tvm_block_device_mount_finish (GVolume *volume,
static gboolean
-tvm_block_device_mount (TvmContext *context)
+tvm_block_device_mount (gpointer user_data)
{
+ TvmContext *context = user_data;
GMountOperation *mount_operation;
GVolume *volume;
- g_return_val_if_fail ((context != NULL), FALSE);
-
/* determine the GVolume corresponding to the udev device */
volume =
tvm_g_volume_monitor_get_volume_for_kind (context->monitor,
@@ -890,7 +889,7 @@ automount_disc:
if (automount)
{
/* mount the CD/DVD and continue with inspecting its contents */
- g_timeout_add_seconds(5, (GSourceFunc) tvm_block_device_mount, context);
+ g_timeout_add_seconds(5, tvm_block_device_mount, context);
}
}
else
@@ -913,7 +912,7 @@ automount_disc:
if (automount)
{
/* mount the partition and continue with inspecting its contents */
- g_timeout_add_seconds(5, (GSourceFunc) tvm_block_device_mount, context);
+ g_timeout_add_seconds(5, tvm_block_device_mount, context);
}
else
{
diff --git a/thunar-volman/tvm-context.c b/thunar-volman/tvm-context.c
index 8685f70..5629173 100644
--- a/thunar-volman/tvm-context.c
+++ b/thunar-volman/tvm-context.c
@@ -85,8 +85,9 @@ tvm_context_free (TvmContext *context)
gboolean
-tvm_context_run (TvmContext *context)
+tvm_context_run (gpointer user_data)
{
+ TvmContext *context = user_data;
tvm_device_added (context);
return FALSE;
diff --git a/thunar-volman/tvm-context.h b/thunar-volman/tvm-context.h
index 9dbd33e..082ad08 100644
--- a/thunar-volman/tvm-context.h
+++ b/thunar-volman/tvm-context.h
@@ -39,7 +39,7 @@ TvmContext *tvm_context_new (GUdevClient *client,
GMainLoop *loop,
GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
void tvm_context_free (TvmContext *context);
-gboolean tvm_context_run (TvmContext *context);
+gboolean tvm_context_run (gpointer user_data);