| |
1 /** |
| |
2 * gaim |
| |
3 * |
| |
4 * Gaim is the legal property of its developers, whose names are too numerous |
| |
5 * to list here. Please refer to the COPYRIGHT file distributed with this |
| |
6 * source distribution. |
| |
7 * |
| |
8 * This program is free software; you can redistribute it and/or modify |
| |
9 * it under the terms of the GNU General Public License as published by |
| |
10 * the Free Software Foundation; either version 2 of the License, or |
| |
11 * (at your option) any later version. |
| |
12 * |
| |
13 * This program is distributed in the hope that it will be useful, |
| |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| |
16 * GNU General Public License for more details. |
| |
17 * |
| |
18 * You should have received a copy of the GNU General Public License |
| |
19 * along with this program; if not, write to the Free Software |
| |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| |
21 */ |
| |
22 #include "gntui.h" |
| |
23 |
| |
24 #include "gntaccount.h" |
| |
25 #include "gntblist.h" |
| |
26 #include "gntconn.h" |
| |
27 #include "gntconv.h" |
| |
28 #include "gntdebug.h" |
| |
29 #include "gntft.h" |
| |
30 #include "gntnotify.h" |
| |
31 #include "gntplugin.h" |
| |
32 #include "gntpounce.h" |
| |
33 #include "gntprefs.h" |
| |
34 #include "gntrequest.h" |
| |
35 #include "gntstatus.h" |
| |
36 #include "internal.h" |
| |
37 |
| |
38 #include <prefs.h> |
| |
39 |
| |
40 void gnt_ui_init() |
| |
41 { |
| |
42 #ifdef STANDALONE |
| |
43 gnt_init(); |
| |
44 #endif |
| |
45 |
| |
46 gaim_prefs_add_none("/gaim/gnt"); |
| |
47 |
| |
48 /* Accounts */ |
| |
49 finch_accounts_init(); |
| |
50 gaim_accounts_set_ui_ops(finch_accounts_get_ui_ops()); |
| |
51 |
| |
52 /* Connections */ |
| |
53 finch_connections_init(); |
| |
54 gaim_connections_set_ui_ops(finch_connections_get_ui_ops()); |
| |
55 |
| |
56 /* Initialize the buddy list */ |
| |
57 finch_blist_init(); |
| |
58 gaim_blist_set_ui_ops(finch_blist_get_ui_ops()); |
| |
59 |
| |
60 /* Now the conversations */ |
| |
61 finch_conversation_init(); |
| |
62 gaim_conversations_set_ui_ops(finch_conv_get_ui_ops()); |
| |
63 |
| |
64 /* Notify */ |
| |
65 finch_notify_init(); |
| |
66 gaim_notify_set_ui_ops(finch_notify_get_ui_ops()); |
| |
67 |
| |
68 finch_request_init(); |
| |
69 gaim_request_set_ui_ops(finch_request_get_ui_ops()); |
| |
70 |
| |
71 finch_pounces_init(); |
| |
72 |
| |
73 finch_xfers_init(); |
| |
74 gaim_xfers_set_ui_ops(finch_xfers_get_ui_ops()); |
| |
75 |
| |
76 gnt_register_action(_("Accounts"), finch_accounts_show_all); |
| |
77 gnt_register_action(_("Buddy List"), finch_blist_show); |
| |
78 gnt_register_action(_("Buddy Pounces"), finch_pounces_manager_show); |
| |
79 gnt_register_action(_("Debug Window"), finch_debug_window_show); |
| |
80 gnt_register_action(_("File Transfers"), finch_xfer_dialog_show); |
| |
81 gnt_register_action(_("Plugins"), finch_plugins_show_all); |
| |
82 gnt_register_action(_("Preferences"), finch_prefs_show_all); |
| |
83 gnt_register_action(_("Statuses"), finch_savedstatus_show_all); |
| |
84 |
| |
85 #ifdef STANDALONE |
| |
86 |
| |
87 finch_plugins_save_loaded(); |
| |
88 } |
| |
89 |
| |
90 void gnt_ui_uninit() |
| |
91 { |
| |
92 gaim_accounts_set_ui_ops(NULL); |
| |
93 finch_accounts_uninit(); |
| |
94 |
| |
95 gaim_connections_set_ui_ops(NULL); |
| |
96 finch_connections_uninit(); |
| |
97 |
| |
98 gaim_blist_set_ui_ops(NULL); |
| |
99 finch_blist_uninit(); |
| |
100 |
| |
101 gaim_conversations_set_ui_ops(NULL); |
| |
102 finch_conversation_uninit(); |
| |
103 |
| |
104 gaim_notify_set_ui_ops(NULL); |
| |
105 finch_notify_uninit(); |
| |
106 |
| |
107 gaim_request_set_ui_ops(NULL); |
| |
108 finch_request_uninit(); |
| |
109 |
| |
110 finch_pounces_uninit(); |
| |
111 |
| |
112 finch_xfers_uninit(); |
| |
113 gaim_xfers_set_ui_ops(NULL); |
| |
114 |
| |
115 gnt_quit(); |
| |
116 #endif |
| |
117 } |
| |
118 |