rhythmbox r5788 - in trunk: . plugins plugins/dontreallyclose



Author: hadess
Date: Wed Jul  2 10:16:47 2008
New Revision: 5788
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5788&view=rev

Log:
2008-07-02  Bastien Nocera  <hadess hadess net>

	* configure.ac:
	* plugins/Makefile.am:
	* plugins/dontreallyclose/Makefile.am:
	* plugins/dontreallyclose/dontreallyclose.py:
	* plugins/dontreallyclose/dontreallyclose.rb-plugin.in:
	Add a plugin by Jonathan to allow minimising to the tray
	(Closes: #318629)



Added:
   trunk/plugins/dontreallyclose/
   trunk/plugins/dontreallyclose/Makefile.am
   trunk/plugins/dontreallyclose/dontreallyclose.py
   trunk/plugins/dontreallyclose/dontreallyclose.rb-plugin.in
Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/plugins/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Wed Jul  2 10:16:47 2008
@@ -1067,6 +1067,7 @@
 plugins/pythonconsole/Makefile
 plugins/artdisplay/Makefile
 plugins/artdisplay/artdisplay/Makefile
+plugins/dontreallyclose/Makefile
 plugins/magnatune/Makefile
 plugins/magnatune/magnatune/Makefile
 plugins/jamendo/Makefile

Modified: trunk/plugins/Makefile.am
==============================================================================
--- trunk/plugins/Makefile.am	(original)
+++ trunk/plugins/Makefile.am	Wed Jul  2 10:16:47 2008
@@ -25,6 +25,7 @@
 	magnatune					\
 	jamendo						\
 	coherence					\
+	dontreallyclose					\
 	rb
 endif
 

Added: trunk/plugins/dontreallyclose/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/plugins/dontreallyclose/Makefile.am	Wed Jul  2 10:16:47 2008
@@ -0,0 +1,16 @@
+# Don't Really Close Python Plugin
+
+plugindir = $(PLUGINDIR)/dontreallyclose
+
+plugin_in_files = dontreallyclose.rb-plugin.in
+%.rb-plugin: %.rb-plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+plugin_DATA = $(plugin_in_files:.rb-plugin.in=.rb-plugin)
+
+plugindir = $(PLUGINDIR)/dontreallyclose
+plugin_PYTHON = dontreallyclose.py
+
+EXTRA_DIST = $(plugin_in_files) $(plugin_PYTHON)
+
+CLEANFILES = $(plugin_DATA)
+DISTCLEANFILES = $(plugin_DATA)

Added: trunk/plugins/dontreallyclose/dontreallyclose.py
==============================================================================
--- (empty file)
+++ trunk/plugins/dontreallyclose/dontreallyclose.py	Wed Jul  2 10:16:47 2008
@@ -0,0 +1,40 @@
+# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
+#
+# Copyright (C) 2008 Jonathan Matthew
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
+
+
+# this plugin is more license than plugin.
+
+import rb
+
+class DontReallyClosePlugin(rb.Plugin):
+	def __init__(self):
+		rb.Plugin.__init__(self)
+		self.delete_event_id = 0
+
+	def delete_event_cb(self, widget, event):
+		widget.hide()
+		return True
+
+	def activate(self, shell):
+		self.delete_event_id = shell.props.window.connect('delete-event', self.delete_event_cb)
+
+	def deactivate(self, shell):
+		if self.delete_event_id != 0:
+			shell.props.window.disconnect(self.delete_event_id)
+			self.delete_event_id = 0
+

Added: trunk/plugins/dontreallyclose/dontreallyclose.rb-plugin.in
==============================================================================
--- (empty file)
+++ trunk/plugins/dontreallyclose/dontreallyclose.rb-plugin.in	Wed Jul  2 10:16:47 2008
@@ -0,0 +1,9 @@
+[RB Plugin]
+Loader=python
+Module=dontreallyclose
+IAge=1
+_Name=Minimize to tray
+_Description=Minimise to the tray when closing the main window
+Authors=Jonathan Matthew
+Copyright=Copyright  2008 Jonathan Matthew
+Website=http://www.rhythmbox.org/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]