summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Reher <tde@4reher.org>2021-01-12 13:33:23 -0800
committerVincent Reher <tde@4reher.org>2021-02-15 10:01:34 -0800
commit37cc084c9e1524ee18e26597222c2e78709a41d3 (patch)
tree61dd1d6c17ce358ac3bc7586e9eb3a40afd38a34
parent9e001b57528cd6cef855b0d274cfde95baf8e3ea (diff)
downloadtdebase-37cc084c9e1524ee18e26597222c2e78709a41d3.tar.gz
tdebase-37cc084c9e1524ee18e26597222c2e78709a41d3.zip
Konqueror listview enhancements introduced based on code developed <= 2020-10-31
All enhancements available via menu option View => Sort => ... 1. Sorting actions that may also be triggered by key chord: "Alternate Sort Order" (Ctrl+S) - Sort by previous/alternate sort column "Reverse Sort Order" (Ctrl+R) - Reverse sort order of current sort column 2. Sorting options: "Group Directories First" - Modeled after iconview "Folders First" "Group Hidden First" - Provide ability to disable special treatment of dot files "Dictionary Order Sorting" - Placeholder for future feature. All changes to date have been tested and are actively used on Author's systems Signed-off-by: Vincent Reher <tde@4reher.org>
-rw-r--r--konqueror/listview/konq_detailedlistview.desktop2
-rw-r--r--konqueror/listview/konq_detailedlistview.rc14
-rw-r--r--konqueror/listview/konq_infolistview.rc14
-rw-r--r--konqueror/listview/konq_listview.cpp259
-rw-r--r--konqueror/listview/konq_listview.h69
-rw-r--r--konqueror/listview/konq_listviewitems.cpp45
-rw-r--r--konqueror/listview/konq_textview.rc16
-rw-r--r--konqueror/listview/konq_treeview.desktop2
-rw-r--r--konqueror/listview/konq_treeview.rc14
9 files changed, 417 insertions, 18 deletions
diff --git a/konqueror/listview/konq_detailedlistview.desktop b/konqueror/listview/konq_detailedlistview.desktop
index 7e03a09fa..04a8d1fa8 100644
--- a/konqueror/listview/konq_detailedlistview.desktop
+++ b/konqueror/listview/konq_detailedlistview.desktop
@@ -7,4 +7,4 @@ X-TDE-Library=konq_listview
X-TDE-BrowserView-Args=DetailedList
X-TDE-BrowserView-HideFromMenus=true
Icon=view_detailed
-X-TDE-InitialPreference=7
+X-TDE-InitialPreference=12
diff --git a/konqueror/listview/konq_detailedlistview.rc b/konqueror/listview/konq_detailedlistview.rc
index 593e7f027..b17378554 100644
--- a/konqueror/listview/konq_detailedlistview.rc
+++ b/konqueror/listview/konq_detailedlistview.rc
@@ -23,9 +23,19 @@
<Action name="modesmall"/>
</Menu>
<Separator/>
+ <!-- Begin: implementation of extended listview sort features -->
+ <Menu name="sort"><text>Sort</text>
+ <Action name="group_directories_first"/>
+ <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"/>
+ </Menu>
+ <!-- End: implementation of extended listview sort methods -->
<Action name="show_dot"/>
- <Action name="sort_caseinsensitive"/>
- <!--<Action name="sort_directoriesfirst" /> TODO -->
<Menu name="listview_show"><text>Show Details</text>
<TearOffHandle />
<Action name="show_size"/>
diff --git a/konqueror/listview/konq_infolistview.rc b/konqueror/listview/konq_infolistview.rc
index 280b2d0ce..e5d60260a 100644
--- a/konqueror/listview/konq_infolistview.rc
+++ b/konqueror/listview/konq_infolistview.rc
@@ -23,9 +23,19 @@
<Action name="modesmall"/>
</Menu>
<Separator/>
+ <!-- Begin: implementation of extended listview sort features -->
+ <Menu name="sort"><text>Sort</text>
+ <Action name="group_directories_first"/>
+ <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"/>
+ </Menu>
+ <!-- End: implementation of extended listview sort methods -->
<Action name="show_dot"/>
- <Action name="sort_caseinsensitive"/>
- <!--<Action name="sort_directoriesfirst" /> TODO -->
<Action name="view_as"/>
<Separator/>
<Action name="bgsettings"/>
diff --git a/konqueror/listview/konq_listview.cpp b/konqueror/listview/konq_listview.cpp
index 67da49c6d..cdd3f1400 100644
--- a/konqueror/listview/konq_listview.cpp
+++ b/konqueror/listview/konq_listview.cpp
@@ -16,7 +16,7 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-
+#define DEBUG_SORTFUNCS
#include "konq_listview.h"
#include "konq_textviewwidget.h"
#include "konq_treeviewwidget.h"
@@ -269,6 +269,10 @@ KonqListView::KonqListView( TQWidget *parentWidget, TQObject *parent, const char
setXMLFile( xmlFile );
+ Display_Directories_1st = true ;
+ Display_Hidden_1st = true ;
+ Sort_Dictionary_Order = false ;
+
setupActions();
m_pListView->confColumns.resize( 11 );
@@ -285,7 +289,6 @@ KonqListView::KonqListView( TQWidget *parentWidget, TQObject *parent, const char
// Note: File Type is in fact the mimetype comment. We use UDS_FILE_TYPE but that's not what we show in fact :/
m_pListView->confColumns[10].setData(I18N_NOOP("File Type"),"Type",TDEIO::UDS_FILE_TYPE,m_paShowType);
-
connect( m_pListView, TQT_SIGNAL( selectionChanged() ),
m_extension, TQT_SLOT( updateActions() ) );
connect( m_pListView, TQT_SIGNAL( selectionChanged() ),
@@ -543,6 +546,20 @@ void KonqListView::slotColumnToggled()
void KonqListView::slotHeaderClicked(int sec)
{
kdDebug(1202)<<"section: "<<sec<<" clicked"<<endl;
+
+ //--------------------------------------------------------------------
+ //--- Begin: listview sorting enhancements
+ //--------------------------------------------------------------------
+
+ /* Notes
+ * I think 'section' represents the left-to-right offset of a VISIBLE column
+ *
+ * I think this subroutine does not trigger any sorting by itself but rather
+ * is called AFTER the sort has already been done, maybe to ensure that
+ * the configuration file is updated!
+ */
+
+ /* Original code removed:
int clickedColumn(-1);
for (uint i=0; i<m_pListView->NumberOfAtoms; i++)
if (m_pListView->confColumns[i].displayInColumn==sec) clickedColumn=i;
@@ -550,17 +567,63 @@ void KonqListView::slotHeaderClicked(int sec)
TQString nameOfSortColumn;
//we clicked the file name column
if (clickedColumn==-1)
- nameOfSortColumn="FileName";
- else
+ nameOfSortColumn="FileName";
+ else
nameOfSortColumn=m_pListView->confColumns[clickedColumn].desktopFileName;
+ */
+
+ TQString nameOfSortColumn = DisplayColumn_Name(sec) ;
+
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning()<<"section: "<<sec<<" clicked"<<endl;
+ #endif
+
+ if ( sec != SortColumnIndex_Alternate ) {
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning()
+ << "KonqListView::slotHeaderClicked - changed alternate sort column"
+ << " FROM '" << SortColumnName_Alternate
+ << "' ( column " << SortColumnIndex_Alternate << " )" << endl
+ ;
+ #endif
+
+ SortColumnIndex_Alternate = sec ;
+ SortColumnName_Alternate = nameOfSortColumn ;
+
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning()
+ << "KonqListView::slotHeaderClicked - changed alternate sort column"
+ << "TO '" << SortColumnName_Alternate
+ << "' ( column " << SortColumnIndex_Alternate << " )" << endl
+ ;
+ #endif
+ }
+
+ //--------------------------------------------------------------------
+ //--- End: listview sorting enhancements I
+ //--------------------------------------------------------------------
if (nameOfSortColumn!=m_pListView->sortedByColumn)
{
m_pListView->sortedByColumn=nameOfSortColumn;
m_pListView->setAscending(TRUE);
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning()
+ << "KonqListView::slotHeaderClicked - changed sort column to # "
+ << sec << endl
+ ;
+ #endif
}
else
+ {
m_pListView->setAscending(!m_pListView->ascending());
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning()
+ << "KonqListView::slotHeaderClicked - changed sort order of column #"
+ << sec << endl
+ ;
+ #endif
+ }
KonqListViewSettings config( m_pListView->url().protocol() );
config.readConfig();
@@ -569,6 +632,149 @@ void KonqListView::slotHeaderClicked(int sec)
config.writeConfig();
}
+//------------------------------------------------------------------------------
+//--- Begin: listview sorting enhancements I
+//------------------------------------------------------------------------------
+
+TQString KonqListView::DisplayColumn_Name( int DisplayColumn_Offset)
+{
+ int(ColumnIndex) = -1 ;
+ for (uint i=0; i<m_pListView->NumberOfAtoms; i++)
+ if (m_pListView->confColumns[i].displayInColumn == DisplayColumn_Offset)
+ ColumnIndex=i;
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning() << "What is name of display column #"
+ << DisplayColumn_Offset << "?" << endl ;
+ if (ColumnIndex == -1)
+ kdWarning() << "Answer: FileName" << endl;
+ else
+ kdWarning() << "Answer: " << m_pListView->confColumns[ColumnIndex].desktopFileName << endl;
+ #endif
+ if (ColumnIndex == -1) return("FileName") ;
+ return( m_pListView->confColumns[ColumnIndex].desktopFileName ) ;
+}
+
+void KonqListView::SortListView(uint which)
+{
+
+ TQString SortColumnName_Current = m_pListView->sortedByColumn ;
+ int SortColumnIndex_Current ;
+
+ TQString SortColumnName_Next ;
+ int SortColumnIndex_Next ;
+
+ uint SortOrder ;
+
+ switch( which ) {
+
+ //-----------------------------------------------------------------------
+ // Option 1: Alternate sorting between primary and alternate sort columns
+ //-----------------------------------------------------------------------
+
+ case 1 :
+
+ if ( SortColumnName_Primary == SortColumnName_Current ) {
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning() << "Switching column sort from primary to alternate" << endl ;
+ #endif
+ SortColumnName_Next = SortColumnName_Alternate ;
+ SortColumnIndex_Next = SortColumnIndex_Alternate ;
+ }
+ else {
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning() << "Switching column sort from alternate to primary" << endl ;
+ #endif
+ SortColumnName_Next = SortColumnName_Primary ;
+ SortColumnIndex_Next = SortColumnIndex_Primary ;
+ }
+
+ SortOrder = 1 ;
+ m_pListView->setSorting( SortColumnIndex_Next, SortOrder ) ;
+ m_pListView->sortedByColumn = SortColumnName_Next ;
+
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning()
+ << "KonqListView::SortListView - changed sort column FROM "
+ << SortColumnName_Current << " TO " << SortColumnName_Next
+ << " [" << SortColumnIndex_Next << "]" << endl
+ ;
+ #endif
+
+ break ;
+
+ //---------------------------------------------------------------
+ // Option 2: Reverse the sorting order of the current sort column
+ //---------------------------------------------------------------
+
+ case 2 :
+
+ if ( SortColumnName_Primary == SortColumnName_Current )
+ SortColumnIndex_Current = SortColumnIndex_Primary ;
+ else
+ SortColumnIndex_Current = SortColumnIndex_Alternate ;
+
+ SortOrder = !m_pListView->ascending() ;
+ m_pListView->setSorting( SortColumnIndex_Current, SortOrder ) ;
+
+ #ifdef DEBUG_SORTFUNCS
+ kdWarning()
+ << "KonqListView::SortListView - Reversing sort on column "
+ << SortColumnName_Current << endl
+ ;
+ #endif
+
+ break ;
+ }
+
+ // Do actual sorting and remember the order
+ m_pListView->sort();
+ m_pListView->setAscending(SortOrder);
+}
+
+void KonqListView::slotSortAlternate()
+{
+ KonqListView::SortListView(1) ;
+}
+
+void KonqListView::slotSortReverse()
+{
+ KonqListView::SortListView(2) ;
+}
+
+//------------------------------------------------------------------------------
+//--- Begin: listview sorting enhancements II
+//------------------------------------------------------------------------------
+
+void KonqListView::slot_Toggle_Display_Directories_1st()
+{
+ Display_Directories_1st = !Display_Directories_1st ;
+
+ m_pProps->setDirsFirst( Display_Directories_1st );
+ // Not yet sure is this is the right place to store this setting
+ // See TO-DO. We decided to "borrow" this property that had been
+ // previously defined for konq_iconview.
+
+ m_pListView->updateListContents();
+ m_pListView->sort();
+}
+
+void KonqListView::slot_Toggle_Display_Hidden_1st()
+{
+ Display_Hidden_1st = !Display_Hidden_1st ;
+ m_pListView->updateListContents();
+ m_pListView->sort();
+}
+
+void KonqListView::slot_Toggle_Sort_DictionaryOrder()
+{
+ Sort_Dictionary_Order = !Sort_Dictionary_Order ;
+ m_pListView->sort();
+}
+
+//------------------------------------------------------------------------------
+//--- End: listview sorting enhancements
+//------------------------------------------------------------------------------
+
void KonqListView::headerDragged(int sec, int from, int to)
{
kdDebug(1202)<<"section: "<<sec<<" fromIndex: "<<from<<" toIndex "<<to<<endl;
@@ -715,6 +921,51 @@ void KonqListView::setupActions()
// m_paShowDot->setCheckedState(i18n("Hide &Hidden Files"));
m_paCaseInsensitive = new TDEToggleAction(i18n("Case Insensitive Sort"), 0, this, TQT_SLOT(slotCaseInsensitive()),actionCollection(), "sort_caseinsensitive" );
+ //--------------------------------------------------------------------
+ //--- Begin: listview sorting enhancements I
+ //--------------------------------------------------------------------
+
+ m_paSortAlternate = new TDEAction( i18n(
+ "&Alternate Sort Order" ), CTRL+Key_S, this,
+ TQT_SLOT( slotSortAlternate() ), actionCollection(),
+ "alternate_sort_order"
+ );
+
+ m_paSortReverse = new TDEAction(
+ i18n( "&Reverse Sort Order" ), CTRL+Key_R, this,
+ TQT_SLOT( slotSortReverse() ), actionCollection(),
+ "reverse_sort_order"
+ );
+
+ //--------------------------------------------------------------------
+ //--- Begin: listview sorting enhancements II
+ //--------------------------------------------------------------------
+
+ m_paDisplay_Directories_1st = new TDEToggleAction(
+ i18n("Group &Directories First"), 0, this,
+ TQT_SLOT(slot_Toggle_Display_Directories_1st()), actionCollection(),
+ "group_directories_first"
+ );
+ m_paDisplay_Directories_1st->setChecked(true);
+
+ m_paDisplay_Hidden_1st = new TDEToggleAction(
+ i18n("Group &Hidden First"), 0, this,
+ TQT_SLOT(slot_Toggle_Display_Hidden_1st()), actionCollection(),
+ "group_hidden_first"
+ );
+ m_paDisplay_Hidden_1st->setChecked(true);
+
+ m_pa_Sort_DictionaryOrder = new TDEToggleAction(
+ i18n("Dictionary order sorting"), 0, this,
+ TQT_SLOT(slot_Toggle_Sort_DictionaryOrder()), actionCollection(),
+ "dictionary_order_sorting"
+ );
+ m_pa_Sort_DictionaryOrder->setChecked(false);
+
+ //--------------------------------------------------------------------
+ //--- End: listview sorting enhancements
+ //--------------------------------------------------------------------
+
newIconSize( TDEIcon::SizeSmall /* default size */ );
}
diff --git a/konqueror/listview/konq_listview.h b/konqueror/listview/konq_listview.h
index 4c3719bd0..3b1b84453 100644
--- a/konqueror/listview/konq_listview.h
+++ b/konqueror/listview/konq_listview.h
@@ -128,6 +128,18 @@ protected slots:
void slotSaveColumnWidths(); // delayed
void slotHeaderClicked(int sec);
+ //--------------------------------------------------------------------
+ //--- Begin: listview sorting enhancements
+ //--------------------------------------------------------------------
+ void slot_Toggle_Display_Directories_1st() ;
+ void slot_Toggle_Display_Hidden_1st() ;
+ void slot_Toggle_Sort_DictionaryOrder() ;
+ void slotSortAlternate() ;
+ void slotSortReverse() ;
+ //--------------------------------------------------------------------
+ //--- End: listview sorting enhancements
+ //--------------------------------------------------------------------
+
// This comes from KonqDirPart, it's for the "Find" feature
virtual void slotStarted() { m_pListView->slotStarted(); }
virtual void slotCanceled() { m_pListView->slotCanceled(); }
@@ -154,6 +166,63 @@ private:
TDEAction *m_paUnselectAll;
TDEAction *m_paInvertSelection;
+ //--------------------------------------------------------------------
+ //--- Begin: listview sorting enhancements I
+ //--------------------------------------------------------------------
+
+ // User action-response handlers
+ TDEAction *m_paSortAlternate; // triggers slotSortAlternate()
+ TDEAction *m_paSortReverse; // triggers slotSortReverse()
+
+ // Variables utilized in SortListView()
+ TQString SortColumnName_Primary = "FileName" ; // by definition
+ int SortColumnIndex_Primary = 0 ; // always!
+ TQString SortColumnName_Alternate ; // reset in slotHeaderClicked()
+ int SortColumnIndex_Alternate = 1 ; // reset in slotHeaderClicked()
+
+ // Specialized sorting functions
+ void SortListView(uint which); // called by slotSort*()
+ TQString DisplayColumn_Name( int DisplayColumn_Offset) ;
+
+ //--------------------------------------------------------------------
+ //--- Begin: listview sorting enhancements II
+ //--------------------------------------------------------------------
+
+ // User action-response handlers
+
+ TDEToggleAction *m_paDisplay_Directories_1st;
+ // triggers slot_Toggle_Display_Directories_1st()
+ TDEToggleAction *m_paDisplay_Hidden_1st;
+ // triggers slot_Toggle_Display_Hidden_1st()
+ TDEToggleAction *m_pa_Sort_DictionaryOrder;
+ // triggers slot_Toggle_Sort_DictionaryOrder()
+
+ // Variables toggled by slot_Toggle_*()
+
+ /*
+ * Original TDE default affecting course sort groupings:
+ * .dir_hidden < dir < .file_hidden < file
+ * The following variables allow user control over these groupings:
+ */
+ bool Display_Directories_1st = true ; // Start with original TDE behavior
+ bool Display_Hidden_1st = true ; // Start with original TDE behavior
+
+ /*
+ * Should we ignore leading special characters when sorting?
+ * Gnu coreutils sort calls this "dictionary order".
+ * FIXME: TO BE IMPLEMENTED
+ */
+ bool Sort_Dictionary_Order = false ; // Start with original TDE behavior
+
+ // Above variables are utilized in these functions:
+
+ friend void KonqListViewItem::updateContents();
+ friend int KonqBaseListViewItem::compare( TQListViewItem* item, int col, bool ascending ) const;
+
+ //--------------------------------------------------------------------
+ //--- End: listview sorting enhancements
+ //--------------------------------------------------------------------
+
// These 2 actions are 'fake' actions. They are defined so that the keyboard shortcuts
// can be set from the 'Configure Shortcuts..." dialog.
// The real actions are performed in the TDEListViewLineEdit::keyPressEvent() in tdeui
diff --git a/konqueror/listview/konq_listviewitems.cpp b/konqueror/listview/konq_listviewitems.cpp
index 45ff99c1c..47a9e54ae 100644
--- a/konqueror/listview/konq_listviewitems.cpp
+++ b/konqueror/listview/konq_listviewitems.cpp
@@ -78,16 +78,38 @@ KonqListViewItem::~KonqListViewItem()
void KonqListViewItem::updateContents()
{
+ bool mysetting = m_pListViewWidget->m_pBrowserView->Display_Directories_1st ;
+
// Set the pixmap
setDisabled( m_bDisabled );
// Set the text of each column
setText( 0, m_fileitem->text() );
- // The order is: .dir (0), dir (1), .file (2), file (3)
- sortChar = S_ISDIR( m_fileitem->mode() ) ? 1 : 3;
- if ( m_fileitem->text()[0] == '.' )
- --sortChar;
+ //-------------------------------------------
+ //--- Begin: listview sorting enhancements II
+ //-------------------------------------------
+
+ /* Placeholders until we figure out how to retrieve from KonqListView
+ bool Display_Directories_1st = true ; // Preserve original TDE default
+ bool Display_Hidden_1st = false ; // Override original TDE default
+ */
+ bool Display_Directories_1st = m_pListViewWidget->m_pBrowserView->Display_Directories_1st ;
+ bool Display_Hidden_1st = m_pListViewWidget->m_pBrowserView->Display_Hidden_1st ;
+
+ // The original TDE order is: .dir (0), dir (1), .file (2), file (3)
+
+ if ( Display_Directories_1st )
+ sortChar = S_ISDIR( m_fileitem->mode() ) ? 1 : 3;
+ else
+ sortChar = 3;
+
+ if ( Display_Hidden_1st && m_fileitem->text()[0] == '.' )
+ --sortChar;
+
+ //-----------------------------------------
+ //--- End: listview sorting enhancements II
+ //-----------------------------------------
//now we have the first column, so let's do the rest
@@ -295,6 +317,21 @@ int KonqBaseListViewItem::compare( TQListViewItem* item, int col, bool ascending
break;
}
}
+ //------------------------------------------
+ //--- Begin: listview sorting enhancement II
+ //------------------------------------------
+
+ /* Placeholders until we figure out how to retrieve from KonqListView
+ bool Sort_Dictionary_Order = false ;
+ */
+ bool Sort_Dictionary_Order = m_pListViewWidget->m_pBrowserView->Sort_Dictionary_Order ;
+
+ // FIXME: Implement Sort_Dictionary_Order
+
+ //-----------------------------------------
+ //--- End: listview sorting enhancements II
+ //-----------------------------------------
+
if ( m_pListViewWidget->caseInsensitiveSort() )
return text( col ).lower().localeAwareCompare( k->text( col ).lower() );
else {
diff --git a/konqueror/listview/konq_textview.rc b/konqueror/listview/konq_textview.rc
index 612deb5cb..673452efd 100644
--- a/konqueror/listview/konq_textview.rc
+++ b/konqueror/listview/konq_textview.rc
@@ -12,8 +12,20 @@
</Menu>
</Menu>
<Menu name="view"><text>&amp;View</text>
- <Action name="show_dot" />
- <Action name="sort_caseinsensitive"/>
+ <Separator/>
+ <!-- Begin: implementation of extended listview sort features -->
+ <Menu name="sort"><text>Sort</text>
+ <Action name="group_directories_first"/>
+ <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"/>
+ </Menu>
+ <!-- End: implementation of extended listview sort methods -->
+ <Action name="show_dot"/>
<Menu name="listview_show"><text>Show Details</text>
<TearOffHandle />
<Action name="show_size"/>
diff --git a/konqueror/listview/konq_treeview.desktop b/konqueror/listview/konq_treeview.desktop
index 7960d145a..bbe48decb 100644
--- a/konqueror/listview/konq_treeview.desktop
+++ b/konqueror/listview/konq_treeview.desktop
@@ -8,4 +8,4 @@ X-TDE-BrowserView-Args=MixedTree
X-TDE-BrowserView-HideFromMenus=true
X-TDE-BrowserView-HierarchicalView=true
Icon=view_tree
-X-TDE-InitialPreference=8
+X-TDE-InitialPreference=11
diff --git a/konqueror/listview/konq_treeview.rc b/konqueror/listview/konq_treeview.rc
index 7f8981779..d2d95a69d 100644
--- a/konqueror/listview/konq_treeview.rc
+++ b/konqueror/listview/konq_treeview.rc
@@ -23,9 +23,19 @@
<Action name="modesmall"/>
</Menu>
<Separator/>
+ <!-- Begin: implementation of extended listview sort features -->
+ <Menu name="sort"><text>Sort</text>
+ <Action name="group_directories_first"/>
+ <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"/>
+ </Menu>
+ <!-- End: implementation of extended listview sort methods -->
<Action name="show_dot"/>
- <Action name="sort_caseinsensitive"/>
- <!--<Action name="sort_directoriesfirst" /> TODO -->
<Menu name="listview_show"><text>Show Details</text>
<TearOffHandle />
<Action name="show_size"/>