2013/12/13 Tanu Kaskinen <[email protected]>:

> How did you apply the patch? By hand? It doesn't apply on my fresh
> checkout of the pavucontrol master branch.

I have saved the e-mail from gmail web interface. Indeed, due to
trailing CRs, it doesn't apply with "git am", but does apply with
"patch -Np1 -i pavucontrol.diff". I attached the resulting
git-formatted patch for your convenience.


>> Result: the stream title ellipsized to just "...", and the combo box
>> that allows to select the device becomes wider than the window. I'd
>> argue that it either should be initially as wide as its widest item
>> (i.e. the widest sink name in this case), or that the sink names
>> should also be ellipsized.
>
> Can you file a bug about this? The patch probably does more good than
> harm (do you agree?), and since it's not clear how to fix the remaining
> issue, I think it's best to apply the patch (as soon as someone posts a
> patch that can actually be applied cleanly).

I'd say that the patch does no harm at all, and the ugly thing that I
found can be fixed later. As for the bug, we can reuse
https://bugs.freedesktop.org/show_bug.cgi?id=70964 , as that's what
the original patch was about. I will add a comment there.

-- 
Alexander E. Patrakov
From 211f5f975f34c373a6c50e0f7a658c000dc127e9 Mon Sep 17 00:00:00 2001
From: "Alexander E. Patrakov" <[email protected]>
Date: Fri, 13 Dec 2013 17:47:38 +0600
Subject: [PATCH] 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 <[email protected]>
---
 src/mainwindow.cc     | 6 ++++++
 src/pavucontrol.glade | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index be6fb93..fc378c4 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -431,6 +431,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);
@@ -586,6 +587,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);
@@ -707,6 +709,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);
@@ -759,6 +763,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>
-- 
1.8.3.2

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to