Mercurial > pidgin
annotate src/gtkdialogs.c @ 12116:e75ef7aa913e
[gaim-migrate @ 14416]
" This patch implements a replacement for the queuing
system from 1.x. It also obsoletes a previous patch
[#1338873] I submitted to prioritize the unseen states
in gtk conversations.
The attached envelope.png is ripped from the
msgunread.png already included in gaim. It should be
dropped in the pixmaps directory (Makefile.am is
updated accordingly in this patch).
The two separate queuing preferences from 1.x, queuing
messages while away and queuing all new messages (from
docklet), are replaced with a single 3-way preference
for conversations. The new preference is "Hide new IM
conversations". This preference can be set to never,
away and always.
When a gtk conversation is created, it may be placed in
a hidden conversation window instead of being placed
normally. This decision is based upon the preference
and possibly the away state of the account the
conversation is being created for. This *will* effect
conversations the user explicitly requests to be
created, so in these cases the caller must be sure to
present the conversation to the user, using
gaim_gtkconv_present_conversation(). This is done
already in gtkdialogs.c which handles creating
conversations requested by the user from gaim proper
(menus, double-clicking on budy in blist, etc.).
The main advantage to not queuing messages is that the
conversations exist, the message is written to the
conversation (and logged if appropriate) and the unseen
state is set on the conversation. This means no
additional features are needed to track whether there
are queued messages or not, just use the unseen state
on conversations.
Since conversations may not be visible (messages
"queued"), gaim proper needs some notification that
there are messages waiting. I opted for a menutray icon
that shows up when an im conversation has an unseen
message. Clicking this icon will focus (and show if
hidden) the first conversation with an unseen message.
This is essentially the same behavior of the docklet in
cvs right now, except that the icon is only visible
when there is a conversation with an unread message.
The api that is added is flexible enough to allow
either the docklet or the new blist menutray icon to be
visible for conversations of any/all types and for
unseen messages >= any state. Currently they are set to
only IM conversations and only unseen states >= TEXT
(system messages and no log messages will not trigger
blinking the docklet or showing the blist tray icon),
but these could be made preferences relatively easily
in the future. Other plugins could probably benefit as
well: gaim_gtk_conversations_get_first_unseen().
There is probably some limit to comment size, so I'll
stop rambling now. If anyone has more
questions/comments, catch me in #gaim, here or on
gaim-devel."
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 16 Nov 2005 18:17:01 +0000 |
parents | 980c877bd238 |
children | b8c5b67a5475 |
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 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
394 #ifdef HAVE_NSS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
395 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
|
396 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
397 g_string_append(str, " <b>Network Security Services (NSS):</b> Disabled<br/>"); |
10411 | 398 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
399 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
400 #ifdef HAVE_STARTUP_NOTIFICATION |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
401 g_string_append(str, " <b>Startup Notification:</b> Enabled<br/>"); |
10411 | 402 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
403 g_string_append(str, " <b>Startup Notification:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
404 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
405 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
406 #ifdef HAVE_TCL |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
407 g_string_append(str, " <b>Tcl:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
408 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
409 g_string_append(str, " <b>Tcl:</b> Disabled<br/>"); |
10411 | 410 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
411 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
412 #ifdef HAVE_TK |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
413 g_string_append(str, " <b>Tk:</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>Tk:</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 USE_SM |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
419 g_string_append(str, " <b>X Session Management:</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>X Session Management:</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 USE_SCREENSAVER |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
425 g_string_append(str, " <b>XScreenSaver:</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>XScreenSaver:</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 LIBZEPHYR_EXT |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
431 g_string_append(str, " <b>Zephyr library (libzephyr):</b> External<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>Zephyr library (libzephyr):</b> Not External<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
434 #endif |
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 ZEPHYR_USES_KERBEROS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
437 g_string_append(str, " <b>Zephyr uses Kerberos:</b> Yes<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
438 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
439 g_string_append(str, " <b>Zephyr uses Kerberos:</b> No<br/>"); |
10411 | 440 #endif |
441 | |
442 /* End of not to be translated section */ | |
443 | |
9758 | 444 gtk_imhtml_append_text(GTK_IMHTML(text), str->str, GTK_IMHTML_NO_SCROLL); |
445 g_string_free(str, TRUE); | |
9753 | 446 |
447 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
448 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
10153 | 449 |
9753 | 450 /* Close Button */ |
451 bbox = gtk_hbutton_box_new(); | |
452 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
453 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | |
454 | |
455 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
456 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
457 | |
458 g_signal_connect_swapped(G_OBJECT(button), "clicked", | |
459 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
460 g_signal_connect(G_OBJECT(about), "destroy", | |
461 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
462 | |
463 /* this makes the sizes not work? */ | |
464 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); | |
465 gtk_widget_grab_default(button); | |
466 | |
467 /* Let's give'em something to talk about -- woah woah woah */ | |
468 gtk_widget_show_all(about); | |
469 gtk_window_present(GTK_WINDOW(about)); | |
9709 | 470 } |
471 | |
9730 | 472 static void |
473 gaim_gtkdialogs_im_cb(gpointer data, GaimRequestFields *fields) | |
9709 | 474 { |
9730 | 475 GaimAccount *account; |
476 const char *username; | |
9709 | 477 |
9730 | 478 account = gaim_request_fields_get_account(fields, "account"); |
479 username = gaim_request_fields_get_string(fields, "screenname"); | |
9709 | 480 |
9730 | 481 gaim_gtkdialogs_im_with_user(account, username); |
9709 | 482 } |
483 | |
9730 | 484 void |
485 gaim_gtkdialogs_im(void) | |
9709 | 486 { |
9730 | 487 GaimRequestFields *fields; |
488 GaimRequestFieldGroup *group; | |
489 GaimRequestField *field; | |
9709 | 490 |
9730 | 491 fields = gaim_request_fields_new(); |
9709 | 492 |
9730 | 493 group = gaim_request_field_group_new(NULL); |
494 gaim_request_fields_add_group(fields, group); | |
9709 | 495 |
10668 | 496 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
497 gaim_request_field_set_type_hint(field, "screenname"); | |
9730 | 498 gaim_request_field_set_required(field, TRUE); |
499 gaim_request_field_group_add_field(group, field); | |
9709 | 500 |
9730 | 501 field = gaim_request_field_account_new("account", _("_Account"), NULL); |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
502 gaim_request_field_set_type_hint(field, "account"); |
9730 | 503 gaim_request_field_set_visible(field, |
504 (gaim_connections_get_all() != NULL && | |
505 gaim_connections_get_all()->next != NULL)); | |
506 gaim_request_field_set_required(field, TRUE); | |
507 gaim_request_field_group_add_field(group, field); | |
508 | |
509 gaim_request_fields(gaim_get_blist(), _("New Instant Message"), | |
510 NULL, | |
10668 | 511 _("Please enter the screen name or alias of the person " |
512 "you would like to IM."), | |
9730 | 513 fields, |
514 _("OK"), G_CALLBACK(gaim_gtkdialogs_im_cb), | |
515 _("Cancel"), NULL, | |
516 NULL); | |
9709 | 517 } |
518 | |
9730 | 519 void |
520 gaim_gtkdialogs_im_with_user(GaimAccount *account, const char *username) | |
9709 | 521 { |
9730 | 522 GaimConversation *conv; |
9709 | 523 |
9753 | 524 g_return_if_fail(account != NULL); |
525 g_return_if_fail(username != NULL); | |
526 | |
11338 | 527 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, username, account); |
9709 | 528 |
9730 | 529 if (conv == NULL) |
11338 | 530 conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); |
9709 | 531 |
12116
e75ef7aa913e
[gaim-migrate @ 14416]
Luke Schierer <lschiere@pidgin.im>
parents:
12088
diff
changeset
|
532 gaim_gtkconv_present_conversation(conv); |
9709 | 533 } |
534 | |
9730 | 535 static gboolean |
536 gaim_gtkdialogs_ee(const char *ee) | |
9709 | 537 { |
538 GtkWidget *window; | |
539 GtkWidget *hbox; | |
540 GtkWidget *label; | |
10219 | 541 GtkWidget *img; |
9709 | 542 gchar *norm = gaim_strreplace(ee, "rocksmyworld", ""); |
543 | |
544 label = gtk_label_new(NULL); | |
545 if (!strcmp(norm, "zilding")) | |
546 gtk_label_set_markup(GTK_LABEL(label), | |
547 "<span weight=\"bold\" size=\"large\" foreground=\"purple\">Amazing! Simply Amazing!</span>"); | |
548 else if (!strcmp(norm, "robflynn")) | |
549 gtk_label_set_markup(GTK_LABEL(label), | |
550 "<span weight=\"bold\" size=\"large\" foreground=\"#1f6bad\">Pimpin\' Penguin Style! *Waddle Waddle*</span>"); | |
551 else if (!strcmp(norm, "flynorange")) | |
552 gtk_label_set_markup(GTK_LABEL(label), | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
553 "<span weight=\"bold\" size=\"large\" foreground=\"blue\">You should be me. I'm so cute!</span>"); |
9709 | 554 else if (!strcmp(norm, "ewarmenhoven")) |
555 gtk_label_set_markup(GTK_LABEL(label), | |
556 "<span weight=\"bold\" size=\"large\" foreground=\"orange\">Now that's what I like!</span>"); | |
557 else if (!strcmp(norm, "markster97")) | |
558 gtk_label_set_markup(GTK_LABEL(label), | |
559 "<span weight=\"bold\" size=\"large\" foreground=\"brown\">Ahh, and excellent choice!</span>"); | |
560 else if (!strcmp(norm, "seanegn")) | |
561 gtk_label_set_markup(GTK_LABEL(label), | |
562 "<span weight=\"bold\" size=\"large\" foreground=\"#009900\">Everytime you click my name, an angel gets its wings.</span>"); | |
563 else if (!strcmp(norm, "chipx86")) | |
564 gtk_label_set_markup(GTK_LABEL(label), | |
565 "<span weight=\"bold\" size=\"large\" foreground=\"red\">This sunflower seed taste like pizza.</span>"); | |
566 else if (!strcmp(norm, "markdoliner")) | |
567 gtk_label_set_markup(GTK_LABEL(label), | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
568 "<span weight=\"bold\" size=\"large\" foreground=\"#6364B1\">Hey! I was in that tumbleweed!</span>"); |
9709 | 569 else if (!strcmp(norm, "lschiere")) |
570 gtk_label_set_markup(GTK_LABEL(label), | |
571 "<span weight=\"bold\" size=\"large\" foreground=\"gray\">I'm not anything.</span>"); | |
572 g_free(norm); | |
573 | |
574 if (strlen(gtk_label_get_label(GTK_LABEL(label))) <= 0) | |
575 return FALSE; | |
576 | |
577 window = gtk_dialog_new_with_buttons(GAIM_ALERT_TITLE, NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL); | |
578 gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_OK); | |
579 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(gtk_widget_destroy), NULL); | |
580 | |
11243 | 581 gtk_container_set_border_width (GTK_CONTAINER(window), GAIM_HIG_BOX_SPACE); |
9709 | 582 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); |
583 gtk_dialog_set_has_separator(GTK_DIALOG(window), FALSE); | |
11243 | 584 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(window)->vbox), GAIM_HIG_BORDER); |
585 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(window)->vbox), GAIM_HIG_BOX_SPACE); | |
9709 | 586 |
11243 | 587 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); |
9709 | 588 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), hbox); |
10219 | 589 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_COOL, gtk_icon_size_from_name(GAIM_ICON_SIZE_DIALOG_COOL)); |
9709 | 590 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); |
591 | |
592 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
593 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
594 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
595 | |
596 gtk_widget_show_all(window); | |
597 return TRUE; | |
598 } | |
599 | |
600 static void | |
9730 | 601 gaim_gtkdialogs_info_cb(gpointer data, GaimRequestFields *fields) |
9709 | 602 { |
603 char *username; | |
604 gboolean found = FALSE; | |
605 GaimAccount *account; | |
606 | |
607 account = gaim_request_fields_get_account(fields, "account"); | |
608 | |
609 username = g_strdup(gaim_normalize(account, | |
610 gaim_request_fields_get_string(fields, "screenname"))); | |
611 | |
612 if (username != NULL && gaim_str_has_suffix(username, "rocksmyworld")) | |
9730 | 613 found = gaim_gtkdialogs_ee(username); |
9709 | 614 |
615 if (!found && username != NULL && *username != '\0' && account != NULL) | |
616 serv_get_info(gaim_account_get_connection(account), username); | |
617 | |
618 g_free(username); | |
619 } | |
620 | |
621 void | |
9714 | 622 gaim_gtkdialogs_info(void) |
9709 | 623 { |
624 GaimRequestFields *fields; | |
625 GaimRequestFieldGroup *group; | |
626 GaimRequestField *field; | |
627 | |
628 fields = gaim_request_fields_new(); | |
629 | |
630 group = gaim_request_field_group_new(NULL); | |
631 gaim_request_fields_add_group(fields, group); | |
632 | |
10668 | 633 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
9709 | 634 gaim_request_field_set_type_hint(field, "screenname"); |
635 gaim_request_field_set_required(field, TRUE); | |
636 gaim_request_field_group_add_field(group, field); | |
637 | |
638 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
639 gaim_request_field_set_type_hint(field, "account"); |
9709 | 640 gaim_request_field_set_visible(field, |
641 (gaim_connections_get_all() != NULL && | |
642 gaim_connections_get_all()->next != NULL)); | |
643 gaim_request_field_set_required(field, TRUE); | |
644 gaim_request_field_group_add_field(group, field); | |
645 | |
646 gaim_request_fields(gaim_get_blist(), _("Get User Info"), | |
647 NULL, | |
10668 | 648 _("Please enter the screen name or alias of the person " |
649 "whose info you would like to view."), | |
9709 | 650 fields, |
9730 | 651 _("OK"), G_CALLBACK(gaim_gtkdialogs_info_cb), |
9709 | 652 _("Cancel"), NULL, |
653 NULL); | |
654 } | |
655 | |
656 static void | |
9730 | 657 gaim_gtkdialogs_log_cb(gpointer data, GaimRequestFields *fields) |
9709 | 658 { |
659 char *username; | |
660 GaimAccount *account; | |
661 | |
662 account = gaim_request_fields_get_account(fields, "account"); | |
663 | |
664 username = g_strdup(gaim_normalize(account, | |
665 gaim_request_fields_get_string(fields, "screenname"))); | |
666 | |
9917 | 667 if(username != NULL && *username != '\0' && account != NULL ) |
668 gaim_gtk_log_show(GAIM_LOG_IM, username, account); | |
9709 | 669 |
670 g_free(username); | |
671 } | |
672 | |
9991 | 673 /* |
674 * TODO - This needs to deal with logs of all types, not just IM logs. | |
675 */ | |
9709 | 676 void |
9714 | 677 gaim_gtkdialogs_log(void) |
9709 | 678 { |
679 GaimRequestFields *fields; | |
680 GaimRequestFieldGroup *group; | |
681 GaimRequestField *field; | |
682 | |
683 fields = gaim_request_fields_new(); | |
684 | |
685 group = gaim_request_field_group_new(NULL); | |
686 gaim_request_fields_add_group(fields, group); | |
687 | |
10668 | 688 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
11025 | 689 gaim_request_field_set_type_hint(field, "screenname-all"); |
9709 | 690 gaim_request_field_set_required(field, TRUE); |
691 gaim_request_field_group_add_field(group, field); | |
692 | |
693 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
694 gaim_request_field_set_type_hint(field, "account"); |
9709 | 695 gaim_request_field_account_set_show_all(field, TRUE); |
696 gaim_request_field_set_visible(field, | |
697 (gaim_accounts_get_all() != NULL && | |
698 gaim_accounts_get_all()->next != NULL)); | |
699 gaim_request_field_set_required(field, TRUE); | |
700 gaim_request_field_group_add_field(group, field); | |
701 | |
11025 | 702 gaim_request_fields(gaim_get_blist(), _("View User Log"), |
9709 | 703 NULL, |
10668 | 704 _("Please enter the screen name or alias of the person " |
705 "whose log you would like to view."), | |
9709 | 706 fields, |
9730 | 707 _("OK"), G_CALLBACK(gaim_gtkdialogs_log_cb), |
9709 | 708 _("Cancel"), NULL, |
709 NULL); | |
710 } | |
711 | |
9730 | 712 static void |
713 gaim_gtkdialogs_alias_contact_cb(GaimContact *contact, const char *new_alias) | |
714 { | |
715 gaim_contact_set_alias(contact, new_alias); | |
716 } | |
717 | |
718 void | |
719 gaim_gtkdialogs_alias_contact(GaimContact *contact) | |
720 { | |
9753 | 721 g_return_if_fail(contact != NULL); |
722 | |
9730 | 723 gaim_request_input(NULL, _("Alias Contact"), NULL, |
724 _("Enter an alias for this contact."), | |
725 contact->alias, FALSE, FALSE, NULL, | |
726 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_contact_cb), | |
727 _("Cancel"), NULL, contact); | |
728 } | |
729 | |
730 static void | |
731 gaim_gtkdialogs_alias_buddy_cb(GaimBuddy *buddy, const char *new_alias) | |
732 { | |
733 gaim_blist_alias_buddy(buddy, new_alias); | |
734 serv_alias_buddy(buddy); | |
735 } | |
736 | |
737 void | |
9753 | 738 gaim_gtkdialogs_alias_buddy(GaimBuddy *buddy) |
9730 | 739 { |
9753 | 740 gchar *secondary; |
741 | |
742 g_return_if_fail(buddy != NULL); | |
743 | |
744 secondary = g_strdup_printf(_("Enter an alias for %s."), buddy->name); | |
9730 | 745 |
746 gaim_request_input(NULL, _("Alias Buddy"), NULL, | |
9753 | 747 secondary, buddy->alias, FALSE, FALSE, NULL, |
9730 | 748 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_buddy_cb), |
9753 | 749 _("Cancel"), NULL, buddy); |
9730 | 750 |
751 g_free(secondary); | |
752 } | |
753 | |
754 static void | |
755 gaim_gtkdialogs_alias_chat_cb(GaimChat *chat, const char *new_alias) | |
9709 | 756 { |
757 gaim_blist_alias_chat(chat, new_alias); | |
758 } | |
759 | |
760 void | |
9730 | 761 gaim_gtkdialogs_alias_chat(GaimChat *chat) |
9709 | 762 { |
9753 | 763 g_return_if_fail(chat != NULL); |
764 | |
9709 | 765 gaim_request_input(NULL, _("Alias Chat"), NULL, |
766 _("Enter an alias for this chat."), | |
767 chat->alias, FALSE, FALSE, NULL, | |
9730 | 768 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_chat_cb), |
9709 | 769 _("Cancel"), NULL, chat); |
770 } | |
771 | |
772 static void | |
9753 | 773 gaim_gtkdialogs_remove_contact_cb(GaimContact *contact) |
9709 | 774 { |
9730 | 775 GaimBlistNode *bnode, *cnode; |
776 GaimGroup *group; | |
777 | |
778 cnode = (GaimBlistNode *)contact; | |
779 group = (GaimGroup*)cnode->parent; | |
780 for (bnode = cnode->child; bnode; bnode = bnode->next) { | |
781 GaimBuddy *buddy = (GaimBuddy*)bnode; | |
782 if (gaim_account_is_connected(buddy->account)) | |
11643 | 783 gaim_account_remove_buddy(buddy->account, buddy, group); |
9730 | 784 } |
785 gaim_blist_remove_contact(contact); | |
786 } | |
787 | |
788 void | |
789 gaim_gtkdialogs_remove_contact(GaimContact *contact) | |
790 { | |
791 GaimBuddy *buddy = gaim_contact_get_priority_buddy(contact); | |
792 | |
9753 | 793 g_return_if_fail(contact != NULL); |
794 g_return_if_fail(buddy != NULL); | |
9730 | 795 |
796 if (((GaimBlistNode*)contact)->child == (GaimBlistNode*)buddy && | |
797 !((GaimBlistNode*)buddy)->next) { | |
798 gaim_gtkdialogs_remove_buddy(buddy); | |
799 } else { | |
10324 | 800 gchar *text; |
801 text = g_strdup_printf( | |
802 ngettext( | |
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 buddy from your buddy list. Do you " |
10324 | 805 "want to continue?", |
806 "You are about to remove the contact containing %s " | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
807 "and %d other buddies from your buddy list. Do you " |
10324 | 808 "want to continue?", contact->totalsize - 1), |
809 buddy->name, contact->totalsize - 1); | |
9730 | 810 |
10222 | 811 gaim_request_action(contact, NULL, _("Remove Contact"), text, 0, contact, 2, |
9753 | 812 _("Remove Contact"), G_CALLBACK(gaim_gtkdialogs_remove_contact_cb), |
9730 | 813 _("Cancel"), NULL); |
814 | |
815 g_free(text); | |
816 } | |
9709 | 817 } |
818 | |
819 void | |
9753 | 820 gaim_gtkdialogs_remove_group_cb(GaimGroup *group) |
9709 | 821 { |
9730 | 822 GaimBlistNode *cnode, *bnode; |
823 | |
824 cnode = ((GaimBlistNode*)group)->child; | |
825 | |
826 while (cnode) { | |
827 if (GAIM_BLIST_NODE_IS_CONTACT(cnode)) { | |
828 bnode = cnode->child; | |
829 cnode = cnode->next; | |
830 while (bnode) { | |
831 GaimBuddy *buddy; | |
832 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { | |
833 GaimConversation *conv; | |
834 buddy = (GaimBuddy*)bnode; | |
835 bnode = bnode->next; | |
11338 | 836 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, |
10246 | 837 buddy->name, |
838 buddy->account); | |
9730 | 839 if (gaim_account_is_connected(buddy->account)) { |
11643 | 840 gaim_account_remove_buddy(buddy->account, buddy, group); |
9730 | 841 gaim_blist_remove_buddy(buddy); |
842 if (conv) | |
843 gaim_conversation_update(conv, | |
844 GAIM_CONV_UPDATE_REMOVE); | |
845 } | |
846 } else { | |
847 bnode = bnode->next; | |
848 } | |
849 } | |
850 } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { | |
851 GaimChat *chat = (GaimChat *)cnode; | |
852 cnode = cnode->next; | |
853 if (gaim_account_is_connected(chat->account)) | |
854 gaim_blist_remove_chat(chat); | |
855 } else { | |
856 cnode = cnode->next; | |
857 } | |
858 } | |
859 | |
860 gaim_blist_remove_group(group); | |
861 } | |
862 | |
863 void | |
864 gaim_gtkdialogs_remove_group(GaimGroup *group) | |
865 { | |
9753 | 866 gchar *text; |
867 | |
868 g_return_if_fail(group != NULL); | |
869 | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
870 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 | 871 group->name); |
9730 | 872 |
10222 | 873 gaim_request_action(group, NULL, _("Remove Group"), text, 0, group, 2, |
9753 | 874 _("Remove Group"), G_CALLBACK(gaim_gtkdialogs_remove_group_cb), |
9730 | 875 _("Cancel"), NULL); |
876 | |
877 g_free(text); | |
9709 | 878 } |
879 | |
10246 | 880 /* XXX - Some of this should be moved into the core, methinks. */ |
9709 | 881 static void |
9753 | 882 gaim_gtkdialogs_remove_buddy_cb(GaimBuddy *buddy) |
9709 | 883 { |
9730 | 884 GaimGroup *group; |
885 GaimConversation *conv; | |
886 gchar *name; | |
887 GaimAccount *account; | |
888 | |
12088 | 889 group = gaim_buddy_get_group(buddy); |
9730 | 890 name = g_strdup(buddy->name); /* b->name is a crasher after remove_buddy */ |
891 account = buddy->account; | |
892 | |
9753 | 893 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name); |
11643 | 894 /* TODO - Should remove from blist first... then call gaim_account_remove_buddy()? */ |
895 gaim_account_remove_buddy(buddy->account, buddy, group); | |
9730 | 896 gaim_blist_remove_buddy(buddy); |
897 | |
11338 | 898 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account); |
9730 | 899 if (conv != NULL) |
900 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | |
901 | |
902 g_free(name); | |
9709 | 903 } |
904 | |
905 void | |
9730 | 906 gaim_gtkdialogs_remove_buddy(GaimBuddy *buddy) |
9709 | 907 { |
9753 | 908 gchar *text; |
9730 | 909 |
9753 | 910 g_return_if_fail(buddy != NULL); |
9730 | 911 |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
912 text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), |
9753 | 913 buddy->name); |
9730 | 914 |
10222 | 915 gaim_request_action(buddy, NULL, _("Remove Buddy"), text, 0, buddy, 2, |
9753 | 916 _("Remove Buddy"), G_CALLBACK(gaim_gtkdialogs_remove_buddy_cb), |
9730 | 917 _("Cancel"), NULL); |
918 | |
919 g_free(text); | |
920 } | |
9709 | 921 |
9730 | 922 static void |
9753 | 923 gaim_gtkdialogs_remove_chat_cb(GaimChat *chat) |
9730 | 924 { |
9918 | 925 char *name = NULL; |
10167 | 926 GaimAccount *account; |
9918 | 927 GaimConversation *conv = NULL; |
928 | |
10167 | 929 account = chat->account; |
930 | |
931 if (GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name != NULL) | |
932 name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); | |
9918 | 933 |
9730 | 934 gaim_blist_remove_chat(chat); |
9918 | 935 |
936 if (name != NULL) { | |
11338 | 937 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, name, account); |
9918 | 938 g_free(name); |
939 } | |
940 | |
941 if (conv != NULL) | |
942 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | |
9730 | 943 } |
9709 | 944 |
9730 | 945 void |
946 gaim_gtkdialogs_remove_chat(GaimChat *chat) | |
947 { | |
10877
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
948 const gchar *name; |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
949 gchar *text; |
9753 | 950 |
951 g_return_if_fail(chat != NULL); | |
9730 | 952 |
10877
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
953 name = gaim_chat_get_name(chat); |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
954 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
|
955 name ? name : ""); |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
956 |
10222 | 957 gaim_request_action(chat, NULL, _("Remove Chat"), text, 0, chat, 2, |
9753 | 958 _("Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb), |
9730 | 959 _("Cancel"), NULL); |
960 | |
961 g_free(text); | |
9709 | 962 } |