mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Fix multi-line descriptions breaking the properties window
This commit is contained in:
@@ -49,6 +49,7 @@ template $PropertiesWindow: Adw.Dialog {
|
||||
}
|
||||
|
||||
Button description_button {
|
||||
visible: bind description.visible;
|
||||
styles [
|
||||
"title-4",
|
||||
"flat"
|
||||
|
||||
@@ -206,14 +206,18 @@ class myUtils:
|
||||
).stdout
|
||||
lines = output.strip().split("\n")
|
||||
columns = lines[0].split("\t")
|
||||
data = [columns]
|
||||
for line in lines[1:]:
|
||||
data = []
|
||||
for line in lines:
|
||||
row = line.split(": ", 1)
|
||||
for i in range(len(row)):
|
||||
row[i] = row[i].strip()
|
||||
data.append(row)
|
||||
info = {}
|
||||
info["name"] = data[0][0]
|
||||
maybe_name = data[0][0]
|
||||
if not "ID" in maybe_name:
|
||||
info["name"] = data[0][0]
|
||||
else:
|
||||
info["name"] = ref.split("/")[0].split(".")[-1]
|
||||
for i in range(2, len(data)):
|
||||
if data[i][0] == '':
|
||||
continue
|
||||
|
||||
@@ -97,7 +97,7 @@ class PropertiesWindow(Adw.Dialog):
|
||||
try:
|
||||
self.description.set_label((name_desc[1]))
|
||||
except:
|
||||
pass
|
||||
self.description.set_visible(False)
|
||||
for key in info.keys():
|
||||
if key == "name":
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user