[Python-apps-commits] r223 - in /packages/screenlets/trunk/debian: changelog install org.screenlets.ScreenletsDaemon.service patches/08-add_timezone_support.patch patches/09-delete-example-files.patch

gilir-guest at users.alioth.debian.org gilir-guest at users.alioth.debian.org
Fri Nov 16 00:43:13 UTC 2007


Author: gilir-guest
Date: Fri Nov 16 00:43:13 2007
New Revision: 223

URL: http://svn.debian.org/wsvn/python-apps/?sc=1&rev=223
Log:
* Add patches from Niv Sardi
 - Add Dbus service
 - Add Timezone support for Clock screenlet
* Delete examples files with no copyright until upstream fixe them


Added:
    packages/screenlets/trunk/debian/org.screenlets.ScreenletsDaemon.service
    packages/screenlets/trunk/debian/patches/08-add_timezone_support.patch
    packages/screenlets/trunk/debian/patches/09-delete-example-files.patch
Modified:
    packages/screenlets/trunk/debian/changelog
    packages/screenlets/trunk/debian/install

Modified: packages/screenlets/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/python-apps/packages/screenlets/trunk/debian/changelog?rev=223&op=diff
==============================================================================
--- packages/screenlets/trunk/debian/changelog (original)
+++ packages/screenlets/trunk/debian/changelog Fri Nov 16 00:43:13 2007
@@ -1,8 +1,12 @@
 screenlets (0.0.10-2) UNRELEASED; urgency=low
 
   [ Julien Lavergne ]
+  * debian/control : change priority to optional
+  * debian/install : add dbus service for screenlets-daemon (Thanks Niv Sardi)
   * debian/rules : add upstream changelog
-  * debian/control : change priority to optional
+  * debian/patches
+   - 08-add_timezone_support.patch : Add timezone support for ClockScreenlets (Thanks Niv Sardi)
+   - 09-delete-example-files.patch : Delete examples until copyright fix
    
  -- Julien Lavergne <julien.lavergne at gmail.com>  Wed, 31 Oct 2007 22:16:26 +0100
 

Modified: packages/screenlets/trunk/debian/install
URL: http://svn.debian.org/wsvn/python-apps/packages/screenlets/trunk/debian/install?rev=223&op=diff
==============================================================================
--- packages/screenlets/trunk/debian/install (original)
+++ packages/screenlets/trunk/debian/install Fri Nov 16 00:43:13 2007
@@ -2,3 +2,4 @@
 /desktop-menu/screenlets-manager.desktop /usr/share/applications
 /desktop-menu/desktop-directories/* /usr/share/desktop-directories
 /desktop-menu/screenlets-daemon.desktop /usr/share/desktop-directories
+/debian/org.screenlets.ScreenletsDaemon.service /usr/share/dbus-1/services/org.screenlets.ScreenletsDaemon.service

Added: packages/screenlets/trunk/debian/org.screenlets.ScreenletsDaemon.service
URL: http://svn.debian.org/wsvn/python-apps/packages/screenlets/trunk/debian/org.screenlets.ScreenletsDaemon.service?rev=223&op=file
==============================================================================
--- packages/screenlets/trunk/debian/org.screenlets.ScreenletsDaemon.service (added)
+++ packages/screenlets/trunk/debian/org.screenlets.ScreenletsDaemon.service Fri Nov 16 00:43:13 2007
@@ -1,0 +1,4 @@
+[D-BUS Service]
+Name=org.screenlets.ScreenletsDaemon
+Exec=/usr/share/screenlets-manager/screenlets-daemon.py
+

Added: packages/screenlets/trunk/debian/patches/08-add_timezone_support.patch
URL: http://svn.debian.org/wsvn/python-apps/packages/screenlets/trunk/debian/patches/08-add_timezone_support.patch?rev=223&op=file
==============================================================================
--- packages/screenlets/trunk/debian/patches/08-add_timezone_support.patch (added)
+++ packages/screenlets/trunk/debian/patches/08-add_timezone_support.patch Fri Nov 16 00:43:13 2007
@@ -1,0 +1,36 @@
+diff -Nur screenlets-0.0.10/src/share/screenlets/Clock/ClockScreenlet.py screenlets-0.0.10.new/src/share/screenlets/Clock/ClockScreenlet.py
+--- screenlets-0.0.10/src/share/screenlets/Clock/ClockScreenlet.py	2007-10-10 17:55:48.000000000 +1000
++++ screenlets-0.0.10.new/src/share/screenlets/Clock/ClockScreenlet.py	2007-10-15 18:23:03.000000000 +1000
+@@ -28,6 +28,7 @@
+ import pango
+ from datetime import datetime
+ import gobject
++from os import environ
+ 
+ 
+ # the service that implements the remote-actions for this screenlet
+@@ -92,6 +93,7 @@
+ 	__alarm_count	= 0
+ 	
+ 	# editable options
++	timezone                = ""
+ 	time_offset		= 0
+ 	face_text		= 'Screenlets'
+ 	face_text_x		= 32
+@@ -134,6 +136,8 @@
+ 		self.add_options_group('Face', 
+ 			'Additional settings for the face-layout ...')
+ 		# add editable settings to this Screenlet
++		self.add_option(StringOption('Clock', 'timezone',
++		       "", 'Time Zone', 'The Time Zone to use for this screenlet'))
+ 		self.add_option(IntOption('Clock', 'time_offset', 
+ 			0, 'Time-Offset', 'The-time offset for this Clock instance. ' + 
+ 			'This can be used to create Clocks for different timezones ...',
+@@ -320,6 +324,7 @@
+ 				
+ 	def update (self):
+ 		"""Update the time and redraw the canvas"""
++		environ['TZ'] = self.timezone
+ 		self.__time = datetime.now()
+ 		if self.alarm_activated:
+ 			self.check_alarm()

Added: packages/screenlets/trunk/debian/patches/09-delete-example-files.patch
URL: http://svn.debian.org/wsvn/python-apps/packages/screenlets/trunk/debian/patches/09-delete-example-files.patch?rev=223&op=file
==============================================================================
--- packages/screenlets/trunk/debian/patches/09-delete-example-files.patch (added)
+++ packages/screenlets/trunk/debian/patches/09-delete-example-files.patch Fri Nov 16 00:43:13 2007
@@ -1,0 +1,251 @@
+diff -Nru screenlets-0.0.10-o/src/share/examples/empty-test-window.py screenlets-0.0.10/src/share/examples/empty-test-window.py
+--- screenlets-0.0.10/src/share/examples/empty-test-window.py	2007-07-23 03:18:28.000000000 +0200
++++ screenlets-0.0.10/src/share/examples/empty-test-window.py	1970-01-01 01:00:00.000000000 +0100
+@@ -1,26 +0,0 @@
+-import gtk
+-#from gobject import GObject
+-
+-# A simple testbed
+-#
+-
+-
+-# testing app class
+-class TestApp:
+-
+-	def __init__ (self):
+-		self.win = gtk.Window()
+-		self.win.show()
+-		self.win.connect('delete-event', self.handle_delete)
+-		
+-	def start (self):
+-		gtk.main()
+-	
+-	def handle_delete (self, window, event):
+-		print "Bye!"
+-		gtk.main_quit()
+-
+-# TEST
+-app = TestApp()
+-app.start()
+-
+diff -Nru screenlets-0.0.10-o/src/share/examples/services-example-2.py screenlets-0.0.10/src/share/examples/services-example-2.py
+--- screenlets-0.0.10/src/share/examples/services-example-2.py	2007-07-17 01:26:47.000000000 +0200
++++ screenlets-0.0.10/src/share/examples/services-example-2.py	1970-01-01 01:00:00.000000000 +0100
+@@ -1,56 +0,0 @@
+-#!/usr/bin/env python
+-
+-# This is another example of accessing the new ScreenletService. It can be used
+-# to access signals and methods within a Screenlet from other applications or
+-# other Screenlets.
+-
+-# import services-module
+-import screenlets.services
+-
+-# check for Notes-service
+-if not screenlets.services.service_is_running('Notes'):
+-	print "Notes-service not found. Please launch the NotesScreenlet first."
+-else:
+-	# get general interface for the NotesScreenlet
+-	iface = screenlets.services.get_service_by_name('Notes')
+-	
+-	# if interface was returned, 
+-	if iface:
+-		try:
+-			# get list with instance ids
+-			ids = iface.list_instances()
+-			for id in ids:
+-				print id
+-			
+-			# easily get id of first instance
+-			#instance_id = ids[0]
+-			instance_id = iface.get_first_instance()
+-
+-			# + SIGNALS: connecting to signals in a screenlet
+-			def instance_added (instance_id):
+-				print "Signal received: Instance '%s' added." % (instance_id)
+-			def instance_removed (instance_id):
+-				print "Signal received: Instance '%s' removed." % (instance_id)
+-			iface.connect_to_signal('instance_added', instance_added)
+-			iface.connect_to_signal('instance_removed', instance_removed)
+-			
+-			# + METHDODS: remote-calling of methods in a Screenlet
+-			# call testing functions
+-			iface.debug('Hello World!')
+-			iface.test()
+-			# add a new instance
+-			iface.add('myNotes')
+-			iface.add('myNotes2')
+-			iface.set('myNotes2', 'theme_name', 'girlie')
+-			iface.set('myNotes2', 'note_text', 'SCREENLETS!!!')
+-			iface.set('myNotes2', 'x', 500)
+-			iface.set('myNotes2', 'y', 700)
+-			
+-			# start mainloop (needed to receive events)
+-			import gobject
+-			mainloop = gobject.MainLoop()
+-			mainloop.run()
+-
+-		except Exception, e:
+-			print "Error: " + str(e)
+-
+diff -Nru screenlets-0.0.10-o/src/share/examples/services-example-3.py screenlets-0.0.10/src/share/examples/services-example-3.py
+--- screenlets-0.0.10/src/share/examples/services-example-3.py	2007-07-20 13:27:04.000000000 +0200
++++ screenlets-0.0.10/src/share/examples/services-example-3.py	1970-01-01 01:00:00.000000000 +0100
+@@ -1,40 +0,0 @@
+-#!/usr/bin/env python
+-
+-# This is an example of accessing the new ScreenletService. It can be used
+-# to access signals and methods within a Screenlet from other applications or
+-# other Screenlets.
+-
+-# import services-module
+-import screenlets.services
+-
+-# check if our needed service is running, exit if not
+-if not screenlets.services.service_is_running('MailCheck'):
+-	print "MailCheckScreenlet is not running."
+-	import sys
+-	sys.exit(1)
+-
+-# get interface to the MailCheckScreenlet's service
+-mc =  screenlets.services.get_service_by_name('MailCheck')
+-
+-# if interface was returned, 
+-if mc:
+-	try:
+-		# get id of first instance (we only want one here)
+-		instance_id = mc.get_first_instance()
+-		
+-		print "try getting/setting normal values"
+-		print mc.get(instance_id, 'x')
+-		mc.set(instance_id, 'x', 400)
+-		
+-		print "try getting/setting protected values"
+-		print mc.get(instance_id, 'pop3_account')
+-		mc.set(instance_id, 'pop3_account', ('user', 'pass'))
+-		
+-		# start mainloop (needed to receive events)
+-		import gobject
+-		mainloop = gobject.MainLoop()
+-		mainloop.run()
+-
+-	except Exception, e:
+-		print "Error: " + str(e)
+-
+diff -Nru screenlets-0.0.10-o/src/share/examples/services-example.py screenlets-0.0.10/src/share/examples/services-example.py
+--- screenlets-0.0.10/src/share/examples/services-example.py	2007-07-16 20:27:57.000000000 +0200
++++ screenlets-0.0.10/src/share/examples/services-example.py	1970-01-01 01:00:00.000000000 +0100
+@@ -1,64 +0,0 @@
+-#!/usr/bin/env python
+-
+-# This is an example of accessing the new ScreenletService. It can be used
+-# to access signals and methods within a Screenlet from other applications or
+-# other Screenlets.
+-
+-# import services-module
+-import screenlets.services
+-
+-# check for Clock-service
+-if not screenlets.services.service_is_running('Clock'):
+-	print "Clock-service not found. Pleaselaunch the ClockScreenlet first."
+-else:
+-	# get general interface for this screenlet
+-	service_iface = screenlets.services.get_service_by_name('Clock')
+-	# get interface to the ClockScreenlet's custom service (we need to
+-	# pass the special interface for the Clock's additonal methods here)
+-	clock_iface =  screenlets.services.get_service_by_name('Clock', 
+-		interface='org.screenlets.Clock')
+-	
+-	# if interface was returned, 
+-	if service_iface:
+-		
+-		try:
+-			# get list with instance ids
+-			ids = service_iface.list_instances()
+-			for id in ids:
+-				print id
+-			
+-			# id of first instance
+-			instance_id = ids[0]
+-			
+-			# + METHDODS: remote-calling of methods in a Screenlet
+-			# call testing functions
+-			service_iface.debug('Hello World!')
+-			service_iface.test()
+-			# set options
+-			#clock.set(instance_id, 'theme_name', 'tango')
+-			service_iface.set(instance_id, 'x', 700)
+-			service_iface.set(instance_id, 'y', 500)
+-			# add a new instance
+-			service_iface.add('myClock')
+-			service_iface.set('myClock', 'scale', 3.5)
+-			service_iface.set('myClock', 'theme_name', 'tango')
+-			# if clock service is available
+-			if clock:
+-				# call special function of the ClockService
+-				#clock.debug('TEST')
+-				print clock_iface.get_time(instance_id)
+-				print clock_iface.get_date(instance_id)
+-			
+-			# + SIGNALS: connecting to signals in a screenlet
+-			def handle_alarm (instance_id):
+-				print "Signal received: Clock '%s' raised alarm." % (instance_id)
+-			clock_iface.connect_to_signal('alarm_start', handle_alarm)
+-			
+-			# start mainloop (needed to receive events)
+-			import gobject
+-			mainloop = gobject.MainLoop()
+-			mainloop.run()
+-
+-		except Exception, e:
+-			print "Error: " + str(e)
+-
+diff -Nru screenlets-0.0.10-o/src/share/screenlets/MailCheck/keyring-test.py screenlets-0.0.10/src/share/screenlets/MailCheck/keyring-test.py
+--- screenlets-0.0.10/src/share/screenlets/MailCheck/keyring-test.py	2007-08-20 00:00:36.000000000 +0200
++++ screenlets-0.0.10/src/share/screenlets/MailCheck/keyring-test.py	1970-01-01 01:00:00.000000000 +0100
+@@ -1,45 +0,0 @@
+-import gtk
+-
+-try: 
+-	import gnomekeyring 
+-except ImportError: 
+-	HAVE_GNOMEKEYRING = False 
+-else: 
+-	HAVE_GNOMEKEYRING = True 
+-
+-# TEST:
+-#import gobject
+-#gtk.set_application_name("keyring-test")
+-if HAVE_GNOMEKEYRING:
+-	# check availability
+-	if not gnomekeyring.is_available():
+-		print "Keyring not available."
+-	# list names of keyrings and use the first one we can find
+-	keyring_list = gnomekeyring.list_keyring_names_sync()
+-	if len(keyring_list) == 0:
+-		print "No keyrings available."
+-		import sys
+-		sys.exit(1)
+-	else:
+-		print "We have %i keyrings" % len(keyring_list)
+-		print "KEYRING: %s" % keyring_list[0]
+-	# name/password to store
+-	name		= 'myname'
+-	password	= 'mysecret'
+-	# get default keyring
+-	keyring = gnomekeyring.get_default_keyring_sync() 	# crashes if no default exists
+-	# create attributes
+-	attribs = dict(name=name, magic='something')
+-	
+-	# create keyring item with password
+-	auth_token = gnomekeyring.item_create_sync(keyring, 
+-		gnomekeyring.ITEM_GENERIC_SECRET, name, attribs, password, True) 
+-	print auth_token
+-	print "save: token for account %s: %i" % (name, auth_token) 
+-	token = "gnomekeyring:%i" % (auth_token,) 
+-	print token
+-	
+-	# now read it back from the keyring
+-	print "Password read from keyring is:"
+-	print gnomekeyring.item_get_info_sync(keyring, auth_token).get_secret()
+-




More information about the Python-apps-commits mailing list