Convert Finch plugins to libsoup.
[pidgin-git.git] / finch / gntui.c
blob89e9eaa4790597a5de1a4ab9bb626c74aa39c243
1 /*
2 * finch
4 * Finch 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.
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #include "finch.h"
24 #include <internal.h>
26 #include "gntui.h"
28 #include "gntaccount.h"
29 #include "gntblist.h"
30 #include "gntconn.h"
31 #include "gntconv.h"
32 #include "gntdebug.h"
33 #include "gntxfer.h"
34 #include "gntlog.h"
35 #include "gntmedia.h"
36 #include "gntnotify.h"
37 #include "gntplugin.h"
38 #include "gntpounce.h"
39 #include "gntprefs.h"
40 #include "gntrequest.h"
41 #include "gntroomlist.h"
42 #include "gntstatus.h"
43 #include "gntsound.h"
45 #include <prefs.h>
47 void finch_ui_init()
49 #ifdef STANDALONE
50 #ifdef _WIN32 /* TODO: don't change it when using FHS under win32 */
51 gnt_set_config_dir(purple_user_dir());
52 #endif /* _WIN32 */
54 gnt_init();
55 #endif /* STANDALONE */
57 purple_prefs_add_none("/purple/gnt");
59 /* Accounts */
60 finch_accounts_init();
61 purple_accounts_set_ui_ops(finch_accounts_get_ui_ops());
63 /* Connections */
64 finch_connections_init();
65 purple_connections_set_ui_ops(finch_connections_get_ui_ops());
67 /* Initialize the buddy list */
68 finch_blist_init();
69 purple_blist_set_ui(FINCH_TYPE_BUDDY_LIST);
71 /* Initialize sound */
72 purple_sound_set_ui_ops(finch_sound_get_ui_ops());
74 /* Now the conversations */
75 finch_conversation_init();
76 purple_conversations_set_ui_ops(finch_conv_get_ui_ops());
78 /* Notify */
79 finch_notify_init();
80 purple_notify_set_ui_ops(finch_notify_get_ui_ops());
82 /* Request */
83 finch_request_init();
84 purple_request_set_ui_ops(finch_request_get_ui_ops());
86 /* Pounce */
87 finch_pounces_init();
89 /* Log */
90 finch_log_init();
92 /* File transfer */
93 finch_xfers_init();
94 purple_xfers_set_ui_ops(finch_xfers_get_ui_ops());
96 /* Roomlist */
97 finch_roomlist_init();
98 purple_roomlist_set_ui_ops(finch_roomlist_get_ui_ops());
100 /* Media */
101 finch_media_manager_init();
103 gnt_register_action(_("Accounts"), finch_accounts_show_all);
104 gnt_register_action(_("Buddy List"), finch_blist_show);
105 gnt_register_action(_("Buddy Pounces"), finch_pounces_manager_show);
106 gnt_register_action(_("Debug Window"), finch_debug_window_show);
107 gnt_register_action(_("File Transfers"), finch_xfer_dialog_show);
108 gnt_register_action(_("Plugins"), finch_plugins_show_all);
109 gnt_register_action(_("Room List"), finch_roomlist_show_all);
110 gnt_register_action(_("Sounds"), finch_sounds_show_all);
111 gnt_register_action(_("Preferences"), finch_prefs_show_all);
112 gnt_register_action(_("Keyring settings"), finch_prefs_show_keyring);
113 gnt_register_action(_("Statuses"), finch_savedstatus_show_all);
115 #ifdef STANDALONE
118 void finch_ui_uninit()
120 purple_accounts_set_ui_ops(NULL);
121 finch_accounts_uninit();
123 purple_connections_set_ui_ops(NULL);
124 finch_connections_uninit();
126 purple_blist_set_ui(G_TYPE_INVALID);
127 finch_blist_uninit();
129 purple_conversations_set_ui_ops(NULL);
130 finch_conversation_uninit();
132 purple_notify_set_ui_ops(NULL);
133 finch_notify_uninit();
135 purple_request_set_ui_ops(NULL);
136 finch_request_uninit();
138 finch_pounces_uninit();
140 finch_log_uninit();
142 finch_xfers_uninit();
143 purple_xfers_set_ui_ops(NULL);
145 finch_roomlist_uninit();
146 purple_roomlist_set_ui_ops(NULL);
148 #ifdef USE_VV
149 finch_media_manager_uninit();
150 #endif
152 gnt_quit();
154 #ifdef _WIN32
155 gnt_set_config_dir(NULL);
156 #endif /* _WIN32 */
157 #endif /* STANDALONE */