diff options
author | Slávek Banko <[email protected]> | 2012-07-11 03:39:45 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2012-07-11 03:48:15 +0200 |
commit | 791704c587b5abbd1e947ecd85a6ea9bea5e9f2f (patch) | |
tree | d845ce23d2b38dc14ba86351b3441fb07d5b8c81 /src | |
parent | 8fe6f08227059c8cddc686888fb3e402b83c9eff (diff) | |
download | kmplayer-791704c587b5abbd1e947ecd85a6ea9bea5e9f2f.tar.gz kmplayer-791704c587b5abbd1e947ecd85a6ea9bea5e9f2f.zip |
Fix keyboard shortcuts
Added minimal mode to popup menu
This partially resolves Bug 1032
Diffstat (limited to 'src')
-rw-r--r-- | src/kmplayerapp.cpp | 2 | ||||
-rw-r--r-- | src/kmplayercontrolpanel.cpp | 10 | ||||
-rw-r--r-- | src/kmplayercontrolpanel.h | 2 | ||||
-rw-r--r-- | src/kmplayerpartbase.cpp | 6 | ||||
-rw-r--r-- | src/kmplayerpartbase.h | 2 | ||||
-rw-r--r-- | src/kmplayerui.rc | 5 |
6 files changed, 20 insertions, 7 deletions
diff --git a/src/kmplayerapp.cpp b/src/kmplayerapp.cpp index fe8995a..a1bd243 100644 --- a/src/kmplayerapp.cpp +++ b/src/kmplayerapp.cpp @@ -689,6 +689,8 @@ KDE_NO_EXPORT void KMPlayerApp::initView () { TQT_TQOBJECT(this), TQT_SLOT (zoom100 ())); connect (m_view, TQT_SIGNAL (fullScreenChanged ()), TQT_TQOBJECT(this), TQT_SLOT (fullScreen ())); + connect (m_player, TQT_SIGNAL (toggleMinimalMode ()), + TQT_TQOBJECT(this), TQT_SLOT (slotMinimalMode ())); connect (m_view->playList (), TQT_SIGNAL (selectionChanged (TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT (playListItemSelected (TQListViewItem *))); connect (m_view->playList(), TQT_SIGNAL (dropped (TQDropEvent*, TQListViewItem*)), diff --git a/src/kmplayercontrolpanel.cpp b/src/kmplayercontrolpanel.cpp index cb2e884..1a1c7a8 100644 --- a/src/kmplayercontrolpanel.cpp +++ b/src/kmplayercontrolpanel.cpp @@ -357,10 +357,10 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(TQWidget * parent, View * view) m_buttons[button_config] = new KMPlayerMenuButton (this, m_buttonbox, config_xpm); m_buttons[button_playlist] = ctrlButton (this, m_buttonbox, playlist_xpm); m_buttons[button_back] = ctrlButton (this, m_buttonbox, back_xpm); - m_buttons[button_play] = ctrlButton(this, m_buttonbox, play_xpm, TQt::Key_R); + m_buttons[button_play] = ctrlButton(this, m_buttonbox, play_xpm, TQt::Key_P); m_buttons[button_forward] = ctrlButton (this, m_buttonbox, forward_xpm); m_buttons[button_stop] = ctrlButton(this, m_buttonbox, stop_xpm, TQt::Key_S); - m_buttons[button_pause]=ctrlButton(this, m_buttonbox, pause_xpm, TQt::Key_P); + m_buttons[button_pause]=ctrlButton(this, m_buttonbox, pause_xpm, TQt::Key_Space); m_buttons[button_record] = ctrlButton (this, m_buttonbox, record_xpm); m_buttons[button_broadcast] = ctrlButton (this, m_buttonbox, broadcast_xpm); m_buttons[button_language] = new KMPlayerMenuButton (this, m_buttonbox, language_xpm); @@ -385,13 +385,15 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(TQWidget * parent, View * view) m_popupMenu->insertItem (i18n("&Bookmarks"), m_bookmarkMenu, menu_bookmark); m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole"), menu_video); m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("player_playlist"), KIcon::Small, 0, true), i18n ("Play&list"), menu_playlist); + m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("empty"), KIcon::Small, 0, true), i18n ("Minimal mode"), menu_minimal); + m_popupMenu->setAccel (TQKeySequence (TQt::Key_M), menu_minimal); + m_popupMenu->insertItem (KGlobal::iconLoader()->loadIconSet (TQString ("window_fullscreen"), KIcon::Small, 0, true), i18n ("&Full Screen"), menu_fullscreen); + m_popupMenu->setAccel (TQKeySequence (TQt::Key_F), menu_fullscreen); m_zoomMenu = new KMPlayerPopupMenu (this); m_zoomMenu->insertItem (i18n ("50%"), menu_zoom50); m_zoomMenu->insertItem (i18n ("100%"), menu_zoom100); m_zoomMenu->insertItem (i18n ("150%"), menu_zoom150); m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("viewmag"), KIcon::Small, 0, false), i18n ("&Zoom"), m_zoomMenu, menu_zoom); - m_popupMenu->insertItem (KGlobal::iconLoader()->loadIconSet (TQString ("window_fullscreen"), KIcon::Small, 0, true), i18n ("&Full Screen"), menu_fullscreen); - m_popupMenu->setAccel (TQKeySequence (TQt::Key_F), menu_fullscreen); m_popupMenu->insertSeparator (); m_colorMenu = new KMPlayerPopupMenu (this); m_languageMenu = new KMPlayerPopupMenu (this); diff --git a/src/kmplayercontrolpanel.h b/src/kmplayercontrolpanel.h index 4cd8df5..be45131 100644 --- a/src/kmplayercontrolpanel.h +++ b/src/kmplayercontrolpanel.h @@ -101,7 +101,7 @@ public: enum MenuID { menu_config = 0, menu_player, menu_fullscreen, menu_volume, menu_bookmark, menu_zoom, menu_zoom50, menu_zoom100, menu_zoom150, - menu_view, menu_video, menu_playlist + menu_view, menu_video, menu_playlist, menu_minimal }; enum Button { button_config = 0, button_playlist, diff --git a/src/kmplayerpartbase.cpp b/src/kmplayerpartbase.cpp index 32ead14..b9f7a2f 100644 --- a/src/kmplayerpartbase.cpp +++ b/src/kmplayerpartbase.cpp @@ -217,6 +217,8 @@ void PartBase::connectPanel (ControlPanel * panel) { m_view, TQT_SLOT(toggleVideoConsoleWindow())); panel->popupMenu ()->connectItem (ControlPanel::menu_playlist, m_view, TQT_SLOT (toggleShowPlaylist ())); + panel->popupMenu ()->connectItem (ControlPanel::menu_minimal, + this, TQT_SLOT (minimalMode ())); connect (this, TQT_SIGNAL (statusUpdated (const TQString &)), panel->view (), TQT_SLOT (setStatusMessage (const TQString &))); //connect (panel (), TQT_SIGNAL (clicked ()), m_settings, TQT_SLOT (show ())); @@ -870,6 +872,10 @@ KDE_NO_EXPORT void PartBase::toggleFullScreen () { m_view->fullScreen (); } +KDE_NO_EXPORT void PartBase::minimalMode () { + emit toggleMinimalMode (); +} + KDE_NO_EXPORT bool PartBase::isPlaying () { return playing (); } diff --git a/src/kmplayerpartbase.h b/src/kmplayerpartbase.h index f21ba4f..bf2fbde 100644 --- a/src/kmplayerpartbase.h +++ b/src/kmplayerpartbase.h @@ -208,6 +208,7 @@ signals: void audioIsSelected (int id); void subtitleIsSelected (int id); void positioned (int pos, int length); + void toggleMinimalMode (); protected: bool openFile(); virtual void timerEvent (TQTimerEvent *); @@ -221,6 +222,7 @@ protected slots: void saturationValueChanged (int val); void sourceHasChangedAspects (); void fullScreen (); + void minimalMode (); void playListItemClicked (TQListViewItem *); void playListItemExecuted (TQListViewItem *); virtual void playingStarted (); diff --git a/src/kmplayerui.rc b/src/kmplayerui.rc index c726c4c..d22f181 100644 --- a/src/kmplayerui.rc +++ b/src/kmplayerui.rc @@ -67,11 +67,12 @@ <Action name="pause" icon="player_pause"/> <Action name="stop" icon="player_stop"/> <Action shortcut="F" name="view_fullscreen" /> - <Action shortcut="R" name="play" /> - <Action shortcut="P" name="pause" /> + <Action shortcut="P" name="play" /> + <Action shortcut="Space" name="pause" /> <Action shortcut="S" name="stop" /> <Action shortcut="F2" name="edit_playlist_item"/> <Action shortcut="C" name="view_arts_control" /> + <Action shortcut="M" name="view_minimal" /> </ActionProperties> <ToolBar name="mainToolBar"><text></text> <Action name="new_window"/> |