mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 10:55:37 +00:00
some more kpdf -> oKular
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=471466
This commit is contained in:
parent
e3d38572aa
commit
3a09624824
|
@ -1,12 +1,12 @@
|
|||
SUBDIRS = conf core ui shell generators
|
||||
|
||||
INCLUDES = -I$(top_builddir)/kpdf $(all_includes) $(FREETYPE_CFLAGS)
|
||||
INCLUDES = $(all_includes) $(FREETYPE_CFLAGS)
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
messages: rc.cpp
|
||||
$(EXTRACTRC) `find . -name "*.rc" -o -name "*.ui"` >> rc.cpp
|
||||
$(XGETTEXT) `find . -name "*.cpp" -o -name "*.cc" -o -name "*.h"` -o $(podir)/kpdf.pot
|
||||
$(XGETTEXT) `find . -name "*.cpp" -o -name "*.cc" -o -name "*.h"` -o $(podir)/oKular.pot
|
||||
|
||||
KDE_ICON = oKular
|
||||
|
||||
|
@ -18,9 +18,9 @@ kde_module_LTLIBRARIES = liboKularpart.la
|
|||
liboKularpart_la_SOURCES = dcop.skel part.cpp
|
||||
liboKularpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
|
||||
liboKularpart_la_LIBADD = conf/liboKularconf.la core/liboKularcore.la \
|
||||
ui/libkpdfui.la ui/painter_agg2/libagg2.la $(LIB_KPARTS) \
|
||||
ui/liboKularui.la ui/painter_agg2/libagg2.la $(LIB_KPARTS) \
|
||||
$(LIB_KFILE) $(LIB_KDEPRINT) $(LIB_KUTILS) $(LIB_KNEWSTUFF) \
|
||||
$(LIB_KHTML) -lm
|
||||
$(LIB_KHTML) -lm
|
||||
|
||||
partdesktopdir = $(kde_servicesdir)
|
||||
partdesktop_DATA = oKular_part.desktop
|
||||
|
|
14
part.cpp
14
part.cpp
|
@ -75,26 +75,26 @@
|
|||
// definition of searchID for this class
|
||||
#define PART_SEARCH_ID 1
|
||||
|
||||
typedef KParts::GenericFactory<KPDF::Part> KPDFPartFactory;
|
||||
K_EXPORT_COMPONENT_FACTORY(libkpdfpart, KPDFPartFactory)
|
||||
typedef KParts::GenericFactory<oKular::Part> oKularPartFactory;
|
||||
K_EXPORT_COMPONENT_FACTORY(liboKularpart, oKularPartFactory)
|
||||
|
||||
using namespace KPDF;
|
||||
using namespace oKular;
|
||||
|
||||
Part::Part(QWidget *parentWidget, const char *widgetName,
|
||||
QObject *parent, const char *name,
|
||||
const QStringList & /*args*/ )
|
||||
: DCOPObject("kpdf"), KParts::ReadOnlyPart(parent, name), m_viewportDirty( 0 ),
|
||||
: DCOPObject("oKular"), KParts::ReadOnlyPart(parent, name), m_viewportDirty( 0 ),
|
||||
m_showMenuBarAction(0), m_showFullScreenAction(0), m_actionsSearched(false),
|
||||
m_searchStarted(false)
|
||||
{
|
||||
// load catalog for translation
|
||||
KGlobal::locale()->insertCatalogue("kpdf");
|
||||
KGlobal::locale()->insertCatalogue("oKular");
|
||||
|
||||
// create browser extension (for printing when embedded into browser)
|
||||
m_bExtension = new BrowserExtension(this);
|
||||
|
||||
// we need an instance
|
||||
setInstance(KPDFPartFactory::instance());
|
||||
setInstance(oKularPartFactory::instance());
|
||||
|
||||
// build the document
|
||||
m_document = new KPDFDocument(&m_loadedGenerators);
|
||||
|
@ -419,7 +419,7 @@ KAboutData* Part::createAboutData()
|
|||
// the non-i18n name here must be the same as the directory in
|
||||
// which the part's rc file is installed ('partrcdir' in the
|
||||
// Makefile)
|
||||
KAboutData* aboutData = new KAboutData("kpdfpart", I18N_NOOP("KPDF::Part"), "0.1");
|
||||
KAboutData* aboutData = new KAboutData("oKularpart", I18N_NOOP("oKular::Part"), "0.1");
|
||||
aboutData->addAuthor("Wilco Greven", 0, "greven@kde.org");
|
||||
return aboutData;
|
||||
}
|
||||
|
|
2
part.h
2
part.h
|
@ -43,7 +43,7 @@ class PageView;
|
|||
class PresentationWidget;
|
||||
class SearchWidget;
|
||||
|
||||
namespace KPDF {
|
||||
namespace oKular {
|
||||
|
||||
class BrowserExtension;
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ static KCmdLineOptions options[] =
|
|||
int main(int argc, char** argv)
|
||||
{
|
||||
KAboutData about(
|
||||
"kpdf",
|
||||
I18N_NOOP("KPDF"),
|
||||
"oKular",
|
||||
I18N_NOOP("oKular"),
|
||||
version,
|
||||
description,
|
||||
KAboutData::License_GPL,
|
||||
|
@ -55,21 +55,21 @@ int main(int argc, char** argv)
|
|||
// see if we are starting with session management
|
||||
if (app.isRestored())
|
||||
{
|
||||
RESTORE(KPDF::Shell);
|
||||
RESTORE(oKular::Shell);
|
||||
} else {
|
||||
// no session.. just start up normally
|
||||
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
if (args->count() == 0)
|
||||
{
|
||||
KPDF::Shell* widget = new KPDF::Shell;
|
||||
oKular::Shell* widget = new oKular::Shell;
|
||||
widget->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < args->count(); ++i)
|
||||
{
|
||||
KPDF::Shell* widget = new KPDF::Shell(args->url(i));
|
||||
oKular::Shell* widget = new oKular::Shell(args->url(i));
|
||||
widget->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,16 +42,16 @@
|
|||
// local includes
|
||||
#include "shell.h"
|
||||
|
||||
using namespace KPDF;
|
||||
using namespace oKular;
|
||||
|
||||
Shell::Shell()
|
||||
: KParts::MainWindow(0, "KPDF::Shell"), m_menuBarWasShown(true), m_toolBarWasShown(true)
|
||||
: KParts::MainWindow(0, "oKular::Shell"), m_menuBarWasShown(true), m_toolBarWasShown(true)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
Shell::Shell(const KURL &url)
|
||||
: KParts::MainWindow(0, "KPDF::Shell"), m_menuBarWasShown(true), m_toolBarWasShown(true)
|
||||
: KParts::MainWindow(0, "oKular::Shell"), m_menuBarWasShown(true), m_toolBarWasShown(true)
|
||||
{
|
||||
m_openUrl = url;
|
||||
init();
|
||||
|
@ -66,12 +66,12 @@ void Shell::init()
|
|||
// this routine will find and load our Part. it finds the Part by
|
||||
// name which is a bad idea usually.. but it's alright in this
|
||||
// case since our Part is made for this Shell
|
||||
KParts::Factory *factory = (KParts::Factory *) KLibLoader::self()->factory("libkpdfpart");
|
||||
KParts::Factory *factory = (KParts::Factory *) KLibLoader::self()->factory("liboKularpart");
|
||||
if (factory)
|
||||
{
|
||||
// now that the Part is loaded, we cast it to a Part to get
|
||||
// our hands on it
|
||||
m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", this, 0, "KParts::ReadOnlyPart");
|
||||
m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "oKular_part", this, 0, "KParts::ReadOnlyPart");
|
||||
if (m_part)
|
||||
{
|
||||
// then, setup our actions
|
||||
|
@ -88,7 +88,7 @@ void Shell::init()
|
|||
{
|
||||
// if we couldn't find our Part, we exit since the Shell by
|
||||
// itself can't do anything useful
|
||||
KMessageBox::error(this, i18n("Unable to find kpdf part."));
|
||||
KMessageBox::error(this, i18n("Unable to find oKular part."));
|
||||
m_part = 0;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <kmimetype.h>
|
||||
class KTempFile;
|
||||
|
||||
namespace KPDF
|
||||
namespace oKular
|
||||
{
|
||||
class Part;
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SUBDIRS = data painter_agg2 .
|
||||
|
||||
INCLUDES = -I$(srcdir)/.. -I$(srcdir)/painter_agg2 -I$(top_builddir)/kpdf $(all_includes)
|
||||
INCLUDES = -I$(srcdir)/.. -I$(srcdir)/painter_agg2 -I.. $(all_includes)
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
|
|
Loading…
Reference in a new issue