author | zecke <zecke> | 2005-02-05 15:47:16 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-02-05 15:47:16 (UTC) |
commit | 8ba13dd38e7da296177719dcc8fddbbe978a4b9a (patch) (unidiff) | |
tree | fdba0d440e7b462faa2b845a0f4364cff134166f /noncore/graphics/opie-eye/gui/iconview.cpp | |
parent | 28c5c88c3535c035bd26abd988ef7fb0e098143f (diff) | |
download | opie-8ba13dd38e7da296177719dcc8fddbbe978a4b9a.zip opie-8ba13dd38e7da296177719dcc8fddbbe978a4b9a.tar.gz opie-8ba13dd38e7da296177719dcc8fddbbe978a4b9a.tar.bz2 |
Add a special MessageBox to squeeze the path to fit onto the screen.
This is a fix for #1539
Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 138e661..b2443e8 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp | |||
@@ -1,18 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * GPLv2 zecke@handhelds.org | 2 | * GPLv2 zecke@handhelds.org |
3 | * No WArranty... | 3 | * No WArranty... |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "iconview.h" | 6 | #include "iconview.h" |
7 | #include "messagebox.h" | ||
7 | 8 | ||
8 | #include <lib/imagecache.h> | 9 | #include <lib/imagecache.h> |
9 | #include <gui/imageinfoui.h> | 10 | #include <gui/imageinfoui.h> |
10 | 11 | ||
11 | #include <iface/dirview.h> | 12 | #include <iface/dirview.h> |
12 | #include <iface/dirlister.h> | 13 | #include <iface/dirlister.h> |
13 | 14 | ||
14 | #include <opie2/oconfig.h> | 15 | #include <opie2/oconfig.h> |
15 | #include <opie2/okeyconfigwidget.h> | 16 | #include <opie2/okeyconfigwidget.h> |
16 | #include <opie2/odebug.h> | 17 | #include <opie2/odebug.h> |
17 | #include <opie2/oimagescrollview.h> | 18 | #include <opie2/oimagescrollview.h> |
18 | 19 | ||
@@ -368,31 +369,30 @@ QString PIconView::prevFileName(bool &isDir)const{ | |||
368 | return QString::null; | 369 | return QString::null; |
369 | _it = _it->prevItem(); | 370 | _it = _it->prevItem(); |
370 | if ( !_it ) | 371 | if ( !_it ) |
371 | return QString::null; | 372 | return QString::null; |
372 | IconViewItem* it = static_cast<IconViewItem*>( _it ); | 373 | IconViewItem* it = static_cast<IconViewItem*>( _it ); |
373 | isDir = it->isDir(); | 374 | isDir = it->isDir(); |
374 | return it->path(); | 375 | return it->path(); |
375 | } | 376 | } |
376 | 377 | ||
377 | void PIconView::slotTrash() { | 378 | void PIconView::slotTrash() { |
378 | bool isDir; | 379 | bool isDir; |
379 | QString pa = currentFileName( isDir ); | 380 | QString pa = currentFileName( isDir ); |
380 | if ( isDir && pa.isEmpty() ) | 381 | if ( isDir || pa.isEmpty() ) |
381 | return; | 382 | return; |
382 | 383 | ||
383 | if (!QPEMessageBox::confirmDelete( this, | 384 | if (!OMessageBox::confirmDelete( this, tr("the Image"), |
384 | tr("Delete Image" ), | 385 | pa, tr("Delete Image" ))) |
385 | tr("the Image %1" ).arg(pa))) | 386 | return; |
386 | return | ||
387 | 387 | ||
388 | 388 | ||
389 | currentView()->dirLister()->deleteImage( pa ); | 389 | currentView()->dirLister()->deleteImage( pa ); |
390 | delete m_view->currentItem(); | 390 | delete m_view->currentItem(); |
391 | } | 391 | } |
392 | 392 | ||
393 | /* | 393 | /* |
394 | * see what views are available | 394 | * see what views are available |
395 | */ | 395 | */ |
396 | void PIconView::loadViews() { | 396 | void PIconView::loadViews() { |
397 | ViewMap::Iterator it; | 397 | ViewMap::Iterator it; |
398 | ViewMap* map = viewMap(); | 398 | ViewMap* map = viewMap(); |
@@ -421,27 +421,24 @@ void PIconView::resetView() { | |||
421 | } | 421 | } |
422 | calculateGrid(); | 422 | calculateGrid(); |
423 | } | 423 | } |
424 | } else { | 424 | } else { |
425 | m_iconsize = 64; | 425 | m_iconsize = 64; |
426 | } | 426 | } |
427 | slotViewChanged(m_views->currentItem()); | 427 | slotViewChanged(m_views->currentItem()); |
428 | m_internalReset = false; | 428 | m_internalReset = false; |
429 | } | 429 | } |
430 | 430 | ||
431 | void PIconView::polish() | 431 | void PIconView::polish() |
432 | { | 432 | { |
433 | odebug << "===\n" | ||
434 | << "PIconView::polish()\n" | ||
435 | << "====" << oendl; | ||
436 | QVBox::polish(); | 433 | QVBox::polish(); |
437 | 434 | ||
438 | QString lastView = m_cfg->readEntry("LastView",""); | 435 | QString lastView = m_cfg->readEntry("LastView",""); |
439 | int cc=0; | 436 | int cc=0; |
440 | for (; cc<m_views->count();++cc) { | 437 | for (; cc<m_views->count();++cc) { |
441 | if (m_views->text(cc)==lastView) { | 438 | if (m_views->text(cc)==lastView) { |
442 | break; | 439 | break; |
443 | } | 440 | } |
444 | } | 441 | } |
445 | if (cc<m_views->count()) { | 442 | if (cc<m_views->count()) { |
446 | m_views->setCurrentItem(cc); | 443 | m_views->setCurrentItem(cc); |
447 | slotViewChanged(cc); | 444 | slotViewChanged(cc); |