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

Side by Side Diff: chrome/browser/ui/gtk/page_info_bubble_gtk.cc

Issue 6541031: Integrate gfx::Image into the ResourceBundle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <gtk/gtk.h> 5 #include <gtk/gtk.h>
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 G_CALLBACK(OnHelpLinkClickedThunk), this); 207 G_CALLBACK(OnHelpLinkClickedThunk), this);
208 208
209 theme_provider_->InitThemesFor(this); 209 theme_provider_->InitThemesFor(this);
210 gtk_widget_show_all(contents_); 210 gtk_widget_show_all(contents_);
211 } 211 }
212 212
213 GtkWidget* PageInfoBubbleGtk::CreateSection( 213 GtkWidget* PageInfoBubbleGtk::CreateSection(
214 const PageInfoModel::SectionInfo& section) { 214 const PageInfoModel::SectionInfo& section) {
215 GtkWidget* section_box = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); 215 GtkWidget* section_box = gtk_hbox_new(FALSE, gtk_util::kControlSpacing);
216 216
217 GdkPixbuf* pixbuf = model_.GetIconImage(section.icon_id); 217 GdkPixbuf* pixbuf = *model_.GetIconImage(section.icon_id);
218 if (pixbuf) { 218 if (pixbuf) {
219 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf); 219 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf);
220 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, 0); 220 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, 0);
221 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); 221 gtk_misc_set_alignment(GTK_MISC(image), 0, 0);
222 } 222 }
223 223
224 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); 224 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
225 gtk_box_pack_start(GTK_BOX(section_box), vbox, TRUE, TRUE, 0); 225 gtk_box_pack_start(GTK_BOX(section_box), vbox, TRUE, TRUE, 0);
226 226
227 if (!section.headline.empty()) { 227 if (!section.headline.empty()) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 void ShowPageInfoBubble(gfx::NativeWindow parent, 282 void ShowPageInfoBubble(gfx::NativeWindow parent,
283 Profile* profile, 283 Profile* profile,
284 const GURL& url, 284 const GURL& url,
285 const NavigationEntry::SSLStatus& ssl, 285 const NavigationEntry::SSLStatus& ssl,
286 bool show_history) { 286 bool show_history) {
287 new PageInfoBubbleGtk(parent, profile, url, ssl, show_history); 287 new PageInfoBubbleGtk(parent, profile, url, ssl, show_history);
288 } 288 }
289 289
290 } // namespace browser 290 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698