[vlc-commits] Show Save Metadata button when editing comments.
Timothy B. Terriberry
git at videolan.org
Mon Sep 2 20:45:07 CEST 2013
vlc | branch: master | Timothy B. Terriberry <tterribe at xiph.org> | Mon Sep 2 09:48:12 2013 -0700| [c7a7824f98d4953fe43b284650ba22240282c96a] | committer: Jean-Baptiste Kempf
Show Save Metadata button when editing comments.
QTextEdit doesn't have a textEdited() signal, but textChanged()
works well enough if we disable it while we're changing the text
ourselves.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7a7824f98d4953fe43b284650ba22240282c96a
---
modules/gui/qt4/components/info_panels.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp
index 41f018e..ddfe308 100644
--- a/modules/gui/qt4/components/info_panels.cpp
+++ b/modules/gui/qt4/components/info_panels.cpp
@@ -166,7 +166,7 @@ MetaPanel::MetaPanel( QWidget *parent,
description_text = new QTextEdit;
description_text->setAcceptRichText( false );
metaLayout->addWidget( description_text, line, 0, 1, 7 );
- // CONNECT( description_text, textChanged(), this, enterEditMode() ); //FIXME
+ CONNECT( description_text, textChanged(), this, enterEditMode() );
line++;
/* VLC_META_SETTING: Useless */
@@ -238,7 +238,10 @@ void MetaPanel::update( input_item_t *p_item )
UPDATE_META( Genre, genre_text );
UPDATE_META( Copyright, copyright_text );
UPDATE_META( Album, collection_text );
+ disconnect( description_text, SIGNAL(textChanged()), this,
+ SLOT(enterEditMode()) );
UPDATE_META( Description, description_text );
+ CONNECT( description_text, textChanged(), this, enterEditMode() );
UPDATE_META( Language, language_text );
UPDATE_META( NowPlaying, nowplaying_text );
UPDATE_META( Publisher, publisher_text );
@@ -341,7 +344,10 @@ void MetaPanel::clear()
collection_text->clear();
seqnum_text->clear();
seqtot_text->clear();
+ disconnect( description_text, SIGNAL(textChanged()), this,
+ SLOT(enterEditMode()) );
description_text->clear();
+ CONNECT( description_text, textChanged(), this, enterEditMode() );
date_text->clear();
language_text->clear();
nowplaying_text->clear();
More information about the vlc-commits
mailing list