summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--konqueror/listview/konq_detailedlistview.rc4
-rw-r--r--konqueror/listview/konq_infolistview.rc4
-rw-r--r--konqueror/listview/konq_listview.cpp69
-rw-r--r--konqueror/listview/konq_listview.h16
-rw-r--r--konqueror/listview/konq_listviewitems.cpp9
-rw-r--r--konqueror/listview/konq_listviewwidget.h2
-rw-r--r--konqueror/listview/konq_textview.rc4
-rw-r--r--konqueror/listview/konq_treeview.rc4
-rw-r--r--libkonq/konq_propsview.cpp2
-rw-r--r--libkonq/konq_propsview.h2
-rw-r--r--libkonq/konq_sort_constants.h22
-rw-r--r--libkonq/konq_string_compare.h46
12 files changed, 46 insertions, 138 deletions
diff --git a/konqueror/listview/konq_detailedlistview.rc b/konqueror/listview/konq_detailedlistview.rc
index d558a0da7..910d52113 100644
--- a/konqueror/listview/konq_detailedlistview.rc
+++ b/konqueror/listview/konq_detailedlistview.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="KonqDetailedListView" version="12">
+<kpartgui name="KonqDetailedListView" version="13">
<MenuBar>
<Menu name="edit"><text>&amp;Edit</text>
<Menu name="selection"><text>Selection</text>
@@ -25,10 +25,8 @@
<Separator/>
<Action name="show_dot"/>
<Menu name="sort"><text>&amp;Sort</text>
- <!--TBD <TearOffHandle />-->
<Action name="order_unicode_unmodified"/>
<Action name="order_unicode_case_insensitive"/>
- <!--<Action name="sort_caseinsensitive"/>-->
<Action name="order_locale_defined"/>
<Separator/>
<Action name="group_directories_first"/>
diff --git a/konqueror/listview/konq_infolistview.rc b/konqueror/listview/konq_infolistview.rc
index ec79c48d9..0f4ffac8a 100644
--- a/konqueror/listview/konq_infolistview.rc
+++ b/konqueror/listview/konq_infolistview.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="KonqInfoListView" version="13">
+<kpartgui name="KonqInfoListView" version="14">
<MenuBar>
<Menu name="edit"><text>&amp;Edit</text>
<Menu name="selection"><text>Selection</text>
@@ -25,10 +25,8 @@
<Separator/>
<Action name="show_dot"/>
<Menu name="sort"><text>&amp;Sort</text>
- <!--TBD <TearOffHandle />-->
<Action name="order_unicode_unmodified"/>
<Action name="order_unicode_case_insensitive"/>
- <!--<Action name="sort_caseinsensitive"/>-->
<Action name="order_locale_defined"/>
<Separator/>
<Action name="group_directories_first"/>
diff --git a/konqueror/listview/konq_listview.cpp b/konqueror/listview/konq_listview.cpp
index 266bcae03..88e865d91 100644
--- a/konqueror/listview/konq_listview.cpp
+++ b/konqueror/listview/konq_listview.cpp
@@ -48,7 +48,7 @@
#include <unistd.h>
#include <kinstance.h>
-#include <konq_sort_constants.h> // Important
+#include <konq_sort_constants.h>
KonqListViewFactory::KonqListViewFactory()
{
@@ -936,8 +936,10 @@ void KonqListView::setupActions()
m_paSortAlternate = new TDEAction( i18n( "&Alternate Sort Order" ), CTRL+Key_S, this,
TQT_SLOT( slotSortAlternate() ), actionCollection(), "alternate_sort_order");
+ m_paSortAlternate->setToolTip( i18n( "Sort by PREVIOUS sort column" ) );
m_paSortReverse = new TDEAction( i18n( "&Reverse Sort Order" ), CTRL+Key_R, this,
TQT_SLOT( slotSortReverse() ), actionCollection(), "reverse_sort_order");
+ m_paSortReverse->setToolTip( i18n( "Reverse sort order of current sort column" ) );
/*
Build View->Sort submenu interface to properties
@@ -945,38 +947,34 @@ void KonqListView::setupActions()
*/
TextSortOrder initialOrder = m_pProps->getSortOrder();
- m_paOrder_UnicodeUnmodified = new TDEToggleAction(
- i18n(LABEL_UNICODE_UNMODIFIED), 0, this,
- TQT_SLOT(slotOrder_UnicodeUnmodified()),
- actionCollection(), "order_unicode_unmodified"
- );
- m_paOrder_UnicodeUnmodified->setChecked(initialOrder == UNICODE_UNMODIFIED);
-
- m_paOrder_UnicodeCaseInsensitive = new TDEToggleAction(
- i18n(LABEL_UNICODE_CASEINSENSITIVE), 0, this,
- TQT_SLOT(slotOrder_UnicodeCaseInsensitive()),
- actionCollection(), "order_unicode_case_insensitive"
- );
- m_paOrder_UnicodeCaseInsensitive->setChecked(initialOrder == UNICODE_CASEINSENSITIVE);
-
- m_paOrder_Locale = new TDEToggleAction(
- i18n(LABEL_LOCALE_UNMODIFIED), 0, this,
- TQT_SLOT(slotOrder_Locale()),
- actionCollection(), "order_locale_defined"
- );
- m_paOrder_Locale->setChecked(initialOrder == LOCALE_DEFAULT);
+ m_paOrderUnicodeUnmodified = new TDEToggleAction( i18n( "&Unicode based" ), ALT+Key_1, this,
+ TQT_SLOT( slotOrderUnicodeUnmodified() ), actionCollection(), "order_unicode_unmodified" );
+ m_paOrderUnicodeUnmodified->setToolTip( i18n( "Strict numeric Unicode codepoint order" ) );
+ m_paOrderUnicodeUnmodified->setChecked( initialOrder == UNICODE_UNMODIFIED );
+
+ m_paOrderUnicodeCaseInsensitive = new TDEToggleAction( i18n( "Unicode based, &case insensitive" ), ALT+Key_2, this,
+ TQT_SLOT( slotOrderUnicodeCaseInsensitive() ), actionCollection(), "order_unicode_case_insensitive" );
+ m_paOrderUnicodeCaseInsensitive->setToolTip( i18n( "Like above but with lower/upper case ASCII letters adjacent" ) );
+ m_paOrderUnicodeCaseInsensitive->setChecked(initialOrder == UNICODE_CASEINSENSITIVE);
+
+ m_paOrderLocale = new TDEToggleAction( i18n( "&Locale Order" ), ALT+Key_3, this,
+ TQT_SLOT( slotOrderLocale() ), actionCollection(), "order_locale_defined" );
+ m_paOrderLocale->setToolTip( i18n( "Locale-defined order, usually \"friendly\"" ) );
+ m_paOrderLocale->setChecked(initialOrder == LOCALE_UNMODIFIED);
// Convert above 3 checkbox menu items into single 3-way radio button menu item
- m_paOrder_UnicodeUnmodified->setExclusiveGroup( "sortOrder" );
- m_paOrder_UnicodeCaseInsensitive->setExclusiveGroup( "sortOrder" );
- m_paOrder_Locale->setExclusiveGroup( "sortOrder" );
+ m_paOrderUnicodeUnmodified->setExclusiveGroup( "sortOrder" );
+ m_paOrderUnicodeCaseInsensitive->setExclusiveGroup( "sortOrder" );
+ m_paOrderLocale->setExclusiveGroup( "sortOrder" );
- m_paDisplayDirectoriesFirst = new TDEToggleAction( i18n("Group &Directories First"), 0, this,
+ m_paDisplayDirectoriesFirst = new TDEToggleAction( i18n("Group &Directories First"), CTRL+SHIFT+Key_F, this,
TQT_SLOT(slotToggleDisplayDirectoriesFirst()), actionCollection(), "group_directories_first");
- m_paDisplayDirectoriesFirst->setChecked(m_pProps->isHiddenFirst());
+ m_paDisplayDirectoriesFirst->setToolTip( i18n( "Always display directories before non-directories" ) );
+ m_paDisplayDirectoriesFirst->setChecked(m_pProps->isDirsFirst());
- m_paDisplayHiddenFirst = new TDEToggleAction( i18n("Group &Hidden First"), 0, this,
+ m_paDisplayHiddenFirst = new TDEToggleAction( i18n("Group &Hidden First"), CTRL+SHIFT+Key_H, this,
TQT_SLOT(slotToggleDisplayHiddenFirst()), actionCollection(), "group_hidden_first");
+ m_paDisplayHiddenFirst->setToolTip( i18n( "Always display hidden files before non-hidden files" ) );
m_paDisplayHiddenFirst->setChecked(m_pProps->isHiddenFirst());
newIconSize( TDEIcon::SizeSmall /* default size */ );
@@ -990,31 +988,28 @@ void KonqListView::slotSelectionChanged()
// m_paInvertSelection->setEnabled( itemSelected );
}
-void KonqListView::slotOrder_UnicodeUnmodified()
+void KonqListView::slotOrderUnicodeUnmodified()
{
TextSortOrder sortOrder = UNICODE_UNMODIFIED ;
- kdWarning() << "Setting name order = " << sortOrder << endl;
-//kdDebug(1202) << "Setting name order = " << sortOrder << endl;
+ kdDebug(1202) << "Setting name order = " << sortOrder << endl;
m_pProps->setSortOrder( sortOrder );
m_pListView->m_sortOrder = sortOrder;
m_pListView->sort();
}
-void KonqListView::slotOrder_UnicodeCaseInsensitive()
+void KonqListView::slotOrderUnicodeCaseInsensitive()
{
TextSortOrder sortOrder = UNICODE_CASEINSENSITIVE;
- kdWarning() << "Setting name order = " << sortOrder << endl;
-//kdDebug(1202) << "Setting name order = " << sortOrder << endl;
+ kdDebug(1202) << "Setting name order = " << sortOrder << endl;
m_pProps->setSortOrder( sortOrder );
m_pListView->m_sortOrder = sortOrder;
m_pListView->sort();
}
-void KonqListView::slotOrder_Locale()
+void KonqListView::slotOrderLocale()
{
- TextSortOrder sortOrder = LOCALE_DEFAULT;
- kdWarning() << "Setting name order = " << sortOrder << endl;
-//kdDebug(1202) << "Setting name order = " << sortOrder << endl;
+ TextSortOrder sortOrder = LOCALE_UNMODIFIED;
+ kdDebug(1202) << "Setting name order = " << sortOrder << endl;
m_pProps->setSortOrder( sortOrder );
m_pListView->m_sortOrder = sortOrder;
m_pListView->sort();
diff --git a/konqueror/listview/konq_listview.h b/konqueror/listview/konq_listview.h
index dc8903047..fc72f6e87 100644
--- a/konqueror/listview/konq_listview.h
+++ b/konqueror/listview/konq_listview.h
@@ -34,8 +34,6 @@
#include <konq_propsview.h>
#include "konq_listviewwidget.h"
-#include <konq_sort_constants.h> // Important
-
class TDEAction;
class TDEToggleAction;
class ListViewBrowserExtension;
@@ -132,9 +130,9 @@ protected slots:
void slotSaveColumnWidths(); // delayed
void slotHeaderClicked(int sec);
- void slotOrder_UnicodeUnmodified();
- void slotOrder_UnicodeCaseInsensitive();
- void slotOrder_Locale();
+ void slotOrderUnicodeUnmodified();
+ void slotOrderUnicodeCaseInsensitive();
+ void slotOrderLocale();
void slotToggleDisplayDirectoriesFirst();
void slotToggleDisplayHiddenFirst();
@@ -179,8 +177,6 @@ private:
TDEAction *m_paUnselectAll;
TDEAction *m_paInvertSelection;
- TDEAction *m_paSortOptionDialog;
-
TDEAction *m_paSortAlternate;
TDEAction *m_paSortReverse;
@@ -205,9 +201,9 @@ private:
TDEToggleAction *m_paShowPermissions;
TDEToggleAction *m_paShowURL;
- TDEToggleAction *m_paOrder_UnicodeUnmodified;
- TDEToggleAction *m_paOrder_UnicodeCaseInsensitive;
- TDEToggleAction *m_paOrder_Locale;
+ TDEToggleAction *m_paOrderUnicodeUnmodified;
+ TDEToggleAction *m_paOrderUnicodeCaseInsensitive;
+ TDEToggleAction *m_paOrderLocale;
TDEToggleAction *m_paDisplayDirectoriesFirst;
TDEToggleAction *m_paDisplayHiddenFirst;
diff --git a/konqueror/listview/konq_listviewitems.cpp b/konqueror/listview/konq_listviewitems.cpp
index 21856cda5..1766a0b0b 100644
--- a/konqueror/listview/konq_listviewitems.cpp
+++ b/konqueror/listview/konq_listviewitems.cpp
@@ -19,6 +19,7 @@
#include "konq_listview.h"
#include <konq_settings.h>
+#include "konq_string_compare.h"
#include <kdebug.h>
#include <tdelocale.h>
#include <assert.h>
@@ -256,8 +257,6 @@ const TQPixmap* KonqListViewItem::pixmap( int column ) const
return pm;
}
-#include "konq_string_compare.h" // defines stringCompare(), called in the next function
-
int KonqBaseListViewItem::compare( TQListViewItem* item, int col, bool ascending ) const
{
KonqListViewItem* k = static_cast<KonqListViewItem*>( item );
@@ -306,11 +305,7 @@ int KonqBaseListViewItem::compare( TQListViewItem* item, int col, bool ascending
}
}
- /*
- If we get this point, we are comparing text columns (e.g file name). We will
- call the previously defined general purpose inline function stringCompare()
- using current value of m_pListViewWidget->m_sortOrder.
- */
+ /* If we reach here, we are comparing text columns (e.g file name). */
return stringCompare( m_pListViewWidget->m_sortOrder, text( col ), k->text( col ) );
}
diff --git a/konqueror/listview/konq_listviewwidget.h b/konqueror/listview/konq_listviewwidget.h
index b6ae1ead0..a8a06408b 100644
--- a/konqueror/listview/konq_listviewwidget.h
+++ b/konqueror/listview/konq_listviewwidget.h
@@ -30,8 +30,6 @@
#include <konq_propsview.h>
#include "konq_listviewitems.h"
-#include <konq_sort_constants.h> // Important
-
namespace TDEIO { class Job; }
class TQCursor;
diff --git a/konqueror/listview/konq_textview.rc b/konqueror/listview/konq_textview.rc
index 103f2b82e..b26562c0c 100644
--- a/konqueror/listview/konq_textview.rc
+++ b/konqueror/listview/konq_textview.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="KonqTextView" version="6">
+<kpartgui name="KonqTextView" version="7">
<MenuBar>
<Menu name="edit"><text>&amp;Edit</text>
<Menu name="selection"><text>Selection</text>
@@ -14,10 +14,8 @@
<Menu name="view"><text>&amp;View</text>
<Action name="show_dot" />
<Menu name="sort"><text>&amp;Sort</text>
- <!--TBD <TearOffHandle />-->
<Action name="order_unicode_unmodified"/>
<Action name="order_unicode_case_insensitive"/>
- <!--<Action name="sort_caseinsensitive"/>-->
<Action name="order_locale_defined"/>
<Separator/>
<Action name="group_directories_first"/>
diff --git a/konqueror/listview/konq_treeview.rc b/konqueror/listview/konq_treeview.rc
index 5691c6011..dd29a7bd0 100644
--- a/konqueror/listview/konq_treeview.rc
+++ b/konqueror/listview/konq_treeview.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="KonqTreeView" version="11">
+<kpartgui name="KonqTreeView" version="12">
<MenuBar>
<Menu name="edit"><text>&amp;Edit</text>
<Menu name="selection"><text>Selection</text>
@@ -25,10 +25,8 @@
<Separator/>
<Action name="show_dot"/>
<Menu name="sort"><text>&amp;Sort</text>
- <!--TBD <TearOffHandle />-->
<Action name="order_unicode_unmodified"/>
<Action name="order_unicode_case_insensitive"/>
- <!--<Action name="sort_caseinsensitive"/>-->
<Action name="order_locale_defined"/>
<Separator/>
<Action name="group_directories_first"/>
diff --git a/libkonq/konq_propsview.cpp b/libkonq/konq_propsview.cpp
index ae6474fd7..f72aee191 100644
--- a/libkonq/konq_propsview.cpp
+++ b/libkonq/konq_propsview.cpp
@@ -34,7 +34,7 @@
#include <ksimpleconfig.h>
-#include "konq_sort_constants.h" // Important
+#include "konq_sort_constants.h"
static TQPixmap wallpaperPixmap( const TQString & _wallpaper )
{
diff --git a/libkonq/konq_propsview.h b/libkonq/konq_propsview.h
index 70eec0dae..132c53a55 100644
--- a/libkonq/konq_propsview.h
+++ b/libkonq/konq_propsview.h
@@ -26,7 +26,7 @@
#include <kurl.h>
#include <libkonq_export.h>
-#include "konq_sort_constants.h" // Important
+#include "konq_sort_constants.h"
class TDEInstance;
class TDEConfigBase;
diff --git a/libkonq/konq_sort_constants.h b/libkonq/konq_sort_constants.h
index c58d3cb30..f6c695b19 100644
--- a/libkonq/konq_sort_constants.h
+++ b/libkonq/konq_sort_constants.h
@@ -8,28 +8,6 @@ enum {
UNICODE_UNMODIFIED = 0,
LOCALE_UNMODIFIED = 1,
UNICODE_CASEINSENSITIVE = 2,
- LOCALE_MODIFIED = 3
} TextSortOrders;
-#define LOCALE_DEFAULT LOCALE_UNMODIFIED
-
-
-// We define these UI text items once to used in different places
-
-#define LABEL_UNICODE_UNMODIFIED "&Unicode based"
-#define LABEL_UNICODE_CASEINSENSITIVE "Unicode based, &case insensitive"
-#define LABEL_LOCALE_UNMODIFIED "&Locale Order"
-#define LABEL_LOCALE_MODIFIED "Locale Order - &Improved"
-
-#define LABEL_DIRECTORIES_FIRST "&Directories displayed before non-directories"
-#define LABEL_HIDDEN_FIRST "&Hidden displayed before non-hidden"
-
-#define TOOLTIP_UNICODE_UNMODIFIED "Strict numeric Unicode codepoint order"
-#define TOOLTIP_UNICODE_CASEINSENSITIVE "Like above but with lower/upper case ASCII letters adjacent"
-#define TOOLTIP_LOCALE_UNMODIFIED "Locale-defined order, usually \"friendly\""
-#define TOOLTIP_LOCALE_MODIFIED "Locale-defined order with enhancements"
-
-#define TOOLTIP_DIRECTORIES_FIRST "Group directories before non-directories"
-#define TOOLTIP_HIDDEN_FIRST "Group hidden before non-hidden"
-
#endif // KONQ_SORT_CONSTANTS_H
diff --git a/libkonq/konq_string_compare.h b/libkonq/konq_string_compare.h
index 50682e418..8d17d409f 100644
--- a/libkonq/konq_string_compare.h
+++ b/libkonq/konq_string_compare.h
@@ -42,56 +42,10 @@ static inline int stringCompare(
return a.localeAwareCompare( b );
break;
- case LOCALE_MODIFIED:
- /*
- * Reserved for future "improvement" to LOCALE_UNMODIFIED.
- * Current implementation reproduces effect that the legacy
- * option "Case Insensitive Sort" previously had on listviews.
- * It has subtle but undesirable side effects for the en_US
- * locale and probably other locales. For example: while
- * 'a' will sort just before 'A', 'ā' will sort just AFTER 'Ā'.
- */
- return a.lower().localeAwareCompare( b.lower() );
- break;
-
default: // Treat as UNICODE_UNMODIFIED
return a.compare( b );
break;
}
}
-/*
-
-The above function implements a string comparison function whose operation varies
-depending on the "sortorder" the caller specifies. Calls are to it is intended to
-(eventually) replace code in the following konqueror view-specific comparison
-functions that are called many times when sorting:
-
-* konqueror/listview/konq_listviewitems.cpp: KonqBaseListViewItem::compare()
- Replaces the following code at end of function:
-
- if ( m_pListViewWidget->caseInsensitiveSort() )
- return text( col ).lower().localeAwareCompare( k->text( col ).lower() );
- else {
- return m_pListViewWidget->m_pSettings->caseSensitiveCompare( text( col ), k->text( col ) );
-
-* libkonq/tdefileivi.cpp: KFileIVI::compare()
- Replaces the following code at end of function:
-
- if ( view->caseInsensitiveSort() )
- return key().localeAwareCompare( i->key() );
- else
- return view->m_pSettings->caseSensitiveCompare( key(), i->key() );
-
- Notice that unlike the listview function referenced above, this function does
- NOT use lower() in calls to localeAwareCompare() for caseInsensitveSort.
-
-* libkonq/KonqFMSettings::caseSensitiveCompare()
- Obsoletes entire function thereby addressing issue 252.
-
-The above 2 functions will need to remain in place until iconview is retrofitted
-with user interface and code to bring it up to par with listview.
-
-*/
-
#endif // KONQ_STRING_COMPARE_H