mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Fixes for Debian bug #192701 (64-bit gccs warn about casts between
ptrs and ints of different size and -Werror makes this serious). The GTK bits are done by Colin's patch to use GINT_TO_POINTER (thanks); the uxnet bits are done by cleaning up the rest of the code. In particular, network.h now typedefs `OSSocket' to be a type capable of holding whatever the OS's socket data type is that underlies our socket abstraction. Individual platforms can make this typedef themselves if they define OSSOCKET_DEFINED to prevent network.h redoing it; so the Unix OSSocket is now int. Default is still void *, so other platforms should be unaffected. [originally from svn r3171]
This commit is contained in:
@ -374,7 +374,8 @@ void dlg_listbox_addwithid(union control *ctrl, void *dlg,
|
||||
gtk_container_add(GTK_CONTAINER(uc->menu), menuitem);
|
||||
gtk_widget_show(menuitem);
|
||||
|
||||
gtk_object_set_data(GTK_OBJECT(menuitem), "user-data", (gpointer)id);
|
||||
gtk_object_set_data(GTK_OBJECT(menuitem), "user-data",
|
||||
GINT_TO_POINTER(id));
|
||||
gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
|
||||
GTK_SIGNAL_FUNC(menuitem_activate), dp);
|
||||
} else if (!uc->entry) {
|
||||
@ -436,7 +437,8 @@ void dlg_listbox_addwithid(union control *ctrl, void *dlg,
|
||||
GTK_SIGNAL_FUNC(widget_focus), dp);
|
||||
gtk_signal_connect(GTK_OBJECT(listitem), "button_press_event",
|
||||
GTK_SIGNAL_FUNC(listitem_button), dp);
|
||||
gtk_object_set_data(GTK_OBJECT(listitem), "user-data", (gpointer)id);
|
||||
gtk_object_set_data(GTK_OBJECT(listitem), "user-data",
|
||||
GINT_TO_POINTER(id));
|
||||
} else {
|
||||
/*
|
||||
* List item in a combo-box list, which means the sensible
|
||||
@ -448,7 +450,8 @@ void dlg_listbox_addwithid(union control *ctrl, void *dlg,
|
||||
gtk_container_add(GTK_CONTAINER(uc->list), listitem);
|
||||
gtk_widget_show(listitem);
|
||||
|
||||
gtk_object_set_data(GTK_OBJECT(listitem), "user-data", (gpointer)id);
|
||||
gtk_object_set_data(GTK_OBJECT(listitem), "user-data",
|
||||
GINT_TO_POINTER(id));
|
||||
}
|
||||
|
||||
dp->flags &= ~FLAG_UPDATING_COMBO_LIST;
|
||||
@ -470,7 +473,7 @@ int dlg_listbox_getid(union control *ctrl, void *dlg, int index)
|
||||
item = GTK_OBJECT(g_list_nth_data(children, index));
|
||||
g_list_free(children);
|
||||
|
||||
return (int)gtk_object_get_data(GTK_OBJECT(item), "user-data");
|
||||
return GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(item), "user-data"));
|
||||
}
|
||||
|
||||
/* dlg_listbox_index returns <0 if no single element is selected. */
|
||||
|
Reference in New Issue
Block a user