From fec727c8d8eedadb8c2eb0d316939faee942a792 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sat, 30 Jul 2016 15:55:01 +0200
Subject: [PATCH 1/2] Fix volume ramp not working
---
src/modules/volume.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/modules/volume.cpp b/src/modules/volume.cpp
index f598e4d3..160b9061 100644
--- a/src/modules/volume.cpp
+++ b/src/modules/volume.cpp
@@ -1,3 +1,4 @@
+#include
#include "lemonbuddy.hpp"
#include "bar.hpp"
#include "utils/math.hpp"
@@ -5,6 +6,7 @@
#include "modules/volume.hpp"
using namespace modules;
+using namespace std;
VolumeModule::VolumeModule(std::string name_) : EventModule(name_)
{
@@ -148,6 +150,7 @@ bool VolumeModule::update()
this->volume = volume;
this->muted = muted;
+
this->label_volume_tokenized->text = this->label_volume->text;
this->label_volume_tokenized->replace_token("%percentage%", std::to_string(this->volume()) +"%");
@@ -181,9 +184,9 @@ std::string VolumeModule::get_output()
bool VolumeModule::build(Builder *builder, std::string tag)
{
if (tag == TAG_BAR_VOLUME)
- builder->node(this->bar_volume, volume);
- else if (tag == TAG_RAMP_VOLUME)
- builder->node(this->ramp_volume, volume);
+ builder->node(this->bar_volume, volume());
+ else if (tag == TAG_RAMP_VOLUME)
+ builder->node(this->ramp_volume, volume());
else if (tag == TAG_LABEL_VOLUME)
builder->node(this->label_volume_tokenized);
else if (tag == TAG_LABEL_MUTED)
From 1025a8e7dc3d2256de90c3bc2d0580ee9e9dadbc Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sat, 30 Jul 2016 16:08:36 +0200
Subject: [PATCH 2/2] Remove leftover debugging code
---
src/modules/volume.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/modules/volume.cpp b/src/modules/volume.cpp
index 160b9061..e227143f 100644
--- a/src/modules/volume.cpp
+++ b/src/modules/volume.cpp
@@ -1,4 +1,3 @@
-#include
#include "lemonbuddy.hpp"
#include "bar.hpp"
#include "utils/math.hpp"
@@ -6,7 +5,6 @@
#include "modules/volume.hpp"
using namespace modules;
-using namespace std;
VolumeModule::VolumeModule(std::string name_) : EventModule(name_)
{
@@ -150,7 +148,6 @@ bool VolumeModule::update()
this->volume = volume;
this->muted = muted;
-
this->label_volume_tokenized->text = this->label_volume->text;
this->label_volume_tokenized->replace_token("%percentage%", std::to_string(this->volume()) +"%");