[tor-commits] [nyx/master] Drop unused Panel methods

atagar at torproject.org atagar at torproject.org
Mon Feb 15 14:45:09 UTC 2016


commit ea87cf573b3a36f38a291ccd4157a1d7c43a78ed
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Feb 14 16:06:06 2016 -0800

    Drop unused Panel methods
    
    The get_left() and set_left() are just there to match the related methods for
    the top and bottom (... which are unused outside the Panel too). These too are
    completely unused so easy to pluck out.
    
    Dropping a couple other unused methods too.
---
 nyx/util/panel.py | 36 +-----------------------------------
 1 file changed, 1 insertion(+), 35 deletions(-)

diff --git a/nyx/util/panel.py b/nyx/util/panel.py
index 283a16a..4a94133 100644
--- a/nyx/util/panel.py
+++ b/nyx/util/panel.py
@@ -209,13 +209,6 @@ class Panel(object):
 
     return self.parent
 
-  def is_visible(self):
-    """
-    Provides if the panel's configured to be visible or not.
-    """
-
-    return self.visible
-
   def set_visible(self, is_visible):
     """
     Toggles if the panel is visible or not.
@@ -325,13 +318,6 @@ class Panel(object):
 
     return self.pause_time
 
-  def get_top(self):
-    """
-    Provides the position subwindows are placed at within its parent.
-    """
-
-    return self.top
-
   def set_top(self, top):
     """
     Changes the position where subwindows are placed within its parent.
@@ -344,26 +330,6 @@ class Panel(object):
       self.top = top
       self.win = None
 
-  def get_left(self):
-    """
-    Provides the left position where this subwindow is placed within its
-    parent.
-    """
-
-    return self.left
-
-  def set_left(self, left):
-    """
-    Changes the left position where this subwindow is placed within its parent.
-
-    Arguments:
-      left - positioning of top within parent
-    """
-
-    if self.left != left:
-      self.left = left
-      self.win = None
-
   def get_height(self):
     """
     Provides the height used for subwindows (-1 if it isn't limited).
@@ -467,7 +433,7 @@ class Panel(object):
 
     # skipped if not currently visible or activity has been halted
 
-    if not self.is_visible() or HALT_ACTIVITY:
+    if not self.visible or HALT_ACTIVITY:
       return
 
     # if the panel's completely outside its parent then this is a no-op



More information about the tor-commits mailing list