diff options
author | Manish Singh <yosh@gimp.org> | 2004-08-19 00:25:27 +0000 |
---|---|---|
committer | Manish Singh <yosh@src.gnome.org> | 2004-08-19 00:25:27 +0000 |
commit | a1f93eb16c699b60818e950953a50a73fb59759e (patch) | |
tree | 705c8cc2aa74d1a5be9aa06f8c637ac498b6f3ab /demos | |
parent | ba6fc3ccd8358a451bcd1f0eb40eda2b67ad4f2b (diff) | |
download | gtk+-a1f93eb16c699b60818e950953a50a73fb59759e.tar.gz |
demos/testpixbuf-save.c Get rid of some unnecessary casts.
Wed Aug 18 17:25:26 2004 Manish Singh <yosh@gimp.org>
* demos/testpixbuf-save.c
* demos/gtk-demo/hypertext.c: Get rid of some unnecessary casts.
* demos/gtk-demo/appwindow.c: Make activate_email and activate_url
match the arguments for GtkAboutDialogActivateLinkFunc.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/appwindow.c | 6 | ||||
-rw-r--r-- | demos/gtk-demo/hypertext.c | 8 | ||||
-rw-r--r-- | demos/testpixbuf-save.c | 8 |
3 files changed, 12 insertions, 10 deletions
diff --git a/demos/gtk-demo/appwindow.c b/demos/gtk-demo/appwindow.c index a3323bb20a..3d3b746497 100644 --- a/demos/gtk-demo/appwindow.c +++ b/demos/gtk-demo/appwindow.c @@ -64,14 +64,16 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current) static void activate_email (GtkAboutDialog *about, - const gchar *link) + const gchar *link, + gpointer data) { g_print ("send mail to %s\n", link); } static void activate_url (GtkAboutDialog *about, - const gchar *link) + const gchar *link, + gpointer data) { g_print ("show url %s\n", link); } diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c index 4889dcc9c4..8e5ce60625 100644 --- a/demos/gtk-demo/hypertext.c +++ b/demos/gtk-demo/hypertext.c @@ -281,13 +281,13 @@ do_hypertext (GtkWidget *do_widget) view = gtk_text_view_new (); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD); - g_signal_connect (G_OBJECT (view), "key-press-event", + g_signal_connect (view, "key-press-event", G_CALLBACK (key_press_event), NULL); - g_signal_connect (G_OBJECT (view), "event-after", + g_signal_connect (view, "event-after", G_CALLBACK (event_after), NULL); - g_signal_connect (G_OBJECT (view), "motion-notify-event", + g_signal_connect (view, "motion-notify-event", G_CALLBACK (motion_notify_event), NULL); - g_signal_connect (G_OBJECT (view), "visibility-notify-event", + g_signal_connect (view, "visibility-notify-event", G_CALLBACK (visibility_notify_event), NULL); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); diff --git a/demos/testpixbuf-save.c b/demos/testpixbuf-save.c index 1c2cfa41f2..a8893f90eb 100644 --- a/demos/testpixbuf-save.c +++ b/demos/testpixbuf-save.c @@ -85,7 +85,7 @@ buffer_to_pixbuf (const gchar *buf, gsize count, GError **err) if (gdk_pixbuf_loader_write (loader, buf, count, err) && gdk_pixbuf_loader_close (loader, err)) { pixbuf = g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader)); - g_object_unref (G_OBJECT (loader)); + g_object_unref (loader); return pixbuf; } else { return NULL; @@ -138,7 +138,7 @@ keypress_check (GtkWidget *widget, GdkEventKey *evt, gpointer data) do_compare (pixbuf, g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader)), err); - g_object_unref (G_OBJECT (loader)); + g_object_unref (loader); } } else if (evt->keyval == 'S') { @@ -194,7 +194,7 @@ keypress_check (GtkWidget *widget, GdkEventKey *evt, gpointer data) do_compare (pixbuf, g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader)), err); - g_object_unref (G_OBJECT (loader)); + g_object_unref (loader); } } else if (evt->keyval == 'P') { @@ -248,7 +248,7 @@ keypress_check (GtkWidget *widget, GdkEventKey *evt, gpointer data) do_compare (pixbuf, g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader)), err); - g_object_unref (G_OBJECT (loader)); + g_object_unref (loader); } } else if (evt->keyval == 'I') { |