コード例 #1
0
ファイル: dialogs.py プロジェクト: GNOME/billreminder
def add_dialog(parent=None, selectedDate=None):
    record = None
    # Dialog Title
    dialog = AddDialog(title=_("Add a new bill"), parent=parent, record=record, selectedDate=selectedDate)
    response = dialog.window.run()
    # Checks if the user did not cancel the action
    if response == gtk.RESPONSE_ACCEPT:
        record = dialog.get_record()
    dialog.window.destroy()

    return record
コード例 #2
0
ファイル: dialogs.py プロジェクト: sahwar/billreminder
def add_dialog(parent=None, selectedDate=None):
    record = None
    # Dialog Title
    dialog = AddDialog(title=_("Add a new bill"), parent=parent, record=record, selectedDate=selectedDate)
    response = dialog.window.run()
    # Checks if the user did not cancel the action
    if response == gtk.RESPONSE_ACCEPT:
        record = dialog.get_record()
    dialog.window.destroy()

    return record
コード例 #3
0
ファイル: dialogs.py プロジェクト: GNOME/billreminder
def edit_dialog(record, parent=None):
    # Dialog Title
    dialog = AddDialog(title=_("Edit a bill"), parent=parent, record=record)
    response = dialog.window.run()
    # Checks if the user did not cancel the action
    if response == gtk.RESPONSE_ACCEPT:
        record = dialog.get_record()
    else:
        record = None
    dialog.window.destroy()

    return record
コード例 #4
0
ファイル: dialogs.py プロジェクト: sahwar/billreminder
def edit_dialog(record, parent=None):
    # Dialog Title
    dialog = AddDialog(title=_("Edit a bill"), parent=parent, record=record)
    response = dialog.window.run()
    # Checks if the user did not cancel the action
    if response == gtk.RESPONSE_ACCEPT:
        record = dialog.get_record()
    else:
        record = None
    dialog.window.destroy()

    return record