Mercurial > pidgin.yaz
comparison src/prpl.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 | 216e28b00b7f |
children | ad445074d239 |
comparison
equal
deleted
inserted
replaced
5313:8d118c2b03c9 | 5314:1f901484599d |
---|---|
215 GAIM_DIALOG(window); | 215 GAIM_DIALOG(window); |
216 p->window = window; | 216 p->window = window; |
217 gtk_window_set_role(GTK_WINDOW(window), "prompt"); | 217 gtk_window_set_role(GTK_WINDOW(window), "prompt"); |
218 gtk_window_set_resizable(GTK_WINDOW(window), TRUE); | 218 gtk_window_set_resizable(GTK_WINDOW(window), TRUE); |
219 gtk_window_set_title(GTK_WINDOW(window), _("Gaim - Prompt")); | 219 gtk_window_set_title(GTK_WINDOW(window), _("Gaim - Prompt")); |
220 g_signal_connect(GTK_OBJECT(window), "destroy", G_CALLBACK(des_prompt), p); | 220 g_signal_connect(G_OBJECT(window), "destroy", |
221 G_CALLBACK(des_prompt), p); | |
221 gtk_widget_realize(window); | 222 gtk_widget_realize(window); |
222 | 223 |
223 vbox = gtk_vbox_new(FALSE, 5); | 224 vbox = gtk_vbox_new(FALSE, 5); |
224 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 225 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
225 gtk_container_add(GTK_CONTAINER(window), vbox); | 226 gtk_container_add(GTK_CONTAINER(window), vbox); |
232 | 233 |
233 entry = gtk_entry_new(); | 234 entry = gtk_entry_new(); |
234 gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 0); | 235 gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 0); |
235 if (def) | 236 if (def) |
236 gtk_entry_set_text(GTK_ENTRY(entry), def); | 237 gtk_entry_set_text(GTK_ENTRY(entry), def); |
237 g_signal_connect(GTK_OBJECT(entry), "activate", G_CALLBACK(act_prompt), p); | 238 g_signal_connect(G_OBJECT(entry), "activate", |
239 G_CALLBACK(act_prompt), p); | |
238 p->entry = entry; | 240 p->entry = entry; |
239 | 241 |
240 hbox = gtk_hbox_new(FALSE, 5); | 242 hbox = gtk_hbox_new(FALSE, 5); |
241 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 243 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
242 | 244 |
243 button = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); | 245 button = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); |
244 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 246 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
245 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(act_prompt), p); | 247 g_signal_connect(G_OBJECT(button), "clicked", |
248 G_CALLBACK(act_prompt), p); | |
246 | 249 |
247 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 250 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
248 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 251 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
249 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(des_win), window); | 252 g_signal_connect(G_OBJECT(button), "clicked", |
253 G_CALLBACK(des_win), window); | |
250 | 254 |
251 gtk_widget_show_all(window); | 255 gtk_widget_show_all(window); |
252 } | 256 } |
253 | 257 |
254 static void proto_act(GtkObject *obj, struct proto_actions_menu *pam) | 258 static void proto_act(GtkObject *obj, struct proto_actions_menu *pam) |
320 while (act) { | 324 while (act) { |
321 if (act->data) { | 325 if (act->data) { |
322 struct proto_actions_menu *pam = act->data; | 326 struct proto_actions_menu *pam = act->data; |
323 menuitem = gtk_menu_item_new_with_label(pam->label); | 327 menuitem = gtk_menu_item_new_with_label(pam->label); |
324 gtk_menu_shell_append(GTK_MENU_SHELL(protomenu), menuitem); | 328 gtk_menu_shell_append(GTK_MENU_SHELL(protomenu), menuitem); |
325 g_signal_connect(GTK_OBJECT(menuitem), "activate", | 329 g_signal_connect(G_OBJECT(menuitem), "activate", |
326 G_CALLBACK(proto_act), pam); | 330 G_CALLBACK(proto_act), pam); |
327 g_object_set_data(G_OBJECT(menuitem), "proto_actions_menu", pam); | 331 g_object_set_data(G_OBJECT(menuitem), "proto_actions_menu", pam); |
328 gtk_widget_show(menuitem); | 332 gtk_widget_show(menuitem); |
329 } else { | 333 } else { |
330 gaim_separator(protomenu); | 334 gaim_separator(protomenu); |
331 } | 335 } |
373 while (act) { | 377 while (act) { |
374 if (act->data) { | 378 if (act->data) { |
375 struct proto_actions_menu *pam = act->data; | 379 struct proto_actions_menu *pam = act->data; |
376 menuitem = gtk_menu_item_new_with_label(pam->label); | 380 menuitem = gtk_menu_item_new_with_label(pam->label); |
377 gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); | 381 gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); |
378 g_signal_connect(GTK_OBJECT(menuitem), "activate", | 382 g_signal_connect(G_OBJECT(menuitem), "activate", |
379 G_CALLBACK(proto_act), pam); | 383 G_CALLBACK(proto_act), pam); |
380 g_object_set_data(G_OBJECT(menuitem), "proto_actions_menu", | 384 g_object_set_data(G_OBJECT(menuitem), "proto_actions_menu", |
381 pam); | 385 pam); |
382 gtk_widget_show(menuitem); | 386 gtk_widget_show(menuitem); |
383 } else { | 387 } else { |
384 gaim_separator(submenu); | 388 gaim_separator(submenu); |
465 | 469 |
466 GAIM_DIALOG(mn->email_win); | 470 GAIM_DIALOG(mn->email_win); |
467 gtk_window_set_role(GTK_WINDOW(mn->email_win), "mail"); | 471 gtk_window_set_role(GTK_WINDOW(mn->email_win), "mail"); |
468 gtk_window_set_resizable(GTK_WINDOW(mn->email_win), TRUE); | 472 gtk_window_set_resizable(GTK_WINDOW(mn->email_win), TRUE); |
469 gtk_window_set_title(GTK_WINDOW(mn->email_win), _("Gaim - New Mail")); | 473 gtk_window_set_title(GTK_WINDOW(mn->email_win), _("Gaim - New Mail")); |
470 g_signal_connect(GTK_OBJECT(mn->email_win), "destroy", G_CALLBACK(des_email_win), mn); | 474 g_signal_connect(G_OBJECT(mn->email_win), "destroy", |
475 G_CALLBACK(des_email_win), mn); | |
471 gtk_widget_realize(mn->email_win); | 476 gtk_widget_realize(mn->email_win); |
472 | 477 |
473 vbox = gtk_vbox_new(FALSE, 5); | 478 vbox = gtk_vbox_new(FALSE, 5); |
474 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 479 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
475 gtk_container_add(GTK_CONTAINER(mn->email_win), vbox); | 480 gtk_container_add(GTK_CONTAINER(mn->email_win), vbox); |
484 | 489 |
485 if (url) { | 490 if (url) { |
486 mn->url = g_strdup(url); | 491 mn->url = g_strdup(url); |
487 urlbut = gaim_pixbuf_button_from_stock(_("Open Mail"), GTK_STOCK_JUMP_TO, GAIM_BUTTON_HORIZONTAL); | 492 urlbut = gaim_pixbuf_button_from_stock(_("Open Mail"), GTK_STOCK_JUMP_TO, GAIM_BUTTON_HORIZONTAL); |
488 gtk_box_pack_end(GTK_BOX(hbox), urlbut, 0, 0, 5); | 493 gtk_box_pack_end(GTK_BOX(hbox), urlbut, 0, 0, 5); |
489 g_signal_connect(GTK_OBJECT(urlbut), "clicked", G_CALLBACK(open_url), mn->url); | 494 g_signal_connect(G_OBJECT(urlbut), "clicked", |
490 g_signal_connect(GTK_OBJECT(urlbut), "clicked", G_CALLBACK(des_email_win), mn); | 495 G_CALLBACK(open_url), mn->url); |
496 g_signal_connect(G_OBJECT(urlbut), "clicked", | |
497 G_CALLBACK(des_email_win), mn); | |
491 } | 498 } |
492 | 499 |
493 close = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); | 500 close = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); |
494 gtk_window_set_focus(GTK_WINDOW(mn->email_win), close); | 501 gtk_window_set_focus(GTK_WINDOW(mn->email_win), close); |
495 gtk_box_pack_end(GTK_BOX(hbox), close, 0, 0, 5); | 502 gtk_box_pack_end(GTK_BOX(hbox), close, 0, 0, 5); |
496 g_signal_connect(GTK_OBJECT(close), "clicked", G_CALLBACK(des_email_win), mn); | 503 g_signal_connect(G_OBJECT(close), "clicked", |
504 G_CALLBACK(des_email_win), mn); | |
497 | 505 |
498 gtk_widget_show_all(mn->email_win); | 506 gtk_widget_show_all(mn->email_win); |
499 } | 507 } |
500 | 508 |
501 struct icon_data { | 509 struct icon_data { |
774 | 782 |
775 regdlg = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 783 regdlg = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
776 gtk_window_set_title(GTK_WINDOW(regdlg), _("Gaim - Registration")); | 784 gtk_window_set_title(GTK_WINDOW(regdlg), _("Gaim - Registration")); |
777 gtk_window_set_role(GTK_WINDOW(regdlg), "register"); | 785 gtk_window_set_role(GTK_WINDOW(regdlg), "register"); |
778 gtk_widget_realize(regdlg); | 786 gtk_widget_realize(regdlg); |
779 g_signal_connect(GTK_OBJECT(regdlg), "destroy", G_CALLBACK(delete_regdlg), NULL); | 787 g_signal_connect(G_OBJECT(regdlg), "destroy", |
788 G_CALLBACK(delete_regdlg), NULL); | |
780 | 789 |
781 vbox = gtk_vbox_new(FALSE, 5); | 790 vbox = gtk_vbox_new(FALSE, 5); |
782 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 791 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
783 gtk_container_add(GTK_CONTAINER(regdlg), vbox); | 792 gtk_container_add(GTK_CONTAINER(regdlg), vbox); |
784 | 793 |
794 hbox = gtk_hbox_new(FALSE, 5); | 803 hbox = gtk_hbox_new(FALSE, 5); |
795 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | 804 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
796 | 805 |
797 close = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); | 806 close = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); |
798 gtk_box_pack_end(GTK_BOX(hbox), close, FALSE, FALSE, 5); | 807 gtk_box_pack_end(GTK_BOX(hbox), close, FALSE, FALSE, 5); |
799 g_signal_connect(GTK_OBJECT(close), "clicked", G_CALLBACK(delete_regdlg), NULL); | 808 g_signal_connect(G_OBJECT(close), "clicked", |
809 G_CALLBACK(delete_regdlg), NULL); | |
800 | 810 |
801 reg_reg = gaim_pixbuf_button_from_stock(_("Register"), GTK_STOCK_JUMP_TO, GAIM_BUTTON_HORIZONTAL); | 811 reg_reg = gaim_pixbuf_button_from_stock(_("Register"), GTK_STOCK_JUMP_TO, GAIM_BUTTON_HORIZONTAL); |
802 gtk_box_pack_end(GTK_BOX(hbox), reg_reg, FALSE, FALSE, 5); | 812 gtk_box_pack_end(GTK_BOX(hbox), reg_reg, FALSE, FALSE, 5); |
803 | 813 |
804 /* fuck me */ | 814 /* fuck me */ |