소스 검색

Use USB manufacturer and product strings for names

The devices have their own name, in the form of USB manufacturer and
product string descriptors.  Now we use those in the GUI as the device
names.
Clara Hobbs 7 년 전
부모
커밋
27e0c3313c
2개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 3
    2
      data/pd-buddy-gtk.ui
  2. 3
    1
      pd-buddy-gtk.py

+ 3
- 2
data/pd-buddy-gtk.ui 파일 보기

@@ -140,6 +140,7 @@
140 140
                                   <object class="GtkLabel">
141 141
                                     <property name="visible">True</property>
142 142
                                     <property name="can_focus">False</property>
143
+                                    <property name="halign">start</property>
143 144
                                     <property name="label" translatable="yes">A</property>
144 145
                                   </object>
145 146
                                   <packing>
@@ -151,6 +152,7 @@
151 152
                                   <object class="GtkLabel">
152 153
                                     <property name="visible">True</property>
153 154
                                     <property name="can_focus">False</property>
155
+                                    <property name="halign">start</property>
154 156
                                     <property name="label" translatable="yes">V</property>
155 157
                                   </object>
156 158
                                   <packing>
@@ -196,8 +198,7 @@
196 198
                                     <property name="visible">True</property>
197 199
                                     <property name="can_focus">False</property>
198 200
                                     <property name="halign">start</property>
199
-                                    <property name="orientation">vertical</property>
200
-                                    <property name="layout_style">end</property>
201
+                                    <property name="layout_style">expand</property>
201 202
                                     <child>
202 203
                                       <object class="GtkToggleButton" id="giveback-toggle">
203 204
                                         <property name="label" translatable="yes">GiveBack</property>

+ 3
- 1
pd-buddy-gtk.py 파일 보기

@@ -139,7 +139,8 @@ class SelectListRow(Gtk.ListBoxRow):
139 139
         self._builder.connect_signals(self)
140 140
 
141 141
         name = self._builder.get_object("name")
142
-        name.set_text(self.model.serport.description)
142
+        name.set_text('{} {}'.format(self.model.serport.manufacturer,
143
+                                     self.model.serport.product))
143 144
 
144 145
         device = self._builder.get_object("device")
145 146
         device.set_text(self.model.serport.device)
@@ -224,6 +225,7 @@ class Handler:
224 225
         # Show the Sink page
225 226
         hst = self.builder.get_object("header-stack")
226 227
         hsink = self.builder.get_object("header-sink")
228
+        hsink.set_title('{} {}'.format(serport.manufacturer, serport.product))
227 229
         hsink.set_subtitle(serport.device)
228 230
         hst.set_visible_child(hsink)
229 231
 

Loading…
취소
저장