CVS commit by eros: KPDF HotNewStuff Browser! It's not yet complete (file dowload and internal notifies are missing) but the new stuff browser is running. The ui is modeled on an Aaron's mockup. NewStuff: Fetches the providers list (kpdf.kde.org/newstuff/providers.xml), lets the user select a provider and displays provider's contents in a KHMTL part (for flexibility and eye candy). Internally we use KNS' Entry and Provider structures only, doing all the transfer operations by hand via KIO::get jobs. Download will be done internally too (to give better consistancy in the interface). Network timeouts, problems or info messages are notified in a statusbar- like widget and we try to keep all information in the dialog, without using messageBoxes Part: Added the action and the dialog invocation Makefiles: Link the KNEWSTUFF and KHTML libraries. A ui/newstuff.cpp 1.1.2.1 [GPL (v2+)] A ui/newstuff.h 1.1.2.1 [GPL (v2+)] A ui/data/ghns.png 1.1.2.1 A ui/data/ghns_star.png 1.1.2.1 A ui/data/ghns_star_gray.png 1.1.2.1 A ui/data/sources/ghns.svg 1.1.2.1 M +2 -1 Makefile.am 1.19.2.2 M +13 -1 part.cpp 1.25.2.7 M +1 -0 part.h 1.10.2.4 M +2 -0 part.rc 1.7.2.6 M +1 -1 ui/Makefile.am 1.8.2.7 M +4 -0 ui/data/Makefile.am 1.1.2.3 --- kdegraphics/kpdf/ui/Makefile.am #1.8.2.6:1.8.2.7 @@ -9,5 +9,5 @@ pageviewannotator.cpp minibar.cpp thumbnaillist.cpp \ searchwidget.cpp toc.cpp propertiesdialog.cpp \ - presentationwidget.cpp side_reviews.cpp + presentationwidget.cpp side_reviews.cpp newstuff.cpp pageview.lo: ../conf/settings.h --- kdegraphics/kpdf/part.cpp #1.25.2.6:1.25.2.7 @@ -62,4 +62,5 @@ #include "ui/side_reviews.h" #include "ui/minibar.h" +#include "ui/newstuff.h" #include "ui/propertiesdialog.h" #include "ui/presentationwidget.h" @@ -239,4 +240,7 @@ Part::Part(QWidget *parentWidget, const slotShowLeftPanel(); + KAction * ghns = new KAction(i18n("&Get new stuff"), "knewstuff", 0, this, SLOT(slotGetNewStuff()), ac, "get_new_stuff"); + ghns->setShortcut( "G" ); // TEMP, REMOVE ME! + m_showProperties = new KAction(i18n("&Properties"), "info", 0, this, SLOT(slotShowProperties()), ac, "properties"); m_showProperties->setEnabled( false ); @@ -566,4 +570,12 @@ void Part::slotSaveFileAs() } +void Part::slotGetNewStuff() +{ + // show the modal dialog over pageview and execute it + NewStuffDialog * dialog = new NewStuffDialog( m_pageView ); + dialog->exec(); + delete dialog; +} + void Part::slotPreferences() { --- kdegraphics/kpdf/part.h #1.10.2.3:1.10.2.4 @@ -97,4 +97,5 @@ protected slots: void slotFindNext(); void slotSaveFileAs(); + void slotGetNewStuff(); void slotPreferences(); void slotNewConfig(); --- kdegraphics/kpdf/part.rc #1.7.2.5:1.7.2.6 @@ -7,4 +7,6 @@ + + &Edit --- kdegraphics/kpdf/Makefile.am #1.19.2.1:1.19.2.2 @@ -20,5 +20,6 @@ libkpdfpart_la_LIBADD = xpdf/xpdf/libxpdf.la conf/libkpdfconf.la core/libkpdfcore.la \ ui/libkpdfui.la ui/painter_agg2/libagg2.la $(LIB_KPARTS) \ - $(LIB_KFILE) $(LIB_KDEPRINT) $(LIB_KUTILS) -lm + $(LIB_KFILE) $(LIB_KDEPRINT) $(LIB_KUTILS) $(LIB_KNEWSTUFF) \ + $(LIB_KHTML) -lm partdesktopdir = $(kde_servicesdir) --- kdegraphics/kpdf/ui/data/Makefile.am #1.1.2.2:1.1.2.3 @@ -11,4 +11,8 @@ upleftarrow.png +# install misc images +miscpicsdir = $(kde_datadir)/kpdf/pics +miscpics_DATA = ghns.png ghns_star.png ghns_star_gray.png + # install annotator xml tools description xmldir = $(kde_datadir)/kpdf