From b0f60b4a4a214ee79142537efe851d91ce41da89 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Mon, 30 Oct 2006 13:59:22 +0000 Subject: [PATCH] undoing [2391]; see #1878 --- .../gLiveSupport/src/SearchWindow.cxx | 40 ------------------- .../products/gLiveSupport/src/SearchWindow.h | 16 -------- 2 files changed, 56 deletions(-) diff --git a/campcaster/src/products/gLiveSupport/src/SearchWindow.cxx b/campcaster/src/products/gLiveSupport/src/SearchWindow.cxx index c159628da..ed8e762c5 100644 --- a/campcaster/src/products/gLiveSupport/src/SearchWindow.cxx +++ b/campcaster/src/products/gLiveSupport/src/SearchWindow.cxx @@ -341,11 +341,6 @@ SearchWindow :: constructSearchResultsView(void) throw () localSearchResults = Gtk::ListStore::create(modelColumns); remoteSearchResults = Gtk::ListStore::create(modelColumns); - localSearchResults->set_default_sort_func(sigc::mem_fun( - *this, &SearchWindow::onSortTreeModel)); - remoteSearchResults->set_default_sort_func(sigc::mem_fun( - *this, &SearchWindow::onSortTreeModel)); - searchResultsTreeView = Gtk::manage(wf->createTreeView(localSearchResults)); searchResultsTreeView->connectModelSignals(remoteSearchResults); @@ -591,41 +586,6 @@ SearchWindow :: displaySearchResults( row[modelColumns.lengthColumn] = length ? *TimeConversion::timeDurationToHhMmSsString(length) : ""; } - - treeModel->set_sort_column(Gtk::TreeSortable::DEFAULT_SORT_COLUMN_ID, - Gtk::SORT_ASCENDING); -} - - -/*------------------------------------------------------------------------------ - * Sorting function for the search results. - *----------------------------------------------------------------------------*/ -int -SearchWindow :: onSortTreeModel(const Gtk::TreeModel::iterator & iter1, - const Gtk::TreeModel::iterator & iter2) - throw () -{ - Gtk::TreeModel::Row row1 = *iter1; - Gtk::TreeModel::Row row2 = *iter2; - - int creatorCompare = - Glib::ustring(row1[modelColumns.creatorColumn]).compare( - Glib::ustring(row2[modelColumns.creatorColumn])); - if (creatorCompare != 0) { - return creatorCompare; - } - - int sourceCompare = - Glib::ustring(row1[modelColumns.sourceColumn]).compare( - Glib::ustring(row2[modelColumns.sourceColumn])); - if (sourceCompare != 0) { - return sourceCompare; - } - - int titleCompare = - Glib::ustring(row1[modelColumns.titleColumn]).compare( - Glib::ustring(row2[modelColumns.titleColumn])); - return titleCompare; } diff --git a/campcaster/src/products/gLiveSupport/src/SearchWindow.h b/campcaster/src/products/gLiveSupport/src/SearchWindow.h index b45539ec4..099bd418a 100644 --- a/campcaster/src/products/gLiveSupport/src/SearchWindow.h +++ b/campcaster/src/products/gLiveSupport/src/SearchWindow.h @@ -346,22 +346,6 @@ class SearchWindow : public GuiWindow void updateBackwardAndForwardButtons(void) throw (); - /** - * Sorting function for the search results. - * - * The order of both the local and remote search results is - * determined by this function. - * @param iter1 iterator for one row to be compared. - * @param iter2 iterator for the other row to be compared. - * @return -1 if iter1 < iter2, 0 if they are equal, and - * 1 if iter1 > iter2. - * @see Gtk::TreeSortable::SlotCompare - */ - int - onSortTreeModel(const Gtk::TreeModel::iterator & iter1, - const Gtk::TreeModel::iterator & iter2) - throw (); - /** * Signal handler for the mouse clicked on one of the entries. *