Update to 3.0

This commit is contained in:
Kalev Lember 2015-03-24 19:03:30 +01:00
parent e3d7f1f67b
commit 1f70f3eda7
7 changed files with 7 additions and 446 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
pavucontrol-0.9.10.tar.gz
/pavucontrol-1.0.tar.xz
/pavucontrol-2.0.tar.xz
/pavucontrol-3.0.tar.xz

View File

@ -1,87 +0,0 @@
From cbf3acb54379f3334cf5d7844888536bb54d1c5e Mon Sep 17 00:00:00 2001
From: Akihiro Tsukada <atsukada@users.sourceforge.net>
Date: Mon, 25 Feb 2013 01:03:31 +0900
Subject: [PATCH 1/2] sinkwidget: add support for AAC pass-through
---
src/pavucontrol.glade | 19 ++++++++++++++++---
src/sinkwidget.cc | 12 ++++++++++++
src/sinkwidget.h | 2 +-
3 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade
index 6defb3d..4b3dd01 100644
--- a/src/pavucontrol.glade
+++ b/src/pavucontrol.glade
@@ -427,9 +427,6 @@
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkCheckButton" id="encodingFormatPCM">
<property name="label" translatable="yes">PCM</property>
<property name="use_action_appearance">False</property>
@@ -499,6 +496,22 @@
<property name="bottom_attach">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="encodingFormatAAC">
+ <property name="label" translatable="yes">AAC</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc
index 1726550..7f4902c 100644
--- a/src/sinkwidget.cc
+++ b/src/sinkwidget.cc
@@ -62,6 +62,18 @@ SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
encodings[i].encoding = PA_ENCODING_DTS_IEC61937;
x->get_widget("encodingFormatDTS", encodings[i].widget);
encodings[i].widget->signal_toggled().connect(sigc::mem_fun(*this, &SinkWidget::onEncodingsChange));
+
+ ++i;
+ encodings[i].encoding = PA_ENCODING_INVALID;
+ x->get_widget("encodingFormatAAC", encodings[i].widget);
+ encodings[i].widget->set_sensitive(false);
+#ifdef PA_ENCODING_MPEG2_AAC_IEC61937
+ if (pa_context_get_server_protocol_version(get_context()) >= 28) {
+ encodings[i].encoding = PA_ENCODING_MPEG2_AAC_IEC61937;
+ encodings[i].widget->signal_toggled().connect(sigc::mem_fun(*this, &SinkWidget::onEncodingsChange));
+ encodings[i].widget->set_sensitive(true);
+ }
+#endif
#endif
}
diff --git a/src/sinkwidget.h b/src/sinkwidget.h
index a2fbab9..0044ffc 100644
--- a/src/sinkwidget.h
+++ b/src/sinkwidget.h
@@ -27,7 +27,7 @@
#if HAVE_EXT_DEVICE_RESTORE_API
# include <pulse/format.h>
-# define PAVU_NUM_ENCODINGS 5
+# define PAVU_NUM_ENCODINGS 6
typedef struct {
pa_encoding encoding;
--
1.8.4.2

View File

@ -1,75 +0,0 @@
From 82d7c5f03c493244b1f0f7472afbc7282a940b9d Mon Sep 17 00:00:00 2001
From: "Alexander E. Patrakov" <patrakov@gmail.com>
Date: Fri, 13 Dec 2013 17:47:38 +0600
Subject: [PATCH 2/4] 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>
---
src/mainwindow.cc | 6 ++++++
src/pavucontrol.glade | 2 ++
2 files changed, 8 insertions(+)
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 8fa3949..5a42318 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -433,6 +433,7 @@ bool MainWindow::updateSink(const pa_sink_info &info) {
w->boldNameLabel->set_text("");
gchar *txt;
w->nameLabel->set_markup(txt = g_markup_printf_escaped("%s", info.description));
+ w->nameLabel->set_tooltip_text(info.description);
g_free(txt);
icon = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_ICON_NAME);
@@ -588,6 +589,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
w->boldNameLabel->set_text("");
gchar *txt;
w->nameLabel->set_markup(txt = g_markup_printf_escaped("%s", info.description));
+ w->nameLabel->set_tooltip_text(info.description);
g_free(txt);
icon = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_ICON_NAME);
@@ -709,6 +711,8 @@ void MainWindow::updateSinkInput(const pa_sink_input_info &info) {
w->nameLabel->set_label(info.name);
}
+ w->nameLabel->set_tooltip_text(info.name);
+
setIconFromProplist(w->iconImage, info.proplist, "audio-card");
w->setVolume(info.volume);
@@ -761,6 +765,8 @@ void MainWindow::updateSourceOutput(const pa_source_output_info &info) {
w->nameLabel->set_label(info.name);
}
+ w->nameLabel->set_tooltip_text(info.name);
+
setIconFromProplist(w->iconImage, info.proplist, "audio-input-microphone");
#if HAVE_SOURCE_OUTPUT_VOLUMES
diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade
index 4b3dd01..b0aa2a5 100644
--- a/src/pavucontrol.glade
+++ b/src/pavucontrol.glade
@@ -256,6 +256,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">Device Title</property>
<property name="use_markup">True</property>
+ <property name="ellipsize">end</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1384,6 +1385,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">Stream Title</property>
<property name="use_markup">True</property>
+ <property name="ellipsize">end</property>
</object>
<packing>
<property name="expand">False</property>
--
2.1.0

View File

@ -1,72 +0,0 @@
From 710037ea1687ab2737298c7e3e897554253b44db Mon Sep 17 00:00:00 2001
From: Simon Johansson <amp@ampleyfly.se>
Date: Tue, 24 Jun 2014 01:06:58 +0200
Subject: [PATCH 3/4] 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.
---
src/pavucontrol.glade | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade
index b0aa2a5..5116632 100644
--- a/src/pavucontrol.glade
+++ b/src/pavucontrol.glade
@@ -705,6 +705,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_border">False</property>
+ <property name="scrollable">True</property>
<child>
<object class="GtkVBox" id="vbox32">
<property name="visible">True</property>
@@ -714,7 +715,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">12</property>
- <property name="hscrollbar_policy">never</property>
+ <property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport1">
@@ -828,7 +829,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">12</property>
- <property name="hscrollbar_policy">never</property>
+ <property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport5">
@@ -946,7 +947,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">12</property>
- <property name="hscrollbar_policy">never</property>
+ <property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport4">
@@ -1065,7 +1066,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">12</property>
- <property name="hscrollbar_policy">never</property>
+ <property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport3">
@@ -1185,7 +1186,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">12</property>
- <property name="hscrollbar_policy">never</property>
+ <property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport2">
--
2.1.0

View File

@ -1,201 +0,0 @@
From 5df85cc00332a652e0bb5678e656c5bb107971a5 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 28 Aug 2014 12:58:05 +0200
Subject: [PATCH 4/4] 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>
---
src/cardwidget.cc | 1 +
src/channelwidget.cc | 1 +
src/devicewidget.cc | 1 +
src/mainwindow.cc | 6 ++++++
src/rolewidget.cc | 1 +
src/sinkinputwidget.cc | 1 +
src/sinkwidget.cc | 1 +
src/sourceoutputwidget.cc | 1 +
src/sourcewidget.cc | 1 +
src/streamwidget.cc | 1 +
10 files changed, 15 insertions(+)
diff --git a/src/cardwidget.cc b/src/cardwidget.cc
index c79ac6c..28c558d 100644
--- a/src/cardwidget.cc
+++ b/src/cardwidget.cc
@@ -45,6 +45,7 @@ CardWidget* CardWidget::create() {
CardWidget* w;
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "cardWidget");
x->get_widget_derived("cardWidget", w);
+ w->reference();
return w;
}
diff --git a/src/channelwidget.cc b/src/channelwidget.cc
index 6f59de2..fe94c11 100644
--- a/src/channelwidget.cc
+++ b/src/channelwidget.cc
@@ -53,6 +53,7 @@ ChannelWidget* ChannelWidget::create() {
x->add_from_file(GLADE_FILE, "adjustment1");
x->add_from_file(GLADE_FILE, "channelWidget");
x->get_widget_derived("channelWidget", w);
+ w->reference();
return w;
}
diff --git a/src/devicewidget.cc b/src/devicewidget.cc
index 1a148ee..813780f 100644
--- a/src/devicewidget.cc
+++ b/src/devicewidget.cc
@@ -89,6 +89,7 @@ void DeviceWidget::setChannelMap(const pa_channel_map &m, bool can_decibel) {
snprintf(text, sizeof(text), "<b>%s</b>", pa_channel_position_to_pretty_string(m.map[i]));
cw->channelLabel->set_markup(text);
channelsVBox->pack_start(*cw, false, false, 0);
+ cw->unreference();
}
channelWidgets[m.channels-1]->last = true;
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 5a42318..5d205fb 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -300,6 +300,7 @@ void MainWindow::updateCard(const pa_card_info &info) {
else {
cardWidgets[info.index] = w = CardWidget::create();
cardsVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
is_new = true;
}
@@ -416,6 +417,7 @@ bool MainWindow::updateSink(const pa_sink_info &info) {
sinkWidgets[info.index] = w = SinkWidget::create(this);
w->setChannelMap(info.channel_map, !!(info.flags & PA_SINK_DECIBEL_VOLUME));
sinksVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
w->monitor_index = info.monitor_source;
is_new = true;
@@ -570,6 +572,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
sourceWidgets[info.index] = w = SourceWidget::create(this);
w->setChannelMap(info.channel_map, !!(info.flags & PA_SOURCE_DECIBEL_VOLUME));
sourcesVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
is_new = true;
@@ -686,6 +689,7 @@ void MainWindow::updateSinkInput(const pa_sink_input_info &info) {
sinkInputWidgets[info.index] = w = SinkInputWidget::create(this);
w->setChannelMap(info.channel_map, true);
streamsVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
w->clientIndex = info.client;
is_new = true;
@@ -743,6 +747,7 @@ void MainWindow::updateSourceOutput(const pa_source_output_info &info) {
w->setChannelMap(info.channel_map, true);
#endif
recsVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
w->clientIndex = info.client;
is_new = true;
@@ -838,6 +843,7 @@ bool MainWindow::createEventRoleWidget() {
eventRoleWidget = RoleWidget::create();
streamsVBox->pack_start(*eventRoleWidget, false, false, 0);
+ eventRoleWidget->unreference();
eventRoleWidget->role = "sink-input-by-media-role:event";
eventRoleWidget->setChannelMap(cm, true);
diff --git a/src/rolewidget.cc b/src/rolewidget.cc
index fd3196c..db07f92 100644
--- a/src/rolewidget.cc
+++ b/src/rolewidget.cc
@@ -40,6 +40,7 @@ RoleWidget* RoleWidget::create() {
RoleWidget* w;
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
+ w->reference();
return w;
}
diff --git a/src/sinkinputwidget.cc b/src/sinkinputwidget.cc
index b88b718..5a0ba39 100644
--- a/src/sinkinputwidget.cc
+++ b/src/sinkinputwidget.cc
@@ -43,6 +43,7 @@ SinkInputWidget* SinkInputWidget::create(MainWindow* mainWindow) {
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
w->init(mainWindow);
+ w->reference();
return w;
}
diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc
index 7f4902c..f682cf2 100644
--- a/src/sinkwidget.cc
+++ b/src/sinkwidget.cc
@@ -82,6 +82,7 @@ SinkWidget* SinkWidget::create(MainWindow* mainWindow) {
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget");
x->get_widget_derived("deviceWidget", w);
w->init(mainWindow, "sink");
+ w->reference();
return w;
}
diff --git a/src/sourceoutputwidget.cc b/src/sourceoutputwidget.cc
index 827c5a8..4d915b0 100644
--- a/src/sourceoutputwidget.cc
+++ b/src/sourceoutputwidget.cc
@@ -49,6 +49,7 @@ SourceOutputWidget* SourceOutputWidget::create(MainWindow* mainWindow) {
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
w->init(mainWindow);
+ w->reference();
return w;
}
diff --git a/src/sourcewidget.cc b/src/sourcewidget.cc
index 5e4ecf0..fde5333 100644
--- a/src/sourcewidget.cc
+++ b/src/sourcewidget.cc
@@ -35,6 +35,7 @@ SourceWidget* SourceWidget::create(MainWindow* mainWindow) {
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget");
x->get_widget_derived("deviceWidget", w);
w->init(mainWindow, "source");
+ w->reference();
return w;
}
diff --git a/src/streamwidget.cc b/src/streamwidget.cc
index 94363ec..e602cce 100644
--- a/src/streamwidget.cc
+++ b/src/streamwidget.cc
@@ -77,6 +77,7 @@ void StreamWidget::setChannelMap(const pa_channel_map &m, bool can_decibel) {
snprintf(text, sizeof(text), "<b>%s</b>", pa_channel_position_to_pretty_string(m.map[i]));
cw->channelLabel->set_markup(text);
channelsVBox->pack_start(*cw, false, false, 0);
+ cw->unreference();
}
channelWidgets[m.channels-1]->last = true;
channelWidgets[m.channels-1]->setBaseVolume(PA_VOLUME_NORM);
--
2.1.0

View File

@ -1,16 +1,12 @@
Name: pavucontrol
Version: 2.0
Release: 10%{?dist}
Version: 3.0
Release: 1%{?dist}
Summary: Volume control for PulseAudio
Group: Applications/Multimedia
License: GPLv2+
URL: http://freedesktop.org/software/pulseaudio/%{name}
Source0: http://freedesktop.org/software/pulseaudio/%{name}/%{name}-%{version}.tar.xz
Patch0: 0001-sinkwidget-add-support-for-AAC-pass-through.patch
Patch1: 0002-pavucontrol-ellipsize-labels-to-fix-window-resizing.patch
Patch2: 0003-Add-horizontal-scrollbars-automatically.patch
Patch3: 0004-Reference-the-widget-before-returning-it-from-create.patch
BuildRequires: pulseaudio-libs-devel >= 3.0
BuildRequires: gtkmm30-devel
@ -27,10 +23,6 @@ of each playback stream separately.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%configure
@ -58,6 +50,9 @@ desktop-file-install \
%{_datadir}/applications/pavucontrol.desktop
%changelog
* Tue Mar 24 2015 Kalev Lember <kalevlember@gmail.com> - 3.0-1
- Update to 3.0
* Sat Feb 28 2015 Kevin Fenzi <kevin@scrye.com> 2.0-10
- Rebuild for new gcc

View File

@ -1 +1 @@
ffefdea76a77f89c6415300b8ad5eb7b pavucontrol-2.0.tar.xz
176308d2c03f8f3a7b2bd4f4d284fe71 pavucontrol-3.0.tar.xz