Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use screen label as tab in phoebus #113

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pvi/_format/dls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from lxml import etree
from pydantic import Field

from pvi._format.bob import BobTemplate
from pvi._format.bob import BobTemplate, find_element
from pvi._format.edl import EdlTemplate
from pvi._format.screen import (
ScreenFormatterFactory,
Expand Down Expand Up @@ -387,4 +387,5 @@ def write_bob(screen_formatter: GroupFormatter, path: Path):
for element in texts[:0:-1]:
ET.insert(ET.index(ET.find("grid_step_y")) + 1, element)
ET = ET.getroottree()
find_element(ET, "name").text = screen_formatter.title
ET.write(str(path), pretty_print=True)
2 changes: 1 addition & 1 deletion tests/format/output/button.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Simple Device - $(P)</name>
<x>0</x>
<y use_class="true">0</y>
<width>274</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/combo_box.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Device - $(P)</name>
<x>0</x>
<y use_class="true">0</y>
<width>274</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/device_ref.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Device - $(P)</name>
<x>0</x>
<y use_class="true">0</y>
<width>274</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/index.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Index</name>
<x>0</x>
<y use_class="true">0</y>
<width>388</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/mixedWidgets.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Mixed Widgets - $(P)$(R)</name>
<x>0</x>
<y use_class="true">0</y>
<width>576</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/pva_table.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>TableDevice - $(P)</name>
<x>0</x>
<y use_class="true">0</y>
<width>226</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/pva_table_panda.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>TableDevice</name>
<x>0</x>
<y use_class="true">0</y>
<width>1726</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/signal_default_widgets.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>label</name>
<x>0</x>
<y use_class="true">0</y>
<width>274</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/static_table.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>StaticTable - $(P)$(R)</name>
<x>0</x>
<y use_class="true">0</y>
<width>274</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/static_table_BigTable.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>BigTable</name>
<x>0</x>
<y use_class="true">0</y>
<width>1030</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/sub_screen.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Device</name>
<x>0</x>
<y use_class="true">0</y>
<width>290</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/sub_screen_Group1.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Group1</name>
<x>0</x>
<y use_class="true">0</y>
<width>290</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/sub_screen_Group4.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Group4</name>
<x>0</x>
<y use_class="true">0</y>
<width>290</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/format/output/text_format.bob
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<display version="2.0.0">
<name>Display</name>
<name>Text Device - $(P)</name>
<x>0</x>
<y use_class="true">0</y>
<width>274</width>
Expand Down
Loading