LilyC Posted June 11, 2021 Share Posted June 11, 2021 Hello, I am running Windows and have the latest version of Mumble from Github built on my machine. I am trying to use Mumble in a game I am developing and would like users to only view the Mumble Configuration window and not other windows. I was wondering if it is possible to spawn the Mumble Configuration menu from the command line (such as with rpc), or make an overlay that accomplishes the same thing, or if anyone has any other suggestions on the easiest/best way to accomplish this. Thanks! Quote Link to comment Share on other sites More sharing options...
Administrators Krzmbrzl Posted June 12, 2021 Administrators Share Posted June 12, 2021 I am not aware of only displaying the configuration window of Mumble and I also don't see a straight forward way to do it... Maybe if you could outline your general idea a bit more there might be an alternative approach though Quote Link to comment Share on other sites More sharing options...
LilyC Posted June 21, 2021 Author Share Posted June 21, 2021 Ideally, I would want Mumble to spawn hidden/minimized, but allow the user to only spawn the Mumble Configuration window if need be. I will probably look into making code changes since I do not think there is a way to do this currently. Quote Link to comment Share on other sites More sharing options...
LilyC Posted July 4, 2021 Author Share Posted July 4, 2021 I've decided to try making an rpc command for launching the Mumble Configuration window. I ended up adding this code on line 171 of SocketRPC.cpp: iter = qmRequest.find(QLatin1String("stoptalking")); if (iter != qmRequest.constEnd()) { Global::get().mw->on_PushToTalk_triggered(false, QVariant()); } // added code --v iter = qmRequest.find(QLatin1String("settings")); if (iter != qmRequest.constEnd()) { Global::get().mw->qaConfigDialog->trigger(); } // added code --^ ack = true; This successfully launches the Mumble Configuration window when a user types "mumble rpc settings". However, when the settings are applied, they do not remain, and when the Configuration window is closed, the main window UI turns blank and then crashes. I am wondering if you could help me figure out what I am doing wrong, or tell me if there is a better work flow for this? Quote Link to comment Share on other sites More sharing options...
Administrators Krzmbrzl Posted July 5, 2021 Administrators Share Posted July 5, 2021 Without looking into the details I'd assume that you are triggering the action too early. Instead setting a flag might be better that when set causes the window to show at a later point. However I think an RPC command is not the way to go since these are intended to remote control an already running instance of Mumble. Instead you should add this as a command line option Quote Link to comment Share on other sites More sharing options...
LilyC Posted July 24, 2021 Author Share Posted July 24, 2021 Krzmbrzl was right, the action was being triggered too early (thanks for your help!). For anyone else interested, I ended up using an rpc command, and did something like this in SocketRPC.cpp: OpenConfigEvent *oce = new OpenConfigEvent(); qApp->postEvent(Global::get().mw, oce); I essentially just followed how the OpenURLEvent was set up/used and made my own custom OpenConfigEvent. Quote Link to comment Share on other sites More sharing options...
Administrators Krzmbrzl Posted July 26, 2021 Administrators Share Posted July 26, 2021 @LilyC would you mind opening a PR on GitHub for this? Iirc there is also an open issue requesting (more or less) this feature so it would be nice if you could contribute that upstream 🙂 Quote Link to comment Share on other sites More sharing options...
LilyC Posted July 28, 2021 Author Share Posted July 28, 2021 @Krzmbrzl I could do that at some point in the next week 🙂 Also, an update to the previous post: since spawning the settings menu doesn't require any user input/data, I didn't actually need to make the OpenConfigEvent class and could just do iter = qmRequest.find(QLatin1String("settings")); if (iter != qmRequest.constEnd()) { qApp->postEvent(Global::get().mw, new QEvent(static_cast< QEvent::Type >(CO_QEVENT))); } in SocketRPC.cpp. And then I followed the logic for handling a OU_QEVENT in order to know what to do for my custom CO_QEVENT. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.