~umang/indicator-stickynotes/trunk

« back to all changes in this revision

Viewing changes to stickynotes/gui.py

  • Committer: Umang Varma
  • Date: 2015-07-01 23:29:38 UTC
  • Revision ID: git-v1:ee83e4d6176c589a124c33e1fb0c549ac4416875
Prompt backup when error reading data file

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
    winAbout.destroy()
302
302
    return ret
303
303
 
 
304
def show_export_file_chooser():
 
305
    winChoose = Gtk.FileChooserDialog(_("Export Data"), None,
 
306
            Gtk.FileChooserAction.SAVE, (Gtk.STOCK_CANCEL,
 
307
            Gtk.ResponseType.CANCEL, Gtk.STOCK_SAVE, Gtk.ResponseType.ACCEPT))
 
308
    winChoose.set_do_overwrite_confirmation(True)
 
309
    response = winChoose.run()
 
310
    filename = None
 
311
    if response == Gtk.ResponseType.ACCEPT:
 
312
        filename =  winChoose.get_filename()
 
313
    winChoose.destroy()
 
314
    return filename
 
315
 
304
316
class SettingsCategory:
305
317
    """Widgets that handle properties of a category"""
306
318
    def __init__(self, settingsdialog, cat):