[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 01/01: Fix Text View and text overlay font saving
noreply at xfce.org
noreply at xfce.org
Mon Jan 15 13:26:41 CET 2018
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 a7763c1e9c3f26c8aff3415ad53c9e91bde4165b
Author: OmegaPhil <OmegaPhil at startmail.com>
Date: Mon Jan 15 12:25:03 2018 +0000
Fix Text View and text overlay font saving
Fixes Text visualisation - Setting the font via button without ticking
'use this font' still applies font /
https://bugzilla.xfce.org/show_bug.cgi?id=14162 - font is now only
saved when it is turned on. This is straight forward but not perfect,
however why would a user want to save font configuration separate
from turning it on?
---
src/preferences-window.cpp | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/preferences-window.cpp b/src/preferences-window.cpp
index 08b90b6..9792120 100644
--- a/src/preferences-window.cpp
+++ b/src/preferences-window.cpp
@@ -419,8 +419,18 @@ void PreferencesWindow::font_listener(Gtk::CheckButton *checkbutton,
const Glib::ustring &viewer_font)
{
if (viewer_font.empty())
+ {
+ // Debug code
+ //std::cout << "PreferencesWindow::font_listener: Font is empty!" << std::endl;
+
checkbutton->set_active(false);
- else {
+ }
+ else
+ {
+ // Debug code
+ /*std::cout << "PreferencesWindow::font_listener: Font is not empty!"
+ << std::endl;*/
+
if (font_button->get_font_name() != viewer_font)
font_button->set_font_name(viewer_font);
@@ -853,8 +863,9 @@ void PreferencesWindow::on_font_checkbutton_toggled()
void PreferencesWindow::on_fontbutton_set()
{
- // Saving
- save_font_details(fontbutton->get_font_name());
+ // Saving, but only if 'use this font' is set
+ if (font_checkbutton->get_active())
+ save_font_details(fontbutton->get_font_name());
}
void PreferencesWindow::on_text_overlay_checkbutton_toggled()
@@ -905,8 +916,9 @@ void PreferencesWindow::on_text_overlay_font_checkbutton_toggled()
void PreferencesWindow::on_text_overlay_fontbutton_set()
{
- // Saving
- save_text_overlay_font_details(text_overlay_fontbutton->get_font_name());
+ // Saving, but only if 'use this font' is set
+ if (text_overlay_font_checkbutton->get_active())
+ save_text_overlay_font_details(text_overlay_fontbutton->get_font_name());
}
void PreferencesWindow::on_text_overlay_colorbutton_set()
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list