From patchwork Tue Jan 31 14:51:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Tunnicliffe X-Patchwork-Id: 6473 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2BF2423E16 for ; Tue, 31 Jan 2012 14:51:15 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id F2405A187B4 for ; Tue, 31 Jan 2012 14:51:14 +0000 (UTC) Received: by bkar19 with SMTP id r19so40516bka.11 for ; Tue, 31 Jan 2012 06:51:14 -0800 (PST) Received: by 10.205.121.2 with SMTP id ga2mr10655137bkc.38.1328021474582; Tue, 31 Jan 2012 06:51:14 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.204.130.220 with SMTP id u28cs183676bks; Tue, 31 Jan 2012 06:51:14 -0800 (PST) Received: by 10.180.24.202 with SMTP id w10mr3551730wif.9.1328021474235; Tue, 31 Jan 2012 06:51:14 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id y19si15309147weq.65.2012.01.31.06.51.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jan 2012 06:51:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RsF3B-0005RU-Vv for ; Tue, 31 Jan 2012 14:51:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id E6614E14B6 for ; Tue, 31 Jan 2012 14:51:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-image-tools/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 488 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 488: Fixed UI bug lp:832327 Message-Id: <20120131145113.4887.42013.launchpad@ackee.canonical.com> Date: Tue, 31 Jan 2012 14:51:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14734"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 658c166c6508242cbde2d3330a9fe64a2bcd2488 Merge authors: James Tunnicliffe (dooferlad) Related merge proposals: https://code.launchpad.net/~dooferlad/linaro-image-tools/fetch_image_gui_fix_bug_832327/+merge/85495 proposed by: James Tunnicliffe (dooferlad) review: Approve - Paul Sokolovsky (pfalcon) ------------------------------------------------------------ revno: 488 [merge] committer: James Tunnicliffe branch nick: linaro-image-tools timestamp: Tue 2012-01-31 14:43:45 +0000 message: Fixed UI bug lp:832327 modified: linaro-fetch-image-ui --- lp:linaro-image-tools https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk You are subscribed to branch lp:linaro-image-tools. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription === modified file 'linaro-fetch-image-ui' --- linaro-fetch-image-ui 2011-09-06 20:59:09 +0000 +++ linaro-fetch-image-ui 2011-12-13 14:13:26 +0000 @@ -110,7 +110,7 @@ self.cp) self.make_pane_content(self.cp.GetPane()) self.box2 = wx.BoxSizer(wx.VERTICAL) - self.box2.Add(self.cp) + self.box2.Add(self.cp, 0) self.help_text_main = wx.StaticText(self, -1, "") @@ -118,6 +118,7 @@ self.sizer.Add(self.box1, 0, wx.ALIGN_LEFT | wx.ALL, 5) self.sizer.Add(self.box2, 0, wx.ALIGN_LEFT | wx.ALL, 5) self.sizer.Add(self.help_text_main, 0, wx.ALIGN_LEFT | wx.ALL, 5) + self.cp.SetSizer(self.sizer) self.SetSizerAndFit(self.sizer) self.sizer.Fit(self) self.Move((50, 50)) @@ -132,6 +133,7 @@ self.adv_box.Add(header) self.grid1 = wx.FlexGridSizer(0, 2, 0, 0) self.grid2 = wx.FlexGridSizer(0, 2, 0, 0) + self.grid3 = wx.FlexGridSizer(0, 1, 0, 0) platforms = [] for key, value in self.settings['choice']['platform'].items(): @@ -167,21 +169,32 @@ self.adv_box.Add(self.grid1, 0, alignment, 0) self.adv_box.Add(self.grid2, 0, alignment, 0) + self.adv_box.Add(self.grid3, 0, alignment, 0) self.update_visibility() self.adv_box.Add(self.help_text, 0, alignment, 5) pane.SetSizer(self.adv_box) self.adv_box.Fit(pane) + # The following line is here because when the pane is shown and grid2 + # is not visible and an option is then selected to make it visible, + # the pane does not (and seemingly can not) resize to accommodate + # the contents of grid2. This results in some content staying + # invisible until the pane is hidden and shown again. This blank bit + # of text is just there to bulk up the size of the pane so work around + # this. Padding is the size of grid2 / 2 (padding is applied all around + # the StaticText). + + self.grid3.Add(wx.StaticText(pane, -1, ""), 0, align_text, + self.grid2.GetSize().height/2) + self.adv_box.Fit(pane) + def update_visibility(self): if self.settings['release_or_snapshot'] == "snapshot": self.adv_box.Hide(self.grid2, True) else: self.adv_box.Show(self.grid2, True) - self.Fit() - self.Layout() - def update_next_active(self): if self.build_available and self.os_selected: self.wizard.FindWindowById(wx.ID_FORWARD).Enable() @@ -460,9 +473,7 @@ else: self.settings['release_or_snapshot'] = "snapshot" - self.update_release_and_build_boxes() - self.update_visibility() - self.update_next_active() + self.event_on_pane_changed(event) def event_on_pane_changed(self, event): self.fill_os_list()