aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
authorwi <william.os4y@gmail.com>2015-05-01 18:38:55 +0200
committerwi <william.os4y@gmail.com>2015-05-01 18:38:55 +0200
commit2b143927e0363fd41b138a6955f9e9363b71b443 (patch)
tree6366bcbd5842e42e52f1429f4e7232f678778f67 /lumina-fm
parentuse the termnial application specified by the user as the default-terminal. (diff)
parentFix/Fix a couple important bugs before announcing 0.8.4-release: (diff)
downloadlumina-2b143927e0363fd41b138a6955f9e9363b71b443.tar.gz
lumina-2b143927e0363fd41b138a6955f9e9363b71b443.tar.bz2
lumina-2b143927e0363fd41b138a6955f9e9363b71b443.zip
Merge remote-tracking branch 'upstream/master' into fm-term
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/MainUI.cpp30
-rw-r--r--lumina-fm/MainUI.h1
-rw-r--r--lumina-fm/MainUI.ui9
3 files changed, 24 insertions, 16 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index 5446802c..3cc66d97 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -162,6 +162,7 @@ void MainUI::setupIcons(){
ui->actionBackToBrowser->setIcon( LXDG::findIcon("go-previous","") );
ui->actionManage_Bookmarks->setIcon( LXDG::findIcon("bookmarks-organize","") );
ui->actionScan->setIcon( LXDG::findIcon("system-search","") );
+ ui->actionSearch->setIcon( LXDG::findIcon("edit-find","") );
//Browser page
ui->tool_addNewFile->setIcon( LXDG::findIcon("document-new",""));
@@ -679,6 +680,10 @@ void MainUI::on_actionNew_Tab_triggered(){
tabBar->setCurrentIndex(tabBar->count()-1);
}
+void MainUI::on_actionSearch_triggered(){
+ QProcess::startDetached("lumina-search -dir \""+getCurrentDir()+"\"");
+}
+
void MainUI::on_actionClose_triggered(){
if(tabBar->count() > 1){
if(QMessageBox::Yes != QMessageBox::question(this, tr("Verify Quit"), tr("You have multiple tabs open. Are you sure you want to quit?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes ) ){
@@ -969,7 +974,7 @@ void MainUI::OpenContextMenu(const QPoint &pt){
contextMenu->addAction(LXDG::findIcon("edit-delete",""), tr("Delete Selection"), this, SLOT(RemoveItem()) )->setEnabled(info.isWritable()&&hasSelection);
if(LUtils::isValidBinary("lumina-fileinfo")){
contextMenu->addSeparator();
- contextMenu->addAction(LXDG::findIcon("system-search",""), tr("File Properties"), this, SLOT(ViewPropertiesItem()) )->setEnabled(hasSelection && info.fileName().endsWith(".desktop"));
+ contextMenu->addAction(LXDG::findIcon("edit-find-replace",""), tr("File Properties"), this, SLOT(ViewPropertiesItem()) )->setEnabled(hasSelection);
}
if (info.isDir() || CItem.isEmpty()) {
//in case the user click on a directory or click on the background
@@ -1008,13 +1013,7 @@ void MainUI::ItemSelectionChanged(){
if(sel.length()==1){ itname = sel[0].fileName(); }
bool ok = !itname.isEmpty() && (getCurrentDir()!=QDir::homePath()+"/Desktop");
if(ok){
- if(QFile::exists(favdir+itname)){
- //Make sure this favorite does not already point to the current file
- QFileInfo info(favdir+itname);
- if(info.isSymLink() && info.exists()){
- ok = false; //still an active favorite - do not allow replacement
- }
- }
+ ok = !LUtils::isFavorite(sel[0].canonicalFilePath());
}
ui->tool_act_fav->setEnabled(ok);
}
@@ -1409,13 +1408,14 @@ void MainUI::FavoriteItem(){
if(CItem.isEmpty()){
QFileInfoList sel = getSelectedItems();
if(sel.isEmpty()){ return; }
- else{ CItem = sel[0].absoluteFilePath(); }
+ else{ CItem = sel[0].canonicalFilePath(); }
}
- QString fname = CItem;
- QString fullpath = fname;
- fname = fname.section("/",-1); //turn this into just the file name
+ //QString fname = CItem;
+ QString fullpath = CItem;
+ /*fname = fname.section("/",-1); //turn this into just the file name
if(QFile::exists(favdir+fname)){ QFile::remove(favdir+fname); } //remove the stale link
- QFile::link(fullpath, favdir+fname);
+ QFile::link(fullpath, favdir+fname);*/
+ LUtils::addFavorite(fullpath);
CItem.clear();
ItemSelectionChanged();
}
@@ -1424,9 +1424,7 @@ void MainUI::ViewPropertiesItem(){
QFileInfoList sel = getSelectedItems();
if(sel.isEmpty()){ return; }
for(int i=0; i<sel.length(); i++){
- if(sel[i].absoluteFilePath().endsWith(".desktop")){
- QProcess::startDetached("lumina-fileinfo \""+sel[i].absoluteFilePath()+"\"");
- }
+ QProcess::startDetached("lumina-fileinfo \""+sel[i].absoluteFilePath()+"\"");
}
}
diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h
index 0e3d7eb5..be8bb11f 100644
--- a/lumina-fm/MainUI.h
+++ b/lumina-fm/MainUI.h
@@ -140,6 +140,7 @@ private slots:
//Menu Actions
void on_actionNew_Tab_triggered();
+ void on_actionSearch_triggered();
void on_actionClose_triggered();
void on_actionView_Hidden_Files_triggered();
void on_actionShow_Action_Buttons_triggered();
diff --git a/lumina-fm/MainUI.ui b/lumina-fm/MainUI.ui
index 4b2156c2..9ef367d7 100644
--- a/lumina-fm/MainUI.ui
+++ b/lumina-fm/MainUI.ui
@@ -1113,6 +1113,7 @@
<string>File</string>
</property>
<addaction name="actionNew_Tab"/>
+ <addaction name="actionSearch"/>
<addaction name="separator"/>
<addaction name="actionClose"/>
</widget>
@@ -1297,6 +1298,14 @@
<string>Load Thumbnails</string>
</property>
</action>
+ <action name="actionSearch">
+ <property name="text">
+ <string>Search Directory</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+F</string>
+ </property>
+ </action>
</widget>
<resources/>
<connections/>
bgstack15