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

Unified Diff: chrome/browser/gtk/page_info_bubble_gtk.cc

Issue 3364018: gtk: Show the page info icon for the first visit on Page Info Bubble. (Closed)
Patch Set: Created 10 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/page_info_bubble_gtk.cc
diff --git a/chrome/browser/gtk/page_info_bubble_gtk.cc b/chrome/browser/gtk/page_info_bubble_gtk.cc
index 807de262bb00f22a5cc41dbeb5f38f4cb252c933..0417d79356b3aa33f3e61882a8f2783167fb6a00 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698