~ubuntu-branches/ubuntu/quantal/kiten/quantal-proposed

« back to all changes in this revision

Viewing changes to kanjibrowser/main.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-16 13:14:44 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111216131444-fxt8pt2pha54qmdu
Tags: 4:4.7.90-0ubuntu1
New upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * This file is part of Kiten, a KDE Japanese Reference Tool                 *
 
3
 * Copyright (C) 2011 Daniel E. Moctezuma <democtezuma@gmail.com>            *
 
4
 *                                                                           *
 
5
 * This library is free software; you can redistribute it and/or             *
 
6
 * modify it under the terms of the GNU Library General Public               *
 
7
 * License as published by the Free Software Foundation; either              *
 
8
 * version 2 of the License, or (at your option) any later version.          *
 
9
 *                                                                           *
 
10
 * This library is distributed in the hope that it will be useful,           *
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
 
13
 * Library General Public License for more details.                          *
 
14
 *                                                                           *
 
15
 * You should have received a copy of the GNU Library General Public License *
 
16
 * along with this library; see the file COPYING.LIB.  If not, write to      *
 
17
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
 
18
 * Boston, MA 02110-1301, USA.                                               *
 
19
 *****************************************************************************/
 
20
 
 
21
#include <KAboutData>
 
22
#include <KCmdLineArgs>
 
23
#include <KLocale>
 
24
#include <KUniqueApplication>
 
25
 
 
26
#include "kanjibrowser.h"
 
27
 
 
28
static const char description[] = I18N_NOOP( "Kiten's Kanji Browser, a KDE Japanese Reference Tool" );
 
29
static const char version[] = "1.0";
 
30
 
 
31
int main( int argc, char **argv )
 
32
{
 
33
  KAboutData about(   "kitenkanjibrowser"
 
34
                    , "kiten"
 
35
                    , ki18n( "kitenkanjibrowser" )
 
36
                    , version
 
37
                    , ki18n( description )
 
38
                    , KAboutData::License_GPL_V2
 
39
                    , ki18n( "(C) 2011 Daniel E. Moctezuma" )
 
40
                    , KLocalizedString()
 
41
                    , "http://edu.kde.org/kiten"
 
42
                    , "democtezuma@gmail.com" );
 
43
  about.addAuthor(   ki18n( "Daniel E. Moctezuma" )
 
44
                   , KLocalizedString()
 
45
                   , "democtezuma@gmail.com" );
 
46
  about.setOrganizationDomain( "kde.org" );
 
47
 
 
48
  KCmdLineArgs::init( argc, argv, &about );
 
49
 
 
50
  KUniqueApplication app;
 
51
  if( app.isSessionRestored() )
 
52
  {
 
53
    RESTORE( KanjiBrowser );
 
54
  }
 
55
  else
 
56
  {
 
57
    KanjiBrowser *kanjiBrowser = new KanjiBrowser();
 
58
    kanjiBrowser->show();
 
59
  }
 
60
 
 
61
  return app.exec();
 
62
}