<commit_before>//===========================================
//  Lumina-DE source code
//  Copyright (c) 2015, <NAME>
//  Available under the 3-clause BSD license
//  See the LICENSE file for full details
//===========================================
#include "LAppMenuPlugin.h"
#include "../../LSession.h"

#include <LuminaXDG.h>

LAppMenuPlugin::LAppMenuPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){
  button = new QToolButton(this);
    button->setAutoRaise(true);
    button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
  mainmenu = new QMenu(this);
    button->setMenu( mainmenu );
    button->setPopupMode(QToolButton::InstantPopup);
    this->layout()->setContentsMargins(0,0,0,0);
    this->layout()->addWidget(button);

  connect(mainmenu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed()));
  connect(mainmenu, SIGNAL(triggered(QAction*)), this, SLOT(LaunchItem(QAction*)) );
  connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SIGNAL(UpdateMenu()));
  QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes
  QTimer::singleShot(0,this, SLOT(UpdateMenu()) );
}

LAppMenuPlugin::~LAppMenuPlugin(){

}

void LAppMenuPlugin::updateButtonVisuals(){
    button->setToolTip( tr("Quickly launch applications or open files"));
    button->setText( tr("Start Here") );
    //Use the PC-BSD icon by default (or the Lumina icon for non-PC-BSD systems)
    button->setIcon( LXDG::findIcon("pcbsd","Lumina-DE") );
}

// ========================
//    PRIVATE FUNCTIONS
// ========================
void LAppMenuPlugin::LaunchItem(QAction* item){
  QString appFile = item->whatsThis();<commit_msg>Change the text of the app menu plugin to have the button now say "Applications".<commit_after>//===========================================
//  Lumina-DE source code
//  Copyright (c) 2015, <NAME>
//  Available under the 3-clause BSD license
//  See the LICENSE file for full details
//===========================================
#include "LAppMenuPlugin.h"
#include "../../LSession.h"

#include <LuminaXDG.h>

LAppMenuPlugin::LAppMenuPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){
  button = new QToolButton(this);
    button->setAutoRaise(true);
    button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
  mainmenu = new QMenu(this);
    button->setMenu( mainmenu );
    button->setPopupMode(QToolButton::InstantPopup);
    this->layout()->setContentsMargins(0,0,0,0);
    this->layout()->addWidget(button);

  connect(mainmenu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed()));
  connect(mainmenu, SIGNAL(triggered(QAction*)), this, SLOT(LaunchItem(QAction*)) );
  connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SIGNAL(UpdateMenu()));
  QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes
  QTimer::singleShot(0,this, SLOT(UpdateMenu()) );
}

LAppMenuPlugin::~LAppMenuPlugin(){

}

void LAppMenuPlugin::updateButtonVisuals(){
    button->setToolTip( tr("Quickly launch applications or open files"));
    button->setText( tr("Applications") );
    //Use the PC-BSD icon by default (or the Lumina icon for non-PC-BSD systems)
    button->setIcon( LXDG::findIcon("pcbsd","Lumina-DE") );
}

// ========================
//    PRIVATE FUNCTIONS
// ========================
void LAppMenuPlugin::LaunchItem(QAction* item){
  QString appFile = item->whatsThis();
{'fraction_non_alphanumeric': 0.22624565469293165, 'fraction_numerical': 0.006373117033603708, 'mean_word_length': 5.8376237623762375, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1787550', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1041, 'n_words': 218}