-rw-r--r-- | core/pim/todo/tableview.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index cec8b5e..ae27fab 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp | |||
@@ -55,6 +55,10 @@ void TableView::initConfig() { | |||
55 | Config config( "todo" ); | 55 | Config config( "todo" ); |
56 | config.setGroup( "Options" ); | 56 | config.setGroup( "Options" ); |
57 | m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 ); | 57 | m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 ); |
58 | for (int i = 0; i < numCols(); i++ ) { | ||
59 | int width = config.readNumEntry("Width"+QString::number(i), -1 ); | ||
60 | setColumnWidth(i, width == -1 ? columnWidth(i) : width ); | ||
61 | } | ||
58 | } | 62 | } |
59 | 63 | ||
60 | TableView::TableView( MainWindow* window, QWidget* wid ) | 64 | TableView::TableView( MainWindow* window, QWidget* wid ) |
@@ -103,6 +107,10 @@ TableView::TableView( MainWindow* window, QWidget* wid ) | |||
103 | connect( m_menuTimer, SIGNAL(timeout()), | 107 | connect( m_menuTimer, SIGNAL(timeout()), |
104 | this, SLOT(slotShowMenu()) ); | 108 | this, SLOT(slotShowMenu()) ); |
105 | 109 | ||
110 | /* now let's init the config */ | ||
111 | initConfig(); | ||
112 | |||
113 | |||
106 | m_enablePaint = true; | 114 | m_enablePaint = true; |
107 | setUpdatesEnabled( true ); | 115 | setUpdatesEnabled( true ); |
108 | viewport()->setUpdatesEnabled( true ); | 116 | viewport()->setUpdatesEnabled( true ); |
@@ -111,8 +119,7 @@ TableView::TableView( MainWindow* window, QWidget* wid ) | |||
111 | setAscending( TRUE ); | 119 | setAscending( TRUE ); |
112 | m_first = true; | 120 | m_first = true; |
113 | 121 | ||
114 | /* now let's init the config */ | 122 | |
115 | initConfig(); | ||
116 | } | 123 | } |
117 | /* a new day has started | 124 | /* a new day has started |
118 | * update the day | 125 | * update the day |
@@ -122,7 +129,10 @@ void TableView::newDay() { | |||
122 | updateView(); | 129 | updateView(); |
123 | } | 130 | } |
124 | TableView::~TableView() { | 131 | TableView::~TableView() { |
125 | 132 | Config config( "todo" ); | |
133 | config.setGroup( "Options" ); | ||
134 | for (int i = 0; i < numCols(); i++ ) | ||
135 | config.writeEntry("Width"+QString::number(i), columnWidth(i) ); | ||
126 | } | 136 | } |
127 | void TableView::slotShowMenu() { | 137 | void TableView::slotShowMenu() { |
128 | QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() ); | 138 | QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() ); |