From 9b07cf8d41044b3b05ef799a9e8989195d92e37e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 23 Jun 2018 20:34:53 +0200 Subject: [PATCH] Add loading single builder objects on Windows This was still missing from the Windows translation fix --- gajim/gtkgui_helpers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gajim/gtkgui_helpers.py b/gajim/gtkgui_helpers.py index 3cab81d92..d6b0b240c 100644 --- a/gajim/gtkgui_helpers.py +++ b/gajim/gtkgui_helpers.py @@ -142,6 +142,10 @@ def _translate(gui_file, widget): xml_text = ET.tostring(tree.getroot(), encoding='unicode', method='xml') + if widget is not None: + builder = Gtk.Builder() + builder.add_objects_from_string(xml_text, [widget]) + return builder return Gtk.Builder.new_from_string(xml_text, -1) else: if widget is not None: