comparison libpurple/protocols/silc/chat.c @ 20598:285bb637a2b7

Updated hinting to be less invasive
author Gabriel Schulhof <nix@go-nix.ca>
date Sat, 22 Sep 2007 16:19:34 +0000
parents ab6d2763b8d8
children 8c9aad9479c0 75c97543b92a
comparison
equal deleted inserted replaced
20597:591267f6f1d5 20598:285bb637a2b7
299 SilcUInt32 m; 299 SilcUInt32 m;
300 300
301 f = purple_request_fields_get_field(fields, "list"); 301 f = purple_request_fields_get_field(fields, "list");
302 if (!purple_request_field_list_get_selected(f)) { 302 if (!purple_request_field_list_get_selected(f)) {
303 /* Add new public key */ 303 /* Add new public key */
304 purple_request_file(sg->gc, _("Open Public Key..."), NULL, FALSE, 304 purple_request_file)with_hint(sg->gc, _("Open Public Key..."), NULL, FALSE,
305 G_CALLBACK(silcpurple_chat_chpk_add), 305 G_CALLBACK(silcpurple_chat_chpk_add),
306 G_CALLBACK(silcpurple_chat_chpk_cancel), 306 G_CALLBACK(silcpurple_chat_chpk_cancel),
307 purple_connection_get_account(sg->gc), NULL, NULL, sgc); 307 purple_connection_get_account(sg->gc), NULL, NULL, "conversation", sgc);
308 return; 308 return;
309 } 309 }
310 310
311 list = purple_request_field_list_get_items(f); 311 list = purple_request_field_list_get_items(f);
312 chpks = silc_buffer_alloc_size(2); 312 chpks = silc_buffer_alloc_size(2);
439 "then only users whose public keys are listed are able to join.")); 439 "then only users whose public keys are listed are able to join."));
440 440
441 if (!channel_pubkeys || !silc_dlist_count(channel_pubkeys)) { 441 if (!channel_pubkeys || !silc_dlist_count(channel_pubkeys)) {
442 f = purple_request_field_list_new("list", NULL); 442 f = purple_request_field_list_new("list", NULL);
443 purple_request_field_group_add_field(g, f); 443 purple_request_field_group_add_field(g, f);
444 purple_request_fields(sg->gc, _("Channel Authentication"), 444 purple_request_fields_with_hint(sg->gc, _("Channel Authentication"),
445 _("Channel Authentication"), t, fields, 445 _("Channel Authentication"), t, fields,
446 _("Add / Remove"), G_CALLBACK(silcpurple_chat_chpk_cb), 446 _("Add / Remove"), G_CALLBACK(silcpurple_chat_chpk_cb),
447 _("OK"), G_CALLBACK(silcpurple_chat_chauth_ok), 447 _("OK"), G_CALLBACK(silcpurple_chat_chauth_ok),
448 purple_connection_get_account(sg->gc), NULL, NULL, sgc); 448 purple_connection_get_account(sg->gc), NULL, NULL, "conversation", sgc);
449 if (channel_pubkeys) 449 if (channel_pubkeys)
450 silc_dlist_uninit(channel_pubkeys); 450 silc_dlist_uninit(channel_pubkeys);
451 return; 451 return;
452 } 452 }
453 sgc->pubkeys = channel_pubkeys; 453 sgc->pubkeys = channel_pubkeys;
474 silc_free(fingerprint); 474 silc_free(fingerprint);
475 silc_free(babbleprint); 475 silc_free(babbleprint);
476 } 476 }
477 477
478 purple_request_field_list_set_multi_select(f, FALSE); 478 purple_request_field_list_set_multi_select(f, FALSE);
479 purple_request_fields(sg->gc, _("Channel Authentication"), 479 purple_request_fields_with_hint(sg->gc, _("Channel Authentication"),
480 _("Channel Authentication"), t, fields, 480 _("Channel Authentication"), t, fields,
481 _("Add / Remove"), G_CALLBACK(silcpurple_chat_chpk_cb), 481 _("Add / Remove"), G_CALLBACK(silcpurple_chat_chpk_cb),
482 _("OK"), G_CALLBACK(silcpurple_chat_chauth_ok), 482 _("OK"), G_CALLBACK(silcpurple_chat_chauth_ok),
483 purple_connection_get_account(sg->gc), NULL, NULL, sgc); 483 purple_connection_get_account(sg->gc), NULL, NULL, "conversation", sgc);
484 } 484 }
485 485
486 static void 486 static void
487 silcpurple_chat_chauth(PurpleBlistNode *node, gpointer data) 487 silcpurple_chat_chauth(PurpleBlistNode *node, gpointer data)
488 { 488 {
609 purple_request_fields_add_group(fields, g); 609 purple_request_fields_add_group(fields, g);
610 610
611 g_snprintf(tmp, sizeof(tmp), 611 g_snprintf(tmp, sizeof(tmp),
612 _("Please enter the %s channel private group name and passphrase."), 612 _("Please enter the %s channel private group name and passphrase."),
613 p->channel); 613 p->channel);
614 purple_request_fields(gc, _("Add Channel Private Group"), NULL, tmp, fields, 614 purple_request_fields_with_hint(gc, _("Add Channel Private Group"), NULL, tmp, fields,
615 _("Add"), G_CALLBACK(silcpurple_chat_prv_add), 615 _("Add"), G_CALLBACK(silcpurple_chat_prv_add),
616 _("Cancel"), G_CALLBACK(silcpurple_chat_prv_cancel), 616 _("Cancel"), G_CALLBACK(silcpurple_chat_prv_cancel),
617 purple_connection_get_account(gc), NULL, NULL, p); 617 purple_connection_get_account(gc), NULL, NULL, "conversation", p);
618 } 618 }
619 619
620 620
621 /****************************** Channel Modes ********************************/ 621 /****************************** Channel Modes ********************************/
622 622
737 if (!s) 737 if (!s)
738 return; 738 return;
739 s->channel = ch; 739 s->channel = ch;
740 s->sg = sg; 740 s->sg = sg;
741 g_snprintf(tmp, sizeof(tmp), "%d", (int)channel->user_limit); 741 g_snprintf(tmp, sizeof(tmp), "%d", (int)channel->user_limit);
742 purple_request_input(gc, _("User Limit"), NULL, 742 purple_request_input_with_hint(gc, _("User Limit"), NULL,
743 _("Set user limit on channel. Set to zero to reset user limit."), 743 _("Set user limit on channel. Set to zero to reset user limit."),
744 tmp, FALSE, FALSE, NULL, 744 tmp, FALSE, FALSE, NULL,
745 _("OK"), G_CALLBACK(silcpurple_chat_ulimit_cb), 745 _("OK"), G_CALLBACK(silcpurple_chat_ulimit_cb),
746 _("Cancel"), G_CALLBACK(silcpurple_chat_ulimit_cb), 746 _("Cancel"), G_CALLBACK(silcpurple_chat_ulimit_cb),
747 purple_connection_get_account(gc), NULL, NULL, s); 747 purple_connection_get_account(gc), NULL, NULL, "conversation", s);
748 } 748 }
749 749
750 static void 750 static void
751 silcpurple_chat_resettopic(PurpleBlistNode *node, gpointer data) 751 silcpurple_chat_resettopic(PurpleBlistNode *node, gpointer data)
752 { 752 {