konqueror: add option to enable/disable using double click to navitage to the parent folder. This resolves issue #329

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/341/head
Michele Calgaro 1 year ago
parent e539275ad3
commit f3ddd5b7cd
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -126,6 +126,11 @@ KBehaviourOptions::KBehaviourOptions(TDEConfig *config, TQString group, TQWidget
"renamed by clicking directly on the icon name. "));
connect(cbRenameDirectlyIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
cbDoubleClickMoveToParent = new TQCheckBox(i18n("Double click on empty area to move to parent folder"), vbox);
TQWhatsThis::add(cbDoubleClickMoveToParent, i18n("When this option is enabled, double clicking an "
"empty area will navigate to the parent folder."));
connect(cbDoubleClickMoveToParent, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
TQHBoxLayout *hlay = new TQHBoxLayout( lay );
label = new TQLabel(i18n("Home &URL:"), this);
@ -213,6 +218,8 @@ void KBehaviourOptions::load( bool useDefaults )
cbRenameDirectlyIcon->setChecked( g_pConfig->readBoolEntry("RenameIconDirectly", DEFAULT_RENAMEICONDIRECTLY ) );
cbDoubleClickMoveToParent->setChecked(g_pConfig->readBoolEntry("DoubleClickMoveToParent", true));
TDEConfig globalconfig("kdeglobals", true, false);
globalconfig.setGroup( "KDE" );
cbShowDeleteCommand->setChecked( globalconfig.readBoolEntry("ShowDeleteCommand", false) );
@ -254,6 +261,7 @@ void KBehaviourOptions::save()
// g_pConfig->writeEntry( "FileTipsItems", sbToolTip->value() );
g_pConfig->writeEntry( "RenameIconDirectly", cbRenameDirectlyIcon->isChecked());
g_pConfig->writeEntry( "DoubleClickMoveToParent", cbDoubleClickMoveToParent->isChecked());
TDEConfig sidebarconfig("konqsidebartng.rc");
sidebarconfig.setGroup( "" );

@ -68,6 +68,7 @@ private:
TQCheckBox *cbShowTips;
TQCheckBox *cbShowPreviewsInTips;
TQCheckBox *cbRenameDirectlyIcon;
TQCheckBox *cbDoubleClickMoveToParent;
TQCheckBox *cbMoveToTrash;
TQCheckBox *cbDelete;

@ -45,6 +45,12 @@
<whatsthis>Checking this option will allow files to be renamed by clicking directly on the icon name.</whatsthis>
<!-- checked -->
</entry>
<entry key="DoubleClickMoveToParent" type="Bool">
<default>true</default>
<label>Double click on empty area to move to parent folder</label>
<whatsthis>When this option is enabled, double clicking an empty area will navigate to the parent folder.</whatsthis>
<!-- checked -->
</entry>
<entry key="ShowDeleteCommand" type="Bool">
<default>true</default>
<label>Show 'Delete' menu entries which bypass the trashcan</label>

@ -525,33 +525,37 @@ void KonqBaseListViewWidget::contentsWheelEvent( TQWheelEvent *e )
void KonqBaseListViewWidget::contentsMouseDoubleClickEvent(TQMouseEvent *e)
{
if (m_rubber) {
TQRect r(m_rubber->normalize());
delete m_rubber;
m_rubber = NULL;
repaintContents(r, false);
}
TQPoint vp = contentsToViewport(e->pos());
KonqBaseListViewItem* item = isExecuteArea(vp) ?
static_cast<KonqBaseListViewItem*>(itemAt(vp)) : NULL;
if (m_rubber)
{
TQRect r(m_rubber->normalize());
delete m_rubber;
m_rubber = NULL;
repaintContents(r, false);
}
if (item) {
TQPoint vp = contentsToViewport(e->pos());
KonqBaseListViewItem* item = isExecuteArea(vp) ?
static_cast<KonqBaseListViewItem*>(itemAt(vp)) : NULL;
if (item)
{
TDEListView::contentsMouseDoubleClickEvent(e);
}
else {
}
else if (m_pSettings->doubleClickMoveToParent())
{
KParts::URLArgs args;
args.trustedSource = true;
KURL baseURL(m_dirLister->url().internalReferenceURL());
if (baseURL.isEmpty())
{
baseURL = m_dirLister->url();
}
KURL upURL = baseURL.upURL();
if (!upURL.isEmpty()) {
m_pBrowserView->extension()->openURLRequest(upURL, args);
}
}
KURL baseURL(m_dirLister->url().internalReferenceURL());
if (baseURL.isEmpty())
{
baseURL = m_dirLister->url();
}
KURL upURL = baseURL.upURL();
if (!upURL.isEmpty())
{
m_pBrowserView->extension()->openURLRequest(upURL, args);
}
}
}
void KonqBaseListViewWidget::leaveEvent( TQEvent *e )

@ -121,6 +121,8 @@ void KonqFMSettings::init( TDEConfig * config )
/// true if TQString::localeAwareCompare is case sensitive (it usually isn't, when LC_COLLATE is set)
d->localeAwareCompareIsCaseSensitive = TQString( "a" ).localeAwareCompare( "B" ) > 0; // see #40131
m_doubleClickMoveToParent = config->readBoolEntry("DoubleClickMoveToParent", true);
}
bool KonqFMSettings::shouldEmbed( const TQString & serviceType ) const

@ -81,12 +81,13 @@ public:
bool underlineLink() const { return m_underlineLink; }
bool fileSizeInBytes() const { return m_fileSizeInBytes; }
bool alwaysNewWin() const { return m_alwaysNewWin; }
bool doubleClickMoveToParent() const { return m_doubleClickMoveToParent; }
const TQString & homeURL() const { return m_homeURL; }
bool showFileTips() const {return m_showFileTips; }
bool showPreviewsInFileTips() const;
int numFileTips() const {return m_numFileTips; }
bool renameIconDirectly() const;
bool renameIconDirectly() const;
// Font settings
const TQFont& standardFont() const { return m_standardFont; }
@ -107,7 +108,7 @@ private:
bool m_underlineLink;
bool m_fileSizeInBytes;
bool m_alwaysNewWin;
bool m_bTreeFollow;
bool m_doubleClickMoveToParent;
TQMap<TQString, TQString> m_embedMap;

Loading…
Cancel
Save