Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-10-23 10:36:54 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-10-23 10:36:54 (GMT)
commit3899a65add294908df01b96cdb2c042e58227cec (patch)
tree0b743dcbd13d09dbe21245c3e4323aa8cdd4c78e
parent633f1fb61b910e51073f34913202a249ec0d5c3c (diff)
remove unused hide captures
-rwxr-xr-xactivity.py26
-rwxr-xr-xmain.py23
2 files changed, 7 insertions, 42 deletions
diff --git a/activity.py b/activity.py
index 9b6fdaf..40d850e 100755
--- a/activity.py
+++ b/activity.py
@@ -52,7 +52,6 @@ class Activity(activity.Activity):
self.colorC = (255, 255, 255)
self.show_size = (960.0, 720.0)
self.show_grid = False
- self.show_capture = True
self.calibrating = True
self.use_threshold_view = True
self.use_outline_view = True
@@ -291,21 +290,6 @@ class Activity(activity.Activity):
grid.connect('clicked', self.grid_click)
resolution_bar.insert(grid, -1)
- separador2 = gtk.SeparatorToolItem()
- separador2.props.draw = True
- resolution_bar.insert(separador2, -1)
-
- item6 = gtk.ToolItem()
- label6 = gtk.Label()
- label6.set_text(' ' + _('Show captures') + ' ')
- item6.add(label6)
- resolution_bar.insert(item6, -1)
-
- stop_show = ToolButton('media-playback-stop')
- stop_show.connect('clicked', self.stop_show)
- stop_show.set_tooltip(_('Hide'))
- resolution_bar.insert(stop_show, -1)
-
resolution_bar.show_all()
resolution_button = ToolbarButton(label=_('Resolution'),
page=resolution_bar,
@@ -538,16 +522,6 @@ class Activity(activity.Activity):
self.show_grid = not self.show_grid
self.followme_activity.put_grid(self.show_grid)
- def stop_show(self, button):
- self.show = not self.show
- if self.show:
- button.set_icon('media-playback-stop')
- button.set_tooltip(_('Hide'))
- else:
- button.set_icon('media-playback-start')
- button.set_tooltip(_('Show'))
- self.followme_activity.put_show(self.show)
-
class Combo(gtk.ComboBox):
diff --git a/main.py b/main.py
index 9efa5c4..c260a54 100755
--- a/main.py
+++ b/main.py
@@ -45,9 +45,7 @@ class Main:
self.calibrating = calibrating
if self.calibrating:
if (self.r != None and self.r.modules != []):
- self.r.butia.set2MotorSpeed('0', '0', '0', '0')
- if (self.show == False):
- self.c.limpiar()
+ self.r.stop_robot()
def put_threshold(self, threshold):
self.threshold = threshold
@@ -66,11 +64,6 @@ class Main:
def put_grid(self, grid):
self.c.show_grid = grid
- def put_show(self, show):
- self.show = show
- if (self.show == False):
- self.c.clean()
-
def put_color_mode(self, mode):
self.mode = mode
self.c.get_camera(self.mode)
@@ -94,7 +87,6 @@ class Main:
self.colorC = (255, 255, 255)
self.pixels = 10
self.show_size = (960, 720)
- self.show = True
self.mode = 'RGB'
self.c = FollowMe(self.parent)
if (self.c.cam == None):
@@ -119,13 +111,12 @@ class Main:
else:
mask, pos = self.c.get_position(self.colorC, self.threshold, self.pixels)
self.c.generate_capture_to_show()
- if self.show:
- self.c.show_centroid_position(pos)
- if self.c.use_outline_view:
- self.c.show_outline(mask)
- if self.c.use_rects_view:
- self.c.show_rects(mask)
- self.c.show_in_screen(self.colorC)
+ self.c.show_centroid_position(pos)
+ if self.c.use_outline_view:
+ self.c.show_outline(mask)
+ if self.c.use_rects_view:
+ self.c.show_rects(mask)
+ self.c.show_in_screen(self.colorC)
if (self.r != None and self.r.modules != []):
self.r.move_robot(pos)