|
@@ -173,7 +173,7 @@ class Main(frame.MainFrame):
|
|
self.m_text_log.AppendText(message)
|
|
self.m_text_log.AppendText(message)
|
|
self.m_text_log.ShowPosition(self.m_text_log.GetLastPosition())
|
|
self.m_text_log.ShowPosition(self.m_text_log.GetLastPosition())
|
|
|
|
|
|
- def upgrade_call_after(self, is_new_version, show_no_new_version_tip, title=None, message=None):
|
|
|
|
|
|
+ def upgrade_call_after(self, is_new_version, show_no_new_version_tip, message=None):
|
|
"""
|
|
"""
|
|
接收更新程序线程传递消息,弹窗提示框
|
|
接收更新程序线程传递消息,弹窗提示框
|
|
|
|
|
|
@@ -181,23 +181,20 @@ class Main(frame.MainFrame):
|
|
self (object): 当前对象
|
|
self (object): 当前对象
|
|
is_new_version (bool): 是否是新版本
|
|
is_new_version (bool): 是否是新版本
|
|
show_no_new_version_tip (bool): 是否显示提示
|
|
show_no_new_version_tip (bool): 是否显示提示
|
|
- title (str): 标题
|
|
|
|
message (str): 消息
|
|
message (str): 消息
|
|
"""
|
|
"""
|
|
|
|
+ logger.info('\n%s' % message)
|
|
if is_new_version:
|
|
if is_new_version:
|
|
- logger.info('检查更新结果:发现新的版本-{}', title)
|
|
|
|
dlg = wx.GenericMessageDialog(
|
|
dlg = wx.GenericMessageDialog(
|
|
- self, '新版本:%s\n\n更新日志:\n%s' %
|
|
|
|
- (title, message), '版本更新提醒', wx.OK | wx.CANCEL)
|
|
|
|
|
|
+ self, message, '版本更新提醒', wx.OK | wx.CANCEL)
|
|
dlg.SetOKCancelLabels('前往升级', '忽略更新')
|
|
dlg.SetOKCancelLabels('前往升级', '忽略更新')
|
|
if dlg.ShowModal() == wx.ID_OK:
|
|
if dlg.ShowModal() == wx.ID_OK:
|
|
wx.LaunchDefaultBrowser(
|
|
wx.LaunchDefaultBrowser(
|
|
'https://gitee.com/lpf_project/RuoYi-MT/releases')
|
|
'https://gitee.com/lpf_project/RuoYi-MT/releases')
|
|
dlg.Destroy()
|
|
dlg.Destroy()
|
|
else:
|
|
else:
|
|
- logger.info('检查更新结果:当前版本是最新版本!')
|
|
|
|
if show_no_new_version_tip:
|
|
if show_no_new_version_tip:
|
|
- wx.MessageDialog(self, '当前版本是最新版本!', '检测更新', wx.OK).ShowModal()
|
|
|
|
|
|
+ wx.MessageDialog(self, message, '版本更新提醒', wx.OK).ShowModal()
|
|
|
|
|
|
def check_input(self):
|
|
def check_input(self):
|
|
"""
|
|
"""
|