Mercurial > pidgin.yaz
annotate src/about.c @ 9740:2bb5e2cd64bd
[gaim-migrate @ 10605]
" A few days back, someone on #gaim was wondering how to
block IM's from IRC, which isn't supported by gaim, as
this isn't supported at a protocol level. I decided to
implement gaim's privacy options (permit lists, deny
lists, block all users, and permit people on buddy
list) at a local level for IRC and
Zephyr. Jabber, SILC, and Trepia don't seem to support
deny or permit lists in Gaim, but I don't use the
latter two protocols and wasn't sure about how to
implemnt in in Jabber.
When implementing it, I noticed that changes in privacy
settings didn't automatically cause blist.xml to get
scheduled
for writing (even on exit). To fix this, I needed to
make schedule_blist_save in blist.c non-static and call
it from serv_set_permit_deny() in server.c, and
gaim_privacy_{permit,deny}_{add,remove} in privacy.c ." --Arun A Tharuvai
committer: Tailor Script <tailor@pidgin.im>
| author | Luke Schierer <lschiere@pidgin.im> |
|---|---|
| date | Wed, 11 Aug 2004 23:52:48 +0000 |
| parents | 8158d148b3c2 |
| children |
| rev | line source |
|---|---|
| 1 | 1 /* |
| 2 * gaim | |
| 3 * | |
| 8046 | 4 * Gaim is the legal property of its developers, whose names are too numerous |
| 5 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 6 * source distribution. | |
| 1 | 7 * |
| 8 * This program is free software; you can redistribute it and/or modify | |
| 3424 | 9 * it under the terms of the GNU General Public License as published by |
| 1 | 10 * the Free Software Foundation; either version 2 of the License, or |
| 11 * (at your option) any later version. | |
| 12 * | |
| 13 * This program is distributed in the hope that it will be useful, | |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 * GNU General Public License for more details. | |
| 17 * | |
| 18 * You should have received a copy of the GNU General Public License | |
| 19 * along with this program; if not, write to the Free Software | |
| 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 * | |
| 22 */ | |
| 23 | |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
24 #include "internal.h" |
| 9716 | 25 #include "gtkinternal.h" |
| 26 | |
| 27 #include "gtkdialogs.h" | |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
28 #include "gtkimhtml.h" |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
29 #include "gtkutils.h" |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
30 #include "stock.h" |
| 1 | 31 |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
32 /* XXX For WEBSITE */ |
| 1 | 33 #include "gaim.h" |
| 34 | |
|
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
35 static GtkWidget *about = NULL; |
| 1 | 36 |
| 37 static void destroy_about() | |
| 38 { | |
| 9716 | 39 if (about != NULL) |
| 1 | 40 gtk_widget_destroy(about); |
| 41 about = NULL; | |
| 42 } | |
| 43 | |
| 4082 | 44 void show_about(GtkWidget *w, void *data) |
| 1 | 45 { |
| 7942 | 46 GtkWidget *hbox; |
| 1 | 47 GtkWidget *vbox; |
| 3721 | 48 GtkWidget *logo; |
| 7942 | 49 GtkWidget *label; |
| 50 GtkWidget *sw; | |
| 51 GtkWidget *text; | |
| 52 GtkWidget *bbox; | |
| 53 GtkWidget *button; | |
| 9006 | 54 GtkTextIter iter; |
| 7942 | 55 char *str, *labeltext; |
|
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
56 |
| 9716 | 57 if (about != NULL) { |
| 58 gtk_window_present(GTK_WINDOW(about)); | |
| 7942 | 59 return; |
| 9716 | 60 } |
| 1 | 61 |
| 7942 | 62 GAIM_DIALOG(about); |
| 63 gtk_window_set_default_size(GTK_WINDOW(about), 450, -1); | |
| 64 gtk_window_set_title(GTK_WINDOW(about), _("About Gaim")); | |
| 65 gtk_window_set_role(GTK_WINDOW(about), "about"); | |
| 66 gtk_window_set_resizable(GTK_WINDOW(about), TRUE); | |
| 1205 | 67 |
| 7942 | 68 hbox = gtk_hbox_new(FALSE, 12); |
| 69 gtk_container_set_border_width(GTK_CONTAINER(hbox), 12); | |
| 70 gtk_container_add(GTK_CONTAINER(about), hbox); | |
| 1205 | 71 |
| 7942 | 72 vbox = gtk_vbox_new(FALSE, 12); |
| 73 gtk_container_add(GTK_CONTAINER(hbox), vbox); | |
| 74 | |
| 75 logo = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO)); | |
| 76 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); | |
| 1205 | 77 |
| 7942 | 78 labeltext = g_strdup_printf(_("<span weight=\"bold\" size=\"larger\">Gaim v%s</span>"), VERSION); |
| 79 label = gtk_label_new(NULL); | |
| 80 gtk_label_set_markup(GTK_LABEL(label), labeltext); | |
| 81 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
| 82 gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0); | |
| 83 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | |
| 84 g_free(labeltext); | |
| 2950 | 85 |
| 7942 | 86 sw = gtk_scrolled_window_new(NULL, NULL); |
| 87 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
| 88 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); | |
| 89 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | |
| 90 gtk_widget_set_size_request(sw, -1, 350); | |
| 91 gtk_box_pack_start(GTK_BOX(vbox), sw, FALSE, FALSE, 0); | |
| 4006 | 92 |
| 7942 | 93 text = gtk_imhtml_new(NULL, NULL); |
| 94 gtk_container_add(GTK_CONTAINER(sw), text); | |
| 95 gaim_setup_imhtml(text); | |
| 4006 | 96 |
| 7942 | 97 gtk_imhtml_append_text(GTK_IMHTML(text), |
| 9301 | 98 _("Gaim is a modular messaging client capable of using " |
| 99 "AIM, MSN, Yahoo!, Jabber, ICQ, IRC, SILC, " | |
| 100 "Novell GroupWise, Napster, Zephyr, and Gadu-Gadu " | |
| 101 "all at once. It is written using " | |
| 7942 | 102 "Gtk+ and is licensed under the GPL.<BR><BR>"), GTK_IMHTML_NO_SCROLL); |
| 103 | |
| 104 gtk_imhtml_append_text(GTK_IMHTML(text), | |
| 8703 | 105 "<FONT SIZE=\"4\">URL:</FONT> <A HREF=\"" GAIM_WEBSITE "\">" |
| 7942 | 106 GAIM_WEBSITE "</A><BR><BR>", GTK_IMHTML_NO_SCROLL); |
| 4006 | 107 |
| 7942 | 108 gtk_imhtml_append_text(GTK_IMHTML(text), |
| 8703 | 109 _("<FONT SIZE=\"4\">IRC:</FONT> #gaim on irc.freenode.net" |
| 7942 | 110 "<BR><BR>"), GTK_IMHTML_NO_SCROLL); |
| 4006 | 111 |
| 7942 | 112 /* Active Developers */ |
| 113 str = g_strconcat( | |
| 8703 | 114 "<FONT SIZE=\"4\">", _("Active Developers"), ":</FONT><BR>" |
| 7942 | 115 " Rob Flynn (", _("maintainer"), ") " |
| 8196 | 116 "<<A HREF=\"mailto:gaim@robflynn.com\">gaim@robflynn.com</A>><BR>" |
| 7942 | 117 " Sean Egan (", _("lead developer"), ") " |
| 118 "<<A HREF=\"mailto:sean.egan@binghamton.edu\">" | |
| 119 "bj91704@binghamton.edu</A>><BR>" | |
| 120 " Christian 'ChipX86' Hammond (", _("developer & webmaster"), ")<BR>" | |
| 121 " Herman Bloggs (", _("win32 port"), ") " | |
| 122 "<<A HREF=\"mailto:hermanator12002@yahoo.com\">" | |
| 123 "hermanator12002@yahoo.com</A>><BR>" | |
| 124 " Nathan 'faceprint' Walp (", _("developer"), ")<BR>" | |
| 125 " Mark 'KingAnt' Doliner (", _("developer"), ")<BR>" | |
| 126 " Ethan 'Paco-Paco' Blanton (", _("developer"), ")<br>" | |
| 8968 | 127 " Tim 'marv' Ringenbach (", _("developer"), ")<br>" |
| 7942 | 128 " Luke 'LSchiere' Schierer (", _("support"), ")<BR>" |
| 129 "<BR>", NULL); | |
| 130 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); | |
| 131 g_free(str); | |
| 4006 | 132 |
| 7942 | 133 /* Crazy Patch Writers */ |
| 134 str = g_strconcat( | |
| 8703 | 135 "<FONT SIZE=\"4\">", _("Crazy Patch Writers"), ":</FONT><BR>" |
| 9464 | 136 " Daniel 'datallah' Atallah<br>" |
| 137 " Ka-Hing 'javabsp' Cheung<br>" | |
| 7942 | 138 " Decklin Foster<BR>" |
| 9464 | 139 " Gary 'grim' Kramlich<br>" |
| 140 " Robert 'Robot101' McQueen<BR>" | |
| 141 " Benjamin Miller<BR>" | |
| 7942 | 142 " Etan 'deryni' Reisner<BR>" |
| 143 " Kevin 'SimGuy' Stange<br>" | |
| 144 " Stu 'nosnilmot' Tomlinson<br>" | |
| 145 "<BR>", NULL); | |
| 146 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); | |
| 147 g_free(str); | |
| 148 | |
| 149 /* Retired Developers */ | |
| 150 str = g_strconcat( | |
| 8703 | 151 "<FONT SIZE=\"4\">", _("Retired Developers"), ":</FONT><BR>" |
| 7942 | 152 " Adam Fritzler (", _("former libfaim maintainer"), ")<BR>" |
| 153 " Eric Warmenhoven (", _("former lead developer"), ") " | |
| 154 "<<A HREF=\"mailto:warmenhoven@yahoo.com\">" | |
| 155 "warmenhoven@yahoo.com</A>><BR>" | |
| 156 " Jim Duchek (", _("former maintainer"), ")<BR>" | |
| 157 " Jim Seymour (", _("former Jabber developer"), ")<BR>" | |
| 158 " Mark Spencer (", _("original author"), ") " | |
| 159 "<<A HREF=\"mailto:markster@marko.net\">" | |
| 160 "markster@marko.net</A>><BR>" | |
| 161 " Syd Logan (", _("hacker and designated driver [lazy bum]"), | |
| 162 ")<BR>" | |
| 163 "<BR>", NULL); | |
| 164 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); | |
| 165 g_free(str); | |
| 4006 | 166 |
| 7942 | 167 /* Current Translators */ |
| 168 str = g_strconcat( | |
| 8703 | 169 "<FONT SIZE=\"4\">", _("Current Translators"), ":</FONT><BR>" |
| 9526 | 170 " <b>", _("Bulgarian"), " (bg)</b> - Alexander Shopov <<a href=\"mailto: al_shopov@users.sf.net\">al_shopov@users.sf.net</a>><br>" |
| 7942 | 171 " <b>", _("Catalan"), " (ca)</b> - Robert Millan <<a href=\"mailto: zeratul2@wanadoo.es\">zeratul2@wanadoo.es</a>><br>" |
| 172 " <b>", _("Czech"), " (cs)</b> - Miloslav Trmac <<a href=\"mailto: mitr@volny.cz\">mitr@volny.cz</a>><br>" | |
| 173 " <b>", _("Danish"), " (da)</b> - Morten Brix Pedersen <<a href=\"mailto: morten@wtf.dk\">morten@wtf.dk</a>><br>" | |
| 9526 | 174 " <b>", _("British English"), " (en_GB)</b> - Luke Ross <<a href=\"mailto: lukeross@sys3175.co.uk\">lukeross@sys3175.co.uk</a>><br>" |
| 175 " <b>", _("Canadian English"), " (en_CA)</b> - Adam Weinberger <<a href=\"mailto: adamw@gnome.org\">adamw@gnome.org</a>><br>" | |
| 7942 | 176 " <b>", _("German"), " (de)</b> - Björn Voigt <<a href=\"mailto: bjoern@cs.tu-berlin.de\">bjoern@cs.tu-berlin.de</a>><br>" |
| 177 " <b>", _("Spanish"), " (es)</b> - Javier Fernández-Sanguino Peña <<a href=\"mailto: jfs@debian.org\">jfs@debian.org</a>><br>" | |
| 178 " <b>", _("Finnish"), " (fi)</b> - Arto Alakulju <<a href=\"mailto: arto@alakulju.net\">arto@alakulju.net</a>><br>" | |
| 179 " <b>", _("French"), " (fr)</b> - Éric Boumaour <<a href=\"mailto: zongo_fr@users.sourceforge.net\">zongo_fr@users.sourceforge.net</a>><br>" | |
| 8827 | 180 " <b>", _("Hebrew"), " (he)</b> - Pavel Bibergal <<a href=\"mailto:cyberkm203@hotmail.com\">cyberkm203@hotmail.com</a>><br>" |
| 7942 | 181 " <b>", _("Hindi"), " (hi)</b> - Ravishankar Shrivastava <<a href=\"mailto: raviratlami@yahoo.com\">raviratlami@yahoo.com</a>><br>" |
| 182 " <b>", _("Hungarian"), " (hu)</b> - Zoltan Sutto <<a href=\"mailto: suttozoltan@chello.hu\">suttozoltan@chello.hu</a>><br>" | |
| 183 " <b>", _("Italian"), " (it)</b> - Claudio Satriano <<a href=\"mailto: satriano@na.infn.it\">satriano@na.infn.it</a>><br>" | |
| 9526 | 184 " <b>", _("Japanese"), " (ja)</b> - Takashi Aihana <<a href=\"mailto: aihana@gnome.gr.jp\">aihana@gnome.gr.jp</a>><br>" |
| 185 " <b>", _("Lithuanian"), " (lt)</b> - Gediminas Čičinskas <<a href=\"mailto: gediminas@parok.lt\">gediminas@parok.lt</a>><br>" | |
| 7942 | 186 " <b>", _("Korean"), " (ko)</b> - Kyung-uk Son <<a href=\"mailto: vvs740@chol.com\">vvs740@chol.com</a>><br>" |
| 187 " <b>", _("Dutch; Flemish"), " (nl)</b> - Vincent van Adrighem <<a href=\"mailto: V.vanAdrighem@dirck.mine.nu\">V.vanAdrighem@dirck.mine.nu</a>><br>" | |
| 9526 | 188 " <b>", _("Macedonian"), " (mk)</b> - Tomislav Markovski <<a href=\"mailto: herrera@users.sf.net\">herrera@users.sf.net</a>><br>" |
| 8575 | 189 " <b>", _("Norwegian"), " (no)</b> - Petter Johan Olsen <<a href=\"mailto:petter.olsen@cc.uit.no\">petter.olsen@cc.uit.no</a>><br>" |
| 9485 | 190 " <b>", _("Polish"), " (pl)</b> - Krzysztof Foltman <<a href=\"mailto:krzysztof@foltman.com\">krzysztof@foltman.com</a>>, Emil Nowak <<a href=\"mailto:emil5@go2.pl\">emil5@go2.pl</a>><br>" |
| 7942 | 191 " <b>", _("Portuguese"), " (pt)</b> - Duarte Henriques <<a href=\"mailto:duarte_henriques@myrealbox.com\">duarte_henriques@myrealbox.com</a>><br>" |
| 9081 | 192 " <b>", _("Portuguese-Brazil"), " (pt_BR)</b> - Maurício de Lemos Rodrigues Collares Neto <<a href=\"mailto: mauricioc@gmail.com\">mauricioc@gmail.com</a>><br>" |
| 7942 | 193 " <b>", _("Romanian"), " (ro)</b> - Mişu Moldovan <<a href=\"mailto: dumol@go.ro\">dumol@go.ro</a>><br>" |
| 9526 | 194 " <b>", _("Russian"), " (ru)</b> - Dmitry Beloglazov <<a href=\"mailto: dmaa@users.sf.net\">dmaa@users.sf.net</a>><br>" |
| 7942 | 195 " <b>", _("Serbian"), " (sr)</b> - Danilo Šegan <<a href=\"mailto: dsegan@gmx.net\">dsegan@gmx.net</a>>, Aleksandar Urosevic <<a href=\"mailto: urke@users.sourceforge.net\">urke@users.sourceforge.net</a>><br>" |
| 9494 | 196 " <b>", _("Slovenian"), " (sl)</b> - Matjaz Horvat <<a href=\"mailto: matjaz@owca.info\">matjaz@owca.info</a>><br>" |
| 7942 | 197 " <b>", _("Swedish"), " (sv)</b> - Tore Lundqvist <<a href=\"mailto: tlt@mima.x.se\">tlt@mima.x.se</a>><br>" |
| 9526 | 198 " <b>", _("Vietnamese"), " (vi)</b> - T.M.Thanh ", _("and the Gnome-Vi Team"), " <<a href=\"mailto: gnomevi-list@lists.sf.net\">gnomevi-list@lists.sf.net</a>><br>" |
| 7942 | 199 " <b>", _("Simplified Chinese"), " (zh_CN)</b> - Funda Wang <<a href=\"mailto: fundawang@linux.net.cn\">fundawang@linux.net.cn</a>><br>" |
| 200 " <b>", _("Traditional Chinese"), " (zh_TW)</b> - Ambrose C. Li <<a href=\"mailto: acli@ada.dhs.org\">acli@ada.dhs.org</a>>, Paladin R. Liu <<a href=\"mailto: paladin@ms1.hinet.net\">paladin@ms1.hinet.net</a>><br>" | |
| 201 "<BR>", NULL); | |
| 202 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); | |
| 203 g_free(str); | |
| 6546 | 204 |
| 7942 | 205 /* Past Translators */ |
| 206 str = g_strconcat( | |
| 8703 | 207 "<FONT SIZE=\"4\">", _("Past Translators"), ":</FONT><BR>" |
| 7942 | 208 " <b>", _("Amharic"), " (am)</b> - Daniel Yacob<br>" |
| 209 " <b>", _("Bulgarian"), " (bg)</b> - Hristo Todorov<br>" | |
| 210 " <b>", _("Catalan"), " (ca)</b> - JM Pérez Cáncer<br>" | |
| 211 " <b>", _("Czech"), " (cs)</b> - Honza Král<br>" | |
| 212 " <b>", _("German"), " (de)</b> - Daniel Seifert, Karsten Weiss<br>" | |
| 213 " <b>", _("Spanish"), " (es)</b> - Amaya Rodrigo, Alejandro G Villar, Nicolás Lichtmaier, JM Pérez Cáncer<br>" | |
| 214 " <b>", _("Finnish"), " (fi)</b> - Tero Kuusela<br>" | |
| 8415 | 215 " <b>", _("French"), " (fr)</b> - Sébastien François, Stéphane Pontier, Stéphane Wirtel, Loïc Jeannin<br>" |
| 7942 | 216 " <b>", _("Italian"), " (it)</b> - Salvatore di Maggio<br>" |
| 217 " <b>", _("Japanese"), " (ja)</b> - Ryosuke Kutsuna, Taku Yasui, Junichi Uekawa<br>" | |
| 218 " <b>", _("Korean"), " (ko)</b> - Sang-hyun S, A Ho-seok Lee<br>" | |
| 219 " <b>", _("Polish"), " (pl)</b> - Przemysław Sułek<br>" | |
| 220 " <b>", _("Russian"), " (ru)</b> - Sergey Volozhanin<br>" | |
| 9321 | 221 " <b>", _("Russian"), "(ru)</b> - Alexandre Prokoudine<br>" |
| 7942 | 222 " <b>", _("Slovak"), " (sk)</b> - Daniel Režný<br>" |
| 223 " <b>", _("Swedish"), " (sv)</b> - Christian Rose<br>" | |
| 224 " <b>", _("Chinese"), " (zh_CN, zh_TW)</b> - Hashao, Rocky S. Lee<br>" | |
| 225 "<BR>", NULL); | |
| 226 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); | |
| 227 g_free(str); | |
| 6546 | 228 |
| 7942 | 229 gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0); |
| 9006 | 230 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); |
| 231 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
| 232 | |
| 7942 | 233 /* Close Button */ |
| 234 bbox = gtk_hbutton_box_new(); | |
| 235 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
| 236 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | |
| 622 | 237 |
| 7942 | 238 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); |
| 239 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
| 1210 | 240 |
| 7942 | 241 g_signal_connect_swapped(G_OBJECT(button), "clicked", |
| 242 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
| 243 g_signal_connect(G_OBJECT(about), "destroy", | |
| 244 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
| 1205 | 245 |
| 7942 | 246 /* this makes the sizes not work? */ |
| 247 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); | |
| 248 gtk_widget_grab_default(button); | |
| 1210 | 249 |
| 250 /* Let's give'em something to talk about -- woah woah woah */ | |
| 5024 | 251 gtk_widget_show_all(about); |
| 4157 | 252 gtk_window_present(GTK_WINDOW(about)); |
| 1205 | 253 } |
