From 214f32ecaa9a305d33b1880dadc73f53de2a6a90 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:12 -0400 Subject: [PATCH 01/14] spelling: acquired Signed-off-by: Josh Soref --- src/qtsingleapplication/qtlockedfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qtsingleapplication/qtlockedfile.cpp b/src/qtsingleapplication/qtlockedfile.cpp index c142a86..b1d71f7 100644 --- a/src/qtsingleapplication/qtlockedfile.cpp +++ b/src/qtsingleapplication/qtlockedfile.cpp @@ -158,8 +158,8 @@ QtLockedFile::LockMode QtLockedFile::lockMode() const can be locked. If \a block is true, this function will block until the lock is - aquired. If \a block is false, this function returns \e false - immediately if the lock cannot be aquired. + acquired. If \a block is false, this function returns \e false + immediately if the lock cannot be acquired. If this object already has a lock of type \a mode, this function returns \e true immediately. If this object has a lock of a From 06da3a76f9faf01029bc912c3c77e2241433b4e5 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:10 -0400 Subject: [PATCH 02/14] spelling: application Signed-off-by: Josh Soref --- README.md | 2 +- src/qtsingleapplication/qtsingleapplication.cpp | 6 +++--- src/qtsingleapplication/qtsinglecoreapplication.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9cf7614..0642d7d 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ user@FreeBSD$ gmenudbusmenuproxy & user@FreeBSD$ gimp ``` -Same: __Initially__ the menu is empty, but when I bring a Qt applciation to the front and __then__ switch back to the Inkscape window, then the menus __work__. +Same: __Initially__ the menu is empty, but when I bring a Qt application to the front and __then__ switch back to the Inkscape window, then the menus __work__. Seeing lots of diff --git a/src/qtsingleapplication/qtsingleapplication.cpp b/src/qtsingleapplication/qtsingleapplication.cpp index d0fb15d..36a0ee6 100644 --- a/src/qtsingleapplication/qtsingleapplication.cpp +++ b/src/qtsingleapplication/qtsingleapplication.cpp @@ -144,7 +144,7 @@ void QtSingleApplication::sysInit(const QString &appId) /*! Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc, \a - argv, and \a GUIenabled are passed on to the QAppliation constructor. + argv, and \a GUIenabled are passed on to the QApplication constructor. If you are creating a console application (i.e. setting \a GUIenabled to false), you may consider using @@ -161,7 +161,7 @@ QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled /*! Creates a QtSingleApplication object with the application identifier \a appId. \a argc and \a argv are passed on to the - QAppliation constructor. + QApplication constructor. */ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv) @@ -175,7 +175,7 @@ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char * /*! Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc, \a - argv, and \a type are passed on to the QAppliation constructor. + argv, and \a type are passed on to the QApplication constructor. */ QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type) : QApplication(argc, argv, type) diff --git a/src/qtsingleapplication/qtsinglecoreapplication.cpp b/src/qtsingleapplication/qtsinglecoreapplication.cpp index 5634537..18de5d1 100644 --- a/src/qtsingleapplication/qtsinglecoreapplication.cpp +++ b/src/qtsingleapplication/qtsinglecoreapplication.cpp @@ -67,7 +67,7 @@ /*! Creates a QtSingleCoreApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc and \a - argv are passed on to the QCoreAppliation constructor. + argv are passed on to the QCoreApplication constructor. */ QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) @@ -81,7 +81,7 @@ QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) /*! Creates a QtSingleCoreApplication object with the application identifier \a appId. \a argc and \a argv are passed on to the - QCoreAppliation constructor. + QCoreApplication constructor. */ QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc, char **argv) : QCoreApplication(argc, argv) From 4295c9b31ad26462d8c495796c330fc8809270dc Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:13 -0400 Subject: [PATCH 03/14] spelling: async Signed-off-by: Josh Soref --- Shutdown/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shutdown/main.cpp b/Shutdown/main.cpp index b91c336..abea6eb 100644 --- a/Shutdown/main.cpp +++ b/Shutdown/main.cpp @@ -14,7 +14,7 @@ void ignoreUnixSignals(std::initializer_list ignoreSignals) { void catchUnixSignals(std::initializer_list quitSignals) { auto handler = [](int sig) -> void { - // blocking and not aysnc-signal-safe func are valid + // blocking and not async-signal-safe func are valid printf("\nquit the application by signal(%d).\n", sig); QCoreApplication::quit(); }; From eb987c19553f33da1b3843575ddd31be0063e2a9 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:14 -0400 Subject: [PATCH 04/14] spelling: better Signed-off-by: Josh Soref --- src/appmenuwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appmenuwidget.cpp b/src/appmenuwidget.cpp index 697623a..ffa8318 100644 --- a/src/appmenuwidget.cpp +++ b/src/appmenuwidget.cpp @@ -815,7 +815,7 @@ void AppMenuWidget::actionMinimizeAll() // TODO: In a similar way, implement "Hide " and "Hide others". For this we need to know the window ID of the frontmost application window qDebug() << "probono: KWindowSystem::activeWindow;" << "0x" + QString::number(KWindowSystem::activeWindow(), 16); // NOTE: This always prints the window ID of the menu itself, rather than the one of the otherwise frontmost application window - // Hence we would need to store a variable somewhere that contains the window ID of the last non-menu window... or is there a btter way? + // Hence we would need to store a variable somewhere that contains the window ID of the last non-menu window... or is there a better way? const auto &windows = KWindowSystem::windows(); for (WId wid : windows) { KWindowSystem::minimizeWindow(wid); @@ -827,7 +827,7 @@ void AppMenuWidget::actionMaximizeAll() // TODO: In a similar way, implement "Hide " and "Hide others". For this we need to know the window ID of the frontmost application window qDebug() << "probono: KWindowSystem::activeWindow;" << "0x" + QString::number(KWindowSystem::activeWindow(), 16); // NOTE: This always prints the window ID of the menu itself, rather than the one of the otherwise frontmost application window - // Hence we would need to store a variable somewhere that contains the window ID of the last non-menu window... or is there a btter way? + // Hence we would need to store a variable somewhere that contains the window ID of the last non-menu window... or is there a better way? const auto &windows = KWindowSystem::windows(); for (WId wid : windows) { KWindowSystem::activateWindow(wid); From f034ce319de47ec70e8a5f31a8dba07c4e95e372 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:15 -0400 Subject: [PATCH 05/14] spelling: close Signed-off-by: Josh Soref --- src/appmenuwidget.cpp | 2 +- src/appmenuwidget.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appmenuwidget.cpp b/src/appmenuwidget.cpp index ffa8318..f16595e 100644 --- a/src/appmenuwidget.cpp +++ b/src/appmenuwidget.cpp @@ -585,7 +585,7 @@ void AppMenuWidget::minimizeWindow() KWindowSystem::minimizeWindow(KWindowSystem::activeWindow()); } -void AppMenuWidget::clsoeWindow() +void AppMenuWidget::closeWindow() { NETRootInfo(QX11Info::connection(), NET::CloseWindow).closeWindowRequest(KWindowSystem::activeWindow()); } diff --git a/src/appmenuwidget.h b/src/appmenuwidget.h index a8c44a4..c3d7511 100644 --- a/src/appmenuwidget.h +++ b/src/appmenuwidget.h @@ -57,7 +57,7 @@ class AppMenuWidget : public QWidget void onActiveWindowChanged(); void onWindowChanged(WId id, NET::Properties properties, NET::Properties2 properties2); void minimizeWindow(); - void clsoeWindow(); + void closeWindow(); void maxmizeWindow(); void restoreWindow(); From 8d2f468485672a13c2881fd52c778c6ab96f04d5 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:16 -0400 Subject: [PATCH 06/14] spelling: documented Signed-off-by: Josh Soref --- src/appmenu/com.canonical.AppMenu.Registrar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appmenu/com.canonical.AppMenu.Registrar.xml b/src/appmenu/com.canonical.AppMenu.Registrar.xml index bc2be43..42a7170 100644 --- a/src/appmenu/com.canonical.AppMenu.Registrar.xml +++ b/src/appmenu/com.canonical.AppMenu.Registrar.xml @@ -4,7 +4,7 @@ @mainpage   An interface to register menus that are associated with a window in an application.  The - main interface is docuemented here: @ref com::canonical::AppMenu::Registrar. + main interface is documented here: @ref com::canonical::AppMenu::Registrar.      The actual menus are transported using the dbusmenu protocol which is available here: @ref com::canonical::dbusmenu. From 6aee43c3cc58a96929b8176e17da5004a6259d3f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:17 -0400 Subject: [PATCH 07/14] spelling: implements Signed-off-by: Josh Soref --- src/appmenu/com.canonical.AppMenu.Registrar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appmenu/com.canonical.AppMenu.Registrar.xml b/src/appmenu/com.canonical.AppMenu.Registrar.xml index 42a7170..67c7598 100644 --- a/src/appmenu/com.canonical.AppMenu.Registrar.xml +++ b/src/appmenu/com.canonical.AppMenu.Registrar.xml @@ -21,7 +21,7 @@       /note this method assumes that the connection from the caller is the DBus connection to use for the object.  Applications that use multiple DBus connections will need to - ensure this method is called with the same connection that implmenets the object. + ensure this method is called with the same connection that implements the object. ]]> The XWindow ID of the window From 5c648d616bdf5f615f98c3372366d7065110eb60 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:18 -0400 Subject: [PATCH 08/14] spelling: independent Signed-off-by: Josh Soref --- src/appmenuwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appmenuwidget.cpp b/src/appmenuwidget.cpp index f16595e..173dddc 100644 --- a/src/appmenuwidget.cpp +++ b/src/appmenuwidget.cpp @@ -403,7 +403,7 @@ void AppMenuWidget::updateActionSearch(QMenuBar *menuBar) { // TODO: https://stackoverflow.com/a/33790639 // We could customize more aspects of the list view of the completer by //setting the CompletionMode to InlineCompletion, so there will be no popup. - // Then make your QListView indepedant of the QLineEdit; + // Then make your QListView independent of the QLineEdit; // just react to signals that indicate when a view types some text,... KWindowSystem::setType(actionCompleter->popup()->winId(), NET::DropdownMenu); From 188241f2b85930ed013d6dcc0459d6ff3c8afadf Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:19 -0400 Subject: [PATCH 09/14] spelling: maximize Signed-off-by: Josh Soref --- src/appmenuwidget.cpp | 4 ++-- src/appmenuwidget.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/appmenuwidget.cpp b/src/appmenuwidget.cpp index 173dddc..ff7b394 100644 --- a/src/appmenuwidget.cpp +++ b/src/appmenuwidget.cpp @@ -500,7 +500,7 @@ void AppMenuWidget::toggleMaximizeWindow() if (isMax) { restoreWindow(); } else { - maxmizeWindow(); + maximizeWindow(); } } @@ -590,7 +590,7 @@ void AppMenuWidget::closeWindow() NETRootInfo(QX11Info::connection(), NET::CloseWindow).closeWindowRequest(KWindowSystem::activeWindow()); } -void AppMenuWidget::maxmizeWindow() +void AppMenuWidget::maximizeWindow() { KWindowSystem::setState(KWindowSystem::activeWindow(), NET::Max); } diff --git a/src/appmenuwidget.h b/src/appmenuwidget.h index c3d7511..1be52d8 100644 --- a/src/appmenuwidget.h +++ b/src/appmenuwidget.h @@ -58,7 +58,7 @@ class AppMenuWidget : public QWidget void onWindowChanged(WId id, NET::Properties properties, NET::Properties2 properties2); void minimizeWindow(); void closeWindow(); - void maxmizeWindow(); + void maximizeWindow(); void restoreWindow(); public slots: From 04946ea6f9df05360b51d586e30550d5009c307f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:21 -0400 Subject: [PATCH 10/14] spelling: received Signed-off-by: Josh Soref --- src/mainpanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainpanel.cpp b/src/mainpanel.cpp index 5cef992..33c20dc 100644 --- a/src/mainpanel.cpp +++ b/src/mainpanel.cpp @@ -83,7 +83,7 @@ MainPanel::MainPanel(QWidget *parent) void MainPanel::rebuildSystemMenu() { - qDebug() << "SIGSUR1 recived, rebuild the system menu"; + qDebug() << "SIGSUR1 received, rebuild the system menu"; if(m_appMenuWidget){ m_layout->removeWidget(m_appMenuWidget); From 41f75f3d69303e095873dfe9848e0eac83b5fd39 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:22 -0400 Subject: [PATCH 11/14] spelling: switch Signed-off-by: Josh Soref --- src/appmenuwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appmenuwidget.cpp b/src/appmenuwidget.cpp index ff7b394..2bed362 100644 --- a/src/appmenuwidget.cpp +++ b/src/appmenuwidget.cpp @@ -250,7 +250,7 @@ void AppMenuWidget::findAppsInside(QStringList locationsContainingApps, QMenu *m QAction *action = submenu->addAction(base); action->setToolTip("TODO: Convert " + file.absoluteFilePath() + " to an .app bundle"); action->setProperty("path", file.absoluteFilePath()); - action->setDisabled(true); // As a reminder that we consider those legacy and encourage people to swtich + action->setDisabled(true); // As a reminder that we consider those legacy and encourage people to switch // Finding the icon file is much more involved with XDG than with our simplified .app bundles, so it is not implemented here } else if (locationsContainingApps.contains(candidate) == false && file.isDir() && candidate.endsWith("/..") == false && candidate.endsWith("/.") == false && candidate.endsWith(".app") == false && candidate.endsWith(".AppDir") == false) { From 0b501779de99b69a55332edda368e2a29a135f2d Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:23 -0400 Subject: [PATCH 12/14] spelling: transient Signed-off-by: Josh Soref --- src/appmenu/appmenumodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appmenu/appmenumodel.cpp b/src/appmenu/appmenumodel.cpp index 1ea190f..a966a26 100644 --- a/src/appmenu/appmenumodel.cpp +++ b/src/appmenu/appmenumodel.cpp @@ -379,7 +379,7 @@ void AppMenuModel::onActiveWindowChanged(WId id) if (info.hasState(NET::SkipTaskbar) || info.windowType(NET::UtilityMask) == NET::Utility) { - //! hide when the windows or their transiet(s) do not have a menu + //! hide when the windows or their transient(s) do not have a menu if (filterByActive()) { KWindowInfo transientInfo = KWindowInfo(info.transientFor(), NET::WMState | NET::WMWindowType | NET::WMGeometry, NET::WM2TransientFor); From 250e29928223bdb260facc935bffe7998cd466a0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:24 -0400 Subject: [PATCH 13/14] spelling: triggered Signed-off-by: Josh Soref --- src/appmenuwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appmenuwidget.cpp b/src/appmenuwidget.cpp index 2bed362..477d097 100644 --- a/src/appmenuwidget.cpp +++ b/src/appmenuwidget.cpp @@ -880,7 +880,7 @@ bool AppMenuWidget::eventFilter(QObject *watched, QEvent *event) { QMouseEvent *mouseEvent = static_cast(event); QMenu *submenu = qobject_cast(watched); // Workaround for: no member named 'toolTip' in 'QObject' - if(!submenu->rect().contains(mouseEvent->pos())) { // Prevent the Menu action from getting triggred when user click on actions in submenu + if(!submenu->rect().contains(mouseEvent->pos())) { // Prevent the Menu action from getting triggered when user click on actions in submenu // Gets executed when the submenu is clicked qDebug() << "Submenu clicked:" << submenu->property("path").toString(); this->m_systemMenu->close(); // Could instead figure out the top-level menu iterating through submenu->parent(); From bc3531eab420c9706d7285e308044d394fb91442 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Oct 2021 20:55:25 -0400 Subject: [PATCH 14/14] spelling: unsightly Signed-off-by: Josh Soref --- Shutdown/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shutdown/mainwindow.cpp b/Shutdown/mainwindow.cpp index e5bd09a..b4048a2 100644 --- a/Shutdown/mainwindow.cpp +++ b/Shutdown/mainwindow.cpp @@ -49,7 +49,7 @@ void MainWindow::on_shutdownButton_clicked() QProcess::execute("sudo", QStringList() << "shutdown" << "-p" << "now"); } -// When Xorg gets killed, window decorations disappear first, the whole thing is unsighty +// When Xorg gets killed, window decorations disappear first, the whole thing is unsightly // hence we fill the screen before we exit void MainWindow::clearScreen() {