Ticket #1768: 1768_3G_cp_section_cleanup.patch
| File 1768_3G_cp_section_cleanup.patch, 4.3 KB (added by erikos, 3 years ago) |
|---|
-
extensions/cpsection/modemconfiguration/view.py
diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py index 2445005..b236f3f 100644
a b 37 37 self._changed_handler = None 38 38 self._is_valid = True 39 39 40 label = gtk.Label(label_text)41 label.modify_fg(gtk.STATE_NORMAL,40 self.label = gtk.Label(label_text) 41 self.label.modify_fg(gtk.STATE_NORMAL, 42 42 style.COLOR_SELECTION_GREY.get_gdk_color()) 43 self.pack_start(label, True, True) 44 label.show() 43 self.label.set_alignment(1, 0.5) 44 self.pack_start(self.label, expand=False) 45 self.label.show() 45 46 46 47 self._entry = gtk.Entry(25) 47 48 self._entry.connect('changed', self.__entry_changed_cb) … … 120 121 121 122 class ApnEntry(EntryWithLabel): 122 123 def __init__(self, model): 123 EntryWithLabel.__init__(self, _('A PN:'))124 EntryWithLabel.__init__(self, _('Access Point Name (APN):')) 124 125 self._model = model 125 126 126 127 def get_value(self): … … 131 132 132 133 class PinEntry(EntryWithLabel): 133 134 def __init__(self, model): 134 EntryWithLabel.__init__(self, _('P IN:'))135 EntryWithLabel.__init__(self, _('Personal Identity Number (PIN):')) 135 136 self._model = model 136 137 137 138 def get_value(self): … … 142 143 143 144 class PukEntry(EntryWithLabel): 144 145 def __init__(self, model): 145 EntryWithLabel.__init__(self, _('P UK:'))146 EntryWithLabel.__init__(self, _('Personal Unblocking Key (PUK):')) 146 147 self._model = model 147 148 148 149 def get_value(self): … … 161 162 162 163 self.set_border_width(style.DEFAULT_SPACING) 163 164 self.set_spacing(style.DEFAULT_SPACING) 165 self._group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) 166 167 explanation = _("You will need to provide the following " \ 168 "information to set up a mobile " \ 169 "broadband connection to a cellular "\ 170 "(3G) network.") 171 self._text = gtk.Label(explanation) 172 self._text.set_width_chars(100) 173 self._text.set_line_wrap(True) 174 self._text.set_alignment(0, 0) 175 self.pack_start(self._text, False) 176 self._text.show() 164 177 165 178 self._username_entry = UsernameEntry(model) 166 179 self._username_entry.connect('notify::is-valid', 167 180 self.__notify_is_valid_cb) 181 self._group.add_widget(self._username_entry.label) 168 182 self.pack_start(self._username_entry, expand=False) 169 183 self._username_entry.show() 170 184 171 185 self._password_entry = PasswordEntry(model) 172 186 self._password_entry.connect('notify::is-valid', 173 187 self.__notify_is_valid_cb) 188 self._group.add_widget(self._password_entry.label) 174 189 self.pack_start(self._password_entry, expand=False) 175 190 self._password_entry.show() 176 191 177 192 self._number_entry = NumberEntry(model) 178 193 self._number_entry.connect('notify::is-valid', 179 194 self.__notify_is_valid_cb) 195 self._group.add_widget(self._number_entry.label) 180 196 self.pack_start(self._number_entry, expand=False) 181 197 self._number_entry.show() 182 198 183 199 self._apn_entry = ApnEntry(model) 184 200 self._apn_entry.connect('notify::is-valid', 185 201 self.__notify_is_valid_cb) 202 self._group.add_widget(self._apn_entry.label) 186 203 self.pack_start(self._apn_entry, expand=False) 187 204 self._apn_entry.show() 188 205 189 206 self._pin_entry = PinEntry(model) 190 207 self._pin_entry.connect('notify::is-valid', 191 208 self.__notify_is_valid_cb) 209 self._group.add_widget(self._pin_entry.label) 192 210 self.pack_start(self._pin_entry, expand=False) 193 211 self._pin_entry.show() 194 212 195 213 self._puk_entry = PukEntry(model) 196 214 self._puk_entry.connect('notify::is-valid', 197 215 self.__notify_is_valid_cb) 216 self._group.add_widget(self._puk_entry.label) 198 217 self.pack_start(self._puk_entry, expand=False) 199 218 self._puk_entry.show() 200 219
