diff options
| author | 2010-05-10 16:20:30 +0000 | |
|---|---|---|
| committer | 2010-05-10 16:20:30 +0000 | |
| commit | 5e566abbb1fc3bf7a530390d055d0f777f89e3d6 (patch) | |
| tree | 6bcec65b90802057b3a83ffda785737c181ebcb9 /src/modules/channelsjoin/channelsjoinwindow.cpp | |
| parent | fix for #783 (diff) | |
| download | KVIrc-5e566abbb1fc3bf7a530390d055d0f777f89e3d6.tar.gz KVIrc-5e566abbb1fc3bf7a530390d055d0f777f89e3d6.tar.bz2 KVIrc-5e566abbb1fc3bf7a530390d055d0f777f89e3d6.zip | |
added a button to clear recent channels list in "join channels" dialog
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4315 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/channelsjoin/channelsjoinwindow.cpp')
| -rw-r--r-- | src/modules/channelsjoin/channelsjoinwindow.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules/channelsjoin/channelsjoinwindow.cpp b/src/modules/channelsjoin/channelsjoinwindow.cpp index 509c92a6c..d98953132 100644 --- a/src/modules/channelsjoin/channelsjoinwindow.cpp +++ b/src/modules/channelsjoin/channelsjoinwindow.cpp @@ -104,6 +104,9 @@ KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name) // Join on return pressed connect(m_pRegButton,SIGNAL(clicked()),this,SLOT(regClicked())); + m_pClearButton = new QPushButton(__tr2qs("Clear Recent"),hb); + connect(m_pClearButton,SIGNAL(clicked()),this,SLOT(clearClicked())); + m_pShowAtStartupCheck = new QCheckBox(__tr2qs("Show this window after connecting"),this); m_pShowAtStartupCheck->setChecked(KVI_OPTION_BOOL(KviOption_boolShowChannelsJoinOnIrc)); g->addWidget(m_pShowAtStartupCheck,3,0); @@ -309,6 +312,22 @@ void KviChannelsJoinWindow::regClicked() } } +void KviChannelsJoinWindow::clearClicked() +{ + QString szCmd = "option stringlistRecentChannels"; + + KviConsole * c = g_pApp->topmostConnectedConsole(); + if(!c) + return; // no connection + + KviWindow * w = g_pActiveWindow; + if(w->console() != c) + w = c; + + KviKvsScript::run(szCmd,w); + fillListView(); +} + /* void KviChannelsJoinWindow::whoClicked() { |
