weld MediaPlaybackPanel
Change-Id: I84c9e6f37de3b22b896f8109e49a5a0391630ac2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87754 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
fec7e3422f
commit
ad30e7df14
@ -10,20 +10,6 @@
|
|||||||
#ifndef INCLUDED_AVMEDIA_INC_BITMAPS_HRC
|
#ifndef INCLUDED_AVMEDIA_INC_BITMAPS_HRC
|
||||||
#define INCLUDED_AVMEDIA_INC_BITMAPS_HRC
|
#define INCLUDED_AVMEDIA_INC_BITMAPS_HRC
|
||||||
|
|
||||||
#define AVMEDIA_IMG_OPEN_NORMAL "avmedia/res/av02048.png"
|
|
||||||
#define AVMEDIA_IMG_PLAY_NORMAL "avmedia/res/av02049.png"
|
|
||||||
#define AVMEDIA_IMG_PAUSE_NORMAL "avmedia/res/av02050.png"
|
|
||||||
#define AVMEDIA_IMG_STOP_NORMAL "avmedia/res/av02051.png"
|
|
||||||
#define AVMEDIA_IMG_LOOP_NORMAL "avmedia/res/av02052.png"
|
|
||||||
#define AVMEDIA_IMG_INSERT_NORMAL "avmedia/res/av02053.png"
|
|
||||||
#define AVMEDIA_IMG_MUTE_NORMAL "avmedia/res/av02054.png"
|
|
||||||
#define AVMEDIA_IMG_OPEN_LARGE "avmedia/res/avl02048.png"
|
|
||||||
#define AVMEDIA_IMG_PLAY_LARGE "avmedia/res/avl02049.png"
|
|
||||||
#define AVMEDIA_IMG_PAUSE_LARGE "avmedia/res/avl02050.png"
|
|
||||||
#define AVMEDIA_IMG_STOP_LARGE "avmedia/res/avl02051.png"
|
|
||||||
#define AVMEDIA_IMG_LOOP_LARGE "avmedia/res/avl02052.png"
|
|
||||||
#define AVMEDIA_IMG_INSERT_LARGE "avmedia/res/avl02053.png"
|
|
||||||
#define AVMEDIA_IMG_MUTE_LARGE "avmedia/res/avl02054.png"
|
|
||||||
#define AVMEDIA_BMP_AUDIOLOGO "avmedia/res/avaudiologo.png"
|
#define AVMEDIA_BMP_AUDIOLOGO "avmedia/res/avaudiologo.png"
|
||||||
#define AVMEDIA_BMP_EMPTYLOGO "avmedia/res/avemptylogo.png"
|
#define AVMEDIA_BMP_EMPTYLOGO "avmedia/res/avemptylogo.png"
|
||||||
|
|
||||||
|
@ -22,17 +22,14 @@
|
|||||||
|
|
||||||
#include <avmedia/mediaitem.hxx>
|
#include <avmedia/mediaitem.hxx>
|
||||||
|
|
||||||
|
#include <vcl/ctrl.hxx>
|
||||||
#include <vcl/timer.hxx>
|
#include <vcl/timer.hxx>
|
||||||
#include <vcl/idle.hxx>
|
#include <vcl/idle.hxx>
|
||||||
#include <vcl/slider.hxx>
|
#include <vcl/weld.hxx>
|
||||||
#include <vcl/toolbox.hxx>
|
|
||||||
#include <vcl/fixed.hxx>
|
|
||||||
#include <avmedia/MediaControlBase.hxx>
|
#include <avmedia/MediaControlBase.hxx>
|
||||||
|
|
||||||
#define AVMEDIA_CONTROLOFFSET 6
|
#define AVMEDIA_CONTROLOFFSET 6
|
||||||
|
|
||||||
class ListBox;
|
|
||||||
|
|
||||||
namespace avmedia
|
namespace avmedia
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -41,12 +38,11 @@ class MediaItem;
|
|||||||
class MediaControl : public Control, public MediaControlBase
|
class MediaControl : public Control, public MediaControlBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyle );
|
MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyle );
|
||||||
virtual ~MediaControl() override;
|
virtual ~MediaControl() override;
|
||||||
virtual void dispose() override;
|
virtual void dispose() override;
|
||||||
|
|
||||||
const Size& getMinSizePixel() const;
|
Size getMinSizePixel() const;
|
||||||
|
|
||||||
void setState( const MediaItem& rItem );
|
void setState( const MediaItem& rItem );
|
||||||
void UpdateURLField( MediaItem const & maItem );
|
void UpdateURLField( MediaItem const & maItem );
|
||||||
@ -58,21 +54,24 @@ protected:
|
|||||||
|
|
||||||
virtual void Resize() override;
|
virtual void Resize() override;
|
||||||
virtual void InitializeWidgets() override;
|
virtual void InitializeWidgets() override;
|
||||||
VclPtr<FixedText> mpMediaPath;
|
std::unique_ptr<weld::Label> mxMediaPath;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
DECL_LINK( implTimeHdl, Slider*, void );
|
DECL_LINK(implTimeHdl, weld::Scale&, void);
|
||||||
DECL_LINK( implTimeEndHdl, Slider*, void );
|
DECL_LINK(implTimeEndHdl, Timer*, void);
|
||||||
DECL_LINK( implVolumeHdl, Slider*, void );
|
DECL_LINK(implVolumeHdl, weld::Scale&, void);
|
||||||
DECL_LINK( implSelectHdl, ToolBox*, void );
|
DECL_LINK(implSelectHdl, const OString&, void);
|
||||||
DECL_LINK( implZoomSelectHdl, ListBox&, void );
|
DECL_LINK(implZoomSelectHdl, weld::ComboBox&, void);
|
||||||
DECL_LINK(implTimeoutHdl, Timer *, void);
|
DECL_LINK(implTimeoutHdl, Timer*, void);
|
||||||
|
|
||||||
|
std::unique_ptr<weld::Builder> m_xBuilder;
|
||||||
|
VclPtr<vcl::Window> m_xVclContentArea;
|
||||||
|
std::unique_ptr<weld::Container> m_xContainer;
|
||||||
|
|
||||||
Idle maIdle;
|
Idle maIdle;
|
||||||
|
Idle maChangeTimeIdle;
|
||||||
MediaItem maItem;
|
MediaItem maItem;
|
||||||
VclPtr<ToolBox> mpZoomToolBox;
|
|
||||||
Size maMinSize;
|
|
||||||
bool mbLocked;
|
bool mbLocked;
|
||||||
MediaControlStyle meControlStyle;
|
MediaControlStyle meControlStyle;
|
||||||
double mfTime;
|
double mfTime;
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
#define AVMEDIA_STR_ALL_MEDIAFILES NC_("AVMEDIA_STR_ALL_MEDIAFILES", "All audio and video files")
|
#define AVMEDIA_STR_ALL_MEDIAFILES NC_("AVMEDIA_STR_ALL_MEDIAFILES", "All audio and video files")
|
||||||
#define AVMEDIA_STR_ALL_FILES NC_("AVMEDIA_STR_ALL_FILES", "All files")
|
#define AVMEDIA_STR_ALL_FILES NC_("AVMEDIA_STR_ALL_FILES", "All files")
|
||||||
#define AVMEDIA_STR_ERR_URL NC_("AVMEDIA_STR_ERR_URL", "The format of the selected file is not supported.")
|
#define AVMEDIA_STR_ERR_URL NC_("AVMEDIA_STR_ERR_URL", "The format of the selected file is not supported.")
|
||||||
|
#define AVMEDIA_STR_ZOOM_TOOLTIP NC_("AVMEDIA_STR_ZOOM_TOOLTIP", "View")
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
#include <avmedia/MediaControlBase.hxx>
|
#include <avmedia/MediaControlBase.hxx>
|
||||||
#include <avmedia/mediaplayer.hxx>
|
#include <avmedia/mediaplayer.hxx>
|
||||||
#include <vcl/edit.hxx>
|
|
||||||
#include <vcl/slider.hxx>
|
|
||||||
#include <vcl/toolbox.hxx>
|
|
||||||
#include <avmedia/mediaitem.hxx>
|
#include <avmedia/mediaitem.hxx>
|
||||||
#include <svtools/miscopt.hxx>
|
#include <svtools/miscopt.hxx>
|
||||||
#include <tools/time.hxx>
|
#include <tools/time.hxx>
|
||||||
@ -36,6 +33,7 @@ using ::rtl::OUString;
|
|||||||
namespace avmedia {
|
namespace avmedia {
|
||||||
|
|
||||||
MediaControlBase::MediaControlBase()
|
MediaControlBase::MediaControlBase()
|
||||||
|
: mbCurrentlySettingZoom(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,20 +50,20 @@ void MediaControlBase::UpdateTimeField( MediaItem const & aMediaItem, double fTi
|
|||||||
" / " +
|
" / " +
|
||||||
rLocaleData.getDuration( tools::Time( 0, 0, static_cast< sal_uInt32 >( floor( aMediaItem.getDuration() ) )) );
|
rLocaleData.getDuration( tools::Time( 0, 0, static_cast< sal_uInt32 >( floor( aMediaItem.getDuration() ) )) );
|
||||||
|
|
||||||
if( mpTimeEdit->GetText() != aTimeString )
|
if( mxTimeEdit->get_text() != aTimeString )
|
||||||
mpTimeEdit->SetText( aTimeString );
|
mxTimeEdit->set_text( aTimeString );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaControlBase::UpdateVolumeSlider( MediaItem const & aMediaItem )
|
void MediaControlBase::UpdateVolumeSlider( MediaItem const & aMediaItem )
|
||||||
{
|
{
|
||||||
if( aMediaItem.getURL().isEmpty() )
|
if( aMediaItem.getURL().isEmpty() )
|
||||||
mpVolumeSlider->Disable();
|
mxVolumeSlider->set_sensitive(false);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mpVolumeSlider->Enable();
|
mxVolumeSlider->set_sensitive(true);
|
||||||
const sal_Int32 nVolumeDB = aMediaItem.getVolumeDB();
|
const sal_Int32 nVolumeDB = aMediaItem.getVolumeDB();
|
||||||
mpVolumeSlider->SetThumbPos( std::min( std::max( nVolumeDB, static_cast< sal_Int32 >( AVMEDIA_DB_RANGE ) ),
|
mxVolumeSlider->set_value( std::min( std::max( nVolumeDB, static_cast< sal_Int32 >( AVMEDIA_DB_RANGE ) ),
|
||||||
static_cast< sal_Int32 >( 0 ) ) );
|
static_cast< sal_Int32 >( 0 ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,10 +71,10 @@ void MediaControlBase::UpdateVolumeSlider( MediaItem const & aMediaItem )
|
|||||||
void MediaControlBase::UpdateTimeSlider( MediaItem const & aMediaItem )
|
void MediaControlBase::UpdateTimeSlider( MediaItem const & aMediaItem )
|
||||||
{
|
{
|
||||||
if( aMediaItem.getURL().isEmpty() )
|
if( aMediaItem.getURL().isEmpty() )
|
||||||
mpTimeSlider->Disable();
|
mxTimeSlider->set_sensitive(false);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mpTimeSlider->Enable();
|
mxTimeSlider->set_sensitive(true);
|
||||||
|
|
||||||
const double fDuration = aMediaItem.getDuration();
|
const double fDuration = aMediaItem.getDuration();
|
||||||
|
|
||||||
@ -84,103 +82,101 @@ void MediaControlBase::UpdateTimeSlider( MediaItem const & aMediaItem )
|
|||||||
{
|
{
|
||||||
const double fTime = std::min( aMediaItem.getTime(), fDuration );
|
const double fTime = std::min( aMediaItem.getTime(), fDuration );
|
||||||
|
|
||||||
if( !mpTimeSlider->GetLineSize() )
|
bool bChanged(false);
|
||||||
mpTimeSlider->SetLineSize( static_cast< sal_uInt32 >( AVMEDIA_TIME_RANGE * AVMEDIA_LINEINCREMENT / fDuration ) );
|
int nStep(0), nPage(0);
|
||||||
|
if (!nStep)
|
||||||
|
{
|
||||||
|
nStep = AVMEDIA_TIME_RANGE * AVMEDIA_LINEINCREMENT / fDuration;
|
||||||
|
bChanged = true;
|
||||||
|
}
|
||||||
|
if (!nPage)
|
||||||
|
{
|
||||||
|
nPage = AVMEDIA_TIME_RANGE * AVMEDIA_PAGEINCREMENT / fDuration;
|
||||||
|
bChanged = true;
|
||||||
|
}
|
||||||
|
if (bChanged)
|
||||||
|
mxTimeSlider->set_increments(nStep, nPage);
|
||||||
|
|
||||||
if( !mpTimeSlider->GetPageSize() )
|
mxTimeSlider->set_value(fTime / fDuration * AVMEDIA_TIME_RANGE);
|
||||||
mpTimeSlider->SetPageSize( static_cast< sal_uInt32 >( AVMEDIA_TIME_RANGE * AVMEDIA_PAGEINCREMENT / fDuration ) );
|
|
||||||
|
|
||||||
mpTimeSlider->SetThumbPos( static_cast< sal_Int32 >( fTime / fDuration * AVMEDIA_TIME_RANGE ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaControlBase::InitializeWidgets()
|
void MediaControlBase::InitializeWidgets()
|
||||||
{
|
{
|
||||||
mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, GetImage(AVMEDIA_TOOLBOXITEM_PLAY), AvmResId( AVMEDIA_STR_PLAY ), ToolBoxItemBits::CHECKABLE );
|
mxPlayToolBox->set_item_help_id("play", HID_AVMEDIA_TOOLBOXITEM_PLAY);
|
||||||
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_PLAY, HID_AVMEDIA_TOOLBOXITEM_PLAY );
|
mxPlayToolBox->set_item_label("play", AvmResId(AVMEDIA_STR_PLAY));
|
||||||
|
mxPlayToolBox->set_item_help_id("pause", HID_AVMEDIA_TOOLBOXITEM_PAUSE);
|
||||||
|
mxPlayToolBox->set_item_label("pause", AvmResId(AVMEDIA_STR_PAUSE));
|
||||||
|
mxPlayToolBox->set_item_help_id("stop", HID_AVMEDIA_TOOLBOXITEM_STOP);
|
||||||
|
mxPlayToolBox->set_item_label("stop", AvmResId(AVMEDIA_STR_STOP));
|
||||||
|
mxPlayToolBox->set_item_help_id("loop", HID_AVMEDIA_TOOLBOXITEM_LOOP);
|
||||||
|
mxPlayToolBox->set_item_label("loop", AvmResId(AVMEDIA_STR_LOOP));
|
||||||
|
mxMuteToolBox->set_item_help_id("mute", HID_AVMEDIA_TOOLBOXITEM_MUTE);
|
||||||
|
mxMuteToolBox->set_item_label("mute", AvmResId(AVMEDIA_STR_MUTE));
|
||||||
|
|
||||||
mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, GetImage(AVMEDIA_TOOLBOXITEM_PAUSE), AvmResId( AVMEDIA_STR_PAUSE ), ToolBoxItemBits::CHECKABLE );
|
mxZoomListBox->append(OUString::number(AVMEDIA_ZOOMLEVEL_50), AvmResId( AVMEDIA_STR_ZOOM_50 ));
|
||||||
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_PAUSE, HID_AVMEDIA_TOOLBOXITEM_PAUSE );
|
mxZoomListBox->append(OUString::number(AVMEDIA_ZOOMLEVEL_100), AvmResId( AVMEDIA_STR_ZOOM_100 ));
|
||||||
|
mxZoomListBox->append(OUString::number(AVMEDIA_ZOOMLEVEL_200), AvmResId( AVMEDIA_STR_ZOOM_200 ));
|
||||||
mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_STOP, GetImage(AVMEDIA_TOOLBOXITEM_STOP), AvmResId( AVMEDIA_STR_STOP ), ToolBoxItemBits::CHECKABLE );
|
mxZoomListBox->append(OUString::number(AVMEDIA_ZOOMLEVEL_FIT), AvmResId( AVMEDIA_STR_ZOOM_FIT ));
|
||||||
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_STOP, HID_AVMEDIA_TOOLBOXITEM_STOP );
|
mxZoomListBox->set_help_id( HID_AVMEDIA_ZOOMLISTBOX );
|
||||||
|
mxZoomListBox->set_tooltip_text(AvmResId( AVMEDIA_STR_ZOOM_TOOLTIP ));
|
||||||
mpPlayToolBox->InsertSeparator();
|
|
||||||
|
|
||||||
mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_LOOP, GetImage(AVMEDIA_TOOLBOXITEM_LOOP), AvmResId( AVMEDIA_STR_LOOP ) );
|
|
||||||
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_LOOP, HID_AVMEDIA_TOOLBOXITEM_LOOP );
|
|
||||||
|
|
||||||
mpMuteToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_MUTE, GetImage(AVMEDIA_TOOLBOXITEM_MUTE), AvmResId( AVMEDIA_STR_MUTE ) );
|
|
||||||
mpMuteToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_MUTE, HID_AVMEDIA_TOOLBOXITEM_MUTE );
|
|
||||||
|
|
||||||
mpZoomListBox->InsertEntry( AvmResId( AVMEDIA_STR_ZOOM_50 ), AVMEDIA_ZOOMLEVEL_50 );
|
|
||||||
mpZoomListBox->InsertEntry( AvmResId( AVMEDIA_STR_ZOOM_100 ), AVMEDIA_ZOOMLEVEL_100 );
|
|
||||||
mpZoomListBox->InsertEntry( AvmResId( AVMEDIA_STR_ZOOM_200 ), AVMEDIA_ZOOMLEVEL_200 );
|
|
||||||
mpZoomListBox->InsertEntry( AvmResId( AVMEDIA_STR_ZOOM_FIT ), AVMEDIA_ZOOMLEVEL_FIT );
|
|
||||||
mpZoomListBox->SetHelpId( HID_AVMEDIA_ZOOMLISTBOX );
|
|
||||||
|
|
||||||
const OUString aTimeText( " 00:00:00/00:00:00 " );
|
const OUString aTimeText( " 00:00:00/00:00:00 " );
|
||||||
mpTimeEdit->SetText( aTimeText );
|
mxTimeEdit->set_text( aTimeText );
|
||||||
mpTimeEdit->SetUpdateMode( true );
|
mxTimeEdit->set_help_id( HID_AVMEDIA_TIMEEDIT );
|
||||||
mpTimeEdit->SetHelpId( HID_AVMEDIA_TIMEEDIT );
|
mxTimeEdit->set_sensitive(false);
|
||||||
mpTimeEdit->Disable();
|
|
||||||
mpTimeEdit->Show();
|
|
||||||
|
|
||||||
mpVolumeSlider->SetRange( Range( AVMEDIA_DB_RANGE, 0 ) );
|
mxVolumeSlider->set_range(AVMEDIA_DB_RANGE, 0);
|
||||||
mpVolumeSlider->SetUpdateMode( true );
|
mxVolumeSlider->set_tooltip_text( AvmResId( AVMEDIA_STR_VOLUME ));
|
||||||
mpVolumeSlider->SetQuickHelpText( AvmResId( AVMEDIA_STR_VOLUME ));
|
mxVolumeSlider->set_help_id( HID_AVMEDIA_VOLUMESLIDER );
|
||||||
mpVolumeSlider->SetHelpId( HID_AVMEDIA_VOLUMESLIDER );
|
|
||||||
|
|
||||||
mpTimeSlider->SetRange( Range( 0, AVMEDIA_TIME_RANGE ) );
|
mxTimeSlider->set_range( 0, AVMEDIA_TIME_RANGE );
|
||||||
mpTimeSlider->SetUpdateMode( true );
|
mxTimeSlider->set_tooltip_text( AvmResId( AVMEDIA_STR_POSITION ));
|
||||||
mpTimeSlider->SetQuickHelpText( AvmResId( AVMEDIA_STR_POSITION ));
|
|
||||||
mpTimeSlider->SetStyle(WB_HORZ | WB_DRAG | WB_3DLOOK);
|
|
||||||
mpTimeSlider->SetScrollTypeSet(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem)
|
void MediaControlBase::UpdateToolBoxes(const MediaItem& rMediaItem)
|
||||||
{
|
{
|
||||||
const bool bValidURL = !aMediaItem.getURL().isEmpty();
|
const bool bValidURL = !rMediaItem.getURL().isEmpty();
|
||||||
mpPlayToolBox->EnableItem( AVMEDIA_TOOLBOXITEM_PLAY, bValidURL );
|
mxPlayToolBox->set_item_sensitive("play", bValidURL);
|
||||||
mpPlayToolBox->EnableItem( AVMEDIA_TOOLBOXITEM_PAUSE, bValidURL );
|
mxPlayToolBox->set_item_sensitive("pause", bValidURL);
|
||||||
mpPlayToolBox->EnableItem( AVMEDIA_TOOLBOXITEM_STOP, bValidURL );
|
mxPlayToolBox->set_item_sensitive("stop", bValidURL);
|
||||||
mpPlayToolBox->EnableItem( AVMEDIA_TOOLBOXITEM_LOOP, bValidURL );
|
mxPlayToolBox->set_item_sensitive("loop", bValidURL);
|
||||||
mpMuteToolBox->EnableItem( AVMEDIA_TOOLBOXITEM_MUTE, bValidURL );
|
mxMuteToolBox->set_item_sensitive("mute", bValidURL);
|
||||||
if( !bValidURL )
|
if( !bValidURL )
|
||||||
{
|
{
|
||||||
mpZoomListBox->Disable();
|
mxZoomListBox->set_sensitive(false);
|
||||||
mpMuteToolBox->Disable();
|
mxMuteToolBox->set_sensitive(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mpPlayToolBox->Enable();
|
mxPlayToolBox->set_sensitive(true);
|
||||||
mpMuteToolBox->Enable();
|
mxMuteToolBox->set_sensitive(true);
|
||||||
if( aMediaItem.getState() == MediaState::Play )
|
if( rMediaItem.getState() == MediaState::Play )
|
||||||
{
|
{
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY );
|
mxPlayToolBox->set_item_active("play", true);
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false );
|
mxPlayToolBox->set_item_active("pause", false);
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_STOP, false );
|
mxPlayToolBox->set_item_active("stop", false);
|
||||||
}
|
}
|
||||||
else if( aMediaItem.getState() == MediaState::Pause )
|
else if( rMediaItem.getState() == MediaState::Pause )
|
||||||
{
|
{
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, false );
|
mxPlayToolBox->set_item_active("play", false);
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE );
|
mxPlayToolBox->set_item_active("pause", true);
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_STOP, false );
|
mxPlayToolBox->set_item_active("stop", false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, false );
|
mxPlayToolBox->set_item_active("play", false);
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false );
|
mxPlayToolBox->set_item_active("pause", false);
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_STOP );
|
mxPlayToolBox->set_item_active("stop", true);
|
||||||
}
|
}
|
||||||
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_LOOP, aMediaItem.isLoop() );
|
mxPlayToolBox->set_item_active("loop", rMediaItem.isLoop());
|
||||||
mpMuteToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_MUTE, aMediaItem.isMute() );
|
mxMuteToolBox->set_item_active("mute", rMediaItem.isMute());
|
||||||
if( !mpZoomListBox->IsTravelSelect() && !mpZoomListBox->IsInDropDown() )
|
if (!mbCurrentlySettingZoom)
|
||||||
{
|
{
|
||||||
sal_uInt16 nSelectEntryPos ;
|
sal_uInt16 nSelectEntryPos ;
|
||||||
|
|
||||||
switch( aMediaItem.getZoom() )
|
switch( rMediaItem.getZoom() )
|
||||||
{
|
{
|
||||||
case css::media::ZoomLevel_ZOOM_1_TO_2:
|
case css::media::ZoomLevel_ZOOM_1_TO_2:
|
||||||
nSelectEntryPos = AVMEDIA_ZOOMLEVEL_50;
|
nSelectEntryPos = AVMEDIA_ZOOMLEVEL_50;
|
||||||
@ -205,134 +201,61 @@ void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem)
|
|||||||
|
|
||||||
if( nSelectEntryPos != AVMEDIA_ZOOMLEVEL_INVALID )
|
if( nSelectEntryPos != AVMEDIA_ZOOMLEVEL_INVALID )
|
||||||
{
|
{
|
||||||
mpZoomListBox->Enable();
|
mxZoomListBox->show();
|
||||||
mpZoomListBox->SelectEntryPos( nSelectEntryPos );
|
mxZoomListBox->set_sensitive(true);
|
||||||
|
mxZoomListBox->set_active(nSelectEntryPos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mpZoomListBox->Disable();
|
mxZoomListBox->set_sensitive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaControlBase::SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, sal_uInt16 nId)
|
void MediaControlBase::SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, const OString& rId)
|
||||||
{
|
{
|
||||||
switch( nId )
|
if (rId == "apply")
|
||||||
{
|
{
|
||||||
case AVMEDIA_TOOLBOXITEM_INSERT:
|
MediaFloater* pFloater = avmedia::getMediaFloater();
|
||||||
{
|
|
||||||
MediaFloater* pFloater = avmedia::getMediaFloater();
|
|
||||||
|
|
||||||
if( pFloater )
|
if( pFloater )
|
||||||
pFloater->dispatchCurrentURL();
|
pFloater->dispatchCurrentURL();
|
||||||
}
|
}
|
||||||
break;
|
else if (rId == "play")
|
||||||
|
{
|
||||||
|
aExecItem.setState( MediaState::Play );
|
||||||
|
|
||||||
case AVMEDIA_TOOLBOXITEM_PLAY:
|
if( aItem.getTime() == aItem.getDuration() )
|
||||||
{
|
|
||||||
aExecItem.setState( MediaState::Play );
|
|
||||||
|
|
||||||
if( aItem.getTime() == aItem.getDuration() )
|
|
||||||
aExecItem.setTime( 0.0 );
|
|
||||||
else
|
|
||||||
aExecItem.setTime( aItem.getTime() );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case AVMEDIA_TOOLBOXITEM_PAUSE:
|
|
||||||
{
|
|
||||||
aExecItem.setState( MediaState::Pause );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case AVMEDIA_TOOLBOXITEM_STOP:
|
|
||||||
{
|
|
||||||
aExecItem.setState( MediaState::Stop );
|
|
||||||
aExecItem.setTime( 0.0 );
|
aExecItem.setTime( 0.0 );
|
||||||
}
|
else
|
||||||
break;
|
aExecItem.setTime( aItem.getTime() );
|
||||||
|
}
|
||||||
case AVMEDIA_TOOLBOXITEM_MUTE:
|
else if (rId == "pause")
|
||||||
{
|
{
|
||||||
aExecItem.setMute( !mpMuteToolBox->IsItemChecked( AVMEDIA_TOOLBOXITEM_MUTE ) );
|
aExecItem.setState( MediaState::Pause );
|
||||||
}
|
}
|
||||||
break;
|
else if (rId == "stop")
|
||||||
|
{
|
||||||
case AVMEDIA_TOOLBOXITEM_LOOP:
|
aExecItem.setState( MediaState::Stop );
|
||||||
{
|
aExecItem.setTime( 0.0 );
|
||||||
aExecItem.setLoop( !mpPlayToolBox->IsItemChecked( AVMEDIA_TOOLBOXITEM_LOOP ) );
|
}
|
||||||
}
|
else if (rId == "mute")
|
||||||
break;
|
{
|
||||||
|
aExecItem.setMute( mxMuteToolBox->get_item_active("mute") );
|
||||||
default:
|
}
|
||||||
break;
|
else if (rId == "loop")
|
||||||
|
{
|
||||||
|
aExecItem.setLoop( mxPlayToolBox->get_item_active("loop") );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image MediaControlBase::GetImage(sal_Int32 nImageId)
|
void MediaControlBase::disposeWidgets()
|
||||||
{
|
{
|
||||||
const bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
|
mxZoomListBox.reset();
|
||||||
|
mxTimeEdit.reset();
|
||||||
OUString sImageId;
|
mxVolumeSlider.reset();
|
||||||
|
mxMuteToolBox.reset();
|
||||||
if (bLarge)
|
mxTimeSlider.reset();
|
||||||
{
|
mxPlayToolBox.reset();
|
||||||
switch (nImageId)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
case AVMEDIA_TOOLBOXITEM_PLAY:
|
|
||||||
sImageId = AVMEDIA_IMG_PLAY_LARGE;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_PAUSE:
|
|
||||||
sImageId = AVMEDIA_IMG_PAUSE_LARGE;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_STOP:
|
|
||||||
sImageId = AVMEDIA_IMG_STOP_LARGE;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_MUTE:
|
|
||||||
sImageId = AVMEDIA_IMG_MUTE_LARGE;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_LOOP:
|
|
||||||
sImageId = AVMEDIA_IMG_LOOP_LARGE;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_OPEN:
|
|
||||||
sImageId = AVMEDIA_IMG_OPEN_LARGE;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_INSERT:
|
|
||||||
sImageId = AVMEDIA_IMG_INSERT_LARGE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (nImageId)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
case AVMEDIA_TOOLBOXITEM_PLAY:
|
|
||||||
sImageId = AVMEDIA_IMG_PLAY_NORMAL;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_PAUSE:
|
|
||||||
sImageId = AVMEDIA_IMG_PAUSE_NORMAL;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_STOP:
|
|
||||||
sImageId = AVMEDIA_IMG_STOP_NORMAL;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_MUTE:
|
|
||||||
sImageId = AVMEDIA_IMG_MUTE_NORMAL;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_LOOP:
|
|
||||||
sImageId = AVMEDIA_IMG_LOOP_NORMAL;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_OPEN:
|
|
||||||
sImageId = AVMEDIA_IMG_OPEN_NORMAL;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TOOLBOXITEM_INSERT:
|
|
||||||
sImageId = AVMEDIA_IMG_INSERT_NORMAL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Image(StockImage::Yes, sImageId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,12 @@
|
|||||||
#include <helpids.h>
|
#include <helpids.h>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
#include <vcl/settings.hxx>
|
#include <vcl/settings.hxx>
|
||||||
#include <vcl/lstbox.hxx>
|
#include <vcl/layout.hxx>
|
||||||
|
#include <vcl/weld.hxx>
|
||||||
|
#include <unotools/syslocale.hxx>
|
||||||
|
#include <sfx2/viewfrm.hxx>
|
||||||
|
#include <math.h>
|
||||||
|
#include <algorithm>
|
||||||
#include <avmedia/MediaControlBase.hxx>
|
#include <avmedia/MediaControlBase.hxx>
|
||||||
|
|
||||||
namespace avmedia
|
namespace avmedia
|
||||||
@ -34,21 +39,31 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
|
|||||||
Control( pParent ),
|
Control( pParent ),
|
||||||
MediaControlBase(),
|
MediaControlBase(),
|
||||||
maIdle( "avmedia MediaControl Idle" ),
|
maIdle( "avmedia MediaControl Idle" ),
|
||||||
|
maChangeTimeIdle( "avmedia MediaControl Change Time Idle" ),
|
||||||
maItem( 0, AVMediaSetMask::ALL ),
|
maItem( 0, AVMediaSetMask::ALL ),
|
||||||
mbLocked( false ),
|
mbLocked( false ),
|
||||||
meControlStyle( eControlStyle ),
|
meControlStyle( eControlStyle ),
|
||||||
mfTime(0.0)
|
mfTime(0.0)
|
||||||
{
|
{
|
||||||
mpPlayToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ;
|
SetStyle(GetStyle() | WB_DIALOGCONTROL);
|
||||||
mpTimeSlider = VclPtr<Slider>::Create(this, WB_HORZ | WB_DRAG | WB_3DLOOK) ;
|
|
||||||
mpTimeSlider->SetScrollTypeSet(true);
|
m_xVclContentArea = VclPtr<VclVBox>::Create(this);
|
||||||
mpMuteToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ;
|
m_xVclContentArea->Show();
|
||||||
mpVolumeSlider = VclPtr<Slider>::Create(this, WB_HORZ | WB_DRAG) ;
|
// MEDIACONTROLSTYLE_MULTILINE is the normal docking windows of tools->media player
|
||||||
mpVolumeSlider->SetScrollTypeSet(true);
|
// MEDIACONTROLSTYLE_SINGLELINE is the toolbar of view->toolbar->media playback
|
||||||
mpZoomToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ;
|
m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea,
|
||||||
mpZoomListBox = VclPtr<ListBox>::Create( mpZoomToolBox.get(), WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_3DLOOK ) ;
|
eControlStyle == MEDIACONTROLSTYLE_MULTILINE ?
|
||||||
mpTimeEdit = VclPtr<Edit>::Create(this, WB_CENTER | WB_READONLY | WB_BORDER | WB_3DLOOK ) ;
|
OUString("svx/ui/mediawindow.ui") :
|
||||||
mpMediaPath = VclPtr<FixedText>::Create(this, WB_VCENTER | WB_READONLY | WB_BORDER | WB_3DLOOK ) ;
|
OUString("svx/ui/medialine.ui")));
|
||||||
|
m_xContainer = m_xBuilder->weld_container("MediaWindow");
|
||||||
|
|
||||||
|
mxPlayToolBox = m_xBuilder->weld_toolbar("playtoolbox");
|
||||||
|
mxTimeSlider = m_xBuilder->weld_scale("timeslider");
|
||||||
|
mxMuteToolBox = m_xBuilder->weld_toolbar("mutetoolbox");
|
||||||
|
mxVolumeSlider = m_xBuilder->weld_scale("volumeslider");
|
||||||
|
mxZoomListBox = m_xBuilder->weld_combo_box("zoombox");
|
||||||
|
mxTimeEdit = m_xBuilder->weld_entry("timeedit");
|
||||||
|
mxMediaPath = m_xBuilder->weld_label("url");
|
||||||
|
|
||||||
SetBackground();
|
SetBackground();
|
||||||
SetPaintTransparent( true );
|
SetPaintTransparent( true );
|
||||||
@ -56,59 +71,31 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
|
|||||||
|
|
||||||
InitializeWidgets();
|
InitializeWidgets();
|
||||||
|
|
||||||
mpPlayToolBox->SetSelectHdl( LINK( this, MediaControl, implSelectHdl ) );
|
mxPlayToolBox->connect_clicked( LINK( this, MediaControl, implSelectHdl ) );
|
||||||
mpPlayToolBox->SetSizePixel( mpPlayToolBox->CalcWindowSizePixel() );
|
|
||||||
mpPlayToolBox->Show();
|
|
||||||
maMinSize = mpPlayToolBox->GetSizePixel();
|
|
||||||
|
|
||||||
mpTimeSlider->SetSlideHdl( LINK( this, MediaControl, implTimeHdl ) );
|
mxTimeSlider->connect_value_changed( LINK( this, MediaControl, implTimeHdl ) );
|
||||||
mpTimeSlider->SetEndSlideHdl( LINK( this, MediaControl, implTimeEndHdl ) );
|
// when changint the time, use this to do the time change after active scrolling
|
||||||
mpTimeSlider->SetSizePixel( Size( 128, mpPlayToolBox->GetSizePixel().Height() ) );
|
// has stopped for a little which
|
||||||
mpTimeSlider->Show();
|
maChangeTimeIdle.SetPriority( TaskPriority::LOWEST );
|
||||||
maMinSize.AdjustWidth(mpTimeSlider->GetSizePixel().Width() );
|
maChangeTimeIdle.SetInvokeHandler( LINK( this, MediaControl, implTimeEndHdl ) );
|
||||||
|
|
||||||
const OUString aTimeText( " 00:00:00/00:00:00 " );
|
const OUString aTimeText( " 00:00:00/00:00:00 " );
|
||||||
mpTimeEdit->SetSizePixel( Size( mpTimeEdit->GetTextWidth( aTimeText ) + 8, mpPlayToolBox->GetSizePixel().Height() ) );
|
mxTimeEdit->set_text(aTimeText);
|
||||||
mpTimeEdit->SetControlBackground( Application::GetSettings().GetStyleSettings().GetWindowColor() );
|
Size aTextSize = mxTimeEdit->get_preferred_size();
|
||||||
maMinSize.AdjustWidth(mpTimeEdit->GetSizePixel().Width() );
|
mxTimeEdit->set_size_request(aTextSize.Width(), aTextSize.Height());
|
||||||
|
mxTimeEdit->set_text(OUString());
|
||||||
|
|
||||||
mpMuteToolBox->SetSelectHdl( LINK( this, MediaControl, implSelectHdl ) );
|
mxMuteToolBox->connect_clicked( LINK( this, MediaControl, implSelectHdl ) );
|
||||||
mpMuteToolBox->SetSizePixel( mpMuteToolBox->CalcWindowSizePixel() );
|
mxVolumeSlider->connect_value_changed( LINK( this, MediaControl, implVolumeHdl ) );
|
||||||
mpMuteToolBox->Show();
|
|
||||||
maMinSize.AdjustWidth(mpMuteToolBox->GetSizePixel().Width() );
|
|
||||||
|
|
||||||
mpVolumeSlider->SetSlideHdl( LINK( this, MediaControl, implVolumeHdl ) );
|
mxZoomListBox->connect_changed( LINK( this, MediaControl, implZoomSelectHdl ) );
|
||||||
mpVolumeSlider->SetSizePixel( Size( 48, mpPlayToolBox->GetSizePixel().Height() ) );
|
mxZoomListBox->set_help_id(HID_AVMEDIA_ZOOMLISTBOX);
|
||||||
mpVolumeSlider->Show();
|
|
||||||
maMinSize.AdjustWidth(mpVolumeSlider->GetSizePixel().Width() );
|
|
||||||
|
|
||||||
mpZoomListBox->SetSizePixel( Size( mpTimeEdit->GetSizePixel().Width(), 260 ) );
|
|
||||||
mpZoomListBox->SetSelectHdl( LINK( this, MediaControl, implZoomSelectHdl ) );
|
|
||||||
|
|
||||||
mpZoomToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_ZOOM, AvmResId( AVMEDIA_STR_ZOOM ) );
|
|
||||||
mpZoomToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_ZOOM, HID_AVMEDIA_ZOOMLISTBOX );
|
|
||||||
|
|
||||||
mpZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, mpZoomListBox );
|
|
||||||
mpZoomToolBox->SetSelectHdl( LINK( this, MediaControl, implSelectHdl ) );
|
|
||||||
mpZoomToolBox->SetSizePixel( mpZoomToolBox->CalcWindowSizePixel() );
|
|
||||||
mpZoomToolBox->Show();
|
|
||||||
maMinSize.AdjustWidth(mpZoomToolBox->GetSizePixel().Width() );
|
|
||||||
|
|
||||||
const OUString aMediaPath( AvmResId( AVMEDIA_MEDIA_PATH_DEFAULT ) );
|
const OUString aMediaPath( AvmResId( AVMEDIA_MEDIA_PATH_DEFAULT ) );
|
||||||
mpMediaPath->SetText(aMediaPath);
|
mxMediaPath->set_label(aMediaPath);
|
||||||
mpMediaPath->SetUpdateMode( false );
|
if (meControlStyle == MEDIACONTROLSTYLE_SINGLELINE)
|
||||||
mpMediaPath->SetSizePixel( Size( mpMediaPath->GetTextWidth( aMediaPath ) + 400, mpPlayToolBox->GetSizePixel().Height() ) ); // maybe extend the no. 400 to span the screen width
|
mxMediaPath->set_size_request(mxMediaPath->get_preferred_size().Width() + 400, -1); // maybe extend the no. 400 to span the screen width
|
||||||
mpMediaPath->SetControlBackground( Application::GetSettings().GetStyleSettings().GetWindowColor() );
|
|
||||||
mpMediaPath->Show();
|
|
||||||
maMinSize.AdjustWidth(mpMediaPath->GetSizePixel().Width() );
|
|
||||||
|
|
||||||
if( meControlStyle == MEDIACONTROLSTYLE_MULTILINE )
|
|
||||||
{
|
|
||||||
maMinSize.setWidth( 256 );
|
|
||||||
maMinSize.setHeight( ( maMinSize.Height() << 1 ) + AVMEDIA_CONTROLOFFSET );
|
|
||||||
mpZoomToolBox->SetBackground();
|
|
||||||
mpZoomToolBox->SetPaintTransparent( true );
|
|
||||||
}
|
|
||||||
// we want time field + progress slider to update as the media plays
|
// we want time field + progress slider to update as the media plays
|
||||||
// give this task a lower prio than REPAINT so that UI updates are not starved
|
// give this task a lower prio than REPAINT so that UI updates are not starved
|
||||||
maIdle.SetPriority( TaskPriority::POST_PAINT );
|
maIdle.SetPriority( TaskPriority::POST_PAINT );
|
||||||
@ -119,25 +106,12 @@ void MediaControl::InitializeWidgets()
|
|||||||
{
|
{
|
||||||
if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE )
|
if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE )
|
||||||
{
|
{
|
||||||
mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, GetImage(AVMEDIA_TOOLBOXITEM_OPEN), AvmResId( AVMEDIA_STR_OPEN ) );
|
mxPlayToolBox->set_item_help_id("open", HID_AVMEDIA_TOOLBOXITEM_OPEN);
|
||||||
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_OPEN, HID_AVMEDIA_TOOLBOXITEM_OPEN );
|
mxPlayToolBox->set_item_label("open", AvmResId(AVMEDIA_STR_OPEN));
|
||||||
mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_INSERT, GetImage(AVMEDIA_TOOLBOXITEM_INSERT), AvmResId( AVMEDIA_STR_INSERT ) );
|
mxPlayToolBox->set_item_help_id("apply", HID_AVMEDIA_TOOLBOXITEM_INSERT);
|
||||||
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_INSERT, HID_AVMEDIA_TOOLBOXITEM_INSERT );
|
mxPlayToolBox->set_item_label("apply", AvmResId(AVMEDIA_STR_INSERT));
|
||||||
mpPlayToolBox->InsertSeparator();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mpZoomListBox->SetBackground();
|
|
||||||
mpPlayToolBox->SetBackground();
|
|
||||||
mpPlayToolBox->SetPaintTransparent( true );
|
|
||||||
mpMuteToolBox->SetBackground();
|
|
||||||
mpMuteToolBox->SetPaintTransparent( true );
|
|
||||||
mpMuteToolBox->InsertSeparator();
|
|
||||||
}
|
}
|
||||||
avmedia::MediaControlBase::InitializeWidgets();
|
avmedia::MediaControlBase::InitializeWidgets();
|
||||||
|
|
||||||
if( meControlStyle == MEDIACONTROLSTYLE_SINGLELINE )
|
|
||||||
mpPlayToolBox->InsertSeparator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaControl::~MediaControl()
|
MediaControl::~MediaControl()
|
||||||
@ -147,95 +121,32 @@ MediaControl::~MediaControl()
|
|||||||
|
|
||||||
void MediaControl::dispose()
|
void MediaControl::dispose()
|
||||||
{
|
{
|
||||||
mpZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, nullptr );
|
disposeWidgets();
|
||||||
mpZoomListBox.disposeAndClear();
|
mxMediaPath.reset();
|
||||||
mpTimeEdit.disposeAndClear();
|
m_xContainer.reset();
|
||||||
mpMediaPath.disposeAndClear();
|
m_xBuilder.reset();
|
||||||
mpZoomToolBox.disposeAndClear();
|
m_xVclContentArea.disposeAndClear();
|
||||||
mpVolumeSlider.disposeAndClear();
|
|
||||||
mpMuteToolBox.disposeAndClear();
|
|
||||||
mpTimeSlider.disposeAndClear();
|
|
||||||
mpPlayToolBox.disposeAndClear();
|
|
||||||
Control::dispose();
|
Control::dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Size& MediaControl::getMinSizePixel() const
|
Size MediaControl::getMinSizePixel() const
|
||||||
{
|
{
|
||||||
return maMinSize;
|
return VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaControl::UpdateURLField(MediaItem const & tempItem)
|
void MediaControl::UpdateURLField(MediaItem const & tempItem)
|
||||||
{
|
{
|
||||||
const OUString aURL( AvmResId(AVMEDIA_MEDIA_PATH) + ": " + tempItem.getURL() ) ;
|
const OUString aURL( AvmResId(AVMEDIA_MEDIA_PATH) + ": " + tempItem.getURL() ) ;
|
||||||
mpMediaPath->SetText(aURL);
|
mxMediaPath->set_label(aURL);
|
||||||
mpMediaPath->SetUpdateMode( false );
|
|
||||||
mpMediaPath->SetSizePixel( Size( mpMediaPath->GetTextWidth( aURL ) + 8, mpPlayToolBox->GetSizePixel().Height() ) );
|
|
||||||
mpMediaPath->SetControlBackground( Application::GetSettings().GetStyleSettings().GetWindowColor() );
|
|
||||||
mpMediaPath->Show();
|
|
||||||
maMinSize.AdjustWidth(mpMediaPath->GetSizePixel().Width() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaControl::Resize()
|
void MediaControl::Resize()
|
||||||
{
|
{
|
||||||
Point aPos( 0, 0 );
|
vcl::Window *pChild = GetWindow(GetWindowType::FirstChild);
|
||||||
const sal_Int32 nPlayToolBoxWidth = mpPlayToolBox->GetSizePixel().Width();
|
assert(pChild);
|
||||||
const sal_Int32 nMuteToolBoxWidth = mpMuteToolBox->GetSizePixel().Width();
|
VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel());
|
||||||
const sal_Int32 nVolumeSliderWidth = mpVolumeSlider->GetSizePixel().Width();
|
|
||||||
const sal_Int32 nZoomToolBoxWidth = mpZoomToolBox->GetSizePixel().Width();
|
|
||||||
const sal_Int32 nTimeEditWidth = mpTimeEdit->GetSizePixel().Width();
|
|
||||||
const sal_Int32 nMediaPathWidth = mpMediaPath->GetSizePixel().Width();
|
|
||||||
const sal_Int32 nTimeSliderHeight = mpTimeSlider->GetSizePixel().Height();
|
|
||||||
|
|
||||||
if( meControlStyle == MEDIACONTROLSTYLE_SINGLELINE )
|
|
||||||
{
|
|
||||||
const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - ( AVMEDIA_CONTROLOFFSET * 4 ) -
|
|
||||||
nPlayToolBoxWidth - nMuteToolBoxWidth - nVolumeSliderWidth - nTimeEditWidth - nZoomToolBoxWidth - nMediaPathWidth;
|
|
||||||
|
|
||||||
mpPlayToolBox->SetPosSizePixel( aPos, mpPlayToolBox->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.AdjustX(nPlayToolBoxWidth );
|
|
||||||
mpTimeSlider->SetPosSizePixel( aPos, Size( nTimeSliderWidth, nTimeSliderHeight ) );
|
|
||||||
|
|
||||||
aPos.AdjustX(nTimeSliderWidth + AVMEDIA_CONTROLOFFSET );
|
|
||||||
mpTimeEdit->SetPosSizePixel( aPos, mpTimeEdit->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.AdjustX(nTimeEditWidth + AVMEDIA_CONTROLOFFSET );
|
|
||||||
mpMuteToolBox->SetPosSizePixel( aPos, mpMuteToolBox->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.AdjustX(nMuteToolBoxWidth );
|
|
||||||
mpVolumeSlider->SetPosSizePixel( aPos, mpVolumeSlider->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.AdjustX(nVolumeSliderWidth + AVMEDIA_CONTROLOFFSET );
|
|
||||||
mpZoomToolBox->SetPosSizePixel( aPos, mpZoomToolBox->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.AdjustX(nZoomToolBoxWidth + AVMEDIA_CONTROLOFFSET );
|
|
||||||
mpMediaPath->SetPosSizePixel( aPos, mpMediaPath->GetSizePixel() );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - AVMEDIA_CONTROLOFFSET - nTimeEditWidth;
|
|
||||||
|
|
||||||
mpTimeSlider->SetPosSizePixel( aPos, Size( nTimeSliderWidth, nTimeSliderHeight ) );
|
|
||||||
|
|
||||||
aPos.AdjustX(nTimeSliderWidth + AVMEDIA_CONTROLOFFSET );
|
|
||||||
mpTimeEdit->SetPosSizePixel( aPos, mpTimeEdit->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.setX( 0 );
|
|
||||||
aPos.AdjustY(nTimeSliderHeight + AVMEDIA_CONTROLOFFSET );
|
|
||||||
mpPlayToolBox->SetPosSizePixel( aPos, mpPlayToolBox->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.setX( GetSizePixel().Width() - nVolumeSliderWidth - nMuteToolBoxWidth - nZoomToolBoxWidth - AVMEDIA_CONTROLOFFSET );
|
|
||||||
mpMuteToolBox->SetPosSizePixel( aPos, mpMuteToolBox->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.AdjustX(nMuteToolBoxWidth );
|
|
||||||
mpVolumeSlider->SetPosSizePixel( aPos, mpVolumeSlider->GetSizePixel() );
|
|
||||||
|
|
||||||
aPos.setX( GetSizePixel().Width() - nZoomToolBoxWidth );
|
|
||||||
mpZoomToolBox->SetPosSizePixel( aPos, mpZoomToolBox->GetSizePixel() );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MediaControl::setState( const MediaItem& rItem )
|
void MediaControl::setState( const MediaItem& rItem )
|
||||||
{
|
{
|
||||||
double fTime = rItem.getTime();
|
double fTime = rItem.getTime();
|
||||||
@ -244,7 +155,7 @@ void MediaControl::setState( const MediaItem& rItem )
|
|||||||
mfTime = fTime;
|
mfTime = fTime;
|
||||||
maItem.merge( rItem );
|
maItem.merge( rItem );
|
||||||
if( rItem.getURL().isEmpty() && meControlStyle == MEDIACONTROLSTYLE_SINGLELINE )
|
if( rItem.getURL().isEmpty() && meControlStyle == MEDIACONTROLSTYLE_SINGLELINE )
|
||||||
mpPlayToolBox->Disable();
|
mxPlayToolBox->set_sensitive(false);
|
||||||
UpdateToolBoxes( maItem );
|
UpdateToolBoxes( maItem );
|
||||||
UpdateTimeSlider( maItem );
|
UpdateTimeSlider( maItem );
|
||||||
UpdateVolumeSlider( maItem );
|
UpdateVolumeSlider( maItem );
|
||||||
@ -253,19 +164,19 @@ void MediaControl::setState( const MediaItem& rItem )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK( MediaControl, implTimeHdl, Slider*, p, void )
|
IMPL_LINK( MediaControl, implTimeHdl, weld::Scale&, rSlider, void )
|
||||||
{
|
{
|
||||||
mbLocked = true;
|
mbLocked = true;
|
||||||
maIdle.Stop();
|
maIdle.Stop();
|
||||||
UpdateTimeField( maItem, p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE );
|
UpdateTimeField(maItem, rSlider.get_value() * maItem.getDuration() / AVMEDIA_TIME_RANGE);
|
||||||
|
maChangeTimeIdle.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IMPL_LINK_NOARG(MediaControl, implTimeEndHdl, Timer*, void)
|
||||||
IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p, void )
|
|
||||||
{
|
{
|
||||||
MediaItem aExecItem;
|
MediaItem aExecItem;
|
||||||
|
|
||||||
aExecItem.setTime( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE );
|
aExecItem.setTime( mxTimeSlider->get_value() * maItem.getDuration() / AVMEDIA_TIME_RANGE );
|
||||||
// keep state (if the media was playing, keep it playing)
|
// keep state (if the media was playing, keep it playing)
|
||||||
aExecItem.setState(maItem.getState());
|
aExecItem.setState(maItem.getState());
|
||||||
execute( aExecItem );
|
execute( aExecItem );
|
||||||
@ -274,63 +185,56 @@ IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p, void )
|
|||||||
mbLocked = false;
|
mbLocked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IMPL_LINK( MediaControl, implVolumeHdl, weld::Scale&, rSlider, void )
|
||||||
IMPL_LINK( MediaControl, implVolumeHdl, Slider*, p, void )
|
|
||||||
{
|
{
|
||||||
MediaItem aExecItem;
|
MediaItem aExecItem;
|
||||||
|
|
||||||
aExecItem.setVolumeDB( static_cast< sal_Int16 >( p->GetThumbPos() ) );
|
aExecItem.setVolumeDB(rSlider.get_value());
|
||||||
execute( aExecItem );
|
execute( aExecItem );
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IMPL_LINK( MediaControl, implSelectHdl, const OString&, rIdent, void )
|
||||||
IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p, void )
|
|
||||||
{
|
{
|
||||||
if( p )
|
MediaItem aExecItem;
|
||||||
|
if (rIdent == "open")
|
||||||
{
|
{
|
||||||
MediaItem aExecItem;
|
OUString aURL;
|
||||||
if( p->GetCurItemId() == AVMEDIA_TOOLBOXITEM_OPEN )
|
if (MediaWindow::executeMediaURLDialog(GetFrameWeld(), aURL, nullptr))
|
||||||
{
|
{
|
||||||
OUString aURL;
|
if( !MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) )
|
||||||
if (MediaWindow::executeMediaURLDialog(GetFrameWeld(), aURL, nullptr))
|
MediaWindow::executeFormatErrorBox(GetFrameWeld());
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if( !MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) )
|
aExecItem.setURL( aURL, "", ""/*TODO?*/ );
|
||||||
MediaWindow::executeFormatErrorBox(GetFrameWeld());
|
aExecItem.setState( MediaState::Play );
|
||||||
else
|
|
||||||
{
|
|
||||||
aExecItem.setURL( aURL, "", ""/*TODO?*/ );
|
|
||||||
aExecItem.setState( MediaState::Play );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
SelectPlayToolBoxItem( aExecItem, maItem, p->GetCurItemId() );
|
|
||||||
|
|
||||||
if (aExecItem.getState() == MediaState::Play)
|
|
||||||
maIdle.Start();
|
|
||||||
else if (aExecItem.getState() == MediaState::Pause ||
|
|
||||||
aExecItem.getState() == MediaState::Stop)
|
|
||||||
maIdle.Stop();
|
|
||||||
|
|
||||||
if( aExecItem.getMaskSet() != AVMediaSetMask::NONE )
|
|
||||||
execute( aExecItem );
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
SelectPlayToolBoxItem( aExecItem, maItem, rIdent );
|
||||||
|
|
||||||
|
if (aExecItem.getState() == MediaState::Play)
|
||||||
|
maIdle.Start();
|
||||||
|
else if (aExecItem.getState() == MediaState::Pause ||
|
||||||
|
aExecItem.getState() == MediaState::Stop)
|
||||||
|
maIdle.Stop();
|
||||||
|
|
||||||
|
if( aExecItem.getMaskSet() != AVMediaSetMask::NONE )
|
||||||
|
execute( aExecItem );
|
||||||
|
|
||||||
update();
|
update();
|
||||||
if(p)
|
|
||||||
{
|
|
||||||
p->Invalidate( InvalidateFlags::Update );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IMPL_LINK( MediaControl, implZoomSelectHdl, weld::ComboBox&, rBox, void )
|
||||||
IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox&, p, void )
|
|
||||||
{
|
{
|
||||||
|
bool bCurrentlySettingZoom = mbCurrentlySettingZoom;
|
||||||
|
mbCurrentlySettingZoom = true;
|
||||||
|
|
||||||
MediaItem aExecItem;
|
MediaItem aExecItem;
|
||||||
css::media::ZoomLevel eLevel;
|
css::media::ZoomLevel eLevel;
|
||||||
|
|
||||||
switch( p.GetSelectedEntryPos() )
|
switch (rBox.get_active())
|
||||||
{
|
{
|
||||||
case AVMEDIA_ZOOMLEVEL_50: eLevel = css::media::ZoomLevel_ZOOM_1_TO_2; break;
|
case AVMEDIA_ZOOMLEVEL_50: eLevel = css::media::ZoomLevel_ZOOM_1_TO_2; break;
|
||||||
case AVMEDIA_ZOOMLEVEL_100: eLevel = css::media::ZoomLevel_ORIGINAL; break;
|
case AVMEDIA_ZOOMLEVEL_100: eLevel = css::media::ZoomLevel_ORIGINAL; break;
|
||||||
@ -344,8 +248,9 @@ IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox&, p, void )
|
|||||||
aExecItem.setZoom( eLevel );
|
aExecItem.setZoom( eLevel );
|
||||||
execute( aExecItem );
|
execute( aExecItem );
|
||||||
update();
|
update();
|
||||||
}
|
|
||||||
|
|
||||||
|
mbCurrentlySettingZoom = bCurrentlySettingZoom;
|
||||||
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(MediaControl, implTimeoutHdl, Timer *, void)
|
IMPL_LINK_NOARG(MediaControl, implTimeoutHdl, Timer *, void)
|
||||||
{
|
{
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include <tools/debug.hxx>
|
#include <tools/debug.hxx>
|
||||||
#include <sfx2/sfxsids.hrc>
|
#include <sfx2/sfxsids.hrc>
|
||||||
|
#include <vcl/toolbox.hxx>
|
||||||
|
|
||||||
#include <comphelper/propertysequence.hxx>
|
#include <comphelper/propertysequence.hxx>
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include <tools/diagnose_ex.h>
|
#include <tools/diagnose_ex.h>
|
||||||
#include <tools/urlobj.hxx>
|
#include <tools/urlobj.hxx>
|
||||||
#include <unotools/securityoptions.hxx>
|
#include <unotools/securityoptions.hxx>
|
||||||
|
#include <vcl/bitmapex.hxx>
|
||||||
|
#include <vcl/svapp.hxx>
|
||||||
#include <vcl/commandevent.hxx>
|
#include <vcl/commandevent.hxx>
|
||||||
#include <vcl/event.hxx>
|
#include <vcl/event.hxx>
|
||||||
#include <vcl/ptrstyle.hxx>
|
#include <vcl/ptrstyle.hxx>
|
||||||
|
@ -19,10 +19,7 @@
|
|||||||
#ifndef INCLUDED_AVMEDIA_MEDIACONTROLBASE_HXX
|
#ifndef INCLUDED_AVMEDIA_MEDIACONTROLBASE_HXX
|
||||||
#define INCLUDED_AVMEDIA_MEDIACONTROLBASE_HXX
|
#define INCLUDED_AVMEDIA_MEDIACONTROLBASE_HXX
|
||||||
|
|
||||||
#include <vcl/edit.hxx>
|
#include <vcl/weld.hxx>
|
||||||
#include <vcl/toolbox.hxx>
|
|
||||||
#include <vcl/lstbox.hxx>
|
|
||||||
#include <vcl/slider.hxx>
|
|
||||||
|
|
||||||
#include <avmedia/avmediadllapi.h>
|
#include <avmedia/avmediadllapi.h>
|
||||||
|
|
||||||
@ -64,19 +61,21 @@ public:
|
|||||||
virtual ~MediaControlBase(){};
|
virtual ~MediaControlBase(){};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
VclPtr<ToolBox> mpPlayToolBox;
|
std::unique_ptr<weld::Toolbar> mxPlayToolBox;
|
||||||
VclPtr<Slider> mpTimeSlider;
|
std::unique_ptr<weld::Scale> mxTimeSlider;
|
||||||
VclPtr<ToolBox> mpMuteToolBox;
|
std::unique_ptr<weld::Toolbar> mxMuteToolBox;
|
||||||
VclPtr<Slider> mpVolumeSlider;
|
std::unique_ptr<weld::Scale> mxVolumeSlider;
|
||||||
VclPtr<ListBox> mpZoomListBox;
|
std::unique_ptr<weld::ComboBox> mxZoomListBox;
|
||||||
VclPtr<Edit> mpTimeEdit;
|
std::unique_ptr<weld::Entry> mxTimeEdit;
|
||||||
static Image GetImage(sal_Int32 nImageId);
|
bool mbCurrentlySettingZoom;
|
||||||
|
|
||||||
virtual void InitializeWidgets();
|
virtual void InitializeWidgets();
|
||||||
virtual void UpdateToolBoxes( MediaItem aMediaItem );
|
virtual void UpdateToolBoxes(const MediaItem& rMediaItem);
|
||||||
void UpdateVolumeSlider( MediaItem const & aMediaItem );
|
void UpdateVolumeSlider( MediaItem const & aMediaItem );
|
||||||
void UpdateTimeSlider( MediaItem const & aMediaItem );
|
void UpdateTimeSlider( MediaItem const & aMediaItem );
|
||||||
void UpdateTimeField( MediaItem const & aMediaItem, double fTime );
|
void UpdateTimeField( MediaItem const & aMediaItem, double fTime );
|
||||||
void SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, sal_uInt16 nId);
|
void SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, const OString& rId);
|
||||||
|
void disposeWidgets();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1262,6 +1262,10 @@ public:
|
|||||||
virtual void set_value(int value) = 0;
|
virtual void set_value(int value) = 0;
|
||||||
virtual int get_value() const = 0;
|
virtual int get_value() const = 0;
|
||||||
virtual void set_range(int min, int max) = 0;
|
virtual void set_range(int min, int max) = 0;
|
||||||
|
|
||||||
|
virtual void set_increments(int step, int page) = 0;
|
||||||
|
virtual void get_increments(int& step, int& page) const = 0;
|
||||||
|
|
||||||
void connect_value_changed(const Link<Scale&, void>& rLink) { m_aValueChangedHdl = rLink; }
|
void connect_value_changed(const Link<Scale&, void>& rLink) { m_aValueChangedHdl = rLink; }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1986,6 +1990,7 @@ public:
|
|||||||
virtual void set_item_menu(const OString& rIdent, weld::Menu* pMenu) = 0;
|
virtual void set_item_menu(const OString& rIdent, weld::Menu* pMenu) = 0;
|
||||||
virtual void set_item_popover(const OString& rIdent, weld::Widget* pPopover) = 0;
|
virtual void set_item_popover(const OString& rIdent, weld::Widget* pPopover) = 0;
|
||||||
virtual void set_item_visible(const OString& rIdent, bool bVisible) = 0;
|
virtual void set_item_visible(const OString& rIdent, bool bVisible) = 0;
|
||||||
|
virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) = 0;
|
||||||
virtual bool get_item_visible(const OString& rIdent) const = 0;
|
virtual bool get_item_visible(const OString& rIdent) const = 0;
|
||||||
virtual void set_item_label(const OString& rIdent, const OUString& rLabel) = 0;
|
virtual void set_item_label(const OString& rIdent, const OUString& rLabel) = 0;
|
||||||
virtual OUString get_item_label(const OString& rIdent) const = 0;
|
virtual OUString get_item_label(const OString& rIdent) const = 0;
|
||||||
|
@ -45,12 +45,15 @@ svx/uiconfig/ui/headfootformatpage.ui://GtkLabel[@id='labelFooterFormat'] orphan
|
|||||||
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statusurl'] orphan-label
|
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statusurl'] orphan-label
|
||||||
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statuspos'] orphan-label
|
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statuspos'] orphan-label
|
||||||
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statussize'] orphan-label
|
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statussize'] orphan-label
|
||||||
svx/uiconfig/ui/mediaplayback.ui://GtkLabel[@id='label1'] orphan-label
|
svx/uiconfig/ui/mediaplayback.ui://GtkEntry[@id='timeedit'] no-labelled-by
|
||||||
svx/uiconfig/ui/mediaplayback.ui://GtkLabel[@id='label2'] orphan-label
|
svx/uiconfig/ui/medialine.ui://GtkEntry[@id='timeedit'] no-labelled-by
|
||||||
svx/uiconfig/ui/mediaplayback.ui://GtkLabel[@id='label3'] orphan-label
|
svx/uiconfig/ui/medialine.ui://GtkLabel[@id='url'] orphan-label
|
||||||
svx/uiconfig/ui/mediaplayback.ui://GtkScale[@id='timeslider'] no-labelled-by
|
svx/uiconfig/ui/medialine.ui://GtkScale[@id='timeslider'] no-labelled-by
|
||||||
svx/uiconfig/ui/mediaplayback.ui://GtkEntry[@id='timeedit:border'] no-labelled-by
|
svx/uiconfig/ui/medialine.ui://GtkScale[@id='volumeslider'] no-labelled-by
|
||||||
svx/uiconfig/ui/mediaplayback.ui://GtkScale[@id='volumeslider'] no-labelled-by
|
svx/uiconfig/ui/mediawindow.ui://GtkEntry[@id='timeedit'] no-labelled-by
|
||||||
|
svx/uiconfig/ui/mediawindow.ui://GtkLabel[@id='url'] orphan-label
|
||||||
|
svx/uiconfig/ui/mediawindow.ui://GtkScale[@id='timeslider'] no-labelled-by
|
||||||
|
svx/uiconfig/ui/mediawindow.ui://GtkScale[@id='volumeslider'] no-labelled-by
|
||||||
svx/uiconfig/ui/numberingwindow.ui://GtkButton[@id='more'] button-no-label
|
svx/uiconfig/ui/numberingwindow.ui://GtkButton[@id='more'] button-no-label
|
||||||
svx/uiconfig/ui/oldcolorwindow.ui://GtkButton[@id='auto_color_button'] button-no-label
|
svx/uiconfig/ui/oldcolorwindow.ui://GtkButton[@id='auto_color_button'] button-no-label
|
||||||
svx/uiconfig/ui/oldcolorwindow.ui://GtkComboBox[@id='palette_listbox'] no-labelled-by
|
svx/uiconfig/ui/oldcolorwindow.ui://GtkComboBox[@id='palette_listbox'] no-labelled-by
|
||||||
@ -69,6 +72,7 @@ svx/uiconfig/ui/redlinefilterpage.ui://GtkLabel[@id='and'] orphan-label
|
|||||||
svx/uiconfig/ui/safemodedialog.ui://GtkLabel[@id='label1'] orphan-label
|
svx/uiconfig/ui/safemodedialog.ui://GtkLabel[@id='label1'] orphan-label
|
||||||
svx/uiconfig/ui/safemodedialog.ui://GtkLabel[@id='label3'] orphan-label
|
svx/uiconfig/ui/safemodedialog.ui://GtkLabel[@id='label3'] orphan-label
|
||||||
svx/uiconfig/ui/safemodedialog.ui://GtkLabel[@id='label4'] orphan-label
|
svx/uiconfig/ui/safemodedialog.ui://GtkLabel[@id='label4'] orphan-label
|
||||||
|
svx/uiconfig/ui/sidebararea.ui://GtkLabel[@id='filllabel'] orphan-label
|
||||||
svx/uiconfig/ui/sidebararea.ui://GtkLabel[@id='transparencylabel'] orphan-label
|
svx/uiconfig/ui/sidebararea.ui://GtkLabel[@id='transparencylabel'] orphan-label
|
||||||
svx/uiconfig/ui/sidebarshadow.ui://GtkLabel[@id='transparency_label'] orphan-label
|
svx/uiconfig/ui/sidebarshadow.ui://GtkLabel[@id='transparency_label'] orphan-label
|
||||||
svx/uiconfig/ui/sidebarshadow.ui://GtkSpinButton[@id='FIELD_TRANSPARENCY'] no-labelled-by
|
svx/uiconfig/ui/sidebarshadow.ui://GtkSpinButton[@id='FIELD_TRANSPARENCY'] no-labelled-by
|
||||||
|
@ -75,7 +75,9 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
|
|||||||
svx/uiconfig/ui/lightingwindow \
|
svx/uiconfig/ui/lightingwindow \
|
||||||
svx/uiconfig/ui/linkwarndialog \
|
svx/uiconfig/ui/linkwarndialog \
|
||||||
svx/uiconfig/ui/measurewidthbar \
|
svx/uiconfig/ui/measurewidthbar \
|
||||||
|
svx/uiconfig/ui/medialine \
|
||||||
svx/uiconfig/ui/mediaplayback \
|
svx/uiconfig/ui/mediaplayback \
|
||||||
|
svx/uiconfig/ui/mediawindow \
|
||||||
svx/uiconfig/ui/namespacedialog \
|
svx/uiconfig/ui/namespacedialog \
|
||||||
svx/uiconfig/ui/numberingwindow \
|
svx/uiconfig/ui/numberingwindow \
|
||||||
svx/uiconfig/ui/oldcolorwindow \
|
svx/uiconfig/ui/oldcolorwindow \
|
||||||
|
@ -36,18 +36,19 @@ MediaPlaybackPanel::MediaPlaybackPanel (
|
|||||||
vcl::Window* pParent,
|
vcl::Window* pParent,
|
||||||
const css::uno::Reference<css::frame::XFrame>& rxFrame,
|
const css::uno::Reference<css::frame::XFrame>& rxFrame,
|
||||||
SfxBindings* pBindings)
|
SfxBindings* pBindings)
|
||||||
: PanelLayout(pParent, "MediaPlaybackPanel", "svx/ui/mediaplayback.ui", rxFrame),
|
: PanelLayout(pParent, "MediaPlaybackPanel", "svx/ui/mediaplayback.ui", rxFrame, true),
|
||||||
MediaControlBase(),
|
MediaControlBase(),
|
||||||
maMediaController(SID_AVMEDIA_TOOLBOX, *pBindings, *this),
|
maMediaController(SID_AVMEDIA_TOOLBOX, *pBindings, *this),
|
||||||
maIdle("MediaPlaybackPanel"),
|
maIdle("MediaPlaybackPanel"),
|
||||||
mpBindings(pBindings)
|
mpBindings(pBindings)
|
||||||
{
|
{
|
||||||
get(mpTimeEdit, "timeedit");
|
mxTimeEdit = m_xBuilder->weld_entry("timeedit");
|
||||||
get(mpPlayToolBox, "playtoolbox");
|
mxPlayToolBox = m_xBuilder->weld_toolbar("playtoolbox");
|
||||||
get(mpMuteToolBox, "mutetoolbox");
|
mxMuteToolBox = m_xBuilder->weld_toolbar("mutetoolbox");
|
||||||
get(mpTimeSlider, "timeslider");
|
mxTimeSlider = m_xBuilder->weld_scale("timeslider");
|
||||||
get(mpVolumeSlider, "volumeslider");
|
mxVolumeSlider = m_xBuilder->weld_scale("volumeslider");
|
||||||
get(mpZoomListBox, "zoombox");
|
mxZoomListBox = m_xBuilder->weld_combo_box("zoombox");
|
||||||
|
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,10 +78,10 @@ MediaPlaybackPanel::~MediaPlaybackPanel()
|
|||||||
void MediaPlaybackPanel::Initialize()
|
void MediaPlaybackPanel::Initialize()
|
||||||
{
|
{
|
||||||
InitializeWidgets();
|
InitializeWidgets();
|
||||||
mpVolumeSlider->SetSlideHdl(LINK(this, MediaPlaybackPanel, VolumeSlideHdl));
|
mxVolumeSlider->connect_value_changed(LINK(this, MediaPlaybackPanel, VolumeSlideHdl));
|
||||||
mpPlayToolBox->SetSelectHdl(LINK(this, MediaPlaybackPanel, PlayToolBoxSelectHdl));
|
mxPlayToolBox->connect_clicked(LINK(this, MediaPlaybackPanel, PlayToolBoxSelectHdl));
|
||||||
mpMuteToolBox->SetSelectHdl(LINK(this, MediaPlaybackPanel, PlayToolBoxSelectHdl));
|
mxMuteToolBox->connect_clicked(LINK(this, MediaPlaybackPanel, PlayToolBoxSelectHdl));
|
||||||
mpTimeSlider->SetSlideHdl(LINK(this, MediaPlaybackPanel, SeekHdl));
|
mxTimeSlider->connect_value_changed(LINK(this, MediaPlaybackPanel, SeekHdl));
|
||||||
|
|
||||||
maIdle.SetPriority( TaskPriority::HIGHEST );
|
maIdle.SetPriority( TaskPriority::HIGHEST );
|
||||||
maIdle.SetInvokeHandler( LINK( this, MediaPlaybackPanel, TimeoutHdl ) );
|
maIdle.SetInvokeHandler( LINK( this, MediaPlaybackPanel, TimeoutHdl ) );
|
||||||
@ -90,7 +91,7 @@ void MediaPlaybackPanel::Initialize()
|
|||||||
|
|
||||||
void MediaPlaybackPanel::dispose()
|
void MediaPlaybackPanel::dispose()
|
||||||
{
|
{
|
||||||
mpTimeEdit.disposeAndClear();
|
disposeWidgets();
|
||||||
PanelLayout::dispose();
|
PanelLayout::dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,10 +110,10 @@ void MediaPlaybackPanel::NotifyItemUpdate(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaPlaybackPanel::UpdateToolBoxes(MediaItem aMediaItem)
|
void MediaPlaybackPanel::UpdateToolBoxes(const MediaItem& rMediaItem)
|
||||||
{
|
{
|
||||||
mpPlayToolBox->Disable();
|
mxPlayToolBox->set_sensitive(false);
|
||||||
avmedia::MediaControlBase::UpdateToolBoxes(aMediaItem);
|
avmedia::MediaControlBase::UpdateToolBoxes(rMediaItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaPlaybackPanel::Update()
|
void MediaPlaybackPanel::Update()
|
||||||
@ -126,20 +127,20 @@ void MediaPlaybackPanel::Update()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG( MediaPlaybackPanel, VolumeSlideHdl, Slider*, void)
|
IMPL_LINK_NOARG( MediaPlaybackPanel, VolumeSlideHdl, weld::Scale&, void)
|
||||||
{
|
{
|
||||||
MediaItem aItem(SID_AVMEDIA_TOOLBOX);
|
MediaItem aItem(SID_AVMEDIA_TOOLBOX);
|
||||||
aItem.setVolumeDB( static_cast< sal_Int16 > (mpVolumeSlider->GetThumbPos()));
|
aItem.setVolumeDB(mxVolumeSlider->get_value());
|
||||||
mpBindings->GetDispatcher()->ExecuteList(SID_AVMEDIA_TOOLBOX, SfxCallMode::RECORD, { &aItem });
|
mpBindings->GetDispatcher()->ExecuteList(SID_AVMEDIA_TOOLBOX, SfxCallMode::RECORD, { &aItem });
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG( MediaPlaybackPanel, SeekHdl, Slider*, void)
|
IMPL_LINK_NOARG( MediaPlaybackPanel, SeekHdl, weld::Scale&, void)
|
||||||
{
|
{
|
||||||
MediaItem aItem(SID_AVMEDIA_TOOLBOX);
|
MediaItem aItem(SID_AVMEDIA_TOOLBOX);
|
||||||
aItem.setState( MediaState::Pause );
|
aItem.setState( MediaState::Pause );
|
||||||
double nTime = 0;
|
double nTime = 0;
|
||||||
if (mpMediaItem)
|
if (mpMediaItem)
|
||||||
nTime = mpTimeSlider->GetThumbPos() * mpMediaItem->getDuration() / AVMEDIA_TIME_RANGE;
|
nTime = mxTimeSlider->get_value() * mpMediaItem->getDuration() / AVMEDIA_TIME_RANGE;
|
||||||
aItem.setTime(nTime);
|
aItem.setTime(nTime);
|
||||||
mpBindings->GetDispatcher()->ExecuteList(SID_AVMEDIA_TOOLBOX, SfxCallMode::RECORD, { &aItem });
|
mpBindings->GetDispatcher()->ExecuteList(SID_AVMEDIA_TOOLBOX, SfxCallMode::RECORD, { &aItem });
|
||||||
mpBindings->Invalidate(SID_AVMEDIA_TOOLBOX);
|
mpBindings->Invalidate(SID_AVMEDIA_TOOLBOX);
|
||||||
@ -150,48 +151,37 @@ IMPL_LINK_NOARG( MediaPlaybackPanel, TimeoutHdl, Timer*, void)
|
|||||||
mpBindings->Invalidate(SID_AVMEDIA_TOOLBOX);
|
mpBindings->Invalidate(SID_AVMEDIA_TOOLBOX);
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK( MediaPlaybackPanel, PlayToolBoxSelectHdl, ToolBox*, pControl, void)
|
IMPL_LINK( MediaPlaybackPanel, PlayToolBoxSelectHdl, const OString&, rId, void)
|
||||||
{
|
{
|
||||||
MediaItem aItem(SID_AVMEDIA_TOOLBOX);
|
MediaItem aItem(SID_AVMEDIA_TOOLBOX);
|
||||||
switch(pControl->GetCurItemId())
|
|
||||||
|
if (rId == "play")
|
||||||
{
|
{
|
||||||
case AVMEDIA_TOOLBOXITEM_PLAY:
|
aItem.setState( MediaState::Play );
|
||||||
{
|
|
||||||
aItem.setState( MediaState::Play );
|
|
||||||
|
|
||||||
if( !mpMediaItem || (mpMediaItem->getTime() == mpMediaItem->getDuration() ))
|
if( !mpMediaItem || (mpMediaItem->getTime() == mpMediaItem->getDuration() ))
|
||||||
aItem.setTime( 0.0 );
|
|
||||||
else
|
|
||||||
aItem.setTime( mpMediaItem->getTime());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case AVMEDIA_TOOLBOXITEM_PAUSE:
|
|
||||||
{
|
|
||||||
aItem.setState( MediaState::Pause );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case AVMEDIA_TOOLBOXITEM_STOP:
|
|
||||||
{
|
|
||||||
aItem.setState( MediaState::Stop );
|
|
||||||
aItem.setTime( 0.0 );
|
aItem.setTime( 0.0 );
|
||||||
}
|
else
|
||||||
break;
|
aItem.setTime( mpMediaItem->getTime());
|
||||||
|
|
||||||
case AVMEDIA_TOOLBOXITEM_MUTE:
|
|
||||||
{
|
|
||||||
aItem.setMute( !mpMuteToolBox->IsItemChecked( AVMEDIA_TOOLBOXITEM_MUTE ) );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case AVMEDIA_TOOLBOXITEM_LOOP:
|
|
||||||
{
|
|
||||||
aItem.setLoop( !mpPlayToolBox->IsItemChecked( AVMEDIA_TOOLBOXITEM_LOOP ) );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
|
else if (rId == "pause")
|
||||||
|
{
|
||||||
|
aItem.setState( MediaState::Pause );
|
||||||
|
}
|
||||||
|
else if (rId == "stop")
|
||||||
|
{
|
||||||
|
aItem.setState( MediaState::Stop );
|
||||||
|
aItem.setTime( 0.0 );
|
||||||
|
}
|
||||||
|
else if (rId == "mute")
|
||||||
|
{
|
||||||
|
aItem.setMute( mxMuteToolBox->get_item_active("mute") );
|
||||||
|
}
|
||||||
|
else if (rId == "loop")
|
||||||
|
{
|
||||||
|
aItem.setLoop( mxPlayToolBox->get_item_active("loop") );
|
||||||
|
}
|
||||||
|
|
||||||
if(aItem.getMaskSet() != AVMediaSetMask::NONE)
|
if(aItem.getMaskSet() != AVMediaSetMask::NONE)
|
||||||
{
|
{
|
||||||
mpBindings->GetDispatcher()->ExecuteList(SID_AVMEDIA_TOOLBOX, SfxCallMode::RECORD, { &aItem } );
|
mpBindings->GetDispatcher()->ExecuteList(SID_AVMEDIA_TOOLBOX, SfxCallMode::RECORD, { &aItem } );
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
#include <com/sun/star/frame/XFrame.hpp>
|
#include <com/sun/star/frame/XFrame.hpp>
|
||||||
|
|
||||||
#include <svx/sidebar/PanelLayout.hxx>
|
#include <svx/sidebar/PanelLayout.hxx>
|
||||||
#include <vcl/slider.hxx>
|
|
||||||
#include <vcl/toolbox.hxx>
|
|
||||||
#include <avmedia/mediaitem.hxx>
|
#include <avmedia/mediaitem.hxx>
|
||||||
#include <sfx2/bindings.hxx>
|
#include <sfx2/bindings.hxx>
|
||||||
#include <sfx2/sidebar/ControllerItem.hxx>
|
#include <sfx2/sidebar/ControllerItem.hxx>
|
||||||
@ -56,7 +54,7 @@ public:
|
|||||||
virtual void dispose() override;
|
virtual void dispose() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void UpdateToolBoxes(avmedia::MediaItem aMediaItem) override;
|
virtual void UpdateToolBoxes(const avmedia::MediaItem& rMediaItem) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr< ::avmedia::MediaItem > mpMediaItem;
|
std::unique_ptr< ::avmedia::MediaItem > mpMediaItem;
|
||||||
@ -68,9 +66,9 @@ private:
|
|||||||
virtual void NotifyItemUpdate( const sal_uInt16 nSID,
|
virtual void NotifyItemUpdate( const sal_uInt16 nSID,
|
||||||
const SfxItemState eState,
|
const SfxItemState eState,
|
||||||
const SfxPoolItem* pState) override;
|
const SfxPoolItem* pState) override;
|
||||||
DECL_LINK(PlayToolBoxSelectHdl, ToolBox*, void);
|
DECL_LINK(PlayToolBoxSelectHdl, const OString&, void);
|
||||||
DECL_LINK(VolumeSlideHdl, Slider*, void);
|
DECL_LINK(VolumeSlideHdl, weld::Scale&, void);
|
||||||
DECL_LINK(SeekHdl, Slider*, void);
|
DECL_LINK(SeekHdl, weld::Scale&, void);
|
||||||
DECL_LINK(TimeoutHdl, Timer*, void);
|
DECL_LINK(TimeoutHdl, Timer*, void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
292
svx/uiconfig/ui/medialine.ui
Normal file
292
svx/uiconfig/ui/medialine.ui
Normal file
@ -0,0 +1,292 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.22.1 -->
|
||||||
|
<interface domain="svx">
|
||||||
|
<requires lib="gtk+" version="3.18"/>
|
||||||
|
<object class="GtkAdjustment" id="adjustment1">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustment2">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkGrid" id="MediaWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar" id="playtoolbox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="toolbar_style">icons</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton" id="open">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
<property name="label" translatable="no">Open</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02048.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton" id="apply">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
<property name="label" translatable="no">Apply</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02053.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparatorToolItem" id="separator1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="play">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Play</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02049.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="pause">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Pause</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02050.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="stop">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Stop</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02051.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparatorToolItem" id="separator2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="loop">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Repeat</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02052.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar" id="timetoolbox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="toolbar_style">icons</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolItem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScale" id="timeslider">
|
||||||
|
<property name="width_request">128</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="adjustment">adjustment1</property>
|
||||||
|
<property name="digits">2</property>
|
||||||
|
<property name="draw_value">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="timeedit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar" id="mutetoolbox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="toolbar_style">icons</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="mute">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Mute</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02054.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolItem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScale" id="volumeslider">
|
||||||
|
<property name="width_request">50</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="opacity">0.9882352941176471</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="adjustment">adjustment2</property>
|
||||||
|
<property name="draw_value">False</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar" id="zoomtoolbox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="toolbar_style">icons</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolItem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="zoombox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="url">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="ellipsize">middle</property>
|
||||||
|
<property name="width_chars">10</property>
|
||||||
|
<property name="max_width_chars">10</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface domain="svx">
|
<interface domain="svx">
|
||||||
<requires lib="gtk+" version="3.18"/>
|
<requires lib="gtk+" version="3.18"/>
|
||||||
<object class="GtkGrid" id="MediaPlaybackPanel">
|
<object class="GtkGrid" id="MediaPlaybackPanel">
|
||||||
@ -11,21 +11,21 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
<property name="border_width">6</property>
|
<property name="border_width">6</property>
|
||||||
<property name="column_spacing">7</property>
|
<property name="column_spacing">7</property>
|
||||||
<property name="row_homogeneous">True</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label1">
|
<object class="GtkLabel" id="label1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">end</property>
|
<property name="halign">end</property>
|
||||||
<property name="label" translatable="yes" context="mediaplayback|label1">Playback:</property>
|
<property name="label" translatable="yes" context="mediaplayback|label1">Playback:</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">playtoolbox</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -34,12 +34,12 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">end</property>
|
<property name="halign">end</property>
|
||||||
<property name="label" translatable="yes" context="mediaplayback|label2">Seek:</property>
|
<property name="label" translatable="yes" context="mediaplayback|label2">Seek:</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">timeslider</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">1</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -48,12 +48,12 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">end</property>
|
<property name="halign">end</property>
|
||||||
<property name="label" translatable="yes" context="mediaplayback|label3">Volume:</property>
|
<property name="label" translatable="yes" context="mediaplayback|label3">Volume:</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">volumeslider</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">3</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -61,68 +61,14 @@
|
|||||||
<property name="width_request">150</property>
|
<property name="width_request">150</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="round_digits">1</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="digits">2</property>
|
<property name="digits">2</property>
|
||||||
<property name="draw_value">False</property>
|
<property name="draw_value">False</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">1</property>
|
||||||
<property name="width">1</property>
|
<property name="width">2</property>
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBox" id="zoombox">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="tooltip_text" translatable="yes" context="mediaplayback|zoombox|tooltip_text">View</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="timeedit:border">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="editable">False</property>
|
|
||||||
<property name="xalign">0.5</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkToolbar" id="playtoolbox">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkToolbar" id="mutetoolbox">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">2</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -130,27 +76,177 @@
|
|||||||
<property name="width_request">150</property>
|
<property name="width_request">150</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="opacity">0.98999999999999999</property>
|
<property name="opacity">0.9882352941176471</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
<property name="draw_value">False</property>
|
<property name="draw_value">False</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">3</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<object class="GtkComboBoxText" id="zoombox">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<object class="GtkEntry" id="timeedit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<object class="GtkToolbar" id="mutetoolbox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="toolbar_style">icons</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<property name="icon_size">2</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="mute">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Mute</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02054.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<object class="GtkToolbar" id="playtoolbox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="toolbar_style">icons</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<property name="icon_size">2</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton" id="open">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
<property name="label" translatable="no">Open</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02048.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton" id="apply">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
<property name="label" translatable="no">Apply</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02053.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparatorToolItem" id="separator1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="play">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Play</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02049.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="pause">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Pause</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02050.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="stop">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Stop</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02051.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparatorToolItem" id="separator2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="loop">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Repeat</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02052.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
@ -162,8 +258,6 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
277
svx/uiconfig/ui/mediawindow.ui
Normal file
277
svx/uiconfig/ui/mediawindow.ui
Normal file
@ -0,0 +1,277 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.22.1 -->
|
||||||
|
<interface domain="svx">
|
||||||
|
<requires lib="gtk+" version="3.18"/>
|
||||||
|
<object class="GtkAdjustment" id="adjustment1">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkGrid" id="MediaWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="border_width">6</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="url">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="ellipsize">middle</property>
|
||||||
|
<property name="width_chars">10</property>
|
||||||
|
<property name="max_width_chars">10</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScale" id="timeslider">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="adjustment">adjustment1</property>
|
||||||
|
<property name="digits">2</property>
|
||||||
|
<property name="draw_value">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="timeedit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar" id="playtoolbox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="toolbar_style">icons</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton" id="open">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Open</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02048.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton" id="apply">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Apply</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02053.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparatorToolItem" id="separator1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="play">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Play</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02049.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="pause">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Pause</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02050.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="stop">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Stop</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02051.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparatorToolItem" id="separator2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="loop">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Repeat</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02052.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar" id="mutetoolbox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="toolbar_style">icons</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToggleToolButton" id="mute">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="no">Mute</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="icon_name">avmedia/res/av02054.png</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScale" id="volumeslider">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="opacity">0.9882352941176471</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="adjustment">adjustment2</property>
|
||||||
|
<property name="draw_value">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="zoombox">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustment2">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
</interface>
|
@ -985,6 +985,11 @@ public:
|
|||||||
m_xToolBox->ShowItem(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)), bVisible);
|
m_xToolBox->ShowItem(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)), bVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) override
|
||||||
|
{
|
||||||
|
m_xToolBox->SetHelpId(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)), rHelpId);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool get_item_visible(const OString& rIdent) const override
|
virtual bool get_item_visible(const OString& rIdent) const override
|
||||||
{
|
{
|
||||||
return m_xToolBox->IsItemVisible(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)));
|
return m_xToolBox->IsItemVisible(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)));
|
||||||
@ -3173,6 +3178,18 @@ public:
|
|||||||
return m_xScale->GetThumbPos();
|
return m_xScale->GetThumbPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void set_increments(int step, int page) override
|
||||||
|
{
|
||||||
|
m_xScale->SetLineSize(step);
|
||||||
|
m_xScale->SetPageSize(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void get_increments(int& step, int& page) const override
|
||||||
|
{
|
||||||
|
step = m_xScale->GetLineSize();
|
||||||
|
page = m_xScale->GetPageSize();
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~SalInstanceScale() override
|
virtual ~SalInstanceScale() override
|
||||||
{
|
{
|
||||||
m_xScale->SetSlideHdl(Link<Slider*, void>());
|
m_xScale->SetSlideHdl(Link<Slider*, void>());
|
||||||
|
@ -7462,6 +7462,11 @@ public:
|
|||||||
enable_item_notify_events();
|
enable_item_notify_events();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) override
|
||||||
|
{
|
||||||
|
::set_help_id(GTK_WIDGET(m_aMap[rIdent]), rHelpId);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool get_item_visible(const OString& rIdent) const override
|
virtual bool get_item_visible(const OString& rIdent) const override
|
||||||
{
|
{
|
||||||
return gtk_widget_get_visible(GTK_WIDGET(m_aMap.find(rIdent)->second));
|
return gtk_widget_get_visible(GTK_WIDGET(m_aMap.find(rIdent)->second));
|
||||||
@ -7785,6 +7790,20 @@ public:
|
|||||||
enable_notify_events();
|
enable_notify_events();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void set_increments(int step, int page) override
|
||||||
|
{
|
||||||
|
disable_notify_events();
|
||||||
|
gtk_range_set_increments(GTK_RANGE(m_pScale), step, page);
|
||||||
|
enable_notify_events();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void get_increments(int& step, int& page) const override
|
||||||
|
{
|
||||||
|
GtkAdjustment* pAdjustment = gtk_range_get_adjustment(GTK_RANGE(m_pScale));
|
||||||
|
step = gtk_adjustment_get_step_increment(pAdjustment);
|
||||||
|
page = gtk_adjustment_get_page_increment(pAdjustment);
|
||||||
|
}
|
||||||
|
|
||||||
virtual int get_value() const override
|
virtual int get_value() const override
|
||||||
{
|
{
|
||||||
return gtk_range_get_value(GTK_RANGE(m_pScale));
|
return gtk_range_get_value(GTK_RANGE(m_pScale));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user