diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-22 11:59:09 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-22 11:59:09 -0400 |
commit | 6f8c36dadb67e1f259b33f96cfce1ac0c58f3e2f (patch) | |
tree | e43b82bc5b511efe83e46d311389ca735147f449 | |
parent | Test the connected but not-enabled monitor probing functionality (minor tweak... (diff) | |
parent | Fixed two missing icons in Lumina Archiver (diff) | |
download | lumina-6f8c36dadb67e1f259b33f96cfce1ac0c58f3e2f.tar.gz lumina-6f8c36dadb67e1f259b33f96cfce1ac0c58f3e2f.tar.bz2 lumina-6f8c36dadb67e1f259b33f96cfce1ac0c58f3e2f.zip |
Merge branch 'master' of github.com:trueos/lumina
-rw-r--r-- | src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts | 34 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/MainUI.cpp | 4 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp | 26 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/Browser.cpp | 19 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/Browser.h | 2 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp | 50 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/BrowserWidget.h | 6 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax | 2 |
8 files changed, 70 insertions, 73 deletions
diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts index 4016fb99..d28fbbc4 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts @@ -265,12 +265,12 @@ </message> <message> <location filename="../BootSplash.cpp" line="65"/> - <source>Don't expect to build up the weak by pulling down the strong.</source> + <source>Don't expect to build up the weak by pulling down the strong.</source> <translation>Forvent ikke at opbygge det svage ved at nedrive det stærke.</translation> </message> <message> <location filename="../BootSplash.cpp" line="67"/> - <source>You can't know too much, but you can say too much.</source> + <source>You can't know too much, but you can say too much.</source> <translation>Du kan ikke vide for meget, men du kan sige for meget.</translation> </message> <message> @@ -350,7 +350,7 @@ </message> <message> <location filename="../BootSplash.cpp" line="99"/> - <source>Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.</source> + <source>Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.</source> <translation>Kun to ting er uendelige, universet og menneskelig dumhed, og jeg er ikke sikker på det første.</translation> </message> <message> @@ -360,8 +360,8 @@ </message> <message> <location filename="../BootSplash.cpp" line="103"/> - <source>Do, or do not. There is no 'try'.</source> - <translation>Gør eller lad være. Der er ikke noget "prøv".</translation> + <source>Do, or do not. There is no 'try'.</source> + <translation>Gør eller lad være. Der er ikke noget "prøv".</translation> </message> <message> <location filename="../BootSplash.cpp" line="105"/> @@ -380,7 +380,7 @@ </message> <message> <location filename="../BootSplash.cpp" line="111"/> - <source>It's kind of fun to do the impossible.</source> + <source>It's kind of fun to do the impossible.</source> <translation>Det er egentligt sjovt at gøre det umulige.</translation> </message> <message> @@ -773,24 +773,24 @@ <message> <location filename="../LDesktop.cpp" line="255"/> <source>Desktop Actions</source> - <translation type="unfinished"></translation> + <translation>Skrivebordshandlinger</translation> </message> <message> <location filename="../LDesktop.cpp" line="257"/> <location filename="../LDesktop.cpp" line="608"/> <source>New Folder</source> - <translation type="unfinished"></translation> + <translation>Ny mappe</translation> </message> <message> <location filename="../LDesktop.cpp" line="258"/> <location filename="../LDesktop.cpp" line="628"/> <source>New File</source> - <translation type="unfinished"></translation> + <translation>Ny fil</translation> </message> <message> <location filename="../LDesktop.cpp" line="259"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Indsæt</translation> </message> <message> <location filename="../LDesktop.cpp" line="291"/> @@ -827,7 +827,7 @@ <location filename="../LDesktop.cpp" line="634"/> <location filename="../LDesktop.cpp" line="655"/> <source>Desktop</source> - <translation type="unfinished">Skrivebord</translation> + <translation>Skrivebord</translation> </message> </context> <context> @@ -874,7 +874,7 @@ <message> <location filename="../panel-plugins/systemdashboard/SysMenuQuick.ui" line="50"/> <source>Volume</source> - <translation type="unfinished"></translation> + <translation>Lydstyrke</translation> </message> <message> <location filename="../panel-plugins/systemdashboard/SysMenuQuick.ui" line="111"/> @@ -1416,22 +1416,22 @@ <message> <location filename="../panel-plugins/systemstart/StartMenu.ui" line="924"/> <source>Suspend</source> - <translation type="unfinished">Dvale</translation> + <translation>Dvale</translation> </message> <message> <location filename="../panel-plugins/systemstart/StartMenu.ui" line="989"/> <source>Restart</source> - <translation type="unfinished">Genstart</translation> + <translation>Genstart</translation> </message> <message> <location filename="../panel-plugins/systemstart/StartMenu.ui" line="1017"/> <source>Power Off</source> - <translation type="unfinished"></translation> + <translation>Sluk</translation> </message> <message> <location filename="../panel-plugins/systemstart/StartMenu.ui" line="1065"/> <source>Log Out</source> - <translation type="unfinished">Log ud</translation> + <translation>Log ud</translation> </message> <message> <location filename="../panel-plugins/systemstart/StartMenu.ui" line="262"/> @@ -1501,7 +1501,7 @@ <message> <location filename="../SystemWindow.ui" line="87"/> <source>Power Off</source> - <translation type="unfinished"></translation> + <translation>Sluk</translation> </message> <message> <location filename="../SystemWindow.ui" line="127"/> diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp index 9b77a477..2dae90a4 100644 --- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp @@ -355,8 +355,8 @@ void MainUI::ProcFinished(bool success, QString msg){ ui->label_progress->setText(msg); ui->label_progress->setVisible(!msg.isEmpty()); ui->label_progress_icon->setVisible(!msg.isEmpty()); - if(success){ ui->label_progress_icon->setPixmap( LXDG::findIcon("task-complete","").pixmap(32,32) );} - else{ ui->label_progress_icon->setPixmap( LXDG::findIcon("task-attention","").pixmap(32,32) );} + if(success){ ui->label_progress_icon->setPixmap( LXDG::findIcon("task-done","").pixmap(32,32) );} + else{ ui->label_progress_icon->setPixmap( LXDG::findIcon("task-question","").pixmap(32,32) );} QFileInfo info(BACKEND->currentFile()); bool canmodify = info.isWritable(); if(!info.exists()){ canmodify = QFileInfo(BACKEND->currentFile().section("/",0,-2)).isWritable(); } diff --git a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp index 3e0150e2..d82f09ce 100644 --- a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp @@ -15,7 +15,7 @@ #include <LuminaOS.h> //LFileInfo INFO = LFileInfo(""); - + MainUI::MainUI() : QDialog(), ui(new Ui::MainUI){ ui->setupUi(this); //load the designer form canwrite = false; @@ -27,14 +27,14 @@ MainUI::MainUI() : QDialog(), ui(new Ui::MainUI){ MainUI::~MainUI(){ terminate_thread = true; - if(INFO!=0){ delete INFO; } + this->close(); } //============= // PUBLIC //============= void MainUI::LoadFile(QString path, QString type){ - + //Do the first file information tab qDebug() << "Load File:" << path << type; INFO = new LFileInfo(path); @@ -51,7 +51,6 @@ void MainUI::LoadFile(QString path, QString type){ if(type=="APP"){ INFO->XDG()->type = XDGDesktop::APP; } else if(type=="LINK"){ INFO->XDG()->type = XDGDesktop::LINK; } } - //First load the general file information if(!INFO->filePath().isEmpty()){ ui->label_file_name->setText( INFO->fileName() ); @@ -106,7 +105,7 @@ void MainUI::LoadFile(QString path, QString type){ qDebug() << "Check XDG Info:" << type; //qDebug() << INFO->isDesktopFile() << type; if(INFO->isDesktopFile() || !type.isEmpty()){ - + if(INFO->XDG()->type == XDGDesktop::APP){ ui->line_xdg_command->setText(INFO->XDG()->exec); ui->line_xdg_wdir->setText(INFO->XDG()->path); @@ -126,9 +125,9 @@ void MainUI::LoadFile(QString path, QString type){ ui->lblWorkingDir->setText(tr("URL:")); ui->line_xdg_wdir->setText( INFO->XDG()->url ); ui->tool_xdg_getDir->setVisible(false); //the dir selection button - + } - ui->line_xdg_name->setText(INFO->XDG()->name); + ui->line_xdg_name->setText(INFO->XDG()->name); ui->line_xdg_comment->setText(INFO->XDG()->comment); ui->push_xdg_getIcon->setWhatsThis( INFO->XDG()->icon ); ReloadAppIcon(); @@ -142,12 +141,12 @@ void MainUI::LoadFile(QString path, QString type){ }else{ xdgvaluechanged(); //just do the disables here //Also remove the xdg tab - if(ui->tabWidget->indexOf(ui->tab_deskedit) >= 0){ + if(ui->tabWidget->indexOf(ui->tab_deskedit) >= 0){ qDebug() << "Removing the deskedit tab"; ui->tabWidget->removeTab( ui->tabWidget->indexOf(ui->tab_deskedit) ); } } - //Setup the tab + //Setup the tab if(type.isEmpty()){ ui->tabWidget->setCurrentIndex(0); } else if(ui->tabWidget->count()>1){ ui->tabWidget->setCurrentIndex(1); } qDebug() << "Done Loading File"; @@ -157,8 +156,8 @@ void MainUI::UpdateIcons(){ this->setWindowIcon(LXDG::findIcon("document-preview","unknown")); ui->push_close->setIcon( LXDG::findIcon("dialog-close","") ); ui->push_save->setIcon( LXDG::findIcon("document-save","") ); - ui->tool_xdg_getCommand->setIcon( LXDG::findIcon("edit-find-project","") ); - ui->tool_xdg_getDir->setIcon( LXDG::findIcon("document-open","") ); + ui->tool_xdg_getCommand->setIcon( LXDG::findIcon("edit-find-page","") ); + ui->tool_xdg_getDir->setIcon( LXDG::findIcon("document-open","") ); } //============== @@ -234,7 +233,6 @@ void MainUI::on_push_close_clicked(){ if(ui->push_save->isEnabled()){ //Still have unsaved changes //TO-DO - prompt for whether to save the changes - } this->close(); } @@ -317,7 +315,7 @@ void MainUI::on_push_xdg_getIcon_clicked(){ for(int i=0; i<ext.length(); i++){ ext[i].prepend("*."); } //turn them into valid filters QString file = QFileDialog::getOpenFileName(this, tr("Select an icon"), dir ,QString(tr("Images (%1);; All Files (*)")).arg(ext.join(" ")) ); if(file.isEmpty()){ return; } //cancelled - ui->push_xdg_getIcon->setWhatsThis(file); + ui->push_xdg_getIcon->setWhatsThis(file); ReloadAppIcon(); xdgvaluechanged(); } @@ -329,7 +327,7 @@ void MainUI::xdgvaluechanged(){ //Compare the current UI values to the file values ui->push_save->setEnabled(canwrite); //assume changed at this point // TO-DO - + }else{ ui->push_save->setVisible(false); ui->push_save->setEnabled(false); diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.cpp b/src-qt5/desktop-utils/lumina-fm/Browser.cpp index 010196a4..1d57dd8c 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.cpp +++ b/src-qt5/desktop-utils/lumina-fm/Browser.cpp @@ -16,7 +16,7 @@ Browser::Browser(QObject *parent) : QObject(parent){ watcher = new QFileSystemWatcher(this); connect(watcher, SIGNAL(fileChanged(const QString&)), this, SLOT(fileChanged(QString)) ); - connect(watcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(dirChanged(QString)) ); + connect(watcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(dirChanged(QString)) ); showHidden = false; showThumbs = false; imageFormats = LUtils::imageExtensions(false); //lowercase suffixes @@ -52,7 +52,6 @@ bool Browser::showingThumbnails(){ // PRIVATE void Browser::loadItem(QString info, Browser *obj){ - //qDebug() << "LoadItem:" << info; QImage pix; if(imageFormats.contains(info.section(".",-1).toLower()) ){ QFile file(info); @@ -88,30 +87,30 @@ void Browser::fileChanged(QString file){ } void Browser::dirChanged(QString dir){ + if(dir==currentDir){ QTimer::singleShot(500, this, SLOT(loadDirectory()) ); } else if(dir.startsWith(currentDir)){ QtConcurrent::run(this, &Browser::loadItem, dir, this ); } } void Browser::futureFinished(QString name, QImage icon){ //Note: this will be called once for every item that loads - qDebug() << "Future Finished:" << name; - QIcon ico; - LFileInfo info(name); + QIcon ico; + //LFileInfo info(name); + LFileInfo *info = new LFileInfo(name); if(!icon.isNull()){ //qDebug() << " -- Data:"; QPixmap pix = QPixmap::fromImage(icon); ico.addPixmap(pix); - }else if(info.isDir()){ + }else if(info->isDir()){ //qDebug() << " -- Folder:"; ico = loadIcon("folder"); } if(ico.isNull()){ //qDebug() << " -- MimeType:" << info.fileName() << info.mimetype(); - ico = loadIcon(info.iconfile()); + ico = loadIcon(info->iconfile()); } - qDebug() << " -- emit signal"; - this->emit itemDataAvailable( ico, info ); - qDebug() << " -- done:" << name; + this->emit itemDataAvailable( ico, info); + //qDebug() << " -- done:" << name; } // PUBLIC SLOTS diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.h b/src-qt5/desktop-utils/lumina-fm/Browser.h index 40e98753..94f6ba3f 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.h +++ b/src-qt5/desktop-utils/lumina-fm/Browser.h @@ -63,7 +63,7 @@ signals: //Main Signals void itemRemoved(QString item); //emitted if a file was removed from the underlying void clearItems(); //emitted when dirs change for example - void itemDataAvailable(QIcon, LFileInfo); + void itemDataAvailable(QIcon, LFileInfo*); //Start/Stop signals for loading of data void itemsLoading(int); //number of items which are getting loaded diff --git a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp index a64c03ca..b2ebd476 100644 --- a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp +++ b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp @@ -22,7 +22,7 @@ BrowserWidget::BrowserWidget(QString objID, QWidget *parent) : QWidget(parent){ BROWSER = new Browser(this); connect(BROWSER, SIGNAL(clearItems()), this, SLOT(clearItems()) ); connect(BROWSER, SIGNAL(itemRemoved(QString)), this, SLOT(itemRemoved(QString)) ); - connect(BROWSER, SIGNAL(itemDataAvailable(QIcon, LFileInfo)), this, SLOT(itemDataAvailable(QIcon, LFileInfo)) ); + connect(BROWSER, SIGNAL(itemDataAvailable(QIcon, LFileInfo*)), this, SLOT(itemDataAvailable(QIcon, LFileInfo*)) ); connect(BROWSER, SIGNAL(itemsLoading(int)), this, SLOT(itemsLoading(int)) ); connect(this, SIGNAL(dirChange(QString)), BROWSER, SLOT(loadDirectory(QString)) ); listWidget = 0; @@ -118,7 +118,7 @@ bool BrowserWidget::hasThumbnails(){ void BrowserWidget::setThumbnailSize(int px){ bool larger = true; - if(listWidget!=0){ + if(listWidget!=0){ larger = listWidget->iconSize().height() < px; listWidget->setIconSize(QSize(px,px)); }else if(treeWidget!=0){ @@ -138,7 +138,7 @@ int BrowserWidget::thumbnailSize(){ void BrowserWidget::setHistory(QStringList paths){ //NOTE: later items are used first - historyList = paths; + historyList = paths; } QStringList BrowserWidget::history(){ @@ -192,7 +192,7 @@ QStringList BrowserWidget::currentItems(int type){ }else if(i==0){ //ALL paths << listWidget->item(i)->whatsThis(); } - } + } }else if(treeWidget!=0){ for(int i=0; i<treeWidget->topLevelItemCount(); i++){ if(i<0 && !treeWidget->topLevelItem(i)->text(1).isEmpty()){ //FILES @@ -270,45 +270,46 @@ void BrowserWidget::itemRemoved(QString item){ } } -void BrowserWidget::itemDataAvailable(QIcon ico, LFileInfo info){ - //qDebug() << "Item Data Available:" << info.fileName(); +void BrowserWidget::itemDataAvailable(QIcon ico, LFileInfo *info){ + //qDebug() << "Item Data Available:" << info->fileName(); int num = 0; if(listWidget!=0){ //LIST WIDGET - name and icon only - if(!listWidget->findItems(info.fileName(), Qt::MatchExactly).isEmpty()){ + if(!listWidget->findItems(info->fileName(), Qt::MatchExactly).isEmpty()){ //Update existing item - QListWidgetItem *it = listWidget->findItems(info.fileName(), Qt::MatchExactly).first(); - it->setText(info.fileName()); - it->setWhatsThis(info.absoluteFilePath()); + QListWidgetItem *it = listWidget->findItems(info->fileName(), Qt::MatchExactly).first(); + it->setText(info->fileName()); + it->setWhatsThis(info->absoluteFilePath()); it->setIcon(ico); }else{ //New item - QListWidgetItem *it = new CQListWidgetItem(ico, info.fileName(), listWidget); - it->setWhatsThis(info.absoluteFilePath()); - it->setData(Qt::UserRole, (info.isDir() ? "dir" : "file")); //used for sorting + QListWidgetItem *it = new CQListWidgetItem(ico, info->fileName(), listWidget); + it->setWhatsThis(info->absoluteFilePath()); + it->setData(Qt::UserRole, (info->isDir() ? "dir" : "file")); //used for sorting listWidget->addItem(it); } num = listWidget->count(); }else if(treeWidget!=0){ QTreeWidgetItem *it = 0; - if( ! treeWidget->findItems(info.fileName(), Qt::MatchExactly, 0).isEmpty() ){ it = treeWidget->findItems(info.fileName(), Qt::MatchExactly, 0).first(); } - else{ - it = new CQTreeWidgetItem(treeWidget); - it->setText(0, info.fileName() ); //name (0) + if( ! treeWidget->findItems(info->fileName(), Qt::MatchExactly, 0).isEmpty() ){ it = treeWidget->findItems(info->fileName(), Qt::MatchExactly, 0).first(); } + else{ + it = new CQTreeWidgetItem(treeWidget); + it->setText(0, info->fileName() ); //name (0) treeWidget->addTopLevelItem(it); } //Now set/update all the data it->setIcon(0, ico); - it->setText(1, info.isDir() ? "" : LUtils::BytesToDisplaySize(info.size()) ); //size (1) - it->setText(2, info.mimetype() ); //type (2) - it->setText(3, DTtoString(info.lastModified() )); //modification date (3) - it->setText(4, DTtoString(info.created()) ); //creation date (4) + it->setText(1, info->isDir() ? "" : LUtils::BytesToDisplaySize(info->size()) ); //size (1) + it->setText(2, info->mimetype() ); //type (2) + it->setText(3, DTtoString(info->lastModified() )); //modification date (3) + it->setText(4, DTtoString(info->created()) ); //creation date (4) //Now all the hidden data - it->setWhatsThis(0, info.absoluteFilePath()); - it->setWhatsThis(3, info.lastModified().toString("yyyyMMddhhmmsszzz") ); //sorts by this actually - it->setWhatsThis(4, info.created().toString("yyyyMMddhhmmsszzz") ); //sorts by this actually + it->setWhatsThis(0, info->absoluteFilePath()); + it->setWhatsThis(3, info->lastModified().toString("yyyyMMddhhmmsszzz") ); //sorts by this actually + it->setWhatsThis(4, info->created().toString("yyyyMMddhhmmsszzz") ); //sorts by this actually num = treeWidget->topLevelItemCount(); } + if(num < numItems){ //Still loading items //this->setEnabled(false); @@ -341,7 +342,6 @@ void BrowserWidget::itemDataAvailable(QIcon ico, LFileInfo info){ } } } - if( (nF+nD) >0){ stats.prepend("\t"); if(nF>0){ diff --git a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h index a0c8fae6..fafb3746 100644 --- a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h +++ b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h @@ -72,7 +72,7 @@ private slots: //Browser connections void clearItems(); void itemRemoved(QString); - void itemDataAvailable(QIcon, LFileInfo); + void itemDataAvailable(QIcon, LFileInfo*); void itemsLoading(int total); void selectionChanged(); @@ -86,9 +86,9 @@ signals: void contextMenuRequested(); void DataDropped(QString, QStringList); void hasFocus(QString); //ID output - + //Internal signal void dirChange(QString); //current dir path - + }; #endif diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax index f504263e..4efd7fb3 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax +++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax @@ -45,7 +45,7 @@ }, { "name": "numbers", - "regex" : "\\b[0-9\\.]+\\b", + "regex" : "\\b[0-9]+\\.?[0-9]*\\b", "foreground": "colors/text" }, { |