Fix minor EBN issues

pull/2/head
Yuri Chornoivan 7 years ago
parent b4dd016ed0
commit 7323068f36

@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef ALTERNATIVESDIALOG_H
#define ALTERNATIVESDIALOG_H
#ifndef ALTERNATIVESHELPER_H
#define ALTERNATIVESHELPER_H
#include <Plasma/Applet>

@ -448,7 +448,7 @@ void DockConfigView::addPanelSpacer()
void DockConfigView::hideConfigWindow()
{
if (m_shellSurface) {
//!NOTE: Avoid crash in wayland enviroment with qt5.9
//!NOTE: Avoid crash in wayland environment with qt5.9
close();
} else {
hide();

@ -192,7 +192,7 @@ bool DockMenuManager::mousePressEvent(QMouseEvent *event)
desktopMenu->setAttribute(Qt::WA_DeleteOnClose);
m_contextMenu = desktopMenu;
//! deprecated old code that can be removed if the following plasma approach doesnt
//! deprecated old code that can be removed if the following plasma approach doesn't
//! create any issues with context menu creation in Latte
/*if (m_dockView->mouseGrabberItem()) {
//workaround, this fixes for me most of the right click menu behavior

@ -328,7 +328,7 @@ bool DockSecConfigView::event(QEvent *e)
void DockSecConfigView::hideConfigWindow()
{
if (m_shellSurface) {
//!NOTE: Avoid crash in wayland enviroment with qt5.9
//!NOTE: Avoid crash in wayland environment with qt5.9
close();
} else {
hide();

@ -60,7 +60,7 @@
namespace Latte {
//! both alwaysVisible and dockWinBehavior are passed through corona because
//! during the dock window creation containment hasnt been set, but these variables
//! during the dock window creation containment hasn't been set, but these variables
//! are needed in order for window flags to be set correctly
DockView::DockView(Plasma::Corona *corona, QScreen *targetScreen, bool dockWindowBehavior)
: PlasmaQuick::ContainmentView(corona),
@ -122,8 +122,8 @@ DockView::DockView(Plasma::Corona *corona, QScreen *targetScreen, bool dockWindo
connect(&m_screenSyncTimer, &QTimer::timeout, this, &DockView::reconsiderScreen);
//! under X11 it was identified that windows many times especially under screen changes
//! dont end up at the correct position and size. This timer will enforce repositionings
//! and resizes every 500ms if the window hasnt end up to correct values and until this
//! don't end up at the correct position and size. This timer will enforce repositionings
//! and resizes every 500ms if the window hasn't end up to correct values and until this
//! is achieved
m_validateGeometryTimer.setSingleShot(true);
m_validateGeometryTimer.setInterval(500);
@ -719,7 +719,7 @@ QRect DockView::maximumNormalGeometry()
}
//! this is needed in order to preserve that the top dock will be above
//! the others in case flag bypasswindowmanagerhint hasnt be set,
//! the others in case flag bypasswindowmanagerhint hasn't be set,
//! such a case is the AlwaysVisible mode
if (location() == Plasma::Types::TopEdge) {
KWindowSystem::setState(winId(), NET::KeepAbove);
@ -1552,7 +1552,7 @@ void DockView::setBlockHiding(bool block)
void DockView::updateEffects()
{
//! Dont apply any effect before the wayland surface is created under wayland
//! Don't apply any effect before the wayland surface is created under wayland
//! https://bugs.kde.org/show_bug.cgi?id=392890
if (KWindowSystem::isPlatformWayland() && !m_shellSurface) {
return;

@ -16,8 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef PLASMA_PANELSHADOWS_H
#define PLASMA_PANELSHADOWS_H
#ifndef PLASMA_PANELSHADOWS_P_H
#define PLASMA_PANELSHADOWS_P_H
#include <QSet>

@ -432,7 +432,7 @@ void VisibilityManagerPrivate::dodgeActive(WindowId wid)
if (raiseTemporarily)
return;
//!dont send false raiseDock signal when containing mouse
//!don't send false raiseDock signal when containing mouse
if (containsMouse) {
raiseDock(true);
return;
@ -450,7 +450,7 @@ void VisibilityManagerPrivate::dodgeActive(WindowId wid)
winfo = wm->requestInfo(wm->activeWindow());
}
//!dont send false raiseDock signal when containing mouse
//!don't send false raiseDock signal when containing mouse
if (wm->isOnCurrentDesktop(wid) && wm->isOnCurrentActivity(wid)) {
raiseDock(!intersects(winfo));
}
@ -461,7 +461,7 @@ void VisibilityManagerPrivate::dodgeMaximized(WindowId wid)
if (raiseTemporarily)
return;
//!dont send false raiseDock signal when containing mouse
//!don't send false raiseDock signal when containing mouse
if (containsMouse) {
raiseDock(true);
return;
@ -491,7 +491,7 @@ void VisibilityManagerPrivate::dodgeMaximized(WindowId wid)
&& intersects(winfo));
};
//!dont send false raiseDock signal when containing mouse
//!don't send false raiseDock signal when containing mouse
if (wm->isOnCurrentDesktop(wid) && wm->isOnCurrentActivity(wid))
raiseDock(view->formFactor() == Plasma::Types::Vertical
? !isMaxHoriz() : !isMaxVert());
@ -505,7 +505,7 @@ void VisibilityManagerPrivate::dodgeWindows(WindowId wid)
if (windows.find(wid) == std::end(windows))
return;
//!dont send false raiseDock signal when containing mouse
//!don't send false raiseDock signal when containing mouse
if (containsMouse) {
raiseDock(true);
return;

@ -133,7 +133,7 @@ DockCorona::~DockCorona()
//! BEGIN: Give the time to slide-out docks when closing
m_layoutManager->hideAllDocks();
//! Dont delay the destruction under wayland in any case
//! Don't delay the destruction under wayland in any case
//! because it creates a crash with kwin effects
//! https://bugs.kde.org/show_bug.cgi?id=392890
if (!KWindowSystem::isPlatformWayland()) {
@ -430,7 +430,7 @@ QRegion DockCorona::availableScreenRegionWithCriteria(int id, QString forLayout)
int realThickness = view->normalThickness() - view->shadow();
// Usually availableScreenRect is used by the desktop,
// but Latte dont have desktop, then here just
// but Latte don't have desktop, then here just
// need calculate available space for top and bottom location,
// because the left and right are those who dodge others docks
switch (view->location()) {
@ -555,7 +555,7 @@ QRect DockCorona::availableScreenRectWithCriteria(int id, QList<Dock::Visibility
auto dockRect = view->absGeometry();
// Usually availableScreenRect is used by the desktop,
// but Latte dont have desktop, then here just
// but Latte don't have desktop, then here just
// need calculate available space for top and bottom location,
// because the left and right are those who dodge others docks
switch (view->location()) {

@ -736,7 +736,7 @@ bool GlobalShortcuts::dockAtLowerScreenPriority(DockView *test, DockView *base)
}
qDebug() << "dockAtLowerScreenPriority : shouldnt had reached here...";
qDebug() << "dockAtLowerScreenPriority : shouldn't had reached here...";
return false;
}

@ -186,7 +186,7 @@ QString Importer::layoutCanBeImported(QString oldAppletsPath, QString newName, Q
{
QFile oldAppletsrc(oldAppletsPath);
//! old file doesnt exist
//! old file doesn't exist
if (!oldAppletsrc.exists()) {
return QString();
}
@ -225,7 +225,7 @@ QString Importer::layoutCanBeImported(QString oldAppletsPath, QString newName, Q
filter.append(QString(newName + "*.layout.latte"));
QStringList files = layoutDir.entryList(filter, QDir::Files | QDir::NoSymLinks);
//! if the newLayout already exists provide a newName that doesnt
//! if the newLayout already exists provide a newName that doesn't
if (files.count() >= 1) {
int newCounter = files.count() + 1;

@ -72,7 +72,7 @@ public:
//! check if this layout exists already in the latte directory
static bool layoutExists(QString layoutName);
//! imports the specific layout and return the new layout name.
//! if the function didnt succeed return an empty string
//! if the function didn't succeed return an empty string
static QString importLayoutHelper(QString fileName);
//! return the file path of a layout either existing or not
@ -83,7 +83,7 @@ public:
static QStringList availableLayouts();
//! it checks the linked file if there are Containments in it that belong
//! to Original Layouts and moves them accordingly. This is used mainly on
//! startup and if such state occurs, it basically means that the app didnt
//! startup and if such state occurs, it basically means that the app didn't
//! close correctly, e.g. there was a crash.
static QStringList checkRepairMultipleLayoutsLinkedFile();

@ -1070,7 +1070,7 @@ void Layout::copyDock(Plasma::Containment *containment)
QString temp2File = newUniqueIdsLayoutFromFile(temp1File);
//! Dont create DockView when the containment is created because we must update
//! Don't create DockView when the containment is created because we must update
//! its screen settings first
setBlockAutomaticDockViewCreation(true);
//! Finally import the configuration
@ -1390,7 +1390,7 @@ QString Layout::newUniqueIdsLayoutFromFile(QString file)
foreach (auto contId, investigate_conts.groupList()) {
QString pluginId = investigate_conts.group(contId).readEntry("plugin", "");
if (pluginId != "org.kde.desktopcontainment") { //!dont add ghost containments
if (pluginId != "org.kde.desktopcontainment") { //!don't add ghost containments
KConfigGroup newContainmentGroup = fixedNewContainmets.group(assigned[contId]);
investigate_conts.group(contId).copyTo(&newContainmentGroup);

@ -206,7 +206,7 @@ private:
bool m_blockAutomaticDockViewCreation{false};
bool m_disableBordersForMaximizedWindows{false};
bool m_showInMenu{false};
//if version doesnt exist it is and old layout file
//if version doesn't exist it is and old layout file
int m_version{2};
QString m_background;

@ -33,7 +33,7 @@
#include <QFile>
#include <QMessageBox>
#include <QQmlProperty>
#include <QtDBus/QtDBus>
#include <QtDBus>
#include <KActivities/Consumer>
#include <KActivities/Controller>
@ -524,7 +524,7 @@ void LayoutManager::loadLayoutOnStartup(QString layoutName)
// if (memoryUsage() == Dock::MultipleLayouts) {
QStringList layouts = m_importer->checkRepairMultipleLayoutsLinkedFile();
//! Latte didnt close correctly, maybe a crash
//! Latte didn't close correctly, maybe a crash
if (layouts.size() > 0) {
QMessageBox *msg = new QMessageBox();
msg->setAttribute(Qt::WA_DeleteOnClose);
@ -995,7 +995,7 @@ QString LayoutManager::newLayout(QString layoutName, QString preset)
filter.append(QString(layoutName + "*.layout.latte"));
QStringList files = layoutDir.entryList(filter, QDir::Files | QDir::NoSymLinks);
//! if the newLayout already exists provide a newName that doesnt
//! if the newLayout already exists provide a newName that doesn't
if (files.count() >= 1) {
int newCounter = files.count() + 1;

@ -116,7 +116,7 @@ public slots:
void hideLatteSettingsDialog();
Q_INVOKABLE void showLatteSettingsDialog(int page = Latte::Dock::LayoutPage);
//! switch to specified layout, default previousMemoryUsage means that it didnt change
//! switch to specified layout, default previousMemoryUsage means that it didn't change
Q_INVOKABLE bool switchToLayout(QString layoutName, int previousMemoryUsage = -1);
Q_INVOKABLE int layoutsMemoryUsage();

@ -17,6 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHECKBOXDELEGATE_H
#define CHECKBOXDELEGATE_H
#include <QStyledItemDelegate>
class CheckBoxDelegate : public QStyledItemDelegate
@ -27,3 +30,5 @@ public:
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
};
#endif

@ -72,7 +72,7 @@ void LayoutNameDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
myOptionE.text = s;*/
QStyledItemDelegate::paint(painter, myOptionE, model->index(index.row(), HIDDENTEXTCOLUMN));
//! Lock Icon 2: QIcon attempt that doesnt change color
//! Lock Icon 2: QIcon attempt that doesn't change color
QIcon lockIcon = QIcon::fromTheme("object-locked");
if (qApp->layoutDirection() == Qt::RightToLeft) {

@ -17,6 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LAYOUTNAMEDELEGATE_H
#define LAYOUTNAMEDELEGATE_H
#include <QStyledItemDelegate>
class LayoutNameDelegate : public QStyledItemDelegate
@ -26,3 +29,5 @@ public:
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
};
#endif

@ -31,7 +31,6 @@
#include <QQuickWindow>
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <QDebug>
#include <QDir>
#include <QLockFile>
#include <QSharedMemory>

@ -85,7 +85,7 @@ private slots:
private:
void addLayoutForFile(QString file, QString layoutName = QString(), bool newTempDirectory = true, bool showNotification = true);
//! When an activity is closed for some reason the window manager hides and reshows
//! the windows. This function prevents this because we dont want to delete the window
//! the windows. This function prevents this because we don't want to delete the window
//! on reject in such case.
void blockDeleteOnActivityStopped();
void loadSettings();

@ -441,6 +441,6 @@ float SortedActivitiesModel::luminasFromFile(QString imageFile, int edge)
return areaLumin;
}
//! didnt find anything
//! didn't find anything
return -1000;
}

@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef SORTED_ACTIVITY_MODEL
#define SORTED_ACTIVITY_MODEL
#ifndef SORTED_ACTIVITIES_MODEL
#define SORTED_ACTIVITIES_MODEL
// Qt
#include <QSortFilterProxyModel>
@ -82,4 +82,4 @@ private:
QHash<QString, EdgesHash> m_luminasCache;
};
#endif // SORTED_ACTIVITY_MODEL
#endif // SORTED_ACTIVITIES_MODEL

@ -26,7 +26,7 @@
#include <QDir>
#include <QProcess>
#include <QtDBus/QtDBus>
#include <QtDBus>
#include <KDirWatch>
#include <KActivities/Consumer>
@ -334,7 +334,7 @@ void UniversalSettings::setAutostart(bool state)
metaFile.copy(autostartFile.fileName());
//! I havent added the flag "OnlyShowIn=KDE;" into the autostart file
//! because I fall onto a Plasma 5.8 case that this flag
//! didnt let the plasma desktop to start
//! didn't let the plasma desktop to start
emit autostartChanged();
}
}

@ -48,7 +48,7 @@ Item{
}
if (container.latteApplet) {
//! commented because it was breaking the context menu available area, I dont remember where
//! commented because it was breaking the context menu available area, I don't remember where
//! we needed this...
// if (container.showZoomed && root.isVertical)
@ -76,7 +76,7 @@ Item{
}
if (container.latteApplet) {
//! commented because it was breaking the context menu available area, I dont remember where
//! commented because it was breaking the context menu available area, I don't remember where
//! we needed this...
//if (container.showZoomed && root.isHorizontal)
@ -644,7 +644,7 @@ Item{
target: appletNumberLoader
property:"badgeString"
value: {
//! dont change value on hiding/releasing
//! don't change value on hiding/releasing
if (!root.showMetaBadge && !root.showAppletsNumbers) {
return;
}

@ -328,7 +328,7 @@ DragDrop.DropArea {
// TO BE DELETED, if not needed: property int counter:0;
///BEGIN properties provided to Latte Plasmoid
//shadows for applets, it should be removed as the appleitems dont need it any more
//shadows for applets, it should be removed as the appleitems don't need it any more
property bool enableShadows: plasmoid.configuration.shadows || root.forceTransparentPanel
property bool dockIsHidden: dock ? dock.visibility.isHidden : true
property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
@ -875,8 +875,8 @@ DragDrop.DropArea {
// FIXME TODO: This is a real-world fix to produce a sensible initial position for
// launcher icons added by launcher menu applets. The basic approach has been used
// since Plasma 1. However, "add launcher to X" is a generic-enough concept and
// frequent-enough occurence that we'd like to abstract it further in the future
// and get rid of the uglyness of parties external to the containment adding applets
// frequent-enough occurrence that we'd like to abstract it further in the future
// and get rid of the ugliness of parties external to the containment adding applets
// of a specific type, and the containment caring about the applet type. In a better
// system the containment would be informed of requested launchers, and determine by
// itself what it wants to do with that information.

@ -25,7 +25,7 @@
#include <QDebug>
#include <QFont>
#include <QMenu>
#include <QtDBus/QtDBus>
#include <QtDBus>
#include <QTimer>
#include <KActionCollection>

@ -17,7 +17,7 @@
#include <memory>
#include <cmath>
//! There are gcc versions that dont support yet that function even though they
//! There are gcc versions that don't support yet that function even though they
//! publish themselves as C++14 compatible. Such a case is gcc 4.8.x that openSUSE
//! LEAP 42.2-3 is using. By enabling this flag such systems can be build correctly.
#if ENABLE_MAKE_UNIQUE

@ -459,7 +459,7 @@ Column {
}
}
// In case the window title had only redundant informations (i.e. appName), text is now empty.
// In case the window title had only redundant information (i.e. appName), text is now empty.
// Add a hyphen to indicate that and avoid empty space.
if (text === "") {
text = "—";

@ -271,7 +271,7 @@ Item {
}
/////
//spacer to set a minimumWidth for sliders
//Layout.minimumWidth didnt work
//Layout.minimumWidth didn't work
Label{}
// Label{Layout.maximumWidth: 275}
Label{}

@ -138,7 +138,7 @@ Item {
/////
//spacer to set a minimumWidth for sliders
//Layout.minimumWidth didnt work
//Layout.minimumWidth didn't work
Label{}
Label{Layout.minimumWidth: 280}
Label{}

@ -89,7 +89,7 @@ Item {
property int tasksStarting: 0
property int realSize: iconSize + iconMargin
///Dont use Math.floor it adds one pixel in animations and creates glitches
///Don't use Math.floor it adds one pixel in animations and creates glitches
property int widthMargins: root.vertical ? thickMargin : iconMargin
property int heightMargins: !root.vertical ? thickMargin : iconMargin
@ -902,7 +902,7 @@ Item {
onTriggered: {
if(root.latteDock)
console.log("Plasmoid, checkListHoveredTimer was called, even though it shouldnt...");
console.log("Plasmoid, checkListHoveredTimer was called, even though it shouldn't...");
if (!root.containsMouse()) {

@ -123,7 +123,7 @@ MouseArea{
property bool canPublishGeometries: (isWindow || isStartup || isGroupParent) && visible && width>=root.iconSize && height>=root.iconSize
&& !mainItemContainer.delayingRemove
&& (wrapper.mScale===1 || wrapper.mScale===root.zoomFactor) //dont publish during zoomFactor
&& (wrapper.mScale===1 || wrapper.mScale===root.zoomFactor) //don't publish during zoomFactor
property bool pressed: false
readonly property bool showAttention: isDemandingAttention && plasmoid.status === PlasmaCore.Types.RequiresAttentionStatus ?
@ -624,7 +624,7 @@ MouseArea{
}
if(mainItemContainer.contextMenu && mainItemContainer.contextMenu.status == PlasmaComponents.DialogStatus.Open){
///dont check to restore zooms
///don't check to restore zooms
}
else{
if(!inAnimation){
@ -640,7 +640,7 @@ MouseArea{
}
//! mouseX-Y values are delayed to be updated onEntered events and at the same time
//! onPositionChanged signal may be delayed. we can fix this by dont delay at all
//! onPositionChanged signal may be delayed. we can fix this by don't delay at all
//! when mouseX-Y is updated based on the plasmoid formFactor
function mousePosChanged(mousePos) {
if (root.editMode || mousePos<0 ||
@ -656,7 +656,7 @@ MouseArea{
//! show previews
if(root.showPreviews && !windowsPreviewDlg.visible && windowsPreviewDlg.activeItem !== mainItemContainer){
if (hoveredTimerObj) {
//! dont delay showing preview in normal states,
//! don't delay showing preview in normal states,
//! that is when the dock wasnt hidden
if (!hoveredTimerObj.running) {
hoveredTimerObj.start();
@ -1187,14 +1187,14 @@ MouseArea{
function slotPublishGeometries() {
//! this way we make sure that layouts that are in different activities that the current layout
//! dont publish their geometries
//! don't publish their geometries
if ( canPublishGeometries
&& (!latteDock
|| (latteDock && currentLayout && latteDock.universalLayoutManager &&
currentLayout.name === latteDock.universalLayoutManager.currentLayoutName))) {
var globalChoords = backend.globalRect(mainItemContainer);
//! Magic Lamp effect doesnt like coordinates outside the screen and
//! Magic Lamp effect doesn't like coordinates outside the screen and
//! width,heights of zero value... So we now normalize the geometries
//! sent in order to avoid such circumstances
if (root.vertical) {
@ -1549,7 +1549,7 @@ MouseArea{
// The best solution in order to catch when the wheel action ended is to
// track the isMinimized state, but when the user has enabled window previews
// at all times that flag doesnt work
// at all times that flag doesn't work
Timer {
id: wheelActionDelayer
interval: 200

@ -67,7 +67,7 @@ SequentialAnimation{
onStopped: {
//! VERY IMPORTANT CODE, fixes a bug when cycling the mouse very fast inside
//! and outside the dock, in some rare cases the restoreAnimation didnt end!!
//! and outside the dock, in some rare cases the restoreAnimation didn't end!!
//if (latteDock && (!latteDock.dockContainsMouse || icList.hoveredIndex === -1)) {
// wrapper.mScale = 1;

@ -438,7 +438,7 @@ PlasmaComponents.Page {
LatteExtraControls.Slider {
id: transparencySlider
Layout.fillWidth: true
//! transparency can be set when the user doesnt want solidness all the time
//! transparency can be set when the user doesn't want solidness all the time
//! or when the user wants solidness only for maximized windows
enabled: showBackground.checked && !blockOpacityAdjustment

Loading…
Cancel
Save