mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-11-06 04:23:59 +00:00
37 lines
1.3 KiB
Python
37 lines
1.3 KiB
Python
# error.py
|
|
#
|
|
# Change the look of Adwaita, with ease
|
|
# Copyright (C) 2022 Adwaita Manager Team
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
from gi.repository import Gtk
|
|
|
|
from .constants import rootdir
|
|
|
|
|
|
@Gtk.Template(resource_path=f"{rootdir}/ui/error.ui")
|
|
class GradienceError(Gtk.ListBoxRow):
|
|
__gtype_name__ = "GradienceError"
|
|
|
|
error_label = Gtk.Template.Child("error-label")
|
|
element_label = Gtk.Template.Child("element-label")
|
|
line_label = Gtk.Template.Child("line-label")
|
|
|
|
def __init__(self, error, element, line, **kwargs):
|
|
super().__init__(**kwargs)
|
|
|
|
self.error_label.set_label(error)
|
|
self.element_label.set_label(element)
|
|
self.line_label.set_label(line)
|