[Bugs] #1622 UNSP: 3G (GSM) Modem Support

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sun Dec 27 16:03:45 EST 2009

#1622: 3G (GSM) Modem Support
    Reporter:  tch                        |          Owner:  tch                
        Type:  enhancement                |         Status:  new                
    Priority:  Unspecified by Maintainer  |      Milestone:  0.88               
   Component:  sugar                      |        Version:  0.86.x             
    Severity:  Unspecified                |       Keywords:  3G GSM modem usb r?
Distribution:  Ubuntu                     |   Status_field:  Unconfirmed        
Changes (by tch):

  * keywords:  3G GSM modem usb r! => 3G GSM modem usb r?


 class ExtEntry(gtk.Entry):
     Cannot get what Ext means here, I see no problem in calling it just
 Entry or GsmEntry? or something like that


     self.get_method = None
     self.set_method = None
     The idea with using inheritance is that you can declare in Entry these
 two methods and just raise NotImplementedError?, then each subclass would
 override it with their own implementations. Grep the code for
 NotImplementedError? for examples.


     def ignore_changed(self):
         if self.changed_handler is not None:
     It's more usual to use the block and unblock methods:

 That is not what is supposed to do, it is not blocking and then unblocking
 (or viceversa) changed events, just needs to connect to it once, and then
 disconnect from it for good. Just as all the others control panel sections

     box = gtk.HBox(spacing=style.DEFAULT_SPACING)
     label = gtk.Label(entry.label_text + ':')
     If Entry inherits from HBox and contains the label and the entry, it's
 easier to know from where label_text comes. Grep the code for subclasses
 of [HV]Box.

 I really don't want to make the code darker, so I just wanted to have the
 "extended" entry class with the data needed for "control panel section"
 inner-control mechanisms. So now I changed the code to avoid having
 unnecesary stuff on this extended entry class, and keep the code readable.

     label = gtk.Label(entry.label_text + ':')
     May be better that ':' is inside the translatable string, as some
 languages can use another symbol, or have it at the other side (RTL


     logging.error('Could not connect to gsm connection, %s', detail)
     Can you make it logging.exception so we get a nice traceback?


     def __update_state(self, state):
     Why two leading underscores?


     GsmDeviceView? will be instantiated only when needed, but right now
 we'll have also an instance of GsmPalette? even when it is not needed.
 It's not only one class instance, it also beings lots of other objects,
 I'd say a few dozens. At some point we should move all palettes to be
 created lazily, given that instantiating them is fast but cost quite a bit
 of memory. I'm saying this because I have profiled memory usage and
 palettes cost a significant amount of memory.

 Saw the examples at meshbox.py, could someone explain me how that achieves

     If it's only used internally, should be named self._client. About
 creating an instance every time or not, I would leave it at your


     Thanks to you, this is almost ready to go in.

 Hopefully ;)

Ticket URL: <http://bugs.sugarlabs.org/ticket/1622#comment:10>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system

More information about the Bugs mailing list