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

List:       kde-commits
Subject:    extragear/multimedia/amarok/src
From:       Mark Kretschmann <markey () web ! de>
Date:       2007-05-20 16:06:34
Message-ID: 1179677194.792185.6208.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 666694 by markey:

Remove the "hide menubar" feature, for good justice. As discussed - it's way too \
dangerous.


 M  +0 -5      amarokcore/amarok.kcfg  
 M  +0 -28     playlistwindow.cpp  
 M  +0 -2      playlistwindow.h  


--- trunk/extragear/multimedia/amarok/src/amarokcore/amarok.kcfg #666693:666694
@@ -196,11 +196,6 @@
         <whatsthis>Set this to the style dir you want to use.</whatsthis>
         <default>Default</default>
     </entry>
-    <entry key="Show Menu Bar" type="Bool">
-        <label>Whether Menubar is shown</label>
-        <whatsthis>If set, Amarok displays a menubar on top of the \
                application.</whatsthis>
-        <default>true</default>
-    </entry>
     <entry key="Relative Playlist" type="Bool">
         <label>Whether playlists store relative path</label>
         <whatsthis>If set, Amarok's manually saved playlists will contain a relative \
                path to each track, not an absolute path.</whatsthis>
--- trunk/extragear/multimedia/amarok/src/playlistwindow.cpp #666693:666694
@@ -110,8 +110,6 @@
 
 PlaylistWindow::~PlaylistWindow()
 {
-    Amarok::config( "PlaylistWindow" ).writeEntry( "showMenuBar", \
                !m_menubar->isHidden() );
-
     AmarokConfig::setPlaylistWindowPos( pos() );  //TODO de XT?
     AmarokConfig::setPlaylistWindowSize( size() ); //TODO de XT?
 }
@@ -897,20 +895,6 @@
         m_browsers->currentWidget()->setFocus();
 }
 
-void PlaylistWindow::slotToggleMenu() //SLOT
-{
-    if( static_cast<KToggleAction \
*>(actionCollection()->action(KStandardAction::name(KStandardAction::ShowMenubar)))->isChecked() \
                ) {
-        AmarokConfig::setShowMenuBar( true );
-        m_menubar->setVisible( true );
-    }
-    else
-    {
-        AmarokConfig::setShowMenuBar( false );
-        m_menubar->setVisible( false );
-    }
-    recreateGUI();
-}
-
 void PlaylistWindow::slotMenuActivated( int index ) //SLOT
 {
     switch( index )
@@ -922,7 +906,6 @@
     case ID_SHOW_TOOLBAR:
         m_controlBar->setVisible( !m_controlBar->isHidden() );
         AmarokConfig::setShowToolbar( !AmarokConfig::showToolbar() );
-        actionCollection()->action(KStandardAction::name(KStandardAction::ShowMenubar))->setEnabled( \
                m_controlBar->isHidden() );
         m_settingsMenu->changeItem( index, !m_controlBar->isHidden() ? i18n("Hide \
Toolbar") : i18n("Show Toolbar") );  break;
     case Amarok::Menu::ID_RESCAN_COLLECTION:
@@ -1059,12 +1042,6 @@
     action->setText( i18n("&Save Playlist As...") );
     ac->addAction( "playlist_save", action );
 
-#ifndef Q_WS_MAC
-    KAction *showMenu = KStandardAction::showMenubar( this, SLOT(slotToggleMenu()), \
                this );
-    ac->addAction( KStandardAction::name(KStandardAction::ShowMenubar), showMenu );
-#endif
-
-
     KAction *burn = new KAction( this );
     burn->setText( i18n( "Burn Current Playlist" ) );
     burn->setIcon( KIcon(Amarok::icon( "burn" )) );
@@ -1215,9 +1192,6 @@
 void PlaylistWindow::createMenus()
 {
     m_menubar = menuBar();//new MenuBar( this );
-#ifndef Q_WS_MAC
-    m_menubar->setVisible( AmarokConfig::showMenuBar() );
-#endif
 
     //BEGIN Actions menu
     KMenu *actionsMenu = new KMenu( m_menubar );
@@ -1292,8 +1266,6 @@
     m_settingsMenu = new KMenu( m_menubar );
     //TODO use KStandardAction or KXmlGuiWindow
 #ifndef Q_WS_MAC
-    static_cast<KToggleAction \
*>(actionCollection()->action(KStandardAction::name(KStandardAction::ShowMenubar)))->setChecked( \
                AmarokConfig::showMenuBar() );
-    m_settingsMenu->addAction( \
                actionCollection()->action(KStandardAction::name(KStandardAction::ShowMenubar)) \
                );
     m_settingsMenu->insertItem( AmarokConfig::showToolbar() ? i18n( "Hide Toolbar" ) \
: i18n("Show Toolbar"), ID_SHOW_TOOLBAR );  m_settingsMenu->addSeparator();
 #endif
--- trunk/extragear/multimedia/amarok/src/playlistwindow.h #666693:666694
@@ -97,7 +97,6 @@
         void slotMenuActivated( int );
         void actionsMenuAboutToShow();
         void toolsMenuAboutToShow();
-        void slotToggleMenu();
         void slotToggleFocus();
         void slotEditFilter();
         void slotSetFilter( const QString &filter );
@@ -140,7 +139,6 @@
         DynamicTitle(QWidget* parent);
         void setTitle(const QString& newTitle);
 
-    protected:
         virtual void paintEvent(QPaintEvent* e);
 
     private:


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

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