Exemplo n.º 1
0
    def check_version(self):
        gtk.gdk.threads_enter()

        version = TweakSettings.get_version()
        if version > VERSION:
            dialog = QuestionDialog(
                _(
                    "A newer version: %s is available online.\nWould you like to update?\n\nNote: if you prefer to update from the source code, you can disable this feature in Preferences."
                )
                % version,
                title=_("Software Update"),
            )

            update = False

            if dialog.run() == gtk.RESPONSE_YES:
                update = True
            dialog.destroy()

            if update:
                dialog = UpdateDialog(parent=self.get_toplevel())
                dialog.run()
                dialog.destroy()

        gtk.gdk.threads_leave()
Exemplo n.º 2
0
 def __init__(self, parent=None):
     DownloadDialog.__init__(
         self,
         url=TweakSettings.get_url(),
         title=_("Download Ubuntu Tweak %s") % TweakSettings.get_version(),
         parent=parent,
     )
Exemplo n.º 3
0
    def check_version(self):
        gtk.gdk.threads_enter()

        version = TweakSettings.get_version()
        if version > VERSION:
            dialog = QuestionDialog(_(
                'A newer version: %s is available online.\nWould you like to update?\n\nNote: if you prefer to update from the source code, you can disable this feature in Preferences.'
            ) % version,
                                    title=_('Software Update'))

            update = False

            if dialog.run() == gtk.RESPONSE_YES:
                update = True
            dialog.destroy()

            if update:
                dialog = UpdateDialog(parent=self.get_toplevel())
                dialog.run()
                dialog.destroy()

        gtk.gdk.threads_leave()
Exemplo n.º 4
0
 def __init__(self, parent=None):
     DownloadDialog.__init__(self,
                             url=TweakSettings.get_url(),
                             title=_('Download Ubuntu Tweak %s') %
                             TweakSettings.get_version(),
                             parent=parent)