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

List:       kfm-devel
Subject:    Re: [PATCH] GUI for hover close button option
From:       Thomas McGuire <thomasmg () web ! de>
Date:       2004-05-13 14:58:35
Message-ID: 200405131658.35845.thomasmg () web ! de
[Download RAW message or body]

I corrected the patch.
The following changed :

- Hover close buttons are not enabled by default
- No line break in "What's this" help
- Changed the "What's this" help completely, since it did not   
  contain the word "tab". Please review the string, as I am really   
  not sure if it's correct ("mouse" or "the mouse"? "in the tab" or 
  "on the tab"?)

Note that still 4 files are attached, I have no idea how to merge 
them. And I am also still using my backup directory for doing the 
diffs because I am mainly working offline. Hope this does not 
create to much trouble.

If the patch seems correct to you, please commit.

Thanks,
Thomas

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

--- src/kde/kdebase_BACKUP/konqueror/konq_tabs.cc	2004-05-09 11:58:58.000000000 +0200
+++ src/kde/kdebase/konqueror/konq_tabs.cc	2004-05-13 16:17:07.000000000 +0200
@@ -118,13 +118,15 @@ KonqFrameTabs::KonqFrameTabs(QWidget* pa
 
   KConfig *config = KGlobal::config();
   KConfigGroupSaver cs( config, QString::fromLatin1("FMSettings") );
-  m_permanentCloseButtons = config->readBoolEntry( "PermanentCloseButton", false );
-  if (m_permanentCloseButtons) {
+  
+  //Read the config and check if we want to have a close button when
+  //the mouse hovers over the website icon. If so, tell KTabWidget.
+  if (config->readBoolEntry( "HoverCloseButton",false ))
+  {
     setHoverCloseButton( true );
     setHoverCloseButtonDelayed( false );
   }
-  else
-    setHoverCloseButton( config->readBoolEntry( "HoverCloseButton", false ) );
+  
   if (config->readEntry("TabPosition")=="Bottom")
     setTabPosition(QTabWidget::Bottom);
   connect( this, SIGNAL( closeRequest( QWidget * )), SLOT(slotCloseRequest( QWidget * )));
@@ -339,11 +341,8 @@ void KonqFrameTabs::setTitle( const QStr
 void KonqFrameTabs::setTabIcon( const QString &url, QWidget* sender )
 {
   //kdDebug(1202) << "KonqFrameTabs::setTabIcon( " << url << " , " << sender << " )" << endl;
-  QIconSet iconSet;
-  if (m_permanentCloseButtons)
-    iconSet =  SmallIcon( "fileclose" );
-  else
-    iconSet =  QIconSet( KonqPixmapProvider::self()->pixmapFor( url ) );
+  QIconSet iconSet = QIconSet( KonqPixmapProvider::self()->pixmapFor( url ) );
+  
   if (tabIconSet( sender ).pixmap().serialNumber() != iconSet.pixmap().serialNumber())
     setTabIconSet( sender, iconSet );
 }

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

--- src/kde/kdebase_BACKUP/kcontrol/konqhtml/advancedTabOptions.ui	2004-04-05 \
                11:35:16.000000000 +0200
+++ src/kde/kdebase/kcontrol/konqhtml/advancedTabOptions.ui	2004-05-13 \
16:13:44.000000000 +0200 @@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>advancedTabOptions</class>
 <widget class="QWidget">
     <property name="name">
@@ -9,9 +9,12 @@
             <x>0</x>
             <y>0</y>
             <width>644</width>
-            <height>208</height>
+            <height>210</height>
         </rect>
     </property>
+    <property name="caption">
+        <string>advancedTabOptions</string>
+    </property>
     <vbox>
         <property name="name">
             <cstring>unnamed</cstring>
@@ -56,6 +59,9 @@
                     <property name="text">
                         <string>O&amp;pen new tabs in the background</string>
                     </property>
+                    <property name="accel">
+                        <string>Alt+P</string>
+                    </property>
                     <property name="whatsThis" stdset="0">
                         <string>This will open a new tab in the background, instead \
of in the foreground.</string>  </property>
@@ -67,6 +73,9 @@
                     <property name="text">
                         <string>Open &amp;new tab after current tab</string>
                     </property>
+                    <property name="accel">
+                        <string>Alt+N</string>
+                    </property>
                     <property name="whatsThis" stdset="0">
                         <string>This will open a new tab after the current tab, \
instead of after the last tab.</string>  </property>
@@ -78,31 +87,40 @@
                     <property name="text">
                         <string>Confirm &amp;when closing windows with multiple \
tabs</string>  </property>
+                    <property name="accel">
+                        <string>Alt+W</string>
+                    </property>
                     <property name="whatsThis" stdset="0">
                         <string>This will ask you whether you are sure you want to \
close a window when it has multiple tabs opened in it.</string>  </property>
                 </widget>
                 <widget class="QCheckBox">
                     <property name="name">
-                        <cstring>m_pPermanentCloseButton</cstring>
+                        <cstring>m_pHoverCloseButton</cstring>
                     </property>
                     <property name="text">
-                        <string>&amp;Show close button instead of website \
icon</string> +                        <string>&amp;Show close button when mouse \
points over icon</string> +                    </property>
+                    <property name="accel">
+                        <string>Alt+S</string>
                     </property>
                     <property name="whatsThis" stdset="0">
-                        <string>This will display close buttons inside each tab \
instead of websites' icons.</string> +                        <string>When the mouse \
is pointed over the websites' icon in the tab, this icon becomes a close button \
instead.</string>  </property>
                 </widget>
                 <widget class="QCheckBox">
                     <property name="name">
-                       <cstring>m_pPopupsWithinTabs</cstring>
+                        <cstring>m_pPopupsWithinTabs</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Open pop&amp;ups in new tab instead of in new \
window</string> +                    </property>
+                    <property name="accel">
+                        <string>Alt+U</string>
+                    </property>
+                    <property name="whatsThis" stdset="0">
+                        <string>Whether or not JavaScript popups if allowed shall \
open in a new tab or in a new window.</string>  </property>
-                   <property name="text">
-                       <string>Open pop&amp;ups in new tab instead of in new \
                window</string>
-                   </property>
-                   <property name="whatsThis" stdset="0">
-                       <string>Whether or not JavaScript popups if allowed shall \
                open in a new tab or in a new window.</string>
-                   </property>
                 </widget>
                 <widget class="QCheckBox">
                     <property name="name">


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

--- src/kde/kdebase_BACKUP/konqueror/konq_tabs.h	2003-09-29 01:53:57.000000000 +0200
+++ src/kde/kdebase/konqueror/konq_tabs.h	2004-05-12 18:28:08.000000000 +0200
@@ -98,7 +98,7 @@ protected:
   void resizeEvent( QResizeEvent * );
 
   uint tabBarWidthForMaxChars( uint );
-    void refreshSubPopupMenuTab();
+  void refreshSubPopupMenuTab();
 
   QPtrList<KonqFrameBase>* m_pChildFrameList;
 
@@ -113,14 +113,13 @@ private slots:
   void slotReceivedDropEvent( QDropEvent* );
   void slotInitiateDrag( QWidget * );
   void slotReceivedDropEvent( QWidget *, QDropEvent * );
-    void slotSubPopupMenuTabActivated( int);
+  void slotSubPopupMenuTabActivated( int);  
 private:
   KonqViewManager* m_pViewManager;
   QPopupMenu* m_pPopupMenu;
-    QPopupMenu * m_pSubPopupMenuTab;
+  QPopupMenu* m_pSubPopupMenuTab;
   uint m_CurrentMaxLength;
   QToolButton* m_rightWidget;
-  bool m_permanentCloseButtons;
 };
 
 #endif

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

--- src/kde/kdebase_BACKUP/kcontrol/konqhtml/advancedTabDialog.cpp	2004-04-05 \
                11:35:16.000000000 +0200
+++ src/kde/kdebase/kcontrol/konqhtml/advancedTabDialog.cpp	2004-05-13 \
16:14:59.000000000 +0200 @@ -57,11 +57,11 @@ advancedTabDialog::advancedTabDialog(QWi
     connect(m_advancedWidget->m_pNewTabsInBackground, SIGNAL(clicked()), this, \
                SLOT(changed()));
     connect(m_advancedWidget->m_pOpenAfterCurrentPage, SIGNAL(clicked()), this, \
                SLOT(changed()));
     connect(m_advancedWidget->m_pTabConfirm, SIGNAL(clicked()), this, \
                SLOT(changed()));
-    connect(m_advancedWidget->m_pPermanentCloseButton, SIGNAL(clicked()), this, \
SLOT(changed())); +    connect(m_advancedWidget->m_pHoverCloseButton, \
                SIGNAL(clicked()), this, SLOT(changed()));
     connect(m_advancedWidget->m_pKonquerorTabforExternalURL, SIGNAL(clicked()), \
                this, SLOT(changed()));
     connect(m_advancedWidget->m_pPopupsWithinTabs, SIGNAL(clicked()), this, \
SLOT(changed()));  
@@ -77,7 +77,7 @@ void advancedTabDialog::load()
     m_pConfig->setGroup("FMSettings");
     m_advancedWidget->m_pNewTabsInBackground->setChecked( ! \
                (m_pConfig->readBoolEntry( "NewTabsInFront", false )) );
     m_advancedWidget->m_pOpenAfterCurrentPage->setChecked( m_pConfig->readBoolEntry( \
                "OpenAfterCurrentPage", false ) );
-    m_advancedWidget->m_pPermanentCloseButton->setChecked( m_pConfig->readBoolEntry( \
"PermanentCloseButton", false ) ); +    \
m_advancedWidget->m_pHoverCloseButton->setChecked( m_pConfig->readBoolEntry( \
                "HoverCloseButton", false ) );
     m_advancedWidget->m_pKonquerorTabforExternalURL->setChecked( \
                m_pConfig->readBoolEntry( "KonquerorTabforExternalURL", false ) );
     m_advancedWidget->m_pPopupsWithinTabs->setChecked( m_pConfig->readBoolEntry( \
"PopupsWithinTabs", false ) );  
@@ -92,7 +92,7 @@ void advancedTabDialog::save()
     m_pConfig->setGroup("FMSettings");
     m_pConfig->writeEntry( "NewTabsInFront", \
                !(m_advancedWidget->m_pNewTabsInBackground->isChecked()) );
     m_pConfig->writeEntry( "OpenAfterCurrentPage", \
                m_advancedWidget->m_pOpenAfterCurrentPage->isChecked() );
-    m_pConfig->writeEntry( "PermanentCloseButton", \
m_advancedWidget->m_pPermanentCloseButton->isChecked() ); +    m_pConfig->writeEntry( \
                "HoverCloseButton", \
                m_advancedWidget->m_pHoverCloseButton->isChecked() );
     m_pConfig->writeEntry( "KonquerorTabforExternalURL", \
                m_advancedWidget->m_pKonquerorTabforExternalURL->isChecked() );
     m_pConfig->writeEntry( "PopupsWithinTabs", \
m_advancedWidget->m_pPopupsWithinTabs->isChecked() );  m_pConfig->sync();



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

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