if we were to edit password/passphrase then Hidden string was saved as our password. now make it not editable
This commit is contained in:
parent
50ac7f932b
commit
e969ff6558
2 changed files with 10 additions and 8 deletions
|
@ -75,15 +75,18 @@ class AdvancedConfigurationWindow:
|
|||
treeview.set_model(self.modelfilter)
|
||||
|
||||
# connect signal for selection change
|
||||
treeview.get_selection().connect('changed', self.on_advanced_treeview_selection_changed)
|
||||
treeview.get_selection().connect('changed',
|
||||
self.on_advanced_treeview_selection_changed)
|
||||
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
self.plugin.windows['advanced_config'] = self
|
||||
|
||||
def cb_value_column_data(self, col, cell, model, iter):
|
||||
opttype = model[iter][2].decode('utf-8')
|
||||
if opttype == 'boolean':
|
||||
optname = model[iter][0]
|
||||
opttype = model[iter][2]
|
||||
if opttype == 'boolean' or optname.find('password') != -1 or\
|
||||
optname.find('passphrase') != -1:
|
||||
cell.set_property('editable', 0)
|
||||
else:
|
||||
cell.set_property('editable', 1)
|
||||
|
@ -166,8 +169,7 @@ class AdvancedConfigurationWindow:
|
|||
if val[OPT_TYPE]:
|
||||
type = val[OPT_TYPE][0]
|
||||
if name.find('password') != -1 or name.find('passphrase') != -1:
|
||||
print name
|
||||
val[OPT_VAL] = _('Hidden')
|
||||
val[OPT_VAL] = _('Hidden') # override passwords with this string
|
||||
model.append(iter, [name, val[OPT_VAL], type])
|
||||
|
||||
def visible_func(self, model, iter):
|
||||
|
|
|
@ -1674,12 +1674,12 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
|||
if not account in self.collapsed_rows:
|
||||
self.collapsed_rows.append(account)
|
||||
|
||||
def on_editing_started (self, cell, event, row):
|
||||
def on_editing_started(self, cell, event, row):
|
||||
''' start editing a cell in the tree '''
|
||||
path = self.tree.get_cursor()[0]
|
||||
self.editing_path = path
|
||||
|
||||
def on_editing_canceled (self, cell):
|
||||
def on_editing_canceled(self, cell):
|
||||
'''editing has been canceled'''
|
||||
path = self.tree.get_cursor()[0]
|
||||
# do not set new name if row order has changed
|
||||
|
@ -1695,7 +1695,7 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
|||
# restore the number of resources string at the end of contact name
|
||||
if type == 'contact' and len(gajim.contacts[account][jid]) > 1:
|
||||
self.draw_contact(jid, account)
|
||||
# reset editing to False
|
||||
# reset editable to False
|
||||
model[iter][5] = False
|
||||
|
||||
def on_cell_edited(self, cell, row, new_text):
|
||||
|
|
Loading…
Add table
Reference in a new issue