vrplayer: path and close changes

This commit is contained in:
Jay Sorg 2012-12-30 23:02:06 -08:00
parent 0013072938
commit fb01994dbb

View File

@ -18,10 +18,12 @@ MainWindow::MainWindow(QWidget *parent) :
/* connection to remote client failed; error msg has */ /* connection to remote client failed; error msg has */
/* already been displayed so it's ok to close app now */ /* 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; remoteClientInited = false;
ui->setupUi(this); ui->setupUi(this);
acceptSliderMove = false; acceptSliderMove = false;
@ -37,12 +39,16 @@ MainWindow::MainWindow(QWidget *parent) :
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
if (oneTimeInitSuccess)
delete ui; delete ui;
} }
void MainWindow::closeEvent(QCloseEvent *event) void MainWindow::closeEvent(QCloseEvent *event)
{ {
if (!oneTimeInitSuccess)
{
QMessageBox::warning(this, "Closing application",
"This is not an xrdp session with xrdpvr");
}
event->accept(); event->accept();
} }
@ -155,7 +161,8 @@ void MainWindow::openMediaFile()
{ {
/* no previous selection - open user's home folder TODO */ /* no previous selection - open user's home folder TODO */
// TODO filename = QFileDialog::getOpenFileName(this, "Select Media File", "/"); // 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 else
{ {