[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Add Hide/Show Statusbar setting, OK to commit?
From: "Elvis Stansvik" <elvstone () gmail ! com>
Date: 2008-12-09 20:02:20
Message-ID: 751a4f870812091202l348f8635j4d06068f6f06d686 () mail ! gmail ! com
[Download RAW message or body]
Hey kfm-devel,
The attached simple patch adds Hide/Show Statusbar. OK for me to
commit? Running this by the list before commiting since it's the first
time I poke at Konqi.
Take care,
Elvis
["show-statusbar.diff" (text/x-diff)]
Index: src/konqmainwindow.h
===================================================================
--- src/konqmainwindow.h (revision 894786)
+++ src/konqmainwindow.h (arbetskopia)
@@ -498,6 +498,7 @@
void slotCheckComboSelection();
void slotShowMenuBar();
+ void slotShowStatusBar();
void slotOpenURL( const KUrl& );
@@ -685,6 +686,8 @@
KToggleAction *m_paShowMenuBar;
+ KToggleAction *m_paShowStatusBar;
+
KToggleFullScreenAction *m_ptaFullScreen;
bool m_bLocationBarConnected:1;
Index: src/konqmainwindow.cpp
===================================================================
--- src/konqmainwindow.cpp (revision 894786)
+++ src/konqmainwindow.cpp (arbetskopia)
@@ -1260,6 +1260,12 @@
mainWindow->m_paShowMenuBar->setChecked( false );
}
+ if ( !windowArgs.isStatusBarVisible() )
+ {
+ mainWindow->statusBar()->hide();
+ mainWindow->m_paShowStatusBar->setChecked( false );
+ }
+
if ( !windowArgs.toolBarsVisible() )
{
foreach (KToolBar* bar, mainWindow->findChildren<KToolBar*>())
@@ -3294,6 +3300,15 @@
slotForceSaveMainWindowSettings();
}
+void KonqMainWindow::slotShowStatusBar()
+{
+ if (statusBar()->isVisible())
+ statusBar()->hide();
+ else
+ statusBar()->show();
+ slotForceSaveMainWindowSettings();
+}
+
void KonqMainWindow::slotUpdateFullScreen( bool set )
{
KToggleFullScreenAction::setFullScreen( this, set );
@@ -3854,6 +3869,9 @@
m_paShowMenuBar = KStandardAction::showMenubar( this, SLOT( slotShowMenuBar() ), \
this ); actionCollection()->addAction( \
KStandardAction::name(KStandardAction::ShowMenubar), m_paShowMenuBar );
+ m_paShowStatusBar = KStandardAction::showStatusbar( this, SLOT( \
slotShowStatusBar() ), this ); + actionCollection()->addAction( \
KStandardAction::name(KStandardAction::ShowStatusbar), m_paShowStatusBar ); +
action = actionCollection()->addAction( "konqintro" );
action->setText( i18n( "Kon&queror Introduction" ) );
connect(action, SIGNAL(triggered() ), SLOT( slotIntro() ));
@@ -4378,6 +4396,7 @@
// view profiles store toolbar info, and that info is read after
// construct time.
m_paShowMenuBar->setChecked( !menuBar()->isHidden() );
+ m_paShowStatusBar->setChecked( !statusBar()->isHidden() );
updateBookmarkBar(); // hide if empty
// Call parent method
Index: src/konqueror.rc
===================================================================
--- src/konqueror.rc (revision 894786)
+++ src/konqueror.rc (arbetskopia)
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
-<gui name="Konqueror" version="68">
+<gui name="Konqueror" version="69">
<MenuBar>
<Menu name="file" noMerge="1"><text>&File</text>
<Action name="new_window"/>
@@ -54,6 +54,7 @@
<Menu name="settings" noMerge="1"><text>&Settings</text>
<Merge name="StandardToolBarMenuHandler" />
<Action name="options_show_menubar"/>
+ <Action name="options_show_statusbar"/>
<ActionList name="toggleview" />
<Separator/>
<Action name="fullscreen"/>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic