diff --git a/containments/panel/contents/ui/ConfigOverlay.qml b/containments/panel/contents/ui/ConfigOverlay.qml --- a/containments/panel/contents/ui/ConfigOverlay.qml +++ b/containments/panel/contents/ui/ConfigOverlay.qml @@ -360,7 +360,6 @@ currentApplet.applet.prepareContextualActions(); alternativesButton.visible = currentApplet.applet.action("alternatives") && currentApplet.applet.action("alternatives").enabled; configureButton.visible = currentApplet.applet.action("configure") && currentApplet.applet.action("configure").enabled; - closeButton.visible = currentApplet.applet.action("remove") && currentApplet.applet.action("remove").enabled; label.text = currentApplet.applet.title; } } @@ -384,6 +383,19 @@ Layout.leftMargin: units.smallSpacing * 2 Layout.rightMargin: units.smallSpacing * 2 } + PlasmaComponents.ToolButton { + Layout.fillWidth: true + // we want destructive actions to be far from the initial + // cursor position, so show this on the top unless it's on + // a top panel + visible: tooltip.location !== PlasmaCore.Types.TopEdge + iconSource: "delete" + text: i18n("Remove") + onClicked: { + tooltip.visible = false; + currentApplet.applet.action("remove").trigger(); + } + } PlasmaComponents.ToolButton { id: configureButton Layout.fillWidth: true @@ -405,8 +417,10 @@ } } PlasmaComponents.ToolButton { - id: closeButton Layout.fillWidth: true + // we want destructive actions to be far from the initial + // cursor position, so show this on the bottom for top panels + visible: tooltip.location === PlasmaCore.Types.TopEdge iconSource: "delete" text: i18n("Remove") onClicked: { diff --git a/desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml b/desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml --- a/desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml +++ b/desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml @@ -38,6 +38,16 @@ LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft LayoutMirroring.childrenInherit: true + PlasmaComponents.ToolButton { + Layout.fillWidth: true + // we want destructive actions to be far from the initial cursor + // position, so show this on the top unless it's on a top panel + visible: location !== PlasmaCore.Types.TopEdge + text: i18nd("plasma_shell_org.kde.plasma.desktop", "Remove Panel") + iconSource: "delete" + onClicked: plasmoid.action("remove").trigger(); + } + PlasmaExtras.Heading { level: 3 text: i18nd("plasma_shell_org.kde.plasma.desktop", "Panel Alignment") @@ -127,6 +137,15 @@ iconSource: panel.formFactor === PlasmaCore.Types.Vertical ? "zoom-fit-height" : "zoom-fit-width" onClicked: panel.maximize(); } + PlasmaComponents.ToolButton { + Layout.fillWidth: true + // we want destructive actions to be far from the initial cursor + // position, so show this on the bottom for top panels + visible: location === PlasmaCore.Types.TopEdge + text: i18nd("plasma_shell_org.kde.plasma.desktop", "Remove Panel") + iconSource: "delete" + onClicked: plasmoid.action("remove").trigger(); + } } function hide() { diff --git a/desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml b/desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml --- a/desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml +++ b/desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml @@ -30,10 +30,9 @@ implicitWidth: Math.max(buttonsLayout_1.width, buttonsLayout_2.width, row.width) + units.smallSpacing * 2 implicitHeight: row.height + 20 - readonly property string removePanelButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Remove Panel") readonly property string addWidgetsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Widgets...") readonly property string addSpacerButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Spacer") - readonly property string settingsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "More Settings...") + readonly property string settingsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "More Options...") QQC2.Action { shortcut: "Escape" @@ -67,12 +66,23 @@ columnSpacing: units.smallSpacing PlasmaComponents.Button { - iconSource: "delete" - text: buttonsLayout_1.showText ? root.removePanelButtonText : "" - tooltip: buttonsLayout_1.showText ? "" : root.removePanelButtonText + text: buttonsLayout_2.showText ? root.addWidgetsButtonText : "" + tooltip: buttonsLayout_2.showText ? "" : root.addWidgetsButtonText + iconSource: "list-add" + Layout.fillWidth: true + onClicked: { + configDialog.close(); + configDialog.showAddWidgetDialog(); + } + } + + PlasmaComponents.Button { + iconSource: "distribute-horizontal-x" + text: buttonsLayout_2.showText ? root.addSpacerButtonText : "" + tooltip: buttonsLayout_2.showText ? "" : root.addSpacerButtonText Layout.fillWidth: true onClicked: { - plasmoid.action("remove").trigger(); + configDialog.addPanelSpacer(); } } } @@ -124,27 +134,6 @@ rowSpacing: units.smallSpacing columnSpacing: units.smallSpacing - PlasmaComponents.Button { - text: buttonsLayout_2.showText ? root.addWidgetsButtonText : "" - tooltip: buttonsLayout_2.showText ? "" : root.addWidgetsButtonText - iconSource: "list-add" - Layout.fillWidth: true - onClicked: { - configDialog.close(); - configDialog.showAddWidgetDialog(); - } - } - - PlasmaComponents.Button { - iconSource: "distribute-horizontal-x" - text: buttonsLayout_2.showText ? root.addSpacerButtonText : "" - tooltip: buttonsLayout_2.showText ? "" : root.addSpacerButtonText - Layout.fillWidth: true - onClicked: { - configDialog.addPanelSpacer(); - } - } - PlasmaComponents.Button { id: settingsButton iconSource: "configure" diff --git a/kcms/autostart/autostart.cpp b/kcms/autostart/autostart.cpp --- a/kcms/autostart/autostart.cpp +++ b/kcms/autostart/autostart.cpp @@ -190,8 +190,9 @@ bool desktopFile = filename.endsWith(QLatin1String(".desktop")); if ( desktopFile ) { KDesktopFile config(fi.absoluteFilePath()); - //kDebug() << fi.absoluteFilePath() << "trying" << config.desktopGroup().readEntry("Exec"); - QStringList commandLine = KShell::splitArgs(config.desktopGroup().readEntry("Exec")); + KService service(&config); + //kDebug() << fi.absoluteFilePath() << "trying" << service.exec(); + QStringList commandLine = KShell::splitArgs(service.exec()); if (commandLine.isEmpty()) { continue; } @@ -204,7 +205,7 @@ DesktopStartItem *item = new DesktopStartItem( fi.absoluteFilePath(), m_programItem, this ); const KConfigGroup grp = config.desktopGroup(); - const bool hidden = grp.readEntry("Hidden", false); + const bool hidden = service.isDeleted(); const QStringList notShowList = grp.readXdgListEntry("NotShowIn"); const QStringList onlyShowList = grp.readXdgListEntry("OnlyShowIn"); @@ -215,7 +216,7 @@ int indexPath = m_paths.indexOf((item->fileName().adjusted(QUrl::RemoveFilename).toString() ) ); if ( indexPath > 2 ) indexPath = 0; //.kde/share/autostart and .config/autostart load desktop at startup - addItem(item, config.readName(), m_pathName.value(indexPath), grp.readEntry("Exec"), disabled ); + addItem(item, service.name(), m_pathName.value(indexPath), service.exec(), disabled ); } } }