[pulseaudio-commits] [Git][pulseaudio/pavucontrol][master] 5 commits: move some widget initializations from MinimalStreamWidget to subclasses
Arun Raghavan
gitlab at gitlab.freedesktop.org
Fri Nov 23 02:54:00 UTC 2018
Arun Raghavan pushed to branch master at PulseAudio / pavucontrol
Commits:
c760edaf by Tanu Kaskinen at 2018-11-21T09:40:02Z
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.
- - - - -
0047261f by Tanu Kaskinen at 2018-11-21T10:06:08Z
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.
- - - - -
0fa19691 by Tanu Kaskinen at 2018-11-21T10:17:55Z
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.
- - - - -
577246f1 by Tanu Kaskinen at 2018-11-21T10:25:02Z
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.
- - - - -
dfeabf08 by Tanu Kaskinen at 2018-11-21T10:55:11Z
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.
- - - - -
9 changed files:
- configure.ac
- src/cardwidget.cc
- src/devicewidget.cc
- src/devicewidget.h
- src/mainwindow.cc
- src/minimalstreamwidget.cc
- src/minimalstreamwidget.h
- src/pavucontrol.glade
- src/streamwidget.cc
Changes:
=====================================
configure.ac
=====================================
@@ -41,26 +41,7 @@ AC_TYPE_SIGNAL
AC_HEADER_STDC
AX_CXX_COMPILE_STDCXX_11
-AC_ARG_ENABLE(gtk3,
- [AS_HELP_STRING([--disable-gtk3],
- [Whether to build or not against gtk3 [default=yes]])],
- [enable_gtk3=$enableval],
- [enable_gtk3="yes"])
-
-if test "x$enable_gtk3" = "xyes"; then
- gtkmm_ver="3.0"
- gtkmm_min_ver="2.99"
- canberra_ver="3"
- AC_DEFINE([HAVE_GTK3], [1], [Define if we are building against gtk3])
- echo "***"
- echo "*** Attempting build in GTK3 mode. Use --disable-gtk3 to build for GTK2"
- echo "***"
-else
- gtkmm_ver="2.4"
- gtkmm_min_ver="2.16"
- canberra_ver=""
-fi
-PKG_CHECK_MODULES(GUILIBS, [ gtkmm-$gtkmm_ver >= $gtkmm_min_ver sigc++-2.0 libcanberra-gtk$canberra_ver >= 0.16 ])
+PKG_CHECK_MODULES(GUILIBS, [ gtkmm-3.0 >= 3.0 sigc++-2.0 libcanberra-gtk3 >= 0.16 ])
AC_SUBST(GUILIBS_CFLAGS)
AC_SUBST(GUILIBS_LIBS)
=====================================
src/cardwidget.cc
=====================================
@@ -30,9 +30,9 @@
CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::VBox(cobject) {
- x->get_widget("nameLabel", nameLabel);
+ x->get_widget("cardNameLabel", nameLabel);
x->get_widget("profileList", profileList);
- x->get_widget("iconImage", iconImage);
+ x->get_widget("cardIconImage", iconImage);
treeModel = Gtk::ListStore::create(profileModel);
profileList->set_model(treeModel);
=====================================
src/devicewidget.cc
=====================================
@@ -32,11 +32,17 @@
/*** DeviceWidget ***/
DeviceWidget::DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
- MinimalStreamWidget(cobject, x),
+ MinimalStreamWidget(cobject),
offsetButtonEnabled(false) {
- x->get_widget("lockToggleButton", lockToggleButton);
- x->get_widget("muteToggleButton", muteToggleButton);
+ /* MinimalStreamWidget member variables. */
+ x->get_widget("deviceChannelsVBox", channelsVBox);
+ x->get_widget("deviceNameLabel", nameLabel);
+ x->get_widget("deviceBoldNameLabel", boldNameLabel);
+ x->get_widget("deviceIconImage", iconImage);
+
+ x->get_widget("deviceLockToggleButton", lockToggleButton);
+ x->get_widget("deviceMuteToggleButton", muteToggleButton);
x->get_widget("defaultToggleButton", defaultToggleButton);
x->get_widget("portSelect", portSelect);
x->get_widget("portList", portList);
@@ -64,18 +70,15 @@ DeviceWidget::DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Buil
for (unsigned i = 0; i < PA_CHANNELS_MAX; i++)
channelWidgets[i] = NULL;
-#ifdef HAVE_GTK3
offsetAdjustment = Gtk::Adjustment::create(0.0, -2000.0, 5000.0, 10.0, 50.0, 0.0);
offsetButton->configure(offsetAdjustment, 0, 2);
-#else
- offsetAdjustment = new Gtk::Adjustment(0.0, -2000.0, 5000.0, 10.0, 50.0, 0.0);
- offsetButton->configure(*offsetAdjustment, 0.0, 2);
-#endif /* HAVE_GTK3 */
}
void DeviceWidget::init(MainWindow* mainWindow, Glib::ustring deviceType) {
mpMainWindow = mainWindow;
mDeviceType = deviceType;
+
+ MinimalStreamWidget::init();
}
void DeviceWidget::setChannelMap(const pa_channel_map &m, bool can_decibel) {
=====================================
src/devicewidget.h
=====================================
@@ -101,11 +101,7 @@ protected:
Gtk::HBox *portSelect, *offsetSelect;
Gtk::ComboBox *portList;
Glib::RefPtr<Gtk::ListStore> treeModel;
-#ifdef HAVE_GTK3
Glib::RefPtr<Gtk::Adjustment> offsetAdjustment;
-#else
- Gtk::Adjustment *offsetAdjustment;
-#endif /* HAVE_GTK3 */
private:
Glib::ustring mDeviceType;
=====================================
src/mainwindow.cc
=====================================
@@ -196,11 +196,7 @@ MainWindow* MainWindow::create(bool maximize) {
void MainWindow::on_realize() {
Gtk::Window::on_realize();
-#ifdef HAVE_GTK3
get_window()->set_cursor(Gdk::Cursor::create(Gdk::WATCH));
-#else
- get_window()->set_cursor(Gdk::Cursor(Gdk::WATCH));
-#endif /* HAVE_GTK3 */
}
bool MainWindow::on_key_press_event(GdkEventKey* event) {
=====================================
src/minimalstreamwidget.cc
=====================================
@@ -25,23 +25,31 @@
#include "minimalstreamwidget.h"
/*** MinimalStreamWidget ***/
-MinimalStreamWidget::MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
+MinimalStreamWidget::MinimalStreamWidget(BaseObjectType* cobject) :
Gtk::VBox(cobject),
+ channelsVBox(NULL),
+ nameLabel(NULL),
+ boldNameLabel(NULL),
+ iconImage(NULL),
peakProgressBar(),
lastPeak(0),
peak(NULL),
updating(false),
volumeMeterEnabled(false),
volumeMeterVisible(true) {
+}
- x->get_widget("channelsVBox", channelsVBox);
- x->get_widget("nameLabel", nameLabel);
- x->get_widget("boldNameLabel", boldNameLabel);
- x->get_widget("iconImage", iconImage);
+void MinimalStreamWidget::init() {
+ /* Set up the peak meter. This is not done in the constructor, because
+ * channelsVBox is initialized by the subclasses, so it's not yet available
+ * in the constructor. */
peakProgressBar.set_size_request(-1, 10);
channelsVBox->pack_end(peakProgressBar, false, false);
+ /* XXX: Why is the peak meter hidden by default? Maybe the idea is that if
+ * setting up the monitoring stream fails for whatever reason, then we
+ * shouldn't show the peak meter at all. */
peakProgressBar.hide();
}
=====================================
src/minimalstreamwidget.h
=====================================
@@ -25,11 +25,15 @@
class MinimalStreamWidget : public Gtk::VBox {
public:
- MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
+ MinimalStreamWidget(BaseObjectType* cobject);
+ /* Subclass constructors are expected to initialize these variables.
+ * MinimalStreamWidget can't initialize these, because the glade object
+ * id's depend on the subclass type. */
Gtk::VBox *channelsVBox;
Gtk::Label *nameLabel, *boldNameLabel;
Gtk::Image *iconImage;
+
Gtk::ProgressBar peakProgressBar;
double lastPeak;
pa_stream *peak;
@@ -45,6 +49,11 @@ public:
void updatePeak(double v);
void setVolumeMeterVisible(bool v);
+protected:
+ /* Subclasses must call this after the constructor to finalize the initial
+ * layout. */
+ virtual void init();
+
private :
bool volumeMeterVisible;
=====================================
src/pavucontrol.glade
=====================================
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="value">44.2408370972</property>
@@ -11,6 +10,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">window2</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
<object class="GtkHBox" id="channelWidget">
<property name="visible">True</property>
@@ -20,11 +22,11 @@
<object class="GtkLabel" id="channelLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes"><b>left-front</b></property>
<property name="use_markup">True</property>
<property name="width_chars">15</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -50,13 +52,13 @@
<object class="GtkLabel" id="volumeLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
<property name="xpad">8</property>
<property name="label" translatable="yes"><small>50%</small></property>
<property name="use_markup">True</property>
<property name="justify">right</property>
<property name="width_chars">9</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -71,6 +73,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">window1</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
<object class="GtkEventBox" id="cardWidgetBox">
<property name="visible">True</property>
@@ -92,7 +97,7 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkImage" id="iconImage">
+ <object class="GtkImage" id="cardIconImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -109,13 +114,13 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkLabel" id="nameLabel">
+ <object class="GtkLabel" id="cardNameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Card Name</property>
<property name="use_markup">True</property>
<property name="ellipsize">middle</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -146,9 +151,9 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes"><b>Profile:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -201,6 +206,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">window1</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
<object class="GtkEventBox" id="deviceWidgetBox">
<property name="visible">True</property>
@@ -217,12 +225,12 @@
<property name="border_width">12</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkImage" id="iconImage">
+ <object class="GtkImage" id="deviceIconImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
@@ -238,7 +246,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkLabel" id="boldNameLabel">
+ <object class="GtkLabel" id="deviceBoldNameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_markup">True</property>
@@ -250,13 +258,13 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="nameLabel">
+ <object class="GtkLabel" id="deviceNameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Device Title</property>
<property name="use_markup">True</property>
<property name="ellipsize">end</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -277,7 +285,7 @@
<property name="can_focus">False</property>
<property name="spacing">3</property>
<child>
- <object class="GtkToggleButton" id="muteToggleButton">
+ <object class="GtkToggleButton" id="deviceMuteToggleButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -288,7 +296,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">audio-volume-muted</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
</child>
</object>
@@ -299,7 +307,7 @@
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="lockToggleButton">
+ <object class="GtkToggleButton" id="deviceLockToggleButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -311,7 +319,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">changes-prevent</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
</child>
</object>
@@ -361,12 +369,12 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes"><b>Port:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -393,7 +401,7 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="channelsVBox">
+ <object class="GtkVBox" id="deviceChannelsVBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
@@ -520,9 +528,9 @@
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes"><b>Latency offset:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -537,8 +545,6 @@
<property name="invisible_char">•</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -685,6 +691,9 @@
<property name="default_width">500</property>
<property name="default_height">400</property>
<property name="icon_name">multimedia-volume-control</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
<object class="GtkVBox" id="vbox20">
<property name="visible">True</property>
@@ -705,8 +714,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">0</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
@@ -744,7 +751,7 @@
</packing>
</child>
<child>
- <object class="GtkHSeparator" id="hseparator2">
+ <object class="GtkHSeparator" id="hseparator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -768,13 +775,13 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes"><b>_Show:</b></property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -831,8 +838,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">0</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport5">
<property name="visible">True</property>
@@ -897,10 +902,10 @@
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes"><b>_Show:</b></property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -941,7 +946,7 @@
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Recording</property>
@@ -961,8 +966,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">0</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport4">
<property name="visible">True</property>
@@ -1027,11 +1030,11 @@
<object class="GtkLabel" id="label4826">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes"><b>S_how:</b></property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">sinkTypeComboBox</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -1092,8 +1095,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">0</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport3">
<property name="visible">True</property>
@@ -1132,7 +1133,7 @@
</packing>
</child>
<child>
- <object class="GtkHSeparator" id="hseparator5">
+ <object class="GtkHSeparator" id="hseparator6">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1159,11 +1160,11 @@
<object class="GtkLabel" id="label4827">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes"><b>Sho_w:</b></property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">sourceTypeComboBox</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -1216,7 +1217,7 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -1224,15 +1225,13 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">0</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -1263,11 +1262,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkHSeparator" id="hseparator1">
+ <object class="GtkHSeparator" id="hseparator7">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1316,7 +1315,7 @@
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label5">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Configuration</property>
@@ -1353,13 +1352,16 @@
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="type_hint">normal</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
@@ -1378,12 +1380,12 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes"><b>Rename device to:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -1400,8 +1402,6 @@
<property name="width_chars">60</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -1416,6 +1416,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">window1</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
<object class="GtkEventBox" id="streamWidgetBox">
<property name="visible">True</property>
@@ -1426,18 +1429,18 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkVBox" id="vbox26">
+ <object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkImage" id="iconImage">
+ <object class="GtkImage" id="streamIconImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
@@ -1449,12 +1452,12 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox12">
+ <object class="GtkHBox" id="hbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child>
- <object class="GtkLabel" id="boldNameLabel">
+ <object class="GtkLabel" id="streamBoldNameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_markup">True</property>
@@ -1466,13 +1469,13 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="nameLabel">
+ <object class="GtkLabel" id="streamNameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Stream Title</property>
<property name="use_markup">True</property>
<property name="ellipsize">end</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1484,10 +1487,10 @@
<object class="GtkLabel" id="directionLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="xpad">4</property>
<property name="label" translatable="yes">direction</property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1519,23 +1522,23 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox10">
+ <object class="GtkHBox" id="hbox13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">3</property>
<child>
- <object class="GtkToggleButton" id="muteToggleButton">
+ <object class="GtkToggleButton" id="streamMuteToggleButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Mute audio</property>
<property name="relief">none</property>
<child>
- <object class="GtkImage" id="image20">
+ <object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">audio-volume-muted</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
</child>
</object>
@@ -1546,7 +1549,7 @@
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="lockToggleButton">
+ <object class="GtkToggleButton" id="streamLockToggleButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -1554,11 +1557,11 @@
<property name="relief">none</property>
<property name="active">True</property>
<child>
- <object class="GtkImage" id="image18">
+ <object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">changes-prevent</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
</child>
</object>
@@ -1583,7 +1586,7 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="channelsVBox">
+ <object class="GtkVBox" id="streamChannelsVBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
@@ -1608,7 +1611,7 @@
</packing>
</child>
<child>
- <object class="GtkHSeparator" id="hseparator2">
+ <object class="GtkHSeparator" id="hseparator8">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
=====================================
src/streamwidget.cc
=====================================
@@ -30,11 +30,17 @@
/*** StreamWidget ***/
StreamWidget::StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
- MinimalStreamWidget(cobject, x),
+ MinimalStreamWidget(cobject),
mpMainWindow(NULL) {
- x->get_widget("lockToggleButton", lockToggleButton);
- x->get_widget("muteToggleButton", muteToggleButton);
+ /* MinimalStreamWidget member variables. */
+ x->get_widget("streamChannelsVBox", channelsVBox);
+ x->get_widget("streamNameLabel", nameLabel);
+ x->get_widget("streamBoldNameLabel", boldNameLabel);
+ x->get_widget("streamIconImage", iconImage);
+
+ x->get_widget("streamLockToggleButton", lockToggleButton);
+ x->get_widget("streamMuteToggleButton", muteToggleButton);
x->get_widget("directionLabel", directionLabel);
x->get_widget("deviceButton", deviceButton);
@@ -55,6 +61,8 @@ StreamWidget::StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Buil
void StreamWidget::init(MainWindow* mainWindow) {
mpMainWindow = mainWindow;
+
+ MinimalStreamWidget::init();
}
bool StreamWidget::onContextTriggerEvent(GdkEventButton* event) {
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/compare/d3b3bee3787523df31a885febb16da582d60f1aa...dfeabf086c1222790add7e949effe7e9f2703eb2
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/compare/d3b3bee3787523df31a885febb16da582d60f1aa...dfeabf086c1222790add7e949effe7e9f2703eb2
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20181123/b25d7d22/attachment-0001.html>
More information about the pulseaudio-commits
mailing list