~tomasgroth/openlp/portable-path

« back to all changes in this revision

Viewing changes to openlp/core/ui/exceptiondialog.py

  • Committer: Tomas Groth
  • Date: 2019-04-30 19:02:42 UTC
  • mfrom: (2829.2.32 openlp)
  • Revision ID: tomasgroth@yahoo.dk-20190430190242-6zwjk8724tyux70m
trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2018 OpenLP Developers                                   #
 
7
# Copyright (c) 2008-2019 OpenLP Developers                                   #
8
8
# --------------------------------------------------------------------------- #
9
9
# This program is free software; you can redistribute it and/or modify it     #
10
10
# under the terms of the GNU General Public License as published by the Free  #
23
23
The GUI widgets of the exception dialog.
24
24
"""
25
25
 
26
 
from PyQt5 import QtGui, QtWidgets
 
26
from PyQt5 import QtWidgets
27
27
 
28
28
from openlp.core.common.i18n import translate
 
29
from openlp.core.lib.ui import create_button, create_button_box
29
30
from openlp.core.ui.icons import UiIcons
30
 
from openlp.core.lib.ui import create_button, create_button_box
31
31
 
32
32
 
33
33
class Ui_ExceptionDialog(object):
34
34
    """
35
35
    The GUI widgets of the exception dialog.
36
36
    """
37
 
    def setupUi(self, exception_dialog):
 
37
    def setup_ui(self, exception_dialog):
38
38
        """
39
39
        Set up the UI.
40
40
        """
77
77
        self.save_report_button = create_button(exception_dialog, 'save_report_button',
78
78
                                                icon=UiIcons().save,
79
79
                                                click=self.on_save_report_button_clicked)
80
 
        self.attach_tile_button = create_button(exception_dialog, 'attach_tile_button',
 
80
        self.attach_file_button = create_button(exception_dialog, 'attach_file_button',
81
81
                                                icon=UiIcons().open,
82
82
                                                click=self.on_attach_file_button_clicked)
83
83
        self.button_box = create_button_box(exception_dialog, 'button_box', ['close'],
84
 
                                            [self.send_report_button, self.save_report_button, self.attach_tile_button])
 
84
                                            [self.send_report_button, self.save_report_button, self.attach_file_button])
85
85
        self.exception_layout.addWidget(self.button_box)
86
86
 
87
 
        self.retranslateUi(exception_dialog)
 
87
        self.retranslate_ui(exception_dialog)
88
88
        self.description_text_edit.textChanged.connect(self.on_description_updated)
89
89
 
90
 
    def retranslateUi(self, exception_dialog):
 
90
    def retranslate_ui(self, exception_dialog):
91
91
        """
92
92
        Translate the widgets on the fly.
93
93
        """
112
112
                      ).format(first_part=exception_part1))
113
113
        self.send_report_button.setText(translate('OpenLP.ExceptionDialog', 'Send E-Mail'))
114
114
        self.save_report_button.setText(translate('OpenLP.ExceptionDialog', 'Save to File'))
115
 
        self.attach_tile_button.setText(translate('OpenLP.ExceptionDialog', 'Attach File'))
 
115
        self.attach_file_button.setText(translate('OpenLP.ExceptionDialog', 'Attach File'))