[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeedu/kmplot/kmplot
From:       Fredrik Edemar <f_edemar () linux ! se>
Date:       2005-01-09 1:26:39
Message-ID: 20050109012639.63DE91C62E () office ! kde ! org
[Download RAW message or body]

CVS commit by fedemar: 

Use createStandardStatusBarAction() setStandardToolBarMenuEnabled() to handle the \
statusbar and toolbar items in the menu.


  M +5 -27     kmplot.cpp   1.8
  M +0 -4      kmplot.h   1.5
  M +2 -1      kmplot_shell.rc   1.2


--- kdeedu/kmplot/kmplot/kmplot.cpp  #1.7:1.8
@@ -48,8 +48,7 @@ KmPlot::KmPlot( KCmdLineArgs* args)
         // then, setup our actions
         setupActions();
+        
         // setup the status bar
         setupStatusBar();
-        // show the status bar
-        optionsShowStatusbar();
 
         // this routine will find and load our Part.  it finds the Part by
@@ -134,6 +133,6 @@ void KmPlot::setupActions()
         KStdAction::quit(kapp, SLOT(quit()), actionCollection());
 
-        m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), \
                actionCollection());
-        m_statusbarAction = KStdAction::showStatusbar(this, \
SLOT(optionsShowStatusbar()), actionCollection()); +        \
createStandardStatusBarAction(); +        setStandardToolBarMenuEnabled(true);
 
         KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), \
actionCollection()); @@ -195,25 +194,4 @@ void KmPlot::increaseProgressBar()
 }
 
-
-void KmPlot::optionsShowToolbar()
-{
-        // this is all very cut and paste code for showing/hiding the
-        // toolbar
-        if (m_toolbarAction->isChecked())
-                toolBar()->show();
-        else
-                toolBar()->hide();
-}
-
-void KmPlot::optionsShowStatusbar()
-{
-        // this is all very cut and paste code for showing/hiding the
-        // statusbar
-        if (m_statusbarAction->isChecked())
-                statusBar()->show();
-        else
-                statusBar()->hide();
-}
-
 void KmPlot::optionsConfigureKeys()
 {

--- kdeedu/kmplot/kmplot/kmplot.h  #1.4:1.5
@@ -87,6 +87,4 @@ private slots:
         void fileOpen();
         void fileOpen(const KURL &url);
-        void optionsShowToolbar();
-        void optionsShowStatusbar();
         void optionsConfigureKeys();
         void optionsConfigureToolbars();
@@ -117,6 +115,4 @@ private:
 private:
         KParts::ReadOnlyPart *m_part;
-        KToggleAction *m_toolbarAction;
-        KToggleAction *m_statusbarAction;
         /// The fullscreen action to be plugged/unplegged to the toolbar
         KToggleFullScreenAction* m_fullScreen;

--- kdeedu/kmplot/kmplot/kmplot_shell.rc  #1.1:1.2
@@ -12,5 +12,6 @@
                 <Merge/>
                 <Menu noMerge="1" name="settings"><text>&amp;Settings</text>
-                        <Action name="options_show_toolbar"/>
+                        <!--<Action name="options_show_toolbar"/>-->
+                        <Merge name="StandardToolBarMenuHandler" />
                         <Action name="options_show_statusbar"/>
                         <Separator/>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic