Commit 05a1f4d7 authored by Rafaël Carré's avatar Rafaël Carré

Don't use an infinite number of timers

Fixes dialog size, add tooltip
parent 9bdc7906
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.0.2 on Tue Nov 21 16:05:19 2006 by fun@zod--> <!--Generated with glade3 3.0.2 on Tue Nov 21 18:02:27 2006 by fun@zod-->
<glade-interface> <glade-interface>
<widget class="GtkWindow" id="window1"> <widget class="GtkWindow" id="window1">
<property name="resizable">False</property> <property name="resizable">False</property>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<widget class="GtkHScale" id="time_s"> <widget class="GtkHScale" id="time_s">
<property name="width_request">183</property> <property name="width_request">180</property>
<property name="height_request">20</property> <property name="height_request">20</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="adjustment">0 0 1000 10 100 0</property> <property name="adjustment">0 0 1000 10 100 0</property>
...@@ -165,6 +165,7 @@ ...@@ -165,6 +165,7 @@
<property name="snap_to_ticks">True</property> <property name="snap_to_ticks">True</property>
<property name="numeric">True</property> <property name="numeric">True</property>
<property name="update_policy">GTK_UPDATE_IF_VALID</property> <property name="update_policy">GTK_UPDATE_IF_VALID</property>
<property name="tooltip" translatable="yes">Volume in %</property>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -247,7 +248,7 @@ ...@@ -247,7 +248,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<widget class="GtkLabel" id="item"> <widget class="GtkLabel" id="item">
<property name="width_request">185</property> <property name="width_request">180</property>
<property name="height_request">20</property> <property name="height_request">20</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="justify">GTK_JUSTIFY_CENTER</property> <property name="justify">GTK_JUSTIFY_CENTER</property>
......
...@@ -33,6 +33,7 @@ global timer ...@@ -33,6 +33,7 @@ global timer
global playing global playing
def itemchange_handler(item): def itemchange_handler(item):
gobject.timeout_add( 2000, timeset)
l_item.set_text(item) l_item.set_text(item)
bus = dbus.SessionBus() bus = dbus.SessionBus()
...@@ -74,7 +75,6 @@ def GetPlayStatus(widget): ...@@ -74,7 +75,6 @@ def GetPlayStatus(widget):
status = str(interface.GetPlayStatus()) status = str(interface.GetPlayStatus())
if status == "playing": if status == "playing":
img_bt_toggle.set_from_stock("gtk-media-pause", gtk.ICON_SIZE_SMALL_TOOLBAR) img_bt_toggle.set_from_stock("gtk-media-pause", gtk.ICON_SIZE_SMALL_TOOLBAR)
gobject.timeout_add( 2000, timeset)
playing = True playing = True
else: else:
img_bt_toggle.set_from_stock("gtk-media-play", gtk.ICON_SIZE_SMALL_TOOLBAR) img_bt_toggle.set_from_stock("gtk-media-play", gtk.ICON_SIZE_SMALL_TOOLBAR)
...@@ -191,6 +191,7 @@ vol.connect('scroll-event', volchange) ...@@ -191,6 +191,7 @@ vol.connect('scroll-event', volchange)
time_s.connect('adjust-bounds', timechange) time_s.connect('adjust-bounds', timechange)
time_s.set_update_policy(gtk.UPDATE_DISCONTINUOUS) time_s.set_update_policy(gtk.UPDATE_DISCONTINUOUS)
gobject.timeout_add( 2000, timeset)
library = "/media/mp3" library = "/media/mp3"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment