Guest User

Hans

a guest
Mar 2nd, 2010
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.94 KB | None | 0 0
  1. Index: step.knsrc
  2. ===================================================================
  3. --- step.knsrc  (revision 1097521)
  4. +++ step.knsrc  (working copy)
  5.  -1,3 +1,5 @@
  6.  [KNewStuff3]
  7. -ProvidersUrl=http://edu.kde.org/step/downloads/providers.xml
  8. +ProvidersUrl=http://download.kde.org/ocs/providers.xml
  9. +Categories=Step
  10. +UploadCategories=Step
  11.  TargetDir=step/examples
  12. Index: mainwindow.cc
  13. ===================================================================
  14. --- mainwindow.cc       (revision 1097521)
  15. +++ mainwindow.cc       (working copy)
  16.  -51,6 +51,7 @@
  17.  
  18.  #include <KIO/NetAccess>
  19.  #include <knewstuff3/downloaddialog.h>
  20. +#include <knewstuff3/uploaddialog.h>
  21.  
  22.  #include <QFile>
  23.  #include <QGraphicsView>
  24.  -445,24 +446,22 @@
  25.  
  26.  void MainWindow::uploadExample()
  27.  {
  28. -    KMessageBox::sorry(this, i18n("Uploading is still not implemented in kdelibs."),
  29. -                        i18n("Sorry - Step"));
  30. -    /*
  31.      int ret = KMessageBox::questionYesNo(this,
  32. -                i18n("Do you want to upload current experiment to public web server ?"),
  33. +                i18n("Do you want to upload current experiment to public web server?"),
  34.                  i18n("Question - Step"));
  35.      if(ret != KMessageBox::Yes) return;
  36.  
  37.      if(currentFileUrl.isEmpty() || !worldModel->undoStack()->isClean()) {
  38.          ret = KMessageBox::warningContinueCancel(this,
  39. -                i18n("The experiment is not saved. You should it before uploading."),
  40. +                i18n("The experiment is not saved. You should save it before uploading."),
  41.                  i18n("Warning - Step"), KStandardGuiItem::save(), KStandardGuiItem::cancel());
  42.          if(ret != KMessageBox::Continue) return;
  43.          if(!saveFile()) return;
  44.      }
  45.  
  46. -    KNS::Engine::upload( currentFileUrl.url() );
  47. -    */
  48. +    KNS3::UploadDialog dialog("step.knsrc", this);
  49. +    dialog.setUploadFile( currentFileUrl.url() );
  50. +    dialog.exec();
  51.  }
  52.  
  53.  void MainWindow::downloadExamples()
Advertisement
Add Comment
Please, Sign In to add comment