Skip to content

Commit

Permalink
'delete' key works again
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Horowitz committed Sep 17, 2006
1 parent 2255644 commit a0128ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
@@ -1,4 +1,4 @@
v0.5.2 - Pending
v0.5.2 - September 15, 2006
+ Correctly update interface after updating MPD library
+ Interface prefs: show album art, show volume, sticky, above
+ Behavior prefs: minimize to systray, stop playback on exit
Expand Down
2 changes: 2 additions & 0 deletions TODO
Expand Up @@ -4,6 +4,8 @@
optional statusbar (num songs, total length)
dbus - show previous instance if user tries to launch another
support for multimedia keys (possible in pure pygtk?)
re-show icon if systray is closed/opened (xfce4-paenl -r)
ctrl-u to update library, ctrl-shift-u to update selected dirs

Future:
connect in background via socket.setblocking(0)
Expand Down
12 changes: 4 additions & 8 deletions sonata.py
Expand Up @@ -207,7 +207,8 @@ def __init__(self):
('raisekey', None, 'Raise Volume Key', '<Ctrl>plus', None, self.raise_volume),
('raisekey2', None, 'Raise Volume Key 2', '<Ctrl>equal', None, self.raise_volume),
('quitkey', None, 'Quit Key', '<Ctrl>q', None, self.delete_event_yes),
('menukey', None, 'Menu Key', 'Menu', None, self.menukey_press)
('menukey', None, 'Menu Key', 'Menu', None, self.menukey_press),
('deletekey', None, 'Delete Key', 'Delete', None, self.remove)
)

toggle_actions = (
Expand Down Expand Up @@ -260,6 +261,7 @@ def __init__(self):
<menuitem action="raisekey"/>
<menuitem action="raisekey2"/>
<menuitem action="menukey"/>
<menuitem action="deletekey"/>
</popup>
</ui>
"""
Expand Down Expand Up @@ -1427,12 +1429,6 @@ def set_ignore_toggle_signal_false(self):
def trayaction_scroll(self, widget, event):
self.on_volumebutton_scroll(widget, event)

# Accelerator callback; works globally
def accelerator_activated(self, accelgroup, widget, key, mods):
if key == gtk.keysyms.Delete:
self.remove(widget)
return True

# Tray menu callbacks, because I can't reuse all of them.
def quit_activate(self, widget):
self.window.destroy()
Expand Down Expand Up @@ -1618,7 +1614,7 @@ def prefs(self, widget, show_mpd_tab=False):
exit_stop = gtk.CheckButton(_("Stop playback on exit"))
exit_stop.set_active(self.stop_on_exit)
self.tooltips.set_tip(exit_stop, _("MPD allows playback even when the client is not open. If enabled, Sonata will behave like a more conventional music player and, instead, stop playback upon exit."))
minimize = gtk.CheckButton(_("Minimize to system tray"))
minimize = gtk.CheckButton(_("Minimize to system tray on close"))
minimize.set_active(self.minimize_to_systray)
self.tooltips.set_tip(minimize, _("If enabled, closing Sonata will minimize it to the system tray. Note that it's currently impossible to detect if there actually is a system tray, so only check this if you have one."))
if self.trayicon_visible:
Expand Down

0 comments on commit a0128ad

Please sign in to comment.