From 109635b8f4d468ea5a301de5967489ce12074647 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sun, 19 Apr 2015 19:23:31 -0400 Subject: [PATCH] More generalization. --- src/gtkUI/commonMessageDialogs.py | 6 +++--- src/gtkUI/view.py | 4 ++-- src/issueReporter/wx_ui.py | 2 +- src/sessionmanager/wxUI.py | 2 +- src/wxUI/commonMessageDialogs.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gtkUI/commonMessageDialogs.py b/src/gtkUI/commonMessageDialogs.py index 00dbd446..4d095900 100644 --- a/src/gtkUI/commonMessageDialogs.py +++ b/src/gtkUI/commonMessageDialogs.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from gi.repository import Gtk - +import application def retweet_question(parent): dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(u"Retweet")) dialog.format_secondary_text(_(u"Would you like to add a comment to this tweet?")) @@ -17,13 +17,13 @@ def delete_tweet_dialog(parent): def exit_dialog(parent): dialog = Gtk.MessageDialog(parent, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(u"Exit")) - dialog.format_secondary_text(_(u"Do you really want to close TW Blue?")) + dialog.format_secondary_text(_(u"Do you really want to close " + application.name + "?")) answer = dialog.run() dialog.destroy() return answer def needs_restart(): - wx.MessageDialog(None, _(u"The application requires to be restarted to save these changes. Press OK to do it now."), _("Restart TW Blue"), wx.OK).ShowModal() + wx.MessageDialog(None, _(unicode(application.name+" must be restarted to save these changes. Press OK to restart now.")), _("Restart " + application.name), wx.OK).ShowModal() def delete_user_from_db(): return wx.MessageDialog(None, _(u"Are you sure you want to delete this user from the database? This user will not appear on the autocomplete results anymore."), _(u"Confirm"), wx.YES_NO|wx.ICON_QUESTION).ShowModal() diff --git a/src/gtkUI/view.py b/src/gtkUI/view.py index 98a05c1c..4e53bc2a 100644 --- a/src/gtkUI/view.py +++ b/src/gtkUI/view.py @@ -110,7 +110,7 @@ class mainFrame(Gtk.Window): ### MAIN def __init__(self): """ Main function of this class.""" - super(mainFrame, self).__init__(title="TW Blue") + super(mainFrame, self).__init__(title=application.name) self.accel_group = Gtk.AccelGroup() self.add_accel_group(self.accel_group) self.box = Gtk.VBox() @@ -203,4 +203,4 @@ class mainFrame(Gtk.Window): getattr(self, menuitem).Check(check) def no_update_available(): - wx.MessageDialog(None, _(u"Your TW Blue version is up to date"), _(u"Update"), style=wx.OK).ShowModal() + wx.MessageDialog(None, _(u"Your " + application.name + " version is up to date"), _(u"Update"), style=wx.OK).ShowModal() diff --git a/src/issueReporter/wx_ui.py b/src/issueReporter/wx_ui.py index bc034ff9..551e643a 100644 --- a/src/issueReporter/wx_ui.py +++ b/src/issueReporter/wx_ui.py @@ -66,7 +66,7 @@ class reportBugDialog(widgetUtils.BaseDialog): severityB.Add(severityLabel, 0, wx.ALL, 5) severityB.Add(self.severity, 0, wx.ALL, 5) sizer.Add(severityB, 0, wx.ALL, 5) - self.agree = wx.CheckBox(panel, -1, _(u"I know that the TW Blue bug system will get my Twitter username to contact me and fix the bug quickly")) + self.agree = wx.CheckBox(panel, -1, _(u"I know that the " + application.name + " bug system will get my Twitter username to contact me and fix the bug quickly")) self.agree.SetValue(False) sizer.Add(self.agree, 0, wx.ALL, 5) self.ok = wx.Button(panel, wx.ID_OK, _(u"Send report")) diff --git a/src/sessionmanager/wxUI.py b/src/sessionmanager/wxUI.py index d6b6840a..7e8e54d5 100644 --- a/src/sessionmanager/wxUI.py +++ b/src/sessionmanager/wxUI.py @@ -7,7 +7,7 @@ class sessionManagerWindow(wx.Dialog): super(sessionManagerWindow, self).__init__(parent=None, title="Session manager", size=wx.DefaultSize) panel = wx.Panel(self) sizer = wx.BoxSizer(wx.VERTICAL) - label = wx.StaticText(panel, -1, u"Select a twitter account to start TW Blue", size=wx.DefaultSize) + label = wx.StaticText(panel, -1, u"Select a twitter account to start " + application.name, size=wx.DefaultSize) listSizer = wx.BoxSizer(wx.HORIZONTAL) self.list = widgets.list(panel, u"Account", style=wx.LC_SINGLE_SEL|wx.LC_REPORT) listSizer.Add(label, 0, wx.ALL, 5) diff --git a/src/wxUI/commonMessageDialogs.py b/src/wxUI/commonMessageDialogs.py index 5f93e949..81132ab2 100644 --- a/src/wxUI/commonMessageDialogs.py +++ b/src/wxUI/commonMessageDialogs.py @@ -8,7 +8,7 @@ def delete_tweet_dialog(parent): return wx.MessageDialog(parent, _(u"Do you really want to delete this message? It will be eliminated from Twitter as well."), _(u"Delete"), wx.ICON_QUESTION|wx.YES_NO).ShowModal() def exit_dialog(parent): - dlg = wx.MessageDialog(parent, _(u"Do you really want to close TW Blue?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION) + dlg = wx.MessageDialog(parent, _(u"Do you really want to close " + application.name + "?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION) return dlg.ShowModal() def needs_restart():