Mercurial > pidgin.yaz
comparison pidgin/gtkpounce.c @ 15504:b53b783846a8
merge of '06e221e7ba1b9991d934d6c69e7d29d821d2e567'
and '9a6dfa7a96d203a51ba160ccf94bb19e2e557161'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 03 Feb 2007 08:13:34 +0000 |
parents | d75099d2567e |
children | 311315e979f7 |
comparison
equal
deleted
inserted
replaced
15503:704d40050800 | 15504:b53b783846a8 |
---|---|
102 GtkWidget *save_pounce; | 102 GtkWidget *save_pounce; |
103 | 103 |
104 /* Buttons */ | 104 /* Buttons */ |
105 GtkWidget *save_button; | 105 GtkWidget *save_button; |
106 | 106 |
107 } GaimGtkPounceDialog; | 107 } PidginPounceDialog; |
108 | 108 |
109 typedef struct | 109 typedef struct |
110 { | 110 { |
111 GtkWidget *window; | 111 GtkWidget *window; |
112 GtkListStore *model; | 112 GtkListStore *model; |
119 | 119 |
120 /************************************************************************** | 120 /************************************************************************** |
121 * Callbacks | 121 * Callbacks |
122 **************************************************************************/ | 122 **************************************************************************/ |
123 static gint | 123 static gint |
124 delete_win_cb(GtkWidget *w, GdkEventAny *e, GaimGtkPounceDialog *dialog) | 124 delete_win_cb(GtkWidget *w, GdkEventAny *e, PidginPounceDialog *dialog) |
125 { | 125 { |
126 gtk_widget_destroy(dialog->window); | 126 gtk_widget_destroy(dialog->window); |
127 g_free(dialog); | 127 g_free(dialog); |
128 | 128 |
129 return TRUE; | 129 return TRUE; |
130 } | 130 } |
131 | 131 |
132 static void | 132 static void |
133 cancel_cb(GtkWidget *w, GaimGtkPounceDialog *dialog) | 133 cancel_cb(GtkWidget *w, PidginPounceDialog *dialog) |
134 { | 134 { |
135 delete_win_cb(NULL, NULL, dialog); | 135 delete_win_cb(NULL, NULL, dialog); |
136 } | 136 } |
137 | 137 |
138 static void | 138 static void |
184 | 184 |
185 account = gaim_pounce_get_pouncer(pounce); | 185 account = gaim_pounce_get_pouncer(pounce); |
186 | 186 |
187 events = gaim_pounce_get_events(pounce); | 187 events = gaim_pounce_get_events(pounce); |
188 | 188 |
189 pixbuf = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); | 189 pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); |
190 | 190 |
191 pouncer = gaim_account_get_username(account); | 191 pouncer = gaim_account_get_username(account); |
192 pouncee = gaim_pounce_get_pouncee(pounce); | 192 pouncee = gaim_pounce_get_pouncee(pounce); |
193 recurring = gaim_pounce_get_save(pounce); | 193 recurring = gaim_pounce_get_save(pounce); |
194 | 194 |
234 { | 234 { |
235 update_pounces(); | 235 update_pounces(); |
236 } | 236 } |
237 | 237 |
238 static void | 238 static void |
239 save_pounce_cb(GtkWidget *w, GaimGtkPounceDialog *dialog) | 239 save_pounce_cb(GtkWidget *w, PidginPounceDialog *dialog) |
240 { | 240 { |
241 const char *name; | 241 const char *name; |
242 const char *message, *command, *sound, *reason; | 242 const char *message, *command, *sound, *reason; |
243 GaimPounceEvent events = GAIM_POUNCE_NONE; | 243 GaimPounceEvent events = GAIM_POUNCE_NONE; |
244 GaimPounceOption options = GAIM_POUNCE_OPTION_NONE; | 244 GaimPounceOption options = GAIM_POUNCE_OPTION_NONE; |
298 if (*command == '\0') command = NULL; | 298 if (*command == '\0') command = NULL; |
299 if (*sound == '\0') sound = NULL; | 299 if (*sound == '\0') sound = NULL; |
300 | 300 |
301 if (dialog->pounce == NULL) | 301 if (dialog->pounce == NULL) |
302 { | 302 { |
303 dialog->pounce = gaim_pounce_new(GAIM_GTK_UI, dialog->account, | 303 dialog->pounce = gaim_pounce_new(PIDGIN_UI, dialog->account, |
304 name, events, options); | 304 name, events, options); |
305 } | 305 } |
306 else { | 306 else { |
307 gaim_pounce_set_events(dialog->pounce, events); | 307 gaim_pounce_set_events(dialog->pounce, events); |
308 gaim_pounce_set_options(dialog->pounce, options); | 308 gaim_pounce_set_options(dialog->pounce, options); |
351 delete_win_cb(NULL, NULL, dialog); | 351 delete_win_cb(NULL, NULL, dialog); |
352 } | 352 } |
353 | 353 |
354 static void | 354 static void |
355 pounce_choose_cb(GtkWidget *item, GaimAccount *account, | 355 pounce_choose_cb(GtkWidget *item, GaimAccount *account, |
356 GaimGtkPounceDialog *dialog) | 356 PidginPounceDialog *dialog) |
357 { | 357 { |
358 dialog->account = account; | 358 dialog->account = account; |
359 } | 359 } |
360 | 360 |
361 static void | 361 static void |
362 buddy_changed_cb(GtkEntry *entry, GaimGtkPounceDialog *dialog) | 362 buddy_changed_cb(GtkEntry *entry, PidginPounceDialog *dialog) |
363 { | 363 { |
364 if (dialog->save_button == NULL) | 364 if (dialog->save_button == NULL) |
365 return; | 365 return; |
366 | 366 |
367 gtk_widget_set_sensitive(dialog->save_button, | 367 gtk_widget_set_sensitive(dialog->save_button, |
380 | 380 |
381 static void | 381 static void |
382 pounce_dnd_recv(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, | 382 pounce_dnd_recv(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, |
383 GtkSelectionData *sd, guint info, guint t, gpointer data) | 383 GtkSelectionData *sd, guint info, guint t, gpointer data) |
384 { | 384 { |
385 GaimGtkPounceDialog *dialog; | 385 PidginPounceDialog *dialog; |
386 | 386 |
387 if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) | 387 if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) |
388 { | 388 { |
389 GaimBlistNode *node = NULL; | 389 GaimBlistNode *node = NULL; |
390 GaimBuddy *buddy; | 390 GaimBuddy *buddy; |
396 else if (GAIM_BLIST_NODE_IS_BUDDY(node)) | 396 else if (GAIM_BLIST_NODE_IS_BUDDY(node)) |
397 buddy = (GaimBuddy *)node; | 397 buddy = (GaimBuddy *)node; |
398 else | 398 else |
399 return; | 399 return; |
400 | 400 |
401 dialog = (GaimGtkPounceDialog *)data; | 401 dialog = (PidginPounceDialog *)data; |
402 | 402 |
403 gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), buddy->name); | 403 gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), buddy->name); |
404 dialog->account = buddy->account; | 404 dialog->account = buddy->account; |
405 gaim_gtk_account_option_menu_set_selected(dialog->account_menu, buddy->account); | 405 pidgin_account_option_menu_set_selected(dialog->account_menu, buddy->account); |
406 | 406 |
407 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); | 407 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); |
408 } | 408 } |
409 else if (sd->target == gdk_atom_intern("application/x-im-contact", FALSE)) | 409 else if (sd->target == gdk_atom_intern("application/x-im-contact", FALSE)) |
410 { | 410 { |
411 char *protocol = NULL; | 411 char *protocol = NULL; |
412 char *username = NULL; | 412 char *username = NULL; |
413 GaimAccount *account; | 413 GaimAccount *account; |
414 | 414 |
415 if (gaim_gtk_parse_x_im_contact((const char *)sd->data, FALSE, &account, | 415 if (pidgin_parse_x_im_contact((const char *)sd->data, FALSE, &account, |
416 &protocol, &username, NULL)) | 416 &protocol, &username, NULL)) |
417 { | 417 { |
418 if (account == NULL) | 418 if (account == NULL) |
419 { | 419 { |
420 gaim_notify_error(NULL, NULL, | 420 gaim_notify_error(NULL, NULL, |
421 _("You are not currently signed on with an account that " | 421 _("You are not currently signed on with an account that " |
422 "can add that buddy."), NULL); | 422 "can add that buddy."), NULL); |
423 } | 423 } |
424 else | 424 else |
425 { | 425 { |
426 dialog = (GaimGtkPounceDialog *)data; | 426 dialog = (PidginPounceDialog *)data; |
427 | 427 |
428 gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), username); | 428 gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), username); |
429 dialog->account = account; | 429 dialog->account = account; |
430 gaim_gtk_account_option_menu_set_selected(dialog->account_menu, account); | 430 pidgin_account_option_menu_set_selected(dialog->account_menu, account); |
431 } | 431 } |
432 } | 432 } |
433 | 433 |
434 g_free(username); | 434 g_free(username); |
435 g_free(protocol); | 435 g_free(protocol); |
443 {"GAIM_BLIST_NODE", GTK_TARGET_SAME_APP, 0}, | 443 {"GAIM_BLIST_NODE", GTK_TARGET_SAME_APP, 0}, |
444 {"application/x-im-contact", 0, 1} | 444 {"application/x-im-contact", 0, 1} |
445 }; | 445 }; |
446 | 446 |
447 void | 447 void |
448 gaim_gtk_pounce_editor_show(GaimAccount *account, const char *name, | 448 pidgin_pounce_editor_show(GaimAccount *account, const char *name, |
449 GaimPounce *cur_pounce) | 449 GaimPounce *cur_pounce) |
450 { | 450 { |
451 GaimGtkPounceDialog *dialog; | 451 PidginPounceDialog *dialog; |
452 GtkWidget *window; | 452 GtkWidget *window; |
453 GtkWidget *label; | 453 GtkWidget *label; |
454 GtkWidget *bbox; | 454 GtkWidget *bbox; |
455 GtkWidget *vbox1, *vbox2; | 455 GtkWidget *vbox1, *vbox2; |
456 GtkWidget *hbox; | 456 GtkWidget *hbox; |
463 | 463 |
464 g_return_if_fail((cur_pounce != NULL) || | 464 g_return_if_fail((cur_pounce != NULL) || |
465 (account != NULL) || | 465 (account != NULL) || |
466 (gaim_accounts_get_all() != NULL)); | 466 (gaim_accounts_get_all() != NULL)); |
467 | 467 |
468 dialog = g_new0(GaimGtkPounceDialog, 1); | 468 dialog = g_new0(PidginPounceDialog, 1); |
469 | 469 |
470 if (cur_pounce != NULL) | 470 if (cur_pounce != NULL) |
471 { | 471 { |
472 dialog->pounce = cur_pounce; | 472 dialog->pounce = cur_pounce; |
473 dialog->account = gaim_pounce_get_pouncer(cur_pounce); | 473 dialog->account = gaim_pounce_get_pouncer(cur_pounce); |
517 /* Create the vbox that will contain all the prefs stuff. */ | 517 /* Create the vbox that will contain all the prefs stuff. */ |
518 vbox2 = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); | 518 vbox2 = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
519 gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); | 519 gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); |
520 | 520 |
521 /* Create the "Pounce on Whom" frame. */ | 521 /* Create the "Pounce on Whom" frame. */ |
522 frame = gaim_gtk_make_frame(vbox2, _("Pounce on Whom")); | 522 frame = pidgin_make_frame(vbox2, _("Pounce on Whom")); |
523 | 523 |
524 /* Account: */ | 524 /* Account: */ |
525 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); | 525 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
526 gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); | 526 gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
527 gtk_widget_show(hbox); | 527 gtk_widget_show(hbox); |
531 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | 531 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
532 gtk_widget_show(label); | 532 gtk_widget_show(label); |
533 gtk_size_group_add_widget(sg, label); | 533 gtk_size_group_add_widget(sg, label); |
534 | 534 |
535 dialog->account_menu = | 535 dialog->account_menu = |
536 gaim_gtk_account_option_menu_new(dialog->account, TRUE, | 536 pidgin_account_option_menu_new(dialog->account, TRUE, |
537 G_CALLBACK(pounce_choose_cb), | 537 G_CALLBACK(pounce_choose_cb), |
538 NULL, dialog); | 538 NULL, dialog); |
539 | 539 |
540 gtk_box_pack_start(GTK_BOX(hbox), dialog->account_menu, FALSE, FALSE, 0); | 540 gtk_box_pack_start(GTK_BOX(hbox), dialog->account_menu, FALSE, FALSE, 0); |
541 gtk_widget_show(dialog->account_menu); | 541 gtk_widget_show(dialog->account_menu); |
552 gtk_widget_show(label); | 552 gtk_widget_show(label); |
553 gtk_size_group_add_widget(sg, label); | 553 gtk_size_group_add_widget(sg, label); |
554 | 554 |
555 dialog->buddy_entry = gtk_entry_new(); | 555 dialog->buddy_entry = gtk_entry_new(); |
556 | 556 |
557 gaim_gtk_setup_screenname_autocomplete(dialog->buddy_entry, dialog->account_menu, FALSE); | 557 pidgin_setup_screenname_autocomplete(dialog->buddy_entry, dialog->account_menu, FALSE); |
558 | 558 |
559 gtk_box_pack_start(GTK_BOX(hbox), dialog->buddy_entry, TRUE, TRUE, 0); | 559 gtk_box_pack_start(GTK_BOX(hbox), dialog->buddy_entry, TRUE, TRUE, 0); |
560 gtk_widget_show(dialog->buddy_entry); | 560 gtk_widget_show(dialog->buddy_entry); |
561 | 561 |
562 g_signal_connect(G_OBJECT(dialog->buddy_entry), "changed", | 562 g_signal_connect(G_OBJECT(dialog->buddy_entry), "changed", |
570 else if (name != NULL) { | 570 else if (name != NULL) { |
571 gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), name); | 571 gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), name); |
572 } | 572 } |
573 | 573 |
574 /* Create the "Pounce When Buddy..." frame. */ | 574 /* Create the "Pounce When Buddy..." frame. */ |
575 frame = gaim_gtk_make_frame(vbox2, _("Pounce When Buddy...")); | 575 frame = pidgin_make_frame(vbox2, _("Pounce When Buddy...")); |
576 | 576 |
577 table = gtk_table_new(5, 2, FALSE); | 577 table = gtk_table_new(5, 2, FALSE); |
578 gtk_container_add(GTK_CONTAINER(frame), table); | 578 gtk_container_add(GTK_CONTAINER(frame), table); |
579 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); | 579 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); |
580 gtk_widget_show(table); | 580 gtk_widget_show(table); |
631 gtk_widget_show(dialog->typed); | 631 gtk_widget_show(dialog->typed); |
632 gtk_widget_show(dialog->stop_typing); | 632 gtk_widget_show(dialog->stop_typing); |
633 gtk_widget_show(dialog->message_recv); | 633 gtk_widget_show(dialog->message_recv); |
634 | 634 |
635 /* Create the "Action" frame. */ | 635 /* Create the "Action" frame. */ |
636 frame = gaim_gtk_make_frame(vbox2, _("Action")); | 636 frame = pidgin_make_frame(vbox2, _("Action")); |
637 | 637 |
638 table = gtk_table_new(3, 5, FALSE); | 638 table = gtk_table_new(3, 5, FALSE); |
639 gtk_container_add(GTK_CONTAINER(frame), table); | 639 gtk_container_add(GTK_CONTAINER(frame), table); |
640 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); | 640 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); |
641 gtk_widget_show(table); | 641 gtk_widget_show(table); |
724 g_signal_connect(G_OBJECT(dialog->message_recv), "clicked", | 724 g_signal_connect(G_OBJECT(dialog->message_recv), "clicked", |
725 G_CALLBACK(message_recv_toggle), | 725 G_CALLBACK(message_recv_toggle), |
726 dialog->send_msg); | 726 dialog->send_msg); |
727 | 727 |
728 g_signal_connect(G_OBJECT(dialog->send_msg), "clicked", | 728 g_signal_connect(G_OBJECT(dialog->send_msg), "clicked", |
729 G_CALLBACK(gaim_gtk_toggle_sensitive), | 729 G_CALLBACK(pidgin_toggle_sensitive), |
730 dialog->send_msg_entry); | 730 dialog->send_msg_entry); |
731 | 731 |
732 g_signal_connect(G_OBJECT(dialog->popup), "clicked", | 732 g_signal_connect(G_OBJECT(dialog->popup), "clicked", |
733 G_CALLBACK(gaim_gtk_toggle_sensitive), | 733 G_CALLBACK(pidgin_toggle_sensitive), |
734 dialog->popup_entry); | 734 dialog->popup_entry); |
735 | 735 |
736 exec_widgets = g_ptr_array_new(); | 736 exec_widgets = g_ptr_array_new(); |
737 g_ptr_array_add(exec_widgets,dialog->exec_cmd_entry); | 737 g_ptr_array_add(exec_widgets,dialog->exec_cmd_entry); |
738 g_ptr_array_add(exec_widgets,dialog->exec_cmd_browse); | 738 g_ptr_array_add(exec_widgets,dialog->exec_cmd_browse); |
739 | 739 |
740 g_signal_connect(G_OBJECT(dialog->exec_cmd), "clicked", | 740 g_signal_connect(G_OBJECT(dialog->exec_cmd), "clicked", |
741 G_CALLBACK(gaim_gtk_toggle_sensitive_array), | 741 G_CALLBACK(pidgin_toggle_sensitive_array), |
742 exec_widgets); | 742 exec_widgets); |
743 g_signal_connect(G_OBJECT(dialog->exec_cmd_browse), "clicked", | 743 g_signal_connect(G_OBJECT(dialog->exec_cmd_browse), "clicked", |
744 G_CALLBACK(filesel), | 744 G_CALLBACK(filesel), |
745 dialog->exec_cmd_entry); | 745 dialog->exec_cmd_entry); |
746 g_object_set_data_full(G_OBJECT(dialog->window), "exec-widgets", | 746 g_object_set_data_full(G_OBJECT(dialog->window), "exec-widgets", |
750 g_ptr_array_add(sound_widgets,dialog->play_sound_entry); | 750 g_ptr_array_add(sound_widgets,dialog->play_sound_entry); |
751 g_ptr_array_add(sound_widgets,dialog->play_sound_browse); | 751 g_ptr_array_add(sound_widgets,dialog->play_sound_browse); |
752 g_ptr_array_add(sound_widgets,dialog->play_sound_test); | 752 g_ptr_array_add(sound_widgets,dialog->play_sound_test); |
753 | 753 |
754 g_signal_connect(G_OBJECT(dialog->play_sound), "clicked", | 754 g_signal_connect(G_OBJECT(dialog->play_sound), "clicked", |
755 G_CALLBACK(gaim_gtk_toggle_sensitive_array), | 755 G_CALLBACK(pidgin_toggle_sensitive_array), |
756 sound_widgets); | 756 sound_widgets); |
757 g_signal_connect(G_OBJECT(dialog->play_sound_browse), "clicked", | 757 g_signal_connect(G_OBJECT(dialog->play_sound_browse), "clicked", |
758 G_CALLBACK(filesel), | 758 G_CALLBACK(filesel), |
759 dialog->play_sound_entry); | 759 dialog->play_sound_entry); |
760 g_signal_connect(G_OBJECT(dialog->play_sound_test), "clicked", | 760 g_signal_connect(G_OBJECT(dialog->play_sound_test), "clicked", |
771 G_CALLBACK(save_pounce_cb), dialog); | 771 G_CALLBACK(save_pounce_cb), dialog); |
772 g_signal_connect(G_OBJECT(dialog->play_sound_entry), "activate", | 772 g_signal_connect(G_OBJECT(dialog->play_sound_entry), "activate", |
773 G_CALLBACK(save_pounce_cb), dialog); | 773 G_CALLBACK(save_pounce_cb), dialog); |
774 | 774 |
775 /* Create the "Options" frame. */ | 775 /* Create the "Options" frame. */ |
776 frame = gaim_gtk_make_frame(vbox2, _("Options")); | 776 frame = pidgin_make_frame(vbox2, _("Options")); |
777 | 777 |
778 table = gtk_table_new(2, 1, FALSE); | 778 table = gtk_table_new(2, 1, FALSE); |
779 gtk_container_add(GTK_CONTAINER(frame), table); | 779 gtk_container_add(GTK_CONTAINER(frame), table); |
780 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); | 780 gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); |
781 gtk_widget_show(table); | 781 gtk_widget_show(table); |
1017 pounces_manager_destroy_cb(GtkWidget *widget, GdkEvent *event, gpointer user_data) | 1017 pounces_manager_destroy_cb(GtkWidget *widget, GdkEvent *event, gpointer user_data) |
1018 { | 1018 { |
1019 PouncesManager *dialog = user_data; | 1019 PouncesManager *dialog = user_data; |
1020 | 1020 |
1021 dialog->window = NULL; | 1021 dialog->window = NULL; |
1022 gaim_gtk_pounces_manager_hide(); | 1022 pidgin_pounces_manager_hide(); |
1023 | 1023 |
1024 return FALSE; | 1024 return FALSE; |
1025 } | 1025 } |
1026 | 1026 |
1027 #if !GTK_CHECK_VERSION(2,2,0) | 1027 #if !GTK_CHECK_VERSION(2,2,0) |
1040 } | 1040 } |
1041 | 1041 |
1042 static void | 1042 static void |
1043 pounces_manager_add_cb(GtkButton *button, gpointer user_data) | 1043 pounces_manager_add_cb(GtkButton *button, gpointer user_data) |
1044 { | 1044 { |
1045 gaim_gtk_pounce_editor_show(NULL, NULL, NULL); | 1045 pidgin_pounce_editor_show(NULL, NULL, NULL); |
1046 } | 1046 } |
1047 | 1047 |
1048 static void | 1048 static void |
1049 pounces_manager_modify_foreach(GtkTreeModel *model, GtkTreePath *path, | 1049 pounces_manager_modify_foreach(GtkTreeModel *model, GtkTreePath *path, |
1050 GtkTreeIter *iter, gpointer user_data) | 1050 GtkTreeIter *iter, gpointer user_data) |
1051 { | 1051 { |
1052 GaimPounce *pounce; | 1052 GaimPounce *pounce; |
1053 | 1053 |
1054 gtk_tree_model_get(model, iter, POUNCES_MANAGER_COLUMN_POUNCE, &pounce, -1); | 1054 gtk_tree_model_get(model, iter, POUNCES_MANAGER_COLUMN_POUNCE, &pounce, -1); |
1055 gaim_gtk_pounce_editor_show(NULL, NULL, pounce); | 1055 pidgin_pounce_editor_show(NULL, NULL, pounce); |
1056 } | 1056 } |
1057 | 1057 |
1058 static void | 1058 static void |
1059 pounces_manager_modify_cb(GtkButton *button, gpointer user_data) | 1059 pounces_manager_modify_cb(GtkButton *button, gpointer user_data) |
1060 { | 1060 { |
1111 } | 1111 } |
1112 | 1112 |
1113 static void | 1113 static void |
1114 pounces_manager_close_cb(GtkButton *button, gpointer user_data) | 1114 pounces_manager_close_cb(GtkButton *button, gpointer user_data) |
1115 { | 1115 { |
1116 gaim_gtk_pounces_manager_hide(); | 1116 pidgin_pounces_manager_hide(); |
1117 } | 1117 } |
1118 | 1118 |
1119 static void | 1119 static void |
1120 pounce_selected_cb(GtkTreeSelection *sel, gpointer user_data) | 1120 pounce_selected_cb(GtkTreeSelection *sel, gpointer user_data) |
1121 { | 1121 { |
1148 gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, POUNCES_MANAGER_COLUMN_POUNCE, &pounce, -1); | 1148 gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, POUNCES_MANAGER_COLUMN_POUNCE, &pounce, -1); |
1149 | 1149 |
1150 if ((pounce != NULL) && (event->button == 1) && | 1150 if ((pounce != NULL) && (event->button == 1) && |
1151 (event->type == GDK_2BUTTON_PRESS)) | 1151 (event->type == GDK_2BUTTON_PRESS)) |
1152 { | 1152 { |
1153 gaim_gtk_pounce_editor_show(NULL, NULL, pounce); | 1153 pidgin_pounce_editor_show(NULL, NULL, pounce); |
1154 return TRUE; | 1154 return TRUE; |
1155 } | 1155 } |
1156 | 1156 |
1157 return FALSE; | 1157 return FALSE; |
1158 } | 1158 } |
1297 | 1297 |
1298 return sw; | 1298 return sw; |
1299 } | 1299 } |
1300 | 1300 |
1301 void | 1301 void |
1302 gaim_gtk_pounces_manager_show(void) | 1302 pidgin_pounces_manager_show(void) |
1303 { | 1303 { |
1304 PouncesManager *dialog; | 1304 PouncesManager *dialog; |
1305 GtkWidget *bbox; | 1305 GtkWidget *bbox; |
1306 GtkWidget *button; | 1306 GtkWidget *button; |
1307 GtkWidget *list; | 1307 GtkWidget *list; |
1389 | 1389 |
1390 gtk_widget_show(win); | 1390 gtk_widget_show(win); |
1391 } | 1391 } |
1392 | 1392 |
1393 void | 1393 void |
1394 gaim_gtk_pounces_manager_hide(void) | 1394 pidgin_pounces_manager_hide(void) |
1395 { | 1395 { |
1396 if (pounces_manager == NULL) | 1396 if (pounces_manager == NULL) |
1397 return; | 1397 return; |
1398 | 1398 |
1399 if (pounces_manager->window != NULL) | 1399 if (pounces_manager->window != NULL) |
1627 | 1627 |
1628 update_pounces(); | 1628 update_pounces(); |
1629 } | 1629 } |
1630 | 1630 |
1631 void * | 1631 void * |
1632 gaim_gtk_pounces_get_handle() { | 1632 pidgin_pounces_get_handle() { |
1633 static int handle; | 1633 static int handle; |
1634 | 1634 |
1635 return &handle; | 1635 return &handle; |
1636 } | 1636 } |
1637 | 1637 |
1638 void | 1638 void |
1639 gaim_gtk_pounces_init(void) | 1639 pidgin_pounces_init(void) |
1640 { | 1640 { |
1641 gaim_pounces_register_handler(GAIM_GTK_UI, pounce_cb, new_pounce, | 1641 gaim_pounces_register_handler(PIDGIN_UI, pounce_cb, new_pounce, |
1642 free_pounce); | 1642 free_pounce); |
1643 | 1643 |
1644 gaim_prefs_add_none("/gaim/gtk/pounces"); | 1644 gaim_prefs_add_none("/gaim/gtk/pounces"); |
1645 gaim_prefs_add_none("/gaim/gtk/pounces/default_actions"); | 1645 gaim_prefs_add_none("/gaim/gtk/pounces/default_actions"); |
1646 gaim_prefs_add_bool("/gaim/gtk/pounces/default_actions/open-window", | 1646 gaim_prefs_add_bool("/gaim/gtk/pounces/default_actions/open-window", |
1656 gaim_prefs_add_none("/gaim/gtk/pounces/dialog"); | 1656 gaim_prefs_add_none("/gaim/gtk/pounces/dialog"); |
1657 gaim_prefs_add_int("/gaim/gtk/pounces/dialog/width", 520); | 1657 gaim_prefs_add_int("/gaim/gtk/pounces/dialog/width", 520); |
1658 gaim_prefs_add_int("/gaim/gtk/pounces/dialog/height", 321); | 1658 gaim_prefs_add_int("/gaim/gtk/pounces/dialog/height", 321); |
1659 | 1659 |
1660 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", | 1660 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", |
1661 gaim_gtk_pounces_get_handle(), | 1661 pidgin_pounces_get_handle(), |
1662 GAIM_CALLBACK(signed_on_off_cb), NULL); | 1662 GAIM_CALLBACK(signed_on_off_cb), NULL); |
1663 gaim_signal_connect(gaim_connections_get_handle(), "signed-off", | 1663 gaim_signal_connect(gaim_connections_get_handle(), "signed-off", |
1664 gaim_gtk_pounces_get_handle(), | 1664 pidgin_pounces_get_handle(), |
1665 GAIM_CALLBACK(signed_on_off_cb), NULL); | 1665 GAIM_CALLBACK(signed_on_off_cb), NULL); |
1666 } | 1666 } |