summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-14 12:12:01 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-14 12:12:01 +0000
commit3621cab802540a6faa2aa45b0b15aacb5fb31a89 (patch)
tree179564446bf0312171969b8b8a1535afe69ace2f
parent2cd8f3aea5e32f63416e5fbfaffa999b412542e6 (diff)
downloadchromium_src-3621cab802540a6faa2aa45b0b15aacb5fb31a89.zip
chromium_src-3621cab802540a6faa2aa45b0b15aacb5fb31a89.tar.gz
chromium_src-3621cab802540a6faa2aa45b0b15aacb5fb31a89.tar.bz2
gtk: Show the page info icon for the first visit on Page Info Bubble.
BUG=52916 TEST=out/Debug/chrome --enable-new-page-info-bubble. Go to https://google.com, click on the omnibox icon, see the icon is showed for the the First Visit section. Review URL: http://codereview.chromium.org/3364018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59357 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/page_info_bubble_gtk.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/gtk/page_info_bubble_gtk.cc b/chrome/browser/gtk/page_info_bubble_gtk.cc
index 807de26..0417d79 100644
--- a/chrome/browser/gtk/page_info_bubble_gtk.cc
+++ b/chrome/browser/gtk/page_info_bubble_gtk.cc
@@ -240,6 +240,15 @@ GtkWidget* PageInfoBubbleGtk::CreateSection(
gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE,
gtk_util::kControlSpacing);
gtk_misc_set_alignment(GTK_MISC(image), 0, 0);
+ } else if (section.type == PageInfoModel::SECTION_INFO_FIRST_VISIT) {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ GdkPixbuf* pixbuf = section.state == PageInfoModel::SECTION_STATE_OK ?
+ rb.GetPixbufNamed(IDR_PAGEINFO_INFO) :
+ rb.GetPixbufNamed(IDR_PAGEINFO_WARNING_MAJOR);
+ GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf);
+ gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE,
+ gtk_util::kControlSpacing);
+ gtk_misc_set_alignment(GTK_MISC(image), 0, 0);
}
GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);