Mercurial > pidgin.yaz
annotate src/gtkdialogs.c @ 12259:0c82fd31628b
[gaim-migrate @ 14561]
Small typo fix.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 29 Nov 2005 22:58:26 +0000 |
parents | af19076ff770 |
children | 3897229ccb33 |
rev | line source |
---|---|
9709 | 1 /* |
10297
ec140184437b
[gaim-migrate @ 11480]
Luke Schierer <lschiere@pidgin.im>
parents:
10266
diff
changeset
|
2 * @file gtkdialogs.c GTK+ Dialogs |
ec140184437b
[gaim-migrate @ 11480]
Luke Schierer <lschiere@pidgin.im>
parents:
10266
diff
changeset
|
3 * @ingroup gtkui |
ec140184437b
[gaim-migrate @ 11480]
Luke Schierer <lschiere@pidgin.im>
parents:
10266
diff
changeset
|
4 * |
9709 | 5 * gaim |
6 * | |
7 * Gaim is the legal property of its developers, whose names are too numerous | |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
10 * | |
11 * This program is free software; you can redistribute it and/or modify | |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
9791 | 25 #include "internal.h" |
26 #include "gtkgaim.h" | |
9709 | 27 |
28 #include "debug.h" | |
29 #include "notify.h" | |
30 #include "prpl.h" | |
31 #include "request.h" | |
32 #include "util.h" | |
33 | |
12232
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
34 #include "gtkblist.h" |
9709 | 35 #include "gtkdialogs.h" |
36 #include "gtkimhtml.h" | |
37 #include "gtkimhtmltoolbar.h" | |
38 #include "gtklog.h" | |
39 #include "gtkutils.h" | |
10297
ec140184437b
[gaim-migrate @ 11480]
Luke Schierer <lschiere@pidgin.im>
parents:
10266
diff
changeset
|
40 #include "gtkstock.h" |
9709 | 41 |
9753 | 42 static GList *dialogwindows = NULL; |
9709 | 43 |
9753 | 44 static GtkWidget *about = NULL; |
9709 | 45 |
9758 | 46 struct developer { |
47 char *name; | |
48 char *role; | |
49 char *email; | |
50 }; | |
51 | |
52 struct translator { | |
53 char *language; | |
54 char *abbr; | |
55 char *name; | |
56 char *email; | |
57 }; | |
58 | |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
59 /* Order: Lead Developer, then Alphabetical by Last Name */ |
9758 | 60 static struct developer developers[] = { |
12248 | 61 {"Sean Egan", N_("lead developer"), "sean.egan@gmail.com"}, |
10508
4cc999cc6718
[gaim-migrate @ 11802]
Luke Schierer <lschiere@pidgin.im>
parents:
10493
diff
changeset
|
62 {"Daniel 'datallah' Atallah", N_("developer"), NULL}, |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
63 {"Ethan 'Paco-Paco' Blanton", N_("developer"), NULL}, |
10095
b28f9be379b3
[gaim-migrate @ 11114]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
9991
diff
changeset
|
64 {"Herman Bloggs", N_("win32 port"), "herman@bluedigits.com"}, |
9758 | 65 {"Mark 'KingAnt' Doliner", N_("developer"), NULL}, |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
66 {"Christian 'ChipX86' Hammond", N_("developer & webmaster"), NULL}, |
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
67 {"Gary 'grim' Kramlich", N_("developer"), NULL}, |
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
68 {"Richard 'rlaager' Laager", N_("developer"), NULL}, |
10370
acd5b7af0409
[gaim-migrate @ 11590]
Luke Schierer <lschiere@pidgin.im>
parents:
10369
diff
changeset
|
69 {"Etan 'deryni' Reisner", N_("developer"), NULL}, |
9758 | 70 {"Tim 'marv' Ringenbach", N_("developer"), NULL}, |
10369
584c792dd15c
[gaim-migrate @ 11588]
Luke Schierer <lschiere@pidgin.im>
parents:
10324
diff
changeset
|
71 {"Luke 'LSchiere' Schierer", N_("support"), "lschiere@users.sf.net"}, |
10116 | 72 {"Stu 'nosnilmot' Tomlinson", N_("developer"), NULL}, |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
73 {"Nathan 'faceprint' Walp", N_("developer"), NULL}, |
9758 | 74 {NULL, NULL, NULL} |
75 }; | |
76 | |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
77 /* Order: Alphabetical by Last Name */ |
10372
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
78 static struct developer patch_writers[] = { |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
79 {"Ka-Hing 'javabsp' Cheung", NULL, NULL}, |
11612
6135c29a514f
[gaim-migrate @ 13885]
Luke Schierer <lschiere@pidgin.im>
parents:
11581
diff
changeset
|
80 {"Sadrul Habib Chowdhury", NULL, NULL}, |
10372
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
81 {"Felipe 'shx' Contreras", NULL, NULL}, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
82 {"Decklin Foster", NULL, NULL}, |
11062
97b6fb28e976
[gaim-migrate @ 13019]
Luke Schierer <lschiere@pidgin.im>
parents:
11036
diff
changeset
|
83 {"Peter 'Bleeter' Lawler", NULL, NULL}, |
10372
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
84 {"Robert 'Robot101' McQueen", NULL, NULL}, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
85 {"Benjamin Miller", NULL, NULL}, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
86 {"Kevin 'SimGuy' Stange", NULL, NULL}, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
87 {NULL, NULL, NULL} |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
88 }; |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
89 |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
90 /* Order: Alphabetical by Last Name */ |
9758 | 91 static struct developer retired_developers[] = { |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
92 {"Jim Duchek", N_("maintainer"), NULL}, |
10615 | 93 {"Rob Flynn", N_("maintainer"), "gaim@robflynn.com"}, |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
94 {"Adam Fritzler", N_("libfaim maintainer"), NULL}, |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
95 {"Syd Logan", N_("hacker and designated driver [lazy bum]"), NULL}, |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
96 {"Jim Seymour", N_("Jabber developer"), NULL}, |
9758 | 97 {"Mark Spencer", N_("original author"), "markster@marko.net"}, |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
98 {"Eric Warmenhoven", N_("lead developer"), "warmenhoven@yahoo.com"}, |
9758 | 99 {NULL, NULL, NULL} |
100 }; | |
101 | |
12065
ff985a2d88b9
[gaim-migrate @ 14360]
Richard Laager <rlaager@wiktel.com>
parents:
12062
diff
changeset
|
102 /* Order: Code, then Alphabetical by Last Name */ |
9758 | 103 static struct translator current_translators[] = { |
10852
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
104 {N_("Bulgarian"), "bg", "Vladimira Girginova", "missing@here.is"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
105 {N_("Bulgarian"), "bg", "Vladimir (Kaladan) Petkov", "vpetkov@i-space.org"}, |
11868
4b71193448b3
[gaim-migrate @ 14159]
Luke Schierer <lschiere@pidgin.im>
parents:
11863
diff
changeset
|
106 {N_("Bosnian"), "bs", "Lejla Hadzialic", "lejlah@gmail.com"}, |
10852
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
107 {N_("Catalan"), "ca", "Josep Puigdemont", "tradgnome@softcatala.org"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
108 {N_("Czech"), "cs", "Miloslav Trmac", "mitr@volny.cz"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
109 {N_("Danish"), "da", "Morten Brix Pedersen", "morten@wtf.dk"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
110 {N_("German"), "de", "Björn Voigt", "bjoern@cs.tu-berlin.de"}, |
12062
4ccd528ffe6e
[gaim-migrate @ 14357]
Richard Laager <rlaager@wiktel.com>
parents:
12061
diff
changeset
|
111 {N_("Greek"), "el", "Katsaloulis Panayotis", "panayotis@panayotis.com"}, |
11931
62777e2a9f00
[gaim-migrate @ 14222]
Richard Laager <rlaager@wiktel.com>
parents:
11930
diff
changeset
|
112 {N_("Greek"), "el", "Bouklis Panos", "panos@echidna-band.com"}, |
10852
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
113 {N_("Australian English"), "en_AU", "Peter Lawler", "trans@six-by-nine.com.au"}, |
12062
4ccd528ffe6e
[gaim-migrate @ 14357]
Richard Laager <rlaager@wiktel.com>
parents:
12061
diff
changeset
|
114 {N_("Canadian English"), "en_CA", "Adam Weinberger", "adamw@gnome.org"}, |
10852
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
115 {N_("British English"), "en_GB", "Luke Ross", "lukeross@sys3175.co.uk"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
116 {N_("Spanish"), "es", "Javier Fernández-Sanguino Peña", "jfs@debian.org"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
117 {N_("Finnish"), "fi", "Arto Alakulju", "arto@alakulju.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
118 {N_("French"), "fr", "Éric Boumaour", "zongo_fr@users.sourceforge.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
119 {N_("Hebrew"), "he", "Pavel Bibergal", "cyberkm203@hotmail.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
120 {N_("Hindi"), "hi", "Ravishankar Shrivastava", "raviratlami@yahoo.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
121 {N_("Hungarian"), "hu", "Zoltan Sutto", "sutto.zoltan@rutinsoft.hu"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
122 {N_("Italian"), "it", "Claudio Satriano", "satriano@na.infn.it"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
123 {N_("Japanese"), "ja", "Takashi Aihana", "aihana@gnome.gr.jp"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
124 {N_("Georgian"), "ka", "Temuri Doghonadze", "admin@security.gov.ge"}, |
12062
4ccd528ffe6e
[gaim-migrate @ 14357]
Richard Laager <rlaager@wiktel.com>
parents:
12061
diff
changeset
|
125 {N_("Korean"), "ko", "Kyung-uk Son", "vvs740@chol.com"}, |
11874
f3a0cefa8e35
[gaim-migrate @ 14165]
Luke Schierer <lschiere@pidgin.im>
parents:
11868
diff
changeset
|
126 {N_("Kurdish"), "ku", "Erdal Ronahi, Amed Ç. Jiyan", "erdal.ronahi@gmail.com,amedcj@hotmail.com"}, |
12062
4ccd528ffe6e
[gaim-migrate @ 14357]
Richard Laager <rlaager@wiktel.com>
parents:
12061
diff
changeset
|
127 {N_("Lithuanian"), "lt", "Gediminas Čičinskas", "gediminas@parok.lt"}, |
4ccd528ffe6e
[gaim-migrate @ 14357]
Richard Laager <rlaager@wiktel.com>
parents:
12061
diff
changeset
|
128 {N_("Macedonian"), "mk", "Tomislav Markovski", "herrera@users.sf.net"}, |
10852
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
129 {N_("Dutch, Flemish"), "nl", "Vincent van Adrighem", "V.vanAdrighem@dirck.mine.nu"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
130 {N_("Norwegian"), "no", "Petter Johan Olsen", "petter.olsen@cc.uit.no"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
131 {N_("Polish"), "pl", "Emil Nowak", "emil5@go2.pl"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
132 {N_("Polish"), "pl", "Krzysztof Foltman", "krzysztof@foltman.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
133 {N_("Portuguese"), "pt", "Duarte Henriques", "duarte_henriques@myrealbox.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
134 {N_("Portuguese-Brazil"), "pt_BR", "Maurício de Lemos Rodrigues Collares Neto", "mauricioc@gmail.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
135 {N_("Romanian"), "ro", "Mişu Moldovan", "dumol@go.ro"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
136 {N_("Russian"), "ru", "Dmitry Beloglazov", "dmaa@users.sf.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
137 {N_("Serbian"), "sr", "Danilo Šegan", "dsegan@gmx.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
138 {N_("Serbian"), "sr", "Aleksandar Urosevic", "urke@users.sourceforge.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
139 {N_("Slovenian"), "sl", "Matjaz Horvat", "matjaz@owca.info"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
140 {N_("Swedish"), "sv", "Tore Lundqvist", "tlt@mima.x.se"}, |
11465
448bc3b8eb63
[gaim-migrate @ 13705]
Luke Schierer <lschiere@pidgin.im>
parents:
11338
diff
changeset
|
141 {N_("Telugu"), "te", "Mr. Subbaramaih", "info.gist@cdac.in"}, |
10852
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
142 {N_("Vietnamese"), "vi", N_("T.M.Thanh and the Gnome-Vi Team"), "gnomevi-list@lists.sf.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
143 {N_("Simplified Chinese"), "zh_CN", "Funda Wang", "fundawang@linux.net.cn"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
144 {N_("Traditional Chinese"), "zh_TW", "Ambrose C. Li", "acli@ada.dhs.org"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
145 {N_("Traditional Chinese"), "zh_TW", "Paladin R. Liu", "paladin@ms1.hinet.net"}, |
9758 | 146 {NULL, NULL, NULL, NULL} |
147 }; | |
148 | |
149 | |
150 static struct translator past_translators[] = { | |
151 {N_("Amharic"), "am", "Daniel Yacob", NULL}, | |
152 {N_("Bulgarian"), "bg", "Hristo Todorov", NULL}, | |
153 {N_("Catalan"), "ca", "JM Pérez Cáncer", NULL}, | |
10131 | 154 {N_("Catalan"), "ca", "Robert Millan", NULL}, |
9758 | 155 {N_("Czech"), "cs", "Honza Král", NULL}, |
156 {N_("German"), "de", "Daniel Seifert, Karsten Weiss", NULL}, | |
157 {N_("Spanish"), "es", "Amaya Rodrigo, Alejandro G Villar, Nicolás Lichtmaier, JM Pérez Cáncer", NULL}, | |
158 {N_("Finnish"), "fi", "Tero Kuusela", NULL}, | |
159 {N_("French"), "fr", "Sébastien François, Stéphane Pontier, Stéphane Wirtel, Loïc Jeannin", NULL}, | |
160 {N_("Italian"), "it", "Salvatore di Maggio", NULL}, | |
161 {N_("Japanese"), "ja", "Ryosuke Kutsuna, Taku Yasui, Junichi Uekawa", NULL}, | |
162 {N_("Korean"), "ko", "Sang-hyun S, A Ho-seok Lee", NULL}, | |
163 {N_("Polish"), "pl", "Przemysław Sułek", NULL}, | |
12062
4ccd528ffe6e
[gaim-migrate @ 14357]
Richard Laager <rlaager@wiktel.com>
parents:
12061
diff
changeset
|
164 {N_("Russian"), "ru", "Alexandre Prokoudine", NULL}, |
9758 | 165 {N_("Russian"), "ru", "Sergey Volozhanin", NULL}, |
166 {N_("Slovak"), "sk", "Daniel Režný", NULL}, | |
167 {N_("Swedish"), "sv", "Christian Rose", NULL}, | |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
168 {N_("Simplified Chinese"), "zh_CN", "Hashao, Rocky S. Lee", NULL}, |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
169 {N_("Traditional Chinese"), "zh_TW", "Hashao, Rocky S. Lee", NULL}, |
9758 | 170 {NULL, NULL, NULL, NULL} |
171 }; | |
172 | |
9730 | 173 void |
174 gaim_gtkdialogs_destroy_all() | |
9709 | 175 { |
9753 | 176 while (dialogwindows) { |
177 gtk_widget_destroy(dialogwindows->data); | |
178 dialogwindows = g_list_remove(dialogwindows, dialogwindows->data); | |
179 } | |
180 } | |
181 | |
182 static void destroy_about() | |
183 { | |
184 if (about != NULL) | |
185 gtk_widget_destroy(about); | |
186 about = NULL; | |
187 } | |
188 | |
189 void gaim_gtkdialogs_about(GtkWidget *w, void *data) | |
190 { | |
191 GtkWidget *hbox; | |
192 GtkWidget *vbox; | |
193 GtkWidget *logo; | |
10175 | 194 GtkWidget *frame; |
9753 | 195 GtkWidget *text; |
196 GtkWidget *bbox; | |
197 GtkWidget *button; | |
198 GtkTextIter iter; | |
9758 | 199 GString *str; |
200 int i; | |
10266 | 201 AtkObject *obj; |
9753 | 202 |
203 if (about != NULL) { | |
204 gtk_window_present(GTK_WINDOW(about)); | |
205 return; | |
206 } | |
207 | |
208 GAIM_DIALOG(about); | |
209 gtk_window_set_default_size(GTK_WINDOW(about), 450, -1); | |
210 gtk_window_set_title(GTK_WINDOW(about), _("About Gaim")); | |
211 gtk_window_set_role(GTK_WINDOW(about), "about"); | |
212 gtk_window_set_resizable(GTK_WINDOW(about), TRUE); | |
9778 | 213 gtk_window_set_default_size(GTK_WINDOW(about), 340, 550); /* Golden ratio in da hizzy */ |
9753 | 214 |
11243 | 215 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); |
216 gtk_container_set_border_width(GTK_CONTAINER(hbox), GAIM_HIG_BORDER); | |
9753 | 217 gtk_container_add(GTK_CONTAINER(about), hbox); |
218 | |
11243 | 219 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); |
9753 | 220 gtk_container_add(GTK_CONTAINER(hbox), vbox); |
221 | |
222 logo = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO)); | |
10266 | 223 obj = gtk_widget_get_accessible(logo); |
224 atk_object_set_description(obj, "Gaim " VERSION); | |
9753 | 225 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); |
226 | |
10175 | 227 frame = gaim_gtk_create_imhtml(FALSE, &text, NULL); |
10522 | 228 gtk_imhtml_set_format_functions(GTK_IMHTML(text), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY); |
10175 | 229 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
9753 | 230 |
9758 | 231 str = g_string_sized_new(4096); |
9753 | 232 |
10153 | 233 g_string_append(str, |
9758 | 234 _("Gaim is a modular messaging client capable of using " |
235 "AIM, MSN, Yahoo!, Jabber, ICQ, IRC, SILC, " | |
236 "Novell GroupWise, Napster, Zephyr, and Gadu-Gadu " | |
237 "all at once. It is written using " | |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
238 "GTK+ and is licensed under the GNU GPL.<BR><BR>")); |
9753 | 239 |
9758 | 240 g_string_append(str, "<FONT SIZE=\"4\">URL:</FONT> <A HREF=\"" |
241 GAIM_WEBSITE "\">" GAIM_WEBSITE "</A><BR/><BR/>"); | |
10493 | 242 #ifdef _WIN32 |
243 g_string_append_printf(str, _("<FONT SIZE=\"4\">IRC:</FONT> " | |
244 "#wingaim on irc.freenode.net<BR><BR>")); | |
245 #else | |
9758 | 246 g_string_append_printf(str, _("<FONT SIZE=\"4\">IRC:</FONT> " |
247 "#gaim on irc.freenode.net<BR><BR>")); | |
10493 | 248 #endif |
9753 | 249 |
250 /* Active Developers */ | |
9758 | 251 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
252 _("Active Developers")); | |
253 for (i = 0; developers[i].name != NULL; i++) { | |
254 if (developers[i].email != NULL) { | |
10116 | 255 g_string_append_printf(str, " %s (%s) <<a href=\"mailto:%s\">%s</a>><br/>", |
9758 | 256 developers[i].name, _(developers[i].role), |
257 developers[i].email, developers[i].email); | |
258 } else { | |
259 g_string_append_printf(str, " %s (%s)<br/>", | |
260 developers[i].name, _(developers[i].role)); | |
261 } | |
262 } | |
263 g_string_append(str, "<BR/>"); | |
9709 | 264 |
9753 | 265 /* Crazy Patch Writers */ |
9758 | 266 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
267 _("Crazy Patch Writers")); | |
10372
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
268 for (i = 0; patch_writers[i].name != NULL; i++) { |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
269 if (patch_writers[i].email != NULL) { |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
270 g_string_append_printf(str, " %s <<a href=\"mailto:%s\">%s</a>><br/>", |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
271 patch_writers[i].name, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
272 patch_writers[i].email, patch_writers[i].email); |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
273 } else { |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
274 g_string_append_printf(str, " %s<br/>", |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
275 patch_writers[i].name); |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
276 } |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
277 } |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
278 g_string_append(str, "<BR/>"); |
9753 | 279 |
280 /* Retired Developers */ | |
9758 | 281 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
282 _("Retired Developers")); | |
283 for (i = 0; retired_developers[i].name != NULL; i++) { | |
284 if (retired_developers[i].email != NULL) { | |
10116 | 285 g_string_append_printf(str, " %s (%s) <<a href=\"mailto:%s\">%s</a>><br/>", |
9758 | 286 retired_developers[i].name, _(retired_developers[i].role), |
287 retired_developers[i].email, retired_developers[i].email); | |
288 } else { | |
289 g_string_append_printf(str, " %s (%s)<br/>", | |
290 retired_developers[i].name, _(retired_developers[i].role)); | |
291 } | |
292 } | |
293 g_string_append(str, "<BR/>"); | |
9753 | 294 |
295 /* Current Translators */ | |
9758 | 296 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
297 _("Current Translators")); | |
298 for (i = 0; current_translators[i].language != NULL; i++) { | |
299 if (current_translators[i].email != NULL) { | |
10116 | 300 g_string_append_printf(str, " <b>%s (%s)</b> - %s <<a href=\"mailto:%s\">%s</a>><br/>", |
9758 | 301 _(current_translators[i].language), |
302 current_translators[i].abbr, | |
303 _(current_translators[i].name), | |
304 current_translators[i].email, | |
305 current_translators[i].email); | |
306 } else { | |
307 g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>", | |
308 _(current_translators[i].language), | |
309 current_translators[i].abbr, | |
310 _(current_translators[i].name)); | |
311 } | |
312 } | |
313 g_string_append(str, "<BR/>"); | |
9753 | 314 |
315 /* Past Translators */ | |
9758 | 316 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
317 _("Past Translators")); | |
318 for (i = 0; past_translators[i].language != NULL; i++) { | |
319 if (past_translators[i].email != NULL) { | |
10116 | 320 g_string_append_printf(str, " <b>%s (%s)</b> - %s <<a href=\"mailto:%s\">%s</a>><br/>", |
9758 | 321 _(past_translators[i].language), |
322 past_translators[i].abbr, | |
323 _(past_translators[i].name), | |
324 past_translators[i].email, | |
325 past_translators[i].email); | |
326 } else { | |
327 g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>", | |
328 _(past_translators[i].language), | |
329 past_translators[i].abbr, | |
330 _(past_translators[i].name)); | |
331 } | |
332 } | |
333 g_string_append(str, "<BR/>"); | |
334 | |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
335 g_string_append_printf(str, "<FONT SIZE=\"4\">%s</FONT><br/>", _("Debugging Information")); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
336 |
10411 | 337 /* The following primarly intented for user/developer interaction and thus |
338 ought not be translated */ | |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
339 |
10411 | 340 #ifdef CONFIG_ARGS /* win32 build doesn't use configure */ |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
341 g_string_append(str, " <b>Arguments to <i>./configure</i>:</b> " CONFIG_ARGS "<br/>"); |
10411 | 342 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
343 |
10411 | 344 #ifdef DEBUG |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
345 g_string_append(str, " <b>Print debugging messages:</b> Yes<br/>"); |
10411 | 346 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
347 g_string_append(str, " <b>Print debugging messages:</b> No<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
348 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
349 |
10411 | 350 #ifdef ENABLE_BINRELOC |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
351 g_string_append(str, " <b>Binary relocation:</b> Enabled<br/>"); |
10411 | 352 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
353 g_string_append(str, " <b>Binary relocation:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
354 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
355 |
10411 | 356 #ifdef GAIM_PLUGINS |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
357 g_string_append(str, " <b>Plugins:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
358 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
359 g_string_append(str, " <b>Plugins:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
360 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
361 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
362 #ifdef HAVE_SSL |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
363 g_string_append(str, " <b>SSL:</b> Gaim was compiled with SSL support.<br/>"); |
10411 | 364 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
365 g_string_append(str, " <b>SSL:</b> Gaim was <b><i>NOT</i></b> compiled with any SSL support!<br/>"); |
10411 | 366 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
367 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
368 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
369 g_string_append(str, "<br/> <b>Library Support</b><br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
370 |
10835 | 371 #ifdef HAVE_EVOLUTION_ADDRESSBOOK |
372 g_string_append_printf(str, " <b>Evolution Addressbook:</b> Enabled<br/>"); | |
10411 | 373 #else |
10835 | 374 g_string_append_printf(str, " <b>Evolution Addressbook:</b> Disabled<br/>"); |
10411 | 375 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
376 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
377 #ifdef USE_GTKSPELL |
12067
e859c1663a27
[gaim-migrate @ 14362]
Richard Laager <rlaager@wiktel.com>
parents:
12065
diff
changeset
|
378 g_string_append(str, " <b>GtkSpell:</b> Enabled<br/>"); |
10411 | 379 #else |
12067
e859c1663a27
[gaim-migrate @ 14362]
Richard Laager <rlaager@wiktel.com>
parents:
12065
diff
changeset
|
380 g_string_append(str, " <b>GtkSpell:</b> Disabled<br/>"); |
10411 | 381 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
382 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
383 #ifdef HAVE_GNUTLS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
384 g_string_append(str, " <b>GnuTLS:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
385 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
386 g_string_append(str, " <b>GnuTLS:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
387 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
388 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
389 #ifdef USE_AO |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
390 g_string_append(str, " <b>libao:</b> Enabled<br/>"); |
10411 | 391 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
392 g_string_append(str, " <b>libao:</b> Disabled<br/>"); |
10411 | 393 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
394 |
12122
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
395 #ifdef ENABLE_MONO |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
396 g_string_append(str, " <b>Mono:</b> Enabled<br/>"); |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
397 #else |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
398 g_string_append(str, " <b>Mono:</b> Disabled<br/>"); |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
399 #endif |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
400 |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
401 #ifdef HAVE_NSS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
402 g_string_append(str, " <b>Network Security Services (NSS):</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
403 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
404 g_string_append(str, " <b>Network Security Services (NSS):</b> Disabled<br/>"); |
10411 | 405 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
406 |
12122
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
407 #ifdef HAVE_PERL |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
408 g_string_append(str, " <b>Perl:</b> Enabled<br/>"); |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
409 #else |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
410 g_string_append(str, " <b>Perl:</b> Disabled<br/>"); |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
411 #endif |
9b06c216e362
[gaim-migrate @ 14422]
Richard Laager <rlaager@wiktel.com>
parents:
12120
diff
changeset
|
412 |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
413 #ifdef HAVE_STARTUP_NOTIFICATION |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
414 g_string_append(str, " <b>Startup Notification:</b> Enabled<br/>"); |
10411 | 415 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
416 g_string_append(str, " <b>Startup Notification:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
417 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
418 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
419 #ifdef HAVE_TCL |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
420 g_string_append(str, " <b>Tcl:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
421 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
422 g_string_append(str, " <b>Tcl:</b> Disabled<br/>"); |
10411 | 423 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
424 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
425 #ifdef HAVE_TK |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
426 g_string_append(str, " <b>Tk:</b> Enabled<br/>"); |
10411 | 427 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
428 g_string_append(str, " <b>Tk:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
429 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
430 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
431 #ifdef USE_SM |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
432 g_string_append(str, " <b>X Session Management:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
433 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
434 g_string_append(str, " <b>X Session Management:</b> Disabled<br/>"); |
10411 | 435 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
436 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
437 #ifdef USE_SCREENSAVER |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
438 g_string_append(str, " <b>XScreenSaver:</b> Enabled<br/>"); |
10411 | 439 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
440 g_string_append(str, " <b>XScreenSaver:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
441 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
442 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
443 #ifdef LIBZEPHYR_EXT |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
444 g_string_append(str, " <b>Zephyr library (libzephyr):</b> External<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
445 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
446 g_string_append(str, " <b>Zephyr library (libzephyr):</b> Not External<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
447 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
448 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
449 #ifdef ZEPHYR_USES_KERBEROS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
450 g_string_append(str, " <b>Zephyr uses Kerberos:</b> Yes<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
451 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
452 g_string_append(str, " <b>Zephyr uses Kerberos:</b> No<br/>"); |
10411 | 453 #endif |
454 | |
455 /* End of not to be translated section */ | |
456 | |
9758 | 457 gtk_imhtml_append_text(GTK_IMHTML(text), str->str, GTK_IMHTML_NO_SCROLL); |
458 g_string_free(str, TRUE); | |
9753 | 459 |
460 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
461 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
10153 | 462 |
9753 | 463 /* Close Button */ |
464 bbox = gtk_hbutton_box_new(); | |
465 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
466 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | |
467 | |
468 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
469 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
470 | |
471 g_signal_connect_swapped(G_OBJECT(button), "clicked", | |
472 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
473 g_signal_connect(G_OBJECT(about), "destroy", | |
474 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
475 | |
476 /* this makes the sizes not work? */ | |
477 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); | |
478 gtk_widget_grab_default(button); | |
479 | |
480 /* Let's give'em something to talk about -- woah woah woah */ | |
481 gtk_widget_show_all(about); | |
482 gtk_window_present(GTK_WINDOW(about)); | |
9709 | 483 } |
484 | |
9730 | 485 static void |
486 gaim_gtkdialogs_im_cb(gpointer data, GaimRequestFields *fields) | |
9709 | 487 { |
9730 | 488 GaimAccount *account; |
489 const char *username; | |
9709 | 490 |
9730 | 491 account = gaim_request_fields_get_account(fields, "account"); |
492 username = gaim_request_fields_get_string(fields, "screenname"); | |
9709 | 493 |
9730 | 494 gaim_gtkdialogs_im_with_user(account, username); |
9709 | 495 } |
496 | |
9730 | 497 void |
498 gaim_gtkdialogs_im(void) | |
9709 | 499 { |
9730 | 500 GaimRequestFields *fields; |
501 GaimRequestFieldGroup *group; | |
502 GaimRequestField *field; | |
9709 | 503 |
9730 | 504 fields = gaim_request_fields_new(); |
9709 | 505 |
9730 | 506 group = gaim_request_field_group_new(NULL); |
507 gaim_request_fields_add_group(fields, group); | |
9709 | 508 |
10668 | 509 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
510 gaim_request_field_set_type_hint(field, "screenname"); | |
9730 | 511 gaim_request_field_set_required(field, TRUE); |
512 gaim_request_field_group_add_field(group, field); | |
9709 | 513 |
9730 | 514 field = gaim_request_field_account_new("account", _("_Account"), NULL); |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
515 gaim_request_field_set_type_hint(field, "account"); |
9730 | 516 gaim_request_field_set_visible(field, |
517 (gaim_connections_get_all() != NULL && | |
518 gaim_connections_get_all()->next != NULL)); | |
519 gaim_request_field_set_required(field, TRUE); | |
520 gaim_request_field_group_add_field(group, field); | |
521 | |
522 gaim_request_fields(gaim_get_blist(), _("New Instant Message"), | |
523 NULL, | |
10668 | 524 _("Please enter the screen name or alias of the person " |
525 "you would like to IM."), | |
9730 | 526 fields, |
527 _("OK"), G_CALLBACK(gaim_gtkdialogs_im_cb), | |
528 _("Cancel"), NULL, | |
529 NULL); | |
9709 | 530 } |
531 | |
9730 | 532 void |
533 gaim_gtkdialogs_im_with_user(GaimAccount *account, const char *username) | |
9709 | 534 { |
9730 | 535 GaimConversation *conv; |
9709 | 536 |
9753 | 537 g_return_if_fail(account != NULL); |
538 g_return_if_fail(username != NULL); | |
539 | |
11338 | 540 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, username, account); |
9709 | 541 |
9730 | 542 if (conv == NULL) |
11338 | 543 conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); |
9709 | 544 |
12116
e75ef7aa913e
[gaim-migrate @ 14416]
Luke Schierer <lschiere@pidgin.im>
parents:
12088
diff
changeset
|
545 gaim_gtkconv_present_conversation(conv); |
9709 | 546 } |
547 | |
9730 | 548 static gboolean |
549 gaim_gtkdialogs_ee(const char *ee) | |
9709 | 550 { |
551 GtkWidget *window; | |
552 GtkWidget *hbox; | |
553 GtkWidget *label; | |
10219 | 554 GtkWidget *img; |
9709 | 555 gchar *norm = gaim_strreplace(ee, "rocksmyworld", ""); |
556 | |
557 label = gtk_label_new(NULL); | |
558 if (!strcmp(norm, "zilding")) | |
559 gtk_label_set_markup(GTK_LABEL(label), | |
560 "<span weight=\"bold\" size=\"large\" foreground=\"purple\">Amazing! Simply Amazing!</span>"); | |
561 else if (!strcmp(norm, "robflynn")) | |
562 gtk_label_set_markup(GTK_LABEL(label), | |
563 "<span weight=\"bold\" size=\"large\" foreground=\"#1f6bad\">Pimpin\' Penguin Style! *Waddle Waddle*</span>"); | |
564 else if (!strcmp(norm, "flynorange")) | |
565 gtk_label_set_markup(GTK_LABEL(label), | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
566 "<span weight=\"bold\" size=\"large\" foreground=\"blue\">You should be me. I'm so cute!</span>"); |
9709 | 567 else if (!strcmp(norm, "ewarmenhoven")) |
568 gtk_label_set_markup(GTK_LABEL(label), | |
569 "<span weight=\"bold\" size=\"large\" foreground=\"orange\">Now that's what I like!</span>"); | |
570 else if (!strcmp(norm, "markster97")) | |
571 gtk_label_set_markup(GTK_LABEL(label), | |
572 "<span weight=\"bold\" size=\"large\" foreground=\"brown\">Ahh, and excellent choice!</span>"); | |
573 else if (!strcmp(norm, "seanegn")) | |
574 gtk_label_set_markup(GTK_LABEL(label), | |
575 "<span weight=\"bold\" size=\"large\" foreground=\"#009900\">Everytime you click my name, an angel gets its wings.</span>"); | |
576 else if (!strcmp(norm, "chipx86")) | |
577 gtk_label_set_markup(GTK_LABEL(label), | |
578 "<span weight=\"bold\" size=\"large\" foreground=\"red\">This sunflower seed taste like pizza.</span>"); | |
579 else if (!strcmp(norm, "markdoliner")) | |
580 gtk_label_set_markup(GTK_LABEL(label), | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
581 "<span weight=\"bold\" size=\"large\" foreground=\"#6364B1\">Hey! I was in that tumbleweed!</span>"); |
9709 | 582 else if (!strcmp(norm, "lschiere")) |
583 gtk_label_set_markup(GTK_LABEL(label), | |
584 "<span weight=\"bold\" size=\"large\" foreground=\"gray\">I'm not anything.</span>"); | |
585 g_free(norm); | |
586 | |
587 if (strlen(gtk_label_get_label(GTK_LABEL(label))) <= 0) | |
588 return FALSE; | |
589 | |
590 window = gtk_dialog_new_with_buttons(GAIM_ALERT_TITLE, NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL); | |
591 gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_OK); | |
592 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(gtk_widget_destroy), NULL); | |
593 | |
11243 | 594 gtk_container_set_border_width (GTK_CONTAINER(window), GAIM_HIG_BOX_SPACE); |
9709 | 595 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); |
596 gtk_dialog_set_has_separator(GTK_DIALOG(window), FALSE); | |
11243 | 597 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(window)->vbox), GAIM_HIG_BORDER); |
598 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(window)->vbox), GAIM_HIG_BOX_SPACE); | |
9709 | 599 |
11243 | 600 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); |
9709 | 601 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), hbox); |
10219 | 602 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_COOL, gtk_icon_size_from_name(GAIM_ICON_SIZE_DIALOG_COOL)); |
9709 | 603 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); |
604 | |
605 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
606 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
607 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
608 | |
609 gtk_widget_show_all(window); | |
610 return TRUE; | |
611 } | |
612 | |
613 static void | |
9730 | 614 gaim_gtkdialogs_info_cb(gpointer data, GaimRequestFields *fields) |
9709 | 615 { |
616 char *username; | |
617 gboolean found = FALSE; | |
618 GaimAccount *account; | |
619 | |
620 account = gaim_request_fields_get_account(fields, "account"); | |
621 | |
622 username = g_strdup(gaim_normalize(account, | |
623 gaim_request_fields_get_string(fields, "screenname"))); | |
624 | |
625 if (username != NULL && gaim_str_has_suffix(username, "rocksmyworld")) | |
9730 | 626 found = gaim_gtkdialogs_ee(username); |
9709 | 627 |
628 if (!found && username != NULL && *username != '\0' && account != NULL) | |
629 serv_get_info(gaim_account_get_connection(account), username); | |
630 | |
631 g_free(username); | |
632 } | |
633 | |
634 void | |
9714 | 635 gaim_gtkdialogs_info(void) |
9709 | 636 { |
637 GaimRequestFields *fields; | |
638 GaimRequestFieldGroup *group; | |
639 GaimRequestField *field; | |
640 | |
641 fields = gaim_request_fields_new(); | |
642 | |
643 group = gaim_request_field_group_new(NULL); | |
644 gaim_request_fields_add_group(fields, group); | |
645 | |
10668 | 646 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
9709 | 647 gaim_request_field_set_type_hint(field, "screenname"); |
648 gaim_request_field_set_required(field, TRUE); | |
649 gaim_request_field_group_add_field(group, field); | |
650 | |
651 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
652 gaim_request_field_set_type_hint(field, "account"); |
9709 | 653 gaim_request_field_set_visible(field, |
654 (gaim_connections_get_all() != NULL && | |
655 gaim_connections_get_all()->next != NULL)); | |
656 gaim_request_field_set_required(field, TRUE); | |
657 gaim_request_field_group_add_field(group, field); | |
658 | |
659 gaim_request_fields(gaim_get_blist(), _("Get User Info"), | |
660 NULL, | |
10668 | 661 _("Please enter the screen name or alias of the person " |
662 "whose info you would like to view."), | |
9709 | 663 fields, |
9730 | 664 _("OK"), G_CALLBACK(gaim_gtkdialogs_info_cb), |
9709 | 665 _("Cancel"), NULL, |
666 NULL); | |
667 } | |
668 | |
669 static void | |
9730 | 670 gaim_gtkdialogs_log_cb(gpointer data, GaimRequestFields *fields) |
9709 | 671 { |
672 char *username; | |
673 GaimAccount *account; | |
674 | |
675 account = gaim_request_fields_get_account(fields, "account"); | |
676 | |
677 username = g_strdup(gaim_normalize(account, | |
678 gaim_request_fields_get_string(fields, "screenname"))); | |
679 | |
12232
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
680 if (username != NULL && *username != '\0' && account != NULL) |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
681 { |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
682 GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
683 GdkCursor *cursor = gdk_cursor_new(GDK_WATCH); |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
684 |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
685 gdk_window_set_cursor(gtkblist->window->window, cursor); |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
686 gdk_cursor_unref(cursor); |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
687 while (gtk_events_pending()) |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
688 gtk_main_iteration(); |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
689 |
9917 | 690 gaim_gtk_log_show(GAIM_LOG_IM, username, account); |
9709 | 691 |
12232
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
692 gdk_window_set_cursor(gtkblist->window->window, NULL); |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
693 } |
375f1f3817a8
[gaim-migrate @ 14534]
Richard Laager <rlaager@wiktel.com>
parents:
12122
diff
changeset
|
694 |
9709 | 695 g_free(username); |
696 } | |
697 | |
9991 | 698 /* |
699 * TODO - This needs to deal with logs of all types, not just IM logs. | |
700 */ | |
9709 | 701 void |
9714 | 702 gaim_gtkdialogs_log(void) |
9709 | 703 { |
704 GaimRequestFields *fields; | |
705 GaimRequestFieldGroup *group; | |
706 GaimRequestField *field; | |
707 | |
708 fields = gaim_request_fields_new(); | |
709 | |
710 group = gaim_request_field_group_new(NULL); | |
711 gaim_request_fields_add_group(fields, group); | |
712 | |
10668 | 713 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
11025 | 714 gaim_request_field_set_type_hint(field, "screenname-all"); |
9709 | 715 gaim_request_field_set_required(field, TRUE); |
716 gaim_request_field_group_add_field(group, field); | |
717 | |
718 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
719 gaim_request_field_set_type_hint(field, "account"); |
9709 | 720 gaim_request_field_account_set_show_all(field, TRUE); |
721 gaim_request_field_set_visible(field, | |
722 (gaim_accounts_get_all() != NULL && | |
723 gaim_accounts_get_all()->next != NULL)); | |
724 gaim_request_field_set_required(field, TRUE); | |
725 gaim_request_field_group_add_field(group, field); | |
726 | |
11025 | 727 gaim_request_fields(gaim_get_blist(), _("View User Log"), |
9709 | 728 NULL, |
10668 | 729 _("Please enter the screen name or alias of the person " |
730 "whose log you would like to view."), | |
9709 | 731 fields, |
9730 | 732 _("OK"), G_CALLBACK(gaim_gtkdialogs_log_cb), |
9709 | 733 _("Cancel"), NULL, |
734 NULL); | |
735 } | |
736 | |
9730 | 737 static void |
738 gaim_gtkdialogs_alias_contact_cb(GaimContact *contact, const char *new_alias) | |
739 { | |
740 gaim_contact_set_alias(contact, new_alias); | |
741 } | |
742 | |
743 void | |
744 gaim_gtkdialogs_alias_contact(GaimContact *contact) | |
745 { | |
9753 | 746 g_return_if_fail(contact != NULL); |
747 | |
9730 | 748 gaim_request_input(NULL, _("Alias Contact"), NULL, |
749 _("Enter an alias for this contact."), | |
750 contact->alias, FALSE, FALSE, NULL, | |
751 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_contact_cb), | |
752 _("Cancel"), NULL, contact); | |
753 } | |
754 | |
755 static void | |
756 gaim_gtkdialogs_alias_buddy_cb(GaimBuddy *buddy, const char *new_alias) | |
757 { | |
758 gaim_blist_alias_buddy(buddy, new_alias); | |
759 serv_alias_buddy(buddy); | |
760 } | |
761 | |
762 void | |
9753 | 763 gaim_gtkdialogs_alias_buddy(GaimBuddy *buddy) |
9730 | 764 { |
9753 | 765 gchar *secondary; |
766 | |
767 g_return_if_fail(buddy != NULL); | |
768 | |
769 secondary = g_strdup_printf(_("Enter an alias for %s."), buddy->name); | |
9730 | 770 |
771 gaim_request_input(NULL, _("Alias Buddy"), NULL, | |
9753 | 772 secondary, buddy->alias, FALSE, FALSE, NULL, |
9730 | 773 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_buddy_cb), |
9753 | 774 _("Cancel"), NULL, buddy); |
9730 | 775 |
776 g_free(secondary); | |
777 } | |
778 | |
779 static void | |
780 gaim_gtkdialogs_alias_chat_cb(GaimChat *chat, const char *new_alias) | |
9709 | 781 { |
782 gaim_blist_alias_chat(chat, new_alias); | |
783 } | |
784 | |
785 void | |
9730 | 786 gaim_gtkdialogs_alias_chat(GaimChat *chat) |
9709 | 787 { |
9753 | 788 g_return_if_fail(chat != NULL); |
789 | |
9709 | 790 gaim_request_input(NULL, _("Alias Chat"), NULL, |
791 _("Enter an alias for this chat."), | |
792 chat->alias, FALSE, FALSE, NULL, | |
9730 | 793 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_chat_cb), |
9709 | 794 _("Cancel"), NULL, chat); |
795 } | |
796 | |
797 static void | |
9753 | 798 gaim_gtkdialogs_remove_contact_cb(GaimContact *contact) |
9709 | 799 { |
9730 | 800 GaimBlistNode *bnode, *cnode; |
801 GaimGroup *group; | |
802 | |
803 cnode = (GaimBlistNode *)contact; | |
804 group = (GaimGroup*)cnode->parent; | |
805 for (bnode = cnode->child; bnode; bnode = bnode->next) { | |
806 GaimBuddy *buddy = (GaimBuddy*)bnode; | |
807 if (gaim_account_is_connected(buddy->account)) | |
11643 | 808 gaim_account_remove_buddy(buddy->account, buddy, group); |
9730 | 809 } |
810 gaim_blist_remove_contact(contact); | |
811 } | |
812 | |
813 void | |
814 gaim_gtkdialogs_remove_contact(GaimContact *contact) | |
815 { | |
816 GaimBuddy *buddy = gaim_contact_get_priority_buddy(contact); | |
817 | |
9753 | 818 g_return_if_fail(contact != NULL); |
819 g_return_if_fail(buddy != NULL); | |
9730 | 820 |
821 if (((GaimBlistNode*)contact)->child == (GaimBlistNode*)buddy && | |
822 !((GaimBlistNode*)buddy)->next) { | |
823 gaim_gtkdialogs_remove_buddy(buddy); | |
824 } else { | |
10324 | 825 gchar *text; |
826 text = g_strdup_printf( | |
827 ngettext( | |
828 "You are about to remove the contact containing %s " | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
829 "and %d other buddy from your buddy list. Do you " |
10324 | 830 "want to continue?", |
831 "You are about to remove the contact containing %s " | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
832 "and %d other buddies from your buddy list. Do you " |
10324 | 833 "want to continue?", contact->totalsize - 1), |
834 buddy->name, contact->totalsize - 1); | |
9730 | 835 |
10222 | 836 gaim_request_action(contact, NULL, _("Remove Contact"), text, 0, contact, 2, |
9753 | 837 _("Remove Contact"), G_CALLBACK(gaim_gtkdialogs_remove_contact_cb), |
9730 | 838 _("Cancel"), NULL); |
839 | |
840 g_free(text); | |
841 } | |
9709 | 842 } |
843 | |
844 void | |
9753 | 845 gaim_gtkdialogs_remove_group_cb(GaimGroup *group) |
9709 | 846 { |
9730 | 847 GaimBlistNode *cnode, *bnode; |
848 | |
849 cnode = ((GaimBlistNode*)group)->child; | |
850 | |
851 while (cnode) { | |
852 if (GAIM_BLIST_NODE_IS_CONTACT(cnode)) { | |
853 bnode = cnode->child; | |
854 cnode = cnode->next; | |
855 while (bnode) { | |
856 GaimBuddy *buddy; | |
857 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { | |
858 GaimConversation *conv; | |
859 buddy = (GaimBuddy*)bnode; | |
860 bnode = bnode->next; | |
11338 | 861 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, |
10246 | 862 buddy->name, |
863 buddy->account); | |
9730 | 864 if (gaim_account_is_connected(buddy->account)) { |
11643 | 865 gaim_account_remove_buddy(buddy->account, buddy, group); |
9730 | 866 gaim_blist_remove_buddy(buddy); |
867 if (conv) | |
868 gaim_conversation_update(conv, | |
869 GAIM_CONV_UPDATE_REMOVE); | |
870 } | |
871 } else { | |
872 bnode = bnode->next; | |
873 } | |
874 } | |
875 } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { | |
876 GaimChat *chat = (GaimChat *)cnode; | |
877 cnode = cnode->next; | |
878 if (gaim_account_is_connected(chat->account)) | |
879 gaim_blist_remove_chat(chat); | |
880 } else { | |
881 cnode = cnode->next; | |
882 } | |
883 } | |
884 | |
885 gaim_blist_remove_group(group); | |
886 } | |
887 | |
888 void | |
889 gaim_gtkdialogs_remove_group(GaimGroup *group) | |
890 { | |
9753 | 891 gchar *text; |
892 | |
893 g_return_if_fail(group != NULL); | |
894 | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
895 text = g_strdup_printf(_("You are about to remove the group %s and all its members from your buddy list. Do you want to continue?"), |
9753 | 896 group->name); |
9730 | 897 |
10222 | 898 gaim_request_action(group, NULL, _("Remove Group"), text, 0, group, 2, |
9753 | 899 _("Remove Group"), G_CALLBACK(gaim_gtkdialogs_remove_group_cb), |
9730 | 900 _("Cancel"), NULL); |
901 | |
902 g_free(text); | |
9709 | 903 } |
904 | |
10246 | 905 /* XXX - Some of this should be moved into the core, methinks. */ |
9709 | 906 static void |
9753 | 907 gaim_gtkdialogs_remove_buddy_cb(GaimBuddy *buddy) |
9709 | 908 { |
9730 | 909 GaimGroup *group; |
910 GaimConversation *conv; | |
911 gchar *name; | |
912 GaimAccount *account; | |
913 | |
12088 | 914 group = gaim_buddy_get_group(buddy); |
9730 | 915 name = g_strdup(buddy->name); /* b->name is a crasher after remove_buddy */ |
916 account = buddy->account; | |
917 | |
9753 | 918 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name); |
11643 | 919 /* TODO - Should remove from blist first... then call gaim_account_remove_buddy()? */ |
920 gaim_account_remove_buddy(buddy->account, buddy, group); | |
9730 | 921 gaim_blist_remove_buddy(buddy); |
922 | |
11338 | 923 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account); |
9730 | 924 if (conv != NULL) |
925 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | |
926 | |
927 g_free(name); | |
9709 | 928 } |
929 | |
930 void | |
9730 | 931 gaim_gtkdialogs_remove_buddy(GaimBuddy *buddy) |
9709 | 932 { |
9753 | 933 gchar *text; |
9730 | 934 |
9753 | 935 g_return_if_fail(buddy != NULL); |
9730 | 936 |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
937 text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), |
9753 | 938 buddy->name); |
9730 | 939 |
10222 | 940 gaim_request_action(buddy, NULL, _("Remove Buddy"), text, 0, buddy, 2, |
9753 | 941 _("Remove Buddy"), G_CALLBACK(gaim_gtkdialogs_remove_buddy_cb), |
9730 | 942 _("Cancel"), NULL); |
943 | |
944 g_free(text); | |
945 } | |
9709 | 946 |
9730 | 947 static void |
9753 | 948 gaim_gtkdialogs_remove_chat_cb(GaimChat *chat) |
9730 | 949 { |
9918 | 950 char *name = NULL; |
10167 | 951 GaimAccount *account; |
9918 | 952 GaimConversation *conv = NULL; |
953 | |
10167 | 954 account = chat->account; |
955 | |
956 if (GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name != NULL) | |
957 name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); | |
9918 | 958 |
9730 | 959 gaim_blist_remove_chat(chat); |
9918 | 960 |
961 if (name != NULL) { | |
11338 | 962 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, name, account); |
9918 | 963 g_free(name); |
964 } | |
965 | |
966 if (conv != NULL) | |
967 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | |
9730 | 968 } |
9709 | 969 |
9730 | 970 void |
971 gaim_gtkdialogs_remove_chat(GaimChat *chat) | |
972 { | |
10877
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
973 const gchar *name; |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
974 gchar *text; |
9753 | 975 |
976 g_return_if_fail(chat != NULL); | |
9730 | 977 |
10877
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
978 name = gaim_chat_get_name(chat); |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
979 text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"), |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
980 name ? name : ""); |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
981 |
10222 | 982 gaim_request_action(chat, NULL, _("Remove Chat"), text, 0, chat, 2, |
9753 | 983 _("Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb), |
9730 | 984 _("Cancel"), NULL); |
985 | |
986 g_free(text); | |
9709 | 987 } |