diff options
Diffstat (limited to 'lumina-desktop/panel-plugins/systemstart/StartMenu.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/systemstart/StartMenu.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index 5bab9377..4c64f554 100644 --- a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -123,6 +123,16 @@ void StartMenu::ReLoadQuickLaunch(){ emit UpdateQuickLaunch( LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList() ); } +void StartMenu::UpdateQuickLaunch(QString path, bool keep){ + QStringList QL = LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList(); + if(keep){QL << path; } + else{ QL.removeAll(path); } + QL.removeDuplicates(); + LSession::handle()->sessionSettings()->setValue("QuicklaunchApps",QL); + LSession::handle()->sessionSettings()->sync(); + emit UpdateQuickLaunch(QL); +} + // ========================== // PRIVATE FUNCTIONS // ========================== @@ -178,15 +188,6 @@ void StartMenu::LaunchItem(QString path, bool fix){ } } -void StartMenu::UpdateQuickLaunch(QString path, bool keep){ - QStringList QL = LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList(); - if(keep){QL << path; } - else{ QL.removeAll(path); } - QL.removeDuplicates(); - LSession::handle()->sessionSettings()->setValue("QuicklaunchApps",QL); - emit UpdateQuickLaunch(QL); -} - //Listing Update routines void StartMenu::UpdateApps(){ ClearScrollArea(ui->scroll_apps); |