Skip to content

Commit

Permalink
Qt: support multi-line comments
Browse files Browse the repository at this point in the history
As stupid demuxers like Xiph's only know comments...
Close #3437
  • Loading branch information
jbkempf committed Apr 25, 2011
1 parent 41d2832 commit 6bdbc1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions modules/gui/qt4/components/info_panels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <QLineEdit>
#include <QLabel>
#include <QSpinBox>
#include <QTextEdit>

/************************************************************************
* Single panels
Expand Down Expand Up @@ -139,7 +140,14 @@ MetaPanel::MetaPanel( QWidget *parent,
ADD_META( VLC_META_PUBLISHER, publisher_text, 0, 7 ); line++;
ADD_META( VLC_META_COPYRIGHT, copyright_text, 0, 7 ); line++;
ADD_META( VLC_META_ENCODED_BY, encodedby_text, 0, 7 ); line++;
ADD_META( N_("Comments"), description_text, 0, 7 ); line++;

label = new QLabel( qtr( N_("Comments") ) ); label->setFont( smallFont );
label->setContentsMargins( 3, 2, 0, 0 );
metaLayout->addWidget( label, line++, 0, 1, 7 );
description_text = new QTextEdit;
metaLayout->addWidget( description_text, line, 0, 1, 7 );
CONNECT( description_text, textEdited( QString ), this, enterEditMode() );
line++;

/* VLC_META_SETTING: Useless */
/* ADD_META( TRACKID ) Useless ? */
Expand Down Expand Up @@ -266,7 +274,7 @@ void MetaPanel::saveMeta()

input_item_SetCopyright( p_input, qtu( copyright_text->text() ) );
input_item_SetPublisher( p_input, qtu( publisher_text->text() ) );
input_item_SetDescription( p_input, qtu( description_text->text() ) );
input_item_SetDescription( p_input, qtu( description_text->toPlainText() ) );

playlist_t *p_playlist = pl_Get( p_intf );
input_item_WriteMeta( VLC_OBJECT(p_playlist), p_input );
Expand Down
3 changes: 2 additions & 1 deletion modules/gui/qt4/components/info_panels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class QTreeView;
class QSpinBox;
class QLineEdit;
class CoverArtLabel;
class QTextEdit;

class MetaPanel: public QWidget
{
Expand All @@ -73,7 +74,7 @@ class MetaPanel: public QWidget
QLineEdit *seqnum_text;
QLineEdit *seqtot_text;

QLineEdit *description_text;
QTextEdit *description_text;
// QSpinBox *rating_text;
QLineEdit *date_text;
// QLineEdit *setting_text;
Expand Down

0 comments on commit 6bdbc1d

Please sign in to comment.