Mercurial > pidgin.yaz
comparison src/gtkutils.c @ 5314:1f901484599d
[gaim-migrate @ 5686]
GTK_OBJECT -> G_OBJECT
Also fixed a few compiler warnings.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 06 May 2003 05:48:03 +0000 |
parents | b8eafeb874a1 |
children | ad445074d239 |
comparison
equal
deleted
inserted
replaced
5313:8d118c2b03c9 | 5314:1f901484599d |
---|---|
325 gaim_home_dir(), gaim_conversation_get_name(conv)); | 325 gaim_home_dir(), gaim_conversation_get_name(conv)); |
326 | 326 |
327 gtk_file_selection_set_filename( | 327 gtk_file_selection_set_filename( |
328 GTK_FILE_SELECTION(gtkconv->u.im->save_icon), buf); | 328 GTK_FILE_SELECTION(gtkconv->u.im->save_icon), buf); |
329 | 329 |
330 g_signal_connect(GTK_OBJECT(gtkconv->u.im->save_icon), "delete_event", | 330 g_signal_connect(G_OBJECT(gtkconv->u.im->save_icon), "delete_event", |
331 G_CALLBACK(des_save_icon), gtkconv); | 331 G_CALLBACK(des_save_icon), gtkconv); |
332 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(gtkconv->u.im->save_icon)->ok_button), "clicked", | 332 g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(gtkconv->u.im->save_icon)->ok_button), "clicked", |
333 G_CALLBACK(do_save_icon), conv); | 333 G_CALLBACK(do_save_icon), conv); |
334 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(gtkconv->u.im->save_icon)->cancel_button), "clicked", | 334 g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(gtkconv->u.im->save_icon)->cancel_button), "clicked", |
335 G_CALLBACK(cancel_save_icon), gtkconv); | 335 G_CALLBACK(cancel_save_icon), gtkconv); |
336 | 336 |
337 gtk_widget_show(gtkconv->u.im->save_icon); | 337 gtk_widget_show(gtkconv->u.im->save_icon); |
338 } | 338 } |
339 | 339 |
389 return; | 389 return; |
390 | 390 |
391 sensitivity = GTK_WIDGET_IS_SENSITIVE(to_toggle); | 391 sensitivity = GTK_WIDGET_IS_SENSITIVE(to_toggle); |
392 | 392 |
393 gtk_widget_set_sensitive(to_toggle, !sensitivity); | 393 gtk_widget_set_sensitive(to_toggle, !sensitivity); |
394 } | |
395 | |
396 void | |
397 gtk_toggle_sensitive_array(GtkWidget *w, GPtrArray *data) | |
398 { | |
399 gboolean sensitivity; | |
400 gpointer element; | |
401 int i; | |
402 | |
403 for (i=0; i < data->len; i++) { | |
404 element = g_ptr_array_index(data,i); | |
405 if (element == NULL) | |
406 continue; | |
407 | |
408 sensitivity = GTK_WIDGET_IS_SENSITIVE(element); | |
409 | |
410 gtk_widget_set_sensitive(element, !sensitivity); | |
411 } | |
394 } | 412 } |
395 | 413 |
396 void gaim_separator(GtkWidget *menu) | 414 void gaim_separator(GtkWidget *menu) |
397 { | 415 { |
398 GtkWidget *menuitem; | 416 GtkWidget *menuitem; |
439 | 457 |
440 if (menu) | 458 if (menu) |
441 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); | 459 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); |
442 | 460 |
443 if (sf) | 461 if (sf) |
444 g_signal_connect(GTK_OBJECT(menuitem), "activate", sf, data); | 462 g_signal_connect(G_OBJECT(menuitem), "activate", sf, data); |
445 | 463 |
446 if (icon != NULL) { | 464 if (icon != NULL) { |
447 image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_MENU); | 465 image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_MENU); |
448 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); | 466 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); |
449 } | 467 } |