Jump to content
Mumble forums

Spawn Mumble Configuration Menu


LilyC
 Share

Recommended Posts

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!

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

  • Administrators

@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 🙂

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...