[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 55/96: Rename font_name variables/methods to reflect the fact its not just the name but includes the size

noreply at xfce.org noreply at xfce.org
Thu Nov 27 22:21:00 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 88573d20af213be555bf9081c344a996dfa9c900
Author: OmegaPhil <OmegaPhil at gmail.com>
Date:   Thu Jul 24 19:03:24 2014 +0100

    Rename font_name variables/methods to reflect the fact its not just the name but includes the size
---
 src/applet.cpp             |    4 ++--
 src/applet.hpp             |    2 +-
 src/preferences-window.cpp |   28 ++++++++++++++--------------
 src/preferences-window.hpp |    2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/applet.cpp b/src/applet.cpp
index d97587e..2348c3a 100644
--- a/src/applet.cpp
+++ b/src/applet.cpp
@@ -529,9 +529,9 @@ const Glib::ustring Applet::get_viewer_font()
   return viewer_font;
 }
 
-void Applet::set_viewer_font(const Glib::ustring font_name)
+void Applet::set_viewer_font(const Glib::ustring font_details)
 {
-  viewer_font = font_name;
+  viewer_font = font_details;
 }
 
 void Applet::add_monitor(Monitor *monitor)
diff --git a/src/applet.hpp b/src/applet.hpp
index ed1733f..8fe5207 100644
--- a/src/applet.hpp
+++ b/src/applet.hpp
@@ -69,7 +69,7 @@ public:
   int get_viewer_size() const;
   void set_viewer_size(const int size);
   const Glib::ustring get_viewer_font();
-  void set_viewer_font(const Glib::ustring font_name);
+  void set_viewer_font(const Glib::ustring font_details);
   void viewer_type_listener(const Glib::ustring viewer_type);
   void background_color_listener(unsigned int background_color);
   void use_background_color_listener(gboolean use_background_color);
diff --git a/src/preferences-window.cpp b/src/preferences-window.cpp
index 1aeb8a2..1aa453a 100644
--- a/src/preferences-window.cpp
+++ b/src/preferences-window.cpp
@@ -734,22 +734,22 @@ void PreferencesWindow::on_font_checkbutton_toggled()
   
   fontbutton->set_sensitive(active);
 
-  // Obtaining font_name to set
-  Glib::ustring font_name;
+  // Obtaining font_details to set
+  Glib::ustring font_details;
   if (active)
-    font_name = fontbutton->get_font_name();
+    font_details = fontbutton->get_font_name();
   else
-    font_name = "";
+    font_details = "";
 
   // Saving
-  save_font_name(font_name);
-  font_listener(font_name);
+  save_font_details(font_details);
+  font_listener(font_details);
 }
 
 void PreferencesWindow::on_fontbutton_set()
 {
   // Saving
-  save_font_name(fontbutton->get_font_name());
+  save_font_details(fontbutton->get_font_name());
 }
 
 void PreferencesWindow::on_add_button_clicked()
@@ -917,13 +917,13 @@ int PreferencesWindow::pixels_to_size_scale(int pixels)
   return min_i;
 }
 
-void PreferencesWindow::save_font_name(Glib::ustring font_name)
+void PreferencesWindow::save_font_details(Glib::ustring font_details)
 {
-  applet.set_viewer_font(font_name);
-  
+  applet.set_viewer_font(font_details);
+
   // Search for a writeable settings file, create one if it doesnt exist */
   gchar* file = xfce_panel_plugin_save_location(applet.panel_applet, true);
-    
+
   if (file)
   {
     // Opening setting file
@@ -934,7 +934,7 @@ void PreferencesWindow::save_font_name(Glib::ustring font_name)
     xfce_rc_set_group(settings, "[NULL]");
 
     // Updating configuration
-    xfce_rc_write_entry(settings, "viewer_font", font_name.c_str());
+    xfce_rc_write_entry(settings, "viewer_font", font_details.c_str());
 
     // Close settings file
     xfce_rc_close(settings);
@@ -943,6 +943,6 @@ void PreferencesWindow::save_font_name(Glib::ustring font_name)
   {
     // Unable to obtain writeable config file - informing user and exiting
     std::cerr << _("Unable to obtain writeable config file path in order to"
-      " save viewer font in save_font_name!\n");
-  }  
+      " save viewer font in save_font_details!\n");
+  }
 }
diff --git a/src/preferences-window.hpp b/src/preferences-window.hpp
index 3fba7be..18e5ab8 100644
--- a/src/preferences-window.hpp
+++ b/src/preferences-window.hpp
@@ -151,7 +151,7 @@ private:
     Glib::ustring setting_name, Gtk::ColorButton *button);
   void connect_monitor_colorbutton(Gtk::ColorButton *colorbutton);
 
-  void save_font_name(Glib::ustring font_name);
+  void save_font_details(Glib::ustring font_details);
   
   Applet &applet;
 };

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list