Is it possible change title of tab session when you change catalog combobox?
from: 1 - Test Connection (DB1) as test to: 1 - Test Connection (DB2) as test
Reguards.
Right-click the name in the tab and use "Rename Session/Tab"
It probably would be a nice enhancement to put the old name into the textbox for editing (though I never use that feature anyway).
This code enhancement in class net.sourceforge.squirrel_sql.client.session.action.RenameSessionAction should do the job as suggested by sfst:
public void actionPerformed(ActionEvent evt) { setSession(_app.getSessionManager().getActiveSession()); String oldTitle; if(!_session.getActiveSessionWindow().equals(_app.getWindowManager().getAllFramesOfSession(_session.getIdentifier())[0])) { oldTitle = _session.getActiveSessionWindow().getTitle(); } else { oldTitle = _session.getTitle(); } String newTitle = (String) JOptionPane.showInputDialog(_app.getMainFrame(), s_stringMgr.getString("RenameSessionAction.label"), s_stringMgr.getString("RenameSessionAction.title"), JOptionPane.QUESTION_MESSAGE, null, null, oldTitle); if(null == newTitle) { // Dialog was canceled. return; } if(!_session.getActiveSessionWindow().equals(_app.getWindowManager().getAllFramesOfSession(_session.getIdentifier())[0])) { _session.getActiveSessionWindow().setTitle(newTitle); } else { _session.setTitle(newTitle); updateGui(); } }
Hope this is of any help.
Chris, I just committed your code to our GIT repository. It will be available in future snapshots and versions. Thanks Gerd
Log in to post a comment.
Right-click the name in the tab and use "Rename Session/Tab"
It probably would be a nice enhancement to put the old name into the textbox for editing (though I never use that feature anyway).
Last edit: sfst 2015-12-11
This code enhancement in class net.sourceforge.squirrel_sql.client.session.action.RenameSessionAction should do the job as suggested by sfst:
Hope this is of any help.
Chris, I just committed your code to our GIT repository. It will be available in future snapshots and versions.
Thanks
Gerd