[Marble-commits] KDE/kdeedu/marble/src
Jens-Michael Hoffmann
jensmh at gmx.de
Fri Mar 5 15:58:07 CET 2010
SVN commit 1099426 by jmhoffmann:
Port Marble to KNewStuff3/GHNS3 (Get Hot New Stuff).
Patch contributed by Rüdiger Sonderfeld <ruediger at c-plusplus.de>
CCMAIL: ruediger at c-plusplus.de
M +2 -2 CMakeLists.txt
M +6 -0 marble.knsrc
M +10 -12 marble_part.cpp
--- trunk/KDE/kdeedu/marble/src/CMakeLists.txt #1099425:1099426
@@ -95,7 +95,7 @@
set(marblepart_SRCS marble_part.cpp)
kde4_add_kcfg_files(marblepart_SRCS settings.kcfgc)
kde4_add_plugin(marble_part WITH_PREFIX ${marblepart_SRCS} ControlView.cpp)
- target_link_libraries(marble_part ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF2_LIBS} marblewidget)
+ target_link_libraries(marble_part ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF3_LIBS} marblewidget)
install(TARGETS marble_part DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES marble_part.desktop DESTINATION ${SERVICES_INSTALL_DIR})
@@ -153,7 +153,7 @@
target_link_libraries (
marble
${KDE4_KPARTS_LIBS}
- ${KDE4_KNEWSTUFF2_LIBS}
+ ${KDE4_KNEWSTUFF3_LIBS}
marblewidget
)
endif (QTONLY)
--- trunk/KDE/kdeedu/marble/src/marble.knsrc #1099425:1099426
@@ -2,3 +2,9 @@
ProvidersUrl=http://edu.kde.org/marble/newstuff/providers.xml
InstallPath=.marble/data/maps
Uncompress=true
+
+[KNewStuff3]
+ProvidersUrl=http://edu.kde.org/marble/newstuff/providers.xml
+Categories=Marble,Maps
+TargetDir=.marble/data/maps
+Uncompress=archive
--- trunk/KDE/kdeedu/marble/src/marble_part.cpp #1099425:1099426
@@ -47,8 +47,8 @@
#include <kstatusbar.h>
#include <ktoggleaction.h>
#include <ktogglefullscreenaction.h>
-#include <knewstuff2/ui/knewstuffaction.h>
-#include <knewstuff2/engine.h>
+#include <knewstuff3/knewstuffaction.h>
+#include <knewstuff3/downloaddialog.h>
#include <KStandardDirs>
#include <kdeprintdialog.h>
@@ -652,11 +652,11 @@
actionCollection() );
// Action: Get hot new stuff
- m_newStuffAction = KNS::standardAction( i18nc( "Action for downloading maps (GHNS)",
- "Download Maps..."),
- this,
- SLOT( showNewStuffDialog() ),
- actionCollection(), "new_stuff" );
+ m_newStuffAction = KNS3::standardAction( i18nc( "Action for downloading maps (GHNS)",
+ "Download Maps..."),
+ this,
+ SLOT( showNewStuffDialog() ),
+ actionCollection(), "new_stuff" );
m_newStuffAction->setStatusTip( i18nc( "Status tip", "Download new maps"));
m_newStuffAction->setShortcut( Qt::CTRL + Qt::Key_N );
@@ -947,11 +947,9 @@
"marble/marble.knsrc" );
kDebug() << "KNS config file:" << newStuffConfig;
- KNS::Engine engine;
- bool ret = engine.init( newStuffConfig );
- if ( ret ) {
- KNS::Entry::List entries = engine.downloadDialogModal(0);
- }
+ QPointer<KNS3::DownloadDialog> dialog(new KNS3::DownloadDialog(newStuffConfig));
+ dialog->exec();
+ delete dialog;
// Update the map theme widget by updating the model.
// Shouldn't be needed anymore ...
More information about the Marble-commits
mailing list