Fix keyboard shortcuts

Added minimal mode to popup menu
This partially resolves Bug 1032
pull/1/head
Slávek Banko 13 years ago
parent 8fe6f08227
commit 791704c587

@ -689,6 +689,8 @@ KDE_NO_EXPORT void KMPlayerApp::initView () {
TQT_TQOBJECT(this), TQT_SLOT (zoom100 ())); TQT_TQOBJECT(this), TQT_SLOT (zoom100 ()));
connect (m_view, TQT_SIGNAL (fullScreenChanged ()), connect (m_view, TQT_SIGNAL (fullScreenChanged ()),
TQT_TQOBJECT(this), TQT_SLOT (fullScreen ())); 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 *)), connect (m_view->playList (), TQT_SIGNAL (selectionChanged (TQListViewItem *)),
TQT_TQOBJECT(this), TQT_SLOT (playListItemSelected (TQListViewItem *))); TQT_TQOBJECT(this), TQT_SLOT (playListItemSelected (TQListViewItem *)));
connect (m_view->playList(), TQT_SIGNAL (dropped (TQDropEvent*, TQListViewItem*)), connect (m_view->playList(), TQT_SIGNAL (dropped (TQDropEvent*, TQListViewItem*)),

@ -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_config] = new KMPlayerMenuButton (this, m_buttonbox, config_xpm);
m_buttons[button_playlist] = ctrlButton (this, m_buttonbox, playlist_xpm); m_buttons[button_playlist] = ctrlButton (this, m_buttonbox, playlist_xpm);
m_buttons[button_back] = ctrlButton (this, m_buttonbox, back_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_forward] = ctrlButton (this, m_buttonbox, forward_xpm);
m_buttons[button_stop] = ctrlButton(this, m_buttonbox, stop_xpm, TQt::Key_S); 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_record] = ctrlButton (this, m_buttonbox, record_xpm);
m_buttons[button_broadcast] = ctrlButton (this, m_buttonbox, broadcast_xpm); m_buttons[button_broadcast] = ctrlButton (this, m_buttonbox, broadcast_xpm);
m_buttons[button_language] = new KMPlayerMenuButton (this, m_buttonbox, language_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 (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 ("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 ("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 = new KMPlayerPopupMenu (this);
m_zoomMenu->insertItem (i18n ("50%"), menu_zoom50); m_zoomMenu->insertItem (i18n ("50%"), menu_zoom50);
m_zoomMenu->insertItem (i18n ("100%"), menu_zoom100); m_zoomMenu->insertItem (i18n ("100%"), menu_zoom100);
m_zoomMenu->insertItem (i18n ("150%"), menu_zoom150); 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 ("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_popupMenu->insertSeparator ();
m_colorMenu = new KMPlayerPopupMenu (this); m_colorMenu = new KMPlayerPopupMenu (this);
m_languageMenu = new KMPlayerPopupMenu (this); m_languageMenu = new KMPlayerPopupMenu (this);

@ -101,7 +101,7 @@ public:
enum MenuID { enum MenuID {
menu_config = 0, menu_player, menu_fullscreen, menu_volume, menu_config = 0, menu_player, menu_fullscreen, menu_volume,
menu_bookmark, menu_zoom, menu_zoom50, menu_zoom100, menu_zoom150, 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 { enum Button {
button_config = 0, button_playlist, button_config = 0, button_playlist,

@ -217,6 +217,8 @@ void PartBase::connectPanel (ControlPanel * panel) {
m_view, TQT_SLOT(toggleVideoConsoleWindow())); m_view, TQT_SLOT(toggleVideoConsoleWindow()));
panel->popupMenu ()->connectItem (ControlPanel::menu_playlist, panel->popupMenu ()->connectItem (ControlPanel::menu_playlist,
m_view, TQT_SLOT (toggleShowPlaylist ())); m_view, TQT_SLOT (toggleShowPlaylist ()));
panel->popupMenu ()->connectItem (ControlPanel::menu_minimal,
this, TQT_SLOT (minimalMode ()));
connect (this, TQT_SIGNAL (statusUpdated (const TQString &)), connect (this, TQT_SIGNAL (statusUpdated (const TQString &)),
panel->view (), TQT_SLOT (setStatusMessage (const TQString &))); panel->view (), TQT_SLOT (setStatusMessage (const TQString &)));
//connect (panel (), TQT_SIGNAL (clicked ()), m_settings, TQT_SLOT (show ())); //connect (panel (), TQT_SIGNAL (clicked ()), m_settings, TQT_SLOT (show ()));
@ -870,6 +872,10 @@ KDE_NO_EXPORT void PartBase::toggleFullScreen () {
m_view->fullScreen (); m_view->fullScreen ();
} }
KDE_NO_EXPORT void PartBase::minimalMode () {
emit toggleMinimalMode ();
}
KDE_NO_EXPORT bool PartBase::isPlaying () { KDE_NO_EXPORT bool PartBase::isPlaying () {
return playing (); return playing ();
} }

@ -208,6 +208,7 @@ signals:
void audioIsSelected (int id); void audioIsSelected (int id);
void subtitleIsSelected (int id); void subtitleIsSelected (int id);
void positioned (int pos, int length); void positioned (int pos, int length);
void toggleMinimalMode ();
protected: protected:
bool openFile(); bool openFile();
virtual void timerEvent (TQTimerEvent *); virtual void timerEvent (TQTimerEvent *);
@ -221,6 +222,7 @@ protected slots:
void saturationValueChanged (int val); void saturationValueChanged (int val);
void sourceHasChangedAspects (); void sourceHasChangedAspects ();
void fullScreen (); void fullScreen ();
void minimalMode ();
void playListItemClicked (TQListViewItem *); void playListItemClicked (TQListViewItem *);
void playListItemExecuted (TQListViewItem *); void playListItemExecuted (TQListViewItem *);
virtual void playingStarted (); virtual void playingStarted ();

@ -67,11 +67,12 @@
<Action name="pause" icon="player_pause"/> <Action name="pause" icon="player_pause"/>
<Action name="stop" icon="player_stop"/> <Action name="stop" icon="player_stop"/>
<Action shortcut="F" name="view_fullscreen" /> <Action shortcut="F" name="view_fullscreen" />
<Action shortcut="R" name="play" /> <Action shortcut="P" name="play" />
<Action shortcut="P" name="pause" /> <Action shortcut="Space" name="pause" />
<Action shortcut="S" name="stop" /> <Action shortcut="S" name="stop" />
<Action shortcut="F2" name="edit_playlist_item"/> <Action shortcut="F2" name="edit_playlist_item"/>
<Action shortcut="C" name="view_arts_control" /> <Action shortcut="C" name="view_arts_control" />
<Action shortcut="M" name="view_minimal" />
</ActionProperties> </ActionProperties>
<ToolBar name="mainToolBar"><text></text> <ToolBar name="mainToolBar"><text></text>
<Action name="new_window"/> <Action name="new_window"/>

Loading…
Cancel
Save