Remove hardcoded app names.

This commit is contained in:
Bill Dengler
2015-04-19 19:10:34 -04:00
parent be0253815f
commit 00d5b88b8d
8 changed files with 20 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ import os
import exceptions
import dropbox
import logging
import application
from keys import keyring
from utils import *
from dropbox.rest import ErrorResponse
@@ -51,7 +52,7 @@ class dropboxLogin(object):
return self.flow.start()
def authorise(self, code):
log.debug("Authorising TWBlue in Dropbox...")
log.debug("Authorising " + application.name + " to Dropbox...")
access_token, user_id = self.flow.finish(code)
log.debug("Saving tokens...")
self.config["services"]["dropbox_token"] = access_token
@@ -64,7 +65,7 @@ class dropboxUploader(object):
self.client = dropbox.client.DropboxClient(config["services"]["dropbox_token"])
else:
log.error("Dropbox is not authorised for this session.")
raise UnauthorisedError("You need authorise TWBlue")
raise UnauthorisedError("You need to authorise " + application.name)
self.filename = filename
self.short_url = short_url
self.file = open(self.filename, "rb")

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import wx
import widgetUtils
import application
class autocompletionSettingsDialog(widgetUtils.BaseDialog):
def __init__(self):
super(autocompletionSettingsDialog, self).__init__(parent=None, id=-1, title=_(u"Autocomplete users settings"))
@@ -23,4 +23,4 @@ class autocompletionSettingsDialog(widgetUtils.BaseDialog):
self.SetClientSize(sizer.CalcMin())
def show_success_dialog():
wx.MessageDialog(None, _(u"TWBlue's database of users has been updated."), _(u"Done"), wx.OK).ShowModal()
wx.MessageDialog(None, _(uapplication.name+"'s database of users has been updated."), _(u"Done"), wx.OK).ShowModal()