self.Encoding_List = gtk.ListStore(gobject.TYPE_STRING)
self.Encoding = gtk.ComboBox()
+
++ active = Settings.encodings[0] # UTF-8
++ if self.frame.Networking.config.has_key("encoding") and
self.frame.Networking.config["encoding"].has_key("network"):
++ network_encoding =
self.frame.Networking.config["encoding"]["network"].upper()
++ if network_encoding in Settings.encodings:
++ active = network_encoding
++
+ if self.frame.Networking.config.has_key("encoding.users") and
self.user in self.frame.Networking.config["encoding.users"]:
-+ active =
Settings.encodings.index(self.frame.Networking.config["encoding.users"][self.user])
-+ else:
-+ active =
Settings.encodings.index(self.frame.Networking.config["encoding"]["network"].upper())
++ user_encoding =
self.frame.Networking.config["encoding.users"][self.user].upper()
++ if user_encoding in Settings.encodings:
++ active = user_encoding
+
-+ self.Encoding.set_active(active)
++ self.Encoding.set_active(Settings.encodings.index(active))
self.Encoding.show()
+ for encoding in Settings.encodings:
+ self.Encoding_List.append([encoding])
self.Encoding.connect("changed", self.OnEncodingChanged)