Bug 103102 - Shortcut to hide/show nick list missing
Summary: Shortcut to hide/show nick list missing
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Michael Goettsche
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-03 00:04 UTC by Peter Grandi
Modified: 2005-04-17 13:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Grandi 2005-04-03 00:04:28 UTC
Version:           0.17 #3001 (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

It would be nice to have a shortcut binding to toggle quickly the nick list.

BTW, congratulations to whoever decided (correctly) to have it on the right.
Comment 1 Michael Goettsche 2005-04-17 13:57:29 UTC
CVS commit by goettsche: 

Add shortcut for quickly toggling the nick list on/off.

BUGS:103102


  M +10 -1     channel.cpp   1.314
  M +2 -0      channel.h   1.114
  M +16 -0     konversationmainwindow.cpp   1.234
  M +3 -1      konversationmainwindow.h   1.83
  M +2 -1      konversationui.rc   1.54


--- kdeextragear-2/konversation/konversation/channel.cpp  #1.313:1.314
@@ -191,5 +191,5 @@ Channel::Channel(QWidget* parent) : Chat
   connect(textView,SIGNAL(popupCommand(int)),this,SLOT(popupChannelCommand(int)));
   // The box that holds the Nick List and the quick action buttons
-  QVBox* nickListButtons = new QVBox(splitter);
+  nickListButtons = new QVBox(splitter);
   nickListButtons->setSpacing(spacing());
 
@@ -2075,4 +2075,13 @@ void Channel::setShowNicknameBox(bool sh
 }
 
+void Channel::showNicknameList(bool show)
+{
+    if (show) {
+        nickListButtons->show();
+    } else {
+        nickListButtons->hide();
+    }
+}
+
 void Channel::requestNickListSort()
 {

--- kdeextragear-2/konversation/konversation/channel.h  #1.113:1.114
@@ -178,4 +178,5 @@ class Channel : public ChatWindow
     void scheduleAutoWho();
     void setShowNicknameBox(bool show);
+    void showNicknameList(bool show);
 
     void setAllowNotifications(bool allow) { m_allowNotifications = allow; }
@@ -279,4 +280,5 @@ class Channel : public ChatWindow
     QString abgCache;                   // caches the alternate background color
     QHBox* commandLineBox;
+    QVBox* nickListButtons;
     QComboBox* nicknameCombobox;
     QString oldNick;

--- kdeextragear-2/konversation/konversation/konversationmainwindow.cpp  #1.233:1.234
@@ -199,4 +199,5 @@ KonversationMainWindow::KonversationMain
 
   new KAction(i18n("Close &All Open Queries"), 0, KShortcut("F11"), this, SLOT(closeQueries()), actionCollection(), "close_queries");
+  hideNicklistAction = new KToggleAction(i18n("Hide Nicklist"), 0, KShortcut("Ctrl+N"), this, SLOT(hideNicknameList()), actionCollection(), "hide_nicknamelist");
   
 #ifdef USE_MDI
@@ -1590,4 +1591,19 @@ void KonversationMainWindow::closeQuerie
 }
 
+void KonversationMainWindow::hideNicknameList()
+{
+    if (m_frontView && m_frontView->getType() == ChatWindow::Channel) {
+        Channel* channel = static_cast<Channel*>((ChatWindow*) m_frontView);
+        if (hideNicklistAction->isChecked()) {
+            channel->showNicknameList(false);
+            hideNicklistAction->setChecked(true);
+        } else {
+            channel->showNicknameList(true);
+            hideNicklistAction->setChecked(false);
+        }
+    }
+}
+
+
 void KonversationMainWindow::clearTabs()
 {

--- kdeextragear-2/konversation/konversation/konversationmainwindow.h  #1.82:1.83
@@ -203,4 +203,5 @@ class KonversationMainWindow : public MA
     void clearWindow();
     void closeQueries();
+    void hideNicknameList();
     void clearTabs();
 
@@ -256,4 +257,5 @@ class KonversationMainWindow : public MA
     KToggleAction* showStatusBarAction;
     KToggleAction* showMenuBarAction;
+    KToggleAction* hideNicklistAction;
 
     NicksOnline* nicksOnlinePanel;

--- kdeextragear-2/konversation/konversation/konversationui.rc  #1.53:1.54
@@ -1,4 +1,4 @@
 <!DOCTYPE kpartgui>
-<kpartgui name="konversation" version="30">
+<kpartgui name="konversation" version="31">
 
   <MenuBar>
@@ -35,4 +35,5 @@
       <Action name="close_tab" />
       <Action name="close_queries" />
+      <Action name="hide_nicknamelist" />
       <Separator />
       <!-- only used with KMDI