comparison console/gntconn.c @ 13952:841a5ffbfee4

[gaim-migrate @ 16500] uiops for GaimConnections. This only shows an error message for a disconnect. uiops for GaimNotify. I have not done the notifications for searchresults yet. That will require multi-column GntTree's, which will also allow for improved email-notifications. I hope to complete it by next week. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 17 Jul 2006 03:45:24 +0000
parents
children 81650a27f253
comparison
equal deleted inserted replaced
13951:614c56622453 13952:841a5ffbfee4
1 #include "notify.h"
2
3 #include "gntconn.h"
4 #include "gntgaim.h"
5
6 static void
7 gg_connection_report_disconnect(GaimConnection *gc, const char *text)
8 {
9 char *act, *primary, *secondary;
10 GaimAccount *account = gaim_connection_get_account(gc);
11
12 act = g_strdup_printf(_("%s (%s)"), gaim_account_get_username(account),
13 gaim_account_get_protocol_name(account));
14
15 primary = g_strdup_printf(_("%s disconnected."), act);
16 secondary = g_strdup_printf(_("%s was disconnected due to the following error:\n%s"),
17 act, text);
18
19 gaim_notify_error(account, _("Connection Error"), primary, secondary);
20
21 g_free(act);
22 g_free(primary);
23 g_free(secondary);
24 }
25
26 static GaimConnectionUiOps ops =
27 {
28 .connect_progress = NULL,
29 .connected = NULL,
30 .disconnected = NULL,
31 .notice = NULL,
32 .report_disconnect = gg_connection_report_disconnect
33 };
34
35 GaimConnectionUiOps *gg_connections_get_ui_ops()
36 {
37 return &ops;
38 }
39
40 void gg_connections_init()
41 {}
42
43 void gg_connections_uninit()
44 {}
45