From kde-commits Thu Jul 01 13:26:58 2010 From: Stephan Binner Date: Thu, 01 Jul 2010 13:26:58 +0000 To: kde-commits Subject: [Konversation] 40cba99: Added shortcut for /clear Message-Id: <20100701132658.47528BB549D () projects ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=127799752015384 commit 40cba99b8a396f36c38b80459a435b9296ebd1da Author: Stephan Binner Date: Sat Oct 25 10:20:48 2003 +0000 Added shortcut for /clear svn path=/trunk/kdeextragear-2/konversation/; revision=261807 diff --git a/TODO b/TODO index ebc070b..de4c60b 100644 --- a/TODO +++ b/TODO @@ -12,7 +12,6 @@ additionally do some kind of marker to the lines that came in while being away; Make a command that makes you go to away mode on all servers /amsg and /ame for sending messages/actions to all open channels/queries Per nick coloring in channel discussion -Keyboard shortcut for /clear Use checkForUtf8 to make non-UTF8-users able to at least read UTF8. DCC RESUME should start counting cps from the beginning Joining large channels is very slow diff --git a/konversation/konversationmainwindow.cpp b/konversation/konversationmainwindow.cpp index 3eb06b9..09efa12 100644 --- a/konversation/konversationmainwindow.cpp +++ b/konversation/konversationmainwindow.cpp @@ -107,8 +107,9 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow() new KAction(i18n("Go to Tab Number %1").arg( 9),0,KShortcut("Alt+9"),this,SLOT(goToTab8()),actionCollection(),"go_to_tab_9"); new KAction(i18n("Go to Tab Number %1").arg(10),0,KShortcut("Alt+0"),this,SLOT(goToTab9()),actionCollection(),"go_to_tab_0"); - new KAction(i18n("Find Text"),0,KShortcut("F3"),this,SLOT(findTextShortcut()),actionCollection(),"find_text"); - new KAction(i18n("&Insert IRC Color"), "colorize", CTRL+Key_K, this, SLOT(addIRCColor()), actionCollection(), "irc_colors"); + new KAction(i18n("Clear Window"),0,KShortcut("Ctrl+L"),this,SLOT(clearWindow()),actionCollection(),"clear_window"); + new KAction(i18n("Find Text..."),0,KShortcut("F3"),this,SLOT(findTextShortcut()),actionCollection(),"find_text"); + new KAction(i18n("&Insert IRC Color..."), "colorize", CTRL+Key_K, this, SLOT(addIRCColor()), actionCollection(), "irc_colors"); // Initialize KMainWindow->statusBar() statusBar(); @@ -692,6 +693,12 @@ void KonversationMainWindow::findTextShortcut() } } +void KonversationMainWindow::clearWindow() +{ + if (frontView) + frontView->getTextView()->clear(); +} + void KonversationMainWindow::openNotifications() { #ifdef USE_KNOTIFY diff --git a/konversation/konversationmainwindow.h b/konversation/konversationmainwindow.h index 4d89e90..87191c0 100644 --- a/konversation/konversationmainwindow.h +++ b/konversation/konversationmainwindow.h @@ -130,6 +130,7 @@ class KonversationMainWindow : public KMainWindow void findTextShortcut(); void addIRCColor(); + void clearWindow(); protected: enum StatusID