summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp8
-rw-r--r--noncore/settings/appearance2/exceptlistitem.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index 22b12b4..f611799 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -286,6 +286,7 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
286 m_except-> header ( )-> setClickEnabled ( false ); 286 m_except-> header ( )-> setClickEnabled ( false );
287 m_except-> header ( )-> setResizeEnabled ( false ); 287 m_except-> header ( )-> setResizeEnabled ( false );
288 m_except-> header ( )-> setMovingEnabled ( false ); 288 m_except-> header ( )-> setMovingEnabled ( false );
289 m_except-> setSorting ( -1 );
289 lay-> addMultiCellWidget ( m_except, 2, 6, 0, 0 ); 290 lay-> addMultiCellWidget ( m_except, 2, 6, 0, 0 );
290 291
291 connect ( m_except, SIGNAL( clicked ( QListViewItem *, const QPoint &, int )), this, SLOT( clickedExcept ( QListViewItem *, const QPoint &, int ))); 292 connect ( m_except, SIGNAL( clicked ( QListViewItem *, const QPoint &, int )), this, SLOT( clickedExcept ( QListViewItem *, const QPoint &, int )));
@@ -318,10 +319,11 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
318 lay-> setColStretch ( 0, 10 ); 319 lay-> setColStretch ( 0, 10 );
319 320
320 QStringList sl = cfg. readListEntry ( "NoStyle", ';' ); 321 QStringList sl = cfg. readListEntry ( "NoStyle", ';' );
322 QListViewItem *lvit = 0;
321 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) { 323 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) {
322 int fl = ( *it ). left ( 1 ). toInt ( 0, 32 ); 324 int fl = ( *it ). left ( 1 ). toInt ( 0, 32 );
323 325
324 new ExceptListItem ( m_except, ( *it ). mid ( 1 ), fl & 0x01, fl & 0x02, fl & 0x04 ); 326 lvit = new ExceptListItem ( m_except, lvit, ( *it ). mid ( 1 ), fl & 0x01, fl & 0x02, fl & 0x04 );
325 } 327 }
326 328
327 329
@@ -455,6 +457,8 @@ void Appearance::accept ( )
455 } 457 }
456 458
457 459
460 m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated
461
458 QStringList sl; 462 QStringList sl;
459 for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) { 463 for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) {
460 int fl = 0; 464 int fl = 0;
@@ -652,7 +656,7 @@ void Appearance::deleteSchemeClicked()
652 656
653void Appearance::addExcept ( ) 657void Appearance::addExcept ( )
654{ 658{
655 ExceptListItem *it = new ExceptListItem ( m_except, tr( "<new>" ), true, true, true ); 659 ExceptListItem *it = new ExceptListItem ( m_except, 0, tr( "<new>" ), true, true, true );
656 m_except-> ensureItemVisible ( it ); 660 m_except-> ensureItemVisible ( it );
657 m_except-> setSelected ( it, true ); 661 m_except-> setSelected ( it, true );
658} 662}
diff --git a/noncore/settings/appearance2/exceptlistitem.h b/noncore/settings/appearance2/exceptlistitem.h
index 5eda79c..7b4fa48 100644
--- a/noncore/settings/appearance2/exceptlistitem.h
+++ b/noncore/settings/appearance2/exceptlistitem.h
@@ -35,7 +35,7 @@
35 35
36class ExceptListItem : public QListViewItem { 36class ExceptListItem : public QListViewItem {
37public: 37public:
38 ExceptListItem ( QListView *lv, const QString &t, bool nostyle = true, bool nofont = true, bool nodeco = true ) : QListViewItem ( lv ) 38 ExceptListItem ( QListView *lv, QListViewItem *after, const QString &t, bool nostyle = true, bool nofont = true, bool nodeco = true ) : QListViewItem ( lv, after )
39 { 39 {
40 m_text = t; 40 m_text = t;
41 41