Commit Graph

24 Commits

Author SHA1 Message Date
Tanu Kaskinen 0047261f23 rename more objects in the quest to get rid of duplicate IDs
Continuing from the previous patch, this patch renames more objects in
pavucontrol.glade to get rid of duplicate IDs. nameLabel and iconImage
actually weren't any more duplicates, because the previous patch renamed
the corresponding IDs for devices and streams, but the card related
objects were renamed nevertheless to be more descriptive and consistent
with the IDs used by the device and stream widgets.
2018-11-21 12:06:08 +02:00
Tanu Kaskinen c760edaf24 move some widget initializations from MinimalStreamWidget to subclasses
Current Glade versions want object IDs to be unique, but currently
pavucontrol.glade shares some IDs between the top-level windows. I guess
this used to be OK in the past, and the "interface-naming-policy
toplevel-contextual" comment in the beginning of the .glade file
probably has something to do with this. I want to update the .glade file
to be easy to work with current Glade versions, so I will remove the
duplicated object IDs.

The first IDs to change are the "channelsVBox", "nameLabel",
"boldNameLabel" and "iconImage" IDs. These were used by
MinimalStreamWidget to create widgets for both devices and streams, but
now that the IDs are different for devices and streams, the widgets have
to be created by the subclasses.

MinimalStreamWidget doesn't need the Gtk::Builder in its constructor any
more, so remove that parameter to avoid warnings about an unused
variable.
2018-11-21 11:40:02 +02:00
Lukas K f6015d6426 Add checkbutton for disabling volume meters
Add a checkbutton for disabling volume meters because of high CPU
utilisation when updating them
2016-04-26 18:15:57 +03:00
Ivan Ivanov dd0ccda382 devicewidget, streamwidget: Show only one volume slider when channels are locked 2015-02-26 22:55:46 +01: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
Colin Guthrie 297af52ae5 volume: Support volumes up to 11.
This allows us to set volumes up to ~153% aka +11dB.

Also show the current dB value in the UI - as pavucontrol is a bit more
developer-friendly than other volume UIs displaying this by default makes
sense.
2011-03-09 21:50:29 +00:00
Rafał Mużyło 9ce0e0a380 Drop the need to use libglademm 2011-03-03 14:31:14 +00:00
Colin Guthrie b11f0b7297 streamwidget: Fix a compile warning. 2010-04-20 19:46:30 +01:00
Colin Guthrie 78f5194541 Allow for the sink input peak detect to survive across sink moves. 2009-10-17 15:59:29 +01:00
Lennart Poettering 8a11d0f781 fix event sound generation for volume changes 2009-08-27 05:41:11 +02:00
Colin Guthrie f1a23af603 Restructure the class inheritance a bit.
This just shuffles around the streamwidget a bit. The RoleWidget child class is the
exception, so try and gear things around SinkInput/SourceOutput widgets more to
save repeating the same code too much.
2009-06-28 16:38:39 +01:00
Colin Guthrie ac052e1a30 Rename event method to be more indicative of what it does. 2009-06-28 16:00:35 +01:00
Colin Guthrie 7b3083df57 Don't use a hyperlink to display the device, just use a regular button.
I'm not super happy with this style but it's probably more reliable
2009-06-17 23:23:04 +01:00
Colin Guthrie 7a7c1fc7f2 Hide the terminate button.
The terminate button is a last resort and shouldn't be promoted in the UI.

This commit hides it behind a right click menu instead.
This also hides the 'Set as Fallback' label in the glade file.
2009-06-17 22:25:19 +01:00
Colin Guthrie 02b316fcba More changes in the UI to try and make things neater.
This abandons the combo box approach an instead partially reverts to the popup.
We now display a suffix after the stream title saying " on <device>" or " from <device>"
where the <device> part looks like a hyperlink and, when clicked, shows the popup to change the device.

If there is only one device available, we suppress the whole thing and thus avoid confusion.
2009-06-17 08:54:14 +01:00
Colin Guthrie ddd7d06dde Move the setBaseVolume()/setSteps() methods to devicewidget (problem found after rebasing) 2009-06-17 08:54:13 +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 fab8d8d524 Hook up the device combo box on change event 2009-06-17 08:54:12 +01:00
Colin Guthrie ee855937cc Wire up the terminate button 2009-06-17 08:54:11 +01:00
Colin Guthrie 7b7a12f1d2 Adapt to new UI
The actual wiring up of events and clearing out of old, unused elements is
not complete yet, so this is completely non-functional at present.
2009-06-17 08:54:10 +01:00
Lennart Poettering feff1f6f05 configure steps for scales 2009-03-21 03:49:19 +01:00
Lennart Poettering 7116369503 visualize base volume 2009-03-21 03:27:25 +01:00
Colin Guthrie c6b73de308 Move config.h inclusion to the .cc files 2009-03-18 20:58:17 +00:00
Colin Guthrie e1e452ac22 Split out streamwidget into it's own files.
Also correct the location of the argument default value specification (it should be in prototype not implementation)
2009-03-15 13:02:56 +00:00