[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    Re: [kde-edu-devel] size of kdeedu
From:       Josef Spillner <spillner () kde ! org>
Date:       2003-09-21 16:39:25
[Download RAW message or body]

On Friday 12 September 2003 01:12, Cornelius Schumacher wrote:
> > well now. (The only showstopper seems to be a strange KDialogBase
> > bug.)
>
> When do you think can we fix this bug?

I have worked around it, so at least it's not visible anymore.
KDialog(Base) is using QTimers internally so that could be the problem.

> We should probably move it to kdelibs, if there are no objections.
> Josef, would you take over the responsibility for this lib? I probably
> don't have enough time to make sure that it gets into a state ready for
> release as part of kdelibs.

I'm trying...

As a start for kdeedu people, see this patch to kvoctrain (I chose this
since it seemed to be the easiest one).
2 configurations are needed after applying this patch:

a) kvoctrainrc, which contains the upload/download server settings:
  [KNewStuff]
  MasterServer=http://mindx.dyndns.org/kde/hotstuff

b) (optionally) a handler for the downloaded kvtml files, so they don't
just end up as /tmp/kvoctrainX734F... files.
To make this really useful, I propose to add:
  [kdeedu/vocabulary]
  TargetDir=kvoctrain
to the knewstuff config file 'types', and whenever a file dialog is
opened for reading/saving/sharing files, specify locateLocal("data",
"kvoctrain/") as default so users don't have to look for vocabulary
files.

Other than that, I have a bunch of ideas:
- query the application's config file for the handler first (since we
look there anyway for the server and status information)
- OTOH, have a global config file with a server/provider URL as a
fallback
- storing all meta information on the server in a database, and updating
information dynamically per request, so we can keep track on the number
of downloads

Josef

["knewstuff-kvoctrain.diff" (text/x-diff)]

? kvoctrainrc
Index: Makefile.am
===================================================================
RCS file: /home/kde/kdeedu/kvoctrain/kvoctrain/Makefile.am,v
retrieving revision 1.36
diff -u -r1.36 Makefile.am
--- Makefile.am	29 Aug 2003 19:59:45 -0000	1.36
+++ Makefile.am	21 Sep 2003 14:24:40 -0000
@@ -17,7 +17,7 @@
                     ./query-dialogs/libquerydlg.la \
                     ./queryoption-dialogs/libqueryoptiondlg.la \
                     ./statistik-dialogs/libstatdlg.la \
-                    ./common-dialogs/libcommondlg.la $(LIB_KHTML)
+                    ./common-dialogs/libcommondlg.la $(LIB_KHTML) -lknewstuff
 
 SUBDIRS = common-dialogs query-dialogs queryoption-dialogs \
           option-dialogs docprop-dialogs entry-dialogs  kvt-core \
@@ -42,6 +42,8 @@
  $(all_includes)
 
 bin_PROGRAMS = kvoctrain spotlight2kvtml
+
+kde_conf_DATA = kvoctrainrc
 
 # the library search path. 
 kvoctrain_LDFLAGS = $(all_libraries) $(KDE_RPATH)
Index: kv_resource.h
===================================================================
RCS file: /home/kde/kdeedu/kvoctrain/kvoctrain/kv_resource.h,v
retrieving revision 1.4
diff -u -r1.4 kv_resource.h
--- kv_resource.h	21 Jun 2003 14:31:22 -0000	1.4
+++ kv_resource.h	21 Sep 2003 14:24:41 -0000
@@ -55,6 +55,8 @@
 #define ID_FILE_OPEN                10030
 #define ID_FILE_OPEN_XMP            10035
 #define ID_FILE_OPEN_RECENT         10040
+#define ID_FILE_NEWSTUFF            10045
+#define ID_FILE_SHARESTUFF          10046
 
 #define ID_FILE_SAVE                10050
 #define ID_FILE_SAVE_AS             10060
Index: kva_init.cpp
===================================================================
RCS file: /home/kde/kdeedu/kvoctrain/kvoctrain/kva_init.cpp,v
retrieving revision 1.33
diff -u -r1.33 kva_init.cpp
--- kva_init.cpp	23 Jun 2003 02:38:49 -0000	1.33
+++ kva_init.cpp	21 Sep 2003 14:24:42 -0000
@@ -165,6 +165,10 @@
   }
 
   file_menu->insertSeparator();
+  file_menu->insertItem(i18n("&Get new vocabulary..."), ID_FILE_NEWSTUFF );
+  file_menu->insertItem(i18n("S&hare vocabulary..."), ID_FILE_SHARESTUFF );
+
+  file_menu->insertSeparator();
   file_menu->insertItem(QPixmap(locate("data", "kvoctrain/merge.xpm")), \
i18n("&Merge..."), ID_FILE_MERGE );  
   file_menu->insertSeparator();
Index: kva_io.cpp
===================================================================
RCS file: /home/kde/kdeedu/kvoctrain/kvoctrain/kva_io.cpp,v
retrieving revision 1.36
diff -u -r1.36 kva_io.cpp
--- kva_io.cpp	17 Jul 2003 12:26:55 -0000	1.36
+++ kva_io.cpp	21 Sep 2003 14:24:45 -0000
@@ -43,6 +43,9 @@
 #include <kstandarddirs.h>
 #include <kdebug.h>
 
+#include <knewstuff/downloaddialog.h>
+#include <knewstuff/knewstuffgeneric.h>
+
 #include <kvoctraincore.h>
 #include "kvoctrain.h"
 #include "UsageManager.h"
@@ -610,6 +613,22 @@
   removeProgressBar();
 
   slotStatusMsg(IDS_DEFAULT);
+}
+
+
+void kvoctrainApp::slotFileNewStuff()
+{
+  KNS::DownloadDialog::open("kdeedu/vocabulary");
+}
+
+
+void kvoctrainApp::slotFileShareStuff()
+{
+  QString file = getFileName(i18n("Select file to share"));
+  if(file.isEmpty()) return;
+
+  KNewStuffGeneric *ns = new KNewStuffGeneric("kdeedu/vocabulary", this);
+  ns->upload(file, QString::null);
 }
 
 
Index: kvoctrain.cpp
===================================================================
RCS file: /home/kde/kdeedu/kvoctrain/kvoctrain/kvoctrain.cpp,v
retrieving revision 1.59
diff -u -r1.59 kvoctrain.cpp
--- kvoctrain.cpp	5 Jul 2003 21:18:00 -0000	1.59
+++ kvoctrain.cpp	21 Sep 2003 14:24:46 -0000
@@ -1424,6 +1424,8 @@
     ON_CMD(ID_FILE_NEW,                 slotFileNew())
     ON_CMD(ID_FILE_OPEN,                slotFileOpen())
     ON_CMD(ID_FILE_OPEN_XMP,            slotFileOpenExample())
+    ON_CMD(ID_FILE_NEWSTUFF,            slotFileNewStuff())
+    ON_CMD(ID_FILE_SHARESTUFF,          slotFileShareStuff())
     ON_CMD(ID_FILE_MERGE,               slotFileMerge())
     ON_CMD(ID_FILE_SAVE,                slotFileSave())
     ON_CMD(ID_FILE_SAVE_AS,             slotFileSaveAs())
Index: kvoctrain.h
===================================================================
RCS file: /home/kde/kdeedu/kvoctrain/kvoctrain/kvoctrain.h,v
retrieving revision 1.28
diff -u -r1.28 kvoctrain.h
--- kvoctrain.h	21 Jun 2003 14:31:22 -0000	1.28
+++ kvoctrain.h	21 Sep 2003 14:24:47 -0000
@@ -212,6 +212,9 @@
   void slotFileMerge();
   /** save a document */
   void slotFileSave();
+  /** download new vocabulary files */
+  void slotFileNewStuff();
+  void slotFileShareStuff();
   /** save a document under a different filename*/
   void slotFileSaveAs();
   void slotFileQuit();



_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic