Mercurial > pidgin.yaz
annotate finch/gntconn.c @ 17080:e5bed026ccd2
Add a few changes in finch.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 13 May 2007 07:30:53 +0000 |
parents | 08db93bbd798 |
children | 46f2f86e08e4 |
rev | line source |
---|---|
15818 | 1 /** |
2 * @file gntconn.c GNT Connection API | |
16194
0f0832c13fcb
Rename the Doxygen group from gntui to finch and define the finch group
Richard Laager <rlaager@wiktel.com>
parents:
15871
diff
changeset
|
3 * @ingroup finch |
15818 | 4 * |
15871
66dff3dfdea6
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@wiktel.com>
parents:
15823
diff
changeset
|
5 * finch |
15818 | 6 * |
15871
66dff3dfdea6
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@wiktel.com>
parents:
15823
diff
changeset
|
7 * Finch is the legal property of its developers, whose names are too numerous |
15818 | 8 * to list here. Please refer to the COPYRIGHT file distributed with this |
9 * source distribution. | |
10 * | |
11 * This program is free software; you can redistribute it and/or modify | |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
25 #include "account.h" | |
26 #include "core.h" | |
27 #include "request.h" | |
28 | |
29 #include "gntconn.h" | |
15823 | 30 #include "finch.h" |
15818 | 31 |
32 static void | |
15823 | 33 finch_connection_report_disconnect(PurpleConnection *gc, const char *text) |
15818 | 34 { |
35 char *act, *primary, *secondary; | |
15823 | 36 PurpleAccount *account = purple_connection_get_account(gc); |
15818 | 37 |
15823 | 38 act = g_strdup_printf(_("%s (%s)"), purple_account_get_username(account), |
39 purple_account_get_protocol_name(account)); | |
15818 | 40 |
41 primary = g_strdup_printf(_("%s disconnected."), act); | |
42 secondary = g_strdup_printf(_("%s was disconnected due to the following error:\n%s"), | |
43 act, text); | |
44 | |
15823 | 45 purple_request_action(account, _("Connection Error"), primary, secondary, 1, |
16442
08db93bbd798
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
Evan Schoenberg <evan.s@dreskin.net>
parents:
16194
diff
changeset
|
46 account, NULL, NULL, |
15818 | 47 account, 2, |
48 _("OK"), NULL, | |
49 _("Connect"), | |
15823 | 50 PURPLE_CALLBACK(purple_account_connect)); |
15818 | 51 |
52 g_free(act); | |
53 g_free(primary); | |
54 g_free(secondary); | |
55 } | |
56 | |
15823 | 57 static PurpleConnectionUiOps ops = |
15818 | 58 { |
59 .connect_progress = NULL, | |
60 .connected = NULL, | |
61 .disconnected = NULL, | |
62 .notice = NULL, | |
63 .report_disconnect = finch_connection_report_disconnect | |
64 }; | |
65 | |
15823 | 66 PurpleConnectionUiOps *finch_connections_get_ui_ops() |
15818 | 67 { |
68 return &ops; | |
69 } | |
70 | |
71 void finch_connections_init() | |
72 {} | |
73 | |
74 void finch_connections_uninit() | |
75 {} | |
76 |