Mercurial > pidgin
comparison src/gtkpounce.c @ 12694:ebed1bbedb04
[gaim-migrate @ 15037]
SF Patch #1386297 from Lucio Maciel
"Add per pounce options, to pounce only when away/not
available.
Add pounce when receive a new im message
(received-im-msg signal)
Fix (pounce != GAIM_POUNCE_NONE) in
gaim_pounce_set_events()"
I changed this patch so that you can't create a pounce that sends an IM in response to receiving an IM. Auto-reply is messy.
I also cleaned up some little things that were bothering me in the pounce dialog.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 03 Jan 2006 11:42:51 +0000 |
parents | 0bde9a3cb93d |
children | c6a202e5823b |
comparison
equal
deleted
inserted
replaced
12693:07d6cc1b5a98 | 12694:ebed1bbedb04 |
---|---|
64 GaimAccount *account; | 64 GaimAccount *account; |
65 | 65 |
66 /* The window */ | 66 /* The window */ |
67 GtkWidget *window; | 67 GtkWidget *window; |
68 | 68 |
69 /* Pounce Who */ | 69 /* Pounce on Whom */ |
70 GtkWidget *account_menu; | 70 GtkWidget *account_menu; |
71 GtkWidget *buddy_entry; | 71 GtkWidget *buddy_entry; |
72 | 72 |
73 /* Pounce When */ | 73 /* Pounce options */ |
74 GtkWidget *on_away; | |
75 | |
76 /* Pounce When Buddy... */ | |
74 GtkWidget *signon; | 77 GtkWidget *signon; |
75 GtkWidget *signoff; | 78 GtkWidget *signoff; |
76 GtkWidget *away; | 79 GtkWidget *away; |
77 GtkWidget *away_return; | 80 GtkWidget *away_return; |
78 GtkWidget *idle; | 81 GtkWidget *idle; |
79 GtkWidget *idle_return; | 82 GtkWidget *idle_return; |
80 GtkWidget *typing; | 83 GtkWidget *typing; |
81 GtkWidget *stop_typing; | 84 GtkWidget *stop_typing; |
82 | 85 GtkWidget *message_recv; |
83 /* Pounce Action */ | 86 |
87 /* Action */ | |
84 GtkWidget *open_win; | 88 GtkWidget *open_win; |
85 GtkWidget *popup; | 89 GtkWidget *popup; |
86 GtkWidget *send_msg; | 90 GtkWidget *send_msg; |
87 GtkWidget *send_msg_entry; | 91 GtkWidget *send_msg_entry; |
88 GtkWidget *exec_cmd; | 92 GtkWidget *exec_cmd; |
242 static void | 246 static void |
243 save_pounce_cb(GtkWidget *w, GaimGtkPounceDialog *dialog) | 247 save_pounce_cb(GtkWidget *w, GaimGtkPounceDialog *dialog) |
244 { | 248 { |
245 const char *name; | 249 const char *name; |
246 const char *message, *command, *sound; | 250 const char *message, *command, *sound; |
247 GaimPounceEvent events = GAIM_POUNCE_NONE; | 251 GaimPounceEvent events = GAIM_POUNCE_NONE; |
252 GaimPounceOption options = GAIM_POUNCE_OPTION_NONE; | |
248 | 253 |
249 name = gtk_entry_get_text(GTK_ENTRY(dialog->buddy_entry)); | 254 name = gtk_entry_get_text(GTK_ENTRY(dialog->buddy_entry)); |
250 | 255 |
251 if (*name == '\0') | 256 if (*name == '\0') |
252 { | 257 { |
253 gaim_notify_error(NULL, NULL, | 258 gaim_notify_error(NULL, NULL, |
254 _("Please enter a buddy to pounce."), NULL); | 259 _("Please enter a buddy to pounce."), NULL); |
255 return; | 260 return; |
256 } | 261 } |
257 | 262 |
263 /* Options */ | |
264 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->on_away))) | |
265 options |= GAIM_POUNCE_OPTION_AWAY; | |
266 | |
258 /* Events */ | 267 /* Events */ |
259 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->signon))) | 268 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->signon))) |
260 events |= GAIM_POUNCE_SIGNON; | 269 events |= GAIM_POUNCE_SIGNON; |
261 | 270 |
262 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->signoff))) | 271 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->signoff))) |
277 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->typing))) | 286 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->typing))) |
278 events |= GAIM_POUNCE_TYPING; | 287 events |= GAIM_POUNCE_TYPING; |
279 | 288 |
280 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->stop_typing))) | 289 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->stop_typing))) |
281 events |= GAIM_POUNCE_TYPING_STOPPED; | 290 events |= GAIM_POUNCE_TYPING_STOPPED; |
291 | |
292 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->message_recv))) | |
293 events |= GAIM_POUNCE_MESSAGE_RECEIVED; | |
282 | 294 |
283 /* Data fields */ | 295 /* Data fields */ |
284 message = gtk_entry_get_text(GTK_ENTRY(dialog->send_msg_entry)); | 296 message = gtk_entry_get_text(GTK_ENTRY(dialog->send_msg_entry)); |
285 command = gtk_entry_get_text(GTK_ENTRY(dialog->exec_cmd_entry)); | 297 command = gtk_entry_get_text(GTK_ENTRY(dialog->exec_cmd_entry)); |
286 sound = gtk_entry_get_text(GTK_ENTRY(dialog->play_sound_entry)); | 298 sound = gtk_entry_get_text(GTK_ENTRY(dialog->play_sound_entry)); |
290 if (*sound == '\0') sound = NULL; | 302 if (*sound == '\0') sound = NULL; |
291 | 303 |
292 if (dialog->pounce == NULL) | 304 if (dialog->pounce == NULL) |
293 { | 305 { |
294 dialog->pounce = gaim_pounce_new(GAIM_GTK_UI, dialog->account, | 306 dialog->pounce = gaim_pounce_new(GAIM_GTK_UI, dialog->account, |
295 name, events); | 307 name, events, options); |
296 } | 308 } |
297 else { | 309 else { |
298 gaim_pounce_set_events(dialog->pounce, events); | 310 gaim_pounce_set_events(dialog->pounce, events); |
311 gaim_pounce_set_options(dialog->pounce, options); | |
299 gaim_pounce_set_pouncer(dialog->pounce, dialog->account); | 312 gaim_pounce_set_pouncer(dialog->pounce, dialog->account); |
300 gaim_pounce_set_pouncee(dialog->pounce, name); | 313 gaim_pounce_set_pouncee(dialog->pounce, name); |
301 } | 314 } |
302 | 315 |
303 /* Actions */ | 316 /* Actions */ |
352 if (dialog->save_button == NULL) | 365 if (dialog->save_button == NULL) |
353 return; | 366 return; |
354 | 367 |
355 gtk_widget_set_sensitive(dialog->save_button, | 368 gtk_widget_set_sensitive(dialog->save_button, |
356 *gtk_entry_get_text(entry) != '\0'); | 369 *gtk_entry_get_text(entry) != '\0'); |
370 } | |
371 | |
372 static void | |
373 message_recv_toggle(GtkButton *message_recv, GtkWidget *send_msg) | |
374 { | |
375 gboolean active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(message_recv)); | |
376 | |
377 gtk_widget_set_sensitive(send_msg, !active); | |
378 if (active) | |
379 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(send_msg), FALSE); | |
357 } | 380 } |
358 | 381 |
359 static void | 382 static void |
360 pounce_dnd_recv(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, | 383 pounce_dnd_recv(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, |
361 GtkSelectionData *sd, guint info, guint t, gpointer data) | 384 GtkSelectionData *sd, guint info, guint t, gpointer data) |
487 | 510 |
488 /* Create the vbox that will contain all the prefs stuff. */ | 511 /* Create the vbox that will contain all the prefs stuff. */ |
489 vbox2 = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); | 512 vbox2 = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
490 gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); | 513 gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); |
491 | 514 |
492 /* Create the "Pounce Who" frame. */ | 515 /* Create the "Pounce on Whom" frame. */ |
493 frame = gaim_gtk_make_frame(vbox2, _("Pounce Who")); | 516 frame = gaim_gtk_make_frame(vbox2, _("Pounce on Whom")); |
494 | 517 |
495 /* Account: */ | 518 /* Account: */ |
496 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); | 519 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
497 gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); | 520 gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
498 gtk_widget_show(hbox); | 521 gtk_widget_show(hbox); |
538 } | 561 } |
539 else if (name != NULL) { | 562 else if (name != NULL) { |
540 gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), name); | 563 gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), name); |
541 } | 564 } |
542 | 565 |
543 /* Create the "Pounce When" frame. */ | 566 /* Create the "Pounce When Buddy..." frame. */ |
544 frame = gaim_gtk_make_frame(vbox2, _("Pounce When Buddy...")); | 567 frame = gaim_gtk_make_frame(vbox2, _("Pounce When Buddy...")); |
545 | 568 |
546 table = gtk_table_new(2, 4, FALSE); | 569 table = gtk_table_new(2, 4, FALSE); |
547 gtk_container_add(GTK_CONTAINER(frame), table); | 570 gtk_container_add(GTK_CONTAINER(frame), table); |
548 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); | 571 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); |
562 gtk_check_button_new_with_mnemonic(_("Is no longer i_dle")); | 585 gtk_check_button_new_with_mnemonic(_("Is no longer i_dle")); |
563 dialog->typing = | 586 dialog->typing = |
564 gtk_check_button_new_with_mnemonic(_("Starts _typing")); | 587 gtk_check_button_new_with_mnemonic(_("Starts _typing")); |
565 dialog->stop_typing = | 588 dialog->stop_typing = |
566 gtk_check_button_new_with_mnemonic(_("Stops t_yping")); | 589 gtk_check_button_new_with_mnemonic(_("Stops t_yping")); |
567 | 590 dialog->message_recv = |
568 gtk_table_attach(GTK_TABLE(table), dialog->signon, 0, 1, 0, 1, | 591 gtk_check_button_new_with_mnemonic(_("Sends a _message")); |
569 GTK_FILL, 0, 0, 0); | 592 |
570 gtk_table_attach(GTK_TABLE(table), dialog->signoff, 1, 2, 0, 1, | 593 gtk_table_attach(GTK_TABLE(table), dialog->signon, 0, 1, 0, 1, |
571 GTK_FILL, 0, 0, 0); | 594 GTK_FILL, 0, 0, 0); |
572 gtk_table_attach(GTK_TABLE(table), dialog->away, 0, 1, 1, 2, | 595 gtk_table_attach(GTK_TABLE(table), dialog->signoff, 1, 2, 0, 1, |
573 GTK_FILL, 0, 0, 0); | 596 GTK_FILL, 0, 0, 0); |
574 gtk_table_attach(GTK_TABLE(table), dialog->away_return, 1, 2, 1, 2, | 597 gtk_table_attach(GTK_TABLE(table), dialog->away, 0, 1, 1, 2, |
575 GTK_FILL, 0, 0, 0); | 598 GTK_FILL, 0, 0, 0); |
576 gtk_table_attach(GTK_TABLE(table), dialog->idle, 0, 1, 2, 3, | 599 gtk_table_attach(GTK_TABLE(table), dialog->away_return, 1, 2, 1, 2, |
577 GTK_FILL, 0, 0, 0); | 600 GTK_FILL, 0, 0, 0); |
578 gtk_table_attach(GTK_TABLE(table), dialog->idle_return, 1, 2, 2, 3, | 601 gtk_table_attach(GTK_TABLE(table), dialog->idle, 0, 1, 2, 3, |
579 GTK_FILL, 0, 0, 0); | 602 GTK_FILL, 0, 0, 0); |
580 gtk_table_attach(GTK_TABLE(table), dialog->typing, 0, 1, 3, 4, | 603 gtk_table_attach(GTK_TABLE(table), dialog->idle_return, 1, 2, 2, 3, |
581 GTK_FILL, 0, 0, 0); | 604 GTK_FILL, 0, 0, 0); |
582 gtk_table_attach(GTK_TABLE(table), dialog->stop_typing, 1, 2, 3, 5, | 605 gtk_table_attach(GTK_TABLE(table), dialog->typing, 0, 1, 3, 4, |
606 GTK_FILL, 0, 0, 0); | |
607 gtk_table_attach(GTK_TABLE(table), dialog->stop_typing, 1, 2, 3, 4, | |
608 GTK_FILL, 0, 0, 0); | |
609 gtk_table_attach(GTK_TABLE(table), dialog->message_recv, 0, 1, 4, 5, | |
583 GTK_FILL, 0, 0, 0); | 610 GTK_FILL, 0, 0, 0); |
584 | 611 |
585 gtk_widget_show(dialog->signon); | 612 gtk_widget_show(dialog->signon); |
586 gtk_widget_show(dialog->signoff); | 613 gtk_widget_show(dialog->signoff); |
587 gtk_widget_show(dialog->away); | 614 gtk_widget_show(dialog->away); |
588 gtk_widget_show(dialog->away_return); | 615 gtk_widget_show(dialog->away_return); |
589 gtk_widget_show(dialog->idle); | 616 gtk_widget_show(dialog->idle); |
590 gtk_widget_show(dialog->idle_return); | 617 gtk_widget_show(dialog->idle_return); |
591 gtk_widget_show(dialog->typing); | 618 gtk_widget_show(dialog->typing); |
592 gtk_widget_show(dialog->stop_typing); | 619 gtk_widget_show(dialog->stop_typing); |
593 | 620 gtk_widget_show(dialog->message_recv); |
594 /* Create the "Pounce Action" frame. */ | 621 |
595 frame = gaim_gtk_make_frame(vbox2, _("Pounce Action")); | 622 /* Create the "Action" frame. */ |
623 frame = gaim_gtk_make_frame(vbox2, _("Action")); | |
596 | 624 |
597 table = gtk_table_new(3, 5, FALSE); | 625 table = gtk_table_new(3, 5, FALSE); |
598 gtk_container_add(GTK_CONTAINER(frame), table); | 626 gtk_container_add(GTK_CONTAINER(frame), table); |
599 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); | 627 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); |
600 gtk_widget_show(table); | 628 gtk_widget_show(table); |
615 dialog->exec_cmd_browse = gtk_button_new_with_mnemonic(_("Brows_e...")); | 643 dialog->exec_cmd_browse = gtk_button_new_with_mnemonic(_("Brows_e...")); |
616 dialog->play_sound_entry = gtk_entry_new(); | 644 dialog->play_sound_entry = gtk_entry_new(); |
617 dialog->play_sound_browse = gtk_button_new_with_mnemonic(_("Br_owse...")); | 645 dialog->play_sound_browse = gtk_button_new_with_mnemonic(_("Br_owse...")); |
618 dialog->play_sound_test = gtk_button_new_with_mnemonic(_("Pre_view")); | 646 dialog->play_sound_test = gtk_button_new_with_mnemonic(_("Pre_view")); |
619 | 647 |
620 gtk_widget_set_sensitive(dialog->send_msg_entry, FALSE); | 648 gtk_widget_set_sensitive(dialog->send_msg_entry, FALSE); |
621 gtk_widget_set_sensitive(dialog->exec_cmd_entry, FALSE); | 649 gtk_widget_set_sensitive(dialog->exec_cmd_entry, FALSE); |
622 gtk_widget_set_sensitive(dialog->exec_cmd_browse, FALSE); | 650 gtk_widget_set_sensitive(dialog->exec_cmd_browse, FALSE); |
623 gtk_widget_set_sensitive(dialog->play_sound_entry, FALSE); | 651 gtk_widget_set_sensitive(dialog->play_sound_entry, FALSE); |
624 gtk_widget_set_sensitive(dialog->play_sound_browse, FALSE); | 652 gtk_widget_set_sensitive(dialog->play_sound_browse, FALSE); |
625 gtk_widget_set_sensitive(dialog->play_sound_test, FALSE); | 653 gtk_widget_set_sensitive(dialog->play_sound_test, FALSE); |
654 | |
655 sg = gtk_size_group_new(GTK_SIZE_GROUP_VERTICAL); | |
656 gtk_size_group_add_widget(sg, dialog->open_win); | |
657 gtk_size_group_add_widget(sg, dialog->popup); | |
658 gtk_size_group_add_widget(sg, dialog->send_msg); | |
659 gtk_size_group_add_widget(sg, dialog->send_msg_entry); | |
660 gtk_size_group_add_widget(sg, dialog->exec_cmd); | |
661 gtk_size_group_add_widget(sg, dialog->exec_cmd_entry); | |
662 gtk_size_group_add_widget(sg, dialog->exec_cmd_browse); | |
663 gtk_size_group_add_widget(sg, dialog->play_sound); | |
664 gtk_size_group_add_widget(sg, dialog->play_sound_entry); | |
665 gtk_size_group_add_widget(sg, dialog->play_sound_browse); | |
666 gtk_size_group_add_widget(sg, dialog->play_sound_test); | |
626 | 667 |
627 gtk_table_attach(GTK_TABLE(table), dialog->open_win, 0, 1, 0, 1, | 668 gtk_table_attach(GTK_TABLE(table), dialog->open_win, 0, 1, 0, 1, |
628 GTK_FILL, 0, 0, 0); | 669 GTK_FILL, 0, 0, 0); |
629 gtk_table_attach(GTK_TABLE(table), dialog->popup, 0, 1, 1, 2, | 670 gtk_table_attach(GTK_TABLE(table), dialog->popup, 0, 1, 1, 2, |
630 GTK_FILL, 0, 0, 0); | 671 GTK_FILL, 0, 0, 0); |
644 GTK_FILL, 0, 0, 0); | 685 GTK_FILL, 0, 0, 0); |
645 gtk_table_attach(GTK_TABLE(table), dialog->play_sound_browse, 2, 3, 4, 5, | 686 gtk_table_attach(GTK_TABLE(table), dialog->play_sound_browse, 2, 3, 4, 5, |
646 GTK_FILL | GTK_EXPAND, 0, 0, 0); | 687 GTK_FILL | GTK_EXPAND, 0, 0, 0); |
647 gtk_table_attach(GTK_TABLE(table), dialog->play_sound_test, 3, 4, 4, 5, | 688 gtk_table_attach(GTK_TABLE(table), dialog->play_sound_test, 3, 4, 4, 5, |
648 GTK_FILL | GTK_EXPAND, 0, 0, 0); | 689 GTK_FILL | GTK_EXPAND, 0, 0, 0); |
690 | |
691 gtk_table_set_row_spacings(GTK_TABLE(table), GAIM_HIG_BOX_SPACE / 2); | |
649 | 692 |
650 gtk_widget_show(dialog->open_win); | 693 gtk_widget_show(dialog->open_win); |
651 gtk_widget_show(dialog->popup); | 694 gtk_widget_show(dialog->popup); |
652 gtk_widget_show(dialog->send_msg); | 695 gtk_widget_show(dialog->send_msg); |
653 gtk_widget_show(dialog->send_msg_entry); | 696 gtk_widget_show(dialog->send_msg_entry); |
657 gtk_widget_show(dialog->play_sound); | 700 gtk_widget_show(dialog->play_sound); |
658 gtk_widget_show(dialog->play_sound_entry); | 701 gtk_widget_show(dialog->play_sound_entry); |
659 gtk_widget_show(dialog->play_sound_browse); | 702 gtk_widget_show(dialog->play_sound_browse); |
660 gtk_widget_show(dialog->play_sound_test); | 703 gtk_widget_show(dialog->play_sound_test); |
661 | 704 |
705 g_signal_connect(G_OBJECT(dialog->message_recv), "clicked", | |
706 G_CALLBACK(message_recv_toggle), | |
707 dialog->send_msg); | |
708 | |
662 g_signal_connect(G_OBJECT(dialog->send_msg), "clicked", | 709 g_signal_connect(G_OBJECT(dialog->send_msg), "clicked", |
663 G_CALLBACK(gaim_gtk_toggle_sensitive), | 710 G_CALLBACK(gaim_gtk_toggle_sensitive), |
664 dialog->send_msg_entry); | 711 dialog->send_msg_entry); |
665 | 712 |
666 exec_widgets = g_ptr_array_new(); | 713 exec_widgets = g_ptr_array_new(); |
694 g_signal_connect(G_OBJECT(dialog->exec_cmd_entry), "activate", | 741 g_signal_connect(G_OBJECT(dialog->exec_cmd_entry), "activate", |
695 G_CALLBACK(save_pounce_cb), dialog); | 742 G_CALLBACK(save_pounce_cb), dialog); |
696 g_signal_connect(G_OBJECT(dialog->play_sound_entry), "activate", | 743 g_signal_connect(G_OBJECT(dialog->play_sound_entry), "activate", |
697 G_CALLBACK(save_pounce_cb), dialog); | 744 G_CALLBACK(save_pounce_cb), dialog); |
698 | 745 |
699 /* Now the last part, where we have the Save checkbox */ | 746 /* Create the "Options" frame. */ |
747 frame = gaim_gtk_make_frame(vbox2, _("Options")); | |
748 | |
749 table = gtk_table_new(2, 1, FALSE); | |
750 gtk_container_add(GTK_CONTAINER(frame), table); | |
751 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); | |
752 gtk_widget_show(table); | |
753 | |
754 dialog->on_away = | |
755 gtk_check_button_new_with_mnemonic(_("P_ounce only when my status is not available")); | |
756 gtk_table_attach(GTK_TABLE(table), dialog->on_away, 0, 1, 0, 1, | |
757 GTK_FILL, 0, 0, 0); | |
758 | |
700 dialog->save_pounce = gtk_check_button_new_with_mnemonic( | 759 dialog->save_pounce = gtk_check_button_new_with_mnemonic( |
701 _("_Recurring")); | 760 _("_Recurring")); |
702 | 761 gtk_table_attach(GTK_TABLE(table), dialog->save_pounce, 0, 1, 1, 2, |
703 gtk_box_pack_start(GTK_BOX(vbox2), dialog->save_pounce, FALSE, FALSE, 0); | 762 GTK_FILL, 0, 0, 0); |
763 | |
764 gtk_widget_show(dialog->on_away); | |
765 gtk_widget_show(dialog->save_pounce); | |
704 | 766 |
705 /* Now the button box! */ | 767 /* Now the button box! */ |
706 bbox = gtk_hbutton_box_new(); | 768 bbox = gtk_hbutton_box_new(); |
707 gtk_box_set_spacing(GTK_BOX(bbox), GAIM_HIG_BOX_SPACE); | 769 gtk_box_set_spacing(GTK_BOX(bbox), GAIM_HIG_BOX_SPACE); |
708 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | 770 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
758 G_CALLBACK(pounce_dnd_recv), dialog); | 820 G_CALLBACK(pounce_dnd_recv), dialog); |
759 | 821 |
760 /* Set the values of stuff. */ | 822 /* Set the values of stuff. */ |
761 if (cur_pounce != NULL) | 823 if (cur_pounce != NULL) |
762 { | 824 { |
763 GaimPounceEvent events = gaim_pounce_get_events(cur_pounce); | 825 GaimPounceEvent events = gaim_pounce_get_events(cur_pounce); |
826 GaimPounceOption options = gaim_pounce_get_options(cur_pounce); | |
764 const char *value; | 827 const char *value; |
828 | |
829 /* Options */ | |
830 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->on_away), | |
831 (options & GAIM_POUNCE_OPTION_AWAY)); | |
765 | 832 |
766 /* Events */ | 833 /* Events */ |
767 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->signon), | 834 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->signon), |
768 (events & GAIM_POUNCE_SIGNON)); | 835 (events & GAIM_POUNCE_SIGNON)); |
769 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->signoff), | 836 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->signoff), |
778 (events & GAIM_POUNCE_IDLE_RETURN)); | 845 (events & GAIM_POUNCE_IDLE_RETURN)); |
779 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->typing), | 846 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->typing), |
780 (events & GAIM_POUNCE_TYPING)); | 847 (events & GAIM_POUNCE_TYPING)); |
781 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->stop_typing), | 848 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->stop_typing), |
782 (events & GAIM_POUNCE_TYPING_STOPPED)); | 849 (events & GAIM_POUNCE_TYPING_STOPPED)); |
850 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->message_recv), | |
851 (events & GAIM_POUNCE_MESSAGE_RECEIVED)); | |
783 | 852 |
784 /* Actions */ | 853 /* Actions */ |
785 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->open_win), | 854 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->open_win), |
786 gaim_pounce_action_is_enabled(cur_pounce, "open-window")); | 855 gaim_pounce_action_is_enabled(cur_pounce, "open-window")); |
787 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->popup), | 856 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->popup), |
1355 _("%s has signed off (%s)") : | 1424 _("%s has signed off (%s)") : |
1356 (events & GAIM_POUNCE_IDLE) ? | 1425 (events & GAIM_POUNCE_IDLE) ? |
1357 _("%s has become idle (%s)") : | 1426 _("%s has become idle (%s)") : |
1358 (events & GAIM_POUNCE_AWAY) ? | 1427 (events & GAIM_POUNCE_AWAY) ? |
1359 _("%s has gone away. (%s)") : | 1428 _("%s has gone away. (%s)") : |
1429 (events & GAIM_POUNCE_MESSAGE_RECEIVED) ? | |
1430 _("%s has sent you a message. (%s)") : | |
1360 _("Unknown pounce event. Please report this!"), | 1431 _("Unknown pounce event. Please report this!"), |
1361 alias, gaim_account_get_protocol_name(account)); | 1432 alias, gaim_account_get_protocol_name(account)); |
1362 | 1433 |
1363 /* | 1434 /* |
1364 * Ok here is where I change the second argument, title, from | 1435 * Ok here is where I change the second argument, title, from |