Commit 7393f3b3 authored by François Cartegnie's avatar François Cartegnie 🤞 Committed by Jean-Baptiste Kempf

UI: prefix/namespace resources for better maintainability

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 7b0d5534
......@@ -62,13 +62,13 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
/* Nice icons */
#define BI( a,b) QIcon a##_icon = QIcon( QPixmap( b ))
BI( audio, ":/advprefs_audio" );
BI( video, ":/advprefs_video" );
BI( input, ":/advprefs_codec" );
BI( sout, ":/advprefs_sout" );
BI( advanced, ":/advprefs_extended" );
BI( playlist, ":/advprefs_playlist" );
BI( interface, ":/advprefs_intf" );
BI( audio, ":/prefsmenu/advanced/audio" );
BI( video, ":/prefsmenu/advanced/video" );
BI( input, ":/prefsmenu/advanced/codec" );
BI( sout, ":/prefsmenu/advanced/sout" );
BI( advanced, ":/prefsmenu/advanced/extended" );
BI( playlist, ":/prefsmenu/advanced/playlist" );
BI( interface, ":/prefsmenu/advanced/intf" );
#undef BI
/* Build the tree for the main module */
......
......@@ -467,19 +467,19 @@ QFrame *AbstractController::discFrame()
QToolButton *prevSectionButton = new QToolButton( discFrame );
setupButton( prevSectionButton );
BUTTON_SET_BAR2( prevSectionButton, dvd_prev,
BUTTON_SET_BAR2( prevSectionButton, toolbar/dvd_prev,
qtr("Previous Chapter/Title" ) );
discLayout->addWidget( prevSectionButton );
QToolButton *menuButton = new QToolButton( discFrame );
setupButton( menuButton );
discLayout->addWidget( menuButton );
BUTTON_SET_BAR2( menuButton, dvd_menu, qtr( "Menu" ) );
BUTTON_SET_BAR2( menuButton, toolbar/dvd_menu, qtr( "Menu" ) );
QToolButton *nextSectionButton = new QToolButton( discFrame );
setupButton( nextSectionButton );
discLayout->addWidget( nextSectionButton );
BUTTON_SET_BAR2( nextSectionButton, dvd_next,
BUTTON_SET_BAR2( nextSectionButton, toolbar/dvd_next,
qtr("Next Chapter/Title" ) );
/* Change the navigation button display when the IM
......@@ -517,7 +517,7 @@ QFrame *AbstractController::telexFrame()
/* On/Off button */
QToolButton *telexOn = new QToolButton;
setupButton( telexOn );
BUTTON_SET_BAR2( telexOn, tv, qtr( "Teletext Activation" ) );
BUTTON_SET_BAR2( telexOn, toolbar/tv, qtr( "Teletext Activation" ) );
telexOn->setEnabled( false );
telexOn->setCheckable( true );
......@@ -532,7 +532,7 @@ QFrame *AbstractController::telexFrame()
/* Transparency button */
QToolButton *telexTransparent = new QToolButton;
setupButton( telexTransparent );
BUTTON_SET_BAR2( telexTransparent, tvtelx,
BUTTON_SET_BAR2( telexTransparent, toolbar/tvtelx,
qtr( "Toggle Transparency " ) );
telexTransparent->setEnabled( false );
telexTransparent->setCheckable( true );
......
......@@ -112,11 +112,13 @@ static const char* tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_( "Take a snapshot" ), N_( "Record" ),
N_( "Loop from point A to point B continuously." ), N_("Frame by frame"),
N_("Reverse"), N_("Step backward"), N_("Step forward"), N_("Quit") };
static const QString iconL[BUTTON_MAX] ={ ":/play_b", ":/stop_b", ":/eject",
":/previous_b", ":/next_b", ":/slower", ":/faster", ":/fullscreen",
":/defullscreen", ":/extended", ":/playlist", ":/snapshot", ":/record",
":/atob_nob", ":/frame", ":/reverse", ":/skip_back", ":/skip_fw",
":/clear" };
static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b",
":/toolbar/eject", ":/toolbar/previous_b", ":/toolbar/next_b",
":/toolbar/slower", ":/toolbar/faster", ":/toolbar/fullscreen",
":/toolbar/defullscreen", ":/toolbar/extended", ":/toolbar/playlist",
":/toolbar/snapshot", ":/toolbar/record", ":/toolbar/atob_nob",
":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back",
":/toolbar/skip_fw", ":/toolbar/clear" };
enum
{
......
......@@ -51,7 +51,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
/* We need a Label for the pix */
volMuteLabel = new QLabel;
volMuteLabel->setPixmap( QPixmap( ":/volume-medium" ) );
volMuteLabel->setPixmap( QPixmap( ":/toolbar/volume-medium" ) );
/* We might need a subLayout too */
QVBoxLayout *subLayout;
......@@ -130,16 +130,16 @@ void SoundWidget::updateVolume( int i_sliderVolume )
}
if( i_sliderVolume == 0 )
{
volMuteLabel->setPixmap( QPixmap(":/volume-muted" ) );
volMuteLabel->setPixmap( QPixmap(":/toolbar/volume-muted" ) );
volMuteLabel->setToolTip( qtr( "Unmute" ) );
return;
}
if( i_sliderVolume < VOLUME_MAX / 3 )
volMuteLabel->setPixmap( QPixmap( ":/volume-low" ) );
volMuteLabel->setPixmap( QPixmap( ":/toolbar/volume-low" ) );
else if( i_sliderVolume > (VOLUME_MAX * 2 / 3 ) )
volMuteLabel->setPixmap( QPixmap( ":/volume-high" ) );
else volMuteLabel->setPixmap( QPixmap( ":/volume-medium" ) );
volMuteLabel->setPixmap( QPixmap( ":/toolbar/volume-high" ) );
else volMuteLabel->setPixmap( QPixmap( ":/toolbar/volume-medium" ) );
volMuteLabel->setToolTip( qtr( "Mute" ) );
}
......@@ -194,7 +194,7 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
**/
void PlayButton::updateButton( bool b_playing )
{
setIcon( b_playing ? QIcon( ":/pause_b" ) : QIcon( ":/play_b" ) );
setIcon( b_playing ? QIcon( ":/toolbar/pause_b" ) : QIcon( ":/toolbar/play_b" ) );
setToolTip( b_playing ? qtr( "Pause the playback" )
: qtr( I_PLAY_TOOLTIP ) );
}
......@@ -203,18 +203,18 @@ void AtoB_Button::setIcons( bool timeA, bool timeB )
{
if( !timeA && !timeB)
{
setIcon( QIcon( ":/atob_nob" ) );
setIcon( QIcon( ":/toolbar/atob_nob" ) );
setToolTip( qtr( "Loop from point A to point B continuously\n"
"Click to set point A" ) );
}
else if( timeA && !timeB )
{
setIcon( QIcon( ":/atob_noa" ) );
setIcon( QIcon( ":/toolbar/atob_noa" ) );
setToolTip( qtr( "Click to set point B" ) );
}
else if( timeA && timeB )
{
setIcon( QIcon( ":/atob" ) );
setIcon( QIcon( ":/toolbar/atob" ) );
setToolTip( qtr( "Stop the A to B loop" ) );
}
}
......
......@@ -175,9 +175,9 @@ BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i )
label->setMinimumHeight( MIN_BG_SIZE );
label->setMinimumWidth( MIN_BG_SIZE );
if( QDate::currentDate().dayOfYear() >= 354 )
label->setPixmap( QPixmap( ":/vlc128-christmas.png" ) );
label->setPixmap( QPixmap( ":/logo/vlc128-christmas.png" ) );
else
label->setPixmap( QPixmap( ":/vlc128.png" ) );
label->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
QGridLayout *backgroundLayout = new QGridLayout( this );
backgroundLayout->addWidget( label, 0, 1 );
......@@ -204,9 +204,9 @@ void BackgroundWidget::updateArt( const QString& url )
if( url.isEmpty() )
{
if( QDate::currentDate().dayOfYear() >= 354 )
label->setPixmap( QPixmap( ":/vlc128-christmas.png" ) );
label->setPixmap( QPixmap( ":/logo/vlc128-christmas.png" ) );
else
label->setPixmap( QPixmap( ":/vlc128.png" ) );
label->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
}
else
{
......
......@@ -313,7 +313,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
BUTTONACT( ui.audioCDRadioButton, updateButtons() );
BUTTONACT( ui.dvdsimple, updateButtons() );
BUTTONACT( ui.browseDiscButton, browseDevice() );
BUTTON_SET_ACT_I( ui.ejectButton, "", eject, qtr( "Eject the disc" ),
BUTTON_SET_ACT_I( ui.ejectButton, "", toolbar/eject, qtr( "Eject the disc" ),
eject() );
CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
......
......@@ -83,14 +83,14 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
/* Icons initialization */
#define ADD_ICON(type, x) icons[ITEM_TYPE_##type] = QIcon( QPixmap( x ) )
ADD_ICON( UNKNOWN , type_unknown_xpm );
ADD_ICON( FILE, ":/type_file" );
ADD_ICON( DIRECTORY, ":/type_directory" );
ADD_ICON( DISC, ":/disc" );
ADD_ICON( CDDA, ":/cdda" );
ADD_ICON( CARD, ":/capture-card" );
ADD_ICON( NET, ":/type_net" );
ADD_ICON( PLAYLIST, ":/type_playlist" );
ADD_ICON( NODE, ":/type_node" );
ADD_ICON( FILE, ":/type/file" );
ADD_ICON( DIRECTORY, ":/type/directory" );
ADD_ICON( DISC, ":/type/disc" );
ADD_ICON( CDDA, ":/type/cdda" );
ADD_ICON( CARD, ":/type/capture-card" );
ADD_ICON( NET, ":/type/net" );
ADD_ICON( PLAYLIST, ":/type/playlist" );
ADD_ICON( NODE, ":/type/node" );
#undef ADD_ICON
rebuild( p_root );
......
......@@ -109,14 +109,14 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Add item to the playlist button */
addButton = new QPushButton;
addButton->setIcon( QIcon( ":/playlist_add" ) );
addButton->setIcon( QIcon( ":/buttons/playlist/playlist_add" ) );
addButton->setMaximumWidth( 30 );
BUTTONACT( addButton, popupAdd() );
buttons->addWidget( addButton );
/* Random 2-state button */
randomButton = new QPushButton( this );
randomButton->setIcon( QIcon( ":/shuffle_on" ));
randomButton->setIcon( QIcon( ":/buttons/playlist/shuffle_on" ));
randomButton->setToolTip( qtr( I_PL_RANDOM ));
randomButton->setCheckable( true );
randomButton->setChecked( model->hasRandom() );
......@@ -130,17 +130,17 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
if( model->hasRepeat() )
{
repeatButton->setIcon( QIcon( ":/repeat_one" ) );
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_one" ) );
repeatButton->setChecked( true );
}
else if( model->hasLoop() )
{
repeatButton->setIcon( QIcon( ":/repeat_all" ) );
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_all" ) );
repeatButton->setChecked( true );
}
else
{
repeatButton->setIcon( QIcon( ":/repeat_one" ) );
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_one" ) );
repeatButton->setChecked( false );
}
BUTTONACT( repeatButton, toggleRepeat() );
......@@ -148,7 +148,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Goto */
gotoPlayingButton = new QPushButton;
BUTTON_SET_ACT_I( gotoPlayingButton, "", jump_to,
BUTTON_SET_ACT_I( gotoPlayingButton, "", buttons/playlist/jump_to,
qtr( "Show the current item" ), gotoPlayingItem() );
buttons->addWidget( gotoPlayingButton );
......@@ -177,20 +177,20 @@ void StandardPLPanel::toggleRepeat()
if( model->hasRepeat() )
{
model->setRepeat( false ); model->setLoop( true );
repeatButton->setIcon( QIcon( ":/repeat_all" ) );
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_all" ) );
repeatButton->setChecked( true );
}
else if( model->hasLoop() )
{
model->setRepeat( false ) ; model->setLoop( false );
repeatButton->setChecked( false );
repeatButton->setIcon( QIcon( ":/repeat_one" ) );
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_one" ) );
}
else
{
model->setRepeat( true ); model->setLoop( false );
repeatButton->setChecked( true );
repeatButton->setIcon( QIcon( ":/repeat_one" ) );
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_one" ) );
}
}
......
......@@ -63,7 +63,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent, bool sma
#define ADD_CATEGORY( button, label, icon, numb ) \
QToolButton * button = new QToolButton( this ); \
button->setIcon( QIcon( ":/pixmaps/prefs/" #icon ) ); \
button->setIcon( QIcon( ":/prefsmenu/" #icon ) ); \
button->setText( label ); \
button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon ); \
button->setIconSize( QSize( icon_height, icon_height ) ); \
......@@ -75,14 +75,17 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent, bool sma
layout->addWidget( button );
ADD_CATEGORY( SPrefsInterface, qtr("Interface"),
spref_cone_Interface_64.png, 0 );
ADD_CATEGORY( SPrefsAudio, qtr("Audio"), spref_cone_Audio_64.png, 1 );
ADD_CATEGORY( SPrefsVideo, qtr("Video"), spref_cone_Video_64.png, 2 );
cone_interface_64, 0 );
ADD_CATEGORY( SPrefsAudio, qtr("Audio"),
cone_audio_64, 1 );
ADD_CATEGORY( SPrefsVideo, qtr("Video"),
cone_video_64, 2 );
ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles && OSD"),
spref_cone_Subtitles_64.png, 3 );
cone_subtitles_64, 3 );
ADD_CATEGORY( SPrefsInputAndCodecs, qtr("Input && Codecs"),
spref_cone_Input_64.png, 4 );
ADD_CATEGORY( SPrefsHotkeys, qtr("Hotkeys"), spref_cone_Hotkeys_64.png, 5 );
cone_input_64, 4 );
ADD_CATEGORY( SPrefsHotkeys, qtr("Hotkeys"),
cone_hotkeys_64, 5 );
#undef ADD_CATEGORY
......
......@@ -45,12 +45,12 @@ VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent )
layout->addWidget( profileBox );
QToolButton *editButton = new QToolButton( this );
editButton->setIcon( QIcon( ":/preferences" ) );
editButton->setIcon( QIcon( ":/menu/preferences" ) );
editButton->setToolTip( qtr( "Edit selected profile" ) );
layout->addWidget( editButton );
QToolButton *deleteButton = new QToolButton( this );
deleteButton->setIcon( QIcon( ":/clear" ) );
deleteButton->setIcon( QIcon( ":/toolbar/clear" ) );
deleteButton->setToolTip( qtr( "Delete selected profile" ) );
layout->addWidget( deleteButton );
......
......@@ -99,9 +99,9 @@ AboutDialog::AboutDialog( QWidget *parent, intf_thread_t *_p_intf)
qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) );
QLabel *iconVLC = new QLabel;
if( QDate::currentDate().dayOfYear() >= 354 )
iconVLC->setPixmap( QPixmap( ":/vlc48-christmas.png" ) );
iconVLC->setPixmap( QPixmap( ":/logo/vlc48-christmas.png" ) );
else
iconVLC->setPixmap( QPixmap( ":/vlc48.png" ) );
iconVLC->setPixmap( QPixmap( ":/logo/vlc48.png" ) );
layout->addWidget( iconVLC, 0, 0, 1, 1 );
layout->addWidget( introduction, 0, 1, 1, 7 );
layout->addWidget( tab, 1, 0, 1, 8 );
......@@ -128,9 +128,9 @@ AboutDialog::AboutDialog( QWidget *parent, intf_thread_t *_p_intf)
QLabel *iconVLC2 = new QLabel;
if( QDate::currentDate().dayOfYear() >= 354 )
iconVLC2->setPixmap( QPixmap( ":/vlc128-christmas.png" ) );
iconVLC2->setPixmap( QPixmap( ":/logo/vlc128-christmas.png" ) );
else
iconVLC2->setPixmap( QPixmap( ":/vlc128.png" ) );
iconVLC2->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
infoLayout->addWidget( iconVLC2 );
infoLayout->addWidget( infoLabel );
......
......@@ -92,14 +92,14 @@ OpenDialog::OpenDialog( QWidget *parent,
captureOpenPanel = new CaptureOpenPanel( this, p_intf );
/* Insert the tabs */
ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, QIcon( ":/folder-grey" ),
ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, QIcon( ":/type/folder-grey" ),
qtr( "&File" ) );
ui.Tab->insertTab( OPEN_DISC_TAB, discOpenPanel, QIcon( ":/disc" ),
ui.Tab->insertTab( OPEN_DISC_TAB, discOpenPanel, QIcon( ":/type/disc" ),
qtr( "&Disc" ) );
ui.Tab->insertTab( OPEN_NETWORK_TAB, netOpenPanel, QIcon( ":/network" ),
ui.Tab->insertTab( OPEN_NETWORK_TAB, netOpenPanel, QIcon( ":/type/network" ),
qtr( "&Network" ) );
ui.Tab->insertTab( OPEN_CAPTURE_TAB, captureOpenPanel, QIcon( ":/capture-card" ),
qtr( "Capture &Device" ) );
ui.Tab->insertTab( OPEN_CAPTURE_TAB, captureOpenPanel,
QIcon( ":/type/capture-card" ), qtr( "Capture &Device" ) );
/* Hide the Slave input widgets */
ui.slaveLabel->hide();
......
......@@ -63,11 +63,11 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, const QString&
ui.destTab->setCornerWidget( closeTabButton );
closeTabButton->hide();
closeTabButton->setAutoRaise( true );
closeTabButton->setIcon( QIcon( ":/clear" ) );
closeTabButton->setIcon( QIcon( ":/toolbar/clear" ) );
BUTTONACT( closeTabButton, closeTab() );
#endif
CONNECT( ui.destTab, currentChanged( int ), this, tabChanged( int ) );
ui.destTab->setTabIcon( 0, QIcon( ":/playlist_add" ) );
ui.destTab->setTabIcon( 0, QIcon( ":/buttons/playlist/playlist_add" ) );
ui.destBox->addItem( qtr( "File" ) );
ui.destBox->addItem( "HTTP" );
......
......@@ -144,7 +144,7 @@ ToolbarEditDialog::ToolbarEditDialog( QWidget *_w, intf_thread_t *_p_intf)
QToolButton *newButton = new QToolButton;
newButton->setIcon( QIcon( ":/new" ) );
QToolButton *deleteButton = new QToolButton;
deleteButton->setIcon( QIcon( ":/clear" ) );
deleteButton->setIcon( QIcon( ":/toolbar/clear" ) );
deleteButton->setToolTip( qtr( "Delete the current profile" ) );
profileBoxLayout->addWidget( profileLabel, 0, 0 );
......@@ -290,12 +290,12 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
}
/* Spacers are yet again a different thing */
QListWidgetItem *widgetItem = new QListWidgetItem( QIcon( ":/space" ),
QListWidgetItem *widgetItem = new QListWidgetItem( QIcon( ":/toolbar/space" ),
qtr( "Spacer" ), this );
widgetItem->setData( Qt::UserRole, WIDGET_SPACER );
addItem( widgetItem );
widgetItem = new QListWidgetItem( QIcon( ":/space" ),
widgetItem = new QListWidgetItem( QIcon( ":/toolbar/space" ),
qtr( "Expanding Spacer" ), this );
widgetItem->setData( Qt::UserRole, WIDGET_SPACER_EXTEND );
addItem( widgetItem );
......@@ -346,7 +346,7 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
{
QListWidgetItem *widgetItem = new QListWidgetItem( this );
widgetItem->setText( qtr("Small Volume") );
widgetItem->setIcon( QIcon( ":/volume-medium" ) );
widgetItem->setIcon( QIcon( ":/toolbar/volume-medium" ) );
widgetItem->setData( Qt::UserRole, QVariant( i ) );
addItem( widgetItem );
}
......@@ -366,15 +366,15 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
discLayout->setSpacing( 0 ); discLayout->setMargin( 0 );
QToolButton *prevSectionButton = new QToolButton( discFrame );
prevSectionButton->setIcon( QIcon( ":/dvd_prev" ) );
prevSectionButton->setIcon( QIcon( ":/toolbar/dvd_prev" ) );
discLayout->addWidget( prevSectionButton );
QToolButton *menuButton = new QToolButton( discFrame );
menuButton->setIcon( QIcon( ":/dvd_menu" ) );
menuButton->setIcon( QIcon( ":/toolbar/dvd_menu" ) );
discLayout->addWidget( menuButton );
QToolButton *nextButton = new QToolButton( discFrame );
nextButton->setIcon( QIcon( ":/dvd_next" ) );
nextButton->setIcon( QIcon( ":/toolbar/dvd_next" ) );
discLayout->addWidget( nextButton );
widget = discFrame;
......@@ -388,11 +388,11 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
telexLayout->setSpacing( 0 ); telexLayout->setMargin( 0 );
QToolButton *telexOn = new QToolButton( telexFrame );
telexOn->setIcon( QIcon( ":/tv" ) );
telexOn->setIcon( QIcon( ":/toolbar/tv" ) );
telexLayout->addWidget( telexOn );
QToolButton *telexTransparent = new QToolButton;
telexOn->setIcon( QIcon( ":/tvtelx" ) );
telexOn->setIcon( QIcon( ":/toolbar/tvtelx" ) );
telexLayout->addWidget( telexTransparent );
QSpinBox *telexPage = new QSpinBox;
......@@ -502,7 +502,7 @@ void DroppingController::createAndAddWidget( QBoxLayout *controlLayout,
if( i_type == WIDGET_SPACER || i_type == WIDGET_SPACER_EXTEND )
{
QLabel *label = new QLabel( this );
label->setPixmap( QPixmap( ":/space" ) );
label->setPixmap( QPixmap( ":/toolbar/space" ) );
if( i_type == WIDGET_SPACER_EXTEND )
{
label->setSizePolicy( QSizePolicy::MinimumExpanding,
......
......@@ -510,11 +510,11 @@ VLMAWidget::VLMAWidget( const QString& _name,
objLayout->addWidget( time, 1, 3, 1, 2 );*/
QToolButton *modifyButton = new QToolButton;
modifyButton->setIcon( QIcon( QPixmap( ":/settings" ) ) );
modifyButton->setIcon( QIcon( QPixmap( ":/menu/settings" ) ) );
objLayout->addWidget( modifyButton, 0, 5 );
QToolButton *deleteButton = new QToolButton;
deleteButton->setIcon( QIcon( QPixmap( ":/quit" ) ) );
deleteButton->setIcon( QIcon( QPixmap( ":/menu/quit" ) ) );
objLayout->addWidget( deleteButton, 0, 6 );
BUTTONACT( modifyButton, modify() );
......@@ -551,12 +551,12 @@ VLMBroadcast::VLMBroadcast( const QString& _name, const QString& _input,
b_looped = _looped;
playButton = new QToolButton;
playButton->setIcon( QIcon( QPixmap( ":/play" ) ) );
playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) );
objLayout->addWidget( playButton, 1, 0 );
b_playing = true;
QToolButton *stopButton = new QToolButton;
stopButton->setIcon( QIcon( QPixmap( ":/stop_b" ) ) );
stopButton->setIcon( QIcon( QPixmap( ":/toolbar/stop_b" ) ) );
objLayout->addWidget( stopButton, 1, 1 );
loopButton = new QToolButton;
......@@ -573,9 +573,9 @@ void VLMBroadcast::update()
{
VLMWrapper::EditBroadcast( name, input, output, b_enabled, b_looped );
if( b_looped )
loopButton->setIcon( QIcon( QPixmap( ":/repeat_all" ) ) );
loopButton->setIcon( QIcon( QPixmap( ":/buttons/playlist/repeat_all" ) ) );
else
loopButton->setIcon( QIcon( QPixmap( ":/repeat_off" ) ) );
loopButton->setIcon( QIcon( QPixmap( ":/buttons/playlist/repeat_off" ) ) );
}
void VLMBroadcast::togglePlayPause()
......@@ -583,12 +583,12 @@ void VLMBroadcast::togglePlayPause()
if( b_playing )
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastPause );
playButton->setIcon( QIcon( QPixmap( ":/pause_16px" ) ) );
playButton->setIcon( QIcon( QPixmap( ":/menu/pause" ) ) );
}
else
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastPlay );
playButton->setIcon( QIcon( QPixmap( ":/play_16px" ) ) );
playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) );
}
b_playing = !b_playing;
}
......@@ -602,7 +602,7 @@ void VLMBroadcast::toggleLoop()
void VLMBroadcast::stop()
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastStop );
playButton->setIcon( QIcon( QPixmap( ":/play_16px" ) ) );
playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) );
}
/****************
......
......@@ -961,9 +961,9 @@ void MainInterface::createSystray()
{
QIcon iconVLC;
if( QDate::currentDate().dayOfYear() >= 354 )
iconVLC = QIcon( QPixmap( ":/vlc128-christmas.png" ) );
iconVLC = QIcon( QPixmap( ":/logo/vlc128-christmas.png" ) );
else
iconVLC = QIcon( QPixmap( ":/vlc128.png" ) );
iconVLC = QIcon( QPixmap( ":/logo/vlc128.png" ) );
sysTray = new QSystemTrayIcon( iconVLC, this );
sysTray->setToolTip( qtr( "VLC media player" ));
......
......@@ -304,17 +304,17 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf, QWidget *parent )
QMenu *menu = new QMenu( parent );
addDPStaticEntry( menu, qtr( "&Open File..." ),
":/file-asym", SLOT( simpleOpenDialog() ), "Ctrl+O" );
":/type/file-asym", SLOT( simpleOpenDialog() ), "Ctrl+O" );
addDPStaticEntry( menu, qtr( "Advanced Open File..." ),
":/file-asym", SLOT( openFileDialog() ), "Ctrl+Shift+O" );
":/type/file-asym", SLOT( openFileDialog() ), "Ctrl+Shift+O" );
addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ),
":/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
":/type/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
addDPStaticEntry( menu, qtr( "Open &Disc..." ),
":/disc", SLOT( openDiscDialog() ), "Ctrl+D" );
":/type/disc", SLOT( openDiscDialog() ), "Ctrl+D" );
addDPStaticEntry( menu, qtr( "Open &Network Stream..." ),
":/network", SLOT( openNetDialog() ), "Ctrl+N" );
":/type/network", SLOT( openNetDialog() ), "Ctrl+N" );
addDPStaticEntry( menu, qtr( "Open &Capture Device..." ),
":/capture-card", SLOT( openCaptureDialog() ),
":/type/capture-card", SLOT( openCaptureDialog() ),
"Ctrl+C" );
menu->addSeparator();
......@@ -338,13 +338,13 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf, QWidget *parent )
addDPStaticEntry( menu, qtr( "Conve&rt / Save..." ), "",
SLOT( openAndTranscodingDialogs() ), "Ctrl+R" );
addDPStaticEntry( menu, qtr( "&Streaming..." ),
":/stream", SLOT( openAndStreamingDialogs() ),
":/menu/stream", SLOT( openAndStreamingDialogs() ),
"Ctrl+S" );
menu->addSeparator();
#endif
addDPStaticEntry( menu, qtr( "&Quit" ) ,
":/quit", SLOT( quit() ), "Ctrl+Q" );
":/menu/quit", SLOT( quit() ), "Ctrl+Q" );
return menu;
}
......@@ -353,16 +353,16 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf, QWidget *parent )
**/
QMenu *QVLCMenu::ToolsMenu( QMenu *menu )
{
addDPStaticEntry( menu, qtr( "&Effects and Filters"), ":/settings",
addDPStaticEntry( menu, qtr( "&Effects and Filters"), ":/menu/settings",
SLOT( extendedDialog() ), "Ctrl+E" );
addDPStaticEntry( menu, qtr( "&Track Synchronization"), ":/settings",
addDPStaticEntry( menu, qtr( "&Track Synchronization"), ":/menu/settings",
SLOT( synchroDialog() ), "" );
addDPStaticEntry( menu, qtr( I_MENU_INFO ) , ":/info",
addDPStaticEntry( menu, qtr( I_MENU_INFO ) , ":/menu/info",
SLOT( mediaInfoDialog() ), "Ctrl+I" );
addDPStaticEntry( menu, qtr( I_MENU_CODECINFO ) ,
":/info", SLOT( mediaCodecDialog() ), "Ctrl+J" );
":/menu/info", SLOT( mediaCodecDialog() ), "Ctrl+J" );
addDPStaticEntry( menu, qtr( I_MENU_BOOKMARK ),"",
SLOT( bookmarksDialog() ), "Ctrl+B" );
......@@ -372,7 +372,7 @@ QMenu *QVLCMenu::ToolsMenu( QMenu *menu )
#endif
addDPStaticEntry( menu, qtr( I_MENU_MSG ),
":/messages", SLOT( messagesDialog() ),
":/menu/messages", SLOT( messagesDialog() ),
"Ctrl+M" );
addDPStaticEntry( menu, qtr( "Plu&gins and extensions" ),
......@@ -380,7 +380,7 @@ QMenu *QVLCMenu::ToolsMenu( QMenu *menu )
menu->addSeparator();
addDPStaticEntry( menu, qtr( "&Preferences" ),
":/preferences", SLOT( prefsDialog() ), "Ctrl+P" );
":/menu/preferences", SLOT( prefsDialog() ), "Ctrl+P" );
return menu;
}
......@@ -402,7 +402,7 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
QMenu *menu = new QMenu( qtr( "V&iew" ), mi );
QAction *act = menu->addAction( QIcon( ":/playlist_menu" ),
QAction *act = menu->addAction( QIcon( ":/menu/playlist_menu" ),
qtr( "Play&list" ), mi,
SLOT( togglePlaylist() ), qtr( "Ctrl+L" ) );
......@@ -463,7 +463,7 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
menu->addSeparator();
addDPStaticEntry( menu, qtr( "Customi&ze Interface..." ),
":/preferences", SLOT( toolbarDialog() ) );
":/menu/preferences", SLOT( toolbarDialog() ) );
menu->addSeparator();
return menu;
......@@ -691,13 +691,13 @@ QMenu *QVLCMenu::HelpMenu( QWidget *parent )
{
QMenu *menu = new QMenu( parent );
addDPStaticEntry( menu, qtr( "&Help..." ) ,
":/help", SLOT( helpDialog() ), "F1" );
":/menu/help", SLOT( helpDialog() ), "F1" );
#ifdef UPDATE_CHECK
addDPStaticEntry( menu, qtr( "Check for &Updates..." ) , "",
SLOT( updateDialog() ) );
#endif
menu->addSeparator();
addDPStaticEntry( menu, qtr( I_MENU_ABOUT ), ":/info",
addDPStaticEntry( menu, qtr( I_MENU_ABOUT ), ":/menu/info",
SLOT( aboutDialog() ), "Shift+F1" );
return menu;
}
......@@ -729,12 +729,12 @@ void QVLCMenu::PopupPlayEntries( QMenu *menu,
{
action = menu->addAction( qtr( "Play" ),
ActionsManager::getInstance( p_intf ), SLOT( play() ) );
action->setIcon( QIcon( ":/play" ) );
action->setIcon( QIcon( ":/menu/play" ) );
}
else
{
addMIMStaticEntry( p_intf, menu, qtr( "Pause" ),
":/pause", SLOT( togglePlayPause() ) );
":/menu/pause", SLOT( togglePlayPause() ) );
}
}
......@@ -745,7 +745,7 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_intf )
/* Faster/Slower */
action = menu->addAction( qtr( "&Faster" ), THEMIM->getIM(),
SLOT( faster() ) );
action->setIcon( QIcon( ":/faster") );
action->setIcon( QIcon( ":/toolbar/faster") );
action->setData( STATIC_ENTRY );
action = menu->addAction( qtr( "Faster (fine)" ), THEMIM->getIM(),
......@@ -762,19 +762,19 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_intf )
action = menu->addAction( qtr( "Slo&wer" ), THEMIM->getIM(),
SLOT( slower() ) );
action->setIcon( QIcon( ":/slower") );
action->setIcon( QIcon( ":/toolbar/slower") );
action->setData( STATIC_ENTRY );
menu->addSeparator();
action = menu->addAction( qtr( "&Jump Forward" ), THEMIM->getIM(),
SLOT( jumpFwd() ) );
action->setIcon( QIcon( ":/skip_fw") );
action->setIcon( QIcon( ":/toolbar/skip_fw") );
action->setData( STATIC_ENTRY );
action = menu->addAction( qtr( "Jump Bac&kward" ), THEMIM->getIM(),
SLOT( jumpBwd() ) );
action->setIcon( QIcon( ":/skip_back") );
action->setIcon( QIcon( ":/toolbar/skip_back") );
action->setData( STATIC_ENTRY );
addDPStaticEntry( menu, qtr( I_MENU_GOTOTIME ),"",
SLOT( gotoTimeDialog() ), "Ctrl+T" );
......@@ -787,7 +787,7 @@ void QVLCMenu::PopupMenuPlaylistControlEntries( QMenu *menu,
{
bool bEnable = THEMIM->getInput() != NULL;
QAction *action =
addMIMStaticEntry( p_intf, menu, qtr( "&Stop" ), ":/stop",
addMIMStaticEntry( p_intf, menu, qtr( "&Stop" ), ":/menu/stop",
SLOT( stop() ), true );
/* Disable Stop in the right-click popup menu */
if( !bEnable )
......@@ -795,9 +795,9 @@ void QVLCMenu::PopupMenuPlaylistControlEntries( QMenu *menu,
/* Next / Previous */
addMIMStaticEntry( p_intf, menu, qtr( "Pre&vious" ),
":/previous", SLOT( prev() ) );
":/menu/previous", SLOT( prev() ) );
addMIMStaticEntry( p_intf, menu, qtr( "Ne&xt" ),
":/next", SLOT( next() ) );