Skip to content

Commit

Permalink
Merge pull request #113 from epics-containers/screen-label
Browse files Browse the repository at this point in the history
Use screen label as tab in phoebus
  • Loading branch information
GDYendell authored Mar 28, 2024
2 parents 21cb12e + 4e79574 commit 66df55f
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 15 deletions.
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

0 comments on commit 66df55f

Please sign in to comment.