mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-13 03:12:22 +00:00
SVN_SILENT remove unused files
svn path=/trunk/KDE/kdegraphics/kviewshell/plugins/dvi/; revision=469958
This commit is contained in:
parent
089a75b3bd
commit
f5dfa93eb3
82
kdvi.desktop
82
kdvi.desktop
|
@ -1,82 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
GenericName=DVI Viewer
|
||||
GenericName[af]=Dvi Aansig
|
||||
GenericName[ar]=عارض ملفات DVI
|
||||
GenericName[az]=DVI Nümayişçisi
|
||||
GenericName[bg]=Преглед на документи DVI
|
||||
GenericName[br]=Gweler DVI
|
||||
GenericName[bs]=Preglednik DVI dokumenata
|
||||
GenericName[ca]=Visualitzador de DVI
|
||||
GenericName[cs]=Prohlížeč DVI souborů
|
||||
GenericName[cy]=Gwelydd DVI
|
||||
GenericName[da]=DVI-fremviser
|
||||
GenericName[de]=DVI-Betrachter
|
||||
GenericName[el]=Προβολέας DVI
|
||||
GenericName[eo]=DVI-rigardilo
|
||||
GenericName[es]=Visor de documentos DVI
|
||||
GenericName[et]=DVI failide vaataja
|
||||
GenericName[fi]=DVI-näytin
|
||||
GenericName[fr]=Afficheur DVI
|
||||
GenericName[ga]=Amharcán DVI
|
||||
GenericName[gl]=Visor de DVI
|
||||
GenericName[he]=מציג DVI
|
||||
GenericName[hi]=डीवीआई प्रदर्शक
|
||||
GenericName[hr]=Preglednik DVI dokumenata
|
||||
GenericName[hu]=DVI-nézegető
|
||||
GenericName[id]=Viewer DVI
|
||||
GenericName[is]=DVI sjá
|
||||
GenericName[it]=Visore DVI
|
||||
GenericName[ja]=DVIビューア
|
||||
GenericName[ko]=DVI 보기
|
||||
GenericName[lt]=DVI Žiūriklis
|
||||
GenericName[lv]=DVI Skatītājs
|
||||
GenericName[mk]=Прикажувач на DVI
|
||||
GenericName[mt]=Werrej DVI
|
||||
GenericName[nb]=DVI-fremviser
|
||||
GenericName[nl]=DVI-weergaveprogramma
|
||||
GenericName[nn]=DVI-lesar
|
||||
GenericName[pa]=DVI ਦਰਸ਼ਕ
|
||||
GenericName[pl]=Przeglądarka plików DVI
|
||||
GenericName[pt]=Visualizador de DVIs
|
||||
GenericName[pt_BR]=Visualizador de DVI
|
||||
GenericName[ro]=Vizualizor DVI
|
||||
GenericName[ru]=Просмотр файлов DVI
|
||||
GenericName[se]=DVI čájeheaddji
|
||||
GenericName[sk]=Prehliadač DVI súborov
|
||||
GenericName[sl]=Pregledovalnik datotek DVI
|
||||
GenericName[sr]=DVI приказивач
|
||||
GenericName[sr@Latn]=DVI prikazivač
|
||||
GenericName[sv]=DVI-visare
|
||||
GenericName[ta]=DVI காட்சி
|
||||
GenericName[tg]=Намоиши файли DVI
|
||||
GenericName[th]=ตัวแสดงผล DVI
|
||||
GenericName[tr]=DVI Görüntüleyici
|
||||
GenericName[uk]=Переглядач DVI
|
||||
GenericName[uz]=DVI кўрувчи
|
||||
GenericName[ven]=Muvhoni wa DVI
|
||||
GenericName[wa]=Håyneu di fitchîs DVI
|
||||
GenericName[xh]=Umboniseli we DVI
|
||||
GenericName[xx]=xxDVI Viewerxx
|
||||
GenericName[zh_CN]=DVI 查看器
|
||||
GenericName[zh_TW]=DVI 檢視器
|
||||
GenericName[zu]=Umboniseli we DVI
|
||||
Name=KDVI
|
||||
Name[af]=Kdvi
|
||||
Name[ar]=برنامج KDVI
|
||||
Name[eo]=DVI-rigardilo
|
||||
Name[hi]=के-डीवीआई
|
||||
Name[xx]=xxKDVIxx
|
||||
MimeType=application/x-dvi;application/x-gzdvi;application/x-bz2dvi;
|
||||
InitialPreference=6
|
||||
Exec=kdvi %f -caption "%c" %i %m
|
||||
Icon=kdvi
|
||||
Path=
|
||||
Type=Application
|
||||
Terminal=false
|
||||
ServiceTypes=Browser/View
|
||||
X-KDE-Library=kviewerpart
|
||||
X-KDE-BrowserView-Args=dvi
|
||||
DocPath=kdvi/index.html
|
||||
X-KDE-StartupNotify=true
|
||||
Categories=Qt;KDE;Graphics;
|
156
main.cpp
156
main.cpp
|
@ -1,156 +0,0 @@
|
|||
#include <dcopclient.h>
|
||||
#include <dcopref.h>
|
||||
#include <kapplication.h>
|
||||
#include <kcmdlineargs.h>
|
||||
#include <kdebug.h>
|
||||
#include <kurl.h>
|
||||
#include <klocale.h>
|
||||
#include <kaboutdata.h>
|
||||
#include <qdir.h>
|
||||
//Added by qt3to4:
|
||||
#include <Q3CString>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "kviewshell.h"
|
||||
|
||||
|
||||
static KCmdLineOptions options[] =
|
||||
{
|
||||
{ "unique", I18N_NOOP("Check if the file is loaded in another KDVI.\nIf it is, bring up the other KDVI. Otherwise, load the file."), 0 },
|
||||
{ "goto <pagenumber>", I18N_NOOP("Navigate to this page"), 0 },
|
||||
{ "+file(s)", I18N_NOOP("Files to load"), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
|
||||
static const char description[] = I18N_NOOP("A previewer for Device Independent files (DVI files) produced by the TeX typesetting system.");
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
KAboutData about ("kdvi", I18N_NOOP("KDVI"), "1.4",
|
||||
description, KAboutData::License_GPL,
|
||||
"Markku Hinhala, Stephan Kebekus",
|
||||
I18N_NOOP("This program displays Device Independent (DVI) files which are produced by the TeX typesetting system.\n"
|
||||
"KDVI 1.4 is based on original code from KDVI version 0.43 and xdvik."));
|
||||
|
||||
about.addAuthor ("Stefan Kebekus",
|
||||
I18N_NOOP("Current Maintainer."),
|
||||
"kebekus@kde.org",
|
||||
"http://www.mi.uni-koeln.de/~kebekus");
|
||||
|
||||
about.addAuthor ("Markku Hinhala", I18N_NOOP("Author of kdvi 0.4.3"));
|
||||
about.addAuthor ("Nicolai Langfeldt", I18N_NOOP("Maintainer of xdvik"));
|
||||
about.addAuthor ("Paul Vojta", I18N_NOOP("Author of xdvi"));
|
||||
about.addCredit ("Philipp Lehmann", I18N_NOOP("Testing and bug reporting."));
|
||||
about.addCredit ("Wilfried Huss", I18N_NOOP("Re-organisation of source code."));
|
||||
|
||||
KCmdLineArgs::init(argc, argv, &about);
|
||||
KCmdLineArgs::addCmdLineOptions(options);
|
||||
KApplication app;
|
||||
|
||||
// see if we are starting with session management
|
||||
if (app.isRestored())
|
||||
{
|
||||
RESTORE(KViewShell);
|
||||
}
|
||||
else
|
||||
{
|
||||
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
if (args->isSet("unique"))
|
||||
{
|
||||
// With --unique, we need 2 arguments.
|
||||
if (args->count() < 1)
|
||||
{
|
||||
args->usage();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// Find the fully qualified file name of the file we are
|
||||
// loading. Complain, if we are given a URL which does not point
|
||||
// to a local file.
|
||||
KURL url(args->url(0));
|
||||
|
||||
if (!url.isValid())
|
||||
{
|
||||
kdError(4300) << QString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!url.isLocalFile())
|
||||
{
|
||||
kdError(4300) << QString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local "
|
||||
"files if you are using the '--unique' option.")).arg(args->arg(0)) << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
QString qualPath = QFileInfo(url.path()).absFilePath();
|
||||
|
||||
app.dcopClient()->attach();
|
||||
// We need to register as "kviewshell" to stay compatible with existing DCOP-skripts.
|
||||
Q3CString id = app.dcopClient()->registerAs("unique-kviewshell");
|
||||
if (id.isNull())
|
||||
kdError(4300) << "There was an error using dcopClient()->registerAs()." << endl;
|
||||
DCOPCStringList apps = app.dcopClient()->registeredApplications();
|
||||
for ( DCOPCStringList::Iterator it = apps.begin(); it != apps.end(); ++it )
|
||||
{
|
||||
if ((*it).find("kviewshell") == 0)
|
||||
{
|
||||
QByteArray data, replyData;
|
||||
DCOPCString replyType;
|
||||
QDataStream arg(&data, QIODevice::WriteOnly);
|
||||
|
||||
arg.setVersion(QDataStream::Qt_3_1);
|
||||
bool result;
|
||||
arg << qualPath.trimmed();
|
||||
if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(QString)", data, replyType, replyData))
|
||||
kdError(4300) << "There was an error using DCOP." << endl;
|
||||
else
|
||||
{
|
||||
QDataStream reply(&replyData, QIODevice::ReadOnly);
|
||||
|
||||
reply.setVersion(QDataStream::Qt_3_1);
|
||||
if (replyType == "bool")
|
||||
{
|
||||
reply >> result;
|
||||
if (result == true)
|
||||
{
|
||||
if (app.dcopClient()->send( *it, "kmultipage", "jumpToReference(QString)", url.ref()) == true)
|
||||
{
|
||||
app.dcopClient()->detach();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
kdError(4300) << "The DCOP function 'doIt' returned an unexpected type of reply!";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We need to register as "kviewshell" to stay compatible with existing DCOP-skripts.
|
||||
app.dcopClient()->registerAs("kviewshell");
|
||||
KViewShell* shell = new KViewShell("application/x-dvi");
|
||||
shell->show();
|
||||
app.processEvents();
|
||||
|
||||
if (args->count() > 0)
|
||||
{
|
||||
KURL url = args->url(0);
|
||||
if (!url.hasRef() && args->isSet("goto"))
|
||||
{
|
||||
// If the url doesn't already has a reference part, add the
|
||||
// argument of --goto to the url as reference, to make the
|
||||
// KViewShell jump to this page.
|
||||
QString reference = args->getOption("goto");
|
||||
url.setHTMLRef(reference);
|
||||
}
|
||||
shell->openURL(url);
|
||||
}
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|
Loading…
Reference in a new issue