[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 57/96: Fix overwriting saved text viewer font and size when preferences dialog is shown
noreply at xfce.org
noreply at xfce.org
Thu Nov 27 22:21:02 CET 2014
This is an automated email from the git hooks/post-receive script.
nick pushed a commit to branch master
in repository panel-plugins/xfce4-hardware-monitor-plugin.
commit 2a9abb59d326bc430112b2ab42cf5cb1ece864cf
Author: OmegaPhil <OmegaPhil at gmail.com>
Date: Thu Jul 24 19:04:21 2014 +0100
Fix overwriting saved text viewer font and size when preferences dialog is shown
When preferences dialog is shown, any saved text viewer font details
were overwritten with the default font and size - this bug was present
in the original code
Fixes #6 / https://github.com/OmegaPhil/hardware-monitor-applet/issues/6
---
src/preferences-window.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/preferences-window.cpp b/src/preferences-window.cpp
index 34f0b07..fbe199c 100644
--- a/src/preferences-window.cpp
+++ b/src/preferences-window.cpp
@@ -329,9 +329,13 @@ void PreferencesWindow::font_listener(const Glib::ustring viewer_font)
if (viewer_font.empty())
font_checkbutton->set_active(false);
else {
- font_checkbutton->set_active(true);
if (fontbutton->get_font_name() != viewer_font)
fontbutton->set_font_name(viewer_font);
+
+ /* Must toggle this after setting the font name, otherwise
+ * on_font_checkbutton_toggled triggers and overwrites the saved
+ * font details with the default ones */
+ font_checkbutton->set_active(true);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list