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

List:       kde-commits
Subject:    kdelibs/kdeui
From:       Stephan Kulow <coolo () kde ! org>
Date:       2003-09-14 11:57:58
[Download RAW message or body]

CVS commit by coolo: 

Patch by Adrian Page to not clear on every changeItem (read the bug report
for more details)
CCMAIL: 62876-close@bugs.kde.org


  M +16 -2     kstatusbar.cpp   1.45


--- kdelibs/kdeui/kstatusbar.cpp  #1.44:1.45
@@ -60,4 +60,11 @@ void KStatusBarLabel::mouseReleaseEvent 
 }
 
+class KStatusBarPrivate
+{
+  public:
+
+    // KDE 4.0: Move into KStatusBarLabel
+    QMap<int, bool> is_permanent_item;
+};
 
 KStatusBar::KStatusBar( QWidget *parent, const char *name )
@@ -72,8 +79,10 @@ KStatusBar::KStatusBar( QWidget *parent,
   setSizeGripEnabled(grip_enabled);
   config->setGroup(group);
+  d = new KStatusBarPrivate;
 }
 
 KStatusBar::~KStatusBar ()
 {
+  delete d;
 }
 
@@ -83,4 +92,5 @@ void KStatusBar::insertItem( const QStri
   l->setFixedHeight(fontMetrics().height()+2);
   items.insert(id, l);
+  d->is_permanent_item.insert(id, permanent);
   addWidget (l, stretch, permanent);
   l->show();
@@ -94,4 +104,5 @@ void KStatusBar::removeItem (int id)
     removeWidget (l);
     items.remove(id);
+    d->is_permanent_item.remove(id);
     delete l;
   }
@@ -105,5 +116,8 @@ void KStatusBar::changeItem( const QStri
   if (l)
   {
+    if(!d->is_permanent_item[id])
+    {
     clear();
+    }
     l->setText(text);
     reformat();


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

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