Use the proper macro for connecting signal callbacks
authorMikko Rasa <tdb@tdb.fi>
Sat, 6 Oct 2012 11:30:14 +0000 (14:30 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 6 Oct 2012 11:30:14 +0000 (14:30 +0300)
main.c

diff --git a/main.c b/main.c
index f62b7b0b0b6f28f7791352c75eb5d0cdee8cfefc..f6a0b132685d35dd462bc2139878a5ccd9ac0292 100644 (file)
--- a/main.c
+++ b/main.c
@@ -600,7 +600,7 @@ int main(int argc, char **argv)
 
        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        gtk_container_set_border_width(GTK_CONTAINER(window), 5);
-       g_signal_connect(window, "destroy", &gtk_main_quit, NULL);
+       g_signal_connect(window, "destroy", G_CALLBACK(&gtk_main_quit), NULL);
 
        viewport = gtk_viewport_new(NULL, NULL);
        gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_IN);
@@ -608,7 +608,7 @@ int main(int argc, char **argv)
 
        list = gtk_tree_view_new();
        gtk_container_add(GTK_CONTAINER(viewport), list);
-       g_signal_connect(list, "row-activated", (GCallback)&row_activated, &umount);
+       g_signal_connect(list, "row-activated", G_CALLBACK(&row_activated), &umount);
 
        store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
        gtk_tree_view_set_model(GTK_TREE_VIEW(list), GTK_TREE_MODEL(store));
@@ -646,7 +646,7 @@ int main(int argc, char **argv)
 
                dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
                        "No devices to %s", (umount ? "unmount" : "mount"));
-               g_signal_connect(dialog, "response", &gtk_main_quit, NULL);
+               g_signal_connect(dialog, "response", G_CALLBACK(&gtk_main_quit), NULL);
                gtk_widget_show_all(dialog);
        }