From 98042122facf6de00ac837f9fc8467efb3441e9e Mon Sep 17 00:00:00 2001 From: JoshDW19 Date: Mon, 1 Feb 2016 14:58:07 -0500 Subject: Ken changed theming to be more specific for Lumina on my system so I can begin theming elements. --- lumina-desktop/panel-plugins/LPPlugin.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lumina-desktop/panel-plugins/LPPlugin.h b/lumina-desktop/panel-plugins/LPPlugin.h index 995c8742..c4c76297 100644 --- a/lumina-desktop/panel-plugins/LPPlugin.h +++ b/lumina-desktop/panel-plugins/LPPlugin.h @@ -32,6 +32,7 @@ public: this->setFocusPolicy(Qt::NoFocus); //no keyboard focus on the panel/plugins if(horizontal){LY = new QBoxLayout(QBoxLayout::LeftToRight, this); } else{ LY = new QBoxLayout(QBoxLayout::TopToBottom, this); } + this->setObjectName(ptype.section("---",0,0)); LY->setContentsMargins(0,0,0,0); LY->setSpacing(1); this->setLayout(LY); @@ -73,4 +74,4 @@ signals: void MenuClosed(); //This needs to be emitted when any plugin's menu is closed for some reason (check/set focus properly) }; -#endif \ No newline at end of file +#endif -- cgit From 91574be42c735ab224bbe234dd14d1a30d9cfcd0 Mon Sep 17 00:00:00 2001 From: Sean Long Date: Mon, 1 Feb 2016 22:00:46 -0800 Subject: Generally in GUI's menu items that popup a window show '...' at the end of the menu item. Added the a few missing '...' to the popup context menu in lumina-fm. --- lumina-fm/widgets/DirWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp index 46aa2cf3..1cf5eb41 100644 --- a/lumina-fm/widgets/DirWidget.cpp +++ b/lumina-fm/widgets/DirWidget.cpp @@ -955,8 +955,8 @@ void DirWidget::OpenContextMenu(){ contextMenu->addAction(LXDG::findIcon("run-build-file",""), tr("Open"), this, SLOT(on_tool_act_run_clicked()) ); contextMenu->addAction(LXDG::findIcon("run-build-configure",""), tr("Open With..."), this, SLOT(on_tool_act_runwith_clicked()) ); - contextMenu->addAction(LXDG::findIcon("edit-rename",""), tr("Rename"), this, SLOT(on_tool_act_rename_clicked()) )->setEnabled(canmodify); - contextMenu->addAction(LXDG::findIcon("document-encrypted",""), tr("View Checksums"), this, SLOT(fileCheckSums()) ); + contextMenu->addAction(LXDG::findIcon("edit-rename",""), tr("Rename..."), this, SLOT(on_tool_act_rename_clicked()) )->setEnabled(canmodify); + contextMenu->addAction(LXDG::findIcon("document-encrypted",""), tr("View Checksums..."), this, SLOT(fileCheckSums()) ); contextMenu->addSeparator(); } //Now add the general selection options @@ -967,7 +967,7 @@ void DirWidget::OpenContextMenu(){ contextMenu->addAction(LXDG::findIcon("edit-delete",""), tr("Delete Selection"), this, SLOT(on_tool_act_rm_clicked()) )->setEnabled(canmodify&&!sel.isEmpty()); if(LUtils::isValidBinary("lumina-fileinfo")){ contextMenu->addSeparator(); - contextMenu->addAction(LXDG::findIcon("edit-find-replace",""), tr("File Properties"), this, SLOT(fileProperties()) )->setEnabled(!sel.isEmpty()); + contextMenu->addAction(LXDG::findIcon("edit-find-replace",""), tr("File Properties..."), this, SLOT(fileProperties()) )->setEnabled(!sel.isEmpty()); } contextMenu->addSeparator(); contextMenu->addAction(LXDG::findIcon("system-search",""), tr("Open Terminal here"), this, SLOT(openTerminal())); -- cgit From 3f2eab3ccc20c8b154043be437e45992b0fec100 Mon Sep 17 00:00:00 2001 From: Sean Long Date: Mon, 1 Feb 2016 23:14:01 -0800 Subject: Added menu items for various functionality that was already available just not from the main application menu. When adding the shortcuts I used the defacto standards that are used in many *nix applications. --- lumina-fm/MainUI.cpp | 114 ++++++++++++++++++++++------------------ lumina-fm/MainUI.h | 21 ++++---- lumina-fm/MainUI.ui | 112 +++++++++++++++++++++++++++++++++++++-- lumina-fm/widgets/DirWidget.cpp | 4 ++ lumina-fm/widgets/DirWidget.h | 1 + 5 files changed, 186 insertions(+), 66 deletions(-) diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index e65a3f74..a9dda19e 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -89,12 +89,6 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ if(DEBUG){ qDebug() << " - Keyboard Shortcuts"; } nextTabLShort = new QShortcut( QKeySequence(tr("Shift+Left")), this); nextTabRShort = new QShortcut( QKeySequence(tr("Shift+Right")), this); - closeTabShort = new QShortcut( QKeySequence(tr("Ctrl+W")), this); - refreshShort = new QShortcut( QKeySequence(tr("F5")), this); - copyFilesShort = new QShortcut( QKeySequence(tr("Ctrl+C")), this); - pasteFilesShort = new QShortcut( QKeySequence(tr("Ctrl+V")), this); - cutFilesShort = new QShortcut( QKeySequence(tr("Ctrl+X")), this); - deleteFilesShort = new QShortcut( QKeySequence(tr("Delete")), this); //Finish loading the interface workThread->start(); @@ -204,19 +198,33 @@ void MainUI::setupIcons(){ this->setWindowIcon( LXDG::findIcon("Insight-FileManager","") ); //Setup all the icons using libLumina - ui->actionClose->setIcon( LXDG::findIcon("application-exit","") ); - ui->actionNew_Tab->setIcon( LXDG::findIcon("tab-new","") );\ + // File menu ui->actionNew_Window->setIcon( LXDG::findIcon("window-new","") ); - ui->actionManage_Bookmarks->setIcon( LXDG::findIcon("bookmarks-organize","") ); - ui->actionAdd_Bookmark->setIcon( LXDG::findIcon("bookmark-new","") ); - ui->actionScan->setIcon( LXDG::findIcon("system-search","") ); + ui->actionNew_Tab->setIcon( LXDG::findIcon("tab-new","") ); ui->actionSearch->setIcon( LXDG::findIcon("edit-find","") ); - ui->actionLarger_Icons->setIcon( LXDG::findIcon("zoom-in","") ); - ui->actionSmaller_Icons->setIcon( LXDG::findIcon("zoom-out", "") ); - //Menu Icons + ui->actionClose_Browser->setIcon( LXDG::findIcon("tab-close","") ); + ui->actionClose->setIcon( LXDG::findIcon("application-exit","") ); + + // Edit menu + ui->actionRename->setIcon( LXDG::findIcon("edit-rename","") ); + ui->actionCut_Selection->setIcon( LXDG::findIcon("edit-cut","") ); + ui->actionCopy_Selection->setIcon( LXDG::findIcon("edit-copy","") ); + ui->actionPaste->setIcon( LXDG::findIcon("edit-paste","") ); + ui->actionDelete_Selection->setIcon( LXDG::findIcon("edit-delete","") ); + + // View menu + ui->actionRefresh->setIcon( LXDG::findIcon("view-refresh","") ); ui->menuView_Mode->setIcon( LXDG::findIcon("view-choose","") ); ui->menuGroup_Mode->setIcon( LXDG::findIcon("tab-duplicate","") ); - + ui->actionLarger_Icons->setIcon( LXDG::findIcon("zoom-in","") ); + ui->actionSmaller_Icons->setIcon( LXDG::findIcon("zoom-out", "") ); + + // Bookmarks menu + ui->actionManage_Bookmarks->setIcon( LXDG::findIcon("bookmarks-organize","") ); + ui->actionAdd_Bookmark->setIcon( LXDG::findIcon("bookmark-new","") ); + + // External Devices menu + ui->actionScan->setIcon( LXDG::findIcon("system-search","") ); } //========== @@ -237,13 +245,6 @@ void MainUI::setupConnections(){ //Special Keyboard Shortcuts connect(nextTabLShort, SIGNAL(activated()), this, SLOT( prevTab() ) ); connect(nextTabRShort, SIGNAL(activated()), this, SLOT( nextTab() ) ); - connect(closeTabShort, SIGNAL(activated()), this, SLOT( tabClosed() ) ); - connect(refreshShort , SIGNAL(activated()), this, SLOT( refreshTabs() ) ); - connect(copyFilesShort, SIGNAL(activated()), this, SLOT( CopyFilesTriggered() ) ); - connect(cutFilesShort, SIGNAL(activated()), this, SLOT( CutFilesTriggered() ) ); - connect(pasteFilesShort, SIGNAL(activated()), this, SLOT( PasteFilesTriggered() ) ); - connect(deleteFilesShort, SIGNAL(activated()), this, SLOT( DeleteFilesTriggered() ) ); - } void MainUI::loadSettings(){ @@ -389,6 +390,10 @@ void MainUI::on_actionSearch_triggered(){ QProcess::startDetached("lumina-search -dir \""+dir->currentDir()+"\""); } +void MainUI::on_actionClose_Browser_triggered(){ + tabClosed(); +} + 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 ) ){ @@ -399,6 +404,41 @@ void MainUI::on_actionClose_triggered(){ this->close(); } +void MainUI::on_actionRename_triggered(){ + DirWidget *dir = FindActiveBrowser(); + if(DEBUG){ qDebug() << "Rename Shortcut Pressed:" << dir << dir->currentDir(); } + if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryRenameSelection()) ); } +} + +void MainUI::on_actionCut_Selection_triggered(){ + DirWidget *dir = FindActiveBrowser(); + if(DEBUG){ qDebug() << "Cut Shortcut Pressed:" << dir << dir->currentDir(); } + if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryCutSelection()) ); } +} + +void MainUI::on_actionCopy_Selection_triggered(){ + DirWidget *dir = FindActiveBrowser(); + if(DEBUG){ qDebug() << "Copy Shortcut Pressed:" << dir << dir->currentDir(); } + if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryCopySelection()) ); } +} + +void MainUI::on_actionPaste_triggered(){ + DirWidget *dir = FindActiveBrowser(); + if(DEBUG){ qDebug() << "Paste Shortcut Pressed:" << dir << dir->currentDir(); } + if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryPasteSelection()) ); } +} + +void MainUI::on_actionDelete_Selection_triggered(){ + DirWidget *dir = FindActiveBrowser(); + if(DEBUG){ qDebug() << "Delete Shortcut Pressed:" << dir << dir->currentDir(); } + if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryDeleteSelection()) ); } +} + +void MainUI::on_actionRefresh_triggered(){ + DirWidget *cur = FindActiveBrowser(); + if(cur!=0){ cur->refresh(); } +} + void MainUI::on_actionView_Hidden_Files_triggered(){ worker->showHidden = ui->actionView_Hidden_Files->isChecked(); //Now save this setting for later @@ -605,36 +645,6 @@ void MainUI::nextTab(){ else{ tabBar->setCurrentIndex( cur+1 ); } } -void MainUI::refreshTabs(){ - DirWidget *cur = FindActiveBrowser(); - if(cur!=0){ cur->refresh(); } -} - -//Special Keyboard shortcut interactions -void MainUI::CopyFilesTriggered(){ - DirWidget *dir = FindActiveBrowser(); - if(DEBUG){ qDebug() << "Copy Shortcut Pressed:" << dir << dir->currentDir(); } - if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryCopySelection()) ); } -} - -void MainUI::CutFilesTriggered(){ - DirWidget *dir = FindActiveBrowser(); - if(DEBUG){ qDebug() << "Cut Shortcut Pressed:" << dir << dir->currentDir(); } - if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryCutSelection()) ); } -} - -void MainUI::PasteFilesTriggered(){ - DirWidget *dir = FindActiveBrowser(); - if(DEBUG){ qDebug() << "Paste Shortcut Pressed:" << dir << dir->currentDir(); } - if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryPasteSelection()) ); } -} - -void MainUI::DeleteFilesTriggered(){ - DirWidget *dir = FindActiveBrowser(); - if(DEBUG){ qDebug() << "Delete Shortcut Pressed:" << dir << dir->currentDir(); } - if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryDeleteSelection()) ); } -} - void MainUI::DirDataAvailable(QString id, QString dir, LFileInfoList list){ for(int i=0; iid()){ diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h index e139d341..92d1457b 100644 --- a/lumina-fm/MainUI.h +++ b/lumina-fm/MainUI.h @@ -87,9 +87,8 @@ private: MultimediaWidget *MW; SlideshowWidget *SW; - QSettings *settings; - QShortcut *nextTabLShort, *nextTabRShort, *closeTabShort, *refreshShort; - QShortcut *copyFilesShort, *cutFilesShort, *pasteFilesShort, *deleteFilesShort; + QSettings *settings; + QShortcut *nextTabLShort, *nextTabRShort; QCompleter *dirCompleter; //Simplification Functions @@ -115,7 +114,14 @@ private slots: void on_actionNew_Window_triggered(); void on_actionNew_Tab_triggered(); void on_actionSearch_triggered(); + void on_actionClose_Browser_triggered(); void on_actionClose_triggered(); + void on_actionRename_triggered(); + void on_actionCut_Selection_triggered(); + void on_actionCopy_Selection_triggered(); + void on_actionPaste_triggered(); + void on_actionDelete_Selection_triggered(); + void on_actionRefresh_triggered(); void on_actionView_Hidden_Files_triggered(); void on_actionShow_Action_Buttons_triggered(); void on_actionShow_Thumbnails_triggered(); @@ -128,17 +134,10 @@ private slots: void CreateBookMark(); //Tab interactions - void tabChanged(int tab = -1); + void tabChanged(int tab = -1); void tabClosed(int tab = -1); void nextTab(); //For keyboard shortcuts void prevTab(); //For keyboard shortcuts - void refreshTabs(); //For keyboard shortcut - - //Special Keyboard shortcut interactions - void CopyFilesTriggered(); - void CutFilesTriggered(); - void PasteFilesTriggered(); - void DeleteFilesTriggered(); //Backend Info passing void DirDataAvailable(QString, QString, LFileInfoList); diff --git a/lumina-fm/MainUI.ui b/lumina-fm/MainUI.ui index 15476b75..8078b804 100644 --- a/lumina-fm/MainUI.ui +++ b/lumina-fm/MainUI.ui @@ -69,7 +69,7 @@ 0 0 567 - 373 + 371 @@ -106,7 +106,7 @@ 0 0 567 - 20 + 22 @@ -117,6 +117,8 @@ + + @@ -135,6 +137,8 @@ + + @@ -160,7 +164,20 @@ + + + Edit + + + + + + + + + + @@ -247,7 +264,7 @@ - Search Directory + Search Directory... Ctrl+F @@ -292,11 +309,23 @@ Larger Icons + + Ctrl++ + + + Qt::ApplicationShortcut + Smaller Icons + + Ctrl+- + + + Qt::ApplicationShortcut + @@ -320,6 +349,83 @@ Qt::ApplicationShortcut + + + Rename... + + + F2 + + + Qt::ApplicationShortcut + + + + + Cut Selection + + + Ctrl+X + + + Qt::ApplicationShortcut + + + + + Copy Selection + + + Ctrl+C + + + Qt::ApplicationShortcut + + + + + Paste + + + Ctrl+V + + + Qt::ApplicationShortcut + + + + + Delete Selection + + + Del + + + Qt::ApplicationShortcut + + + + + Refresh + + + F5 + + + Qt::ApplicationShortcut + + + + + Close Browser + + + Ctrl+W + + + Qt::ApplicationShortcut + + diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp index 1cf5eb41..f7ade48c 100644 --- a/lumina-fm/widgets/DirWidget.cpp +++ b/lumina-fm/widgets/DirWidget.cpp @@ -557,6 +557,10 @@ void DirWidget::UpdateButtons(){ } //Keyboard Shortcuts triggered +void DirWidget::TryRenameSelection(){ + on_tool_act_rename_clicked(); +} + void DirWidget::TryCutSelection(){ on_tool_act_cut_clicked(); } diff --git a/lumina-fm/widgets/DirWidget.h b/lumina-fm/widgets/DirWidget.h index 70936b97..75003681 100644 --- a/lumina-fm/widgets/DirWidget.h +++ b/lumina-fm/widgets/DirWidget.h @@ -72,6 +72,7 @@ public slots: void UpdateButtons(); //Keyboard Shortcuts triggered + void TryRenameSelection(); void TryCutSelection(); void TryCopySelection(); void TryPasteSelection(); -- cgit