-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 2 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/filesystem.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/libopie/ofileselector.cpp | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 11ce880..2a66494 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp | |||
@@ -6,97 +6,97 @@ | |||
6 | * copyright : (c) 2002 by Maximilian Reiss | 6 | * copyright : (c) 2002 by Maximilian Reiss |
7 | * email : max.reiss@gmx.de | 7 | * email : max.reiss@gmx.de |
8 | * based on two apps by Devin Butterfield | 8 | * based on two apps by Devin Butterfield |
9 | */ | 9 | */ |
10 | /*************************************************************************** | 10 | /*************************************************************************** |
11 | * * | 11 | * * |
12 | * This program is free software; you can redistribute it and/or modify * | 12 | * This program is free software; you can redistribute it and/or modify * |
13 | * it under the terms of the GNU General Public License as published by * | 13 | * it under the terms of the GNU General Public License as published by * |
14 | * the Free Software Foundation; either version 2 of the License, or * | 14 | * the Free Software Foundation; either version 2 of the License, or * |
15 | * (at your option) any later version. * | 15 | * (at your option) any later version. * |
16 | * * | 16 | * * |
17 | ***************************************************************************/ | 17 | ***************************************************************************/ |
18 | 18 | ||
19 | #include "cardmon.h" | 19 | #include "cardmon.h" |
20 | 20 | ||
21 | /* OPIE */ | 21 | /* OPIE */ |
22 | #include <opie2/odebug.h> | 22 | #include <opie2/odebug.h> |
23 | #include <opie2/odevice.h> | 23 | #include <opie2/odevice.h> |
24 | #include <opie2/oprocess.h> | 24 | #include <opie2/oprocess.h> |
25 | #include <opie2/oresource.h> | 25 | #include <opie2/oresource.h> |
26 | #include <opie2/otaskbarapplet.h> | 26 | #include <opie2/otaskbarapplet.h> |
27 | 27 | ||
28 | #include <qpe/applnk.h> | 28 | #include <qpe/applnk.h> |
29 | #include <qpe/resource.h> | 29 | #include <qpe/resource.h> |
30 | using namespace Opie::Core; | 30 | using namespace Opie::Core; |
31 | using namespace Opie::Ui; | 31 | using namespace Opie::Ui; |
32 | 32 | ||
33 | /* QT */ | 33 | /* QT */ |
34 | #include <qcopchannel_qws.h> | 34 | #include <qcopchannel_qws.h> |
35 | #include <qpainter.h> | 35 | #include <qpainter.h> |
36 | #include <qfile.h> | 36 | #include <qfile.h> |
37 | #include <qtextstream.h> | 37 | #include <qtextstream.h> |
38 | #include <qsound.h> | 38 | #include <qsound.h> |
39 | #include <qtimer.h> | 39 | #include <qtimer.h> |
40 | 40 | ||
41 | /* STD */ | 41 | /* STD */ |
42 | #include <stdio.h> | 42 | #include <stdio.h> |
43 | #include <unistd.h> | 43 | #include <unistd.h> |
44 | #include <stdlib.h> | 44 | #include <stdlib.h> |
45 | #include <string.h> | 45 | #include <string.h> |
46 | #include <fcntl.h> | 46 | #include <fcntl.h> |
47 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 47 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
48 | #include <sys/vfs.h> | 48 | #include <sys/vfs.h> |
49 | #include <mntent.h> | 49 | #include <mntent.h> |
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ) | 52 | CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ) |
53 | { | 53 | { |
54 | pm = Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ); | 54 | pm = Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ); |
55 | 55 | ||
56 | QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); | 56 | QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); |
57 | connect( pcmciaChannel, | 57 | connect( pcmciaChannel, |
58 | SIGNAL( received(const QCString&,const QByteArray&) ), this, | 58 | SIGNAL( received(const QCString&,const QByteArray&) ), this, |
59 | SLOT( cardMessage(const QCString&,const QByteArray&) ) ); | 59 | SLOT( cardMessage(const QCString&,const QByteArray&) ) ); |
60 | 60 | ||
61 | QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this ); | 61 | QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this ); |
62 | connect( sdChannel, | 62 | connect( sdChannel, |
63 | SIGNAL( received(const QCString&,const QByteArray&) ), this, | 63 | SIGNAL( received(const QCString&,const QByteArray&) ), this, |
64 | SLOT( cardMessage(const QCString&,const QByteArray&) ) ); | 64 | SLOT( cardMessage(const QCString&,const QByteArray&) ) ); |
65 | 65 | ||
66 | cardInPcmcia0 = FALSE; | 66 | cardInPcmcia0 = FALSE; |
67 | cardInPcmcia1 = FALSE; | 67 | cardInPcmcia1 = FALSE; |
68 | cardInSd = FALSE; | 68 | cardInSd = FALSE; |
69 | m_process = 0; | 69 | m_process = 0; |
70 | 70 | ||
71 | setFocusPolicy( NoFocus ); | 71 | setFocusPolicy( NoFocus ); |
72 | 72 | ||
73 | setFixedWidth ( AppLnk::smallIconSize() ); | 73 | setFixedWidth ( AppLnk::smallIconSize() ); |
74 | setFixedHeight ( AppLnk::smallIconSize() ); | 74 | setFixedHeight ( AppLnk::smallIconSize() ); |
75 | 75 | ||
76 | getStatusPcmcia( TRUE ); | 76 | getStatusPcmcia( TRUE ); |
77 | getStatusSd( TRUE ); | 77 | getStatusSd( TRUE ); |
78 | repaint( FALSE ); | 78 | repaint( FALSE ); |
79 | popupMenu = 0; | 79 | popupMenu = 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | CardMonitor::~CardMonitor() { | 82 | CardMonitor::~CardMonitor() { |
83 | delete popupMenu; | 83 | delete popupMenu; |
84 | } | 84 | } |
85 | 85 | ||
86 | void CardMonitor::popUp( QString message, QString icon ) { | 86 | void CardMonitor::popUp( QString message, QString icon ) { |
87 | if ( !popupMenu ) { | 87 | if ( !popupMenu ) { |
88 | popupMenu = new QPopupMenu( this ); | 88 | popupMenu = new QPopupMenu( this ); |
89 | } | 89 | } |
90 | 90 | ||
91 | popupMenu->clear(); | 91 | popupMenu->clear(); |
92 | if ( icon.isEmpty() ) { | 92 | if ( icon.isEmpty() ) { |
93 | popupMenu->insertItem( message, 0 ); | 93 | popupMenu->insertItem( message, 0 ); |
94 | } else { | 94 | } else { |
95 | popupMenu->insertItem( QIconSet( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) ), | 95 | popupMenu->insertItem( QIconSet( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) ), |
96 | message, 0 ); | 96 | message, 0 ); |
97 | } | 97 | } |
98 | 98 | ||
99 | QPoint p = mapToGlobal( QPoint( 0, 0 ) ); | 99 | QPoint p = mapToGlobal( QPoint( 0, 0 ) ); |
100 | QSize s = popupMenu->sizeHint(); | 100 | QSize s = popupMenu->sizeHint(); |
101 | popupMenu->popup( QPoint( p.x() + ( width() / 2 ) - ( s.width() / 2 ), | 101 | popupMenu->popup( QPoint( p.x() + ( width() / 2 ) - ( s.width() / 2 ), |
102 | p.y() - s.height() ), 0 ); | 102 | p.y() - s.height() ), 0 ); |
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index a30bd8b..02404e5 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp | |||
@@ -324,97 +324,97 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st | |||
324 | 324 | ||
325 | /* | 325 | /* |
326 | * now we add a special bar | 326 | * now we add a special bar |
327 | * One Button For Up | 327 | * One Button For Up |
328 | * Home | 328 | * Home |
329 | * Doc | 329 | * Doc |
330 | * And a dropdown menu with FileSystems | 330 | * And a dropdown menu with FileSystems |
331 | * FUTURE: one to change dir with lineedit | 331 | * FUTURE: one to change dir with lineedit |
332 | * Bookmarks | 332 | * Bookmarks |
333 | * Create Dir | 333 | * Create Dir |
334 | */ | 334 | */ |
335 | QHBox* box = new QHBox(this ); | 335 | QHBox* box = new QHBox(this ); |
336 | box->setBackgroundMode( PaletteButton ); | 336 | box->setBackgroundMode( PaletteButton ); |
337 | box->setSpacing( 0 ); | 337 | box->setSpacing( 0 ); |
338 | 338 | ||
339 | QToolButton *btn = new QToolButton( box ); | 339 | QToolButton *btn = new QToolButton( box ); |
340 | btn->setUsesBigPixmap(bigicons); | 340 | btn->setUsesBigPixmap(bigicons); |
341 | btn->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); | 341 | btn->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); |
342 | connect(btn, SIGNAL(clicked() ), | 342 | connect(btn, SIGNAL(clicked() ), |
343 | this, SLOT( cdUP() ) ); | 343 | this, SLOT( cdUP() ) ); |
344 | 344 | ||
345 | btn = new QToolButton( box ); | 345 | btn = new QToolButton( box ); |
346 | btn->setUsesBigPixmap(bigicons); | 346 | btn->setUsesBigPixmap(bigicons); |
347 | btn->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) ); | 347 | btn->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) ); |
348 | connect(btn, SIGNAL(clicked() ), | 348 | connect(btn, SIGNAL(clicked() ), |
349 | this, SLOT( cdHome() ) ); | 349 | this, SLOT( cdHome() ) ); |
350 | 350 | ||
351 | btn = new QToolButton( box ); | 351 | btn = new QToolButton( box ); |
352 | btn->setUsesBigPixmap(bigicons); | 352 | btn->setUsesBigPixmap(bigicons); |
353 | btn->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) ); | 353 | btn->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) ); |
354 | connect(btn, SIGNAL(clicked() ), | 354 | connect(btn, SIGNAL(clicked() ), |
355 | this, SLOT(cdDoc() ) ); | 355 | this, SLOT(cdDoc() ) ); |
356 | 356 | ||
357 | m_btnNew = new QToolButton( box ); | 357 | m_btnNew = new QToolButton( box ); |
358 | m_btnNew->setUsesBigPixmap(bigicons); | 358 | m_btnNew->setUsesBigPixmap(bigicons); |
359 | m_btnNew->setPixmap( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ) ); | 359 | m_btnNew->setPixmap( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ) ); |
360 | connect(m_btnNew, SIGNAL(clicked() ), | 360 | connect(m_btnNew, SIGNAL(clicked() ), |
361 | this, SLOT(slotNew() ) ); | 361 | this, SLOT(slotNew() ) ); |
362 | 362 | ||
363 | 363 | ||
364 | m_btnClose = new QToolButton( box ); | 364 | m_btnClose = new QToolButton( box ); |
365 | m_btnClose->setUsesBigPixmap(bigicons); | 365 | m_btnClose->setUsesBigPixmap(bigicons); |
366 | m_btnClose->setPixmap( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) ); | 366 | m_btnClose->setPixmap( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) ); |
367 | connect(m_btnClose, SIGNAL(clicked() ), | 367 | connect(m_btnClose, SIGNAL(clicked() ), |
368 | selector(), SIGNAL(closeMe() ) ); | 368 | selector(), SIGNAL(closeMe() ) ); |
369 | 369 | ||
370 | btn = new QToolButton( box ); | 370 | btn = new QToolButton( box ); |
371 | btn->setUsesBigPixmap(bigicons); | 371 | btn->setUsesBigPixmap(bigicons); |
372 | btn->setPixmap( Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ) ); | 372 | btn->setPixmap( Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ) ); |
373 | 373 | ||
374 | m_fsButton = btn; | 374 | m_fsButton = btn; |
375 | /* let's fill device parts */ | 375 | /* let's fill device parts */ |
376 | QPopupMenu* pop = new QPopupMenu(this); | 376 | QPopupMenu* pop = new QPopupMenu(this); |
377 | connect(pop, SIGNAL( activated(int) ), | 377 | connect(pop, SIGNAL( activated(int) ), |
378 | this, SLOT(slotFSActivated(int) ) ); | 378 | this, SLOT(slotFSActivated(int) ) ); |
379 | 379 | ||
380 | StorageInfo storage; | 380 | StorageInfo storage; |
381 | const QList<FileSystem> &fs = storage.fileSystems(); | 381 | const QList<FileSystem> &fs = storage.fileSystems(); |
382 | QListIterator<FileSystem> it(fs); | 382 | QListIterator<FileSystem> it(fs); |
383 | for ( ; it.current(); ++it ) | 383 | for ( ; it.current(); ++it ) |
384 | { | 384 | { |
385 | const QString disk = (*it)->name(); | 385 | const QString disk = (*it)->name(); |
386 | const QString path = (*it)->path(); | 386 | const QString path = (*it)->path(); |
387 | m_dev.insert( disk, path ); | 387 | m_dev.insert( disk, path ); |
388 | pop->insertItem( disk ); | 388 | pop->insertItem( disk ); |
389 | } | 389 | } |
390 | m_fsPop = pop; | 390 | m_fsPop = pop; |
391 | 391 | ||
392 | connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed())); | 392 | connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed())); |
393 | 393 | ||
394 | lay->addWidget( box ); | 394 | lay->addWidget( box ); |
395 | 395 | ||
396 | m_view = new QListView( this ); | 396 | m_view = new QListView( this ); |
397 | 397 | ||
398 | m_view->installEventFilter(this); | 398 | m_view->installEventFilter(this); |
399 | 399 | ||
400 | QPEApplication::setStylusOperation( m_view->viewport(), | 400 | QPEApplication::setStylusOperation( m_view->viewport(), |
401 | QPEApplication::RightOnHold); | 401 | QPEApplication::RightOnHold); |
402 | m_view->addColumn(" " ); | 402 | m_view->addColumn(" " ); |
403 | m_view->addColumn(tr("Name"), 135 ); | 403 | m_view->addColumn(tr("Name"), 135 ); |
404 | m_view->addColumn(tr("Size"), -1 ); | 404 | m_view->addColumn(tr("Size"), -1 ); |
405 | m_view->addColumn(tr("Date"), 60 ); | 405 | m_view->addColumn(tr("Date"), 60 ); |
406 | m_view->addColumn(tr("Mime Type"), -1 ); | 406 | m_view->addColumn(tr("Mime Type"), -1 ); |
407 | 407 | ||
408 | 408 | ||
409 | m_view->setSorting( 1 ); | 409 | m_view->setSorting( 1 ); |
410 | m_view->setAllColumnsShowFocus( TRUE ); | 410 | m_view->setAllColumnsShowFocus( TRUE ); |
411 | 411 | ||
412 | lay->addWidget( m_view, 1000 ); | 412 | lay->addWidget( m_view, 1000 ); |
413 | connectSlots(); | 413 | connectSlots(); |
414 | } | 414 | } |
415 | 415 | ||
416 | void OFileViewFileListView::slotFSpressed() | 416 | void OFileViewFileListView::slotFSpressed() |
417 | { | 417 | { |
418 | m_fsPop->exec(QPoint( QCursor::pos().x(), QCursor::pos().y())); | 418 | m_fsPop->exec(QPoint( QCursor::pos().x(), QCursor::pos().y())); |
419 | m_fsButton->setDown(false); | 419 | m_fsButton->setDown(false); |
420 | } | 420 | } |
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index aa9db52..feda198 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -23,97 +23,97 @@ using namespace Opie::Ui; | |||
23 | 23 | ||
24 | /* QT */ | 24 | /* QT */ |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qhbox.h> | 26 | #include <qhbox.h> |
27 | #include <qmenubar.h> | 27 | #include <qmenubar.h> |
28 | #include <qcombobox.h> | 28 | #include <qcombobox.h> |
29 | #include <qtoolbutton.h> | 29 | #include <qtoolbutton.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qlistview.h> | 31 | #include <qlistview.h> |
32 | 32 | ||
33 | /* STD */ | 33 | /* STD */ |
34 | #include <sys/utsname.h> | 34 | #include <sys/utsname.h> |
35 | 35 | ||
36 | void AdvancedFm::init() { | 36 | void AdvancedFm::init() { |
37 | b = false; | 37 | b = false; |
38 | setCaption( tr( "AdvancedFm" ) ); | 38 | setCaption( tr( "AdvancedFm" ) ); |
39 | 39 | ||
40 | QVBoxLayout *layout = new QVBoxLayout( this ); | 40 | QVBoxLayout *layout = new QVBoxLayout( this ); |
41 | layout->setSpacing( 2); | 41 | layout->setSpacing( 2); |
42 | layout->setMargin( 0); // squeeze | 42 | layout->setMargin( 0); // squeeze |
43 | 43 | ||
44 | QMenuBar *menuBar = new QMenuBar(this); | 44 | QMenuBar *menuBar = new QMenuBar(this); |
45 | menuBar->setMargin( 0 ); // squeeze | 45 | menuBar->setMargin( 0 ); // squeeze |
46 | fileMenu = new QPopupMenu( this ); | 46 | fileMenu = new QPopupMenu( this ); |
47 | viewMenu = new QPopupMenu( this ); | 47 | viewMenu = new QPopupMenu( this ); |
48 | // customDirMenu = new QPopupMenu( this ); | 48 | // customDirMenu = new QPopupMenu( this ); |
49 | 49 | ||
50 | layout->addWidget( menuBar ); | 50 | layout->addWidget( menuBar ); |
51 | 51 | ||
52 | menuBar->insertItem( tr( "File" ), fileMenu); | 52 | menuBar->insertItem( tr( "File" ), fileMenu); |
53 | menuBar->insertItem( tr( "View" ), viewMenu); | 53 | menuBar->insertItem( tr( "View" ), viewMenu); |
54 | 54 | ||
55 | bool useBigIcon = qApp->desktop()->size().width() > 330; | 55 | bool useBigIcon = qApp->desktop()->size().width() > 330; |
56 | 56 | ||
57 | cdUpButton = new QToolButton( 0,"cdUpButton"); | 57 | cdUpButton = new QToolButton( 0,"cdUpButton"); |
58 | cdUpButton->setUsesBigPixmap( useBigIcon ); | 58 | cdUpButton->setUsesBigPixmap( useBigIcon ); |
59 | cdUpButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); | 59 | cdUpButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); |
60 | cdUpButton->setAutoRaise( true ); | 60 | cdUpButton->setAutoRaise( true ); |
61 | menuBar->insertItem( cdUpButton ); | 61 | menuBar->insertItem( cdUpButton ); |
62 | 62 | ||
63 | qpeDirButton= new QToolButton( 0,"QPEButton"); | 63 | qpeDirButton= new QToolButton( 0,"QPEButton"); |
64 | qpeDirButton->setUsesBigPixmap( useBigIcon ); | 64 | qpeDirButton->setUsesBigPixmap( useBigIcon ); |
65 | qpeDirButton->setPixmap( Opie::Core::OResource::loadPixmap( "logo/opielogo", Opie::Core::OResource::SmallIcon ) ); | 65 | qpeDirButton->setPixmap( Opie::Core::OResource::loadPixmap( "logo/opielogo", Opie::Core::OResource::SmallIcon ) ); |
66 | qpeDirButton->setAutoRaise( true ); | 66 | qpeDirButton->setAutoRaise( true ); |
67 | menuBar->insertItem( qpeDirButton ); | 67 | menuBar->insertItem( qpeDirButton ); |
68 | 68 | ||
69 | cfButton = new QToolButton( 0, "CFButton"); | 69 | cfButton = new QToolButton( 0, "CFButton"); |
70 | cfButton->setUsesBigPixmap( useBigIcon ); | 70 | cfButton->setUsesBigPixmap( useBigIcon ); |
71 | cfButton->setPixmap( Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ) ); | 71 | cfButton->setPixmap( Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ) ); |
72 | cfButton->setAutoRaise( true ); | 72 | cfButton->setAutoRaise( true ); |
73 | menuBar->insertItem( cfButton ); | 73 | menuBar->insertItem( cfButton ); |
74 | 74 | ||
75 | sdButton = new QToolButton( 0, "SDButton"); | 75 | sdButton = new QToolButton( 0, "SDButton"); |
76 | sdButton->setUsesBigPixmap( useBigIcon ); | 76 | sdButton->setUsesBigPixmap( useBigIcon ); |
77 | sdButton->setPixmap( Opie::Core::OResource::loadPixmap( "advancedfm/sdcard", Opie::Core::OResource::SmallIcon ) ); | 77 | sdButton->setPixmap( Opie::Core::OResource::loadPixmap( "advancedfm/sdcard", Opie::Core::OResource::SmallIcon ) ); |
78 | sdButton->setAutoRaise( true ); | 78 | sdButton->setAutoRaise( true ); |
79 | menuBar->insertItem( sdButton ); | 79 | menuBar->insertItem( sdButton ); |
80 | 80 | ||
81 | docButton = new QToolButton( 0,"docsButton"); | 81 | docButton = new QToolButton( 0,"docsButton"); |
82 | docButton->setUsesBigPixmap( useBigIcon ); | 82 | docButton->setUsesBigPixmap( useBigIcon ); |
83 | docButton->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) ); | 83 | docButton->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) ); |
84 | docButton->setAutoRaise( true ); | 84 | docButton->setAutoRaise( true ); |
85 | menuBar->insertItem( docButton ); | 85 | menuBar->insertItem( docButton ); |
86 | 86 | ||
87 | homeButton = new QToolButton( 0, "homeButton"); | 87 | homeButton = new QToolButton( 0, "homeButton"); |
88 | homeButton->setUsesBigPixmap( useBigIcon ); | 88 | homeButton->setUsesBigPixmap( useBigIcon ); |
89 | homeButton->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) ); | 89 | homeButton->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) ); |
90 | homeButton->setAutoRaise( true ); | 90 | homeButton->setAutoRaise( true ); |
91 | menuBar->insertItem( homeButton ); | 91 | menuBar->insertItem( homeButton ); |
92 | 92 | ||
93 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); | 93 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); |
94 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 94 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
95 | fileMenu->insertSeparator(); | 95 | fileMenu->insertSeparator(); |
96 | fileMenu->insertItem( tr( "File Search" ), this, SLOT( openSearch() )); | 96 | fileMenu->insertItem( tr( "File Search" ), this, SLOT( openSearch() )); |
97 | fileMenu->insertSeparator(); | 97 | fileMenu->insertSeparator(); |
98 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); | 98 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); |
99 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); | 99 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); |
100 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); | 100 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); |
101 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); | 101 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); |
102 | fileMenu->insertSeparator(); | 102 | fileMenu->insertSeparator(); |
103 | fileMenu->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 103 | fileMenu->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); |
104 | fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() )); | 104 | fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() )); |
105 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); | 105 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); |
106 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); | 106 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); |
107 | fileMenu->setCheckable(TRUE); | 107 | fileMenu->setCheckable(TRUE); |
108 | 108 | ||
109 | viewMenu->insertItem( tr( "Switch to View 1" ), this, SLOT( switchToLocalTab())); | 109 | viewMenu->insertItem( tr( "Switch to View 1" ), this, SLOT( switchToLocalTab())); |
110 | viewMenu->insertItem( tr( "Switch to View 2" ), this, SLOT( switchToRemoteTab())); | 110 | viewMenu->insertItem( tr( "Switch to View 2" ), this, SLOT( switchToRemoteTab())); |
111 | viewMenu->insertItem( tr( "Refresh" ), this, SLOT( refreshCurrentTab())); | 111 | viewMenu->insertItem( tr( "Refresh" ), this, SLOT( refreshCurrentTab())); |
112 | // viewMenu->insertSeparator(); | 112 | // viewMenu->insertSeparator(); |
113 | // viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 113 | // viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
114 | viewMenu->setCheckable(true); | 114 | viewMenu->setCheckable(true); |
115 | viewMenu->setItemChecked( viewMenu->idAt(0), true); | 115 | viewMenu->setItemChecked( viewMenu->idAt(0), true); |
116 | viewMenu->setItemChecked( viewMenu->idAt(1), false); | 116 | viewMenu->setItemChecked( viewMenu->idAt(1), false); |
117 | 117 | ||
118 | s_addBookmark = tr("Bookmark Directory"); | 118 | s_addBookmark = tr("Bookmark Directory"); |
119 | s_removeBookmark = tr("Remove Current Directory from Bookmarks"); | 119 | s_removeBookmark = tr("Remove Current Directory from Bookmarks"); |
diff --git a/noncore/graphics/opie-eye/gui/filesystem.cpp b/noncore/graphics/opie-eye/gui/filesystem.cpp index d84e9f8..9448843 100644 --- a/noncore/graphics/opie-eye/gui/filesystem.cpp +++ b/noncore/graphics/opie-eye/gui/filesystem.cpp | |||
@@ -1,66 +1,66 @@ | |||
1 | /* | 1 | /* |
2 | * GPLv2 zecke@handhelds.org | 2 | * GPLv2 zecke@handhelds.org |
3 | * No WArranty... | 3 | * No WArranty... |
4 | */ | 4 | */ |
5 | #include <stdlib.h> | 5 | #include <stdlib.h> |
6 | #include <qpopupmenu.h> | 6 | #include <qpopupmenu.h> |
7 | #include <qtoolbar.h> | 7 | #include <qtoolbar.h> |
8 | 8 | ||
9 | #include <opie2/oresource.h> | 9 | #include <opie2/oresource.h> |
10 | 10 | ||
11 | #include <qpe/storage.h> | 11 | #include <qpe/storage.h> |
12 | 12 | ||
13 | 13 | ||
14 | #include "filesystem.h" | 14 | #include "filesystem.h" |
15 | 15 | ||
16 | PFileSystem::PFileSystem( QToolBar* bar) | 16 | PFileSystem::PFileSystem( QToolBar* bar) |
17 | : QToolButton( bar ) | 17 | : QToolButton( bar ) |
18 | { | 18 | { |
19 | setIconSet( Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ) ); | 19 | setIconSet( Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ) ); |
20 | 20 | ||
21 | m_pop = new QPopupMenu( this ); | 21 | m_pop = new QPopupMenu( this ); |
22 | connect( m_pop, SIGNAL( activated( int ) ), | 22 | connect( m_pop, SIGNAL( activated( int ) ), |
23 | this, SLOT(slotSelectDir( int ) ) ); | 23 | this, SLOT(slotSelectDir( int ) ) ); |
24 | 24 | ||
25 | m_storage = new StorageInfo(); | 25 | m_storage = new StorageInfo(); |
26 | connect(m_storage, SIGNAL(disksChanged() ), | 26 | connect(m_storage, SIGNAL(disksChanged() ), |
27 | this, SLOT( changed() ) ); | 27 | this, SLOT( changed() ) ); |
28 | changed(); | 28 | changed(); |
29 | 29 | ||
30 | connect(this,SIGNAL(pressed()),SLOT(slotPopUp())); | 30 | connect(this,SIGNAL(pressed()),SLOT(slotPopUp())); |
31 | } | 31 | } |
32 | 32 | ||
33 | PFileSystem::~PFileSystem() { | 33 | PFileSystem::~PFileSystem() { |
34 | delete m_storage; | 34 | delete m_storage; |
35 | } | 35 | } |
36 | 36 | ||
37 | 37 | ||
38 | void PFileSystem::changed() { | 38 | void PFileSystem::changed() { |
39 | m_pop->clear(); | 39 | m_pop->clear(); |
40 | m_dev.clear(); | 40 | m_dev.clear(); |
41 | 41 | ||
42 | /* home dir, too */ | 42 | /* home dir, too */ |
43 | QString f = getenv( "HOME" ); | 43 | QString f = getenv( "HOME" ); |
44 | if (!f.isEmpty()) { | 44 | if (!f.isEmpty()) { |
45 | m_dev.insert("Home directory",f); | 45 | m_dev.insert("Home directory",f); |
46 | m_pop->insertItem("Home directory"); | 46 | m_pop->insertItem("Home directory"); |
47 | } | 47 | } |
48 | 48 | ||
49 | const QList<FileSystem> &fs = m_storage->fileSystems(); | 49 | const QList<FileSystem> &fs = m_storage->fileSystems(); |
50 | QListIterator<FileSystem> it(fs ); | 50 | QListIterator<FileSystem> it(fs ); |
51 | for ( ; it.current(); ++it ) { | 51 | for ( ; it.current(); ++it ) { |
52 | const QString disk = (*it)->name(); | 52 | const QString disk = (*it)->name(); |
53 | const QString path = (*it)->path(); | 53 | const QString path = (*it)->path(); |
54 | m_dev.insert( disk, path ); | 54 | m_dev.insert( disk, path ); |
55 | m_pop->insertItem( disk ); | 55 | m_pop->insertItem( disk ); |
56 | } | 56 | } |
57 | } | 57 | } |
58 | 58 | ||
59 | void PFileSystem::slotPopUp() { | 59 | void PFileSystem::slotPopUp() { |
60 | m_pop->exec(QCursor::pos()); | 60 | m_pop->exec(QCursor::pos()); |
61 | setDown(false); | 61 | setDown(false); |
62 | } | 62 | } |
63 | 63 | ||
64 | void PFileSystem::slotSelectDir( int id ) { | 64 | void PFileSystem::slotSelectDir( int id ) { |
65 | emit changeDir( m_dev[m_pop->text(id )] ); | 65 | emit changeDir( m_dev[m_pop->text(id )] ); |
66 | } | 66 | } |
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index d4c5b42..2cf687b 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp | |||
@@ -700,97 +700,97 @@ void PMainWindow::setupBrightness() | |||
700 | } | 700 | } |
701 | 701 | ||
702 | void PMainWindow::setupToolbar() | 702 | void PMainWindow::setupToolbar() |
703 | { | 703 | { |
704 | toolBar = new QToolBar( this ); | 704 | toolBar = new QToolBar( this ); |
705 | addToolBar(toolBar); | 705 | addToolBar(toolBar); |
706 | toolBar->setHorizontalStretchable( true ); | 706 | toolBar->setHorizontalStretchable( true ); |
707 | setToolBarsMovable( false ); | 707 | setToolBarsMovable( false ); |
708 | m_aDirUp->addTo( toolBar ); | 708 | m_aDirUp->addTo( toolBar ); |
709 | 709 | ||
710 | fsButton = new PFileSystem( toolBar ); | 710 | fsButton = new PFileSystem( toolBar ); |
711 | connect( fsButton, SIGNAL( changeDir( const QString& ) ), | 711 | connect( fsButton, SIGNAL( changeDir( const QString& ) ), |
712 | m_view, SLOT(slotChangeDir( const QString& ) ) ); | 712 | m_view, SLOT(slotChangeDir( const QString& ) ) ); |
713 | connect( this, SIGNAL( changeDir( const QString& ) ), | 713 | connect( this, SIGNAL( changeDir( const QString& ) ), |
714 | m_view, SLOT(slotChangeDir( const QString& ) ) ); | 714 | m_view, SLOT(slotChangeDir( const QString& ) ) ); |
715 | 715 | ||
716 | if (m_aBeam) { | 716 | if (m_aBeam) { |
717 | m_aBeam->addTo( toolBar ); | 717 | m_aBeam->addTo( toolBar ); |
718 | } | 718 | } |
719 | m_aShowInfo->addTo(toolBar); | 719 | m_aShowInfo->addTo(toolBar); |
720 | m_aTrash->addTo(toolBar); | 720 | m_aTrash->addTo(toolBar); |
721 | 721 | ||
722 | m_gDisplayType->addTo(toolBar); | 722 | m_gDisplayType->addTo(toolBar); |
723 | 723 | ||
724 | if (!m_SmallWindow) { | 724 | if (!m_SmallWindow) { |
725 | m_gPrevNext->addTo(toolBar); | 725 | m_gPrevNext->addTo(toolBar); |
726 | } else { | 726 | } else { |
727 | m_gPrevNext->setEnabled(false); | 727 | m_gPrevNext->setEnabled(false); |
728 | } | 728 | } |
729 | } | 729 | } |
730 | 730 | ||
731 | void PMainWindow::setupMenu() | 731 | void PMainWindow::setupMenu() |
732 | { | 732 | { |
733 | fileMenu = new QPopupMenu( menuBar() ); | 733 | fileMenu = new QPopupMenu( menuBar() ); |
734 | menuBar()->insertItem( tr( "File" ), fileMenu ); | 734 | menuBar()->insertItem( tr( "File" ), fileMenu ); |
735 | dispMenu = new QPopupMenu( menuBar() ); | 735 | dispMenu = new QPopupMenu( menuBar() ); |
736 | menuBar()->insertItem( tr( "Show" ), dispMenu ); | 736 | menuBar()->insertItem( tr( "Show" ), dispMenu ); |
737 | settingsMenu = new QPopupMenu( menuBar() ); | 737 | settingsMenu = new QPopupMenu( menuBar() ); |
738 | menuBar()->insertItem( tr( "Settings" ), settingsMenu ); | 738 | menuBar()->insertItem( tr( "Settings" ), settingsMenu ); |
739 | 739 | ||
740 | m_aViewfile->addTo(fileMenu); | 740 | m_aViewfile->addTo(fileMenu); |
741 | m_aShowInfo->addTo(fileMenu); | 741 | m_aShowInfo->addTo(fileMenu); |
742 | m_aStartSlide->addTo(fileMenu); | 742 | m_aStartSlide->addTo(fileMenu); |
743 | 743 | ||
744 | fileMenu->insertSeparator(); | 744 | fileMenu->insertSeparator(); |
745 | m_aDirUp->addTo( fileMenu ); | 745 | m_aDirUp->addTo( fileMenu ); |
746 | 746 | ||
747 | fsMenu = new QPopupMenu(fileMenu); | 747 | fsMenu = new QPopupMenu(fileMenu); |
748 | fileMenu->insertItem(Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ), | 748 | fileMenu->insertItem(Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ), |
749 | tr("Select filesystem"),fsMenu); | 749 | tr("Select filesystem"),fsMenu); |
750 | connect( fsMenu, SIGNAL( activated( int ) ), this, SLOT(slotSelectDir( int ) ) ); | 750 | connect( fsMenu, SIGNAL( activated( int ) ), this, SLOT(slotSelectDir( int ) ) ); |
751 | dirChanged(); | 751 | dirChanged(); |
752 | 752 | ||
753 | if ( m_aBeam ) { | 753 | if ( m_aBeam ) { |
754 | fileMenu->insertSeparator(); | 754 | fileMenu->insertSeparator(); |
755 | m_aBeam->addTo( fileMenu ); | 755 | m_aBeam->addTo( fileMenu ); |
756 | } | 756 | } |
757 | fileMenu->insertSeparator(); | 757 | fileMenu->insertSeparator(); |
758 | m_aTrash->addTo(fileMenu); | 758 | m_aTrash->addTo(fileMenu); |
759 | 759 | ||
760 | listviewMenu = new QPopupMenu(dispMenu); | 760 | listviewMenu = new QPopupMenu(dispMenu); |
761 | dispMenu->insertItem(Opie::Core::OResource::loadPixmap("opie-eye/opie-eye-thumb", Opie::Core::OResource::SmallIcon), | 761 | dispMenu->insertItem(Opie::Core::OResource::loadPixmap("opie-eye/opie-eye-thumb", Opie::Core::OResource::SmallIcon), |
762 | tr("Listview mode"),listviewMenu); | 762 | tr("Listview mode"),listviewMenu); |
763 | m_gListViewMode->addTo(listviewMenu); | 763 | m_gListViewMode->addTo(listviewMenu); |
764 | dispMenu->insertSeparator(); | 764 | dispMenu->insertSeparator(); |
765 | m_aFullScreen->addTo(dispMenu); | 765 | m_aFullScreen->addTo(dispMenu); |
766 | m_gDisplayType->addTo(dispMenu); | 766 | m_gDisplayType->addTo(dispMenu); |
767 | dispMenu->insertSeparator(); | 767 | dispMenu->insertSeparator(); |
768 | m_gPrevNext->addTo(dispMenu); | 768 | m_gPrevNext->addTo(dispMenu); |
769 | dispMenu->insertSeparator(); | 769 | dispMenu->insertSeparator(); |
770 | m_hBright->addTo(dispMenu); | 770 | m_hBright->addTo(dispMenu); |
771 | m_hBright->setEnabled(false); | 771 | m_hBright->setEnabled(false); |
772 | 772 | ||
773 | if (m_aForceSmall) { | 773 | if (m_aForceSmall) { |
774 | dispMenu->insertSeparator(); | 774 | dispMenu->insertSeparator(); |
775 | m_aForceSmall->addTo(dispMenu); | 775 | m_aForceSmall->addTo(dispMenu); |
776 | } | 776 | } |
777 | 777 | ||
778 | m_aSetup->addTo(settingsMenu); | 778 | m_aSetup->addTo(settingsMenu); |
779 | m_aHideToolbar->addTo(settingsMenu); | 779 | m_aHideToolbar->addTo(settingsMenu); |
780 | } | 780 | } |
781 | 781 | ||
782 | void PMainWindow::listviewselected(QAction*which) | 782 | void PMainWindow::listviewselected(QAction*which) |
783 | { | 783 | { |
784 | if (!which || which->isOn()==false) return; | 784 | if (!which || which->isOn()==false) return; |
785 | int val = 1; | 785 | int val = 1; |
786 | 786 | ||
787 | if (which==m_aDirName) { | 787 | if (which==m_aDirName) { |
788 | val = 3; | 788 | val = 3; |
789 | } else if (which==m_aDirShort) { | 789 | } else if (which==m_aDirShort) { |
790 | val = 2; | 790 | val = 2; |
791 | } else if (which==m_aDirLong) { | 791 | } else if (which==m_aDirLong) { |
792 | val = 1; | 792 | val = 1; |
793 | } | 793 | } |
794 | emit changeListMode(val); | 794 | emit changeListMode(val); |
795 | } | 795 | } |
796 | 796 | ||
diff --git a/noncore/unsupported/libopie/ofileselector.cpp b/noncore/unsupported/libopie/ofileselector.cpp index 2a6aed0..3bb85e0 100644 --- a/noncore/unsupported/libopie/ofileselector.cpp +++ b/noncore/unsupported/libopie/ofileselector.cpp | |||
@@ -187,97 +187,97 @@ QString OFileSelectorItem::key( int id, bool )const { | |||
187 | OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& startDir, | 187 | OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& startDir, |
188 | OFileSelector* sel) | 188 | OFileSelector* sel) |
189 | : QWidget( parent ), m_sel( sel ) { | 189 | : QWidget( parent ), m_sel( sel ) { |
190 | m_all = false; | 190 | m_all = false; |
191 | QVBoxLayout* lay = new QVBoxLayout( this ); | 191 | QVBoxLayout* lay = new QVBoxLayout( this ); |
192 | m_currentDir = startDir; | 192 | m_currentDir = startDir; |
193 | 193 | ||
194 | /* | 194 | /* |
195 | * now we add a special bar | 195 | * now we add a special bar |
196 | * One Button For Up | 196 | * One Button For Up |
197 | * Home | 197 | * Home |
198 | * Doc | 198 | * Doc |
199 | * And a dropdown menu with FileSystems | 199 | * And a dropdown menu with FileSystems |
200 | * FUTURE: one to change dir with lineedit | 200 | * FUTURE: one to change dir with lineedit |
201 | * Bookmarks | 201 | * Bookmarks |
202 | * Create Dir | 202 | * Create Dir |
203 | */ | 203 | */ |
204 | QHBox* box = new QHBox(this ); | 204 | QHBox* box = new QHBox(this ); |
205 | box->setBackgroundMode( PaletteButton ); | 205 | box->setBackgroundMode( PaletteButton ); |
206 | box->setSpacing( 0 ); | 206 | box->setSpacing( 0 ); |
207 | 207 | ||
208 | QToolButton *btn = new QToolButton( box ); | 208 | QToolButton *btn = new QToolButton( box ); |
209 | btn->setIconSet( Resource::loadIconSet("up") ); | 209 | btn->setIconSet( Resource::loadIconSet("up") ); |
210 | connect(btn, SIGNAL(clicked() ), | 210 | connect(btn, SIGNAL(clicked() ), |
211 | this, SLOT( cdUP() ) ); | 211 | this, SLOT( cdUP() ) ); |
212 | 212 | ||
213 | btn = new QToolButton( box ); | 213 | btn = new QToolButton( box ); |
214 | btn->setIconSet( Resource::loadIconSet("home") ); | 214 | btn->setIconSet( Resource::loadIconSet("home") ); |
215 | connect(btn, SIGNAL(clicked() ), | 215 | connect(btn, SIGNAL(clicked() ), |
216 | this, SLOT( cdHome() ) ); | 216 | this, SLOT( cdHome() ) ); |
217 | 217 | ||
218 | btn = new QToolButton( box ); | 218 | btn = new QToolButton( box ); |
219 | btn->setIconSet( Resource::loadIconSet("DocsIcon") ); | 219 | btn->setIconSet( Resource::loadIconSet("DocsIcon") ); |
220 | connect(btn, SIGNAL(clicked() ), | 220 | connect(btn, SIGNAL(clicked() ), |
221 | this, SLOT(cdDoc() ) ); | 221 | this, SLOT(cdDoc() ) ); |
222 | 222 | ||
223 | m_btnNew = new QToolButton( box ); | 223 | m_btnNew = new QToolButton( box ); |
224 | m_btnNew->setIconSet( Resource::loadIconSet("new") ); | 224 | m_btnNew->setIconSet( Resource::loadIconSet("new") ); |
225 | connect(m_btnNew, SIGNAL(clicked() ), | 225 | connect(m_btnNew, SIGNAL(clicked() ), |
226 | this, SLOT(slotNew() ) ); | 226 | this, SLOT(slotNew() ) ); |
227 | 227 | ||
228 | 228 | ||
229 | m_btnClose = new QToolButton( box ); | 229 | m_btnClose = new QToolButton( box ); |
230 | m_btnClose->setIconSet( Resource::loadIconSet("close") ); | 230 | m_btnClose->setIconSet( Resource::loadIconSet("close") ); |
231 | connect(m_btnClose, SIGNAL(clicked() ), | 231 | connect(m_btnClose, SIGNAL(clicked() ), |
232 | selector(), SIGNAL(closeMe() ) ); | 232 | selector(), SIGNAL(closeMe() ) ); |
233 | 233 | ||
234 | btn = new QToolButton( box ); | 234 | btn = new QToolButton( box ); |
235 | btn->setIconSet( Resource::loadIconSet("cardmon/pcmcia") ); | 235 | btn->setIconSet( Resource::loadIconSet("pcmcia") ); |
236 | 236 | ||
237 | /* let's fill device parts */ | 237 | /* let's fill device parts */ |
238 | QPopupMenu* pop = new QPopupMenu(this); | 238 | QPopupMenu* pop = new QPopupMenu(this); |
239 | connect(pop, SIGNAL( activated(int) ), | 239 | connect(pop, SIGNAL( activated(int) ), |
240 | this, SLOT(slotFSActivated(int) ) ); | 240 | this, SLOT(slotFSActivated(int) ) ); |
241 | 241 | ||
242 | StorageInfo storage; | 242 | StorageInfo storage; |
243 | const QList<FileSystem> &fs = storage.fileSystems(); | 243 | const QList<FileSystem> &fs = storage.fileSystems(); |
244 | QListIterator<FileSystem> it(fs); | 244 | QListIterator<FileSystem> it(fs); |
245 | for ( ; it.current(); ++it ) { | 245 | for ( ; it.current(); ++it ) { |
246 | const QString disk = (*it)->name(); | 246 | const QString disk = (*it)->name(); |
247 | const QString path = (*it)->path(); | 247 | const QString path = (*it)->path(); |
248 | m_dev.insert( disk, path ); | 248 | m_dev.insert( disk, path ); |
249 | pop->insertItem( disk ); | 249 | pop->insertItem( disk ); |
250 | } | 250 | } |
251 | m_fsPop = pop; | 251 | m_fsPop = pop; |
252 | 252 | ||
253 | 253 | ||
254 | btn->setPopup( pop ); | 254 | btn->setPopup( pop ); |
255 | 255 | ||
256 | lay->addWidget( box ); | 256 | lay->addWidget( box ); |
257 | 257 | ||
258 | m_view = new QListView( this ); | 258 | m_view = new QListView( this ); |
259 | 259 | ||
260 | m_view->installEventFilter(this); | 260 | m_view->installEventFilter(this); |
261 | 261 | ||
262 | QPEApplication::setStylusOperation( m_view->viewport(), | 262 | QPEApplication::setStylusOperation( m_view->viewport(), |
263 | QPEApplication::RightOnHold); | 263 | QPEApplication::RightOnHold); |
264 | m_view->addColumn(" " ); | 264 | m_view->addColumn(" " ); |
265 | m_view->addColumn(tr("Name"), 135 ); | 265 | m_view->addColumn(tr("Name"), 135 ); |
266 | m_view->addColumn(tr("Size"), -1 ); | 266 | m_view->addColumn(tr("Size"), -1 ); |
267 | m_view->addColumn(tr("Date"), 60 ); | 267 | m_view->addColumn(tr("Date"), 60 ); |
268 | m_view->addColumn(tr("Mime Type"), -1 ); | 268 | m_view->addColumn(tr("Mime Type"), -1 ); |
269 | 269 | ||
270 | 270 | ||
271 | m_view->setSorting( 1 ); | 271 | m_view->setSorting( 1 ); |
272 | m_view->setAllColumnsShowFocus( TRUE ); | 272 | m_view->setAllColumnsShowFocus( TRUE ); |
273 | 273 | ||
274 | lay->addWidget( m_view, 1000 ); | 274 | lay->addWidget( m_view, 1000 ); |
275 | connectSlots(); | 275 | connectSlots(); |
276 | } | 276 | } |
277 | OFileViewFileListView::~OFileViewFileListView() { | 277 | OFileViewFileListView::~OFileViewFileListView() { |
278 | } | 278 | } |
279 | void OFileViewFileListView::slotNew() { | 279 | void OFileViewFileListView::slotNew() { |
280 | DocLnk lnk; | 280 | DocLnk lnk; |
281 | emit selector()->newSelected( lnk ); | 281 | emit selector()->newSelected( lnk ); |
282 | } | 282 | } |
283 | OFileSelectorItem* OFileViewFileListView::currentItem()const{ | 283 | OFileSelectorItem* OFileViewFileListView::currentItem()const{ |