From 9c7a9458572362b968f862e8c29d74aa7cb8a702 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 15 Nov 2016 10:34:30 -0500 Subject: Add a general session option for whether to show the application crash notifications. --- .../lumina-config/pages/page_defaultapps.ui | 256 ++++++++++----------- .../lumina-config/pages/page_session_options.cpp | 12 + .../lumina-config/pages/page_session_options.ui | 7 + 3 files changed, 147 insertions(+), 128 deletions(-) (limited to 'src-qt5/core-utils') diff --git a/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui b/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui index ef72c4f1..8440e198 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui +++ b/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui @@ -29,11 +29,138 @@ - 1 + 0 false + + + Basic Settings + + + + + + + + QFormLayout::ExpandingFieldsGrow + + + + + + 75 + true + + + + Web Browser: + + + + + + + ... + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 75 + true + + + + E-Mail Client: + + + + + + + ... + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + + + + 75 + true + + + + File Manager: + + + + + + + + 75 + true + + + + Virtual Terminal: + + + + + + + ... + + + Qt::ToolButtonTextBesideIcon + + + + + + + ... + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + Advanced @@ -163,133 +290,6 @@ - - - Basic Settings - - - - - - - - QFormLayout::ExpandingFieldsGrow - - - - - - 75 - true - - - - Web Browser: - - - - - - - ... - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 75 - true - - - - E-Mail Client: - - - - - - - ... - - - Qt::ToolButtonTextBesideIcon - - - - - - - - - - - - 75 - true - - - - File Manager: - - - - - - - - 75 - true - - - - Virtual Terminal: - - - - - - - ... - - - Qt::ToolButtonTextBesideIcon - - - - - - - ... - - - Qt::ToolButtonTextBesideIcon - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - diff --git a/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp b/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp index 333f9da8..1af87cd2 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp @@ -33,6 +33,7 @@ page_session_options::page_session_options(QWidget *parent) : PageWidget(parent) connect(ui->check_session_playloginaudio, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) ); connect(ui->check_session_playlogoutaudio, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) ); connect(ui->check_autoapplinks, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) ); + connect(ui->check_watch_app_procs, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) ); updateIcons(); } @@ -53,6 +54,14 @@ void page_session_options::SaveSettings(){ sessionsettings.setValue("TimeFormat", ui->line_session_time->text()); sessionsettings.setValue("DateFormat", ui->line_session_date->text()); sessionsettings.setValue("DateTimeOrder", ui->combo_session_datetimeorder->currentData().toString()); + + QString lopenWatchFile = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch"; + if(QFile::exists(lopenWatchFile) && ui->check_watch_app_procs->isChecked()){ + QFile::remove(lopenWatchFile); + }else if(!QFile::exists(lopenWatchFile) && !ui->check_watch_app_procs->isChecked()){ + QFile file(lopenWatchFile); + if(file.open(QIODevice::WriteOnly) ){ file.close(); } //just need to touch it to create the file + } emit HasPendingChanges(false); } @@ -71,6 +80,9 @@ void page_session_options::LoadSettings(int){ int index = ui->combo_session_datetimeorder->findData( sessionsettings.value("DateTimeOrder","timeonly").toString() ); ui->combo_session_datetimeorder->setCurrentIndex(index); + QString lopenWatchFile = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch"; + ui->check_watch_app_procs->setChecked( !QFile::exists(lopenWatchFile) ); + sessionLoadTimeSample(); sessionLoadDateSample(); QApplication::processEvents(); //throw away any interaction events from loading diff --git a/src-qt5/core-utils/lumina-config/pages/page_session_options.ui b/src-qt5/core-utils/lumina-config/pages/page_session_options.ui index 55d204ae..255166de 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_session_options.ui +++ b/src-qt5/core-utils/lumina-config/pages/page_session_options.ui @@ -59,6 +59,13 @@ + + + + Show application crash data + + + -- cgit