Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
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
Esempio n. 4
0
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