[pkg-kde-commits] rev 2803 - trunk/packages/kdeaddons/debian/patches
Isaac Clerencia
isaac at costa.debian.org
Mon Jan 9 07:54:17 UTC 2006
Author: isaac
Date: 2006-01-09 07:54:16 +0000 (Mon, 09 Jan 2006)
New Revision: 2803
Added:
trunk/packages/kdeaddons/debian/patches/01_kdeaddons_branch_r495863.diff
Log:
New branch pull for kdeaddons (no buildprep regeneration required)
Added: trunk/packages/kdeaddons/debian/patches/01_kdeaddons_branch_r495863.diff
===================================================================
--- trunk/packages/kdeaddons/debian/patches/01_kdeaddons_branch_r495863.diff 2006-01-08 13:46:32 UTC (rev 2802)
+++ trunk/packages/kdeaddons/debian/patches/01_kdeaddons_branch_r495863.diff 2006-01-09 07:54:16 UTC (rev 2803)
@@ -0,0 +1,227 @@
+#DPATCHLEVEL=0
+--- kate/textfilter/plugin_katetextfilter.cpp (revision 492085)
++++ kate/textfilter/plugin_katetextfilter.cpp (revision 495863)
+@@ -188,7 +188,8 @@
+
+ // TODO: got a better idea?
+
+- while (len--) m_strFilterOutput += *got++;
++// while (len--) m_strFilterOutput += *got++;
++ m_strFilterOutput += QString::fromLocal8Bit( got, len );
+ // POP_(m_strFilterOutput);
+ }
+
+--- konq-plugins/dirfilter/dirfilterplugin.cpp (revision 492085)
++++ konq-plugins/dirfilter/dirfilterplugin.cpp (revision 495863)
+@@ -71,7 +71,7 @@
+ m_self = 0;
+ }
+
+-QString SessionManager::generateKey (const KURL& url)
++QString SessionManager::generateKey (const KURL& url) const
+ {
+ QString key;
+
+@@ -91,14 +91,16 @@
+ return key;
+ }
+
+-QStringList SessionManager::restore (const KURL& url)
++QStringList SessionManager::restoreMimeFilters (const KURL& url) const
+ {
+- QString key = generateKey (url);
++ QString key(generateKey(url));
++ return m_filters[key];
++}
+
+- if (m_filters.contains(key))
+- return m_filters[key];
+- else
+- return QStringList ();
++QString SessionManager::restoreTypedFilter (const KURL& url) const
++{
++ QString key(generateKey(url));
++ return m_typedFilter[key];
+ }
+
+ void SessionManager::save (const KURL& url, const QStringList& filters)
+@@ -107,6 +109,12 @@
+ m_filters[key] = filters;
+ }
+
++void SessionManager::save (const KURL& url, const QString& typedFilter)
++{
++ QString key = generateKey(url);
++ m_typedFilter[key] = typedFilter;
++}
++
+ void SessionManager::saveSettings()
+ {
+ KConfig cfg ("dirfilterrc", false, false);
+@@ -134,8 +142,10 @@
+
+
+ DirFilterPlugin::DirFilterPlugin (QObject* parent, const char* name,
+- const QStringList &)
+- :KParts::Plugin (parent, name), m_pFilterMenu(0)
++ const QStringList&)
++ :KParts::Plugin (parent, name),
++ m_pFilterMenu(0),
++ m_searchWidget(0)
+ {
+ m_part = ::qt_cast<KonqDirPart*>(parent);
+
+@@ -168,22 +178,22 @@
+
+ clear->setWhatsThis(i18n("Clear filter field<p>Clears the content of the filter field."));
+
+- QWidget *search = 0;
+- if ( m_part->scrollWidget()->inherits("QIconView") )
++ if ( ::qt_cast<KListView*>(m_part->scrollWidget()) )
+ {
+- search = new KIconViewSearchLine(hbox);
+- static_cast<KIconViewSearchLine*>(search)->setIconView(static_cast<QIconView*>(m_part->scrollWidget()));
++ m_searchWidget = new KListViewSearchLine(hbox);
++ static_cast<KListViewSearchLine*>(m_searchWidget)->setListView(static_cast<KListView*>(m_part->scrollWidget()));
+ }
+- else if ( m_part->scrollWidget()->inherits("KListView") )
++ else if ( ::qt_cast<QIconView*>(m_part->scrollWidget()) )
+ {
+- search = new KListViewSearchLine(hbox);
+- static_cast<KListViewSearchLine*>(search)->setListView(static_cast<KListView*>(m_part->scrollWidget()));
++ m_searchWidget = new KIconViewSearchLine(hbox);
++ static_cast<KIconViewSearchLine*>(m_searchWidget)->setIconView(static_cast<QIconView*>(m_part->scrollWidget()));
+ }
+
+- if ( search )
++
++ if ( m_searchWidget )
+ {
+- QWhatsThis::add(search, i18n("Enter here a text which an item in the view must contain anywhere to be shown."));
+- connect(clear, SIGNAL(activated()), search, SLOT(clear()));
++ QWhatsThis::add(m_searchWidget, i18n("Enter here a text which an item in the view must contain anywhere to be shown."));
++ connect(clear, SIGNAL(activated()), m_searchWidget, SLOT(clear()));
+ }
+
+ KWidgetAction *filterAction = new KWidgetAction(hbox, i18n("Filter Field"),
+@@ -205,9 +215,20 @@
+
+ if (m_pURL != url)
+ {
++ //Clears the hidden list which is by now outdated...
++ if (m_searchWidget)
++ {
++ SessionManager::self()->save(m_pURL, m_searchWidget->text());
++ m_searchWidget->clear();
++
++ QString typedFilter(SessionManager::self()->restoreTypedFilter(url));
++ m_searchWidget->completionObject()->addItem(typedFilter);
++ m_searchWidget->setText(typedFilter);
++ }
++
+ m_pURL = url;
+ m_pMimeInfo.clear();
+- m_part->setMimeFilter (SessionManager::self()->restore(url));
++ m_part->setMimeFilter (SessionManager::self()->restoreMimeFilters(url));
+ }
+ }
+
+@@ -228,7 +249,9 @@
+ m_pFilterMenu->popupMenu()->clear();
+ m_pFilterMenu->popupMenu()->insertTitle (i18n("Only Show Items of Type"));
+
+- for (MimeInfoIterator it = m_pMimeInfo.begin(); it != m_pMimeInfo.end() ; ++it)
++ MimeInfoIterator it = m_pMimeInfo.begin();
++ MimeInfoIterator end = m_pMimeInfo.end();
++ for (; it != end ; ++it)
+ {
+ if (it.key().startsWith("inode"))
+ {
+@@ -262,7 +285,10 @@
+ {
+ m_pFilterMenu->popupMenu()->insertSeparator ();
+
+- for (QStringList::Iterator it = inodes.begin(); it != inodes.end(); ++it)
++ QStringList::Iterator it = inodes.begin();
++ QStringList::Iterator end = inodes.end();
++
++ for (; it != end; ++it)
+ {
+ if (!SessionManager::self()->showCount)
+ label = m_pMimeInfo[(*it)].mimeComment;
+@@ -433,8 +459,8 @@
+ KURL url = m_part->url();
+
+ m_part->setMimeFilter (filters);
++ SessionManager::self()->save (url, filters);
+ m_part->openURL (url);
+- SessionManager::self()->save (m_part->url(), filters);
+ }
+
+ void DirFilterPlugin::slotShowCount()
+--- konq-plugins/dirfilter/dirfilterplugin.h (revision 492085)
++++ konq-plugins/dirfilter/dirfilterplugin.h (revision 495863)
+@@ -22,6 +22,7 @@
+ #include <qmap.h>
+ #include <qstringlist.h>
+
++
+ #include <kurl.h>
+ #include <kfileitem.h>
+ #include <klibloader.h>
+@@ -29,7 +30,9 @@
+
+ class KActionMenu;
+ class KonqDirPart;
++class KLineEdit;
+
++
+ namespace KParts
+ {
+ struct URLArgs;
+@@ -46,15 +49,17 @@
+
+ ~SessionManager ();
+ static SessionManager* self ();
+- QStringList restore (const KURL& url);
++ QStringList restoreMimeFilters (const KURL& url) const;
++ QString restoreTypedFilter(const KURL& url) const;
+ void save (const KURL& url, const QStringList& filters);
++ void save (const KURL& url, const QString& typedFilter);
+
+ bool showCount;
+ bool useMultipleFilters;
+
+ protected:
+
+- QString generateKey (const KURL& url);
++ QString generateKey (const KURL& url) const;
+ void loadSettings ();
+ void saveSettings ();
+
+@@ -68,6 +73,7 @@
+ bool m_bSettingsLoaded;
+ static SessionManager* m_self;
+ QMap<QString,QStringList> m_filters;
++ QMap<QString,QString> m_typedFilter;
+ };
+
+
+@@ -119,6 +125,7 @@
+ KonqDirPart* m_part;
+ KActionMenu* m_pFilterMenu;
+
++ KLineEdit *m_searchWidget;
+ QMap<QString,MimeInfo> m_pMimeInfo;
+ typedef QMap<QString,MimeInfo>::Iterator MimeInfoIterator;
+ };
+--- kicker-applets/ktimemon/sample.cc (revision 492085)
++++ kicker-applets/ktimemon/sample.cc (revision 495863)
+@@ -416,6 +416,7 @@
+
+ #else
+ #warning This type of system is not supported
++ sample.stotal = sample.sfree = 0;
+ #endif
+
+ sample.cputotal = sample.user + sample.nice + sample.kernel + sample.idle;
More information about the pkg-kde-commits
mailing list