This is a read-only archive of the Mumble forums.

This website archives and makes accessible historical state. It receives no updates or corrections. It is provided only to keep the information accessible as-is, under their old address.

For up-to-date information please refer to the Mumble website and its linked documentation and other resources. For support please refer to one of our other community/support channels.

Jump to content

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

@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

 Share

×
×
  • Create New...