* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include "qt4.hpp"
#include "components/info_panels.hpp"
/* Title, artist and album*/
ADD_META( VLC_META_TITLE, title_text ); /* OK */
ADD_META( VLC_META_ARTIST, artist_text ); /* OK */
- ADD_META( VLC_META_COLLECTION, collection_text ); /* OK */
+ ADD_META( VLC_META_ALBUM, collection_text ); /* OK */
/* Genre Name */
/* TODO List id3genres.h is not includable yet ? */
genre_text = new QLineEdit;
metaLayout->addWidget( new QLabel( qtr( VLC_META_GENRE ) + " :" ), line, 0 );
- metaLayout->addWidget( genre_text, line, 1, 1, 4 );
+ metaLayout->addWidget( genre_text, line, 1, 1, 3 );
/* Number - on the same line */
- metaLayout->addWidget( new QLabel( qtr( "Track Number" ) + " :" ),
+ metaLayout->addWidget( new QLabel( qtr( VLC_META_TRACK_NUMBER ) + " :" ),
line, 5, 1, 2 );
seqnum_text = new QLineEdit;
seqnum_text->setInputMask("0000");
metaLayout->addWidget( rating_text, line, 6, 1, 1 );
*/
/* Language on the same line */
- metaLayout->addWidget( new QLabel( qfu( VLC_META_LANGUAGE ) + " :" ), line, 7, 1, 2 );
+ metaLayout->addWidget( new QLabel( qfu( VLC_META_LANGUAGE ) + " :" ), line, 5, 1, 2 );
language_text = new QLineEdit;
language_text->setReadOnly( true );
- metaLayout->addWidget( language_text, line, 9, 1, 1 );
+ metaLayout->addWidget( language_text, line, 7, 1, 3 );
line++;
/* ART_URL */
art_cover->setMaximumWidth( 128 );
art_cover->setScaledContents( true );
art_cover->setPixmap( QPixmap( ":/noart.png" ) );
- metaLayout->addWidget( art_cover, line, 8, 4, 2 );
+ metaLayout->addWidget( art_cover, line, 8, 4, 2, Qt::AlignRight );
/* Settings is unused */
/* l->addWidget( new QLabel( qtr( VLC_META_SETTING ) + " :" ), line, 5 );
/* ADD_META( TRACKID ) Useless ? */
/* ADD_URI - DO not show it, done outside */
+ metaLayout->setColumnStretch( 1, 2 );
+ metaLayout->setColumnMinimumWidth ( 1, 80 );
#undef ADD_META
#undef ADD_META_2
PL_UNLOCK;
pl_Release( p_playlist );
- /* Reset the status of the mode. No need to emit any signal */
+ /* Reset the status of the mode. No need to emit any signal because parent
+ is the only caller */
b_inEditMode = false;
}
void MetaPanel::enterEditMode()
{
+ msg_Dbg( p_intf, "Entering Edit MetaData Mode" );
setEditMode( true );
}
*/
void MetaPanel::clear()
{
- uri_text->clear();
title_text->clear();
artist_text->clear();
genre_text->clear();
QGridLayout *layout = new QGridLayout(this);
QLabel *topLabel = new QLabel( qtr( "Extra metadata and other information"
- " are shown in this list.\n" ) );
+ " are shown in this panel.\n" ) );
topLabel->setWordWrap( true );
layout->addWidget( topLabel, 0, 0 );
extraMetaTree = new QTreeWidget( this );
extraMetaTree->setAlternatingRowColors( true );
extraMetaTree->setColumnCount( 2 );
+ extraMetaTree->resizeColumnToContents( 0 );
extraMetaTree->header()->hide();
/* QStringList headerList = ( QStringList() << qtr( "Type" )
* << qtr( "Value" ) );
**/
void ExtraMetaPanel::update( input_item_t *p_item )
{
+ QStringList tempItem;
+ QList<QTreeWidgetItem *> items;
+
+ extraMetaTree->clear();
+
vlc_mutex_lock( &p_item->lock );
vlc_meta_t *p_meta = p_item->p_meta;
if( !p_meta )
+ {
+ vlc_mutex_unlock( &p_item->lock );
return;
- QStringList tempItem;
+ }
- QList<QTreeWidgetItem *> items;
vlc_dictionary_t * p_dict = &p_meta->extra_tags;
char ** ppsz_allkey = vlc_dictionary_all_keys( p_dict );
- for (int i = 0; ppsz_allkey[i] ; i++ )
+
+ for( int i = 0; ppsz_allkey[i] ; i++ )
{
const char * psz_value = (const char *)vlc_dictionary_value_for_key(
p_dict, ppsz_allkey[i] );
}
vlc_mutex_unlock( &p_item->lock );
free( ppsz_allkey );
+
extraMetaTree->addTopLevelItems( items );
+ extraMetaTree->resizeColumnToContents( 0 );
}
/**
QList<QTreeWidgetItem *> items;
QLabel *topLabel = new QLabel( qtr( "Information about what your media or"
- " stream is made of.\n Muxer, Audio and Video Codecs, Subtitles "
+ " stream is made of.\nMuxer, Audio and Video Codecs, Subtitles "
"are shown." ) );
topLabel->setWordWrap( true );
layout->addWidget( topLabel, 0, 0 );
QList<QTreeWidgetItem *> items;
- QLabel *topLabel = new QLabel( qtr( "Various statistics about the current"
- " media or stream.\n Played and streamed info are shown." ) );
+ QLabel *topLabel = new QLabel( qtr( "Statistics about the currently "
+ "playing media or stream." ) );
topLabel->setWordWrap( true );
layout->addWidget( topLabel, 0, 0 );
CREATE_AND_ADD_TO_CAT( send_stat, qtr("Sent packets"), "0", streaming, "" );
CREATE_AND_ADD_TO_CAT( send_bytes_stat, qtr("Sent bytes"),
"0", streaming, "kB" );
- CREATE_AND_ADD_TO_CAT( send_bitrate_stat, qtr("Sent bitrates"),
+ CREATE_AND_ADD_TO_CAT( send_bitrate_stat, qtr("Sent bitrate"),
"0", streaming, "kb/s" );
CREATE_AND_ADD_TO_CAT( adecoded_stat, qtr("Decoded blocks"),