Guest User

Hans

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