Author: bugman Date: Tue Dec 28 20:54:58 2010 New Revision: 12001 URL: http://svn.gna.org/viewcvs/relax?rev=12001&view=rev Log: The draw_url() about window method now only performs a carriage return if asked. Modified: branches/bieri_gui/gui_bieri/about.py Modified: branches/bieri_gui/gui_bieri/about.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/about.py?rev=12001&r1=12000&r2=12001&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/about.py (original) +++ branches/bieri_gui/gui_bieri/about.py Tue Dec 28 20:54:58 2010 @@ -192,7 +192,7 @@ self.cursor_type = 'normal' - def draw_url(self, url_text=None, point_size=11, family=wx.FONTFAMILY_ROMAN): + def draw_url(self, url_text=None, point_size=11, family=wx.FONTFAMILY_ROMAN, carriage_ret=False): """Draw a URL as a hyperlink. @keyword url_text: The text of the url. @@ -214,10 +214,14 @@ # Draw the text, with a spacer. text = self.dc.DrawText(url_text, self.border + (self.dim_x - x)/2, self.offset()) - # Store the position of the text (and shift the offset down). + # Store the position of the text. self.url_pos.append(zeros((2, 2), int)) self.url_pos[-1][0] = [self.border + (self.dim_x - x)/2, self.border + (self.dim_x + x)/2] - self.url_pos[-1][1] = [self.offset(), self.offset(y)] + self.url_pos[-1][1] = [self.offset(), self.offset()+y] + + # Shift down. + if carriage_ret: + self.offset(y) # Store the URL. self.url_text.append(url_text) @@ -486,7 +490,7 @@ self.draw_description() self.draw_copyright() self.offset(10) - self.draw_url(url_text=self.info.website) + self.draw_url(url_text=self.info.website, carriage_ret=True) self.draw_icon() self.draw_desc_long() self.draw_licence()