From 26699d5ad70676479d05d6c733d17df0f0919f85 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 21 Jun 2015 13:24:37 +0200 Subject: [PATCH] graph and progressbar: Convert to new system Signed-off-by: Uli Schlachter --- lib/awful/widget/graph.lua | 8 ++++---- lib/awful/widget/progressbar.lua | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/awful/widget/graph.lua b/lib/awful/widget/graph.lua index b5b4309c6..fdd83198e 100644 --- a/lib/awful/widget/graph.lua +++ b/lib/awful/widget/graph.lua @@ -195,7 +195,7 @@ local function add_value(_graph, value, group) table.remove(values, 1) end - _graph:emit_signal("widget::updated") + _graph:emit_signal("widget::redraw_needed") return _graph end @@ -205,7 +205,7 @@ end function graph:set_height(height) if height >= 5 then data[self].height = height - self:emit_signal("widget::updated") + self:emit_signal("widget::layout_changed") end return self end @@ -215,7 +215,7 @@ end function graph:set_width(width) if width >= 5 then data[self].width = width - self:emit_signal("widget::updated") + self:emit_signal("widget::layout_changed") end return self end @@ -226,7 +226,7 @@ for _, prop in ipairs(properties) do graph["set_" .. prop] = function(_graph, value) if data[_graph][prop] ~= value then data[_graph][prop] = value - _graph:emit_signal("widget::updated") + _graph:emit_signal("widget::redraw_needed") end return _graph end diff --git a/lib/awful/widget/progressbar.lua b/lib/awful/widget/progressbar.lua index 08d679238..4932207be 100644 --- a/lib/awful/widget/progressbar.lua +++ b/lib/awful/widget/progressbar.lua @@ -164,7 +164,7 @@ function progressbar:set_value(value) local value = value or 0 local max_value = data[self].max_value data[self].value = math.min(max_value, math.max(0, value)) - self:emit_signal("widget::updated") + self:emit_signal("widget::redraw_needed") return self end @@ -172,7 +172,7 @@ end -- @param height The height to set. function progressbar:set_height(height) data[self].height = height - self:emit_signal("widget::updated") + self:emit_signal("widget::layout_changed") return self end @@ -180,7 +180,7 @@ end -- @param width The width to set. function progressbar:set_width(width) data[self].width = width - self:emit_signal("widget::updated") + self:emit_signal("widget::layout_changed") return self end @@ -189,7 +189,7 @@ for _, prop in ipairs(properties) do if not progressbar["set_" .. prop] then progressbar["set_" .. prop] = function(pbar, value) data[pbar][prop] = value - pbar:emit_signal("widget::updated") + pbar:emit_signal("widget::redraw_needed") return pbar end end