[vlc-commits] Qt: Remove leading line break on modules prefs help text
Yuval Tze
git at videolan.org
Fri Jul 29 13:06:15 CEST 2011
vlc | branch: master | Yuval Tze <yuvaltze at gmail.com> | Tue Jul 26 21:28:51 2011 +0300| [e4b08b23057e62c4d50e30cdbd216a17840ad5b1] | committer: Francois Cartegnie
Qt: Remove leading line break on modules prefs help text
module initial help value was always empty, causing leading line break when appending module psz_help text.
save name and help in modules' PrefsItemData like other prefs items.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4b08b23057e62c4d50e30cdbd216a17840ad5b1
---
.../gui/qt4/components/complete_preferences.cpp | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt4/components/complete_preferences.cpp b/modules/gui/qt4/components/complete_preferences.cpp
index 32629dd..4f267b8 100644
--- a/modules/gui/qt4/components/complete_preferences.cpp
+++ b/modules/gui/qt4/components/complete_preferences.cpp
@@ -265,9 +265,14 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
PrefsItemData *module_data = new PrefsItemData();
module_data->i_type = TYPE_MODULE;
module_data->psz_name = strdup( module_get_object( p_module ) );
+ module_data->name = qtr( module_get_name( p_module, false ) );
module_data->help.clear();
+ const char *psz_help = module_get_help( p_module );
+ if ( psz_help )
+ module_data->help = qtr( psz_help );
+
QTreeWidgetItem *module_item = new QTreeWidgetItem();
- module_item->setText( 0, qtr( module_get_name( p_module, false ) ) );
+ module_item->setText( 0, module_data->name );
module_item->setData( 0, Qt::UserRole,
QVariant::fromValue( module_data) );
//module_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
@@ -394,13 +399,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
}
else
{
- const char *psz_help = module_get_help (p_module);
head = QString( qtr( module_GetLongName( p_module ) ) );
- if( psz_help )
- {
- help.append( "\n" );
- help.append( qtr( psz_help ) );
- }
}
QLabel *titleLabel = new QLabel( head );
More information about the vlc-commits
mailing list