2022-10-10 20:34:50 +00:00
|
|
|
# error_list_row.py
|
2022-07-18 19:20:02 +00:00
|
|
|
#
|
2022-08-11 08:16:44 +00:00
|
|
|
# Change the look of Adwaita, with ease
|
|
|
|
# Copyright (C) 2022 Adwaita Manager Team
|
2022-07-18 19:20:02 +00:00
|
|
|
#
|
2022-08-11 08:16:44 +00:00
|
|
|
# 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.
|
2022-08-11 16:39:52 +00:00
|
|
|
#
|
2022-08-11 08:16:44 +00:00
|
|
|
# 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.
|
2022-08-11 16:39:52 +00:00
|
|
|
#
|
2022-08-11 08:16:44 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2022-07-18 19:20:02 +00:00
|
|
|
|
2022-07-24 18:43:32 +00:00
|
|
|
from gi.repository import Gtk
|
2022-07-18 19:20:02 +00:00
|
|
|
|
2022-12-02 21:52:47 +00:00
|
|
|
from gradience.backend.constants import rootdir
|
2022-08-11 16:39:52 +00:00
|
|
|
|
2022-08-13 10:24:16 +00:00
|
|
|
|
2022-10-10 20:34:50 +00:00
|
|
|
@Gtk.Template(resource_path=f"{rootdir}/ui/error_list_row.ui")
|
|
|
|
class GradienceErrorListRow(Gtk.ListBoxRow):
|
|
|
|
__gtype_name__ = "GradienceErrorListRow"
|
2022-07-18 19:20:02 +00:00
|
|
|
|
|
|
|
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)
|