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

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

Issue 3245012: Show Page Info InfoBubble on the right side for RTL languages and make sure W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 unified diff | Download patch | Annotate | Revision Log
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 pango_attr_list_insert(attributes, 143 pango_attr_list_insert(attributes,
144 pango_attr_weight_new(PANGO_WEIGHT_BOLD)); 144 pango_attr_weight_new(PANGO_WEIGHT_BOLD));
145 gtk_label_set_attributes(GTK_LABEL(label), attributes); 145 gtk_label_set_attributes(GTK_LABEL(label), attributes);
146 pango_attr_list_unref(attributes); 146 pango_attr_list_unref(attributes);
147 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); 147 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
148 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); 148 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
149 149
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( 152 GtkWidget* image = gtk_image_new_from_pixbuf(
153 section.state != PageInfoModel::SECTION_STATE_ERROR ? 153 section.state == PageInfoModel::SECTION_STATE_OK ?
154 rb.GetPixbufNamed(IDR_PAGEINFO_GOOD) : 154 rb.GetPixbufNamed(IDR_PAGEINFO_GOOD) :
155 rb.GetPixbufNamed(IDR_PAGEINFO_BAD)); 155 rb.GetPixbufNamed(IDR_PAGEINFO_BAD));
156 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, 156 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE,
157 gtk_util::kControlSpacing); 157 gtk_util::kControlSpacing);
158 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); 158 gtk_misc_set_alignment(GTK_MISC(image), 0, 0);
159 159
160 GtkWidget* text_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); 160 GtkWidget* text_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
161 if (!section.headline.empty()) { 161 if (!section.headline.empty()) {
162 label = gtk_label_new(UTF16ToUTF8(section.headline).c_str()); 162 label = gtk_label_new(UTF16ToUTF8(section.headline).c_str());
163 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); 163 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 void ShowPageInfoBubble(gfx::NativeWindow parent, 223 void ShowPageInfoBubble(gfx::NativeWindow parent,
224 Profile* profile, 224 Profile* profile,
225 const GURL& url, 225 const GURL& url,
226 const NavigationEntry::SSLStatus& ssl, 226 const NavigationEntry::SSLStatus& ssl,
227 bool show_history) { 227 bool show_history) {
228 NOTIMPLEMENTED(); 228 NOTIMPLEMENTED();
229 } 229 }
230 230
231 } // namespace browser 231 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698