From 74eb0b9a9a685a32be21db30f097a22ddf3ec4cf Mon Sep 17 00:00:00 2001
From: Tim O'Shea <tim.oshea753@gmail.com>
Date: Mon, 8 Jul 2013 10:29:19 -0400
Subject: grc: Fix whitespace issue in grc to use proper spaces

Remove all \t's to match the rest of GNU Radio
---
 grc/gui/Utils.py | 154 +++++++++++++++++++++++++++----------------------------
 1 file changed, 77 insertions(+), 77 deletions(-)

(limited to 'grc/gui/Utils.py')

diff --git a/grc/gui/Utils.py b/grc/gui/Utils.py
index 407c875a87..cc1f8ceb12 100644
--- a/grc/gui/Utils.py
+++ b/grc/gui/Utils.py
@@ -25,86 +25,86 @@ import gtk
 import gobject
 
 def rotate_pixmap(gc, src_pixmap, dst_pixmap, angle=gtk.gdk.PIXBUF_ROTATE_COUNTERCLOCKWISE):
-	"""
-	Load the destination pixmap with a rotated version of the source pixmap.
-	The source pixmap will be loaded into a pixbuf, rotated, and drawn to the destination pixmap.
-	The pixbuf is a client-side drawable, where a pixmap is a server-side drawable.
-	
-	Args:
-	    gc: the graphics context
-	    src_pixmap: the source pixmap
-	    dst_pixmap: the destination pixmap
-	    angle: the angle to rotate by
-	"""
-	width, height = src_pixmap.get_size()
-	pixbuf = gtk.gdk.Pixbuf(
-		colorspace=gtk.gdk.COLORSPACE_RGB,
-		has_alpha=False, bits_per_sample=8,
-		width=width, height=height,
-	)
-	pixbuf.get_from_drawable(src_pixmap, src_pixmap.get_colormap(), 0, 0, 0, 0, -1, -1)
-	pixbuf = pixbuf.rotate_simple(angle)
-	dst_pixmap.draw_pixbuf(gc, pixbuf, 0, 0, 0, 0)
+    """
+    Load the destination pixmap with a rotated version of the source pixmap.
+    The source pixmap will be loaded into a pixbuf, rotated, and drawn to the destination pixmap.
+    The pixbuf is a client-side drawable, where a pixmap is a server-side drawable.
+    
+    Args:
+        gc: the graphics context
+        src_pixmap: the source pixmap
+        dst_pixmap: the destination pixmap
+        angle: the angle to rotate by
+    """
+    width, height = src_pixmap.get_size()
+    pixbuf = gtk.gdk.Pixbuf(
+        colorspace=gtk.gdk.COLORSPACE_RGB,
+        has_alpha=False, bits_per_sample=8,
+        width=width, height=height,
+    )
+    pixbuf.get_from_drawable(src_pixmap, src_pixmap.get_colormap(), 0, 0, 0, 0, -1, -1)
+    pixbuf = pixbuf.rotate_simple(angle)
+    dst_pixmap.draw_pixbuf(gc, pixbuf, 0, 0, 0, 0)
 
 def get_rotated_coordinate(coor, rotation):
-	"""
-	Rotate the coordinate by the given rotation.
-	
-	Args:
-	    coor: the coordinate x, y tuple
-	    rotation: the angle in degrees
-	
-	Returns:
-	    the rotated coordinates
-	"""
-	#handles negative angles
-	rotation = (rotation + 360)%360
-	if rotation not in POSSIBLE_ROTATIONS:
-		raise ValueError('unusable rotation angle "%s"'%str(rotation))
-	#determine the number of degrees to rotate
-	cos_r, sin_r = {
-		0: (1, 0),
-		90: (0, 1),
-		180: (-1, 0),
-		270: (0, -1),
-	}[rotation]
-	x, y = coor
-	return (x*cos_r + y*sin_r, -x*sin_r + y*cos_r)
+    """
+    Rotate the coordinate by the given rotation.
+    
+    Args:
+        coor: the coordinate x, y tuple
+        rotation: the angle in degrees
+    
+    Returns:
+        the rotated coordinates
+    """
+    #handles negative angles
+    rotation = (rotation + 360)%360
+    if rotation not in POSSIBLE_ROTATIONS:
+        raise ValueError('unusable rotation angle "%s"'%str(rotation))
+    #determine the number of degrees to rotate
+    cos_r, sin_r = {
+        0: (1, 0),
+        90: (0, 1),
+        180: (-1, 0),
+        270: (0, -1),
+    }[rotation]
+    x, y = coor
+    return (x*cos_r + y*sin_r, -x*sin_r + y*cos_r)
 
 def get_angle_from_coordinates((x1,y1), (x2,y2)):
-	"""
-	Given two points, calculate the vector direction from point1 to point2, directions are multiples of 90 degrees.
-	
-	Args:
-	    (x1,y1): the coordinate of point 1
-	    (x2,y2): the coordinate of point 2
-	
-	Returns:
-	    the direction in degrees
-	"""
-	if y1 == y2:#0 or 180
-		if x2 > x1: return 0
-		else: return 180
-	else:#90 or 270
-		if y2 > y1: return 270
-		else: return 90
+    """
+    Given two points, calculate the vector direction from point1 to point2, directions are multiples of 90 degrees.
+    
+    Args:
+        (x1,y1): the coordinate of point 1
+        (x2,y2): the coordinate of point 2
+    
+    Returns:
+        the direction in degrees
+    """
+    if y1 == y2:#0 or 180
+        if x2 > x1: return 0
+        else: return 180
+    else:#90 or 270
+        if y2 > y1: return 270
+        else: return 90
 
 def parse_template(tmpl_str, **kwargs):
-	"""
-	Parse the template string with the given args.
-	Pass in the xml encode method for pango escape chars.
-	
-	Args:
-	    tmpl_str: the template as a string
-	
-	Returns:
-	    a string of the parsed template
-	"""
-	kwargs['encode'] = gobject.markup_escape_text
-	#try:
-	#	cat = str(Template(tmpl_str, kwargs))
-	#except TypeError:
-	#	print 'guppy'
-	#	print tmpl_str
-	#	print str(kwargs['param'].get_error_messages())
-	return str(Template(tmpl_str, kwargs))
+    """
+    Parse the template string with the given args.
+    Pass in the xml encode method for pango escape chars.
+    
+    Args:
+        tmpl_str: the template as a string
+    
+    Returns:
+        a string of the parsed template
+    """
+    kwargs['encode'] = gobject.markup_escape_text
+    #try:
+    #   cat = str(Template(tmpl_str, kwargs))
+    #except TypeError:
+    #   print 'guppy'
+    #   print tmpl_str
+    #   print str(kwargs['param'].get_error_messages())
+    return str(Template(tmpl_str, kwargs))
-- 
cgit v1.2.3