[vlc-devel] commit: Qt: allow a info button in interface toolbar (Jean-Baptiste Kempf )
git version control
git at videolan.org
Wed Dec 30 00:32:20 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Dec 30 00:31:59 2009 +0100| [c916c6f2f2072a2c85aa6cedff48adac3399a1cd] | committer: Jean-Baptiste Kempf
Qt: allow a info button in interface toolbar
Close #2866
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c916c6f2f2072a2c85aa6cedff48adac3399a1cd
---
modules/gui/qt4/actions_manager.cpp | 2 ++
modules/gui/qt4/actions_manager.hpp | 1 +
modules/gui/qt4/components/controller.cpp | 4 ++++
modules/gui/qt4/components/controller.hpp | 7 ++++---
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/actions_manager.cpp b/modules/gui/qt4/actions_manager.cpp
index fe8d6b4..f2c7f35 100644
--- a/modules/gui/qt4/actions_manager.cpp
+++ b/modules/gui/qt4/actions_manager.cpp
@@ -91,6 +91,8 @@ void ActionsManager::doAction( int id_action )
THEDP->quit(); break;
case RANDOM_ACTION:
THEMIM->toggleRandom(); break;
+ case INFO_ACTION:
+ THEDP->mediaInfoDialog(); break;
default:
msg_Dbg( p_intf, "Action: %i", id_action );
break;
diff --git a/modules/gui/qt4/actions_manager.hpp b/modules/gui/qt4/actions_manager.hpp
index b6ff148..fb05481 100644
--- a/modules/gui/qt4/actions_manager.hpp
+++ b/modules/gui/qt4/actions_manager.hpp
@@ -53,6 +53,7 @@ typedef enum actionType_e
QUIT_ACTION,
RANDOM_ACTION,
LOOP_ACTION,
+ INFO_ACTION,
} actionType_e;
class ActionsManager : public QObject
diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index d46b1f0..7b8e26b 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -381,6 +381,10 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
widget = loopButton;
}
break;
+ case INFO_BUTTON: {
+ NORMAL_BUTTON( INFO );
+ }
+ break;
default:
msg_Warn( p_intf, "This should not happen %i", button );
break;
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index d75a2d8..c9e0979 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -82,6 +82,7 @@ typedef enum buttonType_e
QUIT_BUTTON,
RANDOM_BUTTON,
LOOP_BUTTON,
+ INFO_BUTTON,
BUTTON_MAX,
SPLITTER = 0x20,
@@ -105,7 +106,7 @@ static const char* const nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open"
N_("De-Fullscreen"), N_("Extended panel"), N_("Playlist"), N_("Snapshot"),
N_("Record"), N_("A->B Loop"), N_("Frame By Frame"), N_("Trickplay Reverse"),
N_("Step backward" ), N_("Step forward"), N_("Quit"), N_("Random"),
- N_("Loop/Repeat mode") };
+ N_("Loop/Repeat mode"), N_("Information") };
static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_("Stop playback"), N_("Open a medium"),
N_("Previous media in the playlist"),
@@ -115,7 +116,7 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_( "Take a snapshot" ), N_( "Record" ),
N_( "Loop from point A to point B continuously." ), N_("Frame by frame"),
N_("Reverse"), N_("Step backward"), N_("Step forward"), N_("Quit"),
- N_("Random"), N_("Change the loop and repeat modes") };
+ N_("Random"), N_("Change the loop and repeat modes"), N_("Information") };
static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b",
":/toolbar/eject", ":/toolbar/previous_b", ":/toolbar/next_b",
":/toolbar/slower", ":/toolbar/faster", ":/toolbar/fullscreen",
@@ -123,7 +124,7 @@ static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b"
":/toolbar/snapshot", ":/toolbar/record", ":/toolbar/atob_nob",
":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back",
":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on",
- ":/buttons/playlist/repeat_all" };
+ ":/buttons/playlist/repeat_all", ":/menu/info" };
enum
{
More information about the vlc-devel
mailing list