Hello community,
here is the log from the commit of package kdelibs4
checked in at Mon Jan 28 01:11:50 CET 2008.
--------
--- KDE/kdelibs4/kdelibs4.changes 2008-01-24 14:56:11.000000000 +0100
+++ /mounts/work_src_done/STABLE/kdelibs4/kdelibs4.changes 2008-01-27 22:48:53.000000000 +0100
@@ -1,0 +2,5 @@
+Sun Jan 27 22:37:30 CET 2008 - stbinner@suse.de
+
+- add clever-menu.diff port
+
+-------------------------------------------------------------------
New:
----
clever-menu.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdelibs4.spec ++++++
--- /var/tmp/diff_new_pack.K13427/_old 2008-01-28 01:11:15.000000000 +0100
+++ /var/tmp/diff_new_pack.K13427/_new 2008-01-28 01:11:15.000000000 +0100
@@ -25,7 +25,7 @@
Summary: KDE Base Libraries
Url: http://www.kde.org
Version: 4.0
-Release: 7
+Release: 10
%define rversion 4.0.0
Requires: libqt4-x11 >= %( echo `rpm -q --queryformat '%{VERSION}' libqt4-x11`)
Requires: libstrigi0 >= %( echo `rpm -q --queryformat '%{VERSION}' strigi-devel`)
@@ -41,6 +41,7 @@
Patch2: default-useragent.diff
Patch3: common-symlink-fix.diff
Patch4: dotkde4.diff
+Patch5: clever-menu.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -64,6 +65,7 @@
# disabled because it causes stale symlinks
# %patch3
%patch4
+%patch5
#
# define KDE version exactly
#
@@ -336,6 +338,8 @@
%dir /usr/share/kde4/servicetypes
%changelog
+* Sun Jan 27 2008 stbinner@suse.de
+- add clever-menu.diff port
* Wed Jan 23 2008 stbinner@suse.de
- update 4_0_BRANCH.diff
- patch more places to use ~/.kde4
++++++ clever-menu.diff ++++++
Index: kdecore/services/kservicegroup_p.h
===================================================================
--- kdecore/services/kservicegroup_p.h (revision 767278)
+++ kdecore/services/kservicegroup_p.h (working copy)
@@ -31,7 +31,8 @@
KServiceGroupPrivate(const QString &path)
: KSycocaEntryPrivate(path),
- m_bNoDisplay(false), m_bShowEmptyMenu(false), m_bShowInlineHeader(false), m_bInlineAlias(false),
+ m_bNoDisplay(false), m_bShortMenu(false), m_bGeneralDescription(false),
+ m_bShowEmptyMenu(false), m_bShowInlineHeader(false), m_bInlineAlias(false),
m_bAllowInline(false), m_inlineValue(4), m_bDeep(false), m_childCount(-1)
{
}
@@ -58,6 +59,13 @@
KServiceGroup::List
entries(KServiceGroup *group, bool sort, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName);
+
+ /**
+ * UNOFFICIAL SuSE special
+ */
+ virtual KServiceGroup::List SuSEentries(KServiceGroup *group, bool sort, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName, bool excludeSuSEunimportant = true);
+ virtual KServiceGroup::List SuSEsortEntries( KServiceGroup *group, KSortableListKServiceGroup::SPtr,QByteArray slist, KSortableListKServiceGroup::SPtr,QByteArray glist, bool excludeNoDisplay, bool allowSeparators );
+
/**
* This function parse attributes into menu
*/
@@ -65,6 +73,8 @@
bool m_bNoDisplay : 1;
+ bool m_bShortMenu : 1;
+ bool m_bGeneralDescription : 1;
bool m_bShowEmptyMenu : 1;
bool m_bShowInlineHeader : 1;
bool m_bInlineAlias : 1;
Index: kdecore/services/kservice.h
===================================================================
--- kdecore/services/kservice.h (revision 767278)
+++ kdecore/services/kservice.h (working copy)
@@ -338,6 +338,12 @@
bool noDisplay() const;
/**
+ * check if the application entry is important
+ * SuSE special, not part of KDE API
+ */
+ bool SuSEunimportant() const;
+
+ /**
* Name of the application this service belongs to.
* (Useful for e.g. plugins)
* @return the parent application, or QString() if not set
Index: kdecore/services/kservicegroup.h
===================================================================
--- kdecore/services/kservicegroup.h (revision 767278)
+++ kdecore/services/kservicegroup.h (working copy)
@@ -22,6 +22,7 @@
#include
#include
#include
+#include
class KBuildServiceGroupFactory;
@@ -173,6 +174,12 @@
void setLayoutInfo(const QStringList &layout);
/**
+ * SuSE special, not part of KDE API
+ */
+ bool SuSEshortMenu() const;
+ bool SuSEgeneralDescription() const;
+
+ /**
* @internal
* Returns information related to the layout of services in this group.
*/
@@ -199,6 +206,12 @@
List entries(bool sorted = false);
/**
+ * UNOFFICIAL SuSE special
+ */
+ virtual KServiceGroup::List SuSEsortEntries( KSortableListKServiceGroup::SPtr,QByteArray slist, KSortableListKServiceGroup::SPtr,QByteArray glist, bool excludeNoDisplay, bool allowSeparators );
+
+
+ /**
* options for groupEntries and serviceEntries
*/
enum EntriesOption
Index: kdecore/services/kservice.cpp
===================================================================
--- kdecore/services/kservice.cpp (revision 767278)
+++ kdecore/services/kservice.cpp (working copy)
@@ -637,6 +637,12 @@
return v.isValid() ? v.toString() : QString();
}
+
+bool KService::SuSEunimportant() const {
+ QVariant v = property("X-SuSE-Unimportant", QVariant::Bool);
+ return v.isValid() && v.toBool();
+}
+
QString KService::parentApp() const {
Q_D(const KService);
QMap::ConstIterator it = d->m_mapProps.find( "X-KDE-ParentApp" );
Index: kdecore/services/kservicegroup.cpp
===================================================================
--- kdecore/services/kservicegroup.cpp (revision 767278)
+++ kdecore/services/kservicegroup.cpp (working copy)
@@ -30,8 +30,8 @@
#include
#include
#include
+#include <QDir>
-
KServiceGroup::KServiceGroup( const QString & name )
: KSycocaEntry(*new KServiceGroupPrivate(name))
{
@@ -62,6 +62,11 @@
m_strComment = config.readEntry( "Comment" );
deleted = config.readEntry("Hidden", false );
m_bNoDisplay = config.readEntry("NoDisplay", false );
+ if (directoryEntryPath.startsWith(QDir::homePath()))
+ m_bShortMenu = false;
+ else
+ m_bShortMenu = config.readEntry( "X-SuSE-AutoShortMenu", true );
+ m_bGeneralDescription = config.readEntry( "X-SuSE-GeneralDescription", false );
QStringList tmpList;
if (config.hasKey("OnlyShowIn"))
{
@@ -137,6 +142,10 @@
{
if (m_childCount == -1)
{
+ KConfig cfg("kdeglobals");
+ KConfigGroup global = cfg.group("KDE");
+ bool showUnimportant = global.readEntry("showUnimportant", false);
+
m_childCount = 0;
for( KServiceGroup::List::ConstIterator it = m_serviceList.begin();
@@ -147,7 +156,8 @@
{
KService::Ptr service = KService::Ptr::staticCast( p );
if (!service->noDisplay())
- m_childCount++;
+ if ( showUnimportant || !service->SuSEunimportant() )
+ m_childCount++;
}
else if (p->isType(KST_KServiceGroup))
{
@@ -232,6 +242,18 @@
return d->suppressGenericNames;
}
+bool KServiceGroup::SuSEgeneralDescription() const
+{
+ Q_D(const KServiceGroup);
+ return d->m_bGeneralDescription;
+}
+
+bool KServiceGroup::SuSEshortMenu() const
+{
+ Q_D(const KServiceGroup);
+ return d->m_bShortMenu;
+}
+
void KServiceGroupPrivate::load( QDataStream& s )
{
QStringList groupList;
@@ -240,16 +262,21 @@
qint8 inlineHeader;
qint8 _inlineAlias;
qint8 _allowInline;
+ qint8 _shortMenu;
+ qint8 _generalDescription;
s >> m_strCaption >> m_strIcon >>
m_strComment >> groupList >> m_strBaseGroupName >> m_childCount >>
noDisplay >> suppressGenericNames >> directoryEntryPath >>
- sortOrder >> _showEmptyMenu >> inlineHeader >> _inlineAlias >> _allowInline;
+ sortOrder >> _showEmptyMenu >> inlineHeader >> _inlineAlias >> _allowInline >>
+ _shortMenu >> _generalDescription;
m_bNoDisplay = (noDisplay != 0);
m_bShowEmptyMenu = ( _showEmptyMenu != 0 );
m_bShowInlineHeader = ( inlineHeader != 0 );
m_bInlineAlias = ( _inlineAlias != 0 );
m_bAllowInline = ( _allowInline != 0 );
+ m_bShortMenu = (_shortMenu != 0);
+ m_bGeneralDescription = (_generalDescription != 0);
if (m_bDeep)
{
@@ -313,10 +340,12 @@
qint8 inlineHeader = m_bShowInlineHeader ? 1 : 0;
qint8 _inlineAlias = m_bInlineAlias ? 1 : 0;
qint8 _allowInline = m_bAllowInline ? 1 : 0;
+ qint8 _shortMenu = m_bShortMenu ? 1 : 0;
s << m_strCaption << m_strIcon <<
m_strComment << groupList << m_strBaseGroupName << m_childCount <<
noDisplay << suppressGenericNames << directoryEntryPath <<
- sortOrder <<_showEmptyMenu <KServiceGroup::Ptr KServiceGroup::groupEntries(EntriesOptions options)
@@ -376,6 +405,13 @@
return d->entries(this, sort, excludeNoDisplay, allowSeparators, sortByGenericName);
}
+KServiceGroup::List
+KServiceGroup::SuSEsortEntries( KSortableListKServiceGroup::SPtr,QByteArray slist, KSortableListKServiceGroup::SPtr,QByteArray glist, bool excludeNoDisplay, bool allowSeparators )
+{
+ Q_D(KServiceGroup);
+ return d->SuSEsortEntries( this, slist, glist, excludeNoDisplay, allowSeparators );
+}
+
static void addItem(KServiceGroup::List &sorted, const KSycocaEntry::Ptr &p, bool &addSeparator)
{
if (addSeparator && !sorted.isEmpty())
@@ -387,6 +423,12 @@
KServiceGroup::List
KServiceGroupPrivate::entries(KServiceGroup *group, bool sort, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName)
{
+ return SuSEentries(group, sort, excludeNoDisplay, allowSeparators, sortByGenericName);
+}
+
+KServiceGroup::List
+KServiceGroupPrivate::SuSEentries(KServiceGroup *group, bool sort, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName, bool excludeSuSEunimportant)
+{
KServiceGroup::Ptr grp;
// If the entries haven't been loaded yet, we have to reload ourselves
@@ -413,11 +455,18 @@
for (KServiceGroup::List::ConstIterator it(group->d_func()->m_serviceList.begin()); it != group->d_func()->m_serviceList.end(); ++it)
{
KSycocaEntry::Ptr p = (*it);
+ if( !p->isType(KST_KServiceGroup) && !p->isType(KST_KService))
+ continue;
bool noDisplay = p->isType(KST_KServiceGroup) ?
static_cast(p.data())->noDisplay() :
static_cast(p.data())->noDisplay();
if (excludeNoDisplay && noDisplay)
continue;
+ bool SuSEunimportant = p->isType(KST_KService) &&
+ static_cast(p.data())->SuSEunimportant();
+ if (excludeSuSEunimportant && SuSEunimportant)
+ continue;
+
// Choose the right list
KSortableListKServiceGroup::SPtr,QByteArray & list = p->isType(KST_KServiceGroup) ? glist : slist;
QString name;
@@ -450,6 +499,12 @@
}
list.insert(key,KServiceGroup::SPtr(*it));
}
+ return SuSEsortEntries( group, slist, glist, excludeNoDisplay, allowSeparators );
+}
+
+KServiceGroup::List
+KServiceGroupPrivate::SuSEsortEntries( KServiceGroup *group, KSortableListKServiceGroup::SPtr,QByteArray slist, KSortableListKServiceGroup::SPtr,QByteArray glist, bool excludeNoDisplay, bool allowSeparators )
+{
// Now sort
slist.sort();
glist.sort();
@@ -491,6 +546,8 @@
// TODO: This prevents duplicates
for(KSortableListKServiceGroup::SPtr,QByteArray::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
{
+ if (!(*it2).value()->isType(KST_KService))
+ continue;
const KService::Ptr service = KService::Ptr::staticCast( (*it2).value() );
if (service->menuId() == item)
{
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org