[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 06/29: Change Bar in BarView to store colour in color rather than fill_color
noreply at xfce.org
noreply at xfce.org
Mon Dec 18 12:45:37 CET 2017
This is an automated email from the git hooks/post-receive script.
o m e g a p h i l p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-hardware-monitor-plugin.
commit ad39d0cf7a8655c191935aad87587a5ef6c8a60f
Author: OmegaPhil <OmegaPhil at startmail.com>
Date: Sun Nov 19 21:30:49 2017 +0000
Change Bar in BarView to store colour in color rather than fill_color
Nothing in the UI can change fill_color, so change it to color so
that the user can actually change it
---
src/bar-view.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/bar-view.cpp b/src/bar-view.cpp
index 6465a06..f24b2e4 100644
--- a/src/bar-view.cpp
+++ b/src/bar-view.cpp
@@ -235,11 +235,13 @@ void BarView::do_attach(Monitor *monitor)
XfceRc* settings_ro = xfce_rc_simple_open(file, true);
g_free(file);
- // Loading color
+ /* Loading color - note that all other visualisations use 'color' and not
+ * 'fill_color' - prior to this it was not possible to change the colour
+ * of a Bar, as no UI widgets set 'fill_color' */
xfce_rc_set_group(settings_ro, dir.c_str());
- if (xfce_rc_has_entry(settings_ro, "fill_color"))
+ if (xfce_rc_has_entry(settings_ro, "color"))
{
- fill_color = xfce_rc_read_int_entry(settings_ro, "fill_color",
+ fill_color = xfce_rc_read_int_entry(settings_ro, "color",
plugin->get_fg_color());
color_missing = false;
}
@@ -266,7 +268,7 @@ void BarView::do_attach(Monitor *monitor)
// Saving color
xfce_rc_set_group(settings_w, dir.c_str());
- xfce_rc_write_int_entry(settings_w, "fill_color", int(fill_color));
+ xfce_rc_write_int_entry(settings_w, "color", int(fill_color));
// Close settings file
xfce_rc_close(settings_w);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list