Bug 115569 - hide menubar and hide toolbar
Summary: hide menubar and hide toolbar
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-02 21:02 UTC by Amir Taaki
Modified: 2005-11-09 16:13 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 Amir Taaki 2005-11-02 21:02:59 UTC
Version:           v0.8.4 (using KDE 3.4.1, Gentoo)
Compiler:          gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
OS:                Linux (i686) release 2.6.13-gentoo-r3

there should be a menu option to do this, atm i can only see a "Hide Statusbar"
Comment 1 Urs Wolfer 2005-11-02 21:44:30 UTC
SVN commit 477052 by uwolfer:

"hide toolbar" action in settings menu
BUG: 115569


 M  +2 -0      kmainwidget.cpp  


--- branches/KDE/3.5/kdenetwork/kget/kmainwidget.cpp #477051:477052
@@ -257,6 +257,8 @@
 
     KNotifyClient::startDaemon();
 
+    setStandardToolBarMenuEnabled(true);
+
 #ifdef _DEBUG
     sDebugOut << endl;
 #endif
Comment 2 Urs Wolfer 2005-11-02 21:46:59 UTC
IMHO it makes no sense to add an action to hide the menubar. How should I control KGet without a menubar?
Comment 3 Urs Wolfer 2005-11-04 23:47:30 UTC
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);
 
Comment 4 Amir Taaki 2005-11-09 16:03:25 UTC
Urs Wolfer: the point is, only to show it as needed (using CTRL+M) as I do not use most of the functions in kget... only resume and download.
Comment 5 Urs Wolfer 2005-11-09 16:13:57 UTC
Comment #4: Both features will be in KDE 3.5. :)