Changeset View
Changeset View
Standalone View
Standalone View
shell/main.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 32 | { | |||
---|---|---|---|---|---|
48 | aboutData.setupCommandLine(&parser); | 48 | aboutData.setupCommandLine(&parser); | ||
49 | 49 | | |||
50 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("p") << QStringLiteral("page"), i18n("Page of the document to be shown"), QStringLiteral("number"))); | 50 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("p") << QStringLiteral("page"), i18n("Page of the document to be shown"), QStringLiteral("number"))); | ||
51 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("presentation"), i18n("Start the document in presentation mode"))); | 51 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("presentation"), i18n("Start the document in presentation mode"))); | ||
52 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("print"), i18n("Start with print dialog"))); | 52 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("print"), i18n("Start with print dialog"))); | ||
53 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("print-and-exit"), i18n("Start with print dialog and exit after printing"))); | 53 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("print-and-exit"), i18n("Start with print dialog and exit after printing"))); | ||
54 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("unique"), i18n("\"Unique instance\" control"))); | 54 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("unique"), i18n("\"Unique instance\" control"))); | ||
55 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("noraise"), i18n("Not raise window"))); | 55 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("noraise"), i18n("Not raise window"))); | ||
56 | parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("find"), i18n("Find a string on the text"), QStringLiteral("string"))); | ||||
56 | parser.addPositionalArgument(QStringLiteral("urls"), i18n("Documents to open. Specify '-' to read from stdin.")); | 57 | parser.addPositionalArgument(QStringLiteral("urls"), i18n("Documents to open. Specify '-' to read from stdin.")); | ||
57 | 58 | | |||
58 | parser.process(app); | 59 | parser.process(app); | ||
59 | aboutData.processCommandLine(&parser); | 60 | aboutData.processCommandLine(&parser); | ||
60 | 61 | | |||
61 | // see if we are starting with session management | 62 | // see if we are starting with session management | ||
62 | if (app.isSessionRestored()) | 63 | if (app.isSessionRestored()) | ||
63 | { | 64 | { | ||
Show All 12 Lines | 76 | case Okular::Error: | |||
76 | return -1; | 77 | return -1; | ||
77 | case Okular::AttachedOtherProcess: | 78 | case Okular::AttachedOtherProcess: | ||
78 | return 0; | 79 | return 0; | ||
79 | case Okular::Success: | 80 | case Okular::Success: | ||
80 | // Do nothing | 81 | // Do nothing | ||
81 | break; | 82 | break; | ||
82 | } | 83 | } | ||
83 | } | 84 | } | ||
84 | | ||||
85 | return app.exec(); | 85 | return app.exec(); | ||
86 | } | 86 | } | ||
87 | 87 | | |||
88 | /* kate: replace-tabs on; indent-width 4; */ | 88 | /* kate: replace-tabs on; indent-width 4; */ |