Don't strip newlines from builder files.

Fixes #10514.
This commit is contained in:
John Ralls 2018-03-25 08:58:36 -07:00
parent 6c8de19fc5
commit 89ad092ac1
2 changed files with 6 additions and 6 deletions

View File

@ -144,7 +144,7 @@ class Glade(Gtk.Builder):
if toplevel: if toplevel:
loadlist = [toplevel] + also_load loadlist = [toplevel] + also_load
with open(path, 'r', encoding='utf-8') as builder_file: with open(path, 'r', encoding='utf-8') as builder_file:
data = builder_file.read().replace('\n', '') data = builder_file.read()
if is_quartz(): if is_quartz():
data = data.replace('GDK_CONTROL_MASK', 'GDK_META_MASK') data = data.replace('GDK_CONTROL_MASK', 'GDK_META_MASK')
self.add_objects_from_string(data, loadlist) self.add_objects_from_string(data, loadlist)
@ -152,7 +152,7 @@ class Glade(Gtk.Builder):
# toplevel not given # toplevel not given
else: else:
with open(path, 'r', encoding='utf-8') as builder_file: with open(path, 'r', encoding='utf-8') as builder_file:
data = builder_file.read().replace('\n', '') data = builder_file.read()
if is_quartz(): if is_quartz():
data = data.replace('GDK_CONTROL_MASK', 'GDK_META_MASK') data = data.replace('GDK_CONTROL_MASK', 'GDK_META_MASK')
self.add_from_string(data) self.add_from_string(data)

View File

@ -199,10 +199,10 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Conveys the submitter's quantitative evaluation of the credibility of a piece of information, based upon its supporting evidence. It is not intended to eliminate the receiver's need to evaluate the evidence for themselves. <property name="tooltip_text" translatable="yes">Conveys the submitter's quantitative evaluation of the credibility of a piece of information, based upon its supporting evidence. It is not intended to eliminate the receiver's need to evaluate the evidence for themselves.
/Very Low =Unreliable evidence or estimated data. -Very Low =Unreliable evidence or estimated data.
/Low =Questionable reliability of evidence (interviews, census, oral genealogies, or potential for bias for example, an autobiography). -Low =Questionable reliability of evidence (interviews, census, oral genealogies, or potential for bias for example, an autobiography).
/High =Secondary evidence, data officially recorded sometime after event. -High =Secondary evidence, data officially recorded sometime after event.
/Very High =Direct and primary evidence used, or by dominance of the evidence.</property> -Very High =Direct and primary evidence used, or by dominance of the evidence.</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="model">confidence_model</property> <property name="model">confidence_model</property>
<child> <child>