[pulseaudio-discuss] Porting pavumeter to GTK3

Submitted by Jeff F. T. on April 17, 2016, 12:06 a.m.

Details

Message ID 1460851606.2786.5.camel@gmail.com
State New
Headers show
Series "Porting pavumeter to GTK3" ( rev: 1 ) in PulseAudio

Not browsing as part of any series.

Commit Message

Jeff F. T. April 17, 2016, 12:06 a.m.
Hi all,

Last summer I did a quick port of pavumeter to GTK3. I originally
planned to make it use client-side decorations (aka headerbar) but
didn't get around to doing that, so my branch has only one commit after
all (still is quite a nice improvement). I am attaching it here as a
git-formatted patch for your convenience.

Hopefully you can pick up where I left off and add the client-side
decorations support for added polish. I guess you could also replicate
my "port" to the paprefs utility too, I think that's the only remaining
one not using GTK3.

Cheers,
Jeff

Patch hide | download patch | download mbox

From 8e0b5d7224e09c490228961e8a5dc0b31b4b58ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Fortin=20Tam?= <nekohayo@gmail.com>
Date: Thu, 23 Jul 2015 22:56:14 -0400
Subject: [PATCH] "Port" to GTK+ 3 ;)

Remove the custom colors used for the header;
this would be better served by a GtkHeaderBar
---
 configure.ac   | 2 +-
 src/vumeter.cc | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index da3c22c..983557c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,7 @@  AC_PROG_LN_S
 AC_TYPE_SIGNAL
 AC_HEADER_STDC
 
-PKG_CHECK_MODULES(GUILIBS, [ gtkmm-2.4 ])
+PKG_CHECK_MODULES(GUILIBS, [ gtkmm-3.0 ])
 AC_SUBST(GUILIBS_CFLAGS)
 AC_SUBST(GUILIBS_LIBS)
 
diff --git a/src/vumeter.cc b/src/vumeter.cc
index 79e4b8e..10a2c54 100644
--- a/src/vumeter.cc
+++ b/src/vumeter.cc
@@ -102,8 +102,6 @@  MainWindow::MainWindow(const pa_channel_map &map, const char *, const char *desc
 
     add(vbox);
 
-    Gdk::Color c("white");
-    eventBox.modify_bg(Gtk::STATE_NORMAL, c);
 
     vbox.pack_start(eventBox, false, false);
 
@@ -119,9 +117,9 @@  MainWindow::MainWindow(const pa_channel_map &map, const char *, const char *desc
     titleVBox.add(subtitleLabel);
     titleVBox.set_spacing(6);
 
-    titleLabel.set_markup("<span size=\"18000\" color=\"black\"><b>PulseAudio Volume Meter</b></span>");
+    titleLabel.set_markup("<span size=\"18000\"><b>PulseAudio Volume Meter</b></span>");
     titleLabel.set_alignment(0, 1);
-    snprintf(t, sizeof(t), "<span color=\"black\">Showing signal levels of <b>%s</b></span>", description);
+    snprintf(t, sizeof(t), "Showing signal levels of <b>%s</b>", description);
     subtitleLabel.set_markup(t);
     subtitleLabel.set_alignment(0, 0);
     
-- 
2.5.5