The following commit has been merged in the master branch: commit d94988be2956049262fcf8dd06118d9a60ec218e Author: M. Hamish Bowman <hamis...@yahoo.com> Date: Mon Aug 5 08:25:31 2013 +1200
add patch for 6.4.3 barscale set options traceback #2054 (deactivated until 6.4.3 is master), note previous hardening flags partial-enable in changelog diff --git a/debian/changelog b/debian/changelog index de5ea0d..1a83be0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,9 @@ grass (6.4.2-3) unstable; urgency=low * Enable GEOS support * Build-Depends on libmotif-dev for Motif transition. (closes: #714679) + * Partial enable of the hardening flags - -- M. Hamish Bowman <hamis...@yahoo.com> Sun, 14 Jul 2013 10:18:40 +1200 + -- M. Hamish Bowman <hamis...@yahoo.com> Mon, 05 Aug 2013 08:22:19 +1200 grass (6.4.2-2) unstable; urgency=low diff --git a/debian/patches/barscale_ui b/debian/patches/barscale_ui new file mode 100644 index 0000000..9e33dd6 --- /dev/null +++ b/debian/patches/barscale_ui @@ -0,0 +1,99 @@ +Index: grass/branches/releasebranch_6_4/gui/wxpython/gui_core/forms.py +=================================================================== +--- grass.orig/gui/wxpython/gui_core/forms.py ++++ grass/gui/wxpython/gui_core/forms.py +@@ -1256,49 +1256,47 @@ + default_color, label_color = color_resolve(p['value']) + if p.get('prompt', '') == 'color_none' or p.get('multiple', False): + this_sizer = wx.BoxSizer(orient = wx.HORIZONTAL) + else: + this_sizer = which_sizer + colorSize = 150 + # For color selectors, this is a three-member array, holding the IDs of +- # the text control for multiple colors (or None), +- # the selector proper and either a "transparent" checkbox or None ++ # the color picker, the text control for multiple colors (or None), ++ # and either a "transparent" checkbox or None ++ p['wxId'] = [None] * 3 + if p.get('multiple', False): + txt = wx.TextCtrl(parent = which_panel, id = wx.ID_ANY) + this_sizer.Add(item = txt, proportion = 1, + flag = wx.ADJUST_MINSIZE | wx.LEFT | wx.TOP, border = 5) + txt.Bind(wx.EVT_TEXT, self.OnSetValue) + colorSize = 40 + label_color = '' +- p['wxId'] = [txt.GetId(),] ++ p['wxId'][1] = txt.GetId() + which_sizer.Add(this_sizer, flag = wx.EXPAND | wx.RIGHT, border = 5) +- else: +- p['wxId'] = [None,] + + btn_colour = csel.ColourSelect(parent = which_panel, id = wx.ID_ANY, + label = label_color, colour = default_color, + pos = wx.DefaultPosition, size = (colorSize,-1)) + this_sizer.Add(item = btn_colour, proportion = 0, + flag = wx.ADJUST_MINSIZE | wx.BOTTOM | wx.LEFT, border = 5) + btn_colour.Bind(csel.EVT_COLOURSELECT, self.OnColorChange) +- p['wxId'].append(btn_colour.GetId()) ++ p['wxId'][0] = btn_colour.GetId() + + if p.get('prompt', '') == 'color_none': + none_check = wx.CheckBox(which_panel, wx.ID_ANY, _("Transparent")) + if p.get('value','') != '' and p.get('value',[''])[0] == "none": + none_check.SetValue(True) + else: + none_check.SetValue(False) + this_sizer.Add(item = none_check, proportion = 0, + flag = wx.ADJUST_MINSIZE | wx.LEFT | wx.RIGHT | wx.TOP, border = 5) + which_sizer.Add(this_sizer) + none_check.Bind(wx.EVT_CHECKBOX, self.OnColorChange) +- p['wxId'].append(none_check.GetId()) +- else: +- p['wxId'].append(None) ++ p['wxId'][2] = none_check.GetId() ++ + # file selector + elif p.get('prompt','') != 'color' and p.get('element', '') == 'file': + if p.get('age', 'new_file') == 'new_file': + fmode = wx.SAVE + else: + fmode = wx.OPEN + fbb = filebrowse.FileBrowseButton(parent = which_panel, id = wx.ID_ANY, fileMask = '*', +@@ -1627,33 +1625,33 @@ + + self.Layout() + + def OnColorChange(self, event): + myId = event.GetId() + for p in self.task.params: + if 'wxId' in p and myId in p['wxId']: +- multiple = p['wxId'][0] is not None # multiple colors ++ multiple = p['wxId'][1] is not None # multiple colors + hasTransp = p['wxId'][2] is not None + if multiple: + # selected color is added at the end of textCtrl +- colorchooser = wx.FindWindowById(p['wxId'][1]) ++ colorchooser = wx.FindWindowById(p['wxId'][0]) + new_color = colorchooser.GetValue()[:] + new_label = rgb2str.get(new_color, ':'.join(map(str, new_color))) +- textCtrl = wx.FindWindowById(p['wxId'][0]) ++ textCtrl = wx.FindWindowById(p['wxId'][1]) + val = textCtrl.GetValue() + sep = ',' + if val and val[-1] != sep: + val += sep + val += new_label + textCtrl.SetValue(val) + p[ 'value' ] = val + elif hasTransp and wx.FindWindowById(p['wxId'][2]).GetValue(): + p[ 'value' ] = 'none' + else: +- colorchooser = wx.FindWindowById(p['wxId'][1]) ++ colorchooser = wx.FindWindowById(p['wxId'][0]) + new_color = colorchooser.GetValue()[:] + # This is weird: new_color is a 4-tuple and new_color[:] is a 3-tuple + # under wx2.8.1 + new_label = rgb2str.get(new_color, ':'.join(map(str,new_color))) + colorchooser.SetLabel(new_label) + colorchooser.SetColour(new_color) + colorchooser.Refresh() -- Geographic Resources Analysis Support System _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel