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

Side by Side Diff: chrome/browser/gtk/page_info_window_gtk.cc

Issue 3187019: Part 2 of the SSL InfoBubble. 2nd try, this time with test fixed.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
« no previous file with comments | « chrome/browser/cocoa/page_info_window_mac_unittest.mm ('k') | chrome/browser/page_info_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 GtkWidget* section_box = gtk_hbox_new(FALSE, 0); 150 GtkWidget* section_box = gtk_hbox_new(FALSE, 0);
151 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 151 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
152 GtkWidget* image = gtk_image_new_from_pixbuf(section.state ? 152 GtkWidget* image = gtk_image_new_from_pixbuf(section.state ?
153 rb.GetPixbufNamed(IDR_PAGEINFO_GOOD) : 153 rb.GetPixbufNamed(IDR_PAGEINFO_GOOD) :
154 rb.GetPixbufNamed(IDR_PAGEINFO_BAD)); 154 rb.GetPixbufNamed(IDR_PAGEINFO_BAD));
155 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, 155 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE,
156 gtk_util::kControlSpacing); 156 gtk_util::kControlSpacing);
157 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); 157 gtk_misc_set_alignment(GTK_MISC(image), 0, 0);
158 158
159 GtkWidget* text_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); 159 GtkWidget* text_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
160 if (!section.head_line.empty()) { 160 if (!section.headline.empty()) {
161 label = gtk_label_new(UTF16ToUTF8(section.head_line).c_str()); 161 label = gtk_label_new(UTF16ToUTF8(section.headline).c_str());
162 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); 162 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
163 gtk_box_pack_start(GTK_BOX(text_box), label, FALSE, FALSE, 0); 163 gtk_box_pack_start(GTK_BOX(text_box), label, FALSE, FALSE, 0);
164 } 164 }
165 label = gtk_label_new(UTF16ToUTF8(section.description).c_str()); 165 label = gtk_label_new(UTF16ToUTF8(section.description).c_str());
166 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); 166 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
167 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); 167 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
168 // Allow linebreaking in the middle of words if necessary, so that extremely 168 // Allow linebreaking in the middle of words if necessary, so that extremely
169 // long hostnames (longer than one line) will still be completely shown. 169 // long hostnames (longer than one line) will still be completely shown.
170 gtk_label_set_line_wrap_mode(GTK_LABEL(label), PANGO_WRAP_WORD_CHAR); 170 gtk_label_set_line_wrap_mode(GTK_LABEL(label), PANGO_WRAP_WORD_CHAR);
171 gtk_box_pack_start(GTK_BOX(text_box), label, FALSE, FALSE, 0); 171 gtk_box_pack_start(GTK_BOX(text_box), label, FALSE, FALSE, 0);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 gtk_window_present(GTK_WINDOW(iter->second->widget())); 213 gtk_window_present(GTK_WINDOW(iter->second->widget()));
214 return; 214 return;
215 } 215 }
216 216
217 PageInfoWindowGtk* page_info_window = 217 PageInfoWindowGtk* page_info_window =
218 new PageInfoWindowGtk(parent, profile, url, ssl, show_history); 218 new PageInfoWindowGtk(parent, profile, url, ssl, show_history);
219 page_info_window->Show(); 219 page_info_window->Show();
220 } 220 }
221 221
222 } // namespace browser 222 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/page_info_window_mac_unittest.mm ('k') | chrome/browser/page_info_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698