-rw-r--r-- | korganizer/mainwindow.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 95bef66..87cef20 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -157,74 +157,77 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
157 | else { | 157 | else { |
158 | if ( p->mToolBarUp ) | 158 | if ( p->mToolBarUp ) |
159 | tbd = Right; | 159 | tbd = Right; |
160 | else | 160 | else |
161 | tbd = Left; | 161 | tbd = Left; |
162 | } | 162 | } |
163 | if ( KOPrefs::instance()->mUseAppColors ) | 163 | if ( KOPrefs::instance()->mUseAppColors ) |
164 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 164 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
165 | globalFlagBlockStartup = 1; | 165 | globalFlagBlockStartup = 1; |
166 | iconToolBar = new QPEToolBar( this ); | 166 | iconToolBar = new QPEToolBar( this ); |
167 | addToolBar (iconToolBar , tbd ); | 167 | addToolBar (iconToolBar , tbd ); |
168 | 168 | ||
169 | #ifdef DESKTOP_VERSION | 169 | #ifdef DESKTOP_VERSION |
170 | if ( KOPrefs::instance()->mShowIconFilter ) | 170 | if ( KOPrefs::instance()->mShowIconFilter ) |
171 | #else | 171 | #else |
172 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) | 172 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | { | 175 | { |
176 | if ( p->mToolBarHorF ) { | 176 | if ( p->mToolBarHorF ) { |
177 | if ( p->mToolBarUpF ) | 177 | if ( p->mToolBarUpF ) |
178 | tbd = Bottom; | 178 | tbd = Bottom; |
179 | else | 179 | else |
180 | tbd = Top; | 180 | tbd = Top; |
181 | } | 181 | } |
182 | else { | 182 | else { |
183 | if ( p->mToolBarUpF ) | 183 | if ( p->mToolBarUpF ) |
184 | tbd = Right; | 184 | tbd = Right; |
185 | else | 185 | else |
186 | tbd = Left; | 186 | tbd = Left; |
187 | } | 187 | } |
188 | filterToolBar = new QPEToolBar ( this ); | 188 | filterToolBar = new QPEToolBar ( this ); |
189 | filterMenubar = new QPEMenuBar( filterToolBar ); | 189 | filterMenubar = new QMenuBar( filterToolBar ); |
190 | QFontMetrics fm ( filterMenubar->font() ); | 190 | QFontMetrics fm ( filterMenubar->font() ); |
191 | 191 | ||
192 | filterPopupMenu = new QPopupMenu( this ); | 192 | filterPopupMenu = new QPopupMenu( this ); |
193 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 193 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
194 | QString addTest = "Ax"; | 194 | QString addTest = "A"; |
195 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | ||
195 | #ifdef DESKTOP_VERSION | 196 | #ifdef DESKTOP_VERSION |
196 | addTest = "AAAx"; | 197 | addTest = "AAABBBCCCx"; |
198 | #else | ||
199 | addTest = "AAx"; | ||
197 | #endif | 200 | #endif |
198 | filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+addTest ) ); | 201 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); |
199 | addToolBar (filterToolBar , tbd ); | 202 | addToolBar (filterToolBar , tbd ); |
200 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 203 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
201 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 204 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
202 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) | 205 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) |
203 | filterToolBar->hide(); | 206 | filterToolBar->hide(); |
204 | } else { | 207 | } else { |
205 | filterToolBar = 0; | 208 | filterToolBar = 0; |
206 | filterMenubar = 0; | 209 | filterMenubar = 0; |
207 | filterPopupMenu = 0; | 210 | filterPopupMenu = 0; |
208 | } | 211 | } |
209 | if ( p->mShowIconOnetoolbar ) { | 212 | if ( p->mShowIconOnetoolbar ) { |
210 | viewToolBar = iconToolBar ; | 213 | viewToolBar = iconToolBar ; |
211 | navigatorToolBar = iconToolBar ; | 214 | navigatorToolBar = iconToolBar ; |
212 | } else { | 215 | } else { |
213 | #ifndef DESKTOP_VERSION | 216 | #ifndef DESKTOP_VERSION |
214 | setToolBarsMovable( false ); | 217 | setToolBarsMovable( false ); |
215 | #endif | 218 | #endif |
216 | if ( p->mToolBarHorV ) { | 219 | if ( p->mToolBarHorV ) { |
217 | if ( p->mToolBarUpV ) | 220 | if ( p->mToolBarUpV ) |
218 | tbd = Bottom; | 221 | tbd = Bottom; |
219 | else | 222 | else |
220 | tbd = Top; | 223 | tbd = Top; |
221 | } | 224 | } |
222 | else { | 225 | else { |
223 | if ( p->mToolBarUpV ) | 226 | if ( p->mToolBarUpV ) |
224 | tbd = Right; | 227 | tbd = Right; |
225 | else | 228 | else |
226 | tbd = Left; | 229 | tbd = Left; |
227 | } | 230 | } |
228 | viewToolBar = new QPEToolBar( this ); | 231 | viewToolBar = new QPEToolBar( this ); |
229 | addToolBar (viewToolBar , tbd ); | 232 | addToolBar (viewToolBar , tbd ); |
230 | if ( p->mToolBarHorN ) { | 233 | if ( p->mToolBarHorN ) { |