diff --git a/README.md b/README.md index 3d83a57..c7ab196 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/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(); }; diff --git a/src/appmenu/appmenumodel.cpp b/src/appmenu/appmenumodel.cpp index 30a5cde..91adb95 100644 --- a/src/appmenu/appmenumodel.cpp +++ b/src/appmenu/appmenumodel.cpp @@ -381,7 +381,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); diff --git a/src/appmenu/com.canonical.AppMenu.Registrar.xml b/src/appmenu/com.canonical.AppMenu.Registrar.xml index bc2be43..67c7598 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. @@ -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 diff --git a/src/appmenuwidget.cpp b/src/appmenuwidget.cpp index 445aa2f..f476ccb 100644 --- a/src/appmenuwidget.cpp +++ b/src/appmenuwidget.cpp @@ -253,7 +253,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 (file.fileName().endsWith(".AppImage") || file.fileName().endsWith(".appimage")) { @@ -424,7 +424,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); @@ -521,7 +521,7 @@ void AppMenuWidget::toggleMaximizeWindow() if (isMax) { restoreWindow(); } else { - maxmizeWindow(); + maximizeWindow(); } } @@ -606,12 +606,12 @@ void AppMenuWidget::minimizeWindow() KWindowSystem::minimizeWindow(KWindowSystem::activeWindow()); } -void AppMenuWidget::clsoeWindow() +void AppMenuWidget::closeWindow() { NETRootInfo(QX11Info::connection(), NET::CloseWindow).closeWindowRequest(KWindowSystem::activeWindow()); } -void AppMenuWidget::maxmizeWindow() +void AppMenuWidget::maximizeWindow() { KWindowSystem::setState(KWindowSystem::activeWindow(), NET::Max); } @@ -846,7 +846,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); @@ -858,7 +858,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); @@ -911,7 +911,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(); diff --git a/src/appmenuwidget.h b/src/appmenuwidget.h index a8c44a4..1be52d8 100644 --- a/src/appmenuwidget.h +++ b/src/appmenuwidget.h @@ -57,8 +57,8 @@ class AppMenuWidget : public QWidget void onActiveWindowChanged(); void onWindowChanged(WId id, NET::Properties properties, NET::Properties2 properties2); void minimizeWindow(); - void clsoeWindow(); - void maxmizeWindow(); + void closeWindow(); + void maximizeWindow(); void restoreWindow(); public slots: diff --git a/src/mainpanel.cpp b/src/mainpanel.cpp index b703d7e..d9bac62 100644 --- a/src/mainpanel.cpp +++ b/src/mainpanel.cpp @@ -87,7 +87,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); 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 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)