Commit Graph

17 Commits

Author SHA1 Message Date
Tanu Kaskinen 2a1072cc2b devicewidget: fix the enabling logic of the advanced options expander
The old logic disabled the expander always when a sink didn't have any
ports. That's bad if the sink has no ports but supports configuring
formats. That hasn't caused problems so far, but I have a patch for
module-null-sink that will enable format configuration support, and the
null sink has no ports, so it's affected by this issue.

This patch also changes things so that the expander is completely hidden
when it's disabled instead just setting it non-sensitive. I think that's
better (at least it saves some space).
2019-09-19 15:26:04 +03:00
Hans de Goede b2362f2223 Reference the widget before returning it from ::create methods
Widgets (unlike Windows and Dialogs) returned by Gtk::Builder::get_widget*
start owned by the GtkBuilder object, the idea being that they will get
added to a container before the scope of the GtkBuilder object ends, and it
thus automatically gets destroyed.

But in the various ::create methods in pavucontrol, a pointer to the widget
gets returned, so that it can be added to a cointainer by the caller.
However as soon as the ::create method exits the GtkBuilder object owning
the widget, and thus also the widget gets destroyed, and we end up returning
free-ed memory.

This commit fixes this by making all ::create methods take a reference on
the widget before returning it, and having all the callers unreference the
widget after adding it to a container.

https://bugs.freedesktop.org/show_bug.cgi?id=83144
https://bugzilla.redhat.com/show_bug.cgi?id=1133339

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-09-07 13:51:27 +03:00
Akihiro Tsukada cbf3acb543 sinkwidget: add support for AAC pass-through 2013-03-13 11:35:59 +02:00
Arun Raghavan 5132a24b35 sinkwidget: Move format selection options to 'Advanced' expander
There's no reason to present this for all S/PDIF and HDMI cases. The
user can select it when required.
2012-12-17 15:20:42 +05:30
Colin Guthrie f58f0da9eb Update device format stuff for (pre-release) API changes. 2011-08-18 17:46:28 +01:00
Colin Guthrie 479e7bcd6e Add UI to select the formats supported by the receiver attached to a digitial sink 2011-08-10 14:22:55 +02:00
Colin Guthrie a03fa60f41 sink: Oops. I didn't mean to comment this out in the previous commit. 2011-07-22 09:50:22 +01:00
Colin Guthrie 9784b9d76d stream-volumes: Support source-output volume controls now available in PA. 2011-07-22 09:35:38 +01:00
Rafał Mużyło 9ce0e0a380 Drop the need to use libglademm 2011-03-03 14:31:14 +00:00
Colin Guthrie 375c2c2d62 Add support for the device-manager module.
Currently this module only really allows for devices to be renamed, so we add a new
dialog that can be activated by right clicking on devices (i.e. sinks/sources).
This dialog allows you to enter a new name which will be set via the extension
provided by the device-manager module.

Future work will allow you to manage (i.e. rename, delete etc) offline devices too.
2009-10-15 13:03:16 +01:00
Lennart Poettering 8a11d0f781 fix event sound generation for volume changes 2009-08-27 05:41:11 +02:00
Colin Guthrie 159609135f Add support for changing ports.
This commit adds a combo box for selecting ports.
Overall this implementation could have taken two paths:
 * Implement port selection as combo box.
 * Implement port selection as a button.

I went for the first option as is done in selecting card profiles over the
second method used for selecting devices for streams. This seems more like
how a config option should be presented as opposed to a runtime type thing.
2009-06-27 18:14:05 +01:00
Colin Guthrie 514a66e0c8 Do not disable the default button when it's set.
I reworked the way this was done so we can easily re-enable this as I think it's clearer when it's inactive
(the difference between toggled and not toggled is pretty minor).

With this abstraction we could reset the tooltip etc. too.
2009-06-17 22:44:02 +01:00
Colin Guthrie 4bd94fa2b8 Wire up all the new UI code.
This makes the default button work on sinks/sources, allows the drop
down to actually change the sink/source and removes the old menu code.

Some names and such are fixed in the glade file too.
2009-06-17 08:54:12 +01:00
Colin Guthrie e509205be2 Rebase the sink/source widgets on the device widget 2009-06-17 08:54:10 +01:00
Colin Guthrie c6b73de308 Move config.h inclusion to the .cc files 2009-03-18 20:58:17 +00:00
Colin Guthrie 38e7792eec Split sinkwidget into it's own files. 2009-03-16 12:41:02 +00:00