[PATCH] Make konsole use KTooBarMenuAction

Nadeem Hasan nhasan at nadmm.com
Wed May 29 04:20:46 BST 2002


Hi,

This patch makes konsole use the new KToolBarMenuAction. This goes with
the earlier patch I posted.

Cheers,
-- 
Nadeem Hasan
nhasan at nadmm.com
http://www.nadmm.com/


Index: konsole.cpp
===================================================================
RCS file: /home/kde/kdebase/konsole/konsole/konsole.cpp,v
retrieving revision 1.298
diff -u -r1.298 konsole.cpp
--- konsole.cpp 2002/05/28 05:26:33     1.298
+++ konsole.cpp 2002/05/29 03:19:33
@@ -741,8 +741,7 @@

   showMenubar = new KToggleAction ( i18n( "Show &Menubar" ), "showmenu", 0, this,
                                     SLOT( slotToggleMenubar() ), m_shortcuts, "show_menubar" );
-  showToolbar = new KToggleAction ( i18n( "Show &Toolbar" ), 0, this,
-                                    SLOT( slotToggleToolbar() ), m_shortcuts, "show_toolbar" );
+  showToolbar = toolBarMenuAction();
   m_fullscreen = new KToggleAction(i18n("F&ull-Screen"), "window_fullscreen", 0, this,
                                    SLOT(slotToggleFullscreen()), m_shortcuts, "fullscreen");
   m_fullscreen->setChecked(b_fullscreen);
@@ -1061,7 +1060,6 @@
    if (!m_menuCreated) return;
    selectFont->setCurrentItem(n_font);
    notifySize(te->Lines(),te->Columns());
-   showToolbar->setChecked(!toolBar()->isHidden());
    showMenubar->setChecked(!menuBar()->isHidden());
    selectScrollbar->setCurrentItem(n_scroll);
    selectBell->setCurrentItem(n_bell);
@@ -1269,16 +1267,6 @@
     setCaption(i18n("Use the right mouse button to bring back the menu"));
     QTimer::singleShot(5000,this,SLOT(updateTitle()));
   }
-}
-
-/**
-    Toggle the Toolbar visibility
- */
-void Konsole::slotToggleToolbar() {
-  if (showToolbar->isChecked())
-     toolBar()->show();
-  else
-     toolBar()->hide();
 }

 void Konsole::slotToggleFullscreen()
Index: konsole.h
===================================================================
RCS file: /home/kde/kdebase/konsole/konsole/konsole.h,v
retrieving revision 1.119
diff -u -r1.119 konsole.h
--- konsole.h   2002/05/17 21:19:41     1.119
+++ konsole.h   2002/05/29 03:19:33
@@ -140,7 +140,6 @@
   void sendSignal(int n);
   void slotClearTerminal();
   void slotResetClearTerminal();
-  void slotToggleToolbar();
   void slotToggleMenubar();
   void slotRenameSession();
   void slotRenameSession(int);
@@ -249,7 +248,7 @@
   KToggleAction *monitorActivity;
   KToggleAction *monitorSilence;
   KToggleAction *masterMode;
-  KToggleAction *showToolbar;
+  KToolBarMenuAction *showToolbar;
   KToggleAction *showMenubar;
   KToggleAction *showScrollbar;
   KToggleAction *m_fullscreen;





More information about the kde-core-devel mailing list