~ubuntu-branches/ubuntu/lucid/kchmviewer/lucid

« back to all changes in this revision

Viewing changes to src/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Tallon
  • Date: 2006-06-08 20:08:39 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20060608200839-8b7jodug8yvtj126
Tags: upstream-2.5
ImportĀ upstreamĀ versionĀ 2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include "kchmmainwindow.h"
25
25
#include "kchmconfig.h"
 
26
#include "kchmkeyeventfilter.h"
26
27
 
27
28
#if defined (USE_KDE)
28
29
        #include <kaboutdata.h>
30
31
 
31
32
KCHMMainWindow * mainWindow;
32
33
 
 
34
 
33
35
int main( int argc, char ** argv )
34
36
{
35
37
#if defined (USE_KDE)
36
38
        static KCmdLineOptions options[] =
37
39
        {
38
 
        { "autotestmode", I18N_NOOP("Perform auto testing"), 0 },
39
 
                { "+[chmfile]", I18N_NOOP("A CHM file to show"), 0 },
 
40
        { "autotestmode", "Perform auto testing", 0 },
 
41
                { "shortautotestmode", "Perform short auto testing", 0 },
 
42
                { "+[chmfile]", "A CHM file to show", 0 },
40
43
/*              { "search <query>", I18N_NOOP("'--search <query>' specifies the search query to search, and activate the first entry if found"), 0 },
41
44
                { "sindex <word>", I18N_NOOP("'--sindex <word>' specifies the word to find in index, and activate if found"), 0 },
42
45
                { "sbook <word>", I18N_NOOP("'--sbook <text>' specifies the word to find in bookmarks, and activate if found"), 0 },
43
46
*/              KCmdLineLastOption
44
47
        };
45
48
 
46
 
        KAboutData aboutdata ( APP_NAME,
47
 
                                I18N_NOOP(APP_NAME),
 
49
        KAboutData aboutdata ( "kchmviewer",
 
50
                                APP_NAME,
48
51
                                APP_VERSION,
49
52
                                I18N_NOOP("CHM file viewer"),
50
53
                                KAboutData::License_GPL,
51
 
                                "(c) 2005 Georgy Yunaev, gyunaev@sourceforge.net",
 
54
                                "(c) 2005 George Yunaev, gyunaev@sourceforge.net",
52
55
                                0,
53
56
                                "http://kchmviewer.sourceforge.net",
54
57
                                "gyunaev@sourceforge.net");
55
58
 
 
59
        KLocale::setMainCatalogue( "kchmviewer" );
56
60
        KCmdLineArgs::init (argc, argv, &aboutdata);
57
61
        KCmdLineArgs::addCmdLineOptions( options );
58
62
 
60
64
#else
61
65
        QApplication app( argc, argv );
62
66
#endif
63
 
 
 
67
        
64
68
        appConfig.load();
 
69
        app.installEventFilter( &gKeyEventFilter );
65
70
        
66
71
        mainWindow = new KCHMMainWindow();
67
72
        mainWindow->show();