diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 21:47:00 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 21:47:00 +0000 |
commit | 868fa750bc04355bbcefd774f301b910d5d1ae4d (patch) | |
tree | ae0e567380e0b13adf36c33fda1c08164bdb0010 | |
parent | 4728aab62e1076e58ccd756200719b9babd7ed9b (diff) | |
download | chromium_src-868fa750bc04355bbcefd774f301b910d5d1ae4d.zip chromium_src-868fa750bc04355bbcefd774f301b910d5d1ae4d.tar.gz chromium_src-868fa750bc04355bbcefd774f301b910d5d1ae4d.tar.bz2 |
Rename namespace gtk_tree_util to gtk_tree which is shorter.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/160431
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22318 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/options/cookies_view.cc | 14 | ||||
-rw-r--r-- | chrome/browser/gtk/options/exceptions_page_gtk.cc | 8 | ||||
-rw-r--r-- | chrome/browser/gtk/options/passwords_page_gtk.cc | 14 | ||||
-rw-r--r-- | chrome/browser/gtk/options/url_picker_dialog_gtk.cc | 13 | ||||
-rw-r--r-- | chrome/chrome.gyp | 4 | ||||
-rw-r--r-- | chrome/common/gtk_tree.cc (renamed from chrome/common/gtk_tree_util.cc) | 6 | ||||
-rw-r--r-- | chrome/common/gtk_tree.h (renamed from chrome/common/gtk_tree_util.h) | 10 |
7 files changed, 34 insertions, 35 deletions
diff --git a/chrome/browser/gtk/options/cookies_view.cc b/chrome/browser/gtk/options/cookies_view.cc index b22850e..83cfa21 100644 --- a/chrome/browser/gtk/options/cookies_view.cc +++ b/chrome/browser/gtk/options/cookies_view.cc @@ -10,7 +10,7 @@ #include "base/string_util.h" #include "base/time_format.h" #include "chrome/browser/cookies_table_model.h" -#include "chrome/common/gtk_tree_util.h" +#include "chrome/common/gtk_tree.h" #include "chrome/common/gtk_util.h" #include "grit/generated_resources.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -289,7 +289,7 @@ void CookiesView::PopulateCookieDetails() { NOTREACHED(); return; } - int selected_index = gtk_tree_util::GetTreeSortChildRowNumForPath( + int selected_index = gtk_tree::GetTreeSortChildRowNumForPath( list_sort_, static_cast<GtkTreePath*>(list->data)); g_list_foreach(list, (GFunc)gtk_tree_path_free, NULL); g_list_free(list); @@ -341,7 +341,7 @@ void CookiesView::RemoveSelectedCookies() { GList* node; size_t i; for (i = 0, node = list; node != NULL; ++i, node = node->next) { - selected_rows[i] = gtk_tree_util::GetTreeSortChildRowNumForPath( + selected_rows[i] = gtk_tree::GetTreeSortChildRowNumForPath( list_sort_, static_cast<GtkTreePath*>(node->data)); } g_list_foreach(list, (GFunc)gtk_tree_path_free, NULL); @@ -423,8 +423,8 @@ void CookiesView::OnItemsRemoved(int start, int length) { // static gint CookiesView::CompareSite(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer window) { - int row1 = gtk_tree_util::GetRowNumForIter(model, a); - int row2 = gtk_tree_util::GetRowNumForIter(model, b); + int row1 = gtk_tree::GetRowNumForIter(model, a); + int row2 = gtk_tree::GetRowNumForIter(model, b); return reinterpret_cast<CookiesView*>(window)->cookies_table_model_-> CompareValues(row1, row2, IDS_COOKIES_DOMAIN_COLUMN_HEADER); } @@ -432,8 +432,8 @@ gint CookiesView::CompareSite(GtkTreeModel* model, GtkTreeIter* a, // static gint CookiesView::CompareCookieName(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer window) { - int row1 = gtk_tree_util::GetRowNumForIter(model, a); - int row2 = gtk_tree_util::GetRowNumForIter(model, b); + int row1 = gtk_tree::GetRowNumForIter(model, a); + int row2 = gtk_tree::GetRowNumForIter(model, b); return reinterpret_cast<CookiesView*>(window)->cookies_table_model_-> CompareValues(row1, row2, IDS_COOKIES_NAME_COLUMN_HEADER); } diff --git a/chrome/browser/gtk/options/exceptions_page_gtk.cc b/chrome/browser/gtk/options/exceptions_page_gtk.cc index 638a1a7..a104ada 100644 --- a/chrome/browser/gtk/options/exceptions_page_gtk.cc +++ b/chrome/browser/gtk/options/exceptions_page_gtk.cc @@ -7,7 +7,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/gfx/gtk_util.h" -#include "chrome/common/gtk_tree_util.h" +#include "chrome/common/gtk_tree.h" #include "chrome/common/gtk_util.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" @@ -133,7 +133,7 @@ void ExceptionsPageGtk::OnRemoveButtonClicked(GtkButton* widget, GtkTreePath* path = gtk_tree_model_get_path( GTK_TREE_MODEL(page->exception_list_sort_), &iter); - gint index = gtk_tree_util::GetTreeSortChildRowNumForPath( + gint index = gtk_tree::GetTreeSortChildRowNumForPath( page->exception_list_sort_, path); gtk_tree_path_free(path); @@ -178,8 +178,8 @@ void ExceptionsPageGtk::OnExceptionSelectionChanged(GtkTreeSelection* selection, gint ExceptionsPageGtk::CompareSite(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer window) { - int row1 = gtk_tree_util::GetRowNumForIter(model, a); - int row2 = gtk_tree_util::GetRowNumForIter(model, b); + int row1 = gtk_tree::GetRowNumForIter(model, a); + int row2 = gtk_tree::GetRowNumForIter(model, b); ExceptionsPageGtk* page = reinterpret_cast<ExceptionsPageGtk*>(window); return page->exception_list_[row1].origin.spec().compare( page->exception_list_[row2].origin.spec()); diff --git a/chrome/browser/gtk/options/passwords_page_gtk.cc b/chrome/browser/gtk/options/passwords_page_gtk.cc index 9a2f795..9bd327c 100644 --- a/chrome/browser/gtk/options/passwords_page_gtk.cc +++ b/chrome/browser/gtk/options/passwords_page_gtk.cc @@ -7,7 +7,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/gfx/gtk_util.h" -#include "chrome/common/gtk_tree_util.h" +#include "chrome/common/gtk_tree.h" #include "chrome/common/gtk_util.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" @@ -178,7 +178,7 @@ void PasswordsPageGtk::OnRemoveButtonClicked(GtkButton* widget, GtkTreePath* path = gtk_tree_model_get_path( GTK_TREE_MODEL(page->password_list_sort_), &iter); - gint index = gtk_tree_util::GetTreeSortChildRowNumForPath( + gint index = gtk_tree::GetTreeSortChildRowNumForPath( page->password_list_sort_, path); gtk_tree_path_free(path); @@ -260,7 +260,7 @@ void PasswordsPageGtk::OnShowPasswordButtonClicked(GtkButton* widget, } GtkTreePath* path = gtk_tree_model_get_path( GTK_TREE_MODEL(page->password_list_sort_), &iter); - gint index = gtk_tree_util::GetTreeSortChildRowNumForPath( + gint index = gtk_tree::GetTreeSortChildRowNumForPath( page->password_list_sort_, path); gtk_tree_path_free(path); std::string pass = WideToUTF8(page->password_list_[index].password_value); @@ -292,8 +292,8 @@ void PasswordsPageGtk::OnPasswordSelectionChanged(GtkTreeSelection* selection, gint PasswordsPageGtk::CompareSite(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer window) { - int row1 = gtk_tree_util::GetRowNumForIter(model, a); - int row2 = gtk_tree_util::GetRowNumForIter(model, b); + int row1 = gtk_tree::GetRowNumForIter(model, a); + int row2 = gtk_tree::GetRowNumForIter(model, b); PasswordsPageGtk* page = reinterpret_cast<PasswordsPageGtk*>(window); return page->password_list_[row1].origin.spec().compare( page->password_list_[row2].origin.spec()); @@ -303,8 +303,8 @@ gint PasswordsPageGtk::CompareSite(GtkTreeModel* model, gint PasswordsPageGtk::CompareUsername(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer window) { - int row1 = gtk_tree_util::GetRowNumForIter(model, a); - int row2 = gtk_tree_util::GetRowNumForIter(model, b); + int row1 = gtk_tree::GetRowNumForIter(model, a); + int row2 = gtk_tree::GetRowNumForIter(model, b); PasswordsPageGtk* page = reinterpret_cast<PasswordsPageGtk*>(window); return page->password_list_[row1].username_value.compare( page->password_list_[row2].username_value); diff --git a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc index 94882b1..631531f 100644 --- a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc +++ b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc @@ -11,7 +11,7 @@ #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/browser/possible_url_model.h" #include "chrome/browser/profile.h" -#include "chrome/common/gtk_tree_util.h" +#include "chrome/common/gtk_tree.h" #include "chrome/common/gtk_util.h" #include "chrome/common/pref_names.h" #include "googleurl/src/gurl.h" @@ -177,8 +177,7 @@ void UrlPickerDialogGtk::EnableControls() { } std::string UrlPickerDialogGtk::GetURLForPath(GtkTreePath* path) const { - gint row = gtk_tree_util::GetTreeSortChildRowNumForPath(history_list_sort_, - path); + gint row = gtk_tree::GetTreeSortChildRowNumForPath(history_list_sort_, path); if (row < 0) { NOTREACHED(); return std::string(); @@ -253,8 +252,8 @@ gint UrlPickerDialogGtk::CompareTitle(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer window) { - int row1 = gtk_tree_util::GetRowNumForIter(model, a); - int row2 = gtk_tree_util::GetRowNumForIter(model, b); + int row1 = gtk_tree::GetRowNumForIter(model, a); + int row2 = gtk_tree::GetRowNumForIter(model, b); return reinterpret_cast<UrlPickerDialogGtk*>(window)->url_table_model_-> CompareValues(row1, row2, IDS_ASI_PAGE_COLUMN); } @@ -264,8 +263,8 @@ gint UrlPickerDialogGtk::CompareURL(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer window) { - int row1 = gtk_tree_util::GetRowNumForIter(model, a); - int row2 = gtk_tree_util::GetRowNumForIter(model, b); + int row1 = gtk_tree::GetRowNumForIter(model, a); + int row2 = gtk_tree::GetRowNumForIter(model, b); return reinterpret_cast<UrlPickerDialogGtk*>(window)->url_table_model_-> CompareValues(row1, row2, IDS_ASI_URL_COLUMN); } diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 07dcaab..2791cd5 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -394,8 +394,8 @@ 'common/env_vars.h', 'common/filter_policy.h', 'common/gears_api.h', - 'common/gtk_tree_util.cc', - 'common/gtk_tree_util.h', + 'common/gtk_tree.cc', + 'common/gtk_tree.h', 'common/gtk_util.cc', 'common/gtk_util.h', 'common/histogram_synchronizer.cc', diff --git a/chrome/common/gtk_tree_util.cc b/chrome/common/gtk_tree.cc index 0b4cec4..fafee0f 100644 --- a/chrome/common/gtk_tree_util.cc +++ b/chrome/common/gtk_tree.cc @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/common/gtk_tree_util.h" +#include "chrome/common/gtk_tree.h" #include "base/logging.h" -namespace gtk_tree_util { +namespace gtk_tree { gint GetRowNumForPath(GtkTreePath* path) { gint* indices = gtk_tree_path_get_indices(path); @@ -33,4 +33,4 @@ gint GetTreeSortChildRowNumForPath(GtkTreeModel* sort_model, return row; } -} // namespace gtk_tree_util +} // namespace gtk_tree diff --git a/chrome/common/gtk_tree_util.h b/chrome/common/gtk_tree.h index 63f4644..8a6f694 100644 --- a/chrome/common/gtk_tree_util.h +++ b/chrome/common/gtk_tree.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_COMMON_GTK_TREE_UTIL_H_ -#define CHROME_COMMON_GTK_TREE_UTIL_H_ +#ifndef CHROME_COMMON_GTK_TREE_H_ +#define CHROME_COMMON_GTK_TREE_H_ #include <gtk/gtk.h> -namespace gtk_tree_util { +namespace gtk_tree { // Get the row number corresponding to |path|. gint GetRowNumForPath(GtkTreePath* path); @@ -20,6 +20,6 @@ gint GetRowNumForIter(GtkTreeModel* model, GtkTreeIter* iter); gint GetTreeSortChildRowNumForPath(GtkTreeModel* sort_model, GtkTreePath* sort_path); -} // namespace gtk_tree_util +} // namespace gtk_tree -#endif // CHROME_COMMON_GTK_TREE_UTIL_H_ +#endif // CHROME_COMMON_GTK_TREE_H_ |