Riactivate the very very very, and I underline very, experimental newstuff support we had before the KNS1 -> KNS2 switch:

- install a newstuff rc config, pointing to the NS1 stuff on okular.kde.org
- show the download dialog for newstuff, properly (hopefully) initialized
- proper linking for the okularpart

svn path=/trunk/KDE/kdegraphics/okular/; revision=690047
This commit is contained in:
Pino Toscano 2007-07-19 22:27:45 +00:00
parent d57dc437b5
commit 301ab93196
4 changed files with 13 additions and 10 deletions

View file

@ -150,7 +150,7 @@ kde4_add_ui_files(okularpart_SRCS
kde4_add_plugin(okularpart WITH_PREFIX ${okularpart_SRCS})
target_link_libraries(okularpart okularcore ${KDE4_KNEWSTUFF_LIBS} ${KDE4_KHTML_LIBS} ${MATH_LIB})
target_link_libraries(okularpart okularcore ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF2_LIBS} ${MATH_LIB})
install(TARGETS okularpart DESTINATION ${PLUGIN_INSTALL_DIR})

View file

@ -53,6 +53,7 @@
#include <kio/job.h>
#include <kicon.h>
#include <kfilterdev.h>
#include <knewstuff2/engine.h>
// local includes
#include "aboutdata.h"
@ -62,9 +63,6 @@
#include "ui/thumbnaillist.h"
#include "ui/side_reviews.h"
#include "ui/minibar.h"
#if 0
#include "ui/newstuff.h"
#endif
#include "ui/embeddedfilesdialog.h"
#include "ui/propertiesdialog.h"
#include "ui/presentationwidget.h"
@ -1202,13 +1200,11 @@ void Part::slotSaveFileAs()
void Part::slotGetNewStuff()
{
#if 0
KNS::Engine engine;
engine.init( "okular.knsrc" );
// show the modal dialog over pageview and execute it
NewStuffDialog * dialog = new NewStuffDialog( m_pageView );
connect ( dialog , SIGNAL ( loadItemClicked( const KUrl & ) ), this , SLOT ( openUrlFromDocument ( const KUrl & ) ) );
dialog->exec();
delete dialog;
#endif
KNS::Entry::List entries = engine.downloadDialogModal( m_pageView );
Q_UNUSED( entries )
}

View file

@ -37,3 +37,8 @@ install(FILES
ghns_star_gray.png
DESTINATION ${DATA_INSTALL_DIR}/okular/pics)
# newstuff
install(FILES
okular.knsrc
DESTINATION ${CONFIG_INSTALL_DIR})

2
ui/data/okular.knsrc Normal file
View file

@ -0,0 +1,2 @@
[KNewStuff2]
ProvidersUrl=http://okular.kde.org/newstuff/providers.xml