Mercurial > pidgin.yaz
changeset 18586:4fda1fc6d7cf
Add an 'auto-join' checkbox in the 'Add Chat' dialog, thanks to fmoo's
suggestion in #pidgin. (No new strings)
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 23 Jul 2007 20:54:16 +0000 |
parents | 823946ddd527 |
children | 81dcdd73dff0 |
files | finch/gntblist.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntblist.c Sat Jul 21 06:22:15 2007 +0000 +++ b/finch/gntblist.c Mon Jul 23 20:54:16 2007 +0000 @@ -354,11 +354,13 @@ PurpleGroup *grp; GHashTable *hash = NULL; PurpleConnection *gc; + gboolean autojoin; account = purple_request_fields_get_account(allfields, "account"); name = purple_request_fields_get_string(allfields, "name"); alias = purple_request_fields_get_string(allfields, "alias"); group = purple_request_fields_get_string(allfields, "group"); + autojoin = purple_request_fields_get_bool(allfields, "autojoin"); if (!purple_account_is_connected(account) || !name || !*name) return; @@ -380,6 +382,9 @@ } purple_blist_add_chat(chat, grp, NULL); purple_blist_alias_chat(chat, alias); + purple_blist_node_set_bool((PurpleBlistNode*)chat, "gnt-autojoin", autojoin); + if (autojoin) + serv_join_chat(chat->account->gc, chat->components); } } @@ -407,6 +412,9 @@ field = purple_request_field_string_new("group", _("Group"), grp ? grp->name : NULL, FALSE); purple_request_field_group_add_field(group, field); + field = purple_request_field_bool_new("autojoin", _("Auto-join"), FALSE); + purple_request_field_group_add_field(group, field); + purple_request_fields(NULL, _("Add Chat"), NULL, _("You can edit more information from the context menu later."), fields, _("Add"), G_CALLBACK(add_chat_cb), _("Cancel"), NULL,