[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kubeplayer] lib: add menu show/hide action
From: Robert Riemann <robert.riemann () physik ! hu-berlin ! de>
Date: 2011-11-30 23:02:42
Message-ID: 20111130230242.CFF62A60A6 () git ! kde ! org
[Download RAW message or body]
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::State)', \
'handle_video_request(KUrl)', 'request_play()' + slots 'toogleVolumeSlider(bool)', \
'stateChanged(Phonon::State, Phonon::State)', '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 = collection.add_action "settings_showmenubar", \
KDE::StandardAction::showMenubar( self, SLOT(:toogleMenuBar), collection ) + \
addAction action + menu.add_action action
+
# add search field
@suggestTimer = Qt::Timer.new self
@suggestTimer.single_shot = true
@@ -245,6 +250,10 @@ class MainWindow < KDE::MainWindow
end
end
+ def toogleMenuBar
+ menuBar.visible = sender.checked?
+ end
+
end
end
\ No newline at end of file
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic