Mercurial > pidgin.yaz
annotate console/gntui.c @ 14847:d478f3853671
[gaim-migrate @ 17616]
Fix bug #1582629. The terminal should now always go back to normal state after quitting from gaim-text.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 29 Oct 2006 03:43:15 +0000 |
parents | 81650a27f253 |
children | 704d40050800 |
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" |
13952
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
29 #include "gntnotify.h" |
14010
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
30 #include "gntplugin.h" |
14405
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
31 #include "gntprefs.h" |
13983
b7a99d54a5a9
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13966
diff
changeset
|
32 #include "gntrequest.h" |
14405
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
33 #include "gntstatus.h" |
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
34 |
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
35 #include "internal.h" |
13850
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
36 |
14010
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
37 #include <prefs.h> |
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
38 |
14847
d478f3853671
[gaim-migrate @ 17616]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14558
diff
changeset
|
39 void gnt_ui_init() |
13850
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
40 { |
13966
80cbf6c2d562
[gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13952
diff
changeset
|
41 #ifdef STANDALONE |
13850
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
42 gnt_init(); |
13966
80cbf6c2d562
[gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13952
diff
changeset
|
43 #endif |
14010
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
44 |
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
45 gaim_prefs_add_none("/gaim/gnt"); |
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
46 |
13907
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
47 /* Accounts */ |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
48 gg_accounts_init(); |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
49 gaim_accounts_set_ui_ops(gg_accounts_get_ui_ops()); |
13850
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
50 |
13952
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
51 /* Connections */ |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
52 gg_connections_init(); |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
53 gaim_connections_set_ui_ops(gg_connections_get_ui_ops()); |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
54 |
13850
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
55 /* Initialize the buddy list */ |
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
56 gg_blist_init(); |
13857
d341b5ac1a78
[gaim-migrate @ 16316]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13850
diff
changeset
|
57 gaim_blist_set_ui_ops(gg_blist_get_ui_ops()); |
13850
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
58 |
13884
eac18261c6f0
[gaim-migrate @ 16364]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13857
diff
changeset
|
59 /* Now the conversations */ |
13885
582aaa4e287e
[gaim-migrate @ 16365]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13884
diff
changeset
|
60 gg_conversation_init(); |
582aaa4e287e
[gaim-migrate @ 16365]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13884
diff
changeset
|
61 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
|
62 |
13952
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
63 /* Notify */ |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
64 gg_notify_init(); |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
65 gaim_notify_set_ui_ops(gg_notify_get_ui_ops()); |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
66 |
13983
b7a99d54a5a9
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13966
diff
changeset
|
67 gg_request_init(); |
b7a99d54a5a9
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13966
diff
changeset
|
68 gaim_request_set_ui_ops(gg_request_get_ui_ops()); |
b7a99d54a5a9
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13966
diff
changeset
|
69 |
14405
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
70 gnt_register_action(_("Accounts"), gg_accounts_show_all); |
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
71 gnt_register_action(_("Buddy List"), gg_blist_show); |
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
72 gnt_register_action(_("Debug Window"), gg_debug_window_show); |
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
73 gnt_register_action(_("Plugins"), gg_plugins_show_all); |
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
74 gnt_register_action(_("Preferences"), gg_prefs_show_all); |
8375ecb6152b
[gaim-migrate @ 17113]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14010
diff
changeset
|
75 gnt_register_action(_("Statuses"), gg_savedstatus_show_all); |
14010
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
76 |
13966
80cbf6c2d562
[gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13952
diff
changeset
|
77 #ifdef STANDALONE |
14010
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
78 |
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
79 gg_plugins_save_loaded(); |
14847
d478f3853671
[gaim-migrate @ 17616]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14558
diff
changeset
|
80 } |
14010
7573bd40a190
[gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13983
diff
changeset
|
81 |
14847
d478f3853671
[gaim-migrate @ 17616]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14558
diff
changeset
|
82 void gnt_ui_uninit() |
d478f3853671
[gaim-migrate @ 17616]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14558
diff
changeset
|
83 { |
13907
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
84 gaim_accounts_set_ui_ops(NULL); |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
85 gg_accounts_uninit(); |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
86 |
13952
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
87 gaim_connections_set_ui_ops(NULL); |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
88 gg_connections_uninit(); |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
89 |
13907
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
90 gaim_blist_set_ui_ops(NULL); |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
91 gg_blist_uninit(); |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
92 |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
93 gaim_conversations_set_ui_ops(NULL); |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
94 gg_conversation_uninit(); |
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
95 |
13952
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
96 gaim_notify_set_ui_ops(NULL); |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
97 gg_notify_uninit(); |
841a5ffbfee4
[gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13907
diff
changeset
|
98 |
13983
b7a99d54a5a9
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13966
diff
changeset
|
99 gaim_request_set_ui_ops(NULL); |
b7a99d54a5a9
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13966
diff
changeset
|
100 gg_request_uninit(); |
b7a99d54a5a9
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13966
diff
changeset
|
101 |
13907
cc60d0861337
[gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13887
diff
changeset
|
102 gnt_quit(); |
13966
80cbf6c2d562
[gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
13952
diff
changeset
|
103 #endif |
13850
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
104 } |
0e1e59770cb0
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
105 |