[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [PATCH] Konqueror: website icon in icons visible with close buttons
From:       Bram Schoenmakers <bramschoenmakers () kde ! nl>
Date:       2006-06-17 18:55:42
Message-ID: 200606172055.42872.bramschoenmakers () kde ! nl
[Download RAW message or body]

Hi,

Since I consider the following patch more as a wish than a bug fix I propose 
it here first. It changes the behaviour behind the (well hidden) option in 
Konqueror "Show close button instead of website icon". This patch will make 
the website icon always visible, unless the mouse is hovering the icon, then 
it shows a close button. This implies a string change as well (not in the 
patch).

Is it OK to apply this to the 3.5 branch?

Kind regards,

-- 
Bram Schoenmakers
KDE Netherlands (www.kde.nl)

Jabber - bram@kde.org

["konq_tab_icon.diff" (text/x-diff)]

Index: konq_tabs.cc
===================================================================
--- konq_tabs.cc	(revision 552068)
+++ konq_tabs.cc	(working copy)
@@ -94,7 +94,7 @@
                             i18n("&Duplicate Tab"),
                             m_pViewManager->mainWindow(),
                             SLOT( slotDuplicateTabPopup() ),
-                            m_pViewManager->mainWindow()->action("duplicatecurrenttab")->shortcut(), 
+                            m_pViewManager->mainWindow()->action("duplicatecurrenttab")->shortcut(),
                             DUPLICATE_ID );
   m_pPopupMenu->insertItem( SmallIconSet( "tab_breakoff" ),
                             i18n("D&etach Tab"),
@@ -124,7 +124,7 @@
   m_permanentCloseButtons = KonqSettings::permanentCloseButton();
   if (m_permanentCloseButtons) {
     setHoverCloseButton( true );
-    setHoverCloseButtonDelayed( false );
+    setHoverCloseButtonDelayed( true );
   }
   else
     setHoverCloseButton( KonqSettings::hoverCloseButton() );
@@ -256,11 +256,7 @@
 void KonqFrameTabs::setTabIcon( const KURL &url, QWidget* sender )
 {
   //kdDebug(1202) << "KonqFrameTabs::setTabIcon( " << url << " , " << sender << " )" << endl;
-  QIconSet iconSet;
-  if (m_permanentCloseButtons)
-    iconSet =  SmallIcon( "fileclose" );
-  else
-    iconSet =  SmallIconSet( KonqPixmapProvider::self()->iconNameFor( url.url() ) );
+  QIconSet iconSet = SmallIconSet( KonqPixmapProvider::self()->iconNameFor( url.url() ) );
   if (tabIconSet( sender ).pixmap().serialNumber() != iconSet.pixmap().serialNumber())
     setTabIconSet( sender, iconSet );
 }
@@ -360,21 +356,21 @@
 void KonqFrameTabs::slotContextMenu( const QPoint &p )
 {
   refreshSubPopupMenuTab();
-  
+
   m_pPopupMenu->setItemEnabled( RELOAD_ID, false );
   m_pPopupMenu->setItemEnabled( DUPLICATE_ID, false );
   m_pPopupMenu->setItemEnabled( BREAKOFF_ID, false );
   m_pPopupMenu->setItemEnabled( CLOSETAB_ID, false );
   m_pPopupMenu->setItemEnabled( OTHERTABS_ID, true );
   m_pSubPopupMenuTab->setItemEnabled( m_closeOtherTabsId, false );
- 
+
   m_pPopupMenu->exec( p );
 }
 
 void KonqFrameTabs::slotContextMenu( QWidget *w, const QPoint &p )
 {
   refreshSubPopupMenuTab();
-  
+
   uint tabCount = m_pChildFrameList->count();
   m_pPopupMenu->setItemEnabled( RELOAD_ID, true );
   m_pPopupMenu->setItemEnabled( DUPLICATE_ID, true );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic