mirror of
https://github.com/vicr123/theshell.git
synced 2025-01-23 12:12:06 -05:00
New lock screen setting
This commit is contained in:
parent
5310b70552
commit
91032030a5
7 changed files with 88 additions and 33 deletions
|
@ -317,6 +317,6 @@ QString AudioManager::getCurrentQuietModeDescription() {
|
|||
case notifications:
|
||||
return tr("Ignores any notifications from all apps. Normal sounds will still be played, and timers and reminders will still notify you, however, they won't play sounds.");
|
||||
case mute:
|
||||
return tr("Completely turns off all sounds and notifications from all apps. Not even timers or reminders will notify you..");
|
||||
return tr("Completely turns off all sounds and notifications from all apps. Not even timers or reminders will notify you.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,10 +32,8 @@ void ClickableLabel::setShowDisabled(bool showDisabled) {
|
|||
QPalette applicationPal = QApplication::palette(tempLabel);
|
||||
QPalette thisPal = this->palette();
|
||||
if (isShowDisabled) {
|
||||
//thisPal.setCurrentColorGroup(QPalette::Disabled);
|
||||
thisPal.setBrush(QPalette::WindowText, applicationPal.brush(QPalette::Disabled, QPalette::WindowText));
|
||||
} else {
|
||||
//thisPal.setCurrentColorGroup(QPalette::Active);
|
||||
thisPal.setBrush(QPalette::WindowText, applicationPal.brush(QPalette::Normal, QPalette::WindowText));
|
||||
}
|
||||
this->setPalette(thisPal);
|
||||
|
|
|
@ -63,7 +63,9 @@ void DbusEvents::UnlockScreen() {
|
|||
}
|
||||
|
||||
void DbusEvents::SleepingNow() {
|
||||
LockScreen();
|
||||
if (settings.value("lockScreen/showOnSuspend", true).toBool()) {
|
||||
LockScreen();
|
||||
}
|
||||
}
|
||||
|
||||
void DbusEvents::NewUdisksInterface(QDBusObjectPath path) {
|
||||
|
|
|
@ -204,6 +204,7 @@ InfoPaneDropdown::InfoPaneDropdown(NotificationDBus* notificationEngine, UPowerD
|
|||
ui->MediaSwitch->setChecked(settings.value("notifications/mediaInsert", true).toBool());
|
||||
ui->StatusBarSwitch->setChecked(settings.value("bar/statusBar", false).toBool());
|
||||
ui->TouchInputSwitch->setChecked(settings.value("input/touch", false).toBool());
|
||||
ui->SuspendLockScreen->setChecked(settings.value("lockScreen/showOnSuspend", true).toBool());
|
||||
ui->themeButtonColor->setCurrentIndex(themeAccentColorIndex);
|
||||
|
||||
QString defaultFont;
|
||||
|
@ -303,6 +304,7 @@ InfoPaneDropdown::InfoPaneDropdown(NotificationDBus* notificationEngine, UPowerD
|
|||
ui->quietModeDescription->setText(AudioMan->getCurrentQuietModeDescription());
|
||||
}
|
||||
});
|
||||
ui->quietModeSettings->setVisible(false);
|
||||
|
||||
ui->RemindersList->setModel(new RemindersListModel);
|
||||
ui->RemindersList->setItemDelegate(new RemindersDelegate);
|
||||
|
@ -2393,16 +2395,19 @@ void InfoPaneDropdown::on_TouchInputSwitch_toggled(bool checked)
|
|||
void InfoPaneDropdown::on_quietModeSound_clicked()
|
||||
{
|
||||
AudioMan->setQuietMode(AudioManager::none);
|
||||
ui->quietModeSound->setChecked(true);
|
||||
}
|
||||
|
||||
void InfoPaneDropdown::on_quietModeNotification_clicked()
|
||||
{
|
||||
AudioMan->setQuietMode(AudioManager::notifications);
|
||||
ui->quietModeNotification->setChecked(true);
|
||||
}
|
||||
|
||||
void InfoPaneDropdown::on_quietModeMute_clicked()
|
||||
{
|
||||
AudioMan->setQuietMode(AudioManager::mute);
|
||||
ui->quietModeMute->setChecked(true);
|
||||
}
|
||||
|
||||
RemindersListModel::RemindersListModel(QObject *parent) : QAbstractListModel(parent) {
|
||||
|
@ -2549,3 +2554,8 @@ void InfoPaneDropdown::on_ReminderCreate_clicked()
|
|||
((RemindersListModel*) ui->RemindersList->model())->updateData();
|
||||
ui->RemindersStackedWidget->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void InfoPaneDropdown::on_SuspendLockScreen_toggled(bool checked)
|
||||
{
|
||||
settings.setValue("lockScreen/showOnSuspend", checked);
|
||||
}
|
||||
|
|
|
@ -289,6 +289,8 @@ private slots:
|
|||
|
||||
void on_ReminderCreate_clicked();
|
||||
|
||||
void on_SuspendLockScreen_toggled(bool checked);
|
||||
|
||||
public slots:
|
||||
void getNetworks();
|
||||
|
||||
|
|
|
@ -361,9 +361,9 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-316</y>
|
||||
<width>1151</width>
|
||||
<height>1014</height>
|
||||
<y>0</y>
|
||||
<width>592</width>
|
||||
<height>1035</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_26">
|
||||
|
@ -597,14 +597,14 @@
|
|||
<second>0</second>
|
||||
<year>1969</year>
|
||||
<month>10</month>
|
||||
<day>21</day>
|
||||
<day>19</day>
|
||||
</datetime>
|
||||
</property>
|
||||
<property name="date">
|
||||
<date>
|
||||
<year>1969</year>
|
||||
<month>10</month>
|
||||
<day>21</day>
|
||||
<day>19</day>
|
||||
</date>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
|
@ -852,7 +852,8 @@
|
|||
<string>New Reminder</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-add"/>
|
||||
<iconset theme="list-add">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -938,7 +939,8 @@
|
|||
<string>Cancel</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="dialog-cancel"/>
|
||||
<iconset theme="dialog-cancel">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -948,7 +950,8 @@
|
|||
<string>Create Reminder</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="dialog-ok"/>
|
||||
<iconset theme="dialog-ok">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1441,7 +1444,8 @@
|
|||
<string>Sound</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="audio-volume-high"/>
|
||||
<iconset theme="audio-volume-high">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
|
@ -1457,7 +1461,8 @@
|
|||
<string>No Notifications</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="quiet-mode"/>
|
||||
<iconset theme="quiet-mode">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
|
@ -1470,7 +1475,8 @@
|
|||
<string>Mute</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="audio-volume-muted"/>
|
||||
<iconset theme="audio-volume-muted">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
|
@ -1892,7 +1898,7 @@
|
|||
<item>
|
||||
<widget class="QStackedWidget" name="settingsTabs">
|
||||
<property name="currentIndex">
|
||||
<number>13</number>
|
||||
<number>7</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="StartupSettings">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
|
@ -3021,9 +3027,6 @@
|
|||
</widget>
|
||||
<widget class="QWidget" name="LockScreenSettings">
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lockScreenBackground"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_31">
|
||||
<property name="text">
|
||||
|
@ -3031,14 +3034,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="lockScreenBackgroundBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QFrame" name="displayHeader_7">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
|
@ -3087,7 +3083,7 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<item row="3" column="0" colspan="4">
|
||||
<spacer name="verticalSpacer_15">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -3100,6 +3096,53 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_74">
|
||||
<property name="text">
|
||||
<string>Lock screen after returning from suspend</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="Switch" name="SuspendLockScreen">
|
||||
<property name="text">
|
||||
<string>SuspendLockScreenSwitch</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_41">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lockScreenBackground"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="lockScreenBackgroundBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<spacer name="horizontalSpacer_29">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="theWaveSettings">
|
||||
|
|
|
@ -16,12 +16,12 @@ LocationServices::LocationServices(QObject *parent) : QObject(parent)
|
|||
QDBusPendingCall message = QDBusConnection::systemBus().asyncCall(agentMessage);*/
|
||||
//qDebug() << message.errorMessage();
|
||||
|
||||
QDBusConnection::systemBus().connect("org.freedesktop.GeoClue2", "/org/freedesktop/GeoClue2/Manager", "org.freedesktop.DBus.Properties", "PropertiesChanged", this, SLOT(GeocluePropertiesChanged(QString,QVariantMap)));
|
||||
//QDBusConnection::systemBus().connect("org.freedesktop.GeoClue2", "/org/freedesktop/GeoClue2/Manager", "org.freedesktop.DBus.Properties", "PropertiesChanged", this, SLOT(GeocluePropertiesChanged(QString,QVariantMap)));
|
||||
}
|
||||
|
||||
bool LocationServices::AuthorizeApp(QString desktop_id, uint req_accuracy_level, uint &allowed_accuracy_level) {
|
||||
qDebug() << desktop_id + " is accessing location";
|
||||
allowed_accuracy_level = req_accuracy_level;
|
||||
//qDebug() << desktop_id + " is accessing location";
|
||||
//allowed_accuracy_level = req_accuracy_level;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -30,9 +30,9 @@ uint LocationServices::MaxAccuracyLevel() {
|
|||
}
|
||||
|
||||
void LocationServices::GeocluePropertiesChanged(QString interface, QVariantMap properties) {
|
||||
if (interface == "org.freedesktop.GeoClue2.Manager") {
|
||||
/*if (interface == "org.freedesktop.GeoClue2.Manager") {
|
||||
if (properties.keys().contains("InUse")) {
|
||||
emit locationUsingChanged(properties.value("InUse").toBool());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue