Mercurial > pidgin
annotate finch/gntui.c @ 19621:cab5dd8da484
Handle the case where gethostname() fails or returns a null hostname.
This really shouldn't happen on a properly configured system, but its
failure also should not prevent us from being able to log into IRC.
Fixes #2932
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Mon, 03 Sep 2007 23:15:11 +0000 |
parents | bc23f7323ed2 |
children | 6e9a16deb5b1 |
rev | line source |
---|---|
15817 | 1 /** |
15870
66dff3dfdea6
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
2 * finch |
15817 | 3 * |
15870
66dff3dfdea6
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
4 * Finch is the legal property of its developers, whose names are too numerous |
15817 | 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 */ | |
18210
b8572b937c09
#include reorganizations to allow compiling with glib < 2.8 using the
Stu Tomlinson <stu@nosnilmot.com>
parents:
15870
diff
changeset
|
22 #include "internal.h" |
b8572b937c09
#include reorganizations to allow compiling with glib < 2.8 using the
Stu Tomlinson <stu@nosnilmot.com>
parents:
15870
diff
changeset
|
23 |
15817 | 24 #include "gntui.h" |
25 | |
26 #include "gntaccount.h" | |
27 #include "gntblist.h" | |
19516
e1751162ab1f
Add certificate UI in finch.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19117
diff
changeset
|
28 #include "gntcertmgr.h" |
15817 | 29 #include "gntconn.h" |
30 #include "gntconv.h" | |
31 #include "gntdebug.h" | |
32 #include "gntft.h" | |
33 #include "gntnotify.h" | |
34 #include "gntplugin.h" | |
35 #include "gntpounce.h" | |
36 #include "gntprefs.h" | |
37 #include "gntrequest.h" | |
38 #include "gntstatus.h" | |
19100 | 39 #include "gntsound.h" |
15817 | 40 |
41 #include <prefs.h> | |
42 | |
43 void gnt_ui_init() | |
44 { | |
45 #ifdef STANDALONE | |
46 gnt_init(); | |
47 #endif | |
48 | |
15822 | 49 purple_prefs_add_none("/purple/gnt"); |
15817 | 50 |
51 /* Accounts */ | |
52 finch_accounts_init(); | |
15822 | 53 purple_accounts_set_ui_ops(finch_accounts_get_ui_ops()); |
15817 | 54 |
55 /* Connections */ | |
56 finch_connections_init(); | |
15822 | 57 purple_connections_set_ui_ops(finch_connections_get_ui_ops()); |
15817 | 58 |
59 /* Initialize the buddy list */ | |
60 finch_blist_init(); | |
15822 | 61 purple_blist_set_ui_ops(finch_blist_get_ui_ops()); |
15817 | 62 |
19100 | 63 /* Initialize sound */ |
64 purple_sound_set_ui_ops(finch_sound_get_ui_ops()); | |
65 | |
15817 | 66 /* Now the conversations */ |
67 finch_conversation_init(); | |
15822 | 68 purple_conversations_set_ui_ops(finch_conv_get_ui_ops()); |
15817 | 69 |
70 /* Notify */ | |
71 finch_notify_init(); | |
15822 | 72 purple_notify_set_ui_ops(finch_notify_get_ui_ops()); |
15817 | 73 |
74 finch_request_init(); | |
15822 | 75 purple_request_set_ui_ops(finch_request_get_ui_ops()); |
15817 | 76 |
77 finch_pounces_init(); | |
78 | |
79 finch_xfers_init(); | |
15822 | 80 purple_xfers_set_ui_ops(finch_xfers_get_ui_ops()); |
15817 | 81 |
82 gnt_register_action(_("Accounts"), finch_accounts_show_all); | |
83 gnt_register_action(_("Buddy List"), finch_blist_show); | |
84 gnt_register_action(_("Buddy Pounces"), finch_pounces_manager_show); | |
19516
e1751162ab1f
Add certificate UI in finch.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19117
diff
changeset
|
85 gnt_register_action(_("Certificates"), finch_certmgr_show); |
15817 | 86 gnt_register_action(_("Debug Window"), finch_debug_window_show); |
87 gnt_register_action(_("File Transfers"), finch_xfer_dialog_show); | |
88 gnt_register_action(_("Plugins"), finch_plugins_show_all); | |
19117
907c41608ada
Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents:
19109
diff
changeset
|
89 gnt_register_action(_("Sounds"), finch_sounds_show_all); |
15817 | 90 gnt_register_action(_("Preferences"), finch_prefs_show_all); |
91 gnt_register_action(_("Statuses"), finch_savedstatus_show_all); | |
92 | |
93 #ifdef STANDALONE | |
94 | |
95 finch_plugins_save_loaded(); | |
96 } | |
97 | |
98 void gnt_ui_uninit() | |
99 { | |
15822 | 100 purple_accounts_set_ui_ops(NULL); |
15817 | 101 finch_accounts_uninit(); |
102 | |
15822 | 103 purple_connections_set_ui_ops(NULL); |
15817 | 104 finch_connections_uninit(); |
105 | |
15822 | 106 purple_blist_set_ui_ops(NULL); |
15817 | 107 finch_blist_uninit(); |
108 | |
15822 | 109 purple_conversations_set_ui_ops(NULL); |
15817 | 110 finch_conversation_uninit(); |
111 | |
15822 | 112 purple_notify_set_ui_ops(NULL); |
15817 | 113 finch_notify_uninit(); |
114 | |
15822 | 115 purple_request_set_ui_ops(NULL); |
15817 | 116 finch_request_uninit(); |
117 | |
118 finch_pounces_uninit(); | |
119 | |
120 finch_xfers_uninit(); | |
15822 | 121 purple_xfers_set_ui_ops(NULL); |
15817 | 122 |
123 gnt_quit(); | |
124 #endif | |
125 } | |
126 |