[rkward-cvs] SF.net SVN: rkward:[3099] trunk/rkward/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Oct 1 18:14:59 UTC 2010


Revision: 3099
          http://rkward.svn.sourceforge.net/rkward/?rev=3099&view=rev
Author:   tfry
Date:     2010-10-01 18:14:59 +0000 (Fri, 01 Oct 2010)

Log Message:
-----------
Start playing with KNewStuff2 for downloading plugins

Modified Paths:
--------------
    trunk/rkward/rkward/CMakeLists.txt
    trunk/rkward/rkward/settings/CMakeLists.txt
    trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
    trunk/rkward/rkward/settings/rksettingsmoduleplugins.h

Added Paths:
-----------
    trunk/rkward/rkward/settings/rkward.knsrc

Modified: trunk/rkward/rkward/CMakeLists.txt
===================================================================
--- trunk/rkward/rkward/CMakeLists.txt	2010-10-01 10:21:55 UTC (rev 3098)
+++ trunk/rkward/rkward/CMakeLists.txt	2010-10-01 18:14:59 UTC (rev 3099)
@@ -52,7 +52,7 @@
 	@ONLY)
 ADD_DEPENDENCIES(rkward.bin ${RKWARD_WRAPPER_SCRIPT})
 
-TARGET_LINK_LIBRARIES(rkward.bin ${KDE4_KDECORE_LIBS} windows ${RKWARD_ADDLIBS} agents dialogs plugin settings dataeditor core scriptbackends rbackend misc ktexteditor ${KDE4_KHTML_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KROSSCORE_LIBS} ${QT_QTSCRIPT_LIBRARY})
+TARGET_LINK_LIBRARIES(rkward.bin ${KDE4_KDECORE_LIBS} windows ${RKWARD_ADDLIBS} agents dialogs plugin settings dataeditor core scriptbackends rbackend misc ktexteditor ${KDE4_KHTML_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KROSSCORE_LIBS} ${KDE4_KNEWSTUFF2_LIBS} ${QT_QTSCRIPT_LIBRARY})
 
 ########### install files ###############
 

Modified: trunk/rkward/rkward/settings/CMakeLists.txt
===================================================================
--- trunk/rkward/rkward/settings/CMakeLists.txt	2010-10-01 10:21:55 UTC (rev 3098)
+++ trunk/rkward/rkward/settings/CMakeLists.txt	2010-10-01 18:14:59 UTC (rev 3099)
@@ -23,21 +23,4 @@
 
 ADD_LIBRARY(settings STATIC ${settings_STAT_SRCS})
 
-
-########### install files ###############
-
-
-
-
-#original Makefile.am contents follow:
-
-#INCLUDES = $(all_includes)
-#METASOURCES = AUTO
-#noinst_LIBRARIES =  libsettings.a
-#libsettings_a_SOURCES = rksettings.cpp rksettingsmodule.cpp \
-#	rksettingsmodulegeneral.cpp rksettingsmoduleoutput.cpp rksettingsmodulephp.cpp \
-#	rksettingsmoduleplugins.cpp rksettingsmoduler.cpp rksettingsmodulewatch.cpp \
-#	rksettingsmoduleobjectbrowser.cpp rksettingsmoduleconsole.cpp
-#noinst_HEADERS = rksettings.h rksettingsmodule.h rksettingsmodulegeneral.h \
-#	rksettingsmoduleoutput.h rksettingsmodulephp.h rksettingsmoduleplugins.h rksettingsmoduler.h \
-#	rksettingsmodulewatch.h rksettingsmoduleobjectbrowser.h rksettingsmoduleconsole.h
+INSTALL(FILES rkward.knsrc DESTINATION ${CONFIG_INSTALL_DIR})

Modified: trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp	2010-10-01 10:21:55 UTC (rev 3098)
+++ trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp	2010-10-01 18:14:59 UTC (rev 3099)
@@ -2,7 +2,7 @@
                           rksettingsmoduleplugins  -  description
                              -------------------
     begin                : Wed Jul 28 2004
-    copyright            : (C) 2004, 2006, 2007 by Thomas Friedrichsmeier
+    copyright            : (C) 2004, 2006, 2007, 2010 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -21,6 +21,7 @@
 #include <kfiledialog.h>
 #include <kmessagebox.h>
 #include <khbox.h>
+#include <knewstuff2/engine.h>
 
 #include <qlayout.h>
 #include <qlabel.h>
@@ -29,6 +30,7 @@
 #include <qgroupbox.h>
 #include <qcheckbox.h>
 #include <QVBoxLayout>
+#include <QPushButton>
 
 #include "../rkward.h"
 #include "../rkglobals.h"
@@ -106,6 +108,11 @@
 	connect (map_choser, SIGNAL (listChanged ()), this, SLOT (pathsChanged ()));
 	main_vbox->addWidget (map_choser);
 
+#warning REMEMBER TO CLEAN UP
+	main_vbox->addSpacing (2*RKGlobals::spacingHint ());
+	button = new QPushButton ("Push me, Meik", this);
+	main_vbox->addWidget (button);
+	connect (button, SIGNAL (clicked()), this, SLOT (downloadPlugins()));
 
 	main_vbox->addStretch ();
 }
@@ -180,4 +187,14 @@
 	code_size = cg.readEntry ("Code display size", 40);
 }
 
+void RKSettingsModulePlugins::downloadPlugins () {
+	RK_TRACE (SETTINGS);
+
+	KNS::Engine engine (0);
+	if (engine.init ("rkward.knsrc")) {
+		engine.downloadDialogModal (this);
+	}
+}
+
+
 #include "rksettingsmoduleplugins.moc"

Modified: trunk/rkward/rkward/settings/rksettingsmoduleplugins.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleplugins.h	2010-10-01 10:21:55 UTC (rev 3098)
+++ trunk/rkward/rkward/settings/rksettingsmoduleplugins.h	2010-10-01 18:14:59 UTC (rev 3099)
@@ -2,7 +2,7 @@
                           rksettingsmoduleplugins  -  description
                              -------------------
     begin                : Wed Jul 28 2004
-    copyright            : (C) 2004, 2006, 2007 by Thomas Friedrichsmeier
+    copyright            : (C) 2004, 2006, 2007, 2010 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -55,6 +55,8 @@
 	void pathsChanged ();
 	void settingChanged (int);
 	void browseRequest (QStringList* strings);
+	/** Invoke the plugin download dialog. */
+	void downloadPlugins ();
 private:
 	MultiStringSelector *map_choser;
 	QButtonGroup *button_group;

Added: trunk/rkward/rkward/settings/rkward.knsrc
===================================================================
--- trunk/rkward/rkward/settings/rkward.knsrc	                        (rev 0)
+++ trunk/rkward/rkward/settings/rkward.knsrc	2010-10-01 18:14:59 UTC (rev 3099)
@@ -0,0 +1,4 @@
+[KNewStuff2]
+ProvidersUrl=http://rkward.sourceforge.net/temp/GHNS/provider.xml
+Uncompress=always
+TargetDir=rkward-plugins
\ No newline at end of file


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list