Ticket #1853 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Redunant code /jarabe/view/viewsource.py

Reported by: timclicks Owned by: timClicks
Priority: Low Milestone: 0.90
Component: sugar Version: Git as of bugdate
Severity: Trivial Keywords: r+
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Toolbarstop, a gtk.ToolButton, had its show() method called twice. Patch removes the first one, which is called before the stop has been inserted into the toolbar. Have manually tested.

Output of git format-patch:

From 5cd8085667d2d60cbf6a8f6d0987bd1458dc99df Mon Sep 17 00:00:00 2001
From: timClicks <paperless@timmcnamara.co.nz>
Date: Sun, 21 Mar 2010 12:39:15 +1300
Subject: [PATCH] Removed redundancy

Toolbarstop, a gtk.ToolButton, had its show() method called
twice. Removed the first one.
---
 src/jarabe/view/viewsource.py |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
index 9905713..290df18 100644
--- a/src/jarabe/view/viewsource.py
+++ b/src/jarabe/view/viewsource.py
@@ -309,7 +309,6 @@ class Toolbar(gtk.Toolbar):
         stop = ToolButton(icon_name='dialog-cancel')
         stop.set_tooltip(_('Close'))
         stop.connect('clicked', self.__stop_clicked_cb)
-        stop.show()
         self.insert(stop, -1)
         stop.show()
 
-- 
1.6.3.3

Change History

Changed 3 years ago by sascha_silbe

  • keywords r? added
  • owner changed from tomeu to timClicks
  • priority changed from Unspecified by Maintainer to Low
  • status changed from new to assigned
  • milestone changed from Unspecified by Release Team to 0.90

Tim, thanks for the patch!
Please see  Code Review for how to submit future patches. In particular, please attach the file instead of pasting it inline (because cut&paste converts whitespaces, so can break the patch) and set the "r?" keyword to make it enter the review "queue". I'm aware the current process is a bit cumbersome, especially for small patches; we're working on improving it.
The patch itself looks good to me.

Changed 3 years ago by tomeu

  • keywords r+ added; r? removed
  • status changed from assigned to closed
  • resolution set to fixed

Pushed, thanks!

Note: See TracTickets for help on using tickets.