[Bugs] #1622 UNSP: 3G (GSM) Modem Support
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Thu Dec 24 08:55:37 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 tomeu):
* keywords: 3G GSM modem usb r? => 3G GSM modem usb r!
Comment:
{{{
+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:
+ self.disconnect(self.changed_handler)
}}}
It's more usual to use the block and unblock methods:
http://www.pygtk.org/docs/pygobject/class-gobject.html#method-gobject
--handler-block-by-func
{{{
+ box = gtk.HBox(spacing=style.DEFAULT_SPACING)
+
+ label = gtk.Label(entry.label_text + ':')
+ label.modify_fg(gtk.STATE_NORMAL,
style.COLOR_SELECTION_GREY.get_gdk_color())
+ box.pack_start(label)
}}}
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.
{{{
+ 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
scripts).
{{{
+ 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?
--
Ticket URL: <http://bugs.sugarlabs.org/ticket/1622#comment:8>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list