Port socializer to Python 3. #16
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import widgetUtils
|
||||
import wx
|
||||
|
||||
@@ -7,17 +8,17 @@ class searchAudioDialog(widgetUtils.BaseDialog):
|
||||
super(searchAudioDialog, self).__init__(None, -1)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.SetTitle(_(u"audio Search"))
|
||||
label = wx.StaticText(panel, -1, _(u"&Search"))
|
||||
self.SetTitle(_("audio Search"))
|
||||
label = wx.StaticText(panel, -1, _("&Search"))
|
||||
self.term = wx.TextCtrl(panel, -1, value)
|
||||
dc = wx.WindowDC(self.term)
|
||||
dc.SetFont(self.term.GetFont())
|
||||
self.term.SetSize(dc.GetTextExtent("0"*40))
|
||||
sizer.Add(label, 0, wx.ALL, 5)
|
||||
sizer.Add(self.term, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
@@ -30,29 +31,29 @@ class searchVideoDialog(widgetUtils.BaseDialog):
|
||||
super(searchVideoDialog, self).__init__(None, -1)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.SetTitle(_(u"video Search"))
|
||||
label = wx.StaticText(panel, -1, _(u"&Search"))
|
||||
self.SetTitle(_("video Search"))
|
||||
label = wx.StaticText(panel, -1, _("&Search"))
|
||||
self.term = wx.TextCtrl(panel, -1, value)
|
||||
dc = wx.WindowDC(self.term)
|
||||
dc.SetFont(self.term.GetFont())
|
||||
self.term.SetSize(dc.GetTextExtent("0"*40))
|
||||
sizer.Add(label, 0, wx.ALL, 5)
|
||||
sizer.Add(self.term, 0, wx.ALL, 5)
|
||||
sort_order = wx.StaticText(panel, -1, _(U"&Sort order by: "))
|
||||
self.sortorder = wx.ComboBox(panel, wx.NewId(), choices=[_(u"Date added"), _(u"Duration"), _(u"Popularity")], value=_(u"Popularity"), style=wx.CB_READONLY)
|
||||
sort_order = wx.StaticText(panel, -1, _("&Sort order by: "))
|
||||
self.sortorder = wx.ComboBox(panel, wx.NewId(), choices=[_("Date added"), _("Duration"), _("Popularity")], value=_("Popularity"), style=wx.CB_READONLY)
|
||||
rBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
rBox.Add(sort_order, 0, wx.ALL, 5)
|
||||
rBox.Add(self.sortorder, 0, wx.ALL, 5)
|
||||
sizer.Add(rBox, 0, wx.ALL, 5)
|
||||
self.hd = wx.CheckBox(panel, wx.NewId(), _(u"Search only for videos in &High definition"))
|
||||
self.hd = wx.CheckBox(panel, wx.NewId(), _("Search only for videos in &High definition"))
|
||||
self.hd.SetValue(False)
|
||||
sizer.Add(self.hd, 0, wx.ALL, 5)
|
||||
self.safe_search = wx.CheckBox(panel, wx.NewId(), _(u"S&afe search"))
|
||||
self.safe_search = wx.CheckBox(panel, wx.NewId(), _("S&afe search"))
|
||||
self.safe_search.SetValue(True)
|
||||
sizer.Add(self.safe_search, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
|
Reference in New Issue
Block a user