mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2026-10-20 22:04:23 +00:00
Compare commits
No commits in common. "3bc9f88ce40cb8f4623f4a0086c03d7ad11b94b4" and "187c60fa7ebab36988ea60e18cbe7da027edf022" have entirely different histories.
3bc9f88ce4
...
187c60fa7e
7 changed files with 45 additions and 54 deletions
|
|
@ -174,11 +174,13 @@ FocusScope {
|
|||
main.generateDragImage();
|
||||
}
|
||||
|
||||
function onHasRefreshed() {
|
||||
function onHasRefreshed(isExplicit) {
|
||||
if(isExplicit) {
|
||||
gridView.visible = false;
|
||||
refreshGridView.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: refreshGridView
|
||||
interval: 100
|
||||
|
|
@ -1406,6 +1408,7 @@ FocusScope {
|
|||
: (gridView.height / gridView.cellHeight))
|
||||
|
||||
Component.onCompleted: {
|
||||
positioner.updateResolution();
|
||||
positioner.loadAndApplyPositionsConfig();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -393,10 +393,10 @@ FocusScope {
|
|||
Plasmoid.contextualActions.push(actionSeparator);
|
||||
}
|
||||
if (actionName === "refresh") {
|
||||
Plasmoid.contextualActions.push(viewPropertiesAction);
|
||||
Plasmoid.contextualActions.push(viewSortMenu);
|
||||
Plasmoid.contextualActions.push(viewPropertiesAction)
|
||||
Plasmoid.contextualActions.push(viewSortMenu)
|
||||
}
|
||||
Plasmoid.contextualActions.push(modelAction);
|
||||
Plasmoid.contextualActions.push(modelAction)
|
||||
if (actionName === "refresh") {
|
||||
Plasmoid.contextualActions.push(actionSeparatorSecond);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -545,7 +545,8 @@ void FolderModel::setUsedByContainment(bool used)
|
|||
QAction *action = m_actionCollection.action(QStringLiteral("refresh"));
|
||||
|
||||
if (action) {
|
||||
action->setText(i18n("&Refresh"));
|
||||
action->setText(m_usedByContainment ? i18n("&Refresh Desktop") : i18n("&Refresh View"));
|
||||
action->setIcon(m_usedByContainment ? QIcon::fromTheme(QStringLiteral("user-desktop")) : QIcon::fromTheme(QStringLiteral("view-refresh")));
|
||||
}
|
||||
|
||||
m_screenMapper->disconnect(this);
|
||||
|
|
@ -1836,7 +1837,7 @@ void FolderModel::createActions()
|
|||
QAction *paste = KStandardAction::paste(this, &FolderModel::paste, this);
|
||||
QAction *pasteTo = KStandardAction::paste(this, &FolderModel::pasteTo, this);
|
||||
|
||||
QAction *refresh = new QAction(QIcon(), i18n("&Refresh"), this);
|
||||
QAction *refresh = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), i18n("&Refresh View"), this);
|
||||
refresh->setShortcut(QKeySequence(QKeySequence::Refresh));
|
||||
connect(refresh, &QAction::triggered, this, &FolderModel::refresh);
|
||||
|
||||
|
|
@ -2272,7 +2273,6 @@ void FolderModel::refresh()
|
|||
Q_EMIT errorStringChanged();
|
||||
|
||||
m_dirModel->dirLister()->updateDirectory(m_dirModel->dirLister()->url());
|
||||
Q_EMIT hasRefreshed();
|
||||
}
|
||||
|
||||
Plasma::Applet *FolderModel::applet() const
|
||||
|
|
|
|||
|
|
@ -324,7 +324,6 @@ Q_SIGNALS:
|
|||
void selectionDone();
|
||||
void creatingNewItemsChanged() const;
|
||||
void selectionCountChanged() const;
|
||||
void hasRefreshed();
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
|
|
|
|||
|
|
@ -18,33 +18,33 @@ ViewPropertiesMenu::ViewPropertiesMenu(QObject *parent)
|
|||
{
|
||||
m_menu = new QMenu();
|
||||
|
||||
m_sortMenu = new QMenu(i18n("Sort By"));
|
||||
QMenu *menu = m_menu->addMenu(QIcon::fromTheme(QStringLiteral("view-sort")), i18n("Sort By"));
|
||||
m_sortMode = new QActionGroup(this);
|
||||
connect(m_sortMode, &QActionGroup::triggered, this, &ViewPropertiesMenu::sortModeChanged);
|
||||
QAction *action = m_sortMenu->addAction(i18nc("@item:inmenu Sort icons manually", "Unsorted"));
|
||||
QAction *action = menu->addAction(i18nc("@item:inmenu Sort icons manually", "Unsorted"));
|
||||
action->setCheckable(true);
|
||||
action->setData(-1);
|
||||
m_sortMode->addAction(action);
|
||||
action = m_sortMenu->addAction(i18nc("@item:inmenu Sort icons by name", "Name"));
|
||||
action = menu->addAction(i18nc("@item:inmenu Sort icons by name", "Name"));
|
||||
action->setCheckable(true);
|
||||
action->setData(int(KDirModel::Name));
|
||||
m_sortMode->addAction(action);
|
||||
action = m_sortMenu->addAction(i18nc("@item:inmenu Sort icons by size", "Size"));
|
||||
action = menu->addAction(i18nc("@item:inmenu Sort icons by size", "Size"));
|
||||
action->setCheckable(true);
|
||||
action->setData(int(KDirModel::Size));
|
||||
m_sortMode->addAction(action);
|
||||
action = m_sortMenu->addAction(i18nc("@item:inmenu Sort icons by file type", "Type"));
|
||||
action = menu->addAction(i18nc("@item:inmenu Sort icons by file type", "Type"));
|
||||
action->setCheckable(true);
|
||||
action->setData(int(KDirModel::Type));
|
||||
m_sortMode->addAction(action);
|
||||
action = m_sortMenu->addAction(i18nc("@item:inmenu Sort icons by date", "Date"));
|
||||
action = menu->addAction(i18nc("@item:inmenu Sort icons by date", "Date"));
|
||||
action->setCheckable(true);
|
||||
action->setData(int(KDirModel::ModifiedTime));
|
||||
m_sortMode->addAction(action);
|
||||
m_sortMenu->addSeparator();
|
||||
m_sortDesc = m_sortMenu->addAction(i18nc("@item:inmenu Sort icons in descending order", "Descending"), this, &ViewPropertiesMenu::sortDescChanged);
|
||||
menu->addSeparator();
|
||||
m_sortDesc = menu->addAction(i18nc("@item:inmenu Sort icons in descending order", "Descending"), this, &ViewPropertiesMenu::sortDescChanged);
|
||||
m_sortDesc->setCheckable(true);
|
||||
m_sortDirsFirst = m_sortMenu->addAction(i18nc("@item:inmenu Sort icons with folders first", "Folders First"), this, &ViewPropertiesMenu::sortDirsFirstChanged);
|
||||
m_sortDirsFirst = menu->addAction(i18nc("@item:inmenu Sort icons with folders first", "Folders First"), this, &ViewPropertiesMenu::sortDirsFirstChanged);
|
||||
m_sortDirsFirst->setCheckable(true);
|
||||
|
||||
m_iconSizeMenu = m_menu->addMenu(QIcon::fromTheme(QStringLiteral("transform-scale")), i18n("Icon Size"));
|
||||
|
|
@ -67,25 +67,26 @@ ViewPropertiesMenu::ViewPropertiesMenu(QObject *parent)
|
|||
m_arrangementMenu = m_menu->addMenu(QIcon::fromTheme(QStringLiteral("object-rows")), i18nc("@item:inmenu arrangement of icons", "Arrange"));
|
||||
m_arrangement = new QActionGroup(this);
|
||||
connect(m_arrangement, &QActionGroup::triggered, this, &ViewPropertiesMenu::arrangementChanged);
|
||||
const auto isLtR = qApp->layoutDirection() == Qt::LeftToRight;
|
||||
action = m_arrangementMenu->addAction(isLtR ? i18nc("@item:inmenu arrangement of icons", "Left to Right")
|
||||
: i18nc("@item:inmenu arrangement of icons", "Right to Left"));
|
||||
action = m_arrangementMenu->addAction(i18nc("@item:inmenu arrangement of icons", "In Rows"));
|
||||
action->setCheckable(true);
|
||||
action->setData(0);
|
||||
m_arrangement->addAction(action);
|
||||
action = m_arrangementMenu->addAction(i18nc("@item:inmenu arrangement of icons", "Top to Bottom"));
|
||||
action = m_arrangementMenu->addAction(i18nc("@item:inmenu arrangement of icons", "In Columns"));
|
||||
action->setData(1);
|
||||
action->setCheckable(true);
|
||||
m_arrangement->addAction(action);
|
||||
|
||||
m_alignmentMenu = m_menu->addMenu(QIcon::fromTheme(QStringLiteral("align-horizontal-left")), i18n("Align"));
|
||||
m_alignmentMenu = m_menu->addMenu(QIcon::fromTheme(QStringLiteral("align-horizontal-left")), i18n("Sort Alignment"));
|
||||
m_alignment = new QActionGroup(this);
|
||||
connect(m_alignment, &QActionGroup::triggered, this, &ViewPropertiesMenu::alignmentChanged);
|
||||
action = m_alignmentMenu->addAction(i18nc("@item:inmenu alignment of icons", "Left"));
|
||||
const auto isLtR = qApp->layoutDirection() == Qt::LeftToRight;
|
||||
auto LtRText = i18nc("@item:inmenu alignment of icons", "Left-to-Right");
|
||||
auto RtLText = i18nc("@item:inmenu alignment of icons", "Right-to-Left");
|
||||
action = m_alignmentMenu->addAction(isLtR ? LtRText : RtLText);
|
||||
action->setCheckable(true);
|
||||
action->setData(0);
|
||||
m_alignment->addAction(action);
|
||||
action = m_alignmentMenu->addAction(i18nc("@item:inmenu alignment of icons", "Right"));
|
||||
action = m_alignmentMenu->addAction(isLtR ? RtLText : LtRText);
|
||||
action->setCheckable(true);
|
||||
action->setData(1);
|
||||
m_alignment->addAction(action);
|
||||
|
|
@ -103,17 +104,12 @@ ViewPropertiesMenu::ViewPropertiesMenu(QObject *parent)
|
|||
ViewPropertiesMenu::~ViewPropertiesMenu()
|
||||
{
|
||||
delete m_menu;
|
||||
delete m_sortMenu;
|
||||
}
|
||||
|
||||
QObject *ViewPropertiesMenu::menu() const
|
||||
QMenu *ViewPropertiesMenu::menu() const
|
||||
{
|
||||
return m_menu;
|
||||
}
|
||||
QObject *ViewPropertiesMenu::sortMenu() const
|
||||
{
|
||||
return m_sortMenu;
|
||||
}
|
||||
|
||||
bool ViewPropertiesMenu::showLayoutActions() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@ class ViewPropertiesMenu : public QObject
|
|||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
|
||||
Q_PROPERTY(QObject *menu READ menu CONSTANT)
|
||||
Q_PROPERTY(QObject *sortMenu READ sortMenu CONSTANT)
|
||||
Q_PROPERTY(QMenu *menu READ menu CONSTANT)
|
||||
|
||||
Q_PROPERTY(bool showLayoutActions READ showLayoutActions WRITE setShowLayoutActions NOTIFY showLayoutActionsChanged)
|
||||
Q_PROPERTY(bool showLockAction READ showLockAction WRITE setShowLockAction NOTIFY showLockActionChanged)
|
||||
|
|
@ -39,8 +38,7 @@ public:
|
|||
explicit ViewPropertiesMenu(QObject *parent = nullptr);
|
||||
~ViewPropertiesMenu() override;
|
||||
|
||||
QObject *menu() const;
|
||||
QObject *sortMenu() const;
|
||||
QMenu *menu() const;
|
||||
|
||||
bool showLayoutActions() const;
|
||||
void setShowLayoutActions(bool show);
|
||||
|
|
@ -93,7 +91,6 @@ Q_SIGNALS:
|
|||
void iconSizeChanged();
|
||||
|
||||
private:
|
||||
QMenu *m_sortMenu;
|
||||
QMenu *m_menu;
|
||||
QMenu *m_arrangementMenu;
|
||||
QActionGroup *m_arrangement;
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ Item {
|
|||
|
||||
function beginAuth() {
|
||||
if(!authenticator.graceLocked && password.enabled) {
|
||||
authenticator.startAuthenticating();
|
||||
pageView.replaceCurrentItem(welcomePage);
|
||||
authenticator.respond(password.text);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -107,22 +107,25 @@ Item {
|
|||
// If this is coming from the noninteractive authenticators
|
||||
if(kind != 0) return;
|
||||
showMessage(i18nd("kscreenlocker_greet", "The user name or password is incorrect."), "dialog-error");
|
||||
authenticator.startAuthenticating();
|
||||
}
|
||||
function onBusyChanged() {
|
||||
/*if(!authenticator.busy && !statusPage.visible) {
|
||||
root.notification = "";
|
||||
root.notificationIcon = "";
|
||||
}*/
|
||||
}
|
||||
function onInfoMessageChanged() {
|
||||
if (authenticator.infoMessage == "") {
|
||||
return;
|
||||
}
|
||||
showMessage(authenticator.infoMessage, "dialog-information");
|
||||
}
|
||||
function onErrorMessageChanged() {
|
||||
if (authenticator.errorMessage == "") {
|
||||
return;
|
||||
}
|
||||
showMessage(authenticator.errorMessage, "dialog-error");
|
||||
}
|
||||
function onPromptForSecretChanged() {
|
||||
if(authenticator.promptForSecret && !authenticator.busy) {
|
||||
authenticator.respond(password.text);
|
||||
}
|
||||
}
|
||||
function onSucceeded() {
|
||||
keepActiveTimer.stop();
|
||||
lockSuccess.play();
|
||||
fadeExitDelay.start();
|
||||
}
|
||||
|
|
@ -178,14 +181,6 @@ Item {
|
|||
Component.onCompleted: {
|
||||
executable.exec("kreadconfig6 --file ~/.config/kdeglobals --group Sounds --key Theme");
|
||||
root.resetFocus();
|
||||
keepActiveTimer.running = true;
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: keepActiveTimer
|
||||
repeat: true
|
||||
interval: 1000
|
||||
onTriggered: authenticator.startAuthenticating();
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
|
@ -357,6 +352,7 @@ Item {
|
|||
anchors.fill: parent
|
||||
|
||||
hoverEnabled: true
|
||||
enabled: !authenticator.busy
|
||||
onClicked: root.beginAuth();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue