* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include "qt4.hpp"
#include "main_interface.hpp"
b_remainingTime = false;
timeLabel = new TimeLabel;
timeLabel->setText( " --:--/--:-- " );
- timeLabel->setAlignment( Qt::AlignRight );
+ timeLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
nameLabel = new QLabel;
nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse
| Qt::TextSelectableByKeyboard );
bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable();
if( config_GetInt( p_intf, "qt-start-minimized") )
{
- if( b_systrayAvailable ){
+ if( b_systrayAvailable )
+ {
b_createSystray = true;
hide(); //FIXME BUG HERE
}
move( settings->value( "pos", QPoint( 0, 0 ) ).toPoint() );
- resize( settings->value( "size", QSize( 350, 60 ) ).toSize() );
+ QSize newSize = settings->value( "size", QSize( 350, 60 ) ).toSize();
+ if( newSize.isValid() )
+ {
+ resize( newSize );
+ }
+ else
+ {
+ msg_Warn( p_intf, "Invalid size in constructor" );
+ }
int tgPlay = settings->value( "playlist-visible", 0 ).toInt();
settings->endGroup();
MainInterface::~MainInterface()
{
+ msg_Dbg( p_intf, "Destroying the main interface" );
+
if( playlistWidget ) playlistWidget->savingSettings( settings );
if( ExtendedDialog::exists() )
ExtendedDialog::getInstance( p_intf )->savingSettings();
p_intf->pf_request_window = NULL;
p_intf->pf_release_window = NULL;
p_intf->pf_control_window = NULL;
+ p_intf->p_sys->p_mi = NULL;
}
/*****************************
/**
* Ask for the network policy on FIRST STARTUP
**/
- if( config_GetInt( p_intf, "privacy-ask") )
+ if( config_GetInt( p_intf, "qt-privacy-ask") )
{
QList<ConfigControl *> controls;
if( privacyDialog( controls ) == QDialog::Accepted )
c->doApply( p_intf );
}
- config_PutInt( p_intf, "privacy-ask" , 0 );
+ config_PutInt( p_intf, "qt-privacy-ask" , 0 );
config_SaveConfigFile( p_intf, NULL );
}
}
"<p>The <i>VideoLAN Team</i> doesn't like when an application goes "
"online without authorization.</p>\n "
"<p><i>VLC media player</i> can request limited information on "
- "Internet, espically to get CD Covers and songs metadata or to know "
+ "the Internet, especially to get CD covers and songs metadata or to know "
"if updates are available.</p>\n"
"<p><i>VLC media player</i> <b>DOES NOT</b> send or collect <b>ANY</b> "
- "information, even anonymously about your "
- "usage.</p>\n"
+ "information, even anonymously, about your usage.</p>\n"
"<p>Therefore please check the following options, the default being "
"almost no access on the web.</p>\n") );
text->setWordWrap( true );
CONFIG_GENERIC( "album-art", IntegerList ); line++;
CONFIG_GENERIC_NOBOOL( "fetch-meta", Bool ); line++;
+#ifdef UPDATE_CHECK
CONFIG_GENERIC_NOBOOL( "qt-updates-notif", Bool );
-
+#endif
QPushButton *ok = new QPushButton( qtr( "Ok" ) );
gLayout->addWidget( ok, 2, 2 );
settings->endGroup();
settings->beginGroup( "playlist" );
dockPL->move( settings->value( "pos", QPoint( 0,0 ) ).toPoint() );
- dockPL->resize( settings->value( "size", QSize( 400, 300 ) ).toSize() );
+ QSize newSize = settings->value( "size", QSize( 400, 300 ) ).toSize();
+ if( newSize.isValid() )
+ dockPL->resize( newSize );
settings->endGroup();
+
dockPL->show();
playlistVisible = true;
}
need_components_update = false;
}
#endif
-
- controls->updateOnTimer();
}
/*****************************************************************************
void MainInterface::closeEvent( QCloseEvent *e )
{
hide();
- vlc_object_kill( p_intf );
- QApplication::closeAllWindows();
- QApplication::quit();
+ THEDP->quit();
+}
+
+void MainInterface::toggleFullScreen( void )
+{
+ if( isFullScreen() )
+ showNormal();
+ else
+ showFullScreen();
}
/*****************************************************************************