Add GUI check box control for the konquerorrc HoverCloseButton configuration option.

This resolves bug report 895.
(cherry picked from commit c84d841ec0)
v3.5.13-sru
Darrell Anderson 12 years ago committed by Slávek Banko
parent 04295ebd9a
commit feec97bdf1

@ -63,6 +63,7 @@ advancedTabDialog::advancedTabDialog(TQWidget* parent, KConfig* config, const ch
connect(m_advancedWidget->m_pTabConfirm, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
connect(m_advancedWidget->m_pTabCloseActivatePrevious, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
connect(m_advancedWidget->m_pPermanentCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
connect(m_advancedWidget->m_pHoverCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
connect(m_advancedWidget->m_pKonquerorTabforExternalURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
connect(m_advancedWidget->m_pPopupsWithinTabs, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
@ -79,6 +80,7 @@ void advancedTabDialog::load()
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 ) );
m_advancedWidget->m_pTabCloseActivatePrevious->setChecked( m_pConfig->readBoolEntry( "TabCloseActivatePrevious", false ) );
@ -86,6 +88,10 @@ void advancedTabDialog::load()
m_pConfig->setGroup("Notification Messages");
m_advancedWidget->m_pTabConfirm->setChecked( !m_pConfig->hasKey("MultipleTabConfirm") );
if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() )
m_advancedWidget->m_pHoverCloseButton->setEnabled(false);
else
m_advancedWidget->m_pHoverCloseButton->setEnabled(true);
actionButton(Apply)->setEnabled(false);
}
@ -95,12 +101,13 @@ void advancedTabDialog::save()
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->writeEntry( "TabCloseActivatePrevious", m_advancedWidget->m_pTabCloseActivatePrevious->isChecked() );
m_pConfig->sync();
// It only matters wether the key is present, its value has no meaning
// It only matters whether the key is present, its value has no meaning
m_pConfig->setGroup("Notification Messages");
if ( m_advancedWidget->m_pTabConfirm->isChecked() ) m_pConfig->deleteEntry( "MultipleTabConfirm" );
else m_pConfig->writeEntry( "MultipleTabConfirm", true );
@ -110,11 +117,19 @@ void advancedTabDialog::save()
kapp->dcopClient()->attach();
KApplication::kApplication()->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data );
if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() )
m_advancedWidget->m_pHoverCloseButton->setEnabled(false);
else
m_advancedWidget->m_pHoverCloseButton->setEnabled(true);
actionButton(Apply)->setEnabled(false);
}
void advancedTabDialog::changed()
{
if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() )
m_advancedWidget->m_pHoverCloseButton->setEnabled(false);
else
m_advancedWidget->m_pHoverCloseButton->setEnabled(true);
actionButton(Apply)->setEnabled(true);
}

@ -93,6 +93,17 @@
<string>This will display close buttons inside each tab instead of websites' icons.</string>
</property>
</widget>
<widget class="TQCheckBox">
<property name="name">
<cstring>m_pHoverCloseButton</cstring>
</property>
<property name="text">
<string>&amp;Show close button instead of website icon with mouse hover</string>
</property>
<property name="whatsThis" stdset="0">
<string>This will display a close button inside each tab instead of websites' icons when the mouse pointer hovers the icon.</string>
</property>
</widget>
<widget class="TQCheckBox">
<property name="name">
<cstring>m_pPopupsWithinTabs</cstring>

Loading…
Cancel
Save