Skip to content

Commit

Permalink
An Error raised when file open dialog displayed at startup was canceled.
Browse files Browse the repository at this point in the history
closes #115.
  • Loading branch information
Atsuo Ishimoto committed Jan 29, 2014
1 parent cbba0a0 commit 77083e9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions kaa/ui/messagebar/messagebarmode.py
Expand Up @@ -24,9 +24,15 @@ def on_set_document(self, doc):

def set_message(self, msg):
if not msg:
msg = getattr(kaa.app.focus.document.mode,
'DEFAULT_STATUS_MSG', None)
# Get default message for current document
if kaa.app.focus and getattr(kaa.app.focus, 'document', None):
msg = getattr(kaa.app.focus.document.mode,
'DEFAULT_STATUS_MSG', None)
else:
msg = None

if msg is None:
# Show default message of app.
msg = kaa.app.DEFAULT_MENU_MESSAGE

if msg != self.message:
Expand Down

0 comments on commit 77083e9

Please sign in to comment.