finch/gntrequest.c

branch
soc.2013.gobjectification
changeset 34892
65e25c679ca5
parent 34864
0e292d8887de
parent 34306
4fb8809f2f97
child 34940
c0aef3b64c56
equal deleted inserted replaced
34891:3882234d2097 34892:65e25c679ca5
260 PurpleAccount *account, const char *who, PurpleConversation *conv, 260 PurpleAccount *account, const char *who, PurpleConversation *conv,
261 void *user_data, size_t actioncount, 261 void *user_data, size_t actioncount,
262 va_list actions) 262 va_list actions)
263 { 263 {
264 GntWidget *window, *box, *button, *focus = NULL; 264 GntWidget *window, *box, *button, *focus = NULL;
265 int i; 265 gsize i;
266 266
267 window = setup_request_window(title, primary, secondary, PURPLE_REQUEST_ACTION); 267 window = setup_request_window(title, primary, secondary, PURPLE_REQUEST_ACTION);
268 268
269 box = gnt_hbox_new(FALSE); 269 box = gnt_hbox_new(FALSE);
270 gnt_box_add_widget(GNT_BOX(window), box); 270 gnt_box_add_widget(GNT_BOX(window), box);
279 g_object_set_data(G_OBJECT(button), "activate-callback", callback); 279 g_object_set_data(G_OBJECT(button), "activate-callback", callback);
280 g_object_set_data(G_OBJECT(button), "activate-userdata", user_data); 280 g_object_set_data(G_OBJECT(button), "activate-userdata", user_data);
281 g_object_set_data(G_OBJECT(button), "activate-id", GINT_TO_POINTER(i)); 281 g_object_set_data(G_OBJECT(button), "activate-id", GINT_TO_POINTER(i));
282 g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(request_action_cb), window); 282 g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(request_action_cb), window);
283 283
284 if (i == default_value) 284 if (default_value >= 0 && i == (gsize)default_value)
285 focus = button; 285 focus = button;
286 } 286 }
287 287
288 gnt_widget_show(window); 288 gnt_widget_show(window);
289 if (focus) 289 if (focus)

mercurial