Add profile_name or login details in title
issue6598 review42471002
This commit is contained in:
1 parent
2f587dd73a
commit
309fe6944a
2 files changed
+13
-3
No files matched your search
@@ -1,3 +1,5 @@
|
||||
* Use profile name or login details in title
|
||||
|
||||
Version 4.4.0 - 2017-05-01
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Verify certificate with default CA
|
||||
|
||||
+11
-3
@@ -377,10 +377,17 @@ class Main(object):
|
||||
self.global_search_entry.grab_focus()
|
||||
|
||||
def set_title(self, value=''):
|
||||
title = CONFIG['client.title']
|
||||
if CONFIG['login.profile']:
|
||||
login_info = CONFIG['login.profile']
|
||||
else:
|
||||
login_info = '%s@%s/%s' % (
|
||||
CONFIG['login.login'],
|
||||
CONFIG['login.host'],
|
||||
CONFIG['login.db'])
|
||||
titles = [CONFIG['client.title'], login_info]
|
||||
if value:
|
||||
title += ' - ' + value
|
||||
self.window.set_title(title)
|
||||
titles.append(value)
|
||||
self.window.set_title(' - '.join(titles))
|
||||
|
||||
def _set_menu_connection(self):
|
||||
menu_connection = gtk.Menu()
|
||||
@@ -847,6 +854,7 @@ class Main(object):
|
||||
raise
|
||||
func = lambda parameters: rpc.login(
|
||||
host, port, database, username, parameters, language)
|
||||
self.set_title() # Adds username/profile while password is asked
|
||||
try:
|
||||
common.Login(func)
|
||||
except Exception, exception:
|
||||
|
||||
Reference in new issue
Block a user