openbsd-ports/audio/last.fm/patches/patch-src_settingsdialog_cpp
dcoppa e3e04c6dcc The Unix (linux) client does not do fingerprinting, so don't build
it: this reduces package dependencies (dropped audio/libsamplerate
and math/fftw3).

iPods were identified by a directory timestamp, but it changed each
time the ipod was mounted. Instead identify a device by its
FirewireGuid.
2011-09-19 12:50:57 +00:00

95 lines
5.5 KiB
Plaintext

$OpenBSD: patch-src_settingsdialog_cpp,v 1.3 2011/09/19 12:50:57 dcoppa Exp $
--- src/settingsdialog.cpp.orig Mon Sep 19 12:38:56 2011
+++ src/settingsdialog.cpp Mon Sep 19 12:45:40 2011
@@ -92,6 +92,8 @@ SettingsDialog::SettingsDialog( QWidget *parent )
ui_mediadevices.setupUi( mediadeviceWidget );
ui_mediadevices.deviceWidget->header()->setResizeMode( QHeaderView::ResizeToContents );
ui.pageStack->addWidget( mediadeviceWidget );
+#else
+ ui_scrobbling.groupBox->hide();
#endif
#ifdef NBREAKPAD
@@ -99,16 +101,11 @@ SettingsDialog::SettingsDialog( QWidget *parent )
#endif
// Add icons to user icon dropdown
- QPixmap pixmap( MooseUtils::dataPath( "icons/user_red.png" ) );
- ui_account.colourCombo->setItemIcon( 0, pixmap );
- pixmap.load( MooseUtils::dataPath( "icons/user_blue.png" ) );
- ui_account.colourCombo->setItemIcon( 1, pixmap );
- pixmap.load( MooseUtils::dataPath( "icons/user_green.png" ) );
- ui_account.colourCombo->setItemIcon( 2, pixmap );
- pixmap.load( MooseUtils::dataPath( "icons/user_orange.png" ) );
- ui_account.colourCombo->setItemIcon( 3, pixmap );
- pixmap.load( MooseUtils::dataPath( "icons/user_black.png" ) );
- ui_account.colourCombo->setItemIcon( 4, pixmap );
+ ui_account.colourCombo->setItemIcon( 0, QPixmap( MooseUtils::dataPath( "icons/user_red.png" ) ) );
+ ui_account.colourCombo->setItemIcon( 1, QPixmap( MooseUtils::dataPath( "icons/user_blue.png" ) ) );
+ ui_account.colourCombo->setItemIcon( 2, QPixmap( MooseUtils::dataPath( "icons/user_green.png" ) ) );
+ ui_account.colourCombo->setItemIcon( 3, QPixmap( MooseUtils::dataPath( "icons/user_orange.png" ) ) );
+ ui_account.colourCombo->setItemIcon( 4, QPixmap( MooseUtils::dataPath( "icons/user_black.png" ) ) );
// Add languages to language drop-down
ui_account.languageCombo->addItem( tr( "System Language" ), "" );
@@ -138,29 +135,19 @@ SettingsDialog::SettingsDialog( QWidget *parent )
UnicornUtils::qtLanguageToLfmLangCode( QLocale::Japanese ) );
// Add icons to sidebar
- pixmap.load( MooseUtils::dataPath( "/icons/options_account.png" ) );
- //pixmap.scaled( 48, 48, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
- ui.pageList->item( 0 )->setIcon( pixmap );
+ ui.pageList->item( 0 )->setIcon( QPixmap( MooseUtils::dataPath( "/icons/options_account.png" ) ) );
- pixmap.load( MooseUtils::dataPath( "/icons/options_radio.png" ) );
- //pixmap.scaled( 48, 48, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
- ui.pageList->item( 1 )->setIcon( pixmap );
+ ui.pageList->item( 1 )->setIcon( QPixmap( MooseUtils::dataPath( "/icons/options_radio.png" ) ) );
#ifdef HIDE_RADIO
ui.pageList->setItemHidden( ui.pageList->item( 1 ), true );
#endif // HIDE_RADIO
- pixmap.load( MooseUtils::dataPath( "/icons/options_scrobbling.png" ) );
- //pixmap.scaled( 48, 48, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
- ui.pageList->item( 2 )->setIcon( pixmap );
+ ui.pageList->item( 2 )->setIcon( QPixmap( MooseUtils::dataPath( "/icons/options_scrobbling.png" ) ) );
- pixmap.load( MooseUtils::dataPath( "/icons/options_connection.png" ) );
- //pixmap.scaled( 48, 48, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
- ui.pageList->item( 3 )->setIcon( pixmap );
+ ui.pageList->item( 3 )->setIcon( QPixmap( MooseUtils::dataPath( "/icons/options_connection.png" ) ) );
- pixmap.load( MooseUtils::dataPath( "/icons/options_mediadevices.png" ) );
- //pixmap.scaled( 48, 48, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
- ui.pageList->item( 4 )->setIcon( pixmap );
+ ui.pageList->item( 4 )->setIcon( QPixmap( MooseUtils::dataPath( "/icons/options_mediadevices.png" ) ) );
#ifdef Q_WS_X11
ui.pageList->setRowHidden( 4, true );
@@ -216,7 +203,7 @@ SettingsDialog::SettingsDialog( QWidget *parent )
connect( ui_scrobbling.dirTree, SIGNAL( dataChanged() ), this, SLOT( configChanged() ) );
connect( ui_scrobbling.scrobblePointSlider, SIGNAL( valueChanged( int ) ), this, SLOT( configChanged() ) );
connect( ui_scrobbling.launchWithMediaPlayerCheck, SIGNAL( toggled( bool ) ), this, SLOT( configChanged() ) );
- connect( ui_scrobbling.fingerprintCheckBox, SIGNAL( stateChanged( int ) ), this, SLOT( configChanged() ) );
+ ui_scrobbling.fingerprintCheckBox->hide();
connect( ui_connection.proxyBox, SIGNAL( toggled( bool ) ), this, SLOT( configChanged() ) );
connect( ui_connection.proxyHostEdit, SIGNAL( textChanged( QString ) ), this, SLOT( configChanged() ) );
connect( ui_connection.proxyPortEdit, SIGNAL( textChanged( QString ) ), this, SLOT( configChanged() ) );
@@ -387,7 +374,6 @@ SettingsDialog::populateScrobbling()
ui_scrobbling.scrobblePointSlider->setValue( user.scrobblePoint() );
ui_scrobbling.scrobblePointLabel->setText( QString::number( user.scrobblePoint() ) );
ui_scrobbling.launchWithMediaPlayerCheck->setChecked( The::settings().launchWithMediaPlayer() );
- ui_scrobbling.fingerprintCheckBox->setChecked( user.fingerprintingEnabled() );
ui_scrobbling.dirTree->setExclusions( user.excludedDirs() );
}
@@ -577,7 +563,6 @@ SettingsDialog::saveScrobbling()
user.setScrobblePoint( ui_scrobbling.scrobblePointSlider->value() );
user.setExcludedDirs( ui_scrobbling.dirTree->getExclusions() );
The::settings().setLaunchWithMediaPlayer( ui_scrobbling.launchWithMediaPlayerCheck->isChecked() );
- user.setFingerprintingEnabled( ui_scrobbling.fingerprintCheckBox->checkState() == Qt::Checked ? true : false );
pageSaved( 2 );
}