
/* -*- mode: c++; indent-tabs-mode: nil; -*-
 *
 * This file is part of the Mango recipe management distribution.
 * Copyright (c) 2000-2003, Roland Jesse
 * All rights reserved.
 *
 * For license and copyright information see the file COPYRIGHT or 
 * <http://www.opensource.org/licenses/bsd-license.html>.
 *
 * $Id: AboutForm.ui.h,v 1.13 2003/10/30 14:20:42 rjesse Exp $
 */

#include "resources.h"
 
void
AboutForm::init()
{
   QString text = AboutTitleText->text();
   text.append( " " MANGO_VERSION_STRING);
   AboutTitleText->setText( text);

   text = AuthorTextBrowser->text();
   text.append( "<h1>");
   text.append( tr( "Main author"));
   text.append( "</h1>");
   text.append( addAuthor( "Roland Jesse", "rjesse@users.sf.net"));
   text.append( "<h1>");
   text.append( tr( "Translations", "Headline used for listing all translators."));
   text.append( "</h1><ul>");
   text.append( addTranslator( "Roland Jesse", "rjesse@users.sf.net",
                               tr( "German", "Name of the german language.")));
   text.append( addTranslator( "Muhammad Panji", "sumodirjo@yahoo.co.uk",
                               tr( "Indonesian", "Name of the indonesian language.")));
   text.append( addTranslator( "Quique", "quique@sindominio.net",
                               tr( "Spanish", "Name of the spanish language.")));
   text.append( addTranslator( "Ricardo Russo", "riccardo.russo@inwind.it",
                               tr( "Italian", "Name of the italian language.")));
   text.append( "</ul>");
   AuthorTextBrowser->setText( text);
   m_busy->start();
}

void
AboutForm::destroy()
{
}

QString
AboutForm::addAuthor( const QString& name, const QString& email)
{
   QString text;
   text.append( name);
   text.append( " &lt;<a href=\"mailto:");
   text.append( email);
   text.append( "\">");
   text.append( email);
   text.append( "</a>&gt;");
   return text;
}

QString
AboutForm::addTranslator( const QString& name,
                          const QString& email,
                          const QString& lang)
{
   QString text;
   QTextOStream( &text)
      << "<li>"
      << lang << ": " 
      << name << " &lt;<a href=\"mailto:" 
      << email << "\">" << email << "</a>&gt;"
      << "</li>";
   return text;
}
