Commit 2b5cb724 authored by Ludovic Fauvet's avatar Ludovic Fauvet Committed by Jean-Baptiste Kempf

qt4: rename a couple of methods to be more explicit

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 7317861d
...@@ -94,13 +94,13 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf ):QVLCFrame( _p_intf ) ...@@ -94,13 +94,13 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf ):QVLCFrame( _p_intf )
#endif #endif
CONNECT( buttonsBox, rejected(), this, close() ); CONNECT( buttonsBox, rejected(), this, close() );
readSettings( "Bookmarks", QSize( 435, 280 ) ); restoreWidgetPosition( "Bookmarks", QSize( 435, 280 ) );
updateGeometry(); updateGeometry();
} }
BookmarksDialog::~BookmarksDialog() BookmarksDialog::~BookmarksDialog()
{ {
writeSettings( "Bookmarks" ); saveWidgetPosition( "Bookmarks" );
} }
void BookmarksDialog::update() void BookmarksDialog::update()
......
...@@ -96,12 +96,12 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) ...@@ -96,12 +96,12 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
CONNECT( timer, timeout(), this, updateInfos() ); CONNECT( timer, timeout(), this, updateInfos() );
updateInfos(); updateInfos();
readSettings( "EPGDialog", QSize( 650, 450 ) ); restoreWidgetPosition( "EPGDialog", QSize( 650, 450 ) );
} }
EpgDialog::~EpgDialog() EpgDialog::~EpgDialog()
{ {
writeSettings( "EPGDialog" ); saveWidgetPosition( "EPGDialog" );
} }
void EpgDialog::displayEvent( EPGItem *epgItem ) void EpgDialog::displayEvent( EPGItem *epgItem )
......
...@@ -70,12 +70,12 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -70,12 +70,12 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
layout->addWidget( closeButtonBox ); layout->addWidget( closeButtonBox );
CONNECT( closeButtonBox, rejected(), this, close() ); CONNECT( closeButtonBox, rejected(), this, close() );
readSettings( "Help", QSize( 500, 450 ) ); restoreWidgetPosition( "Help", QSize( 500, 450 ) );
} }
HelpDialog::~HelpDialog() HelpDialog::~HelpDialog()
{ {
writeSettings( "Help" ); saveWidgetPosition( "Help" );
} }
AboutDialog::AboutDialog( intf_thread_t *_p_intf) AboutDialog::AboutDialog( intf_thread_t *_p_intf)
......
...@@ -125,12 +125,12 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, ...@@ -125,12 +125,12 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
if( p_item ) if( p_item )
updateAllTabs( p_item ); updateAllTabs( p_item );
readSettings( "Mediainfo", QSize( 600 , 480 ) ); restoreWidgetPosition( "Mediainfo", QSize( 600 , 480 ) );
} }
MediaInfoDialog::~MediaInfoDialog() MediaInfoDialog::~MediaInfoDialog()
{ {
writeSettings( "Mediainfo" ); saveWidgetPosition( "Mediainfo" );
} }
void MediaInfoDialog::showTab( int i_tab = 0 ) void MediaInfoDialog::showTab( int i_tab = 0 )
......
...@@ -114,7 +114,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) ...@@ -114,7 +114,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
CONNECT( ui.mainTab, currentChanged( int ), this, tabChanged( int ) ); CONNECT( ui.mainTab, currentChanged( int ), this, tabChanged( int ) );
/* General action */ /* General action */
readSettings( "Messages", QSize( 600, 450 ) ); restoreWidgetPosition( "Messages", QSize( 600, 450 ) );
/* Hook up to LibVLC messaging */ /* Hook up to LibVLC messaging */
vlc_Subscribe( &sub, MsgCallback, this ); vlc_Subscribe( &sub, MsgCallback, this );
...@@ -122,7 +122,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) ...@@ -122,7 +122,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
MessagesDialog::~MessagesDialog() MessagesDialog::~MessagesDialog()
{ {
writeSettings( "Messages" ); saveWidgetPosition( "Messages" );
vlc_Unsubscribe( &sub ); vlc_Unsubscribe( &sub );
}; };
......
...@@ -75,12 +75,12 @@ PluginDialog::PluginDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -75,12 +75,12 @@ PluginDialog::PluginDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
box->addButton( okButton, QDialogButtonBox::RejectRole ); box->addButton( okButton, QDialogButtonBox::RejectRole );
layout->addWidget( box ); layout->addWidget( box );
BUTTONACT( okButton, close() ); BUTTONACT( okButton, close() );
readSettings( "PluginsDialog", QSize( 435, 280 ) ); restoreWidgetPosition( "PluginsDialog", QSize( 435, 280 ) );
} }
PluginDialog::~PluginDialog() PluginDialog::~PluginDialog()
{ {
writeSettings( "PluginsDialog" ); saveWidgetPosition( "PluginsDialog" );
} }
/* Plugins tab */ /* Plugins tab */
...@@ -125,7 +125,7 @@ PluginTab::PluginTab( intf_thread_t *p_intf_ ) ...@@ -125,7 +125,7 @@ PluginTab::PluginTab( intf_thread_t *p_intf_ )
this, search( const QString& ) ); this, search( const QString& ) );
setMinimumSize( 500, 300 ); setMinimumSize( 500, 300 );
readSettings( "Plugins", QSize( 540, 400 ) ); restoreWidgetPosition( "Plugins", QSize( 540, 400 ) );
} }
inline void PluginTab::FillTree() inline void PluginTab::FillTree()
...@@ -164,7 +164,7 @@ void PluginTab::search( const QString& qs ) ...@@ -164,7 +164,7 @@ void PluginTab::search( const QString& qs )
PluginTab::~PluginTab() PluginTab::~PluginTab()
{ {
writeSettings( "Plugins" ); saveWidgetPosition( "Plugins" );
getSettings()->setValue( "Plugins/Header-State", getSettings()->setValue( "Plugins/Header-State",
treePlugins->header()->saveState() ); treePlugins->header()->saveState() );
} }
......
...@@ -113,14 +113,14 @@ public: ...@@ -113,14 +113,14 @@ public:
protected: protected:
intf_thread_t *p_intf; intf_thread_t *p_intf;
void readSettings( const QString& name, void restoreWidgetPosition( const QString& name,
QSize defSize = QSize( 1, 1 ), QSize defSize = QSize( 1, 1 ),
QPoint defPos = QPoint( 0, 0 ) ) QPoint defPos = QPoint( 0, 0 ) )
{ {
QVLCTools::restoreWidgetPosition(p_intf, name, this, defSize, defPos); QVLCTools::restoreWidgetPosition(p_intf, name, this, defSize, defPos);
} }
void writeSettings( const QString& name ) void saveWidgetPosition( const QString& name )
{ {
QVLCTools::saveWidgetPosition( p_intf, name, this); QVLCTools::saveWidgetPosition( p_intf, name, this);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment