You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

ehamberg

Beginner

  • "ehamberg" started this thread

Posts: 2

Location: Norway

  • Send private message

1

Monday, December 12th 2005, 12:54pm

Toggle option with dcop

Is it possible to toggle boolean options via dcop?
I want to mute/unmute kmix with my mute button, but the setMute function can only take "true" or "false", not "toggle".
Maybe I'm using the wrong keyword?

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Saturday, December 17th 2005, 3:33pm

You could first query the current state with mute(deviceIndex) and then set the other value, or use toggleMute

But this might be new in 3.4

Cheers,
_
Qt/KDE Developer
Debian User

ehamberg

Beginner

  • "ehamberg" started this thread

Posts: 2

Location: Norway

  • Send private message

3

Saturday, December 17th 2005, 6:17pm

Quoted

Originally posted by anda_skoa
[...] or use toggleMute
_


Wow, I missed that option. Thanks! :)

Though, it should be possible to give 'toggle' or something as the argument to a boolean dcop option. This should, in my opinion, be built-in with the dcop system.