Skip to content

Commit

Permalink
Instead of creating a new tab, use current connection to do reconnection
Browse files Browse the repository at this point in the history
When click the reconnect button,
the previous version will create a new tab(a new connection) to do reconnection.

Instead of doing this, we use the current connection(current tab) to do reconnection.

Fix issue pcman-bbs#33
  • Loading branch information
NCTULouis committed Jun 7, 2016
1 parent 9a8b4b7 commit a2b41fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/mainframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1759,12 +1759,11 @@ void CMainFrame::OnEmoticons(GtkMenuItem* mitem UNUSED, CMainFrame* _this)
void CMainFrame::OnReconnect(GtkMenuItem* mitem UNUSED, CMainFrame* _this)
{
CTelnetCon* con = _this->GetCurCon();

if( !con )
return;
if( con->IsClosed() )
con->Reconnect();
else
_this->NewCon( con->m_Site.m_Name, con->m_Site.m_URL, &con->m_Site);

con->Reconnect();
}

void CMainFrame::FlashWindow( bool flash )
Expand Down

0 comments on commit a2b41fd

Please sign in to comment.