Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1632)

Unified Diff: chrome/browser/gtk/options/content_exceptions_window_gtk.h

Issue 2876032: GTK: Fix sorting in content exception window. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Unit tests Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/options/content_exceptions_window_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/options/content_exceptions_window_gtk.h
diff --git a/chrome/browser/gtk/options/content_exceptions_window_gtk.h b/chrome/browser/gtk/options/content_exceptions_window_gtk.h
index c415419ec2a2bf92d9874f84722ff7390252f6ca..ee83985e2c4e052a50a774fdfad2dea2168d8a70 100644
--- a/chrome/browser/gtk/options/content_exceptions_window_gtk.h
+++ b/chrome/browser/gtk/options/content_exceptions_window_gtk.h
@@ -10,6 +10,7 @@
#include <string>
#include "app/gtk_signal.h"
+#include "base/gtest_prod_util.h"
Evan Martin 2010/07/01 20:13:11 Unnecessary?
#include "base/scoped_ptr.h"
#include "chrome/browser/content_exceptions_table_model.h"
#include "chrome/browser/gtk/gtk_tree.h"
@@ -65,6 +66,10 @@ class ContentExceptionsWindowGtk : public gtk_tree::TableAdapter::Delegate,
// was set to in the constructor).
std::string GetWindowTitle() const;
+ // Gets the selected indicies in the two list stores. Indicies are returned
+ // in <list_store_, sort_list_store_> order.
+ void GetSelectedModelIndices(std::set<std::pair<int, int> >* indices);
+
// GTK Callbacks
CHROMEGTK_CALLBACK_2(ContentExceptionsWindowGtk, void,
OnTreeViewRowActivate, GtkTreePath*, GtkTreeViewColumn*);
@@ -72,7 +77,12 @@ class ContentExceptionsWindowGtk : public gtk_tree::TableAdapter::Delegate,
CHROMEGTK_CALLBACK_0(ContentExceptionsWindowGtk, void,
OnTreeSelectionChanged);
- // The list presented in |treeview_|; a gobject instead of a C++ object.
+ // The list presented in |treeview_|. Separate from |list_store_|, the list
+ // that backs |sort_model_|. This separation comes so the user can sort the
+ // data on screen without changing the underlying |list_store_|.
+ GtkTreeModel* sort_list_store_;
+
+ // The backing to |sort_list_store_|. Doesn't change when sorted.
GtkListStore* list_store_;
// The C++, views-ish, cross-platform model class that actually contains the
@@ -96,6 +106,8 @@ class ContentExceptionsWindowGtk : public gtk_tree::TableAdapter::Delegate,
GtkWidget* edit_button_;
GtkWidget* remove_button_;
GtkWidget* remove_all_button_;
+
+ friend class ContentExceptionsWindowGtkUnittest;
};
#endif // CHROME_BROWSER_GTK_OPTIONS_CONTENT_EXCEPTIONS_WINDOW_GTK_H_
« no previous file with comments | « no previous file | chrome/browser/gtk/options/content_exceptions_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698