diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2012-12-30 23:02:06 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2012-12-30 23:02:06 -0800 |
commit | fb01994dbb97148a2c97df4746b3cb52c6034211 (patch) | |
tree | 395b7a20c39fe7f7a2edfc236513e755e8fd33ae /vrplayer | |
parent | 0013072938d7904e6602121f3a9e69647f259656 (diff) | |
download | xrdp-proprietary-fb01994dbb97148a2c97df4746b3cb52c6034211.tar.gz xrdp-proprietary-fb01994dbb97148a2c97df4746b3cb52c6034211.zip |
vrplayer: path and close changes
Diffstat (limited to 'vrplayer')
-rw-r--r-- | vrplayer/mainwindow.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/vrplayer/mainwindow.cpp b/vrplayer/mainwindow.cpp index f43d44b3..9cafa016 100644 --- a/vrplayer/mainwindow.cpp +++ b/vrplayer/mainwindow.cpp @@ -18,10 +18,12 @@ MainWindow::MainWindow(QWidget *parent) : /* connection to remote client failed; error msg has */ /* already been displayed so it's ok to close app now */ - QTimer::singleShot(1000, qApp, SLOT(quit())); + QTimer::singleShot(1000, this, SLOT(close())); + } + else + { + oneTimeInitSuccess = true; } - - oneTimeInitSuccess = true; remoteClientInited = false; ui->setupUi(this); acceptSliderMove = false; @@ -37,12 +39,16 @@ MainWindow::MainWindow(QWidget *parent) : MainWindow::~MainWindow() { - if (oneTimeInitSuccess) - delete ui; + delete ui; } void MainWindow::closeEvent(QCloseEvent *event) { + if (!oneTimeInitSuccess) + { + QMessageBox::warning(this, "Closing application", + "This is not an xrdp session with xrdpvr"); + } event->accept(); } @@ -155,7 +161,8 @@ void MainWindow::openMediaFile() { /* no previous selection - open user's home folder TODO */ // TODO filename = QFileDialog::getOpenFileName(this, "Select Media File", "/"); - filename = QFileDialog::getOpenFileName(this, "Select Media File", "/home/lk/vbox_share"); + filename = QFileDialog::getOpenFileName(this, "Select Media File", + QDir::currentPath()); } else { |