changeset a04906b5d788 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=a04906b5d788 description: fix registering an account
diffstat:
data/gui/account_creation_wizard_window.ui | 25 +++++++++++++------------ src/common/connection.py | 4 ++-- src/common/connection_handlers_events.py | 11 ++++++----- src/dataforms_widget.py | 3 ++- 4 files changed, 23 insertions(+), 20 deletions(-)
diffs (145 lines):
diff -r 2f524e1f9bb8 -r a04906b5d788 data/gui/account_creation_wizard_window.ui --- a/data/gui/account_creation_wizard_window.ui Fri Jan 04 22:31:30 2013 +0100 +++ b/data/gui/account_creation_wizard_window.ui Fri Jan 04 23:11:07 2013 +0100 @@ -12,6 +12,12 @@ </row> </data> </object> + <object class="GtkListStore" id="server_liststore"> + <columns> + <!-- column-name gchararray1 --> + <column type="gchararray"/> + </columns> + </object> <object class="GtkEntryCompletion" id="server_entrycompletion"> <property name="model">server_liststore</property> <property name="text_column">0</property> @@ -36,6 +42,7 @@ <object class="GtkNotebook" id="notebook"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="show_tabs">False</property> <property name="show_border">False</property> <child> <object class="GtkVBox" id="vbox78"> @@ -276,7 +283,7 @@ <property name="receives_default">False</property> <property name="use_action_appearance">False</property> <property name="use_underline">True</property> - <property name="xalign">0.5</property> + <property name="xalign">0</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_anonymous_checkbutton1_toggled" swapped="no"/> </object> @@ -404,7 +411,7 @@ <property name="receives_default">False</property> <property name="use_action_appearance">False</property> <property name="use_underline">True</property> - <property name="xalign">0.5</property> + <property name="xalign">0</property> <property name="draw_indicator">True</property> </object> <packing> @@ -484,7 +491,7 @@ <property name="receives_default">False</property> <property name="use_action_appearance">False</property> <property name="use_underline">True</property> - <property name="xalign">0.5</property> + <property name="xalign">0</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_custom_host_port_checkbutton_toggled" swapped="no"/> </object> @@ -649,7 +656,7 @@ <property name="receives_default">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="use_action_appearance">False</property> - <property name="xalign">0.5</property> + <property name="xalign">0</property> <property name="draw_indicator">True</property> </object> <packing> @@ -793,7 +800,7 @@ <property name="receives_default">False</property> <property name="use_action_appearance">False</property> <property name="use_underline">True</property> - <property name="xalign">0.5</property> + <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> </object> @@ -812,7 +819,7 @@ <property name="receives_default">False</property> <property name="use_action_appearance">False</property> <property name="use_underline">True</property> - <property name="xalign">0.5</property> + <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> </object> @@ -1028,10 +1035,4 @@ </object> </child> </object> - <object class="GtkListStore" id="server_liststore"> - <columns> - <!-- column-name gchararray1 --> - <column type="gchararray"/> - </columns> - </object> </interface> diff -r 2f524e1f9bb8 -r a04906b5d788 src/common/connection.py --- a/src/common/connection.py Fri Jan 04 22:31:30 2013 +0100 +++ b/src/common/connection.py Fri Jan 04 23:11:07 2013 +0100 @@ -913,8 +913,8 @@ self.connection.SendAndCallForResponse(iq, _on_register_result) else: - if self.new_account_form.keys().sort() != \ - conf.keys().sort(): + if list(self.new_account_form.keys()).sort() != \ + list(conf.keys()).sort(): # requested config has changed since first connection reason = _('Server %s provided a different ' 'registration form') % data[0] diff -r 2f524e1f9bb8 -r a04906b5d788 src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Fri Jan 04 22:31:30 2013 +0100 +++ b/src/common/connection_handlers_events.py Fri Jan 04 23:11:07 2013 +0100 @@ -1560,12 +1560,13 @@ try: self.errnum = self.conn.connection.Connection.ssl_errnum except AttributeError: - self.errnum = -1 # we don't have an errnum + self.errnum = [] # we don't have an errnum self.ssl_msg = '' - if self.errnum > 0: - from common.connection import ssl_error - self.ssl_msg = ssl_error.get(self.errnum, _( - 'Unknown SSL error: %d') % self.errnum) + for er in self.errnum: + if er > 0: + from common.connection import ssl_error + self.ssl_msg = ssl_error.get(er, _('Unknown SSL error: %d') % \ + er) self.ssl_cert = '' if hasattr(self.conn.connection.Connection, 'ssl_cert_pem'): self.ssl_cert = self.conn.connection.Connection.ssl_cert_pem diff -r 2f524e1f9bb8 -r a04906b5d788 src/dataforms_widget.py --- a/src/dataforms_widget.py Fri Jan 04 22:31:30 2013 +0100 +++ b/src/dataforms_widget.py Fri Jan 04 23:11:07 2013 +0100 @@ -26,6 +26,7 @@ multiple - these which may contain more data (with <reported/> element).'''
from gi.repository import Gtk +from gi.repository import Gdk from gi.repository import GdkPixbuf from gi.repository import GObject import base64 @@ -566,7 +567,7 @@ for uri in field.media.uris: if uri.type_.startswith('image/'): try: - img_data = base64.decodestring(uri.uri_data) + img_data = base64.b64decode(uri.uri_data) pixbuf_l = GdkPixbuf.PixbufLoader() pixbuf_l.write(img_data) pixbuf_l.close()