Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 128 |
1 files changed, 84 insertions, 44 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index ece51a1..5eb065f 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp | |||
@@ -40,16 +40,17 @@ | |||
40 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) | 40 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) |
41 | 41 | ||
42 | PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | 42 | PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) |
43 | : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 ) | 43 | : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 ) |
44 | { | 44 | { |
45 | setCaption( QObject::tr("Opie Eye Caramba" ) ); | 45 | setCaption( QObject::tr("Opie Eye Caramba" ) ); |
46 | m_cfg = new Opie::Core::OConfig("opie-eye"); | 46 | m_cfg = new Opie::Core::OConfig("opie-eye"); |
47 | m_cfg->setGroup("main" ); | 47 | m_cfg->setGroup("main" ); |
48 | readConfig(); | ||
48 | 49 | ||
49 | m_storage = new StorageInfo(); | 50 | m_storage = new StorageInfo(); |
50 | connect(m_storage, SIGNAL(disksChanged() ), | 51 | connect(m_storage, SIGNAL(disksChanged() ), |
51 | this, SLOT( dirChanged() ) ); | 52 | this, SLOT( dirChanged() ) ); |
52 | 53 | ||
53 | m_stack = new Opie::Ui::OWidgetStack( this ); | 54 | m_stack = new Opie::Ui::OWidgetStack( this ); |
54 | setCentralWidget( m_stack ); | 55 | setCentralWidget( m_stack ); |
55 | 56 | ||
@@ -65,83 +66,84 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | |||
65 | 66 | ||
66 | m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce); | 67 | m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce); |
67 | 68 | ||
68 | listviewMenu = 0; | 69 | listviewMenu = 0; |
69 | /* setup menu and toolbar */ | 70 | /* setup menu and toolbar */ |
70 | setupActions(); | 71 | setupActions(); |
71 | setupToolbar(); | 72 | setupToolbar(); |
72 | setupMenu(); | 73 | setupMenu(); |
73 | m_aHideToolbar->setOn(m_cfg->readBoolEntry("base_showtoolbar",true)); | 74 | m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true)); |
75 | m_aAutoRotate->setEnabled(!m_aUnscaled->isOn()); | ||
74 | } | 76 | } |
75 | 77 | ||
76 | PMainWindow::~PMainWindow() { | 78 | PMainWindow::~PMainWindow() { |
77 | } | 79 | } |
78 | 80 | ||
79 | void PMainWindow::slotToggleZoomer() | 81 | void PMainWindow::slotToggleZoomer() |
80 | { | 82 | { |
81 | if (!m_disp) return; | 83 | m_aZoomer->setOn(!m_aZoomer->isOn()); |
82 | bool cur = m_aZoomer->isOn(); | ||
83 | m_aZoomer->setOn(!cur); | ||
84 | } | 84 | } |
85 | 85 | ||
86 | void PMainWindow::slotZoomerToggled(bool how) | 86 | void PMainWindow::slotZoomerToggled(bool how) |
87 | { | 87 | { |
88 | zoomerOn = how; | ||
89 | if (m_disp) { | 88 | if (m_disp) { |
90 | m_disp->setShowZoomer(zoomerOn); | 89 | m_disp->setShowZoomer(how); |
90 | } | ||
91 | if (autoSave) { | ||
92 | m_cfg->writeEntry("zoomeron",how); | ||
91 | } | 93 | } |
92 | } | 94 | } |
93 | 95 | ||
94 | void PMainWindow::slotToggleAutorotate() | 96 | void PMainWindow::slotToggleAutorotate() |
95 | { | 97 | { |
96 | if (!m_disp) return; | ||
97 | if (!m_aAutoRotate->isEnabled()) return; | 98 | if (!m_aAutoRotate->isEnabled()) return; |
98 | bool cur = m_aAutoRotate->isOn(); | 99 | m_aAutoRotate->setOn(!m_aAutoRotate->isOn()); |
99 | m_aAutoRotate->setOn(!cur); | ||
100 | } | 100 | } |
101 | 101 | ||
102 | void PMainWindow::slotToggleAutoscale() | 102 | void PMainWindow::slotToggleAutoscale() |
103 | { | 103 | { |
104 | if (!m_disp) return; | 104 | m_aUnscaled->setOn(!m_aUnscaled->isOn()); |
105 | bool cur = m_aAutoScale->isOn(); | ||
106 | m_aAutoScale->setOn(!cur); | ||
107 | } | 105 | } |
108 | 106 | ||
109 | void PMainWindow::slotRotateToggled(bool how) | 107 | void PMainWindow::slotRotateToggled(bool how) |
110 | { | 108 | { |
111 | autoRotate = how; | 109 | if (autoSave) { |
110 | m_cfg->writeEntry("autorotate",how); | ||
111 | } | ||
112 | if (m_disp) { | 112 | if (m_disp) { |
113 | m_disp->setAutoScaleRotate(!m_aAutoScale->isOn(),m_aAutoRotate->isOn()); | 113 | m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),how); |
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | void PMainWindow::slotScaleToggled(bool how) | 117 | void PMainWindow::slotScaleToggled(bool how) |
118 | { | 118 | { |
119 | autoScale = !how; | 119 | if (autoSave) { |
120 | if (!how) { | 120 | m_cfg->writeEntry("unscaled",how); |
121 | autoRotate = how; | ||
122 | } | 121 | } |
123 | if (!autoScale) { | 122 | odebug << "Unscaled: " << m_aUnscaled->isOn() << oendl; |
123 | odebug << "How: " << how << oendl; | ||
124 | if (how) { | ||
124 | m_aAutoRotate->setOn(false); | 125 | m_aAutoRotate->setOn(false); |
125 | } | 126 | } |
126 | if (m_disp) { | 127 | if (m_disp) { |
127 | m_disp->setAutoScaleRotate(!m_aAutoScale->isOn(),m_aAutoRotate->isOn()); | 128 | m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),m_aAutoRotate->isOn()); |
128 | } | 129 | } |
129 | m_aAutoRotate->setEnabled(!how); | 130 | m_aAutoRotate->setEnabled(!how); |
131 | odebug << "Autorotate: " << m_aAutoRotate->isOn() << oendl; | ||
130 | } | 132 | } |
131 | 133 | ||
132 | void PMainWindow::slotConfig() { | 134 | void PMainWindow::slotConfig() { |
133 | /* | 135 | /* |
134 | * have a tab with the possible views | 136 | * have a tab with the possible views |
135 | * a tab for globals image cache size.. scaled loading | 137 | * a tab for globals image cache size.. scaled loading |
136 | * and one tab for the KeyConfigs | 138 | * and one tab for the KeyConfigs |
137 | */ | 139 | */ |
138 | QDialog dlg(this, 0, true); | 140 | QDialog dlg(this, 0, true); |
139 | dlg.setCaption( tr("Phunk View - Config" ) ); | 141 | dlg.setCaption( tr("Opie Eye - Config" ) ); |
140 | 142 | ||
141 | QHBoxLayout *lay = new QHBoxLayout(&dlg); | 143 | QHBoxLayout *lay = new QHBoxLayout(&dlg); |
142 | Opie::Ui::OTabWidget *wid = new Opie::Ui::OTabWidget(&dlg ); | 144 | Opie::Ui::OTabWidget *wid = new Opie::Ui::OTabWidget(&dlg ); |
143 | lay->addWidget( wid ); | 145 | lay->addWidget( wid ); |
144 | 146 | ||
145 | BaseSetup*bSetup = new BaseSetup(m_cfg,wid); | 147 | BaseSetup*bSetup = new BaseSetup(m_cfg,wid); |
146 | wid->addTab(bSetup,"SettingsIcon","Basics setup"); | 148 | wid->addTab(bSetup,"SettingsIcon","Basics setup"); |
147 | 149 | ||
@@ -160,31 +162,35 @@ void PMainWindow::slotConfig() { | |||
160 | } | 162 | } |
161 | 163 | ||
162 | /* | 164 | /* |
163 | * Add the KeyConfigWidget | 165 | * Add the KeyConfigWidget |
164 | */ | 166 | */ |
165 | Opie::Ui::OKeyConfigWidget* keyWid = new Opie::Ui::OKeyConfigWidget( wid, "key config" ); | 167 | Opie::Ui::OKeyConfigWidget* keyWid = new Opie::Ui::OKeyConfigWidget( wid, "key config" ); |
166 | keyWid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue ); | 168 | keyWid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue ); |
167 | keyWid->insert( tr("Browser Keyboard Actions"), m_view->manager() ); | 169 | keyWid->insert( tr("Browser Keyboard Actions"), m_view->manager() ); |
170 | QWidget*w = m_stack->visibleWidget(); | ||
168 | 171 | ||
172 | bool reminfo = false; | ||
169 | if ( !m_info ) { | 173 | if ( !m_info ) { |
174 | reminfo = true; | ||
170 | initInfo(); | 175 | initInfo(); |
171 | } | 176 | } |
172 | keyWid->insert( tr("Imageinfo Keyboard Actions"), m_info->manager() ); | 177 | keyWid->insert( tr("Imageinfo Keyboard Actions"), m_info->manager() ); |
173 | 178 | ||
179 | bool remdisp = false; | ||
174 | if ( !m_disp ) { | 180 | if ( !m_disp ) { |
181 | remdisp = true; | ||
175 | initDisp(); | 182 | initDisp(); |
176 | } | 183 | } |
177 | keyWid->insert( tr("Imageview Keyboard Actions"), m_disp->manager() ); | 184 | keyWid->insert( tr("Imageview Keyboard Actions"), m_disp->manager() ); |
178 | 185 | ||
179 | keyWid->load(); | 186 | keyWid->load(); |
180 | wid->addTab( keyWid, QString::fromLatin1("AppsIcon" ), tr("Keyboard Configuration") ); | 187 | wid->addTab( keyWid, QString::fromLatin1("AppsIcon" ), tr("Keyboard Configuration") ); |
181 | 188 | wid->setCurrentTab(0); | |
182 | |||
183 | bool act = ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ); | 189 | bool act = ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ); |
184 | 190 | ||
185 | /* | 191 | /* |
186 | * clean up | 192 | * clean up |
187 | *apply changes | 193 | *apply changes |
188 | */ | 194 | */ |
189 | 195 | ||
190 | QMap<PDirView*, QWidget*>::Iterator it; | 196 | QMap<PDirView*, QWidget*>::Iterator it; |
@@ -197,18 +203,33 @@ void PMainWindow::slotConfig() { | |||
197 | 203 | ||
198 | if ( act ) { | 204 | if ( act ) { |
199 | m_view->resetView(); | 205 | m_view->resetView(); |
200 | keyWid->save(); | 206 | keyWid->save(); |
201 | m_disp->manager()->save(); | 207 | m_disp->manager()->save(); |
202 | m_info->manager()->save(); | 208 | m_info->manager()->save(); |
203 | m_view->manager()->save(); | 209 | m_view->manager()->save(); |
204 | bSetup->save_values(); | 210 | bSetup->save_values(); |
211 | readConfig(); | ||
205 | } | 212 | } |
206 | delete keyWid; | 213 | delete keyWid; |
214 | |||
215 | m_stack->raiseWidget(w); | ||
216 | if (remdisp) { | ||
217 | m_disp->disconnect(this, SLOT(slotReturn())); | ||
218 | m_disp->setDestructiveClose(); | ||
219 | m_stack->removeWidget(m_disp); | ||
220 | m_disp = 0; | ||
221 | } | ||
222 | if (reminfo) { | ||
223 | m_info->disconnect(this, SLOT(slotReturn())); | ||
224 | m_info->setDestructiveClose(); | ||
225 | m_stack->removeWidget(m_info); | ||
226 | m_info = 0; | ||
227 | } | ||
207 | } | 228 | } |
208 | 229 | ||
209 | /* | 230 | /* |
210 | * create a new image info component | 231 | * create a new image info component |
211 | * and detach the current one | 232 | * and detach the current one |
212 | * we will make the other delete on exit | 233 | * we will make the other delete on exit |
213 | */ | 234 | */ |
214 | template<class T> | 235 | template<class T> |
@@ -233,17 +254,17 @@ void PMainWindow::initInfo() { | |||
233 | 254 | ||
234 | void PMainWindow::initDisp() { | 255 | void PMainWindow::initDisp() { |
235 | initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); | 256 | initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); |
236 | if (m_disp) { | 257 | if (m_disp) { |
237 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { | 258 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { |
238 | m_disp->setMinimumSize(QApplication::desktop()->size()/2); | 259 | m_disp->setMinimumSize(QApplication::desktop()->size()/2); |
239 | } | 260 | } |
240 | m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType); | 261 | m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType); |
241 | m_disp->setAutoScale(!m_aAutoScale->isOn()); | 262 | m_disp->setAutoScale(!m_aUnscaled->isOn()); |
242 | m_disp->setAutoRotate(m_aAutoRotate->isOn()); | 263 | m_disp->setAutoRotate(m_aAutoRotate->isOn()); |
243 | m_disp->setShowZoomer(m_aZoomer->isOn()); | 264 | m_disp->setShowZoomer(m_aZoomer->isOn()); |
244 | m_disp->setBackgroundColor(white); | 265 | m_disp->setBackgroundColor(white); |
245 | connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); | 266 | connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); |
246 | connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext())); | 267 | connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext())); |
247 | connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev())); | 268 | connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev())); |
248 | connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen())); | 269 | connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen())); |
249 | connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView())); | 270 | connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView())); |
@@ -258,29 +279,27 @@ void PMainWindow::initDisp() { | |||
258 | void PMainWindow::slotToggleFullScreen() | 279 | void PMainWindow::slotToggleFullScreen() |
259 | { | 280 | { |
260 | bool current = !m_aFullScreen->isOn(); | 281 | bool current = !m_aFullScreen->isOn(); |
261 | m_aFullScreen->setOn(current); | 282 | m_aFullScreen->setOn(current); |
262 | } | 283 | } |
263 | 284 | ||
264 | void PMainWindow::slotFullScreenButton(bool current) | 285 | void PMainWindow::slotFullScreenButton(bool current) |
265 | { | 286 | { |
266 | if (m_disp) odebug << "Disp fenster ist hidden: "<<m_disp->isHidden()<<oendl; | 287 | if (autoSave) { |
288 | m_cfg->writeEntry("fullscreen",current); | ||
289 | } | ||
267 | if (!m_disp) return; | 290 | if (!m_disp) return; |
268 | 291 | ||
269 | /* I can not solve this effects here - it seems that we require some | 292 | if (m_disp->isHidden()) { |
270 | status variable, too. so we will live with some interesting effects | 293 | /* it must get some setups for switch we can just do if the window is visible. |
271 | meanwhile */ | 294 | so we must delete the imageview window and re-create it when displaying new |
272 | #if 0 | 295 | image */ |
273 | bool th = m_disp->isHidden(); | 296 | return; |
274 | setupViewWindow(current, false); | 297 | } |
275 | /* realy - after setting up the fullscreenmode while the window is hidden | ||
276 | it is unvisibile not hidden!!!!! Hell. */ | ||
277 | if (th) m_disp->hide(); | ||
278 | #endif | ||
279 | setupViewWindow(current, true); | 298 | setupViewWindow(current, true); |
280 | } | 299 | } |
281 | 300 | ||
282 | void PMainWindow::setupViewWindow(bool current, bool forceDisplay) | 301 | void PMainWindow::setupViewWindow(bool current, bool forceDisplay) |
283 | { | 302 | { |
284 | if (!m_disp) return; | 303 | if (!m_disp) return; |
285 | if (current) { | 304 | if (current) { |
286 | m_disp->setBackgroundColor(black); | 305 | m_disp->setBackgroundColor(black); |
@@ -452,16 +471,19 @@ void PMainWindow::dirChanged() | |||
452 | fsMenu->insertItem( disk ); | 471 | fsMenu->insertItem( disk ); |
453 | } | 472 | } |
454 | } | 473 | } |
455 | 474 | ||
456 | void PMainWindow::showToolbar(bool how) | 475 | void PMainWindow::showToolbar(bool how) |
457 | { | 476 | { |
458 | if (!how) toolBar->hide(); | 477 | if (!how) toolBar->hide(); |
459 | else toolBar->show(); | 478 | else toolBar->show(); |
479 | if (autoSave) { | ||
480 | m_cfg->writeEntry("showtoolbar",how); | ||
481 | } | ||
460 | } | 482 | } |
461 | 483 | ||
462 | void PMainWindow::setupActions() | 484 | void PMainWindow::setupActions() |
463 | { | 485 | { |
464 | m_aDirUp = new QAction( tr( "Go dir up" ), Resource::loadIconSet( "up" ), 0, 0, this, 0, true ); | 486 | m_aDirUp = new QAction( tr( "Go dir up" ), Resource::loadIconSet( "up" ), 0, 0, this, 0, true ); |
465 | m_aDirUp->setToggleAction(false); | 487 | m_aDirUp->setToggleAction(false); |
466 | connect(m_aDirUp,SIGNAL(activated()),m_view,SLOT(slotDirUp())); | 488 | connect(m_aDirUp,SIGNAL(activated()),m_view,SLOT(slotDirUp())); |
467 | 489 | ||
@@ -531,43 +553,56 @@ void PMainWindow::setupActions() | |||
531 | m_aPrevious->setToggleAction(false); | 553 | m_aPrevious->setToggleAction(false); |
532 | connect(m_aPrevious,SIGNAL(activated()),m_view,SLOT(slotShowPrev())); | 554 | connect(m_aPrevious,SIGNAL(activated()),m_view,SLOT(slotShowPrev())); |
533 | m_gPrevNext->insert(m_aPrevious); | 555 | m_gPrevNext->insert(m_aPrevious); |
534 | m_gPrevNext->insert(m_aNext); | 556 | m_gPrevNext->insert(m_aNext); |
535 | 557 | ||
536 | m_aFullScreen = new QAction( tr( "Show images fullscreen" ), | 558 | m_aFullScreen = new QAction( tr( "Show images fullscreen" ), |
537 | Resource::loadIconSet("fullscreen"), 0, 0, this, 0, true ); | 559 | Resource::loadIconSet("fullscreen"), 0, 0, this, 0, true ); |
538 | m_aFullScreen->setToggleAction(true); | 560 | m_aFullScreen->setToggleAction(true); |
539 | m_aFullScreen->setOn(false); | 561 | if (autoSave) { |
562 | m_aFullScreen->setOn(m_cfg->readBoolEntry("fullscreen",false)); | ||
563 | } else { | ||
564 | m_aFullScreen->setOn(false); | ||
565 | } | ||
540 | connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool))); | 566 | connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool))); |
541 | 567 | ||
542 | m_gDisplayType = new QActionGroup(this,"imagedisplaytype",false); | 568 | m_gDisplayType = new QActionGroup(this,"imagedisplaytype",false); |
543 | m_aAutoRotate = new QAction( tr( "Auto rotate images" ), Resource::loadIconSet( "rotate" ), 0, 0, this, 0, true ); | 569 | m_aAutoRotate = new QAction( tr( "Auto rotate images" ), Resource::loadIconSet( "rotate" ), 0, 0, this, 0, true ); |
544 | m_aAutoRotate->setToggleAction(true); | 570 | m_aAutoRotate->setToggleAction(true); |
571 | |||
545 | if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { | 572 | if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { |
546 | m_aAutoRotate->setOn(true); | 573 | m_aAutoRotate->setOn(true); |
547 | autoRotate = true; | ||
548 | } else { | 574 | } else { |
549 | m_aAutoRotate->setOn(false); | 575 | m_aAutoRotate->setOn(false); |
550 | autoRotate = false; | 576 | } |
577 | if (autoSave) { | ||
578 | m_aAutoRotate->setOn(m_cfg->readBoolEntry("autorotate",m_aAutoRotate->isOn())); | ||
551 | } | 579 | } |
552 | connect(m_aAutoRotate,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool))); | 580 | connect(m_aAutoRotate,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool))); |
553 | 581 | ||
554 | m_aAutoScale = new QAction( tr( "Show images unscaled" ), Resource::loadIconSet( "1to1" ), 0, 0, this, 0, true ); | 582 | m_aUnscaled = new QAction( tr( "Show images unscaled" ), Resource::loadIconSet( "1to1" ), 0, 0, this, 0, true ); |
555 | m_aAutoScale->setToggleAction(true); | 583 | m_aUnscaled->setToggleAction(true); |
556 | m_aAutoScale->setOn (false); | 584 | connect(m_aUnscaled,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); |
557 | connect(m_aAutoScale,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); | 585 | if (autoSave) { |
586 | m_aUnscaled->setOn(m_cfg->readBoolEntry("unscaled",false)); | ||
587 | } else { | ||
588 | m_aUnscaled->setOn(false); | ||
589 | } | ||
558 | 590 | ||
559 | m_aZoomer = new QAction( tr( "Show zoomer window when unscaled" ), Resource::loadIconSet( "mag" ), 0, 0, this, 0, true ); | 591 | m_aZoomer = new QAction( tr( "Show zoomer window when unscaled" ), Resource::loadIconSet( "mag" ), 0, 0, this, 0, true ); |
560 | m_aZoomer->setToggleAction(true); | 592 | m_aZoomer->setToggleAction(true); |
561 | m_aZoomer->setOn (true); | 593 | if (autoSave) { |
562 | zoomerOn = true; | 594 | m_aZoomer->setOn(m_cfg->readBoolEntry("zoomeron",true)); |
595 | } else { | ||
596 | m_aZoomer->setOn (true); | ||
597 | } | ||
563 | connect(m_aZoomer,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool))); | 598 | connect(m_aZoomer,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool))); |
564 | m_gDisplayType->insert(m_aAutoRotate); | 599 | m_gDisplayType->insert(m_aAutoRotate); |
565 | m_gDisplayType->insert(m_aAutoScale); | 600 | m_gDisplayType->insert(m_aUnscaled); |
566 | m_gDisplayType->insert(m_aZoomer); | 601 | m_gDisplayType->insert(m_aZoomer); |
567 | 602 | ||
568 | m_hGroup = new QActionGroup(this,"actioncollection",false); | 603 | m_hGroup = new QActionGroup(this,"actioncollection",false); |
569 | m_hGroup->insert(m_aFullScreen); | 604 | m_hGroup->insert(m_aFullScreen); |
570 | } | 605 | } |
571 | 606 | ||
572 | void PMainWindow::setupToolbar() | 607 | void PMainWindow::setupToolbar() |
573 | { | 608 | { |
@@ -653,8 +688,13 @@ void PMainWindow::listviewselected(QAction*which) | |||
653 | val = 2; | 688 | val = 2; |
654 | // name = "opie-eye/opie-eye-thumbonly"; | 689 | // name = "opie-eye/opie-eye-thumbonly"; |
655 | } else if (which==m_aDirLong) { | 690 | } else if (which==m_aDirLong) { |
656 | val = 1; | 691 | val = 1; |
657 | // name = "opie-eye/opie-eye-thumb"; | 692 | // name = "opie-eye/opie-eye-thumb"; |
658 | } | 693 | } |
659 | emit changeListMode(val); | 694 | emit changeListMode(val); |
660 | } | 695 | } |
696 | |||
697 | void PMainWindow::readConfig() | ||
698 | { | ||
699 | autoSave =m_cfg->readBoolEntry("base_savestatus",true); | ||
700 | } | ||