Mercurial > pidgin
comparison finch/gntconn.c @ 15822:32c366eeeb99
sed -ie 's/gaim/purple/g'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 07:01:17 +0000 |
parents | 0e3a8505ebbe |
children | 66dff3dfdea6 |
comparison
equal
deleted
inserted
replaced
15821:84b0f9b23ede | 15822:32c366eeeb99 |
---|---|
1 /** | 1 /** |
2 * @file gntconn.c GNT Connection API | 2 * @file gntconn.c GNT Connection API |
3 * @ingroup gntui | 3 * @ingroup gntui |
4 * | 4 * |
5 * gaim | 5 * purple |
6 * | 6 * |
7 * Gaim is the legal property of its developers, whose names are too numerous | 7 * Purple is the legal property of its developers, whose names are too numerous |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | 8 * to list here. Please refer to the COPYRIGHT file distributed with this |
9 * source distribution. | 9 * source distribution. |
10 * | 10 * |
11 * This program is free software; you can redistribute it and/or modify | 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 | 12 * it under the terms of the GNU General Public License as published by |
25 #include "account.h" | 25 #include "account.h" |
26 #include "core.h" | 26 #include "core.h" |
27 #include "request.h" | 27 #include "request.h" |
28 | 28 |
29 #include "gntconn.h" | 29 #include "gntconn.h" |
30 #include "gntgaim.h" | 30 #include "finch.h" |
31 | 31 |
32 static void | 32 static void |
33 finch_connection_report_disconnect(GaimConnection *gc, const char *text) | 33 finch_connection_report_disconnect(PurpleConnection *gc, const char *text) |
34 { | 34 { |
35 char *act, *primary, *secondary; | 35 char *act, *primary, *secondary; |
36 GaimAccount *account = gaim_connection_get_account(gc); | 36 PurpleAccount *account = purple_connection_get_account(gc); |
37 | 37 |
38 act = g_strdup_printf(_("%s (%s)"), gaim_account_get_username(account), | 38 act = g_strdup_printf(_("%s (%s)"), purple_account_get_username(account), |
39 gaim_account_get_protocol_name(account)); | 39 purple_account_get_protocol_name(account)); |
40 | 40 |
41 primary = g_strdup_printf(_("%s disconnected."), act); | 41 primary = g_strdup_printf(_("%s disconnected."), act); |
42 secondary = g_strdup_printf(_("%s was disconnected due to the following error:\n%s"), | 42 secondary = g_strdup_printf(_("%s was disconnected due to the following error:\n%s"), |
43 act, text); | 43 act, text); |
44 | 44 |
45 gaim_request_action(account, _("Connection Error"), primary, secondary, 1, | 45 purple_request_action(account, _("Connection Error"), primary, secondary, 1, |
46 account, 2, | 46 account, 2, |
47 _("OK"), NULL, | 47 _("OK"), NULL, |
48 _("Connect"), | 48 _("Connect"), |
49 GAIM_CALLBACK(gaim_account_connect)); | 49 PURPLE_CALLBACK(purple_account_connect)); |
50 | 50 |
51 g_free(act); | 51 g_free(act); |
52 g_free(primary); | 52 g_free(primary); |
53 g_free(secondary); | 53 g_free(secondary); |
54 } | 54 } |
55 | 55 |
56 static GaimConnectionUiOps ops = | 56 static PurpleConnectionUiOps ops = |
57 { | 57 { |
58 .connect_progress = NULL, | 58 .connect_progress = NULL, |
59 .connected = NULL, | 59 .connected = NULL, |
60 .disconnected = NULL, | 60 .disconnected = NULL, |
61 .notice = NULL, | 61 .notice = NULL, |
62 .report_disconnect = finch_connection_report_disconnect | 62 .report_disconnect = finch_connection_report_disconnect |
63 }; | 63 }; |
64 | 64 |
65 GaimConnectionUiOps *finch_connections_get_ui_ops() | 65 PurpleConnectionUiOps *finch_connections_get_ui_ops() |
66 { | 66 { |
67 return &ops; | 67 return &ops; |
68 } | 68 } |
69 | 69 |
70 void finch_connections_init() | 70 void finch_connections_init() |