[meld] patchdialog: Move to non-vendored Template usage
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] patchdialog: Move to non-vendored Template usage
- Date: Sat, 31 Aug 2019 02:06:30 +0000 (UTC)
commit 1cf8664ca9789a5728013be40c82a9ab80f59ef4
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Aug 31 11:51:00 2019 +1000
patchdialog: Move to non-vendored Template usage
meld/patchdialog.py | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/meld/patchdialog.py b/meld/patchdialog.py
index 485a7a60..7ed2032e 100644
--- a/meld/patchdialog.py
+++ b/meld/patchdialog.py
@@ -28,20 +28,19 @@ from meld.iohelpers import prompt_save_filename
from meld.misc import error_dialog
from meld.settings import get_meld_settings
from meld.sourceview import LanguageManager
-from meld.ui._gtktemplate import Template
-@Template(resource_path='/org/gnome/meld/ui/patch-dialog.ui')
+@Gtk.Template(resource_path='/org/gnome/meld/ui/patch-dialog.ui')
class PatchDialog(Gtk.Dialog):
__gtype_name__ = "PatchDialog"
- left_radiobutton = Template.Child("left_radiobutton")
- reverse_checkbutton = Template.Child("reverse_checkbutton")
- right_radiobutton = Template.Child("right_radiobutton")
- side_selection_box = Template.Child("side_selection_box")
- side_selection_label = Template.Child("side_selection_label")
- textview: Gtk.TextView = Template.Child("textview")
+ left_radiobutton = Gtk.Template.Child("left_radiobutton")
+ reverse_checkbutton = Gtk.Template.Child("reverse_checkbutton")
+ right_radiobutton = Gtk.Template.Child("right_radiobutton")
+ side_selection_box = Gtk.Template.Child("side_selection_box")
+ side_selection_label = Gtk.Template.Child("side_selection_label")
+ textview: Gtk.TextView = Gtk.Template.Child("textview")
def __init__(self, filediff):
super().__init__()
@@ -73,14 +72,14 @@ class PatchDialog(Gtk.Dialog):
if key == "font":
self.textview.modify_font(settings.font)
- @Template.Callback()
+ @Gtk.Template.Callback()
def on_buffer_selection_changed(self, radiobutton):
if not radiobutton.get_active():
return
self.left_patch = radiobutton == self.left_radiobutton
self.update_patch()
- @Template.Callback()
+ @Gtk.Template.Callback()
def on_reverse_checkbutton_toggled(self, checkbutton):
self.reverse_patch = checkbutton.get_active()
self.update_patch()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]