[vlc-devel] commit: Qt4: win32 simplification (Jean-Baptiste Kempf )
git version control
git at videolan.org
Sat Jan 16 19:29:51 CET 2010
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Jan 16 19:29:42 2010 +0100| [7ef8e0ab873711d83115d27bcb4ba4c9c670ca92] | committer: Jean-Baptiste Kempf
Qt4: win32 simplification
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ef8e0ab873711d83115d27bcb4ba4c9c670ca92
---
modules/codec/avcodec/video.c | 1 +
modules/gui/qt4/main_interface.cpp | 32 ++++++++++++--------------------
modules/gui/qt4/main_interface.hpp | 10 +---------
modules/gui/qt4/qt4.hpp | 1 +
4 files changed, 15 insertions(+), 29 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 5788436..eb7b068 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -825,6 +825,7 @@ static int ffmpeg_OpenCodec( decoder_t *p_dec )
p_sys->b_delayed_open = false;
+ msg_Info( p_dec, "Here" );
if( p_sys->p_va && p_sys->p_va->description )
msg_Info( p_dec, "Using %s for hardware decoding.", p_sys->p_va->description );
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 862fbe2..9d33afd 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -584,14 +584,6 @@ void MainInterface::createTaskBarButtons()
msg_Err( p_intf, "ThumbBarAddButtons failed with error %08x", hr );
}
CONNECT( THEMIM->getIM(), statusChanged( int ), this, changeThumbbarButtons( int ) );
- CONNECT( this, playPauseSignal(), THEMIM, togglePlayPause() );
- CONNECT( this, prevSignal(), THEMIM, prev() );
- CONNECT( this, nextSignal(), THEMIM, next() );
- CONNECT( this, play(), THEMIM, play() );
- CONNECT( this, pause(), THEMIM, pause() );
- CONNECT( this, mute(), ActionsManager::getInstance( p_intf ), toggleMuteAudio() );
- CONNECT( this, volumeUp(), ActionsManager::getInstance( p_intf ), AudioUp() );
- CONNECT( this, volumeDown(), ActionsManager::getInstance( p_intf ), AudioDown() );
}
}
else
@@ -618,13 +610,13 @@ bool MainInterface::winEvent ( MSG * msg, long * result )
switch(LOWORD(msg->wParam))
{
case 0:
- emit prevSignal();
+ THEMIM->prev();
break;
case 1:
- emit playPauseSignal();
+ THEMIM->togglePlayPause();
break;
case 2:
- emit nextSignal();
+ THEMIM->next();
break;
}
}
@@ -634,31 +626,31 @@ bool MainInterface::winEvent ( MSG * msg, long * result )
switch(cmd)
{
case APPCOMMAND_MEDIA_PLAY_PAUSE:
- emit playPauseSignal();
+ THEMIM->togglePlayPause();
break;
case APPCOMMAND_MEDIA_PLAY:
- emit play();
+ THEMIM->play();
break;
case APPCOMMAND_MEDIA_PAUSE:
- emit pause();
+ THEMIM->pause();
break;
case APPCOMMAND_MEDIA_PREVIOUSTRACK:
- emit prevSignal();
+ THEMIM->prev();
break;
case APPCOMMAND_MEDIA_NEXTTRACK:
- emit nextSignal();
+ THEMIM->next();
break;
case APPCOMMAND_MEDIA_STOP:
- emit stop();
+ THEMIM->stop();
break;
case APPCOMMAND_VOLUME_DOWN:
- emit volumeDown();
+ THEAM->AudioDown();
break;
case APPCOMMAND_VOLUME_UP:
- emit volumeUp();
+ THEAM->AudioUp();
break;
case APPCOMMAND_VOLUME_MUTE:
- emit mute();
+ THEAM->toggleMuteAudio();
break;
default:
msg_Dbg( p_intf, "unknown APPCOMMAND = %d", cmd);
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 3315665..a808425 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -226,15 +226,7 @@ signals:
void askUpdate();
void minimalViewToggled( bool );
void fullscreenInterfaceToggled( bool );
- void playPauseSignal();
- void play();
- void pause();
- void stop();
- void volumeUp();
- void volumeDown();
- void mute();
- void prevSignal();
- void nextSignal();
+
};
#ifdef WIN32
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
index 470a4d6..1dc7316 100644
--- a/modules/gui/qt4/qt4.hpp
+++ b/modules/gui/qt4/qt4.hpp
@@ -86,6 +86,7 @@ struct intf_sys_t
#define THEDP DialogsProvider::getInstance()
#define THEMIM MainInputManager::getInstance( p_intf )
+#define THEAM ActionsManager::getInstance( p_intf )
#define qfu( i ) QString::fromUtf8( i )
#define qtr( i ) QString::fromUtf8( vlc_gettext(i) )
More information about the vlc-devel
mailing list