From: druid23 Date: Sun, 22 Aug 2010 14:51:53 +0000 (+0100) Subject: Added user home menu item, in case a users home set home folder is unavailable X-Git-Tag: v0.5~8 X-Git-Url: https://vcs.maemo.org/git/?p=vlc-remote;a=commitdiff_plain;h=b398a321395750e43a828766ffa21ffa0089a7c0 Added user home menu item, in case a users home set home folder is unavailable modified: browsemainwindow.cpp modified: browsemainwindow.h modified: browsemainwindow.ui --- diff --git a/browsemainwindow.cpp b/browsemainwindow.cpp index 2c7582f..13a85e4 100644 --- a/browsemainwindow.cpp +++ b/browsemainwindow.cpp @@ -55,6 +55,7 @@ BrowseMainWindow::BrowseMainWindow(QWidget *parent) : connect(ui->playButton,SIGNAL(clicked()),this,SLOT(onPlay())); connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged())); + connect(ui->actionGoUserHome, SIGNAL(triggered()), this, SLOT(showUserHomeFolder())); connect(ui->actionGoHome, SIGNAL(triggered()), this, SLOT(showHomeFolder())); connect(ui->actionSetHome, SIGNAL(triggered()), this, SLOT(setHomeFolder())); connect(ui->actionViewFavourites, SIGNAL(triggered()), this, SLOT(showFavourites())); @@ -98,6 +99,9 @@ void BrowseMainWindow::changeEvent(QEvent *e) void BrowseMainWindow::showHomeFolder() { browseDirectory(AppSettings::getHomeDirectory().path); } +void BrowseMainWindow::showUserHomeFolder() { + browseDirectory("~/"); +} void BrowseMainWindow::setHomeFolder() { if (0 < mCurrentDir.length()) { VlcDirectory dir; diff --git a/browsemainwindow.h b/browsemainwindow.h index 002eba8..aa51ef9 100644 --- a/browsemainwindow.h +++ b/browsemainwindow.h @@ -47,6 +47,7 @@ public slots: void showCurrentDirectory(); void setHomeFolder(); void showHomeFolder(); + void showUserHomeFolder(); void setFavourite(); void showFavourites(); void setHomeDirectory(); diff --git a/browsemainwindow.ui b/browsemainwindow.ui index ace0713..b867e99 100644 --- a/browsemainwindow.ui +++ b/browsemainwindow.ui @@ -60,11 +60,17 @@ menu + + + + User Folder + + Home