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

List:       kde-commits
Subject:    KDE/kdelibs/nepomuk/ui
From:       Peter Penz <peter.penz19 () gmail ! com>
Date:       2010-07-05 16:10:38
Message-ID: 20100705161038.580A0AC7E2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1146274 by ppenz:

Forwardport of SVN commit 1146268: Show a "-" as content in the read-only mode, if no \
tag is stored at all.


 M  +9 -2      tagwidget.cpp  


--- trunk/KDE/kdelibs/nepomuk/ui/tagwidget.cpp #1146273:1146274
@@ -94,9 +94,17 @@
     m_showAllLinkLabel = 0;
 
     if( m_flags & TagWidget::MiniMode ) {
-        if( !(m_flags&TagWidget::ReadOnly) ) {
+        m_showAllButton->hide();
+        if ( (m_flags&TagWidget::ReadOnly) && !tags.isEmpty() ) {
+            return;
+        }
+        
             m_showAllLinkLabel = new QLabel( q );
             m_flowLayout->addWidget( m_showAllLinkLabel );
+        if( m_flags&TagWidget::ReadOnly ) {
+            m_showAllLinkLabel->setText("-");
+        }
+        else {
             QFont f(q->font());
             f.setUnderline(true);
             m_showAllLinkLabel->setFont(f);
@@ -104,7 +112,6 @@
                                          ( m_checkBoxHash.isEmpty() ? \
i18nc("@label", "Add Tags...") : i18nc("@label", "Change...") ) +  \
                QLatin1String("</a>") );
             q->connect( m_showAllLinkLabel, SIGNAL(linkActivated(QString)), \
                SLOT(slotShowAll()) );
-            m_showAllButton->hide();
         }
     }
     else {


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

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