gnome-lirc-properties r22 - in trunk: . gnome_lirc_properties gnome_lirc_properties/ui web
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-lirc-properties r22 - in trunk: . gnome_lirc_properties gnome_lirc_properties/ui web
- Date: Wed, 30 Apr 2008 13:08:58 +0100 (BST)
Author: murrayc
Date: Wed Apr 30 12:08:58 2008
New Revision: 22
URL: http://svn.gnome.org/viewvc/gnome-lirc-properties?rev=22&view=rev
Log:
2008-04-30 Murray Cumming <murrayc murrayc com>
* gnome_lirc_properties/lirc.pyL RemoteL Added __set_contributor(),
__set_vendor(), and __set_product(). __repr__(): Used them to make
these properties writeable.
* gnome_lirc_properties/ui/CustomConfiguration.py;
CustomConfiguration._on_response(): Set these properties so that
they are written to the custom lird.conf.gnome file, so they are shown
again when reopening the custom configuration.
This fixes bug #530504.
Modified:
trunk/ChangeLog
trunk/gnome_lirc_properties/lirc.py
trunk/gnome_lirc_properties/ui/CustomConfiguration.py
trunk/web/service.wsgi
Modified: trunk/gnome_lirc_properties/lirc.py
==============================================================================
--- trunk/gnome_lirc_properties/lirc.py (original)
+++ trunk/gnome_lirc_properties/lirc.py Wed Apr 30 12:08:58 2008
@@ -197,14 +197,35 @@
mechanism.WriteRemoteConfiguration(self.configuration)
+ def __set_contributor(self, value):
+ '''
+ Updates the contributor property of this remote.
+ '''
+
+ self.__contributor = value
+
+ def __set_vendor(self, value):
+ '''
+ Updates the vendor property of this remote.
+ '''
+
+ self.__vendor = value
+
+ def __set_product(self, value):
+ '''
+ Updates the product property of this remote.
+ '''
+
+ self.__product = value
+
def __repr__(self):
return '<Remote: %s>' % self.__name
# pylint: disable-msg=W0212
name = property(lambda self: self.__name)
- product = property(lambda self: self.__product)
- vendor = property(lambda self: self.__vendor)
- contributor = property(lambda self: self.__contributor)
+ product = property(lambda self: self.__product, __set_product)
+ vendor = property(lambda self: self.__vendor, __set_vendor)
+ contributor = property(lambda self: self.__contributor, __set_contributor)
configuration = property(__get_configuration)
Modified: trunk/gnome_lirc_properties/ui/CustomConfiguration.py
==============================================================================
--- trunk/gnome_lirc_properties/ui/CustomConfiguration.py (original)
+++ trunk/gnome_lirc_properties/ui/CustomConfiguration.py Wed Apr 30 12:08:58 2008
@@ -386,6 +386,8 @@
def on_upload_finished(message):
'''Informs the user about successful uploads.'''
+ # The message is usually some "thanks" text from the server side:
+ # TODO: Is this wise? It will not be translated?
show_message(self.__dialog, _('Upload Succeeded'),
message, message_type=gtk.MESSAGE_INFO)
self.__dialog.set_sensitive(True)
@@ -692,6 +694,13 @@
if gtk.RESPONSE_OK == response:
try:
service = backend.get_service()
+
+ # Get the entered basic information,
+ # so it will be written to the configuration file:
+ self.__remote.contributor = self.contributor_name
+ self.__remote.vendor = self.vendor_name
+ self.__remote.product = self.product_name
+
self.__remote.update_configuration(service)
service.ManageLircDaemon('restart')
Modified: trunk/web/service.wsgi
==============================================================================
--- trunk/web/service.wsgi (original)
+++ trunk/web/service.wsgi Wed Apr 30 12:08:58 2008
@@ -269,7 +269,7 @@
return html_page(context, httplib.OK, _('Upload Succeeded'),
_('Upload of your configuration file succeeded. '
- 'Thanks alot for contributing.'))
+ 'Thanks for contributing.'))
def send_archive(context, filename, must_exist=False):
'''Sends the specified tarball.'''
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]