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