Changeset 1594
- Timestamp:
- 2005-11-01 10:31:18 (3 years ago)
- Files:
-
- annoamp/trunk/annoamp.py (modified) (2 diffs)
- annoamp/trunk/annocast.glade (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
annoamp/trunk/annoamp.py
r1593 r1594 243 243 244 244 def update_gui_time(time, duration): 245 xml.get_widget("time").set_text(str(time/3600)+ ":" + str(time/60%60) + ":" + str(time%60) + " / " + str(duration/3600)+ ":" + str(duration/60%60) + ":" + str(duration%60)) 246 xml.get_widget("slider").set_value(time) 245 xml.get_widget("time").set_text(format_time(time) + "/" + format_time(duration)) 247 246 248 247 def update_gui_duration(duration): … … 254 253 player.loadFile(chooser.get_filename(),playlist) 255 254 chooser.destroy() 255 256 def format_time(time): 257 hour = str(time/3600) 258 minute = time/60%60 259 if minute < 10: 260 minute = "0" + str(minute) 261 else: 262 minute = str(minute) 263 seconds = time%60 264 if seconds < 10: 265 seconds = "0" + str(seconds) 266 else: 267 seconds = str(seconds) 268 return hour + ":" + minute + ":" + seconds 256 269 257 270 playlist = gtk.TreeStore(str, int) annoamp/trunk/annocast.glade
r1593 r1594 231 231 <property name="visible">True</property> 232 232 <property name="can_focus">True</property> 233 <property name="hscrollbar_policy">GTK_POLICY_A LWAYS</property>234 <property name="vscrollbar_policy">GTK_POLICY_A LWAYS</property>233 <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> 234 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> 235 235 <property name="shadow_type">GTK_SHADOW_IN</property> 236 236 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>