summaryrefslogtreecommitdiff
path: root/drivemount
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-29 10:38:15 +0100
committerraveit65 <[email protected]>2021-01-28 21:08:12 +0100
commit3b2fd26415133da19eee10ae18b61df19d5ce80f (patch)
treed8848f632cd5ce0a7fac47dd9258dd7eb56c40f2 /drivemount
parente948feaf6a87c411503aee62f97334e500cb80f1 (diff)
downloadmate-applets-3b2fd26415133da19eee10ae18b61df19d5ce80f.tar.bz2
mate-applets-3b2fd26415133da19eee10ae18b61df19d5ce80f.tar.xz
Remove unnecessary casts on g_signal_connect calls
Diffstat (limited to 'drivemount')
-rw-r--r--drivemount/src/drive-button.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivemount/src/drive-button.c b/drivemount/src/drive-button.c
index f64f38c4..95472c86 100644
--- a/drivemount/src/drive-button.c
+++ b/drivemount/src/drive-button.c
@@ -113,9 +113,10 @@ drive_button_new (GVolume *volume)
self = g_object_new (DRIVE_TYPE_BUTTON, NULL);
if (volume != NULL) {
drive_button_set_volume (self, volume);
- g_signal_connect (gtk_icon_theme_get_default (),
- "changed", G_CALLBACK (drive_button_theme_change),
- self);
+
+ g_signal_connect (gtk_icon_theme_get_default (), "changed",
+ G_CALLBACK (drive_button_theme_change),
+ self);
}
return (GtkWidget *)self;
@@ -129,9 +130,9 @@ drive_button_new_from_mount (GMount *mount)
self = g_object_new (DRIVE_TYPE_BUTTON, NULL);
drive_button_set_mount (self, mount);
- g_signal_connect (gtk_icon_theme_get_default (),
- "changed", G_CALLBACK (drive_button_theme_change),
- self);
+ g_signal_connect (gtk_icon_theme_get_default (), "changed",
+ G_CALLBACK (drive_button_theme_change),
+ self);
return (GtkWidget *)self;
}
@@ -538,7 +539,8 @@ create_menu_item (DriveButton *self,
gtk_widget_show (image);
}
if (callback)
- g_signal_connect_object (item, "activate", callback, self,
+ g_signal_connect_object (item, "activate",
+ callback, self,
G_CONNECT_SWAPPED);
gtk_widget_set_sensitive (item, sensitive);
gtk_widget_show (item);
@@ -599,8 +601,11 @@ open_drive (DriveButton *self,
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
else
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "Could not find Caja");
+
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
+
gtk_widget_show (dialog);
g_error_free (error);
}