Browse Source

qt: remove of BUTTON_SET_ACT macro

pull/162/head
Pierre Lamot 3 years ago
committed by Rémi Denis-Courmont
parent
commit
095cdf89af
  1. 8
      modules/gui/qt/dialogs/extended/extended_panels.cpp
  2. 11
      modules/gui/qt/dialogs/open/open_disk.ui
  3. 3
      modules/gui/qt/dialogs/open/open_panels.cpp
  4. 5
      modules/gui/qt/qt.hpp

8
modules/gui/qt/dialogs/extended/extended_panels.cpp

@ -1457,6 +1457,11 @@ SyncControls::SyncControls( qt_intf_t *_p_intf, QWidget *_parent )
updateButton = new QToolButton;
updateButton->setAutoRaise( true );
updateButton->setText("");
updateButton->setToolTip(qtr( "Eject the disc" ));
updateButton->setIcon( QIcon( ":/menu/update.svg") );
BUTTONACT( updateButton, &SyncControls::update );
mainLayout->addWidget( updateButton, 0, 4, 1, 1 );
/* Various Connects */
@ -1484,9 +1489,6 @@ SyncControls::SyncControls( qt_intf_t *_p_intf, QWidget *_parent )
connect( THEMIM, &PlayerController::subtitleFPSChanged, subSpeedSpin, &QDoubleSpinBox::setValue );
connect( &m_SubsDelayCfgFactor, &QVLCFloat::valueChanged, subDurationSpin, &QDoubleSpinBox::setValue);
BUTTON_SET_ACT( updateButton, "", qtr( "Eject the disc" ), &SyncControls::update );
updateButton->setIcon( QIcon( ":/menu/update.svg") );
initSubsDuration();
/* Set it */

11
modules/gui/qt/dialogs/open/open_disk.ui

@ -156,6 +156,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Eject the disc</string>
</property>
<property name="icon">
<iconset resource="../../vlc.qrc">
<normaloff>:/menu/eject.svg</normaloff>:/menu/eject.svg</iconset>
</property>
</widget>
</item>
<item>
@ -393,6 +400,8 @@
<tabstop>audioSpin</tabstop>
<tabstop>subtitlesSpin</tabstop>
</tabstops>
<resources/>
<resources>
<include location="../../vlc.qrc"/>
</resources>
<connections/>
</ui>

3
modules/gui/qt/dialogs/open/open_panels.cpp

@ -365,8 +365,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, qt_intf_t *_p_intf ) :
BUTTONACT( ui.audioCDRadioButton, &DiscOpenPanel::updateButtons );
BUTTONACT( ui.dvdsimple, &DiscOpenPanel::updateButtons );
BUTTONACT( ui.browseDiscButton, &DiscOpenPanel::browseDevice );
BUTTON_SET_ACT( ui.ejectButton, "", qtr( "Eject the disc"), &DiscOpenPanel::eject );
ui.ejectButton->setIcon( QIcon( ":/menu/eject.svg") );
BUTTONACT( ui.ejectButton, &DiscOpenPanel::eject );
connect( ui.deviceCombo, &QComboBox::editTextChanged, this, &DiscOpenPanel::updateMRL );
connect( ui.deviceCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),

5
modules/gui/qt/qt.hpp

@ -144,11 +144,6 @@ struct vlc_player_locker {
#define BUTTONACT( b, a ) connect( b, &QAbstractButton::clicked, this, a )
#define BUTTON_SET_ACT( button, text, tooltip, thisslot ) \
button->setText( text ); \
button->setToolTip( tooltip ); \
BUTTONACT( button, thisslot );
#define getSettings() p_intf->mainSettings
static inline QString QVLCUserDir( vlc_userdir_t type )

Loading…
Cancel
Save