diff options
Diffstat (limited to 'kio')
-rw-r--r-- | kio/kfile/kfilespeedbar.cpp | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp index 49ca66cdc..5cf9ed3df 100644 --- a/kio/kfile/kfilespeedbar.cpp +++ b/kio/kfile/kfilespeedbar.cpp @@ -44,37 +44,27 @@ KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name ) if ( m_initializeSpeedbar ) { - KURL u; - u.setPath( KGlobalSettings::desktopPath() ); - insertItem( u, i18n("Desktop"), false ); - -//TODO: win32 - if ((KGlobalSettings::documentPath() != (TQDir::homeDirPath()+"/")) && - TQDir(KGlobalSettings::documentPath()).exists()) + insertItem(TQDir::homeDirPath(), i18n("Home Folder"), false, "folder_home"); + insertItem(KGlobalSettings::desktopPath(), i18n("Desktop"), false, "folder_txt"); + insertItem(KGlobalSettings::documentPath(), i18n("Documents"), false, "folder_txt"); + insertItem(KGlobalSettings::downloadPath(), i18n( "Downloads" ), false, "folder_html"); + insertItem(KGlobalSettings::musicPath(), i18n( "Music" ), false, "folder_sound"); + insertItem(KGlobalSettings::picturesPath(), i18n( "Pictures" ), false, "folder_image"); + insertItem(KGlobalSettings::publicSharePath(), i18n( "Public" ), false, "folder"); + insertItem(KGlobalSettings::templatesPath(), i18n( "Templates" ), false, "folder_txt"); + insertItem(KGlobalSettings::videosPath(), i18n( "Videos" ), false, "folder_video"); + + KURL u = "media:/"; + if (KProtocolInfo::isKnownProtocol(u)) { - u.setPath( KGlobalSettings::documentPath() ); - insertItem( u, i18n("Documents"), false, "folder_txt" ); + insertItem(u, i18n("Storage Media"), false, KProtocolInfo::icon("media")); } - u.setPath( TQDir::homeDirPath() ); - insertItem( u, i18n("Home Folder"), false, "folder_home" ); - - u = "media:/"; - if ( KProtocolInfo::isKnownProtocol( u ) ) - insertItem( u, i18n("Storage Media"), false, KProtocolInfo::icon( "media" ) ); - - // now add in the speedbar - insertItem(KGlobalSettings::downloadPath(), i18n( "Downloads" ), false, "folder_html" ); - insertItem(KGlobalSettings::musicPath(), i18n( "Music" ), false, "folder_sound" ); - insertItem(KGlobalSettings::picturesPath(), i18n( "Pictures" ), false, "folder_image" ); - insertItem(KGlobalSettings::publicSharePath(), i18n( "Public" ), false, "folder" ); - insertItem(KGlobalSettings::templatesPath(), i18n( "Templates" ), false, "folder" ); - insertItem(KGlobalSettings::videosPath(), i18n( "Videos" ), false, "folder_video" ); - u = "remote:/"; - if ( KProtocolInfo::isKnownProtocol( u ) ) - insertItem( u, i18n("Network Folders"), false, - KProtocolInfo::icon( "remote" ) ); + if (KProtocolInfo::isKnownProtocol(u)) + { + insertItem(u, i18n("Network Folders"), false, KProtocolInfo::icon("remote")); + } } } |