mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Some small UI improvements for #102
This commit is contained in:
parent
519d096f29
commit
98cf02ee98
@ -10,23 +10,25 @@ class filterDialog(baseDialog.BaseWXDialog):
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.SetTitle(_(u"Create a filter for this buffer"))
|
||||
self.contains = wx.RadioButton(panel, -1, _(u"Contains"), style=wx.RB_GROUP)
|
||||
self.doesnt_contain = wx.RadioButton(panel, -1, _(u"Doesn't contain"))
|
||||
radioSizer1 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
staticbox = wx.StaticBox(panel, label=_(u"Filter by word"))
|
||||
self.contains = wx.RadioButton(panel, -1, _(u"Ignore tweets wich contain the following word"), style=wx.RB_GROUP)
|
||||
self.doesnt_contain = wx.RadioButton(panel, -1, _(u"Ignore tweets without the following word"))
|
||||
radioSizer1 = wx.StaticBoxSizer(staticbox, wx.HORIZONTAL)
|
||||
radioSizer1.Add(self.contains, 0, wx.ALL, 5)
|
||||
radioSizer1.Add(self.doesnt_contain, 0, wx.ALL, 5)
|
||||
sizer.Add(radioSizer1, 0, wx.ALL, 5)
|
||||
label = wx.StaticText(panel, -1, _(u"word"))
|
||||
self.term = wx.TextCtrl(panel, -1, value)
|
||||
dc = wx.WindowDC(self.contains)
|
||||
dc.SetFont(self.contains.GetFont())
|
||||
self.contains.SetSize(dc.GetTextExtent("0"*40))
|
||||
dc = wx.WindowDC(self.term)
|
||||
dc.SetFont(self.term.GetFont())
|
||||
self.term.SetSize(dc.GetTextExtent("0"*40))
|
||||
bsizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
bsizer.Add(label, 0, wx.ALL, 5)
|
||||
bsizer.Add(self.contains, 0, wx.ALL, 5)
|
||||
bsizer.Add(self.term, 0, wx.ALL, 5)
|
||||
sizer.Add(bsizer, 0, wx.ALL, 5)
|
||||
self.regexp = wx.CheckBox(panel, wx.NewId(), _(u"Use this term as a regular expression"))
|
||||
sizer.Add(self.regexp, 0, wx.ALL, 5)
|
||||
staticbox = wx.StaticBox(panel, label=_(u"Filter by language"))
|
||||
self.load_language = wx.RadioButton(panel, -1, _(u"Load tweets in the following languages"), style=wx.RB_GROUP)
|
||||
self.ignore_language = wx.RadioButton(panel, -1, _(u"Ignore tweets in the following languages"))
|
||||
self.skip_language_filtering = wx.RadioButton(panel, -1, _(u"Don't filter by language"))
|
||||
@ -34,7 +36,7 @@ class filterDialog(baseDialog.BaseWXDialog):
|
||||
widgetUtils.connect_event(self.load_language, widgetUtils.RADIOBUTTON, self.show_language_options)
|
||||
widgetUtils.connect_event(self.ignore_language, widgetUtils.RADIOBUTTON, self.show_language_options)
|
||||
widgetUtils.connect_event(self.skip_language_filtering, widgetUtils.RADIOBUTTON, self.hide_language_options)
|
||||
radioSizer2 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
radioSizer2 = wx.StaticBoxSizer(staticbox, wx.HORIZONTAL)
|
||||
radioSizer2.Add(self.load_language, 0, wx.ALL, 5)
|
||||
radioSizer2.Add(self.ignore_language, 0, wx.ALL, 5)
|
||||
radioSizer2.Add(self.skip_language_filtering, 0, wx.ALL, 5)
|
||||
|
Loading…
Reference in New Issue
Block a user