summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.cpp
authoralwin <alwin>2004-11-01 01:58:25 (UTC)
committer alwin <alwin>2004-11-01 01:58:25 (UTC)
commitd69955ef9cddc3acc37b9dc96945cd4bae56eed5 (patch) (unidiff)
tree7982a6da8f8141292eb0a1c09ce384784af2801d /noncore/graphics/opie-eye/gui/mainwindow.cpp
parent01fb5d6957984fe6fe5ed2109a024be7e8159d16 (diff)
downloadopie-d69955ef9cddc3acc37b9dc96945cd4bae56eed5.zip
opie-d69955ef9cddc3acc37b9dc96945cd4bae56eed5.tar.gz
opie-d69955ef9cddc3acc37b9dc96945cd4bae56eed5.tar.bz2
some menu working
some debug messages removed tried to remove some interesting effects when switching view mode
Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp52
1 files changed, 37 insertions, 15 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 570ee45..ece51a1 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -34,26 +34,26 @@
34#include <qtimer.h> 34#include <qtimer.h>
35#include <qframe.h> 35#include <qframe.h>
36#include <qmenubar.h> 36#include <qmenubar.h>
37#include <qaction.h> 37#include <qaction.h>
38 38
39//OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" ) 39//OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" )
40OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) 40OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>)
41 41
42PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) 42PMainWindow::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("phunkview"); 46 m_cfg = new Opie::Core::OConfig("opie-eye");
47 m_cfg->setGroup("Zecke_view" ); 47 m_cfg->setGroup("main" );
48 48
49 m_storage = new StorageInfo(); 49 m_storage = new StorageInfo();
50 connect(m_storage, SIGNAL(disksChanged() ), 50 connect(m_storage, SIGNAL(disksChanged() ),
51 this, SLOT( dirChanged() ) ); 51 this, SLOT( dirChanged() ) );
52 52
53 m_stack = new Opie::Ui::OWidgetStack( this ); 53 m_stack = new Opie::Ui::OWidgetStack( this );
54 setCentralWidget( m_stack ); 54 setCentralWidget( m_stack );
55 55
56 m_view = new PIconView( m_stack, m_cfg ); 56 m_view = new PIconView( m_stack, m_cfg );
57 m_stack->addWidget( m_view, IconView ); 57 m_stack->addWidget( m_view, IconView );
58 m_stack->raiseWidget( IconView ); 58 m_stack->raiseWidget( IconView );
59 59
@@ -99,25 +99,24 @@ void PMainWindow::slotToggleAutorotate()
99 m_aAutoRotate->setOn(!cur); 99 m_aAutoRotate->setOn(!cur);
100} 100}
101 101
102void PMainWindow::slotToggleAutoscale() 102void PMainWindow::slotToggleAutoscale()
103{ 103{
104 if (!m_disp) return; 104 if (!m_disp) return;
105 bool cur = m_aAutoScale->isOn(); 105 bool cur = m_aAutoScale->isOn();
106 m_aAutoScale->setOn(!cur); 106 m_aAutoScale->setOn(!cur);
107} 107}
108 108
109void PMainWindow::slotRotateToggled(bool how) 109void PMainWindow::slotRotateToggled(bool how)
110{ 110{
111 odebug << "Autorotate: " << how << oendl;
112 autoRotate = how; 111 autoRotate = how;
113 if (m_disp) { 112 if (m_disp) {
114 m_disp->setAutoScaleRotate(!m_aAutoScale->isOn(),m_aAutoRotate->isOn()); 113 m_disp->setAutoScaleRotate(!m_aAutoScale->isOn(),m_aAutoRotate->isOn());
115 } 114 }
116} 115}
117 116
118void PMainWindow::slotScaleToggled(bool how) 117void PMainWindow::slotScaleToggled(bool how)
119{ 118{
120 autoScale = !how; 119 autoScale = !how;
121 if (!how) { 120 if (!how) {
122 autoRotate = how; 121 autoRotate = how;
123 } 122 }
@@ -217,28 +216,30 @@ void PMainWindow::initT( const char* name, T** ptr, int id) {
217 if ( *ptr ) { 216 if ( *ptr ) {
218 (*ptr)->disconnect(this, SLOT(slotReturn())); 217 (*ptr)->disconnect(this, SLOT(slotReturn()));
219 (*ptr)->setDestructiveClose(); 218 (*ptr)->setDestructiveClose();
220 m_stack->removeWidget( *ptr ); 219 m_stack->removeWidget( *ptr );
221 } 220 }
222 *ptr = new T(m_cfg, m_stack, name ); 221 *ptr = new T(m_cfg, m_stack, name );
223 m_stack->addWidget( *ptr, id ); 222 m_stack->addWidget( *ptr, id );
224 223
225 connect(*ptr, SIGNAL(sig_return()), 224 connect(*ptr, SIGNAL(sig_return()),
226 this,SLOT(slotReturn())); 225 this,SLOT(slotReturn()));
227 226
228} 227}
228
229void PMainWindow::initInfo() { 229void PMainWindow::initInfo() {
230 initT<imageinfo>( "Image Info", &m_info, ImageInfo ); 230 initT<imageinfo>( "Image Info", &m_info, ImageInfo );
231 connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&))); 231 connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&)));
232} 232}
233
233void PMainWindow::initDisp() { 234void PMainWindow::initDisp() {
234 initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); 235 initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay );
235 if (m_disp) { 236 if (m_disp) {
236 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 237 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
237 m_disp->setMinimumSize(QApplication::desktop()->size()/2); 238 m_disp->setMinimumSize(QApplication::desktop()->size()/2);
238 } 239 }
239 m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType); 240 m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType);
240 m_disp->setAutoScale(!m_aAutoScale->isOn()); 241 m_disp->setAutoScale(!m_aAutoScale->isOn());
241 m_disp->setAutoRotate(m_aAutoRotate->isOn()); 242 m_disp->setAutoRotate(m_aAutoRotate->isOn());
242 m_disp->setShowZoomer(m_aZoomer->isOn()); 243 m_disp->setShowZoomer(m_aZoomer->isOn());
243 m_disp->setBackgroundColor(white); 244 m_disp->setBackgroundColor(white);
244 connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); 245 connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&)));
@@ -247,64 +248,84 @@ void PMainWindow::initDisp() {
247 connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen())); 248 connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen()));
248 connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView())); 249 connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView()));
249 connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer())); 250 connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer()));
250 connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale())); 251 connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale()));
251 connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate())); 252 connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate()));
252 connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int))); 253 connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int)));
253 slotFullScreenToggled(m_aFullScreen->isOn()); 254 slotFullScreenToggled(m_aFullScreen->isOn());
254 } 255 }
255} 256}
256 257
257void PMainWindow::slotToggleFullScreen() 258void PMainWindow::slotToggleFullScreen()
258{ 259{
259 odebug << "Toggle full " << oendl;
260 bool current = !m_aFullScreen->isOn(); 260 bool current = !m_aFullScreen->isOn();
261 m_aFullScreen->setOn(current); 261 m_aFullScreen->setOn(current);
262} 262}
263 263
264void PMainWindow::slotFullScreenToggled(bool current) 264void PMainWindow::slotFullScreenButton(bool current)
265{
266 if (m_disp) odebug << "Disp fenster ist hidden: "<<m_disp->isHidden()<<oendl;
267 if (!m_disp) return;
268
269 /* I can not solve this effects here - it seems that we require some
270 status variable, too. so we will live with some interesting effects
271 meanwhile */
272#if 0
273 bool th = m_disp->isHidden();
274 setupViewWindow(current, false);
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);
280}
281
282void PMainWindow::setupViewWindow(bool current, bool forceDisplay)
265{ 283{
266 odebug << "slotFullScreenToggled " << current << oendl;
267 if (!m_disp) return; 284 if (!m_disp) return;
268 if (current) { 285 if (current) {
269 odebug << "full" << oendl;
270 m_disp->setBackgroundColor(black); 286 m_disp->setBackgroundColor(black);
271 m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); 287 m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0));
272 m_disp->setVScrollBarMode(QScrollView::AlwaysOff); 288 m_disp->setVScrollBarMode(QScrollView::AlwaysOff);
273 m_disp->setHScrollBarMode(QScrollView::AlwaysOff); 289 m_disp->setHScrollBarMode(QScrollView::AlwaysOff);
274 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); 290 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height());
275 } else { 291 } else {
276 setUpdatesEnabled(false); 292 setUpdatesEnabled(false);
277 odebug << "window" << oendl;
278 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 293 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
279 m_disp->setMinimumSize(QApplication::desktop()->size()/2); 294 m_disp->setMinimumSize(QApplication::desktop()->size()/2);
280 } else { 295 } else {
281 m_disp->setMinimumSize(10,10); 296 m_disp->setMinimumSize(10,10);
282 } 297 }
283 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 298 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
284 m_disp->reparent(0,QPoint(50,50)); 299 m_disp->reparent(0,QPoint(50,50));
285 } else { 300 } else {
286 m_disp->reparent(0,QPoint(0,0)); 301 m_disp->reparent(0,QPoint(0,0));
287 } 302 }
288 m_disp->setBackgroundColor(white); 303 m_disp->setBackgroundColor(white);
289 m_stack->addWidget(m_disp,ImageDisplay); 304 m_stack->addWidget(m_disp,ImageDisplay);
290 m_disp->setVScrollBarMode(QScrollView::Auto); 305 m_disp->setVScrollBarMode(QScrollView::Auto);
291 m_disp->setHScrollBarMode(QScrollView::Auto); 306 m_disp->setHScrollBarMode(QScrollView::Auto);
307 if (forceDisplay || m_disp->isVisible())
292 m_stack->raiseWidget(m_disp); 308 m_stack->raiseWidget(m_disp);
293 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 309 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
294 m_disp->resize(m_disp->minimumSize()); 310 m_disp->resize(m_disp->minimumSize());
295 } 311 }
296 setUpdatesEnabled(true); 312 setUpdatesEnabled(true);
297 } 313 }
298 m_disp->setFullScreen(current); 314 m_disp->setFullScreen(current,forceDisplay);
315}
316
317void PMainWindow::slotFullScreenToggled(bool current)
318{
319 setupViewWindow(current,true);
299} 320}
300 321
301/** 322/**
302 * With big Screen the plan could be to 'detach' the image 323 * With big Screen the plan could be to 'detach' the image
303 * window if visible and to create a ne wone 324 * window if visible and to create a ne wone
304 * init* already supports it but I make no use of it for 325 * init* already supports it but I make no use of it for
305 * now. We set filename and raise 326 * now. We set filename and raise
306 * 327 *
307 * ### FIXME and talk to alwin 328 * ### FIXME and talk to alwin
308 */ 329 */
309void PMainWindow::slotShowInfo( const QString& inf ) { 330void PMainWindow::slotShowInfo( const QString& inf ) {
310 if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) { 331 if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) {
@@ -320,43 +341,41 @@ void PMainWindow::slotShowInfo( const QString& inf ) {
320 m_aNext->setEnabled(false); 341 m_aNext->setEnabled(false);
321 m_aPrevious->setEnabled(false); 342 m_aPrevious->setEnabled(false);
322 m_aDirUp->setEnabled(false); 343 m_aDirUp->setEnabled(false);
323 m_aShowInfo->setEnabled(false); 344 m_aShowInfo->setEnabled(false);
324 m_aViewfile->setEnabled(true); 345 m_aViewfile->setEnabled(true);
325 m_aStartSlide->setEnabled(false); 346 m_aStartSlide->setEnabled(false);
326 fsButton->hide(); 347 fsButton->hide();
327 } 348 }
328 m_stack->raiseWidget( ImageInfo ); 349 m_stack->raiseWidget( ImageInfo );
329} 350}
330 351
331void PMainWindow::slotDisplay( const QString& inf ) { 352void PMainWindow::slotDisplay( const QString& inf ) {
332 odebug << "slotDisplay: " << inf << oendl;
333 if ( !m_disp ) { 353 if ( !m_disp ) {
334 initDisp(); 354 initDisp();
335 } 355 }
336 m_disp->setImage( inf ); 356 m_disp->setImage( inf );
337 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { 357 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
338 if (m_gPrevNext->isEnabled()==false) { 358 if (m_gPrevNext->isEnabled()==false) {
339 m_gPrevNext->addTo(toolBar); 359 m_gPrevNext->addTo(toolBar);
340 m_gPrevNext->setEnabled(true); 360 m_gPrevNext->setEnabled(true);
341 361
342 m_aDirUp->setEnabled(false); 362 m_aDirUp->setEnabled(false);
343 m_aShowInfo->setEnabled(true); 363 m_aShowInfo->setEnabled(true);
344 m_aViewfile->setEnabled(false); 364 m_aViewfile->setEnabled(false);
345 m_aStartSlide->setEnabled(false); 365 m_aStartSlide->setEnabled(false);
346 fsButton->hide(); 366 fsButton->hide();
347 } 367 }
348 } 368 }
349 if (m_disp->fullScreen()) { 369 if (m_disp->fullScreen()) {
350 //m_disp->showFullScreen();
351 qwsDisplay()->requestFocus( m_disp->winId(), TRUE); 370 qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
352 } else { 371 } else {
353 m_stack->raiseWidget( ImageDisplay ); 372 m_stack->raiseWidget( ImageDisplay );
354 } 373 }
355} 374}
356 375
357void PMainWindow::raiseIconView() { 376void PMainWindow::raiseIconView() {
358 setUpdatesEnabled(false); 377 setUpdatesEnabled(false);
359 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { 378 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
360 m_gPrevNext->removeFrom(toolBar); 379 m_gPrevNext->removeFrom(toolBar);
361 m_gPrevNext->setEnabled(false); 380 m_gPrevNext->setEnabled(false);
362 m_aDirUp->setEnabled(true); 381 m_aDirUp->setEnabled(true);
@@ -509,25 +528,25 @@ void PMainWindow::setupActions()
509 m_aNext->setToggleAction(false); 528 m_aNext->setToggleAction(false);
510 connect(m_aNext,SIGNAL(activated()),m_view,SLOT(slotShowNext())); 529 connect(m_aNext,SIGNAL(activated()),m_view,SLOT(slotShowNext()));
511 m_aPrevious = new QAction( tr( "Previous image" ), Resource::loadIconSet("back"), 0, 0, this, 0, true ); 530 m_aPrevious = new QAction( tr( "Previous image" ), Resource::loadIconSet("back"), 0, 0, this, 0, true );
512 m_aPrevious->setToggleAction(false); 531 m_aPrevious->setToggleAction(false);
513 connect(m_aPrevious,SIGNAL(activated()),m_view,SLOT(slotShowPrev())); 532 connect(m_aPrevious,SIGNAL(activated()),m_view,SLOT(slotShowPrev()));
514 m_gPrevNext->insert(m_aPrevious); 533 m_gPrevNext->insert(m_aPrevious);
515 m_gPrevNext->insert(m_aNext); 534 m_gPrevNext->insert(m_aNext);
516 535
517 m_aFullScreen = new QAction( tr( "Show images fullscreen" ), 536 m_aFullScreen = new QAction( tr( "Show images fullscreen" ),
518 Resource::loadIconSet("fullscreen"), 0, 0, this, 0, true ); 537 Resource::loadIconSet("fullscreen"), 0, 0, this, 0, true );
519 m_aFullScreen->setToggleAction(true); 538 m_aFullScreen->setToggleAction(true);
520 m_aFullScreen->setOn(false); 539 m_aFullScreen->setOn(false);
521 connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenToggled(bool))); 540 connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool)));
522 541
523 m_gDisplayType = new QActionGroup(this,"imagedisplaytype",false); 542 m_gDisplayType = new QActionGroup(this,"imagedisplaytype",false);
524 m_aAutoRotate = new QAction( tr( "Auto rotate images" ), Resource::loadIconSet( "rotate" ), 0, 0, this, 0, true ); 543 m_aAutoRotate = new QAction( tr( "Auto rotate images" ), Resource::loadIconSet( "rotate" ), 0, 0, this, 0, true );
525 m_aAutoRotate->setToggleAction(true); 544 m_aAutoRotate->setToggleAction(true);
526 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { 545 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
527 m_aAutoRotate->setOn(true); 546 m_aAutoRotate->setOn(true);
528 autoRotate = true; 547 autoRotate = true;
529 } else { 548 } else {
530 m_aAutoRotate->setOn(false); 549 m_aAutoRotate->setOn(false);
531 autoRotate = false; 550 autoRotate = false;
532 } 551 }
533 connect(m_aAutoRotate,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool))); 552 connect(m_aAutoRotate,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool)));
@@ -560,71 +579,74 @@ void PMainWindow::setupToolbar()
560 579
561 fsButton = new PFileSystem( toolBar ); 580 fsButton = new PFileSystem( toolBar );
562 connect( fsButton, SIGNAL( changeDir( const QString& ) ), 581 connect( fsButton, SIGNAL( changeDir( const QString& ) ),
563 m_view, SLOT(slotChangeDir( const QString& ) ) ); 582 m_view, SLOT(slotChangeDir( const QString& ) ) );
564 connect( this, SIGNAL( changeDir( const QString& ) ), 583 connect( this, SIGNAL( changeDir( const QString& ) ),
565 m_view, SLOT(slotChangeDir( const QString& ) ) ); 584 m_view, SLOT(slotChangeDir( const QString& ) ) );
566 585
567 if (m_aBeam) { 586 if (m_aBeam) {
568 m_aBeam->addTo( toolBar ); 587 m_aBeam->addTo( toolBar );
569 } 588 }
570 m_aShowInfo->addTo(toolBar); 589 m_aShowInfo->addTo(toolBar);
571 m_aTrash->addTo(toolBar); 590 m_aTrash->addTo(toolBar);
572 m_aSetup->addTo(toolBar); 591// m_aSetup->addTo(toolBar);
573 592
574 m_gDisplayType->addTo(toolBar); 593 m_gDisplayType->addTo(toolBar);
575 594
576 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 595 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
577 m_gPrevNext->addTo(toolBar); 596 m_gPrevNext->addTo(toolBar);
578 } else { 597 } else {
579 m_gPrevNext->setEnabled(false); 598 m_gPrevNext->setEnabled(false);
580 } 599 }
581} 600}
582 601
583void PMainWindow::setupMenu() 602void PMainWindow::setupMenu()
584{ 603{
585 fileMenu = new QPopupMenu( menuBar() ); 604 fileMenu = new QPopupMenu( menuBar() );
586 menuBar()->insertItem( tr( "File" ), fileMenu ); 605 menuBar()->insertItem( tr( "File" ), fileMenu );
587 dispMenu = new QPopupMenu( menuBar() ); 606 dispMenu = new QPopupMenu( menuBar() );
588 menuBar()->insertItem( tr( "Show" ), dispMenu ); 607 menuBar()->insertItem( tr( "Show" ), dispMenu );
608 settingsMenu = new QPopupMenu( menuBar() );
609 menuBar()->insertItem( tr( "Settings" ), settingsMenu );
589 610
590 m_aViewfile->addTo(fileMenu); 611 m_aViewfile->addTo(fileMenu);
591 m_aShowInfo->addTo(fileMenu); 612 m_aShowInfo->addTo(fileMenu);
592 m_aStartSlide->addTo(fileMenu); 613 m_aStartSlide->addTo(fileMenu);
593 614
594 fileMenu->insertSeparator(); 615 fileMenu->insertSeparator();
595 m_aDirUp->addTo( fileMenu ); 616 m_aDirUp->addTo( fileMenu );
596 617
597 fsMenu = new QPopupMenu(fileMenu); 618 fsMenu = new QPopupMenu(fileMenu);
598 fileMenu->insertItem(Resource::loadIconSet( "cardmon/pcmcia" ),tr("Select filesystem"),fsMenu); 619 fileMenu->insertItem(Resource::loadIconSet( "cardmon/pcmcia" ),tr("Select filesystem"),fsMenu);
599 connect( fsMenu, SIGNAL( activated( int ) ), this, SLOT(slotSelectDir( int ) ) ); 620 connect( fsMenu, SIGNAL( activated( int ) ), this, SLOT(slotSelectDir( int ) ) );
600 dirChanged(); 621 dirChanged();
601 622
602 if ( m_aBeam ) { 623 if ( m_aBeam ) {
603 fileMenu->insertSeparator(); 624 fileMenu->insertSeparator();
604 m_aBeam->addTo( fileMenu ); 625 m_aBeam->addTo( fileMenu );
605 } 626 }
606 fileMenu->insertSeparator(); 627 fileMenu->insertSeparator();
607 m_aSetup->addTo(fileMenu);
608 m_aTrash->addTo(fileMenu); 628 m_aTrash->addTo(fileMenu);
609 629
610 m_aHideToolbar->addTo(dispMenu);
611 listviewMenu = new QPopupMenu(dispMenu); 630 listviewMenu = new QPopupMenu(dispMenu);
612 dispMenu->insertItem(Resource::loadIconSet("opie-eye/opie-eye-thumb"),tr("Listview mode"),listviewMenu); 631 dispMenu->insertItem(Resource::loadIconSet("opie-eye/opie-eye-thumb"),tr("Listview mode"),listviewMenu);
613 m_gListViewMode->addTo(listviewMenu); 632 m_gListViewMode->addTo(listviewMenu);
614 dispMenu->insertSeparator(); 633 dispMenu->insertSeparator();
615 m_aFullScreen->addTo(dispMenu); 634 m_aFullScreen->addTo(dispMenu);
616 m_gDisplayType->addTo(dispMenu); 635 m_gDisplayType->addTo(dispMenu);
617 dispMenu->insertSeparator(); 636 dispMenu->insertSeparator();
618 m_gPrevNext->addTo(dispMenu); 637 m_gPrevNext->addTo(dispMenu);
638
639 m_aSetup->addTo(settingsMenu);
640 m_aHideToolbar->addTo(settingsMenu);
619} 641}
620 642
621void PMainWindow::listviewselected(QAction*which) 643void PMainWindow::listviewselected(QAction*which)
622{ 644{
623 if (!which || which->isOn()==false) return; 645 if (!which || which->isOn()==false) return;
624 int val = 1; 646 int val = 1;
625// QString name; 647// QString name;
626 648
627 if (which==m_aDirName) { 649 if (which==m_aDirName) {
628 val = 3; 650 val = 3;
629// name = "opie-eye/opie-eye-textview"; 651// name = "opie-eye/opie-eye-textview";
630 } else if (which==m_aDirShort) { 652 } else if (which==m_aDirShort) {