From kde-commits Wed Nov 30 23:02:42 2011 From: Robert Riemann Date: Wed, 30 Nov 2011 23:02:42 +0000 To: kde-commits Subject: [kubeplayer] lib: add menu show/hide action Message-Id: <20111130230242.CFF62A60A6 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=132269425502248 Git commit 7ed128c9aa5f97dea6ba817646c3aedbef8d65bb by Robert Riemann. Committed on 01/12/2011 at 00:02. Pushed by rriemann into branch 'master'. add menu show/hide action M +10 -1 lib/MainWindow.rb http://commits.kde.org/kubeplayer/7ed128c9aa5f97dea6ba817646c3aedbef8d65bb diff --git a/lib/MainWindow.rb b/lib/MainWindow.rb index 17f3fe6..84c2334 100644 --- a/lib/MainWindow.rb +++ b/lib/MainWindow.rb @@ -13,7 +13,7 @@ end = class MainWindow < KDE::MainWindow = - slots 'toogleVolumeSlider(bool)', 'stateChanged(Phonon::State, Phonon::S= tate)', 'handle_video_request(KUrl)', 'request_play()' + slots 'toogleVolumeSlider(bool)', 'stateChanged(Phonon::State, Phonon::S= tate)', 'handle_video_request(KUrl)', 'request_play()', 'toogleMenuBar()' = attr_reader :activeVideo = @@ -197,6 +197,11 @@ class MainWindow < KDE::MainWindow self.add_dock_widget Qt::LeftDockWidgetArea, @listDock controlBar.add_action action = + # add hide/show menu bar + action =3D collection.add_action "settings_showmenubar", KDE::Standard= Action::showMenubar( self, SLOT(:toogleMenuBar), collection ) + addAction action + menu.add_action action + # add search field @suggestTimer =3D Qt::Timer.new self @suggestTimer.single_shot =3D true @@ -245,6 +250,10 @@ class MainWindow < KDE::MainWindow end end = + def toogleMenuBar + menuBar.visible =3D sender.checked? + end + end = end \ No newline at end of file