[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/base/nepomuk-kde/annotation/lib/gui
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-05-26 13:35:11
Message-ID: 20100526133511.133E8AC8C0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1130816 by trueg:

Also take into account the pimo thing's label. This will be done by Resource soon.

 M  +10 -1     annotationmenu.cpp  


--- trunk/playground/base/nepomuk-kde/annotation/lib/gui/annotationmenu.cpp \
#1130815:1130816 @@ -582,6 +582,15 @@
 }
 
 
+namespace {
+    QString resourceLabel( Nepomuk::Resource resource ) {
+        QString label = resource.pimoThing().label();
+        if ( label.isEmpty() )
+            label = resource.genericLabel();
+        return label;
+    }
+}
+
 void Nepomuk::AnnotationMenu::Private::_k_menuAboutToShow()
 {
     emit q->aboutToBeConstructed( q );
@@ -593,7 +602,7 @@
 
         if ( !m_resources.isEmpty() ) {
             if ( m_resources.count() == 1 )
-                q->addTitle( KIcon( "nepomuk" ), i18nc( "@title menu title", \
"Annotate %1", m_resources.first().genericLabel() ) ); +                q->addTitle( \
KIcon( "nepomuk" ), i18nc( "@title menu title", "Annotate %1", resourceLabel( \
m_resources.first() ) ) );  else
                 q->addTitle( KIcon( "nepomuk" ), i18nc( "@title menu title", \
"Annotate resource" ) );  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic