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

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

Issue 650180: Initial Geolocation location bar icons. (Closed)
Patch Set: Addresses Peter and Brett's comments. Created 10 years, 9 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
Index: chrome/browser/gtk/content_blocked_bubble_gtk.cc
diff --git a/chrome/browser/gtk/content_blocked_bubble_gtk.cc b/chrome/browser/gtk/content_blocked_bubble_gtk.cc
index 11bc9212e2965a73f100216ed9340d48664ca363..a0ddd397bbb1e9e01204a526b3beb17c5285c782 100644
--- a/chrome/browser/gtk/content_blocked_bubble_gtk.cc
+++ b/chrome/browser/gtk/content_blocked_bubble_gtk.cc
@@ -72,9 +72,11 @@ void ContentSettingBubbleGtk::BuildBubble() {
gtk_container_set_border_width(GTK_CONTAINER(bubble_content), kContentBorder);
// Add the content label.
- GtkWidget* label = gtk_label_new(
- content_setting_bubble_model_->bubble_content().title.c_str());
- gtk_box_pack_start(GTK_BOX(bubble_content), label, FALSE, FALSE, 0);
+ if (!content_setting_bubble_model_->bubble_content().title.empty()) {
+ GtkWidget* label = gtk_label_new(
+ content_setting_bubble_model_->bubble_content().title.c_str());
+ gtk_box_pack_start(GTK_BOX(bubble_content), label, FALSE, FALSE, 0);
+ }
if (content_setting_bubble_model_->content_type() ==
CONTENT_SETTINGS_TYPE_POPUPS) {
@@ -121,6 +123,11 @@ void ContentSettingBubbleGtk::BuildBubble() {
content_setting_bubble_model_->bubble_content().radio_groups;
for (ContentSettingBubbleModel::RadioGroups::const_iterator i =
radio_groups.begin(); i != radio_groups.end(); ++i) {
+ if (!i->title.empty()) {
+ GtkWidget* label = gtk_label_new(i->title.c_str());
+ gtk_box_pack_start(GTK_BOX(bubble_content), label, FALSE, FALSE, 0);
+ }
+
const ContentSettingBubbleModel::RadioItems& radio_items = i->radio_items;
RadioGroupGtk radio_group_gtk;
for (ContentSettingBubbleModel::RadioItems::const_iterator j =

Powered by Google App Engine
This is Rietveld 408576698