Public feed #378268

Mine

public text v1 · immutable
Raw Edit
·published 2007-03-02 11:46 UTC
rendered paste body
hideclose.rb-plugin
===================

[RB Plugin]
Loader=python
Module=hideclose
IAge=1
Name=Hide on Close
Description=Hide the Rhythmbox window when the close button is pressed
Authors=James Livingston <doclivingston@gmail.com>
Copyright=Copyright © 2007 James Livingston
Website=http://www.rhythmbox.org/



hideclose.py
============

import rb

class HideOnClosePlugin (rb.Plugin):
	def activate(self, shell):
		def hide_close (window, event):
			shell.toggle_visibility()
			return True

		self.id = shell.props.window.connect('delete-event', hide_close)

	def deactivate(self, shell):
		shell.props.window.disconnect(self.id)
		del self.id