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

Unified Diff: chrome/browser/ui/gtk/certificate_viewer_gtk.cc

Issue 10406014: Add a ScopedPangoFontDescription helper class and use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | chrome/browser/ui/gtk/gtk_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/certificate_viewer_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/certificate_viewer_gtk.cc (revision 137485)
+++ chrome/browser/ui/gtk/certificate_viewer_gtk.cc (working copy)
@@ -23,6 +23,7 @@
#include "ui/base/gtk/menu_label_accelerator_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/pango_util.h"
namespace {
@@ -635,11 +636,10 @@
value_scroll_window, TRUE, TRUE, 0);
gtk_widget_ensure_style(field_value_view);
- PangoFontDescription* font_desc = pango_font_description_copy(
- gtk_widget_get_style(field_value_view)->font_desc);
- pango_font_description_set_family(font_desc, kDetailsFontFamily);
- gtk_widget_modify_font(field_value_view, font_desc);
- pango_font_description_free(font_desc);
+ gfx::ScopedPangoFontDescription font_desc(pango_font_description_copy(
+ gtk_widget_get_style(field_value_view)->font_desc));
+ pango_font_description_set_family(font_desc.get(), kDetailsFontFamily);
+ gtk_widget_modify_font(field_value_view, font_desc.get());
GtkWidget* export_hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(details_page_vbox_), export_hbox,
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/gtk_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698