annotate console/gntui.c @ 15800:76bdff454d6f

Minor cleanup.
author Daniel Atallah <daniel.atallah@gmail.com>
date Sat, 17 Mar 2007 17:47:40 +0000
parents 35fa1d1c4ef2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14558
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
1 /**
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
2 * gaim
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
3 *
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
4 * Gaim is the legal property of its developers, whose names are too numerous
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
6 * source distribution.
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
7 *
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
8 * This program is free software; you can redistribute it and/or modify
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
9 * it under the terms of the GNU General Public License as published by
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
11 * (at your option) any later version.
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
12 *
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
13 * This program is distributed in the hope that it will be useful,
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
16 * GNU General Public License for more details.
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
17 *
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
18 * You should have received a copy of the GNU General Public License
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
19 * along with this program; if not, write to the Free Software
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
81650a27f253 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14405
diff changeset
21 */
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 #include "gntui.h"
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
23
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
24 #include "gntaccount.h"
13887
7d3256b253ec [gaim-migrate @ 16368]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13885
diff changeset
25 #include "gntblist.h"
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
26 #include "gntconn.h"
13887
7d3256b253ec [gaim-migrate @ 16368]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13885
diff changeset
27 #include "gntconv.h"
14405
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
28 #include "gntdebug.h"
15641
35fa1d1c4ef2 Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15503
diff changeset
29 #include "gntft.h"
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
30 #include "gntnotify.h"
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
31 #include "gntplugin.h"
15503
704d40050800 Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14847
diff changeset
32 #include "gntpounce.h"
14405
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
33 #include "gntprefs.h"
13983
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
34 #include "gntrequest.h"
14405
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
35 #include "gntstatus.h"
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
36 #include "internal.h"
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
38 #include <prefs.h>
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
39
14847
d478f3853671 [gaim-migrate @ 17616]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14558
diff changeset
40 void gnt_ui_init()
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
41 {
13966
80cbf6c2d562 [gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13952
diff changeset
42 #ifdef STANDALONE
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
43 gnt_init();
13966
80cbf6c2d562 [gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13952
diff changeset
44 #endif
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
45
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
46 gaim_prefs_add_none("/gaim/gnt");
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
47
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
48 /* Accounts */
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
49 gg_accounts_init();
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
50 gaim_accounts_set_ui_ops(gg_accounts_get_ui_ops());
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
51
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
52 /* Connections */
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
53 gg_connections_init();
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
54 gaim_connections_set_ui_ops(gg_connections_get_ui_ops());
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
55
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
56 /* Initialize the buddy list */
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
57 gg_blist_init();
13857
d341b5ac1a78 [gaim-migrate @ 16316]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13850
diff changeset
58 gaim_blist_set_ui_ops(gg_blist_get_ui_ops());
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
59
13884
eac18261c6f0 [gaim-migrate @ 16364]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13857
diff changeset
60 /* Now the conversations */
13885
582aaa4e287e [gaim-migrate @ 16365]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13884
diff changeset
61 gg_conversation_init();
582aaa4e287e [gaim-migrate @ 16365]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13884
diff changeset
62 gaim_conversations_set_ui_ops(gg_conv_get_ui_ops());
13884
eac18261c6f0 [gaim-migrate @ 16364]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13857
diff changeset
63
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
64 /* Notify */
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
65 gg_notify_init();
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
66 gaim_notify_set_ui_ops(gg_notify_get_ui_ops());
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
67
13983
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
68 gg_request_init();
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
69 gaim_request_set_ui_ops(gg_request_get_ui_ops());
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
70
15503
704d40050800 Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14847
diff changeset
71 gg_pounces_init();
704d40050800 Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14847
diff changeset
72
15641
35fa1d1c4ef2 Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15503
diff changeset
73 gg_xfers_init();
35fa1d1c4ef2 Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15503
diff changeset
74 gaim_xfers_set_ui_ops(gg_xfers_get_ui_ops());
35fa1d1c4ef2 Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15503
diff changeset
75
14405
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
76 gnt_register_action(_("Accounts"), gg_accounts_show_all);
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
77 gnt_register_action(_("Buddy List"), gg_blist_show);
15503
704d40050800 Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14847
diff changeset
78 gnt_register_action(_("Buddy Pounces"), gg_pounces_manager_show);
14405
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
79 gnt_register_action(_("Debug Window"), gg_debug_window_show);
15641
35fa1d1c4ef2 Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15503
diff changeset
80 gnt_register_action(_("File Transfers"), gg_xfer_dialog_show);
14405
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
81 gnt_register_action(_("Plugins"), gg_plugins_show_all);
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
82 gnt_register_action(_("Preferences"), gg_prefs_show_all);
8375ecb6152b [gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14010
diff changeset
83 gnt_register_action(_("Statuses"), gg_savedstatus_show_all);
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
84
13966
80cbf6c2d562 [gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13952
diff changeset
85 #ifdef STANDALONE
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
86
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
87 gg_plugins_save_loaded();
14847
d478f3853671 [gaim-migrate @ 17616]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14558
diff changeset
88 }
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
89
14847
d478f3853671 [gaim-migrate @ 17616]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14558
diff changeset
90 void gnt_ui_uninit()
d478f3853671 [gaim-migrate @ 17616]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14558
diff changeset
91 {
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
92 gaim_accounts_set_ui_ops(NULL);
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
93 gg_accounts_uninit();
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
94
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
95 gaim_connections_set_ui_ops(NULL);
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
96 gg_connections_uninit();
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
97
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
98 gaim_blist_set_ui_ops(NULL);
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
99 gg_blist_uninit();
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
100
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
101 gaim_conversations_set_ui_ops(NULL);
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
102 gg_conversation_uninit();
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
103
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
104 gaim_notify_set_ui_ops(NULL);
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
105 gg_notify_uninit();
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
106
13983
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
107 gaim_request_set_ui_ops(NULL);
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
108 gg_request_uninit();
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
109
15503
704d40050800 Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14847
diff changeset
110 gg_pounces_uninit();
704d40050800 Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14847
diff changeset
111
15641
35fa1d1c4ef2 Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15503
diff changeset
112 gg_xfers_uninit();
35fa1d1c4ef2 Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15503
diff changeset
113 gaim_xfers_set_ui_ops(NULL);
35fa1d1c4ef2 Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15503
diff changeset
114
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
115 gnt_quit();
13966
80cbf6c2d562 [gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13952
diff changeset
116 #endif
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
117 }
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
118