changeset 36056:94188b63e047

Avoid casts by passing an existing pointer.
author ib
date Thu, 04 Apr 2013 13:21:51 +0000
parents 4489eafbe0a9
children 12dcd03f4e79
files gui/dialog/url.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/url.c	Thu Apr 04 12:10:14 2013 +0000
+++ b/gui/dialog/url.c	Thu Apr 04 13:21:51 2013 +0000
@@ -45,7 +45,7 @@
 
     (void)button;
 
-    if ((int)user_data) {
+    if (user_data) {
         gchar *str = strdup(gtk_entry_get_text(GTK_ENTRY(urlEntry)));
 
         if (str) {
@@ -122,7 +122,7 @@
     gtk_widget_add_accelerator(Cancel, "clicked", accel_group, GDK_Escape, 0, GTK_ACCEL_VISIBLE);
 
     gtk_signal_connect(GTK_OBJECT(URLDialog), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &URLDialog);
-    gtk_signal_connect(GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(button_clicked), (void *)1);
+    gtk_signal_connect(GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(button_clicked), Ok);
     gtk_signal_connect(GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(button_clicked), NULL);
 
     gtk_widget_grab_focus(urlEntry);