diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-26 18:30:51 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-26 18:30:51 -0400 |
commit | 9c5f154c2e8cc1ad388732a0bc3ee9bb42f296c6 (patch) | |
tree | f36b8c5f944b0e9e6170d59f2423ad1454e89cf6 /src-qt5 | |
parent | Started incorporating the Grav screensaver to QML (diff) | |
download | lumina-9c5f154c2e8cc1ad388732a0bc3ee9bb42f296c6.tar.gz lumina-9c5f154c2e8cc1ad388732a0bc3ee9bb42f296c6.tar.bz2 lumina-9c5f154c2e8cc1ad388732a0bc3ee9bb42f296c6.zip |
Fix a few places where /net/ files are still checked for existance (pauses/delays the session init)
Diffstat (limited to 'src-qt5')
6 files changed, 20 insertions, 17 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index fdf51a11..53b59165 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -631,7 +631,7 @@ void XDGDesktopList::populateMenu(QMenu *topmenu, bool byCategory){ void LFileInfo::loadExtraInfo(){ desk = 0; //Now load the extra information - if(this->isDir()){ + if( this->suffix().isEmpty() && (this->absoluteFilePath().startsWith("/net/") || this->isDir()) ){ mime = "inode/directory"; //Special directory icons QString name = this->fileName().toLower(); @@ -644,6 +644,7 @@ void LFileInfo::loadExtraInfo(){ else if(name=="downloads"){ icon = "folder-downloads"; } else if(name=="documents"){ icon = "folder-documents"; } else if(name=="images" || name=="pictures"){ icon = "folder-image"; } + else if(this->absoluteFilePath().startsWith("/net/")){ icon = "folder-shared"; } else if( !this->isReadable() ){ icon = "folder-locked"; } }else if( this->suffix()=="desktop"){ mime = "application/x-desktop"; @@ -730,7 +731,7 @@ bool LXDG::checkExec(QString exec){ else{ QStringList paths = QString(getenv("PATH")).split(":"); for(int i=0; i<paths.length(); i++){ - if(QFile::exists(paths[i]+"/"+exec)){ return true; } + if(QFile::exists(paths[i]+"/"+exec)){ return true; } } } return false; //could not find the executable in the current path(s) diff --git a/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp b/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp index 41a1017d..025c067a 100644 --- a/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp +++ b/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp @@ -21,7 +21,7 @@ LDesktopPluginSpace::LDesktopPluginSpace() : QWidget(){ //this->setAttribute(Qt::WA_TranslucentBackground); //this->setAttribute(Qt::WA_NoSystemBackground); this->setAutoFillBackground(false); - this->setStyleSheet("QWidget#LuminaDesktopPluginSpace{ border: none; background: transparent; }"); + this->setStyleSheet("QWidget#LuminaDesktopPluginSpace{ border: none; background: transparent; }"); this->setWindowFlags(Qt::WindowStaysOnBottomHint | Qt::CustomizeWindowHint | Qt::FramelessWindowHint); this->setAcceptDrops(true); this->setContextMenuPolicy(Qt::NoContextMenu); @@ -34,7 +34,7 @@ LDesktopPluginSpace::LDesktopPluginSpace() : QWidget(){ } LDesktopPluginSpace::~LDesktopPluginSpace(){ - + } void LDesktopPluginSpace::LoadItems(QStringList plugs, QStringList files){ @@ -76,7 +76,7 @@ void LDesktopPluginSpace::setBackground(QPixmap pix){ void LDesktopPluginSpace::setDesktopArea(QRect area){ //qDebug() << "Setting Desktop Plugin Area:" << area; desktopRect = area; - + } // =================== diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp index 0258d561..533b5997 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp @@ -44,7 +44,7 @@ void AppLauncherPlugin::loadButton(){ QFileInfo info(path); this->contextMenu()->clear(); //qDebug() << "Default Application Launcher:" << def << path; - bool ok = QFile::exists(path); + bool ok = info.canonicalPath().startsWith("/net/") || QFile::exists(path); if(!ok){ emit RemovePlugin(this->ID()); return;} icosize = this->height()-4 - 2.2*button->fontMetrics().height(); button->setFixedSize( this->width()-4, this->height()-4); diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index f44add77..bbcd096c 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -28,7 +28,7 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon menu->setContents(startmenu); QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(0,0)).toSize(); if(!saved.isNull()){ startmenu->setFixedSize(saved); } //re-load the previously saved value - + button->setMenu(menu); connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) ); QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index e8df8390..c99e2b4b 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -138,7 +138,7 @@ void StartMenu::UpdateMenu(bool forceall){ } void StartMenu::ReLoadQuickLaunch(){ - emit UpdateQuickLaunch( LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList() ); + emit UpdateQuickLaunch( LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList() ); } void StartMenu::UpdateQuickLaunch(QString path, bool keep){ @@ -431,7 +431,9 @@ void StartMenu::UpdateFavs(){ tmp.sort(); //Sort alphabetically by name (dirs/files) for(int i=0; i<tmp.length(); i++){ if(type<2){ rest.removeAll(tmp[i]); } - if( !QFile::exists(tmp[i].section("::::",2,-1)) ){ continue; } //invalid favorite - skip it + if( !tmp[i].section("::::",2,-1).startsWith("/net/") ){ + if( !QFile::exists(tmp[i].section("::::",2,-1)) ){ continue; } //invalid favorite - skip it + } ItemWidget *it = 0; if( tmp[i].section("::::",2,-1).endsWith(".desktop")){ XDGDesktop item(tmp[i].section("::::",2,-1)); @@ -493,7 +495,7 @@ void StartMenu::on_stackedWidget_currentChanged(int val){ if(tot>1){ ui->frame_wkspace->setVisible(true); int cur = LSession::handle()->XCB->CurrentWorkspace(); - ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); + ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); }else{ ui->frame_wkspace->setVisible(false); } @@ -635,14 +637,14 @@ void StartMenu::on_tool_mute_audio_clicked(){ ui->slider_volume->setValue(0); } } - + //Screen Brightness void StartMenu::on_slider_bright_valueChanged(int val){ ui->label_bright->setText(QString::number(val)+"%"); LOS::setScreenBrightness(val); } - + //Workspace void StartMenu::on_tool_set_nextwkspace_clicked(){ int cur = LSession::handle()->XCB->CurrentWorkspace(); @@ -663,10 +665,10 @@ void StartMenu::on_tool_set_prevwkspace_clicked(){ if(cur<0){ cur = tot-1; } //back to end //qDebug() << " - New Current:" << cur; LSession::handle()->XCB->SetCurrentWorkspace(cur); - ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); + ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); } - + //Locale void StartMenu::on_combo_locale_currentIndexChanged(int){ //Get the currently selected Locale @@ -677,7 +679,7 @@ void StartMenu::on_combo_locale_currentIndexChanged(int){ LSession::handle()->switchLocale(locale); } - + //Search void StartMenu::on_line_search_textEdited(QString){ if(searchTimer->isActive()){ searchTimer->stop(); } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h index 8ab04d94..e2dbb273 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h @@ -34,13 +34,13 @@ private: Ui::StartMenu *ui; QStringList favs; QString CCat, CSearch, topsearch; //current category/search - QTimer *searchTimer; + QTimer *searchTimer; //Simple utility functions //void deleteChildren(QWidget *obj); //recursive function void ClearScrollArea(QScrollArea *area); void SortScrollArea(QScrollArea *area); - void do_search(QString search, bool force); + void do_search(QString search, bool force); bool promptAboutUpdates(bool &skip); |