finch/gntrequest.c

branch
release-2.x.y
changeset 36256
a437550a9308
parent 35991
e6937e52930b
child 36257
c5445f25f90f
child 38258
9a6551eba09c
equal deleted inserted replaced
36255:a3fe30a2666b 36256:a437550a9308
266 PurpleAccount *account, const char *who, PurpleConversation *conv, 266 PurpleAccount *account, const char *who, PurpleConversation *conv,
267 void *user_data, size_t actioncount, 267 void *user_data, size_t actioncount,
268 va_list actions) 268 va_list actions)
269 { 269 {
270 GntWidget *window, *box, *button, *focus = NULL; 270 GntWidget *window, *box, *button, *focus = NULL;
271 int i; 271 gsize i;
272 272
273 window = setup_request_window(title, primary, secondary, PURPLE_REQUEST_ACTION); 273 window = setup_request_window(title, primary, secondary, PURPLE_REQUEST_ACTION);
274 274
275 box = gnt_hbox_new(FALSE); 275 box = gnt_hbox_new(FALSE);
276 gnt_box_add_widget(GNT_BOX(window), box); 276 gnt_box_add_widget(GNT_BOX(window), box);
285 g_object_set_data(G_OBJECT(button), "activate-callback", callback); 285 g_object_set_data(G_OBJECT(button), "activate-callback", callback);
286 g_object_set_data(G_OBJECT(button), "activate-userdata", user_data); 286 g_object_set_data(G_OBJECT(button), "activate-userdata", user_data);
287 g_object_set_data(G_OBJECT(button), "activate-id", GINT_TO_POINTER(i)); 287 g_object_set_data(G_OBJECT(button), "activate-id", GINT_TO_POINTER(i));
288 g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(request_action_cb), window); 288 g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(request_action_cb), window);
289 289
290 if (i == default_value) 290 if (default_value >= 0 && i == (gsize)default_value)
291 focus = button; 291 focus = button;
292 } 292 }
293 293
294 gnt_widget_show(window); 294 gnt_widget_show(window);
295 if (focus) 295 if (focus)

mercurial