<commit_before>#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    this->s_settingsDialog = 0;
    this->systemTrayIcon = 0;

    this->setWindowTitle(APP_TITLE);
    this->setMinimumSize(627, 500);

    this->view = new WebView(this);
    this->view->setUrl(APP_URL);
    this->setCentralWidget(this->view);
    this->view->show();

#ifndef Q_WS_MAC

    // Global keys

    QxtGlobalShortcut* previousMediaShortcut = new QxtGlobalShortcut(QKeySequence("Media Previous"));
    connect(previousMediaShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(previous()));

    QxtGlobalShortcut* previousShortcut = new QxtGlobalShortcut(QKeySequence("Meta+F10"));
    connect(previousShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(previous()));

    QxtGlobalShortcut* playMediaShortcut = new QxtGlobalShortcut(QKeySequence("Media Play"));
    connect(playMediaShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(pause()));

    QxtGlobalShortcut* playShortcut = new QxtGlobalShortcut(QKeySequence("Meta+F11"));
    connect(playShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(pause()));

    QxtGlobalShortcut* nextMediaShortcut = new QxtGlobalShortcut(QKeySequence("Media Next"));
    connect(nextMediaShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(next()));

    QxtGlobalShortcut* nextShortcut = new QxtGlobalShortcut(QKeySequence("Meta+F12"));
    connect(nextShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(next()));


#endif

    // Tray menu

    QMenu *menu = new QMenu();

    QAction *activateAction = menu->addAction(u("Активиров&ать"));
    connect(activateAction, SIGNAL(triggered()), this, SLOT(showAndRaise()));

    menu->addSeparator();

    QAction *trackArtistAction = menu->addAction("");
    trackArtistAction->setEnabled(false);
    trackArtistAction->setVisible(false);
    connect(qApp->bridge, SIGNAL(playing_change(bool)), trackArtistAction, SLOT(setVisible(bool)));

    QAction *trackTitleAction = menu->addAction("");
    trackTitleAction->setEnabled(false);
    trackTitleAction->setVisible(false);
    connect(qApp->bridge, SIGNAL(playing_change(bool)), trackTitleAction, SLOT(setVisible(bool)));

    QAction *previousTrackAction = menu->addAction(u("П&редыдущий трек"));<commit_msg>Активировать -> Показать главное окно closes #3<commit_after>#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    this->s_settingsDialog = 0;
    this->systemTrayIcon = 0;

    this->setWindowTitle(APP_TITLE);
    this->setMinimumSize(627, 500);

    this->view = new WebView(this);
    this->view->setUrl(APP_URL);
    this->setCentralWidget(this->view);
    this->view->show();

#ifndef Q_WS_MAC

    // Global keys

    QxtGlobalShortcut* previousMediaShortcut = new QxtGlobalShortcut(QKeySequence("Media Previous"));
    connect(previousMediaShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(previous()));

    QxtGlobalShortcut* previousShortcut = new QxtGlobalShortcut(QKeySequence("Meta+F10"));
    connect(previousShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(previous()));

    QxtGlobalShortcut* playMediaShortcut = new QxtGlobalShortcut(QKeySequence("Media Play"));
    connect(playMediaShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(pause()));

    QxtGlobalShortcut* playShortcut = new QxtGlobalShortcut(QKeySequence("Meta+F11"));
    connect(playShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(pause()));

    QxtGlobalShortcut* nextMediaShortcut = new QxtGlobalShortcut(QKeySequence("Media Next"));
    connect(nextMediaShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(next()));

    QxtGlobalShortcut* nextShortcut = new QxtGlobalShortcut(QKeySequence("Meta+F12"));
    connect(nextShortcut, SIGNAL(activated()), qApp->bridge, SIGNAL(next()));


#endif

    // Tray menu

    QMenu *menu = new QMenu();

    QAction *activateAction = menu->addAction(u("Показ&ать главное окно"));
    connect(activateAction, SIGNAL(triggered()), this, SLOT(showAndRaise()));

    menu->addSeparator();

    QAction *trackArtistAction = menu->addAction("");
    trackArtistAction->setEnabled(false);
    trackArtistAction->setVisible(false);
    connect(qApp->bridge, SIGNAL(playing_change(bool)), trackArtistAction, SLOT(setVisible(bool)));

    QAction *trackTitleAction = menu->addAction("");
    trackTitleAction->setEnabled(false);
    trackTitleAction->setVisible(false);
    connect(qApp->bridge, SIGNAL(playing_change(bool)), trackTitleAction, SLOT(setVisible(bool)));

    QAction *previousTrackAction = menu->addAction(u("П&редыдущий трек"));
{'fraction_non_alphanumeric': 0.1485278080697928, 'fraction_numerical': 0.0063249727371864775, 'mean_word_length': 5.9696048632218845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 60, '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': '873656', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1410, 'n_words': 226}