[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCHes] Retreival of meta data, and previews
From: Craig Drummond <Craig.Drummond () gmx ! net>
Date: 2003-05-09 12:07:11
[Download RAW message or body]
This is a MIME encapsulated multipart message -
please use a MIME-compliant e-mail program to open it.
Dies ist eine mehrteilige Nachricht im MIME-Format -
bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm.
Hi,
I've noticed that the retreival of meta-data is not very consistent. For
example, it only works on the file:/ protocol for tooltips - but right-clicking
and selecting "properties" retreives the meta-data over other protocols. I've
attatched a few patches to try and resolve this.
previews.cpp.diff, browser.cpp.diff, filepreviews.desktop.diff all relate to
kdebase/kcontrol/konq. The main change is to make the "Previews" setting
also affect meta-data - this is onlly a comsetic string change.
kfileitem.cpp.diff is from kdelibs/kio/kio. Causes meta-data to be returned
only if enabled.
kmetaprops.cpp.diff relates to kdelibs/kio/kfile. This disables the
meta-data section of the properties dialog if it is not enable for the protocol.
konq_iconviewwidget.cc.diff is from kdebase/libkonq. This disables previews
in tooltips if not enabled for the protocol.
The only thing left is to disable the "info list view" of konqueror - not
sure how to do this yet.
Should I apply these patches? Or is there a better, lower-level way of doing
this? I thought of modifying MetaInfoJob, etc - so that this would only work
for specified protocols. However, most of the above cases do not use this -
plus it may also affect other apps who with to use MataInfoJob to get
meta-data over other protocols.
Craig.
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lcheln! Fotogalerie online mit GMX ohne eigene Homepage!
["browser.cpp.diff" (application/octet-stream)]
--- browser.cpp-orig 2003-05-09 12:37:24.000000000 +0100
+++ browser.cpp 2003-05-09 12:40:39.000000000 +0100
@@ -113,7 +113,7 @@
tab->addTab(appearance, i18n("&Appearance"));
tab->addTab(behavior, i18n("&Behavior"));
- tab->addTab(previews, i18n("&Previews"));
+ tab->addTab(previews, i18n("&Previews && Meta-data"));
if (kuick)
{
kuick->layout()->setMargin( KDialog::marginHint() );
["filepreviews.desktop.diff" (application/octet-stream)]
--- filepreviews.desktop-orig 2003-05-09 12:41:09.000000000 +0100
+++ filepreviews.desktop 2003-05-09 12:41:29.000000000 +0100
@@ -10,7 +10,7 @@
X-KDE-FactoryName=previews
X-KDE-ParentApp=kcontrol
-Name=Previews
+Name=Previews & Meta-data
Name[af]=Voorskoue
Name[be]=Прагляды
Name[bg]=Предварителен преглед
@@ -55,7 +55,7 @@
Name[zh_TW]= 覽
Name[zu]=Imibukiso yangaphambili
-Comment=You can configure how Konqueror Previews work here
+Comment=You can configure how Konqueror Previews & Meta-data work here
Comment[af]=Jy kan konfigureer hoe Konqueror Voorskoue werk hier
Comment[bg]=Тук може да зададете как Konqueror ще \
показва предварителен преглед Comment[bs]=Ovdje možete \
podesiti kako rade Pregledi u Konqueroru
["kfileitem.cpp.diff" (application/octet-stream)]
--- kfileitem.cpp-orig 2003-05-09 12:12:54.000000000 +0100
+++ kfileitem.cpp 2003-05-09 12:13:56.000000000 +0100
@@ -765,7 +765,8 @@
const KFileMetaInfo & KFileItem::metaInfo(bool autoget, int) const
{
- if ( autoget && m_url.isLocalFile() && !m_metaInfo.isValid() )
+ if ( autoget && !m_metaInfo.isValid() &&
+ KConfigGroup( KGlobal::config(), "PreviewSettings" ).readBoolEntry( m_url.protocol(), true ) )
{
m_metaInfo = KFileMetaInfo( m_url.path(), mimetype() );
}
["kmetaprops.cpp.diff" (application/octet-stream)]
--- kmetaprops.cpp-orig 2003-05-09 12:15:08.000000000 +0100
+++ kmetaprops.cpp 2003-05-09 12:15:41.000000000 +0100
@@ -243,8 +243,9 @@
#ifdef _GNUC
#warning TODO: Add support for more than one item
#endif
- if (_items.count()!=1) return false;
- return true;
+ return _items.count()==1 && KConfigGroup( KGlobal::config(), "PreviewSettings" \
).readBoolEntry( _items.first()->url().protocol(), true ) + ? true
+ : false;
}
void KFileMetaPropsPlugin::applyChanges()
["konq_iconviewwidget.cc.diff" (application/octet-stream)]
--- konq_iconviewwidget.cc-orig 2003-05-09 12:45:30.000000000 +0100
+++ konq_iconviewwidget.cc 2003-05-09 12:47:14.000000000 +0100
@@ -77,10 +77,19 @@
hide();
}
+ void setPreview(bool on)
+ {
+ m_preview = on;
+ if(on)
+ m_iconLabel->show();
+ else
+ m_iconLabel->hide();
+ }
+
void setOptions( bool on, bool preview, int num)
{
m_num = num;
- m_preview = preview;
+ setPreview(preview);
m_on = on;
}
@@ -905,6 +914,9 @@
{
stopImagePreview();
m_url = kurl;
+
+ d->pFileTip->setPreview( KConfigGroup( KGlobal::config(), "PreviewSettings" \
).readBoolEntry( m_url.protocol(), true ) ); +
if ( m_url.isLocalFile() )
m_dotDirectoryPath = m_url.path(1).append( ".directory" );
else
["previews.cpp.diff" (application/octet-stream)]
--- previews.cpp-orig 2003-05-09 12:35:24.000000000 +0100
+++ previews.cpp 2003-05-09 12:36:54.000000000 +0100
@@ -45,7 +45,8 @@
{
QVBoxLayout *lay = new QVBoxLayout(this, 0, KDialog::spacingHint());
- lay->addWidget( new QLabel( i18n("Allow previews and \"Folder Icons Reflect \
Contents\" on protocols:"), this ) ); + lay->addWidget( new QLabel( i18n("<p>Allow \
previews, \"Folder Icons Reflect Contents\", and " + \
"retrieval of meta-data on protocols:</p>"), this ) );
QHBoxLayout *hbox = new QHBoxLayout(); // hbox to avoid a very wide scrollview
lay->addLayout( hbox );
@@ -76,8 +77,8 @@
}
}
QWhatsThis::add( scrollView,
- i18n("This option makes it possible to choose when the file \
previews "
- "and smart folder icons in the File Manager should be \
activated.\n" + i18n("This option makes it possible to choose \
when the file previews, " + "smart folder icons, and \
meta-data in the File Manager should be activated.\n"
"In the list of protocols that appear, select which ones \
are fast "
"enough for you to allow previews to be generated.") );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic