[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 29/29: Remove unused setter code

noreply at xfce.org noreply at xfce.org
Mon Dec 18 12:46:00 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 ee33421c8d22564bef933e0a4870c216b13d712b
Author: OmegaPhil <OmegaPhil at startmail.com>
Date:   Mon Dec 18 11:34:33 2017 +0000

    Remove unused setter code
---
 src/monitor-impls.cpp | 130 --------------------------------------------------
 src/monitor-impls.hpp |  26 ----------
 src/monitor.hpp       |   6 +--
 3 files changed, 3 insertions(+), 159 deletions(-)

diff --git a/src/monitor-impls.cpp b/src/monitor-impls.cpp
index 93b42b4..364b808 100644
--- a/src/monitor-impls.cpp
+++ b/src/monitor-impls.cpp
@@ -656,16 +656,6 @@ void CpuUsageMonitor::save(XfceRc *settings_w)
   xfce_rc_write_entry(settings_w, "tag", tag.c_str());
 }
 
-void CpuUsageMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void CpuUsageMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int CpuUsageMonitor::update_interval()
 {
   return update_interval_priv;
@@ -744,16 +734,6 @@ void SwapUsageMonitor::save(XfceRc *settings_w)
   xfce_rc_write_entry(settings_w, "tag", tag.c_str());
 }
 
-void SwapUsageMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void SwapUsageMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int SwapUsageMonitor::update_interval()
 {
   return update_interval_priv;
@@ -850,21 +830,6 @@ void LoadAverageMonitor::save(XfceRc *settings_w)
   xfce_rc_write_entry(settings_w, "tag", tag.c_str());
 }
 
-void LoadAverageMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void LoadAverageMonitor::set_max(double max)
-{
-  max_value = max;
-}
-
-void LoadAverageMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int LoadAverageMonitor::update_interval()
 {
   return update_interval_priv;
@@ -941,16 +906,6 @@ void MemoryUsageMonitor::save(XfceRc *settings_w)
   xfce_rc_write_entry(settings_w, "tag", tag.c_str());
 }
 
-void MemoryUsageMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void MemoryUsageMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int MemoryUsageMonitor::update_interval()
 {
   return update_interval_priv;
@@ -1054,16 +1009,6 @@ void DiskUsageMonitor::save(XfceRc *settings_w)
   xfce_rc_write_entry(settings_w, "tag", tag.c_str());
 }
 
-void DiskUsageMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void DiskUsageMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int DiskUsageMonitor::update_interval()
 {
   return update_interval_priv;
@@ -1387,21 +1332,6 @@ void DiskStatsMonitor::save(XfceRc *settings_w)
                          "ran - current max value: %1", max_value));*/
 }
 
-void DiskStatsMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void DiskStatsMonitor::set_max(double max)
-{
-  max_value = max;
-}
-
-void DiskStatsMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 Glib::ustring DiskStatsMonitor::stat_to_string(const DiskStatsMonitor::Stat &stat,
                                                const bool short_ver)
 {
@@ -2106,26 +2036,11 @@ void NetworkLoadMonitor::save_interfaces(XfceRc *settings_w)
                       interface_type_names[wireless_third].c_str());
 }
 
-void NetworkLoadMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
 void NetworkLoadMonitor::set_interface_name(InterfaceType type, const Glib::ustring interface_name)
 {
   interface_type_names[type] = interface_name;
 }
 
-void NetworkLoadMonitor::set_max(double max)
-{
-  max_value = max;
-}
-
-void NetworkLoadMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int NetworkLoadMonitor::update_interval()
 {
   return update_interval_priv;
@@ -2342,21 +2257,6 @@ void TemperatureMonitor::save(XfceRc *settings_w)
   xfce_rc_write_entry(settings_w, "tag", tag.c_str());
 }
 
-void TemperatureMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void TemperatureMonitor::set_max(double max)
-{
-  max_value = max;
-}
-
-void TemperatureMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int TemperatureMonitor::update_interval()
 {
   return update_interval_priv;
@@ -2428,16 +2328,6 @@ double FanSpeedMonitor::max()
   return max_value;
 }
 
-void FanSpeedMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void FanSpeedMonitor::set_max(double max)
-{
-  max_value = max;
-}
-
 void FanSpeedMonitor::save(XfceRc *settings_w)
 {
     // Fetching assigned settings group
@@ -2464,11 +2354,6 @@ void FanSpeedMonitor::save(XfceRc *settings_w)
   xfce_rc_write_entry(settings_w, "tag", tag.c_str());
 }
 
-void FanSpeedMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int FanSpeedMonitor::update_interval()
 {
   return update_interval_priv;
@@ -2704,21 +2589,6 @@ void GenericMonitor::save(XfceRc *settings_w)
   xfce_rc_write_entry(settings_w, "tag", tag.c_str());
 }
 
-void GenericMonitor::set_fixed_max(bool fixed_max)
-{
-  fixed_max_priv = fixed_max;
-}
-
-void GenericMonitor::set_max(double max)
-{
-  max_value = max;
-}
-
-void GenericMonitor::set_update_interval(int interval)
-{
-  update_interval_priv = interval;
-}
-
 int GenericMonitor::update_interval()
 {
   return update_interval_priv;
diff --git a/src/monitor-impls.hpp b/src/monitor-impls.hpp
index 7cec4c9..f7b1e5d 100644
--- a/src/monitor-impls.hpp
+++ b/src/monitor-impls.hpp
@@ -64,8 +64,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_update_interval(int interval);
 
   virtual int update_interval();
 
@@ -105,8 +103,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
@@ -134,9 +130,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_max(double max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
@@ -167,8 +160,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
@@ -197,8 +188,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();  // Fixed at size of the relevant volume
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
@@ -247,9 +236,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_max(double max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
@@ -334,9 +320,6 @@ public:
   */
 
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_max(double max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
@@ -414,9 +397,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_max(double max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
@@ -448,9 +428,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_max(double max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
@@ -498,9 +475,6 @@ public:
   virtual Glib::ustring get_short_name();
   virtual double max();
   virtual void save(XfceRc *settings_w);
-  virtual void set_fixed_max(bool fixed_max);
-  virtual void set_max(double max);
-  virtual void set_update_interval(int interval);
   virtual int update_interval();
 
   /* The default interval between updates in milliseconds, for the monitor type
diff --git a/src/monitor.hpp b/src/monitor.hpp
index f7b1746..07a782c 100644
--- a/src/monitor.hpp
+++ b/src/monitor.hpp
@@ -35,6 +35,9 @@ extern "C"
  * before the Plugin class is declared */
 class Plugin;
 
+/* Before thinking about adding more setters, remember that monitors aren't
+ * reconfigured after instantiation but replaced - so there is no need for the
+ * ability to change things in place on monitor instances */
 class Monitor: noncopyable
 {
 public:
@@ -100,9 +103,6 @@ public:
   // Save information about the monitor
   virtual void save(XfceRc *settings_w) = 0;
 
-  virtual void set_fixed_max(bool fixed_max) = 0;
-  virtual void set_update_interval(int interval) = 0;
-
   /* If other is watching the same thing as this monitor, it might be
    * a good idea to sync maxima with it */
   virtual void possibly_add_sync_with(Monitor *other)

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


More information about the Xfce4-commits mailing list