Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/mumble/GlobalShortcutTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ enum Type {
ListenerAttenuationUp,
ListenerAttenuationDown,
AdaptivePush,
ToggleFullScreen,
};

// A few assertions meant to catch, if anyone inserts a new value in-between instead of appending
Expand Down
5 changes: 5 additions & 0 deletions src/mumble/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,11 @@ void MainWindow::createActions() {
gsAdaptivePush->qsToolTip = tr("When using the push-to-talk transmission mode, this will act as the push-to-talk "
"action. Otherwise, it will act as a push-to-mute action.",
"Global Shortcut");

gsToggleFullScreen = new GlobalShortcut(this, GlobalShortcutType::ToggleFullScreen,
tr("ToggleFullScreen", "Global Shortcut"));
gsToggleFullScreen->setObjectName("gsToggleFullScreen");
gsToggleFullScreen->qsWhatsThis = tr("This will toggle FullScreen on/off");
Comment on lines +458 to +461
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Fix display name formatting and connect the shortcut to its handler.

There are two issues with this initialization:

  1. Inconsistent display name: The display name "ToggleFullScreen" (line 459) doesn't follow the naming convention used by other shortcuts in this file. Compare with:

    • Line 426: "Toggle positional audio"
    • Line 430: "Move back"
    • Line 325: "Toggle search dialog"

    It should be "Toggle fullscreen" or "Toggle full screen" with spaces and consistent capitalization.

  2. Missing handler connection: Unlike other global shortcuts (e.g., line 533 shows gsMinimal connected to qaConfigMinimal), I don't see where gsToggleFullScreen is connected to its handler. The shortcut needs to be connected to either:

    • An action that toggles fullscreen mode, or
    • A slot like on_gsToggleFullScreen_triggered that implements the toggle logic

Apply this diff to fix the display name:

 	gsToggleFullScreen = new GlobalShortcut(this, GlobalShortcutType::ToggleFullScreen,
-												 tr("ToggleFullScreen", "Global Shortcut"));
+												 tr("Toggle fullscreen", "Global Shortcut"));
 	gsToggleFullScreen->setObjectName("gsToggleFullScreen");
-	gsToggleFullScreen->qsWhatsThis = tr("This will toggle FullScreen on/off");
+	gsToggleFullScreen->qsWhatsThis = tr("This will toggle fullscreen on/off");

Additionally, please verify where the handler connection is made, or add the appropriate connection and implementation. For reference, see how other shortcuts are connected around line 531-533 in setupGui().

Run the following script to verify if the handler connection exists:


🏁 Script executed:

#!/bin/bash
# Search for connections to gsToggleFullScreen
rg -n "gsToggleFullScreen.*connect" --type=cpp
rg -n "connect.*gsToggleFullScreen" --type=cpp

Length of output: 0


🏁 Script executed:

#!/bin/bash
rg -n "ToggleFullScreen" --type=cpp -C3 src/mumble/MainWindow.cpp
rg -n "GlobalShortcutType::ToggleFullScreen" --type=cpp -C3 src/mumble/MainWindow.cpp
rg -n "connect" --type=cpp -C3 src/mumble/MainWindow.cpp

Length of output: 20501


Fix display name, tooltip, and add missing gsToggleFullScreen handler connection

  • Rename display name and tooltip at lines 459 and 461 in src/mumble/MainWindow.cpp:
@@ src/mumble/MainWindow.cpp:458
-   tr("ToggleFullScreen", "Global Shortcut")
+   tr("Toggle full screen", "Global Shortcut")
@@ src/mumble/MainWindow.cpp:461
-   qsWhatsThis = tr("This will toggle FullScreen on/off");
+   qsWhatsThis = tr("This will toggle full screen on/off");
  • In setupGui(), immediately after initializing gsToggleFullScreen, add:
connect(gsToggleFullScreen, SIGNAL(down(QVariant)), this, SLOT(on_gsToggleFullScreen_triggered(QVariant)));

Implement on_gsToggleFullScreen_triggered(...) to toggle the window’s fullscreen state.

🤖 Prompt for AI Agents
In src/mumble/MainWindow.cpp around lines 458 to 461, the GlobalShortcut
gsToggleFullScreen needs its display name and tooltip corrected and a missing
signal connection plus handler implemented: rename the tr(...) display name at
line 459 to a clearer label (e.g., "Toggle Fullscreen" instead of
"ToggleFullScreen"), update qsWhatsThis at line 461 to a proper tooltip (e.g.,
"Toggle fullscreen mode"), then in setupGui() immediately after creating
gsToggleFullScreen add a connect call to bind its down(QVariant) signal to a new
slot on_gsToggleFullScreen_triggered(QVariant), and implement that slot to
toggle the main window's fullscreen state (enter fullscreen if not fullscreen,
exit if currently fullscreen) using the window's existing
showFullScreen/showNormal or appropriate Qt window state methods.

}

void MainWindow::setupGui() {
Expand Down
1 change: 1 addition & 0 deletions src/mumble/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindow {
GlobalShortcut *gsMoveBack;
GlobalShortcut *gsCycleListenerAttenuationMode, *gsListenerAttenuationUp, *gsListenerAttenuationDown;
GlobalShortcut *gsAdaptivePush;
GlobalShortcut *gsToggleFullScreen;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify that the handler slot is implemented.

The declaration of gsToggleFullScreen follows the correct pattern. However, I don't see a corresponding handler slot declaration (e.g., on_gsToggleFullScreen_triggered) in this header file. Other global shortcuts typically have handler slots declared in the public slots: section (see examples like on_gsToggleSearch_triggered at line 335 or on_gsToggleTalkingUI_triggered at line 334).

Please verify that:

  1. A handler slot is declared for this shortcut
  2. The shortcut is properly connected to its handler in the implementation
  3. The handler implements the actual fullscreen toggle functionality

Run the following script to check if the handler is implemented:


🏁 Script executed:

#!/bin/bash
# Search for the handler slot declaration and implementation
rg -n "on_gsToggleFullScreen" --type=cpp --type=h

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Search for any references to gsToggleFullScreen across the repository
rg -n "gsToggleFullScreen" -C2

Length of output: 919


🏁 Script executed:

#!/bin/bash
# Show context around gsToggleFullScreen instantiation and any connect calls
rg -n -C5 "gsToggleFullScreen" src/mumble/MainWindow.cpp

Length of output: 685


🏁 Script executed:

#!/bin/bash
rg -n "connectSlotsByName" src/mumble/MainWindow.cpp
rg -n -C3 "on_gsToggleSearch_triggered" src/mumble/MainWindow.h

Length of output: 412


Add missing fullscreen toggle slot
No slot on_gsToggleFullScreen_triggered(bool, QVariant) exists to handle the gsToggleFullScreen shortcut. Declare it under public slots: in MainWindow.h and implement it in MainWindow.cpp (or explicitly connect the shortcut’s triggered signal to your handler).

🤖 Prompt for AI Agents
In src/mumble/MainWindow.h around line 118, the GlobalShortcut pointer
gsToggleFullScreen is declared but there is no slot to handle its triggered
signal; add a declaration for on_gsToggleFullScreen_triggered(bool, QVariant)
under the public slots: section of MainWindow.h and then implement the
corresponding method in src/mumble/MainWindow.cpp to toggle fullscreen (or
alternatively, in the constructor connect gsToggleFullScreen's triggered(bool,
QVariant) signal to an existing handler), making sure the signature and
QObject::connect types match and to include any necessary headers.


DockTitleBar *dtbLogDockTitle, *dtbChatDockTitle;

Expand Down
Loading