[vlc-commits] Qt: support multi-line comments
Jean-Baptiste Kempf
git at videolan.org
Mon Apr 25 23:03:31 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Apr 25 23:02:49 2011 +0200| [6bdbc1d3465e9f61875df7dedb053ebde3eb3c81] | committer: Jean-Baptiste Kempf
Qt: support multi-line comments
As stupid demuxers like Xiph's only know comments...
Close #3437
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6bdbc1d3465e9f61875df7dedb053ebde3eb3c81
---
modules/gui/qt4/components/info_panels.cpp | 12 ++++++++++--
modules/gui/qt4/components/info_panels.hpp | 3 ++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp
index cdb22e3..efa5aee 100644
--- a/modules/gui/qt4/components/info_panels.cpp
+++ b/modules/gui/qt4/components/info_panels.cpp
@@ -46,6 +46,7 @@
#include <QLineEdit>
#include <QLabel>
#include <QSpinBox>
+#include <QTextEdit>
/************************************************************************
* Single panels
@@ -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 ? */
@@ -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 );
diff --git a/modules/gui/qt4/components/info_panels.hpp b/modules/gui/qt4/components/info_panels.hpp
index b8ed029..7be324e 100644
--- a/modules/gui/qt4/components/info_panels.hpp
+++ b/modules/gui/qt4/components/info_panels.hpp
@@ -49,6 +49,7 @@ class QTreeView;
class QSpinBox;
class QLineEdit;
class CoverArtLabel;
+class QTextEdit;
class MetaPanel: public QWidget
{
@@ -73,7 +74,7 @@ private:
QLineEdit *seqnum_text;
QLineEdit *seqtot_text;
- QLineEdit *description_text;
+ QTextEdit *description_text;
// QSpinBox *rating_text;
QLineEdit *date_text;
// QLineEdit *setting_text;
More information about the vlc-commits
mailing list