From owner-freebsd-ports-bugs@freebsd.org Sun Jun 10 17:45:48 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E4591009CF2 for ; Sun, 10 Jun 2018 17:45:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 00CBE6E4F8 for ; Sun, 10 Jun 2018 17:45:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B605E1009CEE; Sun, 10 Jun 2018 17:45:47 +0000 (UTC) Delivered-To: ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E6FA1009CEC for ; Sun, 10 Jun 2018 17:45:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 213CF6E4F4 for ; Sun, 10 Jun 2018 17:45:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 4D4741F4E6 for ; Sun, 10 Jun 2018 17:45:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w5AHjkCS043964 for ; Sun, 10 Jun 2018 17:45:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w5AHjkYG043963 for ports-bugs@FreeBSD.org; Sun, 10 Jun 2018 17:45:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 228873] [patch] audio/pavucontrol: fix unreadable label names due to ellipsize side-effect with GTK2 option Date: Sun, 10 Jun 2018 17:45:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: samy.mahmoudi@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: romain@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2018 17:45:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228873 Bug ID: 228873 Summary: [patch] audio/pavucontrol: fix unreadable label names due to ellipsize side-effect with GTK2 option Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: romain@FreeBSD.org Reporter: samy.mahmoudi@gmail.com Assignee: romain@FreeBSD.org Flags: maintainer-feedback?(romain@FreeBSD.org) Description: When building audio/pavucontrol against GTK2 (default option), the label na= mes of the streams/devices are improperly ellipsized. The GTK+2 Reference Manual mentions the side-effect that the label requests only enough space to displ= ay the ellipsis "...". URL: https://developer.gnome.org/gtk2/stable/GtkLabel.html#GtkLabel--ellips= ize Reproducibility: pkg install --yes pavucontrol && pavucontrol Workaround for devices: Conditionally patch src/pavucontrol.glade to expand corresponding labels (patches provided below) Workarounds for streams (by increasing order of preference): =E2=80=A2 Make GTK3 the default option (fixes not only streams but also dev= ices) =E2=80=A2 Conditionally patch src/pavucontrol.glade to set the "ellipsize" = property of the affected labels to none. Runs the risk of stretching the window horizontally more than the screen size if the label name is too long (nevertheless, patch may be provided). =E2=80=A2 Conditionally patch src/pavucontrol.glade to expand the affected = labels. Works flawlessly with devices but slightly changes the pavucontrol expected appearance with streams because each stream is followed by an "on" label wh= ich gets shifted at right (nevertheless, patch may be provided). =E2=80=A2 Conditionally patch src/mainwindow.cc to set the "width-chars" pr= operty dynamically if the label name is less than 64 characters and to ellipsize beyond 64 characters otherwise (patches provided below). # Patch to apply to Makefile --- Makefile.orig 2018-06-10 18:56:03.808240000 +0200 +++ Makefile 2018-06-10 18:55:59.757969000 +0200 @@ -30,6 +30,7 @@ GTK2_USE=3D GNOME=3Dgtkmm24 GTK2_LIB_DEPENDS=3D libcanberra.so:audio/libcanberra GTK2_CONFIGURE_ON=3D --disable-gtk3 +GTK2_EXTRA_PATCHES=3D ${PATCHDIR}/extra-patch-gtk2-ellipsize-side-effect GTK3_USE=3D GNOME=3Dgtkmm30 GTK3_LIB_DEPENDS=3D libcanberra-gtk3.so:audio/libcanberra-gtk3 # End of file # Patch file to add to files/extra-patch-gtk2-ellipsize-side-effect --- src/mainwindow.cc.orig 2015-03-24 14:39:00 UTC +++ src/mainwindow.cc @@ -758,9 +758,11 @@ void MainWindow::updateSinkInput(const p g_free(txt); w->nameLabel->set_markup(txt =3D g_markup_printf_escaped(": %s", info.name)); g_free(txt); + w->nameLabel->set_width_chars ((strlen(info.name) < 62) ? strlen(info.name) : 62); } else { w->boldNameLabel->set_text(""); w->nameLabel->set_label(info.name); + w->nameLabel->set_width_chars ((strlen(info.name) < 64) ? strlen(info.name) : 64); } w->nameLabel->set_tooltip_text(info.name); @@ -813,9 +815,11 @@ void MainWindow::updateSourceOutput(cons g_free(txt); w->nameLabel->set_markup(txt =3D g_markup_printf_escaped(": %s", info.name)); g_free(txt); + w->nameLabel->set_width_chars ((strlen(info.name) < 62) ? strlen(info.name) : 62); } else { w->boldNameLabel->set_text(""); w->nameLabel->set_label(info.name); + w->nameLabel->set_width_chars ((strlen(info.name) < 64) ? strlen(info.name) : 64); } w->nameLabel->set_tooltip_text(info.name); @@ -897,6 +901,7 @@ bool MainWindow::createEventRoleWidget() eventRoleWidget->boldNameLabel->set_text(""); eventRoleWidget->nameLabel->set_label(_("System Sounds")); + eventRoleWidget->nameLabel->set_width_chars (13); =20=20=20=20 eventRoleWidget->iconImage->set_from_icon_name("multimedia-volume-control", Gtk::ICON_SIZE_SMALL_TOOLBAR); --- src/pavucontrol.glade.orig 2015-03-24 14:39:00 UTC +++ src/pavucontrol.glade @@ -259,7 +259,7 @@ end - False + True True 1 # End of file --=20 You are receiving this mail because: You are the assignee for the bug.=