-rw-r--r-- | kmicromail/accountview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index 3ad3e9b..e9be224 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp | |||
@@ -84,66 +84,69 @@ void AccountView::populate( QList<Account> list ) | |||
84 | /* must not be hold 'cause it isn't required */ | 84 | /* must not be hold 'cause it isn't required */ |
85 | (void) new NNTPviewItem( nntp, this ); | 85 | (void) new NNTPviewItem( nntp, this ); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | void AccountView::refresh(QListViewItem *item) | 90 | void AccountView::refresh(QListViewItem *item) |
91 | { | 91 | { |
92 | if ( item ) | 92 | if ( item ) |
93 | { | 93 | { |
94 | m_currentItem = item; | 94 | m_currentItem = item; |
95 | QValueList<RecMailP> headerlist; | 95 | QValueList<RecMailP> headerlist; |
96 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 96 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
97 | view->refresh(headerlist); | 97 | view->refresh(headerlist); |
98 | emit refreshMailview(headerlist); | 98 | emit refreshMailview(headerlist); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | void AccountView::refreshOutgoing() | 101 | void AccountView::refreshOutgoing() |
102 | { | 102 | { |
103 | m_currentItem = currentItem(); | 103 | m_currentItem = currentItem(); |
104 | if ( !m_currentItem ) return; | 104 | if ( !m_currentItem ) return; |
105 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); | 105 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); |
106 | QString bName = view->getFolder()->getDisplayName(); | 106 | QString bName = view->getFolder()->getDisplayName(); |
107 | if (bName.startsWith("/")&&bName.length()>1) | 107 | if (bName.startsWith("/")&&bName.length()>1) |
108 | { | 108 | { |
109 | bName.replace(0,1,""); | 109 | bName.replace(0,1,""); |
110 | } | 110 | } |
111 | int pos = bName.findRev("/"); | 111 | int pos = bName.findRev("/"); |
112 | if (pos > 0) | 112 | if (pos > 0) |
113 | { | 113 | { |
114 | bName.replace(0,pos+1,""); | 114 | bName.replace(0,pos+1,""); |
115 | } | 115 | } |
116 | if ( bName.lower() == "outgoing" ) | 116 | //qDebug("name *%s* ",bName.lower().latin1() ); |
117 | if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) { | ||
117 | refreshCurrent(); | 118 | refreshCurrent(); |
119 | // qDebug("refresh "); | ||
120 | } | ||
118 | } | 121 | } |
119 | 122 | ||
120 | void AccountView::refreshCurrent() | 123 | void AccountView::refreshCurrent() |
121 | { | 124 | { |
122 | m_currentItem = currentItem(); | 125 | m_currentItem = currentItem(); |
123 | if ( !m_currentItem ) return; | 126 | if ( !m_currentItem ) return; |
124 | QValueList<RecMailP> headerlist; | 127 | QValueList<RecMailP> headerlist; |
125 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); | 128 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); |
126 | view->refresh(headerlist); | 129 | view->refresh(headerlist); |
127 | emit refreshMailview(headerlist); | 130 | emit refreshMailview(headerlist); |
128 | } | 131 | } |
129 | 132 | ||
130 | void AccountView::refreshAll() | 133 | void AccountView::refreshAll() |
131 | { | 134 | { |
132 | } | 135 | } |
133 | 136 | ||
134 | RecBodyP AccountView::fetchBody(const RecMailP&aMail) | 137 | RecBodyP AccountView::fetchBody(const RecMailP&aMail) |
135 | { | 138 | { |
136 | QListViewItem*item = selectedItem (); | 139 | QListViewItem*item = selectedItem (); |
137 | if (!item) return new RecBody(); | 140 | if (!item) return new RecBody(); |
138 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 141 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
139 | return view->fetchBody(aMail); | 142 | return view->fetchBody(aMail); |
140 | } | 143 | } |
141 | 144 | ||
142 | void AccountView::setupFolderselect(Selectstore*sels) | 145 | void AccountView::setupFolderselect(Selectstore*sels) |
143 | { | 146 | { |
144 | 147 | ||
145 | #ifndef DESKTOP_VERSION | 148 | #ifndef DESKTOP_VERSION |
146 | sels->showMaximized(); | 149 | sels->showMaximized(); |
147 | #else | 150 | #else |
148 | sels->show(); | 151 | sels->show(); |
149 | #endif | 152 | #endif |