/*
* @file gtkdialogs.c GTK+ Dialogs
* @ingroup pidgin
*/
/* pidgin
*
* Pidgin is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#define _PIDGIN_GTKDIALOGS_C_
#include "internal.h"
#include "pidgin.h"
#include "package_revision.h"
#include "debug.h"
#include "notify.h"
#include "prpl.h"
#include "request.h"
#include "util.h"
#include "core.h"
#include "gtkblist.h"
#include "gtkdialogs.h"
#include "gtkimhtml.h"
#include "gtkimhtmltoolbar.h"
#include "gtklog.h"
#include "gtkutils.h"
#include "pidginstock.h"
static GList *dialogwindows = NULL;
struct _PidginGroupMergeObject {
PurpleGroup* parent;
char *new_name;
};
struct developer {
char *name;
char *role;
char *email;
};
struct translator {
char *language;
char *abbr;
char *name;
char *email;
};
struct artist {
char *name;
char *email;
};
/* Order: Alphabetical by Last Name */
static const struct developer developers[] = {
{"Daniel 'datallah' Atallah", NULL, NULL},
{"Paul 'darkrain42' Aurich", NULL, NULL},
{"John 'rekkanoryo' Bailey", N_("bug master"), NULL},
{"Ethan 'Paco-Paco' Blanton", NULL, NULL},
{"Hylke Bons", N_("artist"), "hylkebons@gmail.com"},
/* feel free to not translate this */
{N_("Ka-Hing Cheung"), NULL, NULL},
{"Sadrul Habib Chowdhury", NULL, NULL},
{"Mark 'KingAnt' Doliner", NULL, "mark@kingant.net"},
{"Casey Harkins", NULL, NULL},
{"Ivan Komarov", NULL, "ivan.komarov@pidgin.im"},
{"Gary 'grim' Kramlich", NULL, "grim@pidgin.im"},
{"Richard 'rlaager' Laager", NULL, "rlaager@pidgin.im"},
{"Marcus 'malu' Lundblad", NULL, NULL},
{"Sulabh 'sulabh_m' Mahajan", NULL, NULL},
{"Richard 'wabz' Nelson", NULL, NULL},
{"Etan 'deryni' Reisner", NULL, NULL},
{"Michael 'Maiku' Ruprecht", N_("voice and video"), NULL},
{"Elliott 'QuLogic' Sales de Andrade", NULL, NULL},
{"Luke 'LSchiere' Schierer", N_("support"), "lschiere@users.sf.net"},
{"Evan Schoenberg", NULL, NULL},
{"Kevin 'SimGuy' Stange", N_("webmaster"), NULL},
{"Will 'resiak' Thompson", NULL, NULL},
{"Stu 'nosnilmot' Tomlinson", NULL, NULL},
{"Jorge 'Masca' Villaseñor", NULL, NULL},
{NULL, NULL, NULL}
};
/* Order: Alphabetical by Last Name */
static const struct developer patch_writers[] = {
{"Peter 'Fmoo' Ruibal", NULL, NULL},
{"Gabriel 'Nix' Schulhof", NULL, NULL},
{NULL, NULL, NULL}
};
/* Order: Alphabetical by Last Name */
static const struct developer retired_developers[] = {
{"Herman Bloggs", N_("win32 port"), "herman@bluedigits.com"},
{"Thomas Butter", NULL, NULL},
{"Jim Duchek", N_("maintainer"), "jim@linuxpimps.com"},
{"Sean Egan", NULL, "sean.egan@gmail.com"},
{"Rob Flynn", N_("maintainer"), NULL},
{"Adam Fritzler", N_("libfaim maintainer"), NULL},
{"Christian 'ChipX86' Hammond", N_("webmaster"), NULL},
/* If "lazy bum" translates literally into a serious insult, use something else or omit it. */
{"Syd Logan", N_("hacker and designated driver [lazy bum]"), NULL},
{"Christopher 'siege' O'Brien", NULL, "taliesein@users.sf.net"},
{"Bartosz Oler", NULL, NULL},
{"Tim 'marv' Ringenbach", NULL, NULL},
{"Megan 'Cae' Schneider", N_("support/QA"), NULL},
{"Jim Seymour", N_("XMPP"), NULL},
{"Mark Spencer", N_("original author"), "markster@marko.net"},
{"Nathan 'faceprint' Walp", NULL, NULL},
{"Eric Warmenhoven", N_("lead developer"), "warmenhoven@yahoo.com"},
{NULL, NULL, NULL}
};
/* Order: Alphabetical by Last Name */
static const struct developer retired_patch_writers[] = {
{"Felipe 'shx' Contreras", NULL, NULL},
{"Decklin Foster", NULL, NULL},
{"Dennis 'EvilDennisR' Ristuccia", N_("Senior Contributor/QA"), NULL},
{"Peter 'Bleeter' Lawler", NULL, NULL},
{"Robert 'Robot101' McQueen", NULL, NULL},
{"Benjamin Miller", NULL, NULL},
{NULL, NULL, NULL}
};
/* Order: Code, then Alphabetical by Last Name */
static const struct translator translators[] = {
{N_("Afrikaans"), "af", "Samuel Murray", "afrikaans@gmail.com"},
{N_("Afrikaans"), "af", "Friedel Wolff", "friedel@translate.org.za"},
{N_("Arabic"), "ar", "Khaled Hosny", "khaledhosny@eglug.org"},
{N_("Assamese"), "as", "Amitakhya Phukan", "aphukan@fedoraproject.org"},
{N_("Belarusian Latin"), "be@latin", "Ihar Hrachyshka", "ihar.hrachyshka@gmail.com"},
{N_("Bulgarian"), "bg", "Vladimira Girginova", "missing@here.is"},
{N_("Bulgarian"), "bg", "Vladimir (Kaladan) Petkov", "vpetkov@i-space.org"},
{N_("Bengali"), "bn", "Israt Jahan", "israt@ankur.org.bd"},
{N_("Bengali"), "bn", "Jamil Ahmed", "jamil@bengalinux.org"},
{N_("Bengali"), "bn", "Samia Nimatullah", "mailsamia2001@yahoo.com"},
{N_("Bengali-India"), "bn_IN", "Runa Bhattacharjee", "runab@fedoraproject.org"},
{N_("Bosnian"), "bs", "Lejla Hadzialic", "lejlah@gmail.com"},
{N_("Catalan"), "ca", "Josep Puigdemont", "josep.puigdemont@gmail.com"},
{N_("Valencian-Catalan"), "ca@valencia", "Toni Hermoso", "toniher@softcatala.org"},
{N_("Valencian-Catalan"), "ca@valencia", "Josep Puigdemont", "tradgnome@softcatala.org"},
{N_("Czech"), "cs", "David Vachulka", "david@konstrukce-cad.com"},
{N_("Danish"), "da", "Morten Brix Pedersen", "morten@wtf.dk"},
{N_("Danish"), "da", "Peter Bach", "bach.peter@gmail.com"},
{N_("German"), "de", "Björn Voigt", "bjoern@cs.tu-berlin.de"},
{N_("German"), "de", "Jochen Kemnade", "jochenkemnade@web.de"},
{N_("Dzongkha"), "dz", "Norbu", "nor_den@hotmail.com"},
{N_("Dzongkha"), "dz", "Jurmey Rabgay", "jur_gay@yahoo.com"},
{N_("Dzongkha"), "dz", "Wangmo Sherpa", "rinwanshe@yahoo.com"},
{N_("Greek"), "el", "Katsaloulis Panayotis", "panayotis@panayotis.com"},
{N_("Greek"), "el", "Bouklis Panos", "panos@echidna-band.com"},
{N_("Australian English"), "en_AU", "Peter Lawler", "trans@six-by-nine.com.au"},
{N_("British English"), "en_GB", "Phil Hannent", "phil@hannent.co.uk"},
{N_("Canadian English"), "en_CA", "Adam Weinberger", "adamw@gnome.org"},
{N_("Esperanto"), "eo", "Stéphane Fillod", "fillods@users.sourceforge.net"},
{N_("Spanish"), "es", "Javier Fernández-Sanguino Peña", "jfs@debian.org"},
{N_("Estonian"), "et", "Ivar Smolin", "okul@linux.ee"},
{N_("Basque"), "eu", "Mikel Pascual Aldabaldetreku", "mikel.paskual@gmail.com"},
{N_("Persian"), "fa", "Elnaz Sarbar", "elnaz@farsiweb.info"},
{N_("Persian"), "fa", "Meelad Zakaria", "meelad@farsiweb.info"},
{N_("Persian"), "fa", "Roozbeh Pournader ", "roozbeh@farsiweb.info"},
{N_("Finnish"), "fi", "Timo Jyrinki", "timo.jyrinki@iki.fi"},
{N_("French"), "fr", "Éric Boumaour", "zongo_fr@users.sourceforge.net"},
{N_("Irish"), "ga", "Aaron Kearns", "ajkearns6@gmail.com"},
{N_("Galician"), "gl", "Mar Castro", "mariamarcp@gmail.com"},
{N_("Galician"), "gl", "Frco. Javier Rial", "fjrial@cesga.es"},
{N_("Gujarati"), "gu", "Ankit Patel", "ankit_patel@users.sf.net"},
{N_("Gujarati"), "gu", N_("Gujarati Language Team"), "indianoss-gujarati@lists.sourceforge.net"},
{N_("Hebrew"), "he", "Shalom Craimer", "scraimer@gmail.com"},
{N_("Hindi"), "hi", "Rajesh Ranjan", "rajeshkajha@yahoo.com"},
{N_("Hungarian"), "hu", "Kelemen Gábor", "kelemeng@gnome.hu"},
{N_("Armenian"), "hy", "David Avsharyan", "avsharyan@gmail.com"},
{N_("Indonesian"), "id", "Rai S. Regawa", "raireg@yahoo.com"},
{N_("Italian"), "it", "Claudio Satriano", "satriano@na.infn.it"},
{N_("Japanese"), "ja", "Takashi Aihana", "aihana@gnome.gr.jp"},
{N_("Georgian"), "ka", N_("Ubuntu Georgian Translators"), "alexander.didebulidze@stusta.mhn.de"},
{N_("Khmer"), "km", "Khoem Sokhem", "khoemsokhem@khmeros.info"},
{N_("Kannada"), "kn", N_("Kannada Translation team"), "translation@sampada.info"},
{N_("Korean"), "ko", "Sushizang", "sushizang@empal.com"},
{N_("Kurdish"), "ku", "Erdal Ronahi", "erdal.ronahi@gmail.com"},
{N_("Kurdish"), "ku", "Amed Ç. Jiyan", "amedcj@hotmail.com"},
{N_("Kurdish"), "ku", "Rizoyê Xerzî", "rizoxerzi@hotmail.com"},
{N_("Lao"), "lo", "Anousak Souphavah", "anousak@gmail.com"},
{N_("Maithili"), "mai", "Sangeeta Kumari", "sangeeta_0975@yahoo.com"},
{"Meadow Mari", "mhr", "David Preece", "davidpreece1@gmail.com"},
{N_("Macedonian"), "mk", "Arangel Angov ", "arangel@linux.net.mk"},
{N_("Macedonian"), "mk", "Ivana Kirkovska", "ivana.kirkovska@gmail.com"},
{N_("Macedonian"), "mk", "Jovan Naumovski", "jovan@lugola.net"},
{N_("Malayalam"), "ml", "Ani Peter", "apeter@redhat.com"},
{N_("Mongolian"), "mn", "gooyo", NULL},
{N_("Marathi"), "mr", "Sandeep Shedmake", "sandeep.shedmake@gmail.com"},
{N_("Malay"), "ms_MY", "Muhammad Najmi bin Ahmad Zabidi", "najmi.zabidi@gmail.com"},
{N_("Bokmål Norwegian"), "nb", "Hans Fredrik Nordhaug", "hans@nordhaug.priv.no"},
{N_("Nepali"), "ne", "Shyam Krishna Bal", "shyamkrishna_bal@yahoo.com"},
{N_("Dutch, Flemish"), "nl", "Gideon van Melle", "translations@gvmelle.com"},
{N_("Norwegian Nynorsk"), "nn", "Yngve Spjeld Landro", "l10n@landro.net"},
{N_("Occitan"), "oc", "Yannig Marchegay", "yannig@marchegay.org"},
{N_("Oriya"), "or", "Manoj Kumar Giri", "giri.manojkr@gmail.com"},
{N_("Punjabi"), "pa", "Amanpreet Singh Alam", "aalam@users.sf.net"},
{N_("Polish"), "pl", "Piotr Drąg", "piotrdrag@gmail.com"},
{N_("Polish"), "pl", "Piotr Makowski", "pmakowski@aviary.pl"},
{N_("Portuguese"), "pt", "Duarte Henriques", "duarte_henriques@myrealbox.com"},
{N_("Portuguese-Brazil"), "pt_BR", "Rodrigo Luiz Marques Flores", "rodrigomarquesflores@gmail.com"},
{N_("Pashto"), "ps", "Kashif Masood", "masudmails@yahoo.com"},
{N_("Romanian"), "ro", "Mișu Moldovan", "dumol@gnome.org"},
{N_("Romanian"), "ro", "Andrei Popescu", "andreimpopescu@gmail.com"},
{N_("Russian"), "ru", "Антон Самохвалов", "samant.ua@mail.ru"},
{N_("Slovak"), "sk", "Jozef Káčer", "quickparser@gmail.com"},
{N_("Slovak"), "sk", "loptosko", "loptosko@gmail.com"},
{N_("Slovenian"), "sl", "Martin Srebotnjak", "miles@filmsi.net"},
{N_("Albanian"), "sq", "Besnik Bleta", "besnik@programeshqip.org"},
{N_("Serbian"), "sr", "Miloš Popović", "gpopac@gmail.com"},
{N_("Serbian"), "sr@Latn", "Miloš Popović", "gpopac@gmail.com"},
{N_("Sinhala"), "si", "Danishka Navin", "snavin@redhat.com"},
{N_("Sinhala"), "si", "Yajith Ajantha Dayarathna", "yajith@gmail.com"},
{N_("Swedish"), "sv", "Peter Hjalmarsson", "xake@telia.com"},
{N_("Swahili"), "sw", "Paul Msegeya", "msegeya@gmail.com"},
{N_("Tamil"), "ta", "I. Felix", "ifelix25@gmail.com"},
{N_("Tamil"), "ta", "Viveka Nathan K", "vivekanathan@users.sourceforge.net"},
{N_("Telugu"), "te", "Krishnababu Krottapalli", "krottapalli@ymail.com"},
{N_("Thai"), "th", "Isriya Paireepairit", "markpeak@gmail.com"},
{N_("Turkish"), "tr", "Serdar Soytetir", "tulliana@gmail.com"},
{N_("Ukranian"), "uk", "Oleksandr Kovalenko", "alx.kovalenko@gmail.com"},
{N_("Urdu"), "ur", "RKVS Raman", "rkvsraman@gmail.com"},
{N_("Vietnamese"), "vi", N_("T.M.Thanh and the Gnome-Vi Team"), "gnomevi-list@lists.sf.net"},
{N_("Simplified Chinese"), "zh_CN", "Aron Xu", "happyaron.xu@gmail.com"},
{N_("Hong Kong Chinese"), "zh_HK", "Abel Cheung", "abelindsay@gmail.com"},
{N_("Hong Kong Chinese"), "zh_HK", "Ambrose C. Li", "acli@ada.dhs.org"},
{N_("Hong Kong Chinese"), "zh_HK", "Paladin R. Liu", "paladin@ms1.hinet.net"},
{N_("Traditional Chinese"), "zh_TW", "Ambrose C. Li", "acli@ada.dhs.org"},
{N_("Traditional Chinese"), "zh_TW", "Paladin R. Liu", "paladin@ms1.hinet.net"},
{NULL, NULL, NULL, NULL}
};
static const struct translator past_translators[] = {
{N_("Amharic"), "am", "Daniel Yacob", NULL},
{N_("Arabic"), "ar", "Mohamed Magdy", "alnokta@yahoo.com"},
{N_("Bulgarian"), "bg", "Hristo Todorov", NULL},
{N_("Bengali"), "bn", "INDRANIL DAS GUPTA", "indradg@l2c2.org"},
{N_("Bengali"), "bn", "Tisa Nafisa", "tisa_nafisa@yahoo.com"},
{N_("Catalan"), "ca", "JM Pérez Cáncer", NULL},
{N_("Catalan"), "ca", "Robert Millan", NULL},
{N_("Czech"), "cs", "Honza Král", NULL},
{N_("Czech"), "cs", "Miloslav Trmac", "mitr@volny.cz"},
{N_("German"), "de", "Daniel Seifert, Karsten Weiss", NULL},
{N_("British English"), "en_GB", "Luke Ross", "luke@lukeross.name"},
{N_("Spanish"), "es", "JM Pérez Cáncer", NULL},
{N_("Spanish"), "es", "Nicolás Lichtmaier", NULL},
{N_("Spanish"), "es", "Amaya Rodrigo", NULL},
{N_("Spanish"), "es", "Alejandro G Villar", NULL},
{N_("Basque"), "eu", "Iñaki Larrañaga Murgoitio", "dooteo@zundan.com"},
{N_("Basque"), "eu", "Hizkuntza Politikarako Sailburuordetza", "hizkpol@ej-gv.es"},
{N_("Finnish"), "fi", "Arto Alakulju", NULL},
{N_("Finnish"), "fi", "Tero Kuusela", NULL},
{N_("French"), "fr", "Sébastien François", NULL},
{N_("French"), "fr", "Stéphane Pontier", NULL},
{N_("French"), "fr", "Stéphane Wirtel", NULL},
{N_("French"), "fr", "Loïc Jeannin", NULL},
{N_("Galician"), "gl", "Ignacio Casal Quinteiro", NULL},
{N_("Hebrew"), "he", "Pavel Bibergal", NULL},
{N_("Hindi"), "hi", "Ravishankar Shrivastava", NULL},
{N_("Hungarian"), "hu", "Zoltan Sutto", NULL},
{N_("Italian"), "it", "Salvatore di Maggio", NULL},
{N_("Japanese"), "ja", "Ryosuke Kutsuna", NULL},
{N_("Japanese"), "ja", "Taku Yasui", NULL},
{N_("Japanese"), "ja", "Junichi Uekawa", NULL},
{N_("Georgian"), "ka", "Temuri Doghonadze", NULL},
{N_("Korean"), "ko", "Sang-hyun S, A Ho-seok Lee", NULL},
{N_("Korean"), "ko", "Kyeong-uk Son", NULL},
{N_("Lithuanian"), "lt", "Laurynas Biveinis", "laurynas.biveinis@gmail.com"},
{N_("Lithuanian"), "lt", "Gediminas Čičinskas", NULL},
{N_("Lithuanian"), "lt", "Andrius Štikonas", NULL},
{N_("Macedonian"), "mk", "Tomislav Markovski", NULL},
{N_("Bokmål Norwegian"), "nb", "Hallvard Glad", "hallvard.glad@gmail.com"},
{N_("Bokmål Norwegian"), "nb", "Petter Johan Olsen", NULL},
{N_("Bokmål Norwegian"), "nb", "Espen Stefansen", "espenas@gmail.com"},
{N_("Dutch, Flemish"), "nl", "Vincent van Adrighem", "V.vanAdrighem@dirck.mine.nu"},
{N_("Polish"), "pl", "Emil Nowak", "emil5@go2.pl"},
{N_("Polish"), "pl", "Paweł Godlewski", "pawel@bajk.pl"},
{N_("Polish"), "pl", "Krzysztof Foltman", "krzysztof@foltman.com"},
{N_("Polish"), "pl", "Przemysław Sułek", NULL},
{N_("Portuguese-Brazil"), "pt_BR", "Maurício de Lemos Rodrigues Collares Neto", "mauricioc@gmail.com"},
{N_("Russian"), "ru", "Dmitry Beloglazov", "dmaa@users.sf.net"},
{N_("Russian"), "ru", "Alexandre Prokoudine", NULL},
{N_("Russian"), "ru", "Sergey Volozhanin", NULL},
{N_("Slovak"), "sk", "Daniel Režný", NULL},
{N_("Slovak"), "sk", "helix84", NULL},
{N_("Slovak"), "sk", "Richard Golier", NULL},
{N_("Slovenian"), "sl", "Matjaz Horvat", NULL},
{N_("Serbian"), "sr", "Danilo Šegan", "dsegan@gmx.net"},
{N_("Serbian"), "sr", "Aleksandar Urosevic", "urke@users.sourceforge.net"},
{N_("Swedish"), "sv", "Tore Lundqvist", NULL},
{N_("Swedish"), "sv", "Christian Rose", NULL},
{N_("Telugu"), "te", "Mr. Subbaramaih", "info.gist@cdac.in"},
{N_("Turkish"), "tr", "Ahmet Alp BALKAN", NULL},
{N_("Simplified Chinese"), "zh_CN", "Hashao, Rocky S. Lee", NULL},
{N_("Simplified Chinese"), "zh_CN", "Funda Wang", "fundawang@linux.net.cn"},
{N_("Traditional Chinese"), "zh_TW", "Hashao, Rocky S. Lee", NULL},
{NULL, NULL, NULL, NULL}
};
static void
add_developers(GString *str, const struct developer *list)
{
for (; list->name != NULL; list++) {
if (list->email != NULL) {
g_string_append_printf(str, " %s%s%s%s
",
list->email, _(list->name),
list->role ? " (" : "",
list->role ? _(list->role) : "",
list->role ? ")" : "");
} else {
g_string_append_printf(str, " %s%s%s%s
",
_(list->name),
list->role ? " (" : "",
list->role ? _(list->role) : "",
list->role ? ")" : "");
}
}
}
static void
add_translators(GString *str, const struct translator *list)
{
for (; list->language != NULL; list++) {
if (list->email != NULL) {
g_string_append_printf(str, " %s (%s) - %s
",
_(list->language),
list->abbr,
list->email,
_(list->name));
} else {
g_string_append_printf(str, " %s (%s) - %s
",
_(list->language),
list->abbr,
_(list->name));
}
}
}
void
pidgin_dialogs_destroy_all()
{
while (dialogwindows) {
gtk_widget_destroy(dialogwindows->data);
dialogwindows = g_list_remove(dialogwindows, dialogwindows->data);
}
}
static void destroy_win(GtkWidget *button, GtkWidget *win)
{
gtk_widget_destroy(win);
}
#if 0
/* This function puts the version number onto the pixmap we use in the 'about'
* screen in Pidgin. */
static void
pidgin_logo_versionize(GdkPixbuf **original, GtkWidget *widget) {
GdkPixmap *pixmap;
GtkStyle *style;
PangoContext *context;
PangoLayout *layout;
gchar *markup;
gint width, height;
gint lwidth = 0, lheight = 0;
style = gtk_widget_get_style(widget);
gdk_pixbuf_render_pixmap_and_mask(*original, &pixmap, NULL, 255);
width = gdk_pixbuf_get_width(*original);
height = gdk_pixbuf_get_height(*original);
g_object_unref(G_OBJECT(*original));
context = gtk_widget_get_pango_context(widget);
layout = pango_layout_new(context);
markup = g_strdup_printf("%s", DISPLAY_VERSION);
pango_layout_set_font_description(layout, style->font_desc);
pango_layout_set_markup(layout, markup, strlen(markup));
g_free(markup);
pango_layout_get_pixel_size(layout, &lwidth, &lheight);
gdk_draw_layout(GDK_DRAWABLE(pixmap), style->bg_gc[GTK_STATE_NORMAL],
width - (lwidth + 3), 1, layout);
g_object_unref(G_OBJECT(layout));
*original = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL,
0, 0, 0, 0,
width, height);
g_object_unref(G_OBJECT(pixmap));
}
#endif
/* Note: Frees 'string' */
static GtkWidget *
pidgin_build_help_dialog(const char *title, const char *role, GString *string)
{
GtkWidget *win, *vbox, *frame, *logo, *imhtml, *button;
GdkPixbuf *pixbuf;
GtkTextIter iter;
AtkObject *obj;
char *filename, *tmp;
win = pidgin_create_dialog(title, PIDGIN_HIG_BORDER, role, TRUE);
vbox = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(win), FALSE, PIDGIN_HIG_BORDER);
gtk_window_set_default_size(GTK_WINDOW(win), 450, 450);
/* Generate a logo with a version number */
filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "logo.png", NULL);
pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
g_free(filename);
#if 0 /* Don't versionize the logo when the logo has the version in it */
pidgin_logo_versionize(&pixbuf, logo);
#endif
/* Insert the logo */
logo = gtk_image_new_from_pixbuf(pixbuf);
if (pixbuf)
g_object_unref(G_OBJECT(pixbuf));
obj = gtk_widget_get_accessible(logo);
tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL);
atk_object_set_description(obj, tmp);
g_free(tmp);
gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0);
frame = pidgin_create_imhtml(FALSE, &imhtml, NULL, NULL);
gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY);
gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
gtk_imhtml_append_text(GTK_IMHTML(imhtml), string->str, GTK_IMHTML_NO_SCROLL);
gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)), &iter);
gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)), &iter);
button = pidgin_dialog_add_button(GTK_DIALOG(win), GTK_STOCK_CLOSE,
G_CALLBACK(destroy_win), win);
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
gtk_widget_grab_default(button);
gtk_widget_show_all(win);
gtk_window_present(GTK_WINDOW(win));
g_string_free(string, TRUE);
return win;
}
void pidgin_dialogs_about(void)
{
GString *str;
char *tmp;
static GtkWidget *about = NULL;
if (about != NULL) {
gtk_window_present(GTK_WINDOW(about));
return;
}
str = g_string_sized_new(4096);
g_string_append_printf(str,
"