mirror of
https://github.com/vicr123/theshell.git
synced 2025-01-23 04:11:49 -05:00
Release 7.1
This commit is contained in:
parent
4c0b7618b6
commit
bcf41f0fda
18 changed files with 102 additions and 54 deletions
|
@ -9,8 +9,6 @@ extern void EndSession(EndSessionWait::shutdownType type);
|
|||
AppsListModel::AppsListModel(BTHandsfree* bt, QObject *parent) : QAbstractListModel(parent) {
|
||||
this->bt = bt;
|
||||
loadData();
|
||||
|
||||
connect(NativeFilter, SIGNAL(DoRetranslation()), this, SLOT(loadData()));
|
||||
}
|
||||
|
||||
AppsListModel::~AppsListModel() {
|
||||
|
|
|
@ -105,6 +105,7 @@ InfoPaneDropdown::InfoPaneDropdown(WId MainWindowId, QWidget *parent) :
|
|||
ui->userSettingsDeleteUser->setProperty("type", "destructive");
|
||||
ui->userSettingsDeleteUserAndData->setProperty("type", "destructive");
|
||||
ui->userSettingsDeleteUserOnly->setProperty("type", "destructive");
|
||||
ui->resetDeviceButton->setProperty("type", "destructive");
|
||||
|
||||
QPalette powerStretchPalette = ui->PowerStretchSwitch->palette();
|
||||
QPalette flightModePalette = ui->FlightSwitch->palette();
|
||||
|
@ -143,6 +144,10 @@ InfoPaneDropdown::InfoPaneDropdown(WId MainWindowId, QWidget *parent) :
|
|||
ui->kdeconnectLabel->setVisible(false);
|
||||
}
|
||||
|
||||
if (!QFile("/usr/bin/scallop").exists()) {
|
||||
ui->resetDeviceButton->setVisible(false);
|
||||
}
|
||||
|
||||
//Set up networking
|
||||
QDBusInterface networkInterface("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager", "org.freedesktop.NetworkManager", QDBusConnection::systemBus(), this);
|
||||
connect(ui->NetworkManager, SIGNAL(updateBarDisplay(QString,QIcon)), this, SIGNAL(networkLabelChanged(QString,QIcon)));
|
||||
|
@ -418,10 +423,6 @@ InfoPaneDropdown::InfoPaneDropdown(WId MainWindowId, QWidget *parent) :
|
|||
//Set up timer ringtones
|
||||
ringtone = new QMediaPlayer(this, QMediaPlayer::LowLatency);
|
||||
|
||||
connect(NativeFilter, &NativeEventFilter::DoRetranslation, [=] {
|
||||
ui->retranslateUi(this);
|
||||
});
|
||||
|
||||
connect(AudioMan, &AudioManager::QuietModeChanged, [=](AudioManager::quietMode mode) {
|
||||
ui->quietModeSound->setChecked(false);
|
||||
ui->quietModeNotification->setChecked(false);
|
||||
|
@ -956,16 +957,22 @@ void InfoPaneDropdown::startTimer(QTime time) {
|
|||
|
||||
QMediaPlaylist* playlist = new QMediaPlaylist();
|
||||
|
||||
#ifdef BLUEPRINT
|
||||
QString ringtonesPath = "/usr/share/sounds/theshellb/tones/";
|
||||
#else
|
||||
QString ringtonesPath = "/usr/share/sounds/theshell/tones/";
|
||||
#endif
|
||||
|
||||
if (ui->timerToneSelect->currentText() == tr("Happy Bee")) {
|
||||
playlist->addMedia(QMediaContent(QUrl("qrc:/sounds/tones/happybee")));
|
||||
playlist->addMedia(QMediaContent(QUrl::fromLocalFile(ringtonesPath + "happybee.ogg")));
|
||||
} else if (ui->timerToneSelect->currentText() == tr("Playing in the Dark")) {
|
||||
playlist->addMedia(QMediaContent(QUrl("qrc:/sounds/tones/playinginthedark")));
|
||||
playlist->addMedia(QMediaContent(QUrl::fromLocalFile(ringtonesPath + "playinginthedark.ogg")));
|
||||
} else if (ui->timerToneSelect->currentText() == tr("Ice Cream Truck")) {
|
||||
playlist->addMedia(QMediaContent(QUrl("qrc:/sounds/tones/icecream")));
|
||||
playlist->addMedia(QMediaContent(QUrl::fromLocalFile(ringtonesPath + "icecream.ogg")));
|
||||
} else if (ui->timerToneSelect->currentText() == tr("Party Complex")) {
|
||||
playlist->addMedia(QMediaContent(QUrl("qrc:/sounds/tones/party")));
|
||||
playlist->addMedia(QMediaContent(QUrl::fromLocalFile(ringtonesPath + "party.ogg")));
|
||||
} else if (ui->timerToneSelect->currentText() == tr("Salty Ditty")) {
|
||||
playlist->addMedia(QMediaContent(QUrl("qrc:/sounds/tones/saltyditty")));
|
||||
playlist->addMedia(QMediaContent(QUrl::fromLocalFile(ringtonesPath + "saltyditty.ogg")));
|
||||
}
|
||||
playlist->setPlaybackMode(QMediaPlaylist::Loop);
|
||||
ringtone->setPlaylist(playlist);
|
||||
|
@ -2339,8 +2346,6 @@ void InfoPaneDropdown::on_localeList_currentRowChanged(int currentRow)
|
|||
|
||||
//Fill locale box
|
||||
Internationalisation::fillLanguageBox(ui->localeList);
|
||||
|
||||
emit NativeFilter->DoRetranslation();
|
||||
}
|
||||
|
||||
void InfoPaneDropdown::on_StatusBarSwitch_toggled(bool checked)
|
||||
|
@ -3311,3 +3316,16 @@ void InfoPaneDropdown::on_removeAutostartButton_clicked()
|
|||
toast->show(this);
|
||||
}
|
||||
}
|
||||
|
||||
void InfoPaneDropdown::on_resetDeviceButton_clicked()
|
||||
{
|
||||
QProcess::startDetached("scallop --reset");
|
||||
this->close();
|
||||
}
|
||||
|
||||
void InfoPaneDropdown::changeEvent(QEvent *event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
QDialog::changeEvent(event);
|
||||
}
|
||||
|
|
|
@ -434,6 +434,8 @@ private slots:
|
|||
|
||||
void on_removeAutostartButton_clicked();
|
||||
|
||||
void on_resetDeviceButton_clicked();
|
||||
|
||||
public slots:
|
||||
void getNetworks();
|
||||
|
||||
|
@ -463,6 +465,8 @@ private:
|
|||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void changeEvent(QEvent* event);
|
||||
|
||||
QTimer* timer = NULL;
|
||||
int timerNotificationId = 0;
|
||||
QTimer* eventTimer;
|
||||
|
|
|
@ -356,7 +356,7 @@
|
|||
<item>
|
||||
<widget class="AnimatedStackedWidget" name="pageStack">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="clockFrame">
|
||||
<property name="autoFillBackground">
|
||||
|
@ -375,7 +375,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-344</y>
|
||||
<y>0</y>
|
||||
<width>1151</width>
|
||||
<height>1038</height>
|
||||
</rect>
|
||||
|
@ -611,14 +611,14 @@
|
|||
<second>0</second>
|
||||
<year>1969</year>
|
||||
<month>9</month>
|
||||
<day>6</day>
|
||||
<day>5</day>
|
||||
</datetime>
|
||||
</property>
|
||||
<property name="date">
|
||||
<date>
|
||||
<year>1969</year>
|
||||
<month>9</month>
|
||||
<day>6</day>
|
||||
<day>5</day>
|
||||
</date>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
|
@ -1947,7 +1947,7 @@
|
|||
<item>
|
||||
<widget class="QStackedWidget" name="settingsTabs">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>13</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="StartupSettings">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
|
@ -2052,7 +2052,8 @@
|
|||
<string>Remove</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-remove"/>
|
||||
<iconset theme="list-remove">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -4796,7 +4797,7 @@ Items that will be kept if you choose to keep files:
|
|||
</widget>
|
||||
<widget class="QWidget" name="DangerSettings">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<spacer name="verticalSpacer_12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -4886,6 +4887,19 @@ Items that will be kept if you choose to keep files:
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="resetDeviceButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset Device</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="view-refresh"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="AboutSettings">
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
languageBox->addItem(new QListWidgetItem(QIcon::fromTheme("flag-se"), tr("Swedish") + " (Svenska)"));
|
||||
break;
|
||||
case ltLT:
|
||||
languageBox->addItem(new QListWidgetItem(QIcon::fromTheme("flag-lt"), tr("Lithuanian") + " (Lietuviškai)"));
|
||||
languageBox->addItem(new QListWidgetItem(QIcon::fromTheme("flag-lt"), tr("Lithuanian") + " (Lietuvių)"));
|
||||
break;
|
||||
case inID:
|
||||
languageBox->addItem(new QListWidgetItem(QIcon::fromTheme("flag-in"), tr("Indonesian") + " (Bahasa Indonesia)"));
|
||||
|
|
|
@ -235,10 +235,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
|
||||
this->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
connect(NativeFilter, &NativeEventFilter::DoRetranslation, [=] {
|
||||
ui->retranslateUi(this);
|
||||
});
|
||||
|
||||
QMenu* quietModeMenu = new QMenu();
|
||||
quietModeMenu->addSection(tr("Quiet Mode"));
|
||||
quietModeMenu->addAction(ui->actionNone);
|
||||
|
@ -2023,3 +2019,10 @@ void MainWindow::on_networkStrength_clicked()
|
|||
void MainWindow::enterEvent(QEvent *event) {
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
void MainWindow::changeEvent(QEvent *event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
QMainWindow::changeEvent(event);
|
||||
}
|
||||
|
|
|
@ -230,6 +230,7 @@ private:
|
|||
void paintEvent(QPaintEvent *event);
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
void enterEvent(QEvent* event);
|
||||
void changeEvent(QEvent* event);
|
||||
|
||||
InfoPaneDropdown *infoPane;
|
||||
|
||||
|
|
|
@ -154,10 +154,6 @@ void Menu::show() {
|
|||
|
||||
//Show Tutorial Screen
|
||||
TutorialWin->showScreen(TutorialWindow::GatewaySearch);
|
||||
|
||||
connect(NativeFilter, &NativeEventFilter::DoRetranslation, [=] {
|
||||
ui->retranslateUi(this);
|
||||
});
|
||||
}
|
||||
|
||||
void Menu::changeEvent(QEvent *event) {
|
||||
|
@ -166,6 +162,9 @@ void Menu::changeEvent(QEvent *event) {
|
|||
if (!this->isActiveWindow()) {
|
||||
this->close();
|
||||
}
|
||||
} else if (event->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
((AppsListModel*) ui->appsListView->model())->loadData();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@ public:
|
|||
|
||||
signals:
|
||||
void SysTrayEvent(long opcode, long data2, long data3, long data4);
|
||||
void DoRetranslation();
|
||||
|
||||
public slots:
|
||||
|
||||
|
|
|
@ -11,11 +11,6 @@ NetworkWidget::NetworkWidget(QWidget *parent) :
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(NativeFilter, &NativeEventFilter::DoRetranslation, [=] {
|
||||
ui->retranslateUi(this);
|
||||
updateDevices();
|
||||
});
|
||||
|
||||
ui->knownNetworksDeleteButton->setProperty("type", "destructive");
|
||||
|
||||
QDBusConnection::systemBus().connect(nmInterface->service(), nmInterface->path(), nmInterface->interface(), "DeviceAdded", this, SLOT(updateDevices()));
|
||||
|
@ -896,3 +891,11 @@ void NetworkWidget::on_tetheringButton_clicked()
|
|||
{
|
||||
ui->stackedWidget->setCurrentIndex(5);
|
||||
}
|
||||
|
||||
void NetworkWidget::changeEvent(QEvent *event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
updateDevices();
|
||||
}
|
||||
QWidget::changeEvent(event);
|
||||
}
|
||||
|
|
|
@ -106,6 +106,8 @@ class NetworkWidget : public QWidget
|
|||
private:
|
||||
Ui::NetworkWidget *ui;
|
||||
|
||||
void changeEvent(QEvent* event);
|
||||
|
||||
QDBusInterface* nmInterface = new QDBusInterface("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager", "org.freedesktop.NetworkManager", QDBusConnection::systemBus());
|
||||
bool flightMode = false;
|
||||
};
|
||||
|
|
|
@ -13,10 +13,6 @@ NotificationsWidget::NotificationsWidget(QWidget *parent) :
|
|||
ndbus->setParentWidget(this);
|
||||
|
||||
ui->scrollArea->installEventFilter(this);
|
||||
|
||||
connect(NativeFilter, &NativeEventFilter::DoRetranslation, [=] {
|
||||
ui->retranslateUi(this);
|
||||
});
|
||||
}
|
||||
|
||||
NotificationsWidget::~NotificationsWidget()
|
||||
|
@ -95,3 +91,11 @@ void NotificationsWidget::updateNotificationCount() {
|
|||
|
||||
emit numNotificationsChanged(count);
|
||||
}
|
||||
|
||||
|
||||
void NotificationsWidget::changeEvent(QEvent *event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
QWidget::changeEvent(event);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ private:
|
|||
Ui::NotificationsWidget *ui;
|
||||
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
void changeEvent(QEvent* event);
|
||||
|
||||
QMap<int, NotificationObject*> notifications;
|
||||
QList<NotificationAppGroup*> notificationGroups;
|
||||
|
|
|
@ -152,11 +152,6 @@ Onboarding::Onboarding(QWidget *parent) :
|
|||
}
|
||||
});
|
||||
timer->start();
|
||||
|
||||
connect(NativeFilter, &NativeEventFilter::DoRetranslation, [=] {
|
||||
ui->retranslateUi(this);
|
||||
ui->welcomeLabel->setText(tr("Welcome to theShell %1!").arg(TS_VERSION));
|
||||
});
|
||||
}
|
||||
|
||||
Onboarding::~Onboarding()
|
||||
|
@ -307,8 +302,6 @@ void Onboarding::on_localeList_currentRowChanged(int currentRow)
|
|||
|
||||
//Fill locale box
|
||||
Internationalisation::fillLanguageBox(ui->localeList);
|
||||
|
||||
emit NativeFilter->DoRetranslation();
|
||||
}
|
||||
|
||||
void Onboarding::on_enableStatusBarButton_clicked()
|
||||
|
@ -363,3 +356,12 @@ void Onboarding::on_exitStackedWidget_currentChanged(int arg1)
|
|||
ui->backButton->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Onboarding::changeEvent(QEvent *event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
ui->welcomeLabel->setText(tr("Welcome to theShell %1!").arg(TS_VERSION));
|
||||
}
|
||||
QDialog::changeEvent(event);
|
||||
}
|
||||
|
|
|
@ -74,6 +74,7 @@ private:
|
|||
Ui::Onboarding *ui;
|
||||
|
||||
void reject();
|
||||
void changeEvent(QEvent* event);
|
||||
|
||||
int buttonCurrentLanguage = 0;
|
||||
QSettings settings;
|
||||
|
|
|
@ -40,13 +40,6 @@
|
|||
<file alias="cancelled.svg">flight/cancelled.svg</file>
|
||||
<file alias="unknown.svg">flight/unknown.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/sounds/tones">
|
||||
<file alias="happybee">happybee.ogg</file>
|
||||
<file alias="playinginthedark">playinginthedark.ogg</file>
|
||||
<file alias="icecream">icecream.ogg</file>
|
||||
<file alias="party">party.ogg</file>
|
||||
<file alias="saltyditty">saltyditty.ogg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/backgrounds">
|
||||
<file alias="blueprint">backgrounds/blueprint</file>
|
||||
<file alias="triangles">backgrounds/triangles</file>
|
||||
|
|
|
@ -193,12 +193,18 @@ unix {
|
|||
translations.files = translations/*
|
||||
xsession.path = /usr/share/xsessions
|
||||
|
||||
ringtones.files = tones/*
|
||||
|
||||
blueprint {
|
||||
translations.path = /usr/share/theshellb/translations
|
||||
xsession.files = theshellb.desktop
|
||||
|
||||
ringtones.path = /usr/share/sounds/theshellb/tones
|
||||
} else {
|
||||
translations.path = /usr/share/theshell/translations
|
||||
xsession.files = theshell.desktop
|
||||
|
||||
ringtones.path = /usr/share/sounds/theshell/tones
|
||||
}
|
||||
|
||||
INSTALLS += target translations xsession
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.4.1, 2017-12-05T00:19:06. -->
|
||||
<!-- Written by QtCreator 4.4.1, 2017-12-08T16:25:47. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
|
Loading…
Reference in a new issue