mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-05-13 21:37:38 +02:00
Plantillas
This commit is contained in:
@@ -15,6 +15,15 @@ class AccountSettingsDialog(wx.Dialog):
|
||||
self.ask_before_boost.SetValue(bool(ask_before_boost))
|
||||
sizer.Add(self.ask_before_boost, 0, wx.ALL, 8)
|
||||
|
||||
templates_box = wx.StaticBoxSizer(wx.StaticBox(panel, wx.ID_ANY, _("Templates")), wx.VERTICAL)
|
||||
self.template_post = wx.Button(panel, wx.ID_ANY, _("Edit template for posts"))
|
||||
self.template_person = wx.Button(panel, wx.ID_ANY, _("Edit template for persons"))
|
||||
self.template_notification = wx.Button(panel, wx.ID_ANY, _("Edit template for notifications"))
|
||||
templates_box.Add(self.template_post, 0, wx.ALL, 4)
|
||||
templates_box.Add(self.template_person, 0, wx.ALL, 4)
|
||||
templates_box.Add(self.template_notification, 0, wx.ALL, 4)
|
||||
sizer.Add(templates_box, 0, wx.EXPAND | wx.ALL, 8)
|
||||
|
||||
# Buttons
|
||||
btn_sizer = self.CreateSeparatedButtonSizer(wx.OK | wx.CANCEL)
|
||||
|
||||
@@ -31,3 +40,8 @@ class AccountSettingsDialog(wx.Dialog):
|
||||
"ask_before_boost": self.ask_before_boost.GetValue(),
|
||||
}
|
||||
|
||||
def set_template_labels(self, post_template, person_template, notification_template):
|
||||
self.template_post.SetLabel(_("Edit template for posts. Current template: {}").format(post_template))
|
||||
self.template_person.SetLabel(_("Edit template for persons. Current template: {}").format(person_template))
|
||||
self.template_notification.SetLabel(_("Edit template for notifications. Current template: {}").format(notification_template))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user