[Kget] [Bug 115569] hide menubar and hide toolbar

Urs Wolfer uwolfer at fwo.ch
Fri Nov 4 23:47:35 CET 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=115569         




------- Additional Comments From uwolfer fwo ch  2005-11-04 23:47 -------
SVN commit 477741 by uwolfer:

"hide menubar" action in settings menu.
(added after discussion on KGet ml)

CCBUG:115569


 M  +3 -2      kgetui.rc  
 M  +12 -0     kmainwidget.cpp  
 M  +2 -0      kmainwidget.h  


--- branches/KDE/3.5/kdenetwork/kget/kgetui.rc #477740:477741
 @ -1,5 +1,5  @
 <!DOCTYPE kpartgui>
-<kpartgui name="kget" version="3">
+<kpartgui name="kget" version="4">
 <MenuBar>
     <Menu noMerge="1" name="file"><text>&amp;File</text>
         <Action name="open_transfer"/>
 @ -43,8 +43,9  @
         <Action name="auto_paste"/>
     </Menu>
     <Menu name="settings"><text>&amp;Settings</text>
+        <Action name="drop_target"/>
         <Action name="show_statusbar"/>
-        <Action name="drop_target" append="show_merge"/>
+        <Action name="settings_showmenubar" append="show_merge"/>
     </Menu>
     <Menu name="help"><text>&amp;Help</text>
     </Menu>
--- branches/KDE/3.5/kdenetwork/kget/kmainwidget.cpp #477740:477741
 @ -67,6 +67,7  @
 #include <kio/netaccess.h>
 #include <knotifyclient.h>
 #include <knotifydialog.h>
+#include <kmenubar.h>
 
 #include "safedelete.h"
 #include "settings.h"
 @ -383,6 +384,9  @
     KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), coll);
     KStdAction::configureNotifications(this, SLOT(slotConfigureNotifications()), coll);
 
+    m_menubarAction = KStdAction::showMenubar(this, SLOT(slotShowMenubar()), coll, "settings_showmenubar" );
+    m_menubarAction->setChecked( !menuBar()->isHidden() );
+
     // view actions
     createStandardStatusBarAction();
 
 @ -2471,4 +2475,12  @
     setDropTargetVisible( true );
 }
 
+void KMainWidget::slotShowMenubar()
+{
+    if(m_menubarAction->isChecked())
+        menuBar()->show();
+    else
+        menuBar()->hide();
+}
+
 #include "kmainwidget.moc"
--- branches/KDE/3.5/kdenetwork/kget/kmainwidget.h #477740:477741
 @ -82,6 +82,7  @
 
     // Actions
     KToggleAction *m_paShowLog;
+    KToggleAction *m_menubarAction;
     KAction *m_paPreferences;
     KAction *m_paQuit;
     bool b_viewLogWindow;
 @ -143,6 +144,7  @
 
     void slotConfigureToolbars();
     void slotNewToolbarConfig();
+    void slotShowMenubar();
 
     void slotPopupMenu(Transfer * item);



More information about the Kget mailing list