X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fui%2Fdialog%2Faboutbox.cpp;h=bb3c5cfa5f959f41c527ed19edc60321ca6420e9;hb=c099a73a820051490fe3afe6cd0b5731b8057e92;hp=524ba3f66eb09d266c94b4e2fefbb724f09847ae;hpb=5c79ce79a51679af052e102874d88e7f77430a79;p=inkscape.git diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 524ba3f66..bb3c5cfa5 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -35,34 +35,48 @@ #include "inkscape_version.h" + + + namespace Inkscape { namespace UI { namespace Dialog { + + static Gtk::Widget *build_splash_widget(); + static Gtk::ScrolledWindow *make_scrolled_text(const Glib::ustring &contents); + static AboutBox *window=NULL; + + void AboutBox::show_about() { - if (!window) { + if (!window) window = new AboutBox(); - } window->show(); } + + void AboutBox::hide_about() { - if (window) { + if (window) window->hide(); - } } + +/** + * Constructor + */ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) { + // call this first initStrings(); Gtk::Notebook *tabs=new Gtk::Notebook(); @@ -106,12 +120,18 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) { set_default_size(requisition.width, requisition.height); } + + + void AboutBox::on_response(int response_id) { if ( response_id == Gtk::RESPONSE_CLOSE ) { AboutBox::hide_about(); } } + + + 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 @@ -155,10 +175,15 @@ Gtk::Widget *build_splash_widget() { return frame; } + + + +/** + * This attempts to emulate the AboutDialog child dialog settings as + * closely as possible. Mostly, that's margin widths and shadows. Size + * is probably set in some other way, but this looked close enough. + */ static Gtk::ScrolledWindow *make_scrolled_text(const Glib::ustring &contents) { - // This attempts to emulate the AboutDialog child dialog settings as - // closely as possible. Mostly, that's margin widths and shadows. Size - // is probably set in some other way, but this looked close enough. Gtk::ScrolledWindow *scrolled=new Gtk::ScrolledWindow(); scrolled->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); @@ -175,12 +200,22 @@ static Gtk::ScrolledWindow *make_scrolled_text(const Glib::ustring &contents) { } + + +/** + * 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. It should be + * periodically updated. + */ authors_text = "Josh Andler\n" "John Bintz\n" @@ -278,16 +313,32 @@ void AboutBox::initStrings() { //# T R A N S L A T O R S //############################## - /* TRANSLATORS: Put here your name (and other national contributors') - one per line in the form of: name surname (email). Use \n for newline. */ + 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 list is copied from the TRANSLATORS file. It should + * be periodically updated. + */ gchar *allTranslators = "3ARRANO.com <3arrano@3arrano.com>, 2005.\n" "Adib Taraben , 2004.\n" @@ -391,10 +442,14 @@ void AboutBox::initStrings() { translators_text.append(allTranslators); + //############################## //# L I C E N S E //############################## + /** + * This text is copied from the COPYING file + */ license_text = " GNU GENERAL PUBLIC LICENSE\n" " Version 2, June 1991\n" @@ -741,6 +796,8 @@ void AboutBox::initStrings() { } + + } // namespace Dialog } // namespace UI } // namespace Inkscape