~ubuntu-branches/ubuntu/gutsy/amarok/gutsy-updates

« back to all changes in this revision

Viewing changes to amarok/src/configdialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2006-11-03 23:57:33 UTC
  • mfrom: (1.31.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061103235733-a41oyfz4mzienqin
Tags: 2:1.4.4-0ubuntu2
Add debian/kubuntu-media-amarok and
debian amarok_play_audiocd.desktop for good KDE integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
#include <kpushbutton.h>
60
60
#include <kstandarddirs.h>
61
61
 
62
 
namespace amaroK {
 
62
namespace Amarok {
63
63
    int databaseTypeCode( const QString type )
64
64
    {
65
65
        // can't use kconfigxt for the database comboxbox since we need the DBConnection id and not the index
162
162
    frame->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
163
163
 
164
164
    // add pages
165
 
    addPage( m_opt1, i18n( "General" ), amaroK::icon( "settings_general" ), i18n( "Configure General Options" ) );
166
 
    addPage( m_opt2, i18n( "Appearance" ), amaroK::icon( "settings_view" ), i18n( "Configure Amarok's Appearance" ) );
167
 
    addPage( m_opt4, i18n( "Playback" ), amaroK::icon( "settings_playback" ), i18n( "Configure Playback" ) );
168
 
    addPage( opt5,   i18n( "OSD" ), amaroK::icon( "settings_indicator" ), i18n( "Configure On-Screen-Display" ) );
169
 
    addPage( opt6,   i18n( "Engine" ), amaroK::icon( "settings_engine" ), i18n( "Configure Engine" ) );
170
 
    addPage( m_opt7, i18n( "Collection" ), amaroK::icon( "collection" ), i18n( "Configure Collection" ) );
171
 
    addPage( opt8,   i18n( "last.fm" ), amaroK::icon( "audioscrobbler" ), i18n( "Configure last.fm Support" ) );
172
 
    addPage( opt9,   i18n( "Media Devices" ), amaroK::icon( "device" ), i18n( "Configure Portable Player Support" ) );
 
165
    addPage( m_opt1, i18n( "General" ), Amarok::icon( "settings_general" ), i18n( "Configure General Options" ) );
 
166
    addPage( m_opt2, i18n( "Appearance" ), Amarok::icon( "settings_view" ), i18n( "Configure Amarok's Appearance" ) );
 
167
    addPage( m_opt4, i18n( "Playback" ), Amarok::icon( "settings_playback" ), i18n( "Configure Playback" ) );
 
168
    addPage( opt5,   i18n( "OSD" ), Amarok::icon( "settings_indicator" ), i18n( "Configure On-Screen-Display" ) );
 
169
    addPage( opt6,   i18n( "Engine" ), Amarok::icon( "settings_engine" ), i18n( "Configure Engine" ) );
 
170
    addPage( m_opt7, i18n( "Collection" ), Amarok::icon( "collection" ), i18n( "Configure Collection" ) );
 
171
    addPage( opt8,   i18n( "last.fm" ), Amarok::icon( "audioscrobbler" ), i18n( "Configure last.fm Support" ) );
 
172
    addPage( opt9,   i18n( "Media Devices" ), Amarok::icon( "device" ), i18n( "Configure Portable Player Support" ) );
173
173
 
174
174
    // Show information labels (must be done after insertions)
175
175
    QObjectList *list = queryList( "QLabel", "infoPixmap" );
247
247
    OSDPreviewWidget *osd = static_cast<OSDPreviewWidget*>( child( "osdpreview" ) );
248
248
    AmarokConfig::setOsdAlignment( osd->alignment() );
249
249
    AmarokConfig::setOsdYOffset( osd->y() );
250
 
    amaroK::OSD::instance()->applySettings();
 
250
    Amarok::OSD::instance()->applySettings();
251
251
 
252
252
    static_cast<CollectionSetup*>(child("CollectionSetup"))->writeConfig();
253
253
 
268
268
        ContextBrowser::instance()->reloadStyleSheet();
269
269
    }
270
270
 
271
 
    int dbType = amaroK::databaseTypeCode( m_opt7->dbSetupFrame->databaseEngine->currentText() );
 
271
    int dbType = Amarok::databaseTypeCode( m_opt7->dbSetupFrame->databaseEngine->currentText() );
272
272
    if ( dbType != AmarokConfig::databaseEngine().toInt() ) {
273
273
        AmarokConfig::setDatabaseEngine( QString::number( dbType ) );
274
274
        emit settingsChanged();
278
278
 
279
279
    if( MediaBrowser::isAvailable() )
280
280
    {
281
 
        PlaylistWindow::self()->addBrowser( "MediaBrowser", MediaBrowser::instance(), i18n( "Media Device" ), amaroK::icon( "device" ) );
 
281
        PlaylistWindow::self()->addBrowser( "MediaBrowser", MediaBrowser::instance(), i18n( "Media Device" ), Amarok::icon( "device" ) );
282
282
        //to re-enable mediabrowser hiding, uncomment this:
283
283
        //connect( MediaBrowser::instance(), SIGNAL( availabilityChanged( bool ) ),
284
284
        //         PlaylistWindow::self(), SLOT( mbAvailabilityChanged( bool ) ) );
285
285
 
286
286
    }
287
287
 
288
 
    amaroK::setUseScores( m_opt1->kcfg_UseScores->isChecked() );
289
 
    amaroK::setUseRatings( m_opt1->kcfg_UseRatings->isChecked() );
 
288
    Amarok::setUseScores( m_opt1->kcfg_UseScores->isChecked() );
 
289
    Amarok::setUseRatings( m_opt1->kcfg_UseRatings->isChecked() );
290
290
 
291
291
    // The following makes everything with a moodbar redraw itself.
292
 
    amaroK::setMoodbarPrefs( m_opt1->kcfg_ShowMoodbar->isChecked(),
 
292
    Amarok::setMoodbarPrefs( m_opt1->kcfg_ShowMoodbar->isChecked(),
293
293
                             m_opt1->kcfg_MakeMoodier->isChecked(),
294
294
                             m_opt1->kcfg_AlterMood->currentItem(),
295
295
                             m_opt1->kcfg_MoodsWithMusic->isChecked() );
337
337
            osd->alignment() != AmarokConfig::osdAlignment() ||
338
338
            osd->alignment() != OSDWidget::Center && osd->y() != AmarokConfig::osdYOffset() ||
339
339
            m_opt2->styleComboBox->currentText() != AmarokConfig::contextBrowserStyleSheet() ||
340
 
            amaroK::databaseTypeCode(  m_opt7->dbSetupFrame->databaseEngine->currentText()  ) != AmarokConfig::databaseEngine().toInt() ||
 
340
            Amarok::databaseTypeCode(  m_opt7->dbSetupFrame->databaseEngine->currentText()  ) != AmarokConfig::databaseEngine().toInt() ||
341
341
            m_engineConfig && m_engineConfig->hasChanged() ||
342
342
            m_deviceManager && m_deviceManager->hasChanged() ||
343
343
            externalBrowser() != AmarokConfig::externalBrowser();
399
399
    m_opt4->kcfg_Crossfade->setEnabled( hasCrossfade );
400
400
    m_opt4->kcfg_CrossfadeLength->setEnabled( hasCrossfade && crossfadeOn );
401
401
    m_opt4->crossfadeLengthLabel->setEnabled( hasCrossfade && crossfadeOn );
402
 
    m_opt4->kcfg_CrossfadeManualOnly->setEnabled( hasCrossfade && crossfadeOn );
 
402
    m_opt4->kcfg_CrossfadeType->setEnabled( hasCrossfade && crossfadeOn );
403
403
 
404
404
    if (!hasCrossfade)
405
405
    {