<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 "AppLaunchButton.h"
#include "../../LSession.h"

#include <LuminaXDG.h>
#include <QInputDialog>

AppLaunchButtonPlugin::AppLaunchButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){
  button = new QToolButton(this);
    button->setAutoRaise(true);
    button->setToolButtonStyle(Qt::ToolButtonIconOnly);
  appfile = id.section("---",0,0).section("::",1,1);
    if(!QFile::exists(appfile)){ appfile.clear(); }
    connect(button, SIGNAL(clicked()), this, SLOT(AppClicked()));
    this->layout()->setContentsMargins(0,0,0,0);
    this->layout()->addWidget(button);

  QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes
}

AppLaunchButtonPlugin::~AppLaunchButtonPlugin(){

}

void AppLaunchButtonPlugin::updateButtonVisuals(){
  QIcon icon;<commit_msg>Update the applauncher panel plugin to be able to auto-complete paths to .desktop files.<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 "AppLaunchButton.h"
#include "../../LSession.h"

#include <LuminaXDG.h>
#include <LUtils.h>
#include <QInputDialog>

AppLaunchButtonPlugin::AppLaunchButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){
  button = new QToolButton(this);
    button->setAutoRaise(true);
    button->setToolButtonStyle(Qt::ToolButtonIconOnly);
    appfile = id.section("---",0,0).section("::",1,1);
    if(!QFile::exists(appfile) && appfile.endsWith(".desktop")){ 
      //might be a relative path - try to find the file
      appfile = LUtils::AppToAbsolute(appfile.section("/",-1) );
    }
    if(!QFile::exists(appfile)){ appfile.clear(); }
    connect(button, SIGNAL(clicked()), this, SLOT(AppClicked()));
    this->layout()->setContentsMargins(0,0,0,0);
    this->layout()->addWidget(button);

  QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes
}

AppLaunchButtonPlugin::~AppLaunchButtonPlugin(){

}

void AppLaunchButtonPlugin::updateButtonVisuals(){
  QIcon icon;
{'fraction_non_alphanumeric': 0.22563472563472564, 'fraction_numerical': 0.011875511875511875, 'mean_word_length': 5.532085561497326, 'pattern_counts': {'":': 2, '<': 10, '<?xml version=': 0, '>': 22, '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': '3958476', 'n_tokens_mistral': 770, 'n_tokens_neox': 733, 'n_words': 152}