/** * @file * Inkscape About box - implementation. */ /* Authors: * Derek P. Moore * MenTaLguY * Kees Cook * Jon Phillips * Abhishek Sharma * * Copyright (C) 2004 Derek P. Moore * Copyright 2004 Kees Cook * Copyright 2004 Jon Phillips * Copyright 2005 MenTaLguY * * Released under GNU GPL. Read the file 'COPYING' for more information. */ #ifdef HAVE_CONFIG_H # include #endif #include "ui/dialog/aboutbox.h" #include #include #include #include #include #include "path-prefix.h" #include "document.h" #include "svg-view-widget.h" #include "sp-text.h" #include "text-editing.h" #include "ui/icon-names.h" #include "util/units.h" #include "inkscape-version.h" namespace Inkscape { namespace UI { namespace Dialog { static Gtk::Widget *build_splash_widget(); static AboutBox *window=NULL; void AboutBox::show_about() { if (!window) window = new AboutBox(); window->show(); } void AboutBox::hide_about() { if (window) window->hide(); } /** * Constructor */ AboutBox::AboutBox() { // call this first initStrings(); Gtk::Widget *splash=build_splash_widget(); if (splash) { get_content_area()->pack_end(*manage(splash), true, true); splash->show_all(); } set_logo_icon_name(INKSCAPE_ICON("inkscape")); set_program_name("Inkscape"); set_version(Inkscape::version_string); set_website("https://www.inkscape.org"); Gtk::Requisition minimum_size; Gtk::Requisition natural_size; get_preferred_size(minimum_size, natural_size); // allow window to shrink set_size_request(0, 0); set_default_size(minimum_size.width, minimum_size.height); } Gtk::Widget *build_splash_widget() { /* TRANSLATORS: This is the filename of the `About Inkscape' picture in the `screens' directory. Thus the translation of "about.svg" should be the filename of its translated version, e.g. about.zh.svg for Chinese. Please don't translate the filename unless the translated picture exists. */ // Try to get the translated version of the 'About Inkscape' file first. If the // translation fails, or if the file does not exist, then fall-back to the // default untranslated "about.svg" file // // FIXME? INKSCAPE_SCREENSDIR and "about.svg" are in UTF-8, not the // native filename encoding... and the filename passed to sp_document_new // should be in UTF-*8.. auto about = Glib::build_filename(INKSCAPE_SCREENSDIR, _("about.svg")); if (!Glib::file_test (about, Glib::FILE_TEST_EXISTS)) { about = Glib::build_filename(INKSCAPE_SCREENSDIR, "about.svg"); } // Create an Inkscape document from the 'About Inkscape' picture SPDocument *doc=SPDocument::createNewDoc (about.c_str(), TRUE); g_return_val_if_fail(doc != NULL, NULL); SPObject *version = doc->getObjectById("version"); if ( version && SP_IS_TEXT(version) ) { sp_te_set_repr_text_multiline (SP_TEXT (version), Inkscape::version_string); } doc->ensureUpToDate(); // TODO: Return a Gdk::Pixbuf instead of a widget, for better integration // with the parent Gtk::AboutDialog class GtkWidget *v=sp_svg_view_widget_new(doc); // temporary hack: halve the dimensions so the dialog will fit double width=doc->getWidth().value("px") / 2; double height=doc->getHeight().value("px") / 2; doc->doUnref(); SP_SVG_VIEW_WIDGET(v)->setResize(false, static_cast(width), static_cast(height)); Gtk::AspectFrame *frame=new Gtk::AspectFrame(); frame->unset_label(); frame->set_shadow_type(Gtk::SHADOW_NONE); frame->property_ratio() = width / height; frame->add(*manage(Glib::wrap(v))); return frame; } /** * This method must be called before any of the texts are * used for making widgets */ void AboutBox::initStrings() { //############################## //# A U T H O R S //############################## /* This text is copied from the AUTHORS file. * To update it, execute this snippet of sed magic in the toplevel * source directory: * * sed -e 's/^\(.*\) \([^ ]*\)*$/\2_ \1/' AUTHORS | sort | sed -e 's/^\([^_]*\)_ \(.*\)$/\2 \1/;s/^.*$/"\0\\n"/;$s/\\n//' | zenity --text-info * * and paste the result from the combo box here. */ std::vector authors = { "Maximilian Albert", "Joshua A. Andler", "Tavmjong Bah", "Pierre Barbry-Blot", "Jean-François Barraud", "Campbell Barton", "Bill Baxter", "John Beard", "John Bintz", "Arpad Biro", "Nicholas Bishop", "Joshua L. Blocher", "Hanno Böck", "Tomasz Boczkowski", "Adrian Boguszewski", "Henrik Bohre", "Boldewyn", "Daniel Borgmann", "Bastien Bouclet", "Hans Breuer", "Gustav Broberg", "Christopher Brown", "Marcus Brubaker", "Luca Bruno", "Brynn (brynn@inkscapecommunity.com)", "Nicu Buculei", "Bulia Byak", "Pierre Caclin", "Ian Caldwell", "Gail Carmichael", "Ed Catmur", "Chema Celorio", "Jabiertxo Arraiza Cenoz", "Johan Ceuppens", "Zbigniew Chyla", "Alexander Clausen", "John Cliff", "Kees Cook", "Ben Cromwell", "Robert Crosbie", "Jon Cruz", "Aurélie De-Cooman", "Milosz Derezynski", "Daniel Díaz", "Bruno Dilly", "Larry Doolittle", "Nicolas Dufour", "Tim Dwyer", "Maxim V. Dziumanenko", "Moritz Eberl", "Johan Engelen", "Miklos Erdelyi", "Ulf Erikson", "Noé Falzon", "Sebastian Faubel", "Frank Felfe", "Andrew Fitzsimon", "Edward Flick", "Marcin Floryan", "Ben Fowler", "Fred", "Cedric Gemy", "Steren Giannini", "Olivier Gondouin", "Ted Gould", "Toine de Greef", "Michael Grosberg", "Kris De Gussem", "Bryce Harrington", "Dale Harvey", "Aurélio Adnauer Heckert", "Carl Hetherington", "Jos Hirth", "Hannes Hochreiner", "Thomas Holder", "Joel Holdsworth", "Christoffer Holmstedt", "Alan Horkan", "Karl Ove Hufthammer", "Richard Hughes", "Nathan Hurst", "inductiveload", "Thomas Ingham", "Jean-Olivier Irisson", "Bob Jamison", "Ted Janeczko", "Marc Jeanmougin", "jEsuSdA", "Fernando Lucchesi Bastos Jurema", "Lauris Kaplinski", "Lynn Kerby", "Niko Kiirala", "James Kilfiger", "Nikita Kitaev", "Jason Kivlighn", "Adrian Knoth", "Krzysztof Kosiński", "Petr Kovar", "Benoît Lavorata", "Alex Leone", "Julien Leray", "Raph Levien", "Diederik van Lierop", "Nicklas Lindgren", "Vitaly Lipatov", "Ivan Louette", "Pierre-Antoine Marc", "Aurel-Aimé Marmion", "Colin Marquardt", "Craig Marshall", "Ivan Masár", "Dmitry G. Mastrukov", "David Mathog", "Matiphas", "Michael Meeks", "Federico Mena", "MenTaLguY", "Aubanel Monnier", "Vincent Montagne", "Tim Mooney", "Derek P. Moore", "Chris Morgan", "Peter Moulder", "Jörg Müller", "Yukihiro Nakai", "Victor Navez", "Christian Neumair", "Nick", "Andreas Nilsson", "Mitsuru Oka", "Vinícius dos Santos Oliveira", "Martin Owens", "Alvin Penner", "Matthew Petroff", "Jon Phillips", "Zdenko Podobny", "Alexandre Prokoudine", "Jean-René Reinhard", "Alexey Remizov", "Frederic Rodrigo", "Hugo Rodrigues", "Juarez Rudsatz", "Xavier Conde Rueda", "Felipe Corrêa da Silva Sanches", "Christian Schaller", "Marco Scholten", "Tom von Schwerdtner", "Danilo Šegan", "Abhishek Sharma", "Shivaken", "Michael Sloan", "John Smith", "Sandra Snan", "Boštjan Špetič", "Aaron Spike", "Kaushik Sridharan", "Ralf Stephan", "Dariusz Stojek", "Martin Sucha", "~suv", "Pat Suwalski", "Adib Taraben", "Hugh Tebby", "Jonas Termeau", "David Turner", "Andre Twupack", "Aleksandar Urošević", "Alex Valavanis", "Joakim Verona", "Lucas Vieites", "Daniel Wagenaar", "Liam P. White", "Sebastian Wüst", "Michael Wybrow", "Gellule Xg", "Daniel Yacob", "Masatake Yamato", "David Yip"}; set_authors(authors); //############################## //# T R A N S L A T O R S //############################## Glib::ustring translators_text; // TRANSLATORS: Put here your name (and other national contributors') // one per line in the form of: name surname (email). Use \n for newline. Glib::ustring thisTranslation = _("translator-credits"); /** * See if the translators for the current language * made an entry for "translator-credits". If it exists, * put it at the top of the window, add some space between * it and the list of all translators. * * NOTE: Do we need 2 more .po entries for titles: * "translators for this language" * "all translators" ?? */ if (thisTranslation != "translator-credits") { translators_text.append(thisTranslation); translators_text.append("\n\n\n"); } /* This text is copied from the TRANSLATORS file. * To update it, execute this snippet of sed magic in the toplevel * source directory: * * sed -e 's/^\(.*\) \([^ ]*\)*$/\2_ \1/' TRANSLATORS | sed -e 's/^\([^_]*\)_ \(.*\)$/\2 \1/;s/^.*$/"\0\\n"/;$s/\\n//' | zenity --text-info * * and paste the result from the combo box here. */ gchar const *allTranslators = "3ARRANO.com <3arrano@3arrano.com>, 2005.\n" "Adib Taraben , 2004-2014.\n" "Alan Monfort , 2009-2010.\n" "Alastair McKinstry , 2000.\n" "Aleksandar Marković , 2015.\n" "Aleksandar Urošević , 2004-2009.\n" "Alessio Frusciante , 2002, 2003.\n" "Alexander Shopov , 2006.\n" "Alexandre Prokoudine , 2005, 2010-2014.\n" "Alexey Remizov , 2004.\n" "Ali Ghanavatian , 2010.\n" "Álvaro Lopes , 2001, 2002.\n" "Andreas Hyden , 2000.\n" "Andrius Ramanauskas , 2006.\n" "Antonio Codazzi , 2006, 2007.\n" "Antônio Cláudio (LedStyle) , 2006.\n" "Amanpreet Singh Brar Alamwalia , 2005.\n" "Arman Aksoy , 2003.\n" "Arpad Biro , 2004, 2005.\n" "Benedikt Roth , 2000.\n" "Benjamin Weis , 2014.\n" "Benno Schulenberg , 2008.\n" "Boštjan Špetič , 2004, 2005.\n" "Brisa Francesco , 2000.\n" "Bruce Cowan , 2010.\n" "bulia byak , 2004.\n" "Chris jia , 2006.\n" "Christian Meyer , 2000-2002.\n" "Christian Neumair , 2002, 2003.\n" "Christian Rose , 2000-2003.\n" "Cristian Secară , 2010-2013.\n" "Christophe Merlet (RedFox) , 2000-2002.\n" "Clytie Siddall , 2004-2008.\n" "Colin Marquardt , 2004-2006.\n" "Cédric Gemy , 2006.\n" "Daniel Díaz , 2004.\n" "Didier Conchaudron , 2003.\n" "Dimitris Spingos (Δημήτρης Σπίγγος) , 2011-2015.\n" "Dorji Tashi , 2006.\n" "Duarte Loreto 2002, 2003 (Maintainer).\n" "Elias Norberg , 2009.\n" "Equipe de Tradução Inkscape Brasil , 2007.\n" "Fatih Demir , 2000.\n" "Firas Hanife , 2014-2016.\n" "Foppe Benedictus , 2007-2009.\n" "Francesc Dorca , 2003. Traducció sodipodi.\n" "Francisco Javier F. Serrador , 2003.\n" "Francisco Xosé Vázquez Grandal , 2001.\n" "Frederic Rodrigo , 2004-2005.\n" "Ganesh Murmu , 2014.\n" "Ge'ez Frontier Foundation , 2002.\n" "George Boukeas , 2011.\n" "Heiko Wöhrle , 2014.\n" "Hleb Valoshka <375gnu@gmail.com>, 2008-2009.\n" "Hizkuntza Politikarako Sailburuordetza , 2005.\n" "Ilia Penev , 2006.\n" "Ivan Masár , 2006-2014. \n" "Ivan Řihošek , 2014.\n" "Iñaki Larrañaga , 2006.\n" "Jānis Eisaks , 2012-2014.\n" "Jeffrey Steve Borbón Sanabria , 2005.\n" "Jesper Öqvist , 2010, 2011.\n" "Joaquim Perez i Noguer , 2008-2009.\n" "Jörg Müller , 2005.\n" "Jeroen van der Vegt , 2003, 2005, 2008.\n" "Jin-Hwan Jeong , 2009.\n" "Jonathan Ernst , 2006.\n" "Jordi Mas i Hernàndez , 2015.\n" "Jose Antonio Salgueiro Aquino , 2003.\n" "Josef Vybiral , 2005-2006.\n" "Juarez Rudsatz , 2004.\n" "Junichi Uekawa , 2002.\n" "Jurmey Rabgay , 2006.\n" "Kai Lahmann , 2000.\n" "Karl Ove Hufthammer , 2004, 2005.\n" "KATSURAGAWA Naoki , 2006.\n" "Keld Simonsen , 2000, 2001.\n" "Kenji Inoue , 2006-2007.\n" "Khandakar Mujahidul Islam , 2006.\n" "Kingsley Turner , 2006.\n" "Kitae , 2006.\n" "Kjartan Maraas , 2000-2002.\n" "Kris De Gussem , 2008-2015.\n" "Lauris Kaplinski , 2000.\n" "Leandro Regueiro , 2006-2008, 2010.\n" "Liu Xiaoqin , 2008.\n" "Louni Kandulna , 2014.\n" "Luca Bruno , 2005.\n" "Lucas Vieites Fariña, 2003-2013.\n" "Mahesh subedi , 2006.\n" "Marcin Floryan , 2016.\n" "Maren Hachmann , 2015-2016.\n" "Martin Srebotnjak, , 2005, 2010.\n" "Masatake YAMATO , 2002.\n" "Masato Hashimoto , 2009-2014.\n" "Matiphas , 2004-2006.\n" "Mattias Hultgren , 2005, 2006.\n" "Maxim Dziumanenko , 2004.\n" "Mətin Əmirov , 2003.\n" "Mitsuru Oka , 2002.\n" "Morphix User , 2006.\n" "Mufit Eribol , 2000.\n" "Muhammad Bashir Al-Noimi , 2008.\n" "Myckel Habets , 2008.\n" "Nasreen , 2013.\n" "Nguyen Dinh Trung , 2007, 2008.\n" "Nicolas Dufour , 2008-2016.\n" "Paresh prabhu , 2013.\n" "Pawan Chitrakar , 2006.\n" "Przemysław Loesch , 2005.\n" "Quico Llach , 2000. Traducció sodipodi.\n" "Raymond Ostertag , 2002, 2003.\n" "Riku Leino , 2006-2011.\n" "Rune Rønde Laursen , 2006.\n" "Ruud Steltenpool , 2006.\n" "Sangeeta , 2011.\n" "Savitha , 2013.\n" "Serdar Soytetir , 2005.\n" "shivaken , 2004.\n" "Shyam Krishna Bal , 2006.\n" "Simos Xenitellis , 2001, 2011.\n" "Spyros Blanas , 2006, 2011.\n" "Stefan Graubner , 2005.\n" "Supranee Thirawatthanasuk , 2006.\n" "Sushma Joshi , 2011.\n" "Sveinn í Felli , 2014-2015.\n" "Sylvain Chiron , 2016.\n" "Takeshi Aihana , 2000, 2001.\n" "Tim Sheridan , 2007-2016.\n" "Theppitak Karoonboonyanan , 2006.\n" "Thiago Pimentel , 2006.\n" "Toshifumi Sato , 2005.\n" "Jon South , 2006. \n" "Uwe Schöler , 2006-2014.\n" "Valek Filippov , 2000, 2003.\n" "Victor Dachev , 2006.\n" "Victor Westmann , 2011, 2014.\n" "Ville Pätsi, 2013.\n" "Vincent van Adrighem , 2003.\n" "Vital Khilko , 2003.\n" "Vitaly Lipatov , 2002, 2004.\n" "vonHalenbach , 2005.\n" "vrundeshw , 2012.\n" "Waluyo Adi Siswanto , 2011.\n" "Wang Li , 2002.\n" "Wei-Lun Chao , 2006.\n" "Wolfram Strempfer , 2006.\n" "Xavier Conde Rueda , 2004-2008.\n" "Yaron Shahrabani , 2009.\n" "Yukihiro Nakai , 2000, 2003.\n" "Yuri Beznos , 2006.\n" "Yuri Chornoivan , 2007-2014.\n" "Yuri Syrota , 2000.\n" "Yves Guillou , 2004.\n" "Zdenko Podobný , 2003, 2004." ; translators_text.append(allTranslators); set_translator_credits(translators_text); set_license("GPL 3.0 or later"); // Overriden in next line set_license_type(Gtk::LICENSE_GPL_3_0); } void AboutBox::on_response(int response_id) { hide(); } } // namespace Dialog } // namespace UI } // namespace Inkscape /* Local Variables: mode:c++ c-file-style:"stroustrup" c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) indent-tabs-mode:nil fill-column:99 End: */ // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :