@ -454,7 +454,7 @@ class Activity(Window, Gtk.Container):
def _initialize_journal_object ( self ) :
title = _ ( ' %s Activity ' ) % get_bundle_name ( )
icon_color = get_color ( ) . to_string ( )
jobject = datastore . create ( )
@ -851,7 +851,7 @@ class Activity(Window, Gtk.Container):
This method is called by the close ( ) method below . In general ,
activities should not override this method . This method is part of the
public API of an Ac ivity, and should behave in standard ways . Use your
public API of an Ac t ivity, and should behave in standard ways . Use your
own implementation of write_file ( ) to save your Activity specific data .
'''
@ -1048,6 +1048,11 @@ class Activity(Window, Gtk.Container):
pservice . share_activity ( self , private = private )
def _show_keep_failed_dialog ( self ) :
'''
A keep error means the activity write_file method raised an
exception before writing the file , or the datastore cannot be
written to .
'''
alert = Alert ( )
alert . props . title = _ ( ' Keep error ' )
alert . props . msg = _ ( ' Keep error: all changes will be lost ' )
@ -1060,11 +1065,11 @@ class Activity(Window, Gtk.Container):
alert . add_button ( Gtk . ResponseType . OK , _ ( ' Stop anyway ' ) , stop_icon )
self . add_alert ( alert )
alert . connect ( ' response ' , self . _ keep_failed_dialog_response_cb)
alert . connect ( ' response ' , self . _ _ keep_failed_dialog_response_cb)
self . reveal ( )
def _ keep_failed_dialog_response_cb( self , alert , response_id ) :
def _ _ keep_failed_dialog_response_cb( self , alert , response_id ) :
self . remove_alert ( alert )
if response_id == Gtk . ResponseType . OK :
self . close ( skip_save = True )