FirstTimeWizard: add functionlity for servers button, fix comment for code to have space after #, fix comments and other coding styles, add pango me fixmes, add more and better strings
This commit is contained in:
parent
5eea887c43
commit
0be58af7ad
|
@ -2765,7 +2765,7 @@ class FirstTimeWizardWindow:
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
self.window.show_all()
|
self.window.show_all()
|
||||||
|
|
||||||
# Connect events from comoboboxentry.child (can't be done via glade)
|
# Connect events from comboboxentry.child
|
||||||
server_comboboxentry = self.xml.get_widget('existing_server_comboboxentry')
|
server_comboboxentry = self.xml.get_widget('existing_server_comboboxentry')
|
||||||
server_comboboxentry.child.connect('key_press_event',
|
server_comboboxentry.child.connect('key_press_event',
|
||||||
self.on_server_comboboxentry_key_press_event)
|
self.on_server_comboboxentry_key_press_event)
|
||||||
|
@ -2775,13 +2775,13 @@ class FirstTimeWizardWindow:
|
||||||
self.on_server_comboboxentry_key_press_event)
|
self.on_server_comboboxentry_key_press_event)
|
||||||
|
|
||||||
# parse servers.xml
|
# parse servers.xml
|
||||||
servers_xml = os.path.join(gajim.DATA_DIR, 'other/servers.xml')
|
servers_xml = os.path.join(gajim.DATA_DIR, 'other', 'servers.xml')
|
||||||
servers = gtkgui_helpers.parse_server_xml(servers_xml)
|
servers = gtkgui_helpers.parse_server_xml(servers_xml)
|
||||||
servers_model = gtk.ListStore(str, int)
|
servers_model = gtk.ListStore(str, int)
|
||||||
for server in servers:
|
for server in servers:
|
||||||
servers_model.append((str(server[0]), int(server[1])))
|
servers_model.append((str(server[0]), int(server[1])))
|
||||||
|
|
||||||
# Put servers into comboboxes
|
# Put servers into comboboxentries
|
||||||
server_comboboxentry.set_model(servers_model)
|
server_comboboxentry.set_model(servers_model)
|
||||||
server_comboboxentry.set_text_column(0)
|
server_comboboxentry.set_text_column(0)
|
||||||
register_server_comboboxentry.set_model(servers_model)
|
register_server_comboboxentry.set_model(servers_model)
|
||||||
|
@ -2795,7 +2795,7 @@ class FirstTimeWizardWindow:
|
||||||
|
|
||||||
|
|
||||||
def on_server_features_button_clicked(self, widget):
|
def on_server_features_button_clicked(self, widget):
|
||||||
pass
|
helpers.launch_browser_mailer('url', 'http://www.jabber.org/network/')
|
||||||
|
|
||||||
def on_save_password_checkbutton_toggled(self, widget):
|
def on_save_password_checkbutton_toggled(self, widget):
|
||||||
if widget.get_name() == 'save_password_checkbutton':
|
if widget.get_name() == 'save_password_checkbutton':
|
||||||
|
@ -2851,12 +2851,14 @@ class FirstTimeWizardWindow:
|
||||||
if cur_page == 1:
|
if cur_page == 1:
|
||||||
widgets = self.get_widgets('existing_')
|
widgets = self.get_widgets('existing_')
|
||||||
register_new = False
|
register_new = False
|
||||||
|
#FIXME: pango me
|
||||||
finish_text = _('Account has been added successfully.\n'
|
finish_text = _('Account has been added successfully.\n'
|
||||||
'You can set advanced options by using "Edit->Accounts" from the main window.')
|
'You can set advanced options by using "Edit->Accounts" from the main window.')
|
||||||
elif cur_page == 2:
|
elif cur_page == 2:
|
||||||
widgets = self.get_widgets('register_')
|
widgets = self.get_widgets('register_')
|
||||||
register_new = True
|
register_new = True
|
||||||
finish_text = _('Your new account has been created and added to your gajim configuration.\n'
|
#FIXME: pango me
|
||||||
|
finish_text = _('Your new account has been created successfully.\n'
|
||||||
'You can set advanced account options using "Edit->Accounts" in the main window menu.')
|
'You can set advanced account options using "Edit->Accounts" in the main window menu.')
|
||||||
|
|
||||||
user = widgets['nick_entry'].get_text().decode('utf-8')
|
user = widgets['nick_entry'].get_text().decode('utf-8')
|
||||||
|
@ -2877,11 +2879,11 @@ class FirstTimeWizardWindow:
|
||||||
|
|
||||||
def check_data(self, username, server):
|
def check_data(self, username, server):
|
||||||
if len(username) == 0:
|
if len(username) == 0:
|
||||||
dialogs.ErrorDialog(
|
dialogs.ErrorDialog(_('Username is missing'),
|
||||||
_('You need to enter a username to add an account.')).get_response()
|
_('You need to enter a username to add an account.')).get_response()
|
||||||
return False
|
return False
|
||||||
elif len(server) == 0:
|
elif len(server) == 0:
|
||||||
dialogs.ErrorDialog(
|
dialogs.ErrorDialog(_('Server address is missing'),
|
||||||
_('You need to enter a valid server address to add an account.')).get_response()
|
_('You need to enter a valid server address to add an account.')).get_response()
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
@ -2913,7 +2915,6 @@ _('You need to enter a valid server address to add an account.')).get_response()
|
||||||
|
|
||||||
def on_useproxy_expander_activate(self, widget):
|
def on_useproxy_expander_activate(self, widget):
|
||||||
widgets = self.get_matching_widgets(widget)
|
widgets = self.get_matching_widgets(widget)
|
||||||
#FIXME: Nikos? Gtk.Entrys are sensitive and editable, but greyed out? Christoph
|
|
||||||
|
|
||||||
def update_jid(self,widget):
|
def update_jid(self,widget):
|
||||||
widgets = self.get_matching_widgets(widget)
|
widgets = self.get_matching_widgets(widget)
|
||||||
|
@ -2967,7 +2968,7 @@ _('You need to enter a valid server address to add an account.')).get_response()
|
||||||
if config['savepass']:
|
if config['savepass']:
|
||||||
gajim.connections[name].password = config['password']
|
gajim.connections[name].password = config['password']
|
||||||
# update variables
|
# update variables
|
||||||
self.plugin.windows[name] = {'infos': {}, 'chats': {}, 'gc': {}, \
|
self.plugin.windows[name] = {'infos': {}, 'chats': {}, 'gc': {},
|
||||||
'gc_config': {}}
|
'gc_config': {}}
|
||||||
self.plugin.windows[name]['xml_console'] = \
|
self.plugin.windows[name]['xml_console'] = \
|
||||||
dialogs.XMLConsoleWindow(self.plugin, name)
|
dialogs.XMLConsoleWindow(self.plugin, name)
|
||||||
|
|
Loading…
Reference in New Issue