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