diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-11-15 23:55:01 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-11-15 23:55:01 +0900 |
commit | 8a6ce15a94e441d514ed4076ea787c0b33b37194 (patch) | |
tree | a132de80669ec6214146a3b6e24c879b2eee3eb6 | |
parent | 0a2adc65fa82ffdf5cfa3f7e669614b5474da42b (diff) | |
parent | f07158cd9dcb61b32e7dba5674e8ed0f7c8c6fe2 (diff) | |
download | tdebase-8a6ce15a94e441d514ed4076ea787c0b33b37194.tar.gz tdebase-8a6ce15a94e441d514ed4076ea787c0b33b37194.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdebase
-rw-r--r-- | konqueror/iconview/konq_iconview.cc | 6 | ||||
-rw-r--r-- | libkonq/konq_iconviewwidget.cc | 12 | ||||
-rw-r--r-- | libkonq/tdefileivi.cc | 38 | ||||
-rw-r--r-- | libkonq/tdefileivi.h | 4 | ||||
-rw-r--r-- | tdeioslave/media/libmediacommon/notifiersettings.cpp | 15 | ||||
-rw-r--r-- | tdeioslave/media/propsdlgplugin/media_propsdlgplugin.desktop | 2 | ||||
-rw-r--r-- | tdeioslave/media/services/media_eject.desktop | 2 | ||||
-rw-r--r-- | tdeioslave/media/services/media_unmount.desktop | 2 | ||||
-rw-r--r-- | tdeioslave/media/tdefile-plugin/tdefile_media.desktop | 2 | ||||
-rw-r--r-- | tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp | 12 |
10 files changed, 72 insertions, 23 deletions
diff --git a/konqueror/iconview/konq_iconview.cc b/konqueror/iconview/konq_iconview.cc index 0e754b848..3b6432d1e 100644 --- a/konqueror/iconview/konq_iconview.cc +++ b/konqueror/iconview/konq_iconview.cc @@ -1108,8 +1108,6 @@ void KonqKfmIconView::showDirectoryOverlay(KFileIVI* item) void KonqKfmIconView::showFreeSpaceOverlay(KFileIVI* item) { - KFileItem* fileItem = item->item(); - m_paOutstandingFreeSpaceOverlays.append(item); if (m_paOutstandingFreeSpaceOverlays.count() == 1) { @@ -1296,6 +1294,10 @@ void KonqKfmIconView::determineIcon( KFileIVI * item ) (void) item->item()->determineMimeType(); + if (item->item()->isMimeTypeKnown()) { + item->mimeTypeAndIconDetermined(); + } + item->setIcon( iconSize(), item->state(), true, true ); item->setMouseOverAnimation( item->item()->iconName() ); } diff --git a/libkonq/konq_iconviewwidget.cc b/libkonq/konq_iconviewwidget.cc index 8cb222659..96e04df29 100644 --- a/libkonq/konq_iconviewwidget.cc +++ b/libkonq/konq_iconviewwidget.cc @@ -709,14 +709,16 @@ void KonqIconViewWidget::setItemTextPos( ItemTextPos pos ) // can't call gridXValue() because this already would need the new itemTextPos() int sz = m_size ? m_size : TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop ); - if ( m_bSetGridX ) - if ( pos == TQIconView::Bottom ) + if ( m_bSetGridX ) { + if ( pos == TQIconView::Bottom ) { setGridX( TQMAX( sz + 50, previewIconSize( sz ) + 13 ) ); + } else { setMaxItemWidth( TQMAX( sz, previewIconSize( sz ) ) + m_pSettings->iconTextWidth() ); setGridX( -1 ); } + } TDEIconView::setItemTextPos( pos ); } @@ -773,14 +775,16 @@ void KonqIconViewWidget::gridValues( int* x, int* y, int* dx, int* dy, void KonqIconViewWidget::calculateGridX() { - if ( m_bSetGridX ) - if ( itemTextPos() == TQIconView::Bottom ) + if ( m_bSetGridX ) { + if ( itemTextPos() == TQIconView::Bottom ) { setGridX( gridXValue() ); + } else { setMaxItemWidth( gridXValue() ); setGridX( -1 ); } + } } int KonqIconViewWidget::gridXValue() const diff --git a/libkonq/tdefileivi.cc b/libkonq/tdefileivi.cc index 08bd240ba..2e23cfbf7 100644 --- a/libkonq/tdefileivi.cc +++ b/libkonq/tdefileivi.cc @@ -570,10 +570,42 @@ void KFileIVI::updatePixmapSize() KonqIconViewWidget* view = static_cast<KonqIconViewWidget*>( iconView() ); - TQSize pixSize = TQSize( size, size ); - if ( pixSize != pixmapSize() ) { - setPixmapSize( pixSize ); + bool mimeDetermined = false; + if ( m_fileitem->isMimeTypeKnown() ) { + mimeDetermined = true; } + + if (mimeDetermined) { + bool changed = false; + if ( view && view->canPreview( item() ) ) { + int previewSize = view->previewIconSize( size ); + if (previewSize != size) { + setPixmapSize( TQSize( previewSize, previewSize ) ); + changed = true; + } + } + else { + TQSize pixSize = TQSize( size, size ); + if ( pixSize != pixmapSize() ) { + setPixmapSize( pixSize ); + changed = true; + } + } + if (changed) { + view->adjustItems(); + } + } + else { + TQSize pixSize = TQSize( size, size ); + if ( pixSize != pixmapSize() ) { + setPixmapSize( pixSize ); + } + } +} + +void KFileIVI::mimeTypeAndIconDetermined() +{ + updatePixmapSize(); } /* vim: set noet sw=4 ts=8 softtabstop=4: */ diff --git a/libkonq/tdefileivi.h b/libkonq/tdefileivi.h index 243688d43..4701fb9c1 100644 --- a/libkonq/tdefileivi.h +++ b/libkonq/tdefileivi.h @@ -208,6 +208,8 @@ public: virtual int compare( TQIconViewItem *i ) const; + void mimeTypeAndIconDetermined(); + protected: virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ); @@ -240,7 +242,7 @@ private: /** Check if a thumbnail will be generated and calc the size of the icon */ void updatePixmapSize(); - + int m_size, m_state; bool m_bDisabled; bool m_bThumbnail; diff --git a/tdeioslave/media/libmediacommon/notifiersettings.cpp b/tdeioslave/media/libmediacommon/notifiersettings.cpp index 53d5e63ab..40a09ba8e 100644 --- a/tdeioslave/media/libmediacommon/notifiersettings.cpp +++ b/tdeioslave/media/libmediacommon/notifiersettings.cpp @@ -49,11 +49,16 @@ NotifierSettings::NotifierSettings() m_supportedMimetypes.append( "media/dvd_unmounted_decrypted" ); m_supportedMimetypes.append( "media/dvd_mounted" ); m_supportedMimetypes.append( "media/dvd_mounted_decrypted" ); - m_supportedMimetypes.append( "media/cdwriter_unmounted" ); - m_supportedMimetypes.append( "media/cdwriter_unmounted_encrypted" ); - m_supportedMimetypes.append( "media/cdwriter_unmounted_decrypted" ); - m_supportedMimetypes.append( "media/cdwriter_mounted" ); - m_supportedMimetypes.append( "media/cdwriter_mounted_decrypted" ); + m_supportedMimetypes.append( "media/cd-r_unmounted" ); + m_supportedMimetypes.append( "media/cd-r_unmounted_encrypted" ); + m_supportedMimetypes.append( "media/cd-r_unmounted_decrypted" ); + m_supportedMimetypes.append( "media/cd-r_mounted" ); + m_supportedMimetypes.append( "media/cd-r_mounted_decrypted" ); + m_supportedMimetypes.append( "media/cd-rw_unmounted" ); + m_supportedMimetypes.append( "media/cd-rw_unmounted_encrypted" ); + m_supportedMimetypes.append( "media/cd-rw_unmounted_decrypted" ); + m_supportedMimetypes.append( "media/cd-rw_mounted" ); + m_supportedMimetypes.append( "media/cd-rw_mounted_decrypted" ); m_supportedMimetypes.append( "media/blankcd" ); m_supportedMimetypes.append( "media/blankdvd" ); m_supportedMimetypes.append( "media/audiocd" ); diff --git a/tdeioslave/media/propsdlgplugin/media_propsdlgplugin.desktop b/tdeioslave/media/propsdlgplugin/media_propsdlgplugin.desktop index e3460510e..86afb6f87 100644 --- a/tdeioslave/media/propsdlgplugin/media_propsdlgplugin.desktop +++ b/tdeioslave/media/propsdlgplugin/media_propsdlgplugin.desktop @@ -99,4 +99,4 @@ Comment[wa]=Tchôke-divins di dvize di prôpietés Konqueror po-z apontyî l' du Comment[zh_CN]=配置挂载行为的 Konqueror 属性对话框插件 Comment[zh_TW]=Konqueror 內容對話框外掛程式,用於設定掛載的行為 X-TDE-Library=media_propsdlgplugin -X-TDE-ServiceTypes=KPropsDlg/Plugin,media/audiocd,media/hdd_mounted,media/hdd_unmounted,media/hdd_mounted_decrypted,media/hdd_unmounted_decrypted,media/cdrom_mounted,media/cdrom_unmounted,media/cdrom_mounted_decrypted,media/cdrom_unmounted_decrypted,media/cdwriter_mounted,media/cdwriter_mounted_decrypted,media/nfs_mounted,media/cdwriter_unmounted,media/cdwriter_unmounted_decrypted,media/nfs_unmounted,media/removable_mounted,media/removable_mounted_decrypted,media/dvd_mounted,media/dvd_mounted_decrypted,media/removable_unmounted,media/removable_unmounted_decrypted,media/dvd_unmounted,media/dvd_unmounted_decrypted,media/smb_mounted,media/dvdvideo,media/smb_unmounted,media/floppy5_mounted,media/floppy5_unmounted,media/floppy_mounted,media/zip_mounted,media/floppy_unmounted,media/zip_unmounted,media/camera_mounted,media/camera_unmounted +X-TDE-ServiceTypes=KPropsDlg/Plugin,media/audiocd,media/hdd_mounted,media/hdd_unmounted,media/hdd_mounted_decrypted,media/hdd_unmounted_decrypted,media/cdrom_mounted,media/cdrom_unmounted,media/cdrom_mounted_decrypted,media/cdrom_unmounted_decrypted,media/cd-r_mounted,media/cd-r_mounted_decrypted,media/cd-rw_mounted,media/cd-rw_mounted_decrypted,media/nfs_mounted,media/cd-r_unmounted,media/cd-r_unmounted_decrypted,media/cd-rw_unmounted,media/cd-rw_unmounted_decrypted,media/nfs_unmounted,media/removable_mounted,media/removable_mounted_decrypted,media/dvd_mounted,media/dvd_mounted_decrypted,media/removable_unmounted,media/removable_unmounted_decrypted,media/dvd_unmounted,media/dvd_unmounted_decrypted,media/smb_mounted,media/dvdvideo,media/smb_unmounted,media/floppy5_mounted,media/floppy5_unmounted,media/floppy_mounted,media/zip_mounted,media/floppy_unmounted,media/zip_unmounted,media/camera_mounted,media/camera_unmounted diff --git a/tdeioslave/media/services/media_eject.desktop b/tdeioslave/media/services/media_eject.desktop index 067bd7656..1ecea21ce 100644 --- a/tdeioslave/media/services/media_eject.desktop +++ b/tdeioslave/media/services/media_eject.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -X-TDE-ServiceTypes=media/cdrom_mounted,media/cdrom_unmounted,media/cdrom_mounted_decrypted,media/cdrom_unmounted_decrypted,media/cdrom_unmounted_encrypted,media/cdwriter_mounted,media/cdwriter_unmounted,media/cdwriter_mounted_decrypted,media/cdwriter_unmounted_decrypted,media/cdwriter_unmounted_encrypted,media/dvd_mounted,media/dvd_unmounted,media/dvd_mounted_decrypted,media/dvd_unmounted_decrypted,media/dvd_unmounted_encrypted,media/audiocd,media/blankcd,media/blankdvd,media/dvdvideo,media/svcd,media/vcd +X-TDE-ServiceTypes=media/cdrom_mounted,media/cdrom_unmounted,media/cdrom_mounted_decrypted,media/cdrom_unmounted_decrypted,media/cdrom_unmounted_encrypted,media/cd-r_mounted,media/cd-r_unmounted,media/cd-r_mounted_decrypted,media/cd-r_unmounted_decrypted,media/cd-r_unmounted_encrypted,media/cd-rw_mounted,media/cd-rw_unmounted,media/cd-rw_mounted_decrypted,media/cd-rw_unmounted_decrypted,media/cd-rw_unmounted_encrypted,media/dvd_mounted,media/dvd_unmounted,media/dvd_mounted_decrypted,media/dvd_unmounted_decrypted,media/dvd_unmounted_encrypted,media/audiocd,media/blankcd,media/blankdvd,media/dvdvideo,media/svcd,media/vcd Actions=MediaEject; X-TDE-Priority=TopLevel X-TDE-MediaNotifierHide=true diff --git a/tdeioslave/media/services/media_unmount.desktop b/tdeioslave/media/services/media_unmount.desktop index dd8914b4e..1f9d2423c 100644 --- a/tdeioslave/media/services/media_unmount.desktop +++ b/tdeioslave/media/services/media_unmount.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -X-TDE-ServiceTypes=media/removable_mounted,media/removable_mounted_decrypted,media/cdrom_mounted,media/cdrom_mounted_decrypted,media/cdwriter_mounted,media/cdwriter_mounted_decrypted,media/dvd_mounted,media/dvd_mounted_decrypted,media/floppy5_mounted,media/floppy_mounted,media/hdd_mounted,media/hdd_mounted_decrypted,media/nfs_mounted,media/smb_mounted,media/zip_mounted,media/vcd,media/svcd,media/dvdvideo +X-TDE-ServiceTypes=media/removable_mounted,media/removable_mounted_decrypted,media/cdrom_mounted,media/cdrom_mounted_decrypted,media/cd-r_mounted,media/cd-r_mounted_decrypted,media/cd-rw_mounted,media/cd-rw_mounted_decrypted,media/dvd_mounted,media/dvd_mounted_decrypted,media/floppy5_mounted,media/floppy_mounted,media/hdd_mounted,media/hdd_mounted_decrypted,media/nfs_mounted,media/smb_mounted,media/zip_mounted,media/vcd,media/svcd,media/dvdvideo Actions=MediaUnmount; X-TDE-Priority=TopLevel X-TDE-MediaNotifierHide=true diff --git a/tdeioslave/media/tdefile-plugin/tdefile_media.desktop b/tdeioslave/media/tdefile-plugin/tdefile_media.desktop index af5088b84..4b70c62e7 100644 --- a/tdeioslave/media/tdefile-plugin/tdefile_media.desktop +++ b/tdeioslave/media/tdefile-plugin/tdefile_media.desktop @@ -72,4 +72,4 @@ Name[zh_CN]=介质信息 Name[zh_TW]=媒體資訊 X-TDE-ServiceTypes=KFilePlugin X-TDE-Library=tdefile_media -MimeType=media/audiocd;media/hdd_mounted;media/hdd_mounted_decrypted;media/blankcd;media/hdd_unmounted;media/hdd_unmounted_decrypted;media/blankdvd;media/cdrom_mounted;media/cdrom_mounted_decrypted;media/cdrom_unmounted;media/cdrom_unmounted_decrypted;media/cdwriter_mounted;media/cdwriter_mounted_decrypted;media/nfs_mounted;media/cdwriter_unmounted;media/cdwriter_unmounted_decrypted;media/nfs_unmounted;media/removable_mounted;media/removable_mounted_decrypted;media/dvd_mounted;media/dvd_mounted_decrypted;media/removable_unmounted;media/removable_unmounted_decrypted;media/dvd_unmounted;media/dvd_unmounted_decrypted;media/smb_mounted;media/dvdvideo;media/smb_unmounted;media/floppy5_mounted;media/svcd;media/floppy5_unmounted;media/vcd;media/floppy_mounted;media/zip_mounted;media/floppy_unmounted;media/zip_unmounted;media/gphoto2camera;media/camera_mounted;media/camera_unmounted +MimeType=media/audiocd;media/hdd_mounted;media/hdd_mounted_decrypted;media/blankcd;media/hdd_unmounted;media/hdd_unmounted_decrypted;media/blankdvd;media/cdrom_mounted;media/cdrom_mounted_decrypted;media/cdrom_unmounted;media/cdrom_unmounted_decrypted;media/cd-r_mounted;media/cd-r_mounted_decrypted;media/cd-rw_mounted;media/cd-rw_mounted_decrypted;media/nfs_mounted;media/cd-r_unmounted;media/cd-r_unmounted_decrypted;media/cd-rw_unmounted;media/cd-rw_unmounted_decrypted;media/nfs_unmounted;media/removable_mounted;media/removable_mounted_decrypted;media/dvd_mounted;media/dvd_mounted_decrypted;media/removable_unmounted;media/removable_unmounted_decrypted;media/dvd_unmounted;media/dvd_unmounted_decrypted;media/smb_mounted;media/dvdvideo;media/smb_unmounted;media/floppy5_mounted;media/svcd;media/floppy5_unmounted;media/vcd;media/floppy_mounted;media/zip_mounted;media/floppy_unmounted;media/zip_unmounted;media/gphoto2camera;media/camera_mounted;media/camera_unmounted diff --git a/tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp b/tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp index 61c5ccbbd..3d6c16cf3 100644 --- a/tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp +++ b/tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp @@ -59,11 +59,15 @@ KFileMediaPlugin::KFileMediaPlugin(TQObject *parent, const char *name, addMimeType( "media/cdrom_mounted_decrypted" ); addMimeType( "media/cdrom_unmounted" ); addMimeType( "media/cdrom_unmounted_decrypted" ); - addMimeType( "media/cdwriter_mounted" ); - addMimeType( "media/cdwriter_mounted_decrypted" ); + addMimeType( "media/cd-r_mounted" ); + addMimeType( "media/cd-r_mounted_decrypted" ); + addMimeType( "media/cd-rw_mounted" ); + addMimeType( "media/cd-rw_mounted_decrypted" ); addMimeType( "media/nfs_mounted" ); - addMimeType( "media/cdwriter_unmounted" ); - addMimeType( "media/cdwriter_unmounted_decrypted" ); + addMimeType( "media/cd-r_unmounted" ); + addMimeType( "media/cd-r_unmounted_decrypted" ); + addMimeType( "media/cd-rw_unmounted" ); + addMimeType( "media/cd-rw_unmounted_decrypted" ); addMimeType( "media/nfs_unmounted" ); addMimeType( "media/removable_mounted" ); addMimeType( "media/removable_mounted_decrypted" ); |