summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Reher <tde@4reher.org>2021-10-26 09:17:40 -0700
committerVincent Reher <tde@4reher.org>2021-10-26 09:17:40 -0700
commitcbb426ffab1ed01fef0be3925731aea7420d318f (patch)
tree6809bb20ad1c79ae03ef5e7814a222ae91519fb4
parent58e239bbb537ca956c5c4a9892bebf071ba83967 (diff)
downloadtdebase-reworked/feature/konq_listview++_14.1.tar.gz
tdebase-reworked/feature/konq_listview++_14.1.zip
Remove "Dictionary Order Sorting" code. Feature deferred to future PR.reworked/feature/konq_listview++_14.1
Signed-off-by: Vincent Reher <tde@4reher.org>
-rw-r--r--konqueror/listview/konq_detailedlistview.rc1
-rw-r--r--konqueror/listview/konq_infolistview.rc1
-rw-r--r--konqueror/listview/konq_listview.cpp11
-rw-r--r--konqueror/listview/konq_listview.h2
-rw-r--r--konqueror/listview/konq_listviewitems.cpp35
-rw-r--r--konqueror/listview/konq_listviewitems.h1
-rw-r--r--konqueror/listview/konq_textview.rc1
-rw-r--r--konqueror/listview/konq_treeview.rc1
-rw-r--r--libkonq/konq_propsview.cpp21
-rw-r--r--libkonq/konq_propsview.h3
10 files changed, 1 insertions, 76 deletions
diff --git a/konqueror/listview/konq_detailedlistview.rc b/konqueror/listview/konq_detailedlistview.rc
index fcd0864f7..79059c6d4 100644
--- a/konqueror/listview/konq_detailedlistview.rc
+++ b/konqueror/listview/konq_detailedlistview.rc
@@ -29,7 +29,6 @@
<Action name="group_hidden_first"/>
<Separator/>
<Action name="sort_caseinsensitive"/>
- <Action name="dictionary_order_sorting"/>
<Separator/>
<Action name="alternate_sort_order"/>
<Action name="reverse_sort_order"/>
diff --git a/konqueror/listview/konq_infolistview.rc b/konqueror/listview/konq_infolistview.rc
index 8b4a45569..451eb5785 100644
--- a/konqueror/listview/konq_infolistview.rc
+++ b/konqueror/listview/konq_infolistview.rc
@@ -29,7 +29,6 @@
<Action name="group_hidden_first"/>
<Separator/>
<Action name="sort_caseinsensitive"/>
- <Action name="dictionary_order_sorting"/>
<Separator/>
<Action name="alternate_sort_order"/>
<Action name="reverse_sort_order"/>
diff --git a/konqueror/listview/konq_listview.cpp b/konqueror/listview/konq_listview.cpp
index 426577194..21c63f6fb 100644
--- a/konqueror/listview/konq_listview.cpp
+++ b/konqueror/listview/konq_listview.cpp
@@ -783,13 +783,6 @@ void KonqListView::slotToggleDisplayHiddenFirst()
m_pListView->sort();
}
-void KonqListView::slotToggleSortDictionaryOrder()
-{
- m_pProps->setDictionaryOrder( m_paSortDictionaryOrder->isChecked() );
- m_pListView->updateListContents();
- m_pListView->sort();
-}
-
void KonqListView::headerDragged(int sec, int from, int to)
{
kdDebug(1202)<<"section: "<<sec<<" fromIndex: "<<from<<" toIndex "<<to<<endl;
@@ -952,10 +945,6 @@ void KonqListView::setupActions()
TQT_SLOT(slotToggleDisplayHiddenFirst()), actionCollection(), "group_hidden_first");
m_paDisplayHiddenFirst->setChecked(m_pProps->isHiddenFirst());
- m_paSortDictionaryOrder = new TDEToggleAction( i18n("Dictionary Order Sort"), 0, this,
- TQT_SLOT(slotToggleSortDictionaryOrder()), actionCollection(), "dictionary_order_sorting");
- m_paSortDictionaryOrder->setChecked(m_pProps->isDictionaryOrder());
-
newIconSize( TDEIcon::SizeSmall /* default size */ );
}
diff --git a/konqueror/listview/konq_listview.h b/konqueror/listview/konq_listview.h
index f32d5405a..e7855506a 100644
--- a/konqueror/listview/konq_listview.h
+++ b/konqueror/listview/konq_listview.h
@@ -134,7 +134,6 @@ protected slots:
void slotToggleDisplayDirectoriesFirst();
void slotToggleDisplayHiddenFirst();
- void slotToggleSortDictionaryOrder();
void slotSortAlternate();
void slotSortReverse();
@@ -202,7 +201,6 @@ private:
TDEToggleAction *m_paDisplayDirectoriesFirst;
TDEToggleAction *m_paDisplayHiddenFirst;
- TDEToggleAction *m_paSortDictionaryOrder;
};
class ListViewBrowserExtension : public KonqDirPartBrowserExtension
diff --git a/konqueror/listview/konq_listviewitems.cpp b/konqueror/listview/konq_listviewitems.cpp
index 36f2bc9f1..2a96611d3 100644
--- a/konqueror/listview/konq_listviewitems.cpp
+++ b/konqueror/listview/konq_listviewitems.cpp
@@ -86,8 +86,7 @@ void KonqListViewItem::updateContents()
bool m_groupDirectoriesFirst = m_pListViewWidget->m_pBrowserView->m_pProps->isDirsFirst();
bool m_groupHiddenFirst = m_pListViewWidget->m_pBrowserView->m_pProps->isHiddenFirst();
- bool m_dictionaryOrderSort = m_pListViewWidget->m_pBrowserView->m_pProps->isDictionaryOrder();
-
+
// The default TDE order is: .dir (0), dir (1), .file (2), file (3)
if ( m_groupDirectoriesFirst )
@@ -98,29 +97,6 @@ void KonqListViewItem::updateContents()
if ( m_groupHiddenFirst && m_fileitem->text()[0] == '.' )
--sortChar;
- sortString = "";
- if (m_dictionaryOrderSort && text(0).length() > 1)
- {
- /*
- * Objective is to ignore non-alphnumeric leading characters
- * but append them as trailing characters to ensure that there
- * is a predictable collation of what might be otherwise end up
- * being identical strings. Example: a, " a" b, +a, ~a will end
- * up sorting to a, +a, " a", ~a, b
- */
- TQChar our1stChar = text(0)[0];
- if (!our1stChar.isLetterOrNumber())
- {
- sortString = text(0).mid(1);
- sortString.append(our1stChar);
- }
- else
- {
- sortString = text(0).left(-1);
- sortString.append(TQChar(0));
- }
- }
-
//now we have the first column, so let's do the rest
int numExtra = 1;
@@ -327,13 +303,6 @@ int KonqBaseListViewItem::compare( TQListViewItem* item, int col, bool ascending
break;
}
}
- if (col == 0 && !sortString.isEmpty()) {
- if (m_pListViewWidget->caseInsensitiveSort())
- return sortString.lower().localeAwareCompare( k->sortString.lower() );
- else {
- return m_pListViewWidget->m_pSettings->caseSensitiveCompare( sortString, k->sortString );
- }
- }
if ( m_pListViewWidget->caseInsensitiveSort() )
return text( col ).lower().localeAwareCompare( k->text( col ).lower() );
else {
@@ -440,7 +409,6 @@ const char* KonqBaseListViewItem::makeAccessString( const mode_t mode)
KonqBaseListViewItem::KonqBaseListViewItem(KonqBaseListViewWidget *_listViewWidget, KFileItem* _fileitem)
:TDEListViewItem(_listViewWidget)
,sortChar(0)
-,sortString()
,m_bDisabled(false)
,m_bActive(false)
,m_fileitem(_fileitem)
@@ -451,7 +419,6 @@ KonqBaseListViewItem::KonqBaseListViewItem(KonqBaseListViewWidget *_listViewWidg
KonqBaseListViewItem::KonqBaseListViewItem(KonqBaseListViewWidget *_listViewWidget, KonqBaseListViewItem *_parent, KFileItem* _fileitem)
:TDEListViewItem(_parent)
,sortChar(0)
-,sortString()
,m_bDisabled(false)
,m_bActive(false)
,m_fileitem(_fileitem)
diff --git a/konqueror/listview/konq_listviewitems.h b/konqueror/listview/konq_listviewitems.h
index 28974e265..2e2827519 100644
--- a/konqueror/listview/konq_listviewitems.h
+++ b/konqueror/listview/konq_listviewitems.h
@@ -68,7 +68,6 @@ class KonqBaseListViewItem : public TDEListViewItem
protected:
short int sortChar;
- TQString sortString;
bool m_bDisabled;
bool m_bActive;
diff --git a/konqueror/listview/konq_textview.rc b/konqueror/listview/konq_textview.rc
index e7a0bbf70..20b20f451 100644
--- a/konqueror/listview/konq_textview.rc
+++ b/konqueror/listview/konq_textview.rc
@@ -18,7 +18,6 @@
<Action name="group_hidden_first"/>
<Separator/>
<Action name="sort_caseinsensitive"/>
- <Action name="dictionary_order_sorting"/>
<Separator/>
<Action name="alternate_sort_order"/>
<Action name="reverse_sort_order"/>
diff --git a/konqueror/listview/konq_treeview.rc b/konqueror/listview/konq_treeview.rc
index bba4a10d8..711f267be 100644
--- a/konqueror/listview/konq_treeview.rc
+++ b/konqueror/listview/konq_treeview.rc
@@ -29,7 +29,6 @@
<Action name="group_hidden_first"/>
<Separator/>
<Action name="sort_caseinsensitive"/>
- <Action name="dictionary_order_sorting"/>
<Separator/>
<Action name="alternate_sort_order"/>
<Action name="reverse_sort_order"/>
diff --git a/libkonq/konq_propsview.cpp b/libkonq/konq_propsview.cpp
index a7e040a4a..3115ed09b 100644
--- a/libkonq/konq_propsview.cpp
+++ b/libkonq/konq_propsview.cpp
@@ -67,7 +67,6 @@ struct KonqPropsView::Private
TQStringList* previewsToShow;
bool previewsEnabled:1;
bool caseInsensitiveSort:1;
- bool dictionaryorder:1;
bool hiddenfirst:1;
bool dirsfirst:1;
bool descending:1;
@@ -94,7 +93,6 @@ KonqPropsView::KonqPropsView( TDEInstance * instance, KonqPropsView * defaultPro
d->sortcriterion = config->readEntry( "SortingCriterion", "sort_nci" );
d->dirsfirst = config->readBoolEntry( "GroupDirsFirst", true );
d->hiddenfirst = config->readBoolEntry( "GroupHiddenFirst", true );
- d->dictionaryorder = config->readBoolEntry( "DictionaryOrderSort", false );
d->descending = config->readBoolEntry( "SortDescending", false );
m_bShowDot = config->readBoolEntry( "ShowDotFiles", false );
m_bShowDirectoryOverlays = config->readBoolEntry( "ShowDirectoryOverlays", false );
@@ -152,11 +150,6 @@ bool KonqPropsView::isHiddenFirst() const
return d->hiddenfirst;
}
-bool KonqPropsView::isDictionaryOrder() const
-{
- return d->dictionaryorder;
-}
-
bool KonqPropsView::isDescending() const
{
return d->descending;
@@ -215,7 +208,6 @@ bool KonqPropsView::enterDir( const KURL & dir )
d->sortcriterion = m_defaultProps->sortCriterion();
d->dirsfirst = m_defaultProps->isDirsFirst();
d->hiddenfirst = m_defaultProps->isHiddenFirst();
- d->dictionaryorder = m_defaultProps->isDictionaryOrder();
d->descending = m_defaultProps->isDescending();
m_bShowDot = m_defaultProps->isShowingDotFiles();
d->caseInsensitiveSort=m_defaultProps->isCaseInsensitiveSort();
@@ -236,7 +228,6 @@ bool KonqPropsView::enterDir( const KURL & dir )
d->sortcriterion = config->readEntry( "SortingCriterion" , d->sortcriterion );
d->dirsfirst = config->readBoolEntry( "GroupDirsFirst", d->dirsfirst );
d->hiddenfirst = config->readBoolEntry( "GroupHiddenFirst", d->hiddenfirst );
- d->dictionaryorder = config->readBoolEntry( "DictionaryOrderSort", d->dictionaryorder );
d->descending = config->readBoolEntry( "SortDescending", d->descending );
m_bShowDot = config->readBoolEntry( "ShowDotFiles", m_bShowDot );
d->caseInsensitiveSort=config->readBoolEntry("CaseInsensitiveSort",d->caseInsensitiveSort);
@@ -358,18 +349,6 @@ void KonqPropsView::setHiddenFirst(bool first)
currentConfig()->sync();
}
}
-void KonqPropsView::setDictionaryOrder(bool first)
-{
- d->dictionaryorder = first;
- if ( m_defaultProps && !m_bSaveViewPropertiesLocally )
- m_defaultProps->setDictionaryOrder( first );
- else if (currentConfig())
- {
- TDEConfigGroupSaver cgs(currentConfig(), currentGroup());
- currentConfig()->writeEntry( "DictionaryOrderSort", d->dictionaryorder );
- currentConfig()->sync();
- }
-}
void KonqPropsView::setDescending( bool descend)
{
diff --git a/libkonq/konq_propsview.h b/libkonq/konq_propsview.h
index a586c81e7..84ffcf029 100644
--- a/libkonq/konq_propsview.h
+++ b/libkonq/konq_propsview.h
@@ -96,9 +96,6 @@ public:
void setHiddenFirst ( bool first );
bool isHiddenFirst() const;
- void setDictionaryOrder ( bool first );
- bool isDictionaryOrder() const;
-
void setDescending (bool descending);
bool isDescending() const;