diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 20:56:17 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 20:56:17 +0000 |
commit | b5a2209a89eb1569f28223889bb3f1960619bb8a (patch) | |
tree | c96c26f02c9b7cea91bae5053cc0e257e430fccf /chrome/browser/gtk/options/cookies_view.cc | |
parent | 3e2bfcf0ae9e0e81c091294460fdbeaef51f47ad (diff) | |
download | chromium_src-b5a2209a89eb1569f28223889bb3f1960619bb8a.zip chromium_src-b5a2209a89eb1569f28223889bb3f1960619bb8a.tar.gz chromium_src-b5a2209a89eb1569f28223889bb3f1960619bb8a.tar.bz2 |
Revert "Add unittest for Gtk cookie manager."
This reverts commit 91bd4c1a4703db44ea45852bf2f62822e1ded743, which caused valgrind errors.
TBR=erg
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/options/cookies_view.cc')
-rw-r--r-- | chrome/browser/gtk/options/cookies_view.cc | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/chrome/browser/gtk/options/cookies_view.cc b/chrome/browser/gtk/options/cookies_view.cc index b339841..4821e4e 100644 --- a/chrome/browser/gtk/options/cookies_view.cc +++ b/chrome/browser/gtk/options/cookies_view.cc @@ -30,6 +30,14 @@ enum { RESPONSE_REMOVE_ALL }; +// Column ids for |list_store_|. +enum { + COL_ICON, + COL_SITE, + COL_COOKIE_NAME, + COL_COUNT, +}; + // The currently open cookie manager, if any. CookiesView* instance_ = NULL; @@ -47,7 +55,6 @@ void CookiesView::Show(Profile* profile) { gtk_window_present(GTK_WINDOW(instance_->dialog_)); } else { instance_ = new CookiesView(profile); - gtk_widget_show_all(instance_->dialog_); } } @@ -212,6 +219,10 @@ void CookiesView::Init() { cookies_table_model_.reset(new CookiesTableModel(profile_)); cookies_table_model_->SetObserver(this); OnModelChanged(); + + // Show dialog. + EnableControls(); + gtk_widget_show_all(dialog_); } void CookiesView::InitCookieDetailRow(int row, int label_id, @@ -223,22 +234,18 @@ void CookiesView::InitCookieDetailRow(int row, int label_id, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); *entry = gtk_entry_new(); - - // The style objects are NULL if running without a DISPLAY (in unittest) - if (label_style_ && dialog_style_) { - gtk_widget_modify_fg(*entry, GTK_STATE_NORMAL, - &label_style_->fg[GTK_STATE_NORMAL]); - gtk_widget_modify_fg(*entry, GTK_STATE_INSENSITIVE, - &label_style_->fg[GTK_STATE_INSENSITIVE]); - // GTK_NO_WINDOW widgets like GtkLabel don't draw their own background, so we - // combine the normal or insensitive fg of the label style with the normal - // background of the window style to achieve the "normal label" and - // "insensitive label" colors. - gtk_widget_modify_base(*entry, GTK_STATE_NORMAL, - &dialog_style_->bg[GTK_STATE_NORMAL]); - gtk_widget_modify_base(*entry, GTK_STATE_INSENSITIVE, - &dialog_style_->bg[GTK_STATE_NORMAL]); - } + gtk_widget_modify_fg(*entry, GTK_STATE_NORMAL, + &label_style_->fg[GTK_STATE_NORMAL]); + gtk_widget_modify_fg(*entry, GTK_STATE_INSENSITIVE, + &label_style_->fg[GTK_STATE_INSENSITIVE]); + // GTK_NO_WINDOW widgets like GtkLabel don't draw their own background, so we + // combine the normal or insensitive fg of the label style with the normal + // background of the window style to achieve the "normal label" and + // "insensitive label" colors. + gtk_widget_modify_base(*entry, GTK_STATE_NORMAL, + &dialog_style_->bg[GTK_STATE_NORMAL]); + gtk_widget_modify_base(*entry, GTK_STATE_INSENSITIVE, + &dialog_style_->bg[GTK_STATE_NORMAL]); gtk_entry_set_editable(GTK_ENTRY(*entry), FALSE); gtk_entry_set_has_frame(GTK_ENTRY(*entry), FALSE); @@ -374,7 +381,6 @@ void CookiesView::OnModelChanged() { gtk_list_store_clear(list_store_); for (int i = 0; i < cookies_table_model_->RowCount(); ++i) AddNodeToList(i); - EnableControls(); } void CookiesView::OnItemsChanged(int start, int length) { @@ -405,7 +411,6 @@ void CookiesView::OnItemsRemoved(int start, int length) { } gtk_list_store_remove(list_store_, &iter); } - EnableControls(); } // static |