Commit Graph

78 Commits

Author SHA1 Message Date
Felipe Sateler 2840825519 Migrate away from deprecated Gtk interfaces
This was accomplished by building with -DGTKMM_DISABLE_DEPRECATED.
2020-10-11 17:18:59 +03:00
Jamison Lofthouse 9954baa343 Set channel label width to 12
Add a bit more padding for when percentages and decibel levels are weird
so that sliders and labels are a consistent width.
2020-08-04 17:45:06 -06:00
Allan Nordhøy 8921ee0cd6 i18n: Correct spelling "AC-3" and "E-AC-3" 2020-05-17 00:48:43 +00:00
Tanu Kaskinen ae278b8643 streamwidget: Use a drop-down list instead of a button and a popup for selecting the device
This looks better, requires less code and probably fixes
https://gitlab.freedesktop.org/pulseaudio/pavucontrol/issues/63
2019-11-27 19:54:30 +00:00
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
Tanu Kaskinen 5f664bc63b channelwidget: ensure that all channel labels have the same width
pavucontrol.glade previously set the channel label width to 15
characters, with the goal of making all channel labels have the same
width. However, with some translations and font settings the configured
width wasn't enough, so sometimes a label was wider than others, and
that made the volume slider widths different too. If the volume sliders
have different widths, it's very hard to visually compare the volumes of
the channels.

This patch removes the fixed width in pavucontrol.glade and solves the
problem by finding the widest label and using that label's width with
all labels.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/issues/51
2019-02-26 15:42:57 +00:00
Tanu Kaskinen 46ce3e418e pavucontrol.glade: right-align channel labels
The channel labels ("Front Left" etc.) that are adjacent to volume
sliders used to be left-aligned, which meant that there was some empty
space (depending on the text width) between the label text and the
volume slider. Right-aligning the labels looks nicer.
2019-02-26 15:42:57 +00:00
Tanu Kaskinen dfeabf086c drop gtk2 support
When opening pavucontrol.glade with Glade 3.22.1, this message was
shown:

    pavucontrol.glade targets Gtk+ 2.16

    But this version of Glade is for GTK+ 3 only.
    Make sure you can run this project with Glade 3.8 with no deprecated
    widgets first.

I think it's best to just drop the gtk2 support.
2018-11-21 12:55:11 +02:00
Tanu Kaskinen 577246f15a pavucontrol.glade: changes automatically done by Glade
When opening pavucontrol.glade in Glade 3.22.1 and saving the file
without doing any manual changes, these changes are made to the file.
The changes seem harmless, so let's apply them to avoid unnecessary
clutter appearing when doing more important changes in the future.
2018-11-21 12:25:02 +02:00
Tanu Kaskinen 0fa1969108 pavucontrol.glade: object renames automatically done by Glade
When opening pavucontrol.glade with Glade and saving it without any
manual changes, Glade does these object rename to get rid of duplicate
IDs. None of these are referenced by the code, so the renames are
harmless.
2018-11-21 12:17:55 +02:00
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
Nikita Zlobin 7c3e76e7a5 UI form enhancement
Padding around scrollviews inside notebook is removed - bottom panel now top padding as well
and both are visually separated.
2018-03-24 09:03:47 +02:00
Tanu Kaskinen 574139c10e pavucontrol.glade: use a more appropriate icon for the channel lock button
Suggested by Palo Kisa:
4474716b41 (commitcomment-21327782)

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=99577
2017-03-15 23:47:24 +02:00
Paul W. Frields 4474716b41 Use freedesktop.org standard icon name
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=99577
2017-01-31 15:26:53 +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
Arun Raghavan fd98c921ae mainwindow: Don't add a border on the outermost vbox
It adds a thick border around along the edges that looks quite ugly.
2016-03-31 17:13:39 +05:30
Hans de Goede e83660bbd6 Do not instantiate cardwidget, devicewidget and rolewidget with a type of EventBox
RoleWidget::create contains:
    x->get_widget_derived("streamWidget", w);

But streamWidget is defined as following in the glade file:
<object class="GtkEventBox" id="streamWidget">

Where as RoleWidget is derived from [Minimal]StreamWidget, which is derived
from Gtk::VBox, so this is clearly wrong.

Adding:
printf("rolewidget type: %s\n", g_type_name(G_TYPE_FROM_INSTANCE(w->gobj())));
for debugging shows that this really leads to RoleWidget being instantiated
as an EventBox (yet things still work due to sheer luck).

This commit fixes this, by putting the streamWidget id at the right level of
the hierarchy in the glade file (and likewise for cardWidget and deviceWidget).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-09-07 13:58:51 +03:00
Simon Johansson 0254dfb2ab Add horizontal scrollbars automatically
Add a horizontal scrollbar inside each tab automatically when the window
is not wide enough. Add arrows for scrolling the tab bar when the tabs
don't fit inside the window.
2014-06-24 13:38:08 +03:00
Alexander E. Patrakov 35e844d2b2 pavucontrol: ellipsize labels to fix window resizing
ellipsize labels to make the window resizable even with long label text
and add tooltips to provide a way to read the full text

Originally from Sebastian Wick <sebastian@sebastianwick.net>
2013-12-13 15:18:42 +02: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
Arun Raghavan c69cffecdc devicewidget: Move latency offset into an expander
We don't want to flood users with this option, let's just leave it
closed by default for those who need it.
2012-12-17 15:20:42 +05:30
poljar (Damir Jelić) d03f9ffac2 devicewidget: Add a latency offset spinbutton
This change adds the ability to change the latency offset of a port with
pavucontrol.
2012-07-27 09:25:14 +03:00
Cosimo Cecchi fb278932a4 Fix theme under gtk3
We need to set the visible_window property to ensure
the theme background colour shines through.

https://bugzilla.gnome.org/show_bug.cgi?id=655635
2011-10-25 11:31:37 +02: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 e317d38146 Fix strange vertical alignment of sinks/source/cards
This only seemed to affect GTK3 and it seems to introduce
a GTK warning relating to 'gtk_widget_size_allocate' similar
to those fixed in the previous commit, but nothing seems to
be the worse for it.
2011-07-27 23:35:20 +01:00
Colin Guthrie 2aaf33200a Fix GTK Warnings under GTK3 due to combo box sizes 2011-07-27 23:34:48 +01:00
Colin Guthrie 933b8a7009 Deal more gracefully with disconnections.
As pavucontrol is often used for debugging PA, it should
be quite robust and not popup messages etc. under 'normal'
testing conditions. This adds quite a verbose message under
some specific conditions that do crop up from time to time.
2011-06-06 12:18:06 +02: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
Colin Guthrie 9516b6f1dc ui: Remove ellipsize attribute from some labels (causes ellipsis to be displayed rather than real text) 2011-03-03 14:53:28 +00:00
Colin Guthrie 099e91616d ui: Resave glade file without any changes to tidy it up 2011-03-03 14:36:08 +00:00
Rafał Mużyło 9ce0e0a380 Drop the need to use libglademm 2011-03-03 14:31:14 +00:00
Colin Guthrie 7de18201a3 connection: Show a nice label when connecting to PA. 2010-04-20 20:24:15 +01:00
Lennart Poettering 8959744e60 glade: ellipsize user supplied text strings 2010-01-05 20:57:25 +01: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 d98588b665 glade: minor alignment fixes 2009-07-01 20:28:57 +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 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 b96c707c12 Change 'Default' to 'Use as fallback' 2009-06-17 08:54:13 +01:00
Colin Guthrie 26d5749396 Add a tooltip 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 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
Colin Guthrie 7d296ec195 Glade UI changes. Code still needs to be updated 2009-06-17 08:54:09 +01:00
Colin Guthrie 0fbc2b1466 Remove the minimalStreamWindow. It's no longer used 2009-03-06 00:02:06 +00:00
Lennart Poettering 6154459500 use the server provided icons 2009-03-02 22:29:48 +01:00
Lennart Poettering 3d5133064e various small glade updates 2009-03-02 18:41:02 +01:00
Colin Guthrie 188ee8c2c2 Typo: spell configuration right 2009-02-28 19:52:17 +00:00