aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h20
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp5
2 files changed, 13 insertions, 12 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h
index 11394dd6..c20b1c80 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h
+++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h
@@ -32,7 +32,7 @@ public:
// - Favorites (path/type)
ItemWidget(QWidget *parent=0, QString itemPath="", QString type="unknown", bool goback=false);
// - Generic Apps
- ItemWidget(QWidget *parent=0, XDGDesktop *item= 0);
+ ItemWidget(QWidget *parent=0, XDGDesktop *item=0);
~ItemWidget();
@@ -47,7 +47,7 @@ private:
bool isDirectory, isShortcut, menuopen;
QString linkPath, iconPath, text;
QTimer *menureset;
-
+
void createWidget();
void setupContextMenu();
@@ -64,29 +64,29 @@ private slots:
void ItemClicked();
void actionClicked(QAction*);
//Functions to fix the submenu open/close issues
- void actionMenuOpen(){
- if(menureset->isActive()){ menureset->stop(); }
- menuopen = true;
+ void actionMenuOpen(){
+ if(menureset->isActive()){ menureset->stop(); }
+ menuopen = true;
}
void resetmenuflag(){ menuopen = false; } //tied to the "menureset" timer
void actionMenuClosed(){ menureset->start(); }
-
+
protected:
void mouseReleaseEvent(QMouseEvent *event){
if(menuopen){ resetmenuflag(); } //skip this event if a submenu was open
- else if(event->button() == Qt::RightButton && !icon->whatsThis().startsWith("chcat::::") ){
- menuopen = true;
+ else if(event->button() == Qt::RightButton && !icon->whatsThis().startsWith("chcat::::") ){
+ menuopen = true;
setupContextMenu();
contextMenu->popup(event->globalPos());
}else if(event->button() != Qt::NoButton){ ItemClicked(); }
}
-
+
void resizeEvent(QResizeEvent *ev){
updateItems(); //update the sizing of everything
QFrame::resizeEvent(ev); // do the normal procedures
}
-
+
signals:
void NewShortcut();
void RemovedShortcut();
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 997d2377..bcb15784 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
@@ -244,6 +244,7 @@ void StartMenu::do_search(QString search, bool force, Ui::StartMenu *tui){
if(LUtils::isValidBinary(tmp)){ found << "0::::application/x-executable::::"+tmp; }
QList<XDGDesktop*> apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All");
for(int i=0; i<apps.length(); i++){
+ if(apps[i]==0){ continue; }
int priority = -1;
if(apps[i]->name.toLower()==search.toLower()){ priority = 10; }
else if(apps[i]->name.startsWith(search, Qt::CaseInsensitive)){ priority = 15; }
@@ -276,10 +277,10 @@ void StartMenu::do_search(QString search, bool force, Ui::StartMenu *tui){
connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) );
connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) );
connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) );
- if(i%3==0){
+ /*if(i%3==0){
QApplication::processEvents();
if(searchTimer->isActive()){ searchmutex.unlock(); return; } //search changed - go ahead and stop here
- }
+ }*/
}
tui->stackedWidget->setCurrentWidget(tui->page_search);
searchmutex.unlock();
bgstack15