Commit c916c6f2 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Qt: allow a info button in interface toolbar

Close #2866
parent 13314b29
...@@ -91,6 +91,8 @@ void ActionsManager::doAction( int id_action ) ...@@ -91,6 +91,8 @@ void ActionsManager::doAction( int id_action )
THEDP->quit(); break; THEDP->quit(); break;
case RANDOM_ACTION: case RANDOM_ACTION:
THEMIM->toggleRandom(); break; THEMIM->toggleRandom(); break;
case INFO_ACTION:
THEDP->mediaInfoDialog(); break;
default: default:
msg_Dbg( p_intf, "Action: %i", id_action ); msg_Dbg( p_intf, "Action: %i", id_action );
break; break;
......
...@@ -53,6 +53,7 @@ typedef enum actionType_e ...@@ -53,6 +53,7 @@ typedef enum actionType_e
QUIT_ACTION, QUIT_ACTION,
RANDOM_ACTION, RANDOM_ACTION,
LOOP_ACTION, LOOP_ACTION,
INFO_ACTION,
} actionType_e; } actionType_e;
class ActionsManager : public QObject class ActionsManager : public QObject
......
...@@ -381,6 +381,10 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -381,6 +381,10 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
widget = loopButton; widget = loopButton;
} }
break; break;
case INFO_BUTTON: {
NORMAL_BUTTON( INFO );
}
break;
default: default:
msg_Warn( p_intf, "This should not happen %i", button ); msg_Warn( p_intf, "This should not happen %i", button );
break; break;
......
...@@ -82,6 +82,7 @@ typedef enum buttonType_e ...@@ -82,6 +82,7 @@ typedef enum buttonType_e
QUIT_BUTTON, QUIT_BUTTON,
RANDOM_BUTTON, RANDOM_BUTTON,
LOOP_BUTTON, LOOP_BUTTON,
INFO_BUTTON,
BUTTON_MAX, BUTTON_MAX,
SPLITTER = 0x20, SPLITTER = 0x20,
...@@ -105,7 +106,7 @@ static const char* const nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open" ...@@ -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_("De-Fullscreen"), N_("Extended panel"), N_("Playlist"), N_("Snapshot"),
N_("Record"), N_("A->B Loop"), N_("Frame By Frame"), N_("Trickplay Reverse"), N_("Record"), N_("A->B Loop"), N_("Frame By Frame"), N_("Trickplay Reverse"),
N_("Step backward" ), N_("Step forward"), N_("Quit"), N_("Random"), 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, static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_("Stop playback"), N_("Open a medium"), N_("Stop playback"), N_("Open a medium"),
N_("Previous media in the playlist"), N_("Previous media in the playlist"),
...@@ -115,7 +116,7 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP, ...@@ -115,7 +116,7 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_( "Take a snapshot" ), N_( "Record" ), N_( "Take a snapshot" ), N_( "Record" ),
N_( "Loop from point A to point B continuously." ), N_("Frame by frame"), N_( "Loop from point A to point B continuously." ), N_("Frame by frame"),
N_("Reverse"), N_("Step backward"), N_("Step forward"), N_("Quit"), 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", static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b",
":/toolbar/eject", ":/toolbar/previous_b", ":/toolbar/next_b", ":/toolbar/eject", ":/toolbar/previous_b", ":/toolbar/next_b",
":/toolbar/slower", ":/toolbar/faster", ":/toolbar/fullscreen", ":/toolbar/slower", ":/toolbar/faster", ":/toolbar/fullscreen",
...@@ -123,7 +124,7 @@ static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b" ...@@ -123,7 +124,7 @@ static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b"
":/toolbar/snapshot", ":/toolbar/record", ":/toolbar/atob_nob", ":/toolbar/snapshot", ":/toolbar/record", ":/toolbar/atob_nob",
":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back", ":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back",
":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on", ":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on",
":/buttons/playlist/repeat_all" }; ":/buttons/playlist/repeat_all", ":/menu/info" };
enum enum
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment