From 10e41144596fc9ced40fc349d9ecd099b1c2ea19 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 11 Dec 2009 20:21:27 +0000 Subject: Initial import of Trinity 3.5.11 to kdebase Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konqueror/about/konq.css | 7 + konqueror/about/konq_aboutpage.cc | 54 ++++++- konqueror/about/launch.html | 18 ++- konqueror/iconview/konq_iconview.desktop | 3 - konqueror/iconview/konq_multicolumnview.desktop | 3 - konqueror/konq_combo.cc | 1 + konqueror/konq_mainwindow.cc | 41 +++++- konqueror/konq_mainwindow.h | 5 + konqueror/listview/konq_detailedlistview.desktop | 1 - konqueror/listview/konq_infolistview.desktop | 1 - konqueror/listview/konq_listviewwidget.cc | 162 +++++++++++++++++---- konqueror/listview/konq_listviewwidget.h | 5 +- konqueror/listview/konq_textview.desktop | 1 - konqueror/listview/konq_treeview.desktop | 1 - .../sidebar/trees/dirtree_module/dirtree_item.cpp | 2 +- 15 files changed, 253 insertions(+), 52 deletions(-) (limited to 'konqueror') diff --git a/konqueror/about/konq.css b/konqueror/about/konq.css index 735861d9e..db6983bc1 100644 --- a/konqueror/about/konq.css +++ b/konqueror/about/konq.css @@ -18,4 +18,11 @@ background-repeat: no-repeat; } +#searchbarlabel { + font-size: 10pt; + font-style: italic; +} +#searchbarinput { + width: 100%; +} diff --git a/konqueror/about/konq_aboutpage.cc b/konqueror/about/konq_aboutpage.cc index 03da9a060..8a5385697 100644 --- a/konqueror/about/konq_aboutpage.cc +++ b/konqueror/about/konq_aboutpage.cc @@ -11,6 +11,9 @@ #include #include #include +#include +#include +#include #include #include @@ -85,8 +88,11 @@ QString KonqAboutPageFactory::loadFile( const QString& file ) QString KonqAboutPageFactory::launch() { + // FIXME: only regenerate launch page if kuriikwsfilterrc changed. + /* if ( s_launch_html ) return *s_launch_html; + */ QString res = loadFile( locate( "data", "konqueror/about/launch.html" )); if ( res.isEmpty() ) @@ -100,6 +106,7 @@ QString KonqAboutPageFactory::launch() QString wastebin_icon_path = iconloader->iconPath("trashcan_full", KIcon::Desktop ); QString applications_icon_path = iconloader->iconPath("kmenu", KIcon::Desktop ); QString settings_icon_path = iconloader->iconPath("kcontrol", KIcon::Desktop ); + QString help_icon_path = iconloader->iconPath("khelpcenter", KIcon::Desktop ); QString home_folder = QDir::homeDirPath(); QString continue_icon_path = QApplication::reverseLayout()?iconloader->iconPath("1leftarrow", KIcon::Small ):iconloader->iconPath("1rightarrow", KIcon::Small ); @@ -109,6 +116,26 @@ QString KonqAboutPageFactory::launch() else res = res.arg( "" ); + // Try to split page in three. If it succeeds, insert the default search into the middle part. + QStringList parts = QStringList::split( "", res ); + if ( parts.count() == 3 ) { + KConfig config( "kuriikwsfilterrc", true /*read-only*/, false /*no KDE globals*/ ); + config.setGroup( "General" ); + QString name = config.readEntry("DefaultSearchEngine"); + KService::Ptr service = + KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(name)); + if ( service ) { + QString searchBar = parts[1]; + searchBar = searchBar + .arg( iconSize ).arg( iconSize ) + .arg( service->name() ) + .arg( service->property("Keys").toStringList()[0] ) + ; + res = parts[0] + searchBar + parts[2]; + } + else res = parts[0] + parts[2]; + } + res = res.arg( i18n("Conquer your Desktop!") ) .arg( i18n( "Konqueror" ) ) .arg( i18n("Conquer your Desktop!") ) @@ -139,10 +166,10 @@ QString KonqAboutPageFactory::launch() .arg(iconSize).arg(iconSize) .arg( i18n( "Applications" ) ) .arg( i18n( "Installed programs" ) ) - .arg( settings_icon_path ) + .arg( help_icon_path ) .arg(iconSize).arg(iconSize) - .arg( i18n( "Settings" ) ) - .arg( i18n( "Desktop configuration" ) ) + .arg( i18n( "About Kubuntu" ) ) + .arg( i18n( "Kubuntu Documentation" ) ) .arg( continue_icon_path ) .arg( KIcon::SizeSmall ).arg( KIcon::SizeSmall ) .arg( i18n( "Next: An Introduction to Konqueror" ) ) @@ -422,10 +449,23 @@ KonqAboutPage::~KonqAboutPage() bool KonqAboutPage::openURL( const KURL &u ) { - if (u.url() == "about:plugins") - serve( KonqAboutPageFactory::plugins(), "plugins" ); - else serve( KonqAboutPageFactory::launch(), "konqueror" ); - return true; + kdDebug(1202) << "now in KonqAboutPage::openURL( \"" << u.url() << "\" )" << endl; + if ( u.url() == "about:plugins" ) + serve( KonqAboutPageFactory::plugins(), "plugins" ); + else if ( !u.query().isEmpty() ) { + QMap< QString, QString > queryItems = u.queryItems( 0 ); + QMap< QString, QString >::ConstIterator query = queryItems.begin(); + QString newUrl; + if (query.key() == "strigi") { + newUrl = KURIFilter::self()->filteredURI( query.key() + ":?q=" + query.data() ); + } else { + newUrl = KURIFilter::self()->filteredURI( query.key() + ":" + query.data() ); + } + kdDebug(1202) << "scheduleRedirection( 0, \"" << newUrl << "\" )" << endl; + scheduleRedirection( 0, newUrl ); + } + else serve( KonqAboutPageFactory::launch(), "konqueror" ); + return true; } bool KonqAboutPage::openFile() diff --git a/konqueror/about/launch.html b/konqueror/about/launch.html index 80ad01eaa..9acc5d6a9 100644 --- a/konqueror/about/launch.html +++ b/konqueror/about/launch.html @@ -60,6 +60,20 @@
+ + + + + + + + + + + + + +
@@ -96,10 +110,10 @@ %1
%1
- + - %1
%1 + %1
%1
diff --git a/konqueror/iconview/konq_iconview.desktop b/konqueror/iconview/konq_iconview.desktop index 2d355b771..8f85b9146 100644 --- a/konqueror/iconview/konq_iconview.desktop +++ b/konqueror/iconview/konq_iconview.desktop @@ -85,8 +85,5 @@ X-KDE-Library=konq_iconview X-KDE-BrowserView-AllowAsDefault=true X-KDE-BrowserView-HideFromMenus=true X-KDE-BrowserView-Args=IconView -X-KDE-BrowserView-ModeProperty=viewMode -X-KDE-BrowserView-ModePropertyValue=IconView -X-KDE-BrowserView-Built-Into=konqueror Icon=view_icon InitialPreference=10 diff --git a/konqueror/iconview/konq_multicolumnview.desktop b/konqueror/iconview/konq_multicolumnview.desktop index 94b6c7288..2b3e55dd9 100644 --- a/konqueror/iconview/konq_multicolumnview.desktop +++ b/konqueror/iconview/konq_multicolumnview.desktop @@ -85,8 +85,5 @@ X-KDE-Library=konq_iconview X-KDE-BrowserView-AllowAsDefault=true X-KDE-BrowserView-HideFromMenus=true X-KDE-BrowserView-Args=MultiColumnView -X-KDE-BrowserView-ModeProperty=viewMode -X-KDE-BrowserView-ModePropertyValue=MultiColumnView -X-KDE-BrowserView-Built-Into=konqueror Icon=view_multicolumn InitialPreference=9 diff --git a/konqueror/konq_combo.cc b/konqueror/konq_combo.cc index 2e5279474..4ea68abb3 100644 --- a/konqueror/konq_combo.cc +++ b/konqueror/konq_combo.cc @@ -204,6 +204,7 @@ void KonqCombo::removeDuplicates( int index ) if ( item == url ) removeItem( i ); } + lineEdit()->setCursorPosition( 0 ); } // called via DCOP in all instances diff --git a/konqueror/konq_mainwindow.cc b/konqueror/konq_mainwindow.cc index 071c7e0be..e2e516b39 100644 --- a/konqueror/konq_mainwindow.cc +++ b/konqueror/konq_mainwindow.cc @@ -563,7 +563,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url, kdDebug(1202) << "trying openView for " << url << " (serviceType " << serviceType << ")" << endl; if ( ( !serviceType.isEmpty() && serviceType != "application/octet-stream") || - url.url() == "about:konqueror" || url.url() == "about:plugins" ) + url.url().startsWith("about:konqueror") || url.url() == "about:plugins" ) { KService::Ptr offer = KServiceTypeProfile::preferredService(serviceType, "Application"); // If the associated app is konqueror itself, then make sure we try to embed before bailing out. @@ -731,7 +731,7 @@ bool KonqMainWindow::openView( QString serviceType, const KURL &_url, KonqView * QString serviceName; // default: none provided - if ( url.url() == "about:konqueror" || url.url() == "about:plugins" ) + if ( url.url().startsWith("about:konqueror") || url.url() == "about:plugins" ) { serviceType = "KonqAboutPage"; // not KParts/ReadOnlyPart, it fills the Location menu ! :) serviceName = "konq_aboutpage"; @@ -1772,6 +1772,34 @@ void KonqMainWindow::slotReload( KonqView* reloadView ) } } +void KonqMainWindow::slotReloadStop() { + if (m_paReloadStop->icon() == "reload") { + slotReload(); + toggleReloadStopButton(true); + } else { + slotStop(); + toggleReloadStopButton(false); + } +} + +void KonqMainWindow::toggleReloadStopButton(bool isReload) { + //m_paStop = new KAction( i18n( "&Stop" ), "stop", Key_Escape, this, SLOT( slotStop() ), actionCollection(), "stop" ); + if (isReload) { + m_paReloadStop->setIcon("stop"); + m_paReloadStop->setWhatsThis( i18n( "Stop loading the document

" + "All network transfers will be stopped and Konqueror will display the content " + "that has been received so far." ) ); + m_paReloadStop->setToolTip( i18n( "Stop loading the document" ) ); + //m_paReloadStop = new KAction( i18n( "&Reload" ), "reload", reloadShortcut, this, SLOT( slotReloadStop() ), actionCollection(), "reload" ); + } else { + m_paReloadStop->setIcon("reload"); + m_paReloadStop->setWhatsThis( i18n( "Reload the currently displayed document

" + "This may, for example, be needed to refresh webpages that have been " + "modified since they were loaded, in order to make the changes visible." ) ); + m_paReloadStop->setToolTip( i18n( "Reload the currently displayed document" ) ); + } +} + void KonqMainWindow::slotReloadPopup() { if (m_pWorkingTab) @@ -2196,7 +2224,7 @@ void KonqMainWindow::slotPartActivated( KParts::Part *part ) KService::Ptr serv = KService::serviceByDesktopName( ittb.current()->name() ); if ( serv && viewModeActionKey( serv ) == currentServiceLibrary ) { KToggleAction* ta = static_cast( ittb.current() ); - ta->setChecked( true ); + ta->setChecked( false ); QString servicename = m_currentView->service()->genericName(); if (servicename.isEmpty()) servicename = m_currentView->service()->name(); @@ -3664,6 +3692,7 @@ void KonqMainWindow::startAnimation() //kdDebug(1202) << "KonqMainWindow::startAnimation" << endl; m_paAnimatedLogo->start(); m_paStop->setEnabled( true ); + toggleReloadStopButton( true ); } void KonqMainWindow::stopAnimation() @@ -3671,6 +3700,7 @@ void KonqMainWindow::stopAnimation() //kdDebug(1202) << "KonqMainWindow::stopAnimation" << endl; m_paAnimatedLogo->stop(); m_paStop->setEnabled( false ); + toggleReloadStopButton( false ); } void KonqMainWindow::setUpEnabled( const KURL &url ) @@ -3833,6 +3863,8 @@ void KonqMainWindow::initActions() reloadShortcut.append(KKey(CTRL + Key_R)); m_paReload = new KAction( i18n( "&Reload" ), "reload", reloadShortcut, this, SLOT( slotReload() ), actionCollection(), "reload" ); m_paReloadAllTabs = new KAction( i18n( "&Reload All Tabs" ), "reload_all_tabs", SHIFT+Key_F5, this, SLOT( slotReloadAllTabs() ), actionCollection(), "reload_all_tabs" ); + + m_paReloadStop = new KAction( i18n( "&Reload/Stop" ), "reload", 0, this, SLOT( slotReloadStop() ), actionCollection(), "reload_stop" ); m_paUndo = KStdAction::undo( KonqUndoManager::self(), SLOT( undo() ), actionCollection(), "undo" ); //m_paUndo->setEnabled( KonqUndoManager::self()->undoAvailable() ); @@ -4067,6 +4099,7 @@ void KonqMainWindow::updateToolBarActions( bool pendingAction /*=false*/) { m_paAnimatedLogo->stop(); m_paStop->setEnabled( pendingAction ); //enable/disable based on any pending actions... + toggleReloadStopButton( pendingAction ); } if ( m_currentView && m_currentView->url().isLocalFile() && @@ -4368,6 +4401,7 @@ void KonqMainWindow::enableAllActions( bool enable ) updateViewActions(); // undo, lock, link and other view-dependent actions m_paStop->setEnabled( m_currentView && m_currentView->isLoading() ); + toggleReloadStopButton( m_currentView && m_currentView->isLoading() ); if (m_toggleViewGUIClient) { @@ -5089,7 +5123,6 @@ void KonqMainWindow::updateViewModeActions() bool bIsCurrentView = (*it)->desktopEntryName() == m_currentView->service()->desktopEntryName(); if ( bIsCurrentView ) { - (*mapIt)->setChecked( true ); action->setChecked( true ); } diff --git a/konqueror/konq_mainwindow.h b/konqueror/konq_mainwindow.h index a99c485bf..3dbba5658 100644 --- a/konqueror/konq_mainwindow.h +++ b/konqueror/konq_mainwindow.h @@ -313,6 +313,8 @@ public: static bool isPreloaded() { return s_preloaded; } static void setPreloadedWindow( KonqMainWindow* ); static KonqMainWindow* preloadedWindow() { return s_preloadedWindow; } + + void toggleReloadStopButton(bool isStop); QString currentTitle() const; QString currentURL() const; @@ -375,6 +377,7 @@ public slots: void slotLinkView(); void slotReload( KonqView* view = 0L ); void slotStop(); + void slotReloadStop(); // Go menu void slotUp(); @@ -649,6 +652,8 @@ private: KAction *m_paStop; KAction *m_paRename; + KAction *m_paReloadStop; + KAction *m_paTrash; KAction *m_paDelete; diff --git a/konqueror/listview/konq_detailedlistview.desktop b/konqueror/listview/konq_detailedlistview.desktop index 9dc4938bd..ceb220194 100644 --- a/konqueror/listview/konq_detailedlistview.desktop +++ b/konqueror/listview/konq_detailedlistview.desktop @@ -84,6 +84,5 @@ ServiceTypes=KParts/ReadOnlyPart,Browser/View X-KDE-Library=konq_listview X-KDE-BrowserView-Args=DetailedList X-KDE-BrowserView-HideFromMenus=true -X-KDE-BrowserView-Built-Into=konqueror Icon=view_detailed InitialPreference=7 diff --git a/konqueror/listview/konq_infolistview.desktop b/konqueror/listview/konq_infolistview.desktop index 12186d8f7..bee857315 100644 --- a/konqueror/listview/konq_infolistview.desktop +++ b/konqueror/listview/konq_infolistview.desktop @@ -82,6 +82,5 @@ ServiceTypes=KParts/ReadOnlyPart,Browser/View X-KDE-Library=konq_listview X-KDE-BrowserView-Args=InfoListView X-KDE-BrowserView-HideFromMenus=true -X-KDE-BrowserView-Built-Into=konqueror Icon=view_detailed InitialPreference=7 diff --git a/konqueror/listview/konq_listviewwidget.cc b/konqueror/listview/konq_listviewwidget.cc index f3016b433..7d9231758 100644 --- a/konqueror/listview/konq_listviewwidget.cc +++ b/konqueror/listview/konq_listviewwidget.cc @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -405,9 +406,11 @@ void KonqBaseListViewWidget::contentsMousePressEvent( QMouseEvent *e ) { if ( m_rubber ) { - drawRubber(); - delete m_rubber; - m_rubber = 0; + + QRect r( m_rubber->normalize() ); + delete m_rubber; + m_rubber = 0; + repaintContents( r, FALSE ); } delete m_selected; @@ -417,14 +420,15 @@ void KonqBaseListViewWidget::contentsMousePressEvent( QMouseEvent *e ) KonqBaseListViewItem* item = isExecuteArea( vp ) ? static_cast( itemAt( vp ) ) : 0L; - if ( item ) + if ( item ) { KListView::contentsMousePressEvent( e ); + } else { if ( e->button() == LeftButton ) { - if ( !( e->state() & ControlButton ) ) - setSelected( itemAt( vp ), false ); m_rubber = new QRect( e->x(), e->y(), 0, 0 ); + clearSelection(); + emit selectionChanged(); m_fileTip->setItem( 0 ); } if ( e->button() != RightButton ) @@ -440,9 +444,11 @@ void KonqBaseListViewWidget::contentsMouseReleaseEvent( QMouseEvent *e ) { if ( m_rubber ) { - drawRubber(); + + QRect r( m_rubber->normalize() ); delete m_rubber; m_rubber = 0; + repaintContents( r, FALSE ); } if ( m_scrollTimer ) @@ -534,23 +540,21 @@ void KonqBaseListViewWidget::leaveEvent( QEvent *e ) KListView::leaveEvent( e ); } -void KonqBaseListViewWidget::drawRubber() +void KonqBaseListViewWidget::drawRubber( QPainter *p ) { if ( !m_rubber ) return; - QPainter p; - p.begin( viewport() ); - p.setRasterOp( NotROP ); - p.setPen( QPen( color0, 1 ) ); - p.setBrush( NoBrush ); + p->setRasterOp( NotROP ); + p->setPen( QPen( color0, 1 ) ); + p->setBrush( NoBrush ); QPoint pt( m_rubber->x(), m_rubber->y() ); pt = contentsToViewport( pt ); - style().drawPrimitive( QStyle::PE_FocusRect, &p, + style().drawPrimitive( QStyle::PE_RubberBand, p, QRect( pt.x(), pt.y(), m_rubber->width(), m_rubber->height() ), colorGroup(), QStyle::Style_Default, colorGroup().base() ); - p.end(); + } void KonqBaseListViewWidget::slotAutoScroll() @@ -566,10 +570,12 @@ void KonqBaseListViewWidget::slotAutoScroll() if ( vc == m_rubber->bottomRight() ) return; + QRect oldRubber = *m_rubber; + const int oldTop = m_rubber->normalize().top(); const int oldBottom = m_rubber->normalize().bottom(); - drawRubber(); + m_rubber->setBottomRight( vc ); QListViewItem *cur = itemAt( QPoint(0,0) ); @@ -577,12 +583,20 @@ void KonqBaseListViewWidget::slotAutoScroll() bool block = signalsBlocked(); blockSignals( true ); + QRect rr; QRect nr = m_rubber->normalize(); + bool changed = FALSE; + if ( cur ) { - QRect rect = itemRect( cur ); - if ( !allColumnsShowFocus() ) + QRect rect; + if ( allColumnsShowFocus() ) + rect = itemRect( cur ); + else { + rect = itemRect( cur ); rect.setWidth( executeArea( cur ) ); + } + rect = QRect( viewportToContents( rect.topLeft() ), viewportToContents( rect.bottomRight() ) ); @@ -606,9 +620,26 @@ void KonqBaseListViewWidget::slotAutoScroll() if ( rect.intersects( nr ) ) { if ( !cur->isSelected() && cur->isSelectable() ) + { setSelected( cur, true ); - } else if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) ) - setSelected( cur, false ); + changed = TRUE; + rr = rr.unite( itemRect( cur ) ); + } + } + else + { + if ( cur->isSelected() ) + { + changed = TRUE; + rr = rr.unite( itemRect( cur ) ); + } + + if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) ) + { + setSelected( cur, false ); + } + } + cur = cur->itemBelow(); if (cur && !allColumnsShowFocus()) @@ -625,9 +656,26 @@ void KonqBaseListViewWidget::slotAutoScroll() if ( rect.intersects( nr ) ) { if ( !cur->isSelected() && cur->isSelectable() ) + { setSelected( cur, true ); - } else if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) ) - setSelected( cur, false ); + changed = TRUE; + rr = rr.unite( itemRect( cur ) ); + } + } + else + { + if ( cur->isSelected() ) + { + changed = TRUE; + rr = rr.unite( itemRect( cur ) ); + } + + if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) ) + { + setSelected( cur, false ); + } + } + cur = cur->itemAbove(); if (cur && !allColumnsShowFocus()) @@ -639,7 +687,31 @@ void KonqBaseListViewWidget::slotAutoScroll() blockSignals( block ); emit selectionChanged(); - drawRubber(); + QRect allRect = oldRubber.normalize(); + if ( changed ) + { + allRect |= rr.normalize(); + } + allRect |= m_rubber->normalize(); + QPoint point = contentsToViewport( allRect.topLeft() ); + allRect = QRect( point.x(), point.y(), allRect.width(), allRect.height() ); + allRect &= viewport()->rect(); + allRect.addCoords( -2, -2, 2, 2 ); + + QPixmap backrubber( viewport()->rect().size() ); + backrubber.fill( viewport(), viewport()->rect().topLeft() ); + + QPainter p( &backrubber ); + p.save(); + drawContentsOffset( &p, + contentsX(), + contentsY(), + contentsX() + allRect.left(), contentsY() + allRect.top(), + allRect.width(), allRect.height() ); + p.restore(); + drawRubber( &p ); + p.end(); + bitBlt( viewport(), allRect.topLeft(), &backrubber, allRect ); const int scroll_margin = 40; ensureVisible( vc.x(), vc.y(), scroll_margin, scroll_margin ); @@ -669,9 +741,12 @@ void KonqBaseListViewWidget::slotAutoScroll() void KonqBaseListViewWidget::viewportPaintEvent( QPaintEvent *e ) { - drawRubber(); + KListView::viewportPaintEvent( e ); - drawRubber(); + + QPainter p( viewport() ); + drawRubber( &p ); + p.end(); } void KonqBaseListViewWidget::viewportResizeEvent(QResizeEvent * e) @@ -904,7 +979,42 @@ void KonqBaseListViewWidget::slotReturnPressed( QListViewItem *_item ) url.cleanPath(); bool isIntoTrash = url.isLocalFile() && url.path(1).startsWith(KGlobalSettings::trashPath()); if ( !isIntoTrash || (isIntoTrash && fileItem->isDir()) ) - m_pBrowserView->lmbClicked( fileItem ); + { + m_pBrowserView->lmbClicked( fileItem ); + + if (_item->pixmap(0) != 0) + { + // Rect of the QListViewItem's pixmap area. + QRect rect = _item->listView()->itemRect(_item); + + // calculate nesting depth + int nestingDepth = 0; + for (QListViewItem *currentItem = _item->parent(); + currentItem != 0; + currentItem = currentItem->parent()) + nestingDepth++; + + // no parent no indent + if (_item->parent() == 0) + nestingDepth = 0; + + // Root decoration means additional indent + if (_item->listView()->rootIsDecorated()) + nestingDepth++; + + // set recalculated rect + rect.setLeft(_item->listView()->itemMargin() + _item->listView()->treeStepSize() * nestingDepth); + rect.setWidth(_item->pixmap(0)->width()); + + // gather pixmap + QPixmap *pix = new QPixmap(*(_item->pixmap(0))); + + // call the icon effect + KIconEffect::visualActivate(viewport(), rect, pix); + + delete(pix); + } + } else KMessageBox::information( 0, i18n("You must take the file out of the trash before being able to use it.") ); } diff --git a/konqueror/listview/konq_listviewwidget.h b/konqueror/listview/konq_listviewwidget.h index bc4161862..d6451e50d 100644 --- a/konqueror/listview/konq_listviewwidget.h +++ b/konqueror/listview/konq_listviewwidget.h @@ -206,7 +206,7 @@ protected: virtual void viewportPaintEvent( QPaintEvent *e ); virtual void viewportResizeEvent( QResizeEvent *e ); - virtual void drawRubber(); + virtual void drawRubber( QPainter * ); virtual void contentsMousePressEvent( QMouseEvent *e ); virtual void contentsMouseReleaseEvent( QMouseEvent *e ); virtual void contentsMouseMoveEvent( QMouseEvent *e ); @@ -246,7 +246,8 @@ protected: QColor m_itemColor; QRect *m_rubber; - + QPixmap *m_backrubber; + bool m_bTopLevelComplete:1; bool m_showIcons:1; bool m_bCaseInsensitive:1; diff --git a/konqueror/listview/konq_textview.desktop b/konqueror/listview/konq_textview.desktop index f5d4e5c98..1a88b242b 100644 --- a/konqueror/listview/konq_textview.desktop +++ b/konqueror/listview/konq_textview.desktop @@ -85,6 +85,5 @@ ServiceTypes=Browser/View X-KDE-Library=konq_listview X-KDE-BrowserView-Args=TextView X-KDE-BrowserView-HideFromMenus=true -X-KDE-BrowserView-Built-Into=konqueror Icon=view_text InitialPreference=6 diff --git a/konqueror/listview/konq_treeview.desktop b/konqueror/listview/konq_treeview.desktop index 3fcce32db..3f9f0890c 100644 --- a/konqueror/listview/konq_treeview.desktop +++ b/konqueror/listview/konq_treeview.desktop @@ -85,6 +85,5 @@ X-KDE-Library=konq_listview X-KDE-BrowserView-Args=MixedTree X-KDE-BrowserView-HideFromMenus=true X-KDE-BrowserView-HierarchicalView=true -X-KDE-BrowserView-Built-Into=konqueror Icon=view_tree InitialPreference=8 diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp index 78132010a..7f7ee8849 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp @@ -105,7 +105,7 @@ bool KonqSidebarDirTreeItem::hasStandardIcon() { // The reason why we can't use KFileItem::iconName() is that it doesn't // take custom icons in .directory files into account - return m_fileItem->determineMimeType()->icon( m_fileItem->url(), m_fileItem->isLocalFile() ) == "folder"; + return m_fileItem->iconName() == "folder"; } void KonqSidebarDirTreeItem::paintCell( QPainter *_painter, const QColorGroup & _cg, int _column, int _width, int _alignment ) -- cgit v1.2.3