Added title for filters #102

This commit is contained in:
2017-11-23 17:42:26 -06:00
parent 2d9124c336
commit 8836cb2bda
3 changed files with 16 additions and 2 deletions

View File

@@ -83,3 +83,6 @@ def suspended_user():
def delete_filter():
return wx.MessageDialog(None, _(u"Do you really want to delete this filter?"), _(u"Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
def existing_filter():
return wx.MessageDialog(None, _(u"This filter already exists. Please use a different title"), _(u"Error"), wx.OK).ShowModal()

View File

@@ -11,6 +11,15 @@ class filterDialog(baseDialog.BaseWXDialog):
panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetTitle(_(u"Create a filter for this buffer"))
label = wx.StaticText(panel, wx.NewId(), _(u"Filter title"))
self.title = wx.TextCtrl(panel, -1, value)
dc = wx.WindowDC(self.title)
dc.SetFont(self.title.GetFont())
self.title.SetSize(dc.GetTextExtent("0"*40))
tsizer = wx.BoxSizer(wx.HORIZONTAL)
tsizer.Add(label, 0, wx.ALL, 5)
tsizer.Add(self.title, 0, wx.ALL, 5)
sizer.Add(tsizer, 0, wx.ALL, 5)
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"))