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