aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/panel-plugins/systemstart
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-11-14 00:04:49 +0000
committerWeblate <noreply@weblate.org>2017-11-14 00:04:49 +0000
commitdc40a01ae695b47f87daff7ee08f3519d79b12ae (patch)
tree6e1d58f23d4537f8f501ba7e531f9ed90f269dda /src-qt5/core/lumina-desktop/panel-plugins/systemstart
parentTranslated using Weblate (German) (diff)
parentAdd a special rule for Ubuntu Linux: (diff)
downloadlumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.tar.gz
lumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.tar.bz2
lumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/systemstart')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp5
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp18
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h4
3 files changed, 15 insertions, 12 deletions
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..30e82c47 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp
@@ -26,9 +26,10 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon
connect(startmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) );
connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList)));
menu->setContents(startmenu);
- QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(0,0)).toSize();
+ QRect screenSize = QApplication::desktop()->availableGeometry(this);
+ QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(screenSize.width() * 0.2, screenSize.height())).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);
bgstack15