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

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

Issue 7227027: GTK: More 2.18 goodness. Move from macros to real accessor functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove views/ Created 9 years, 5 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/ui/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 4fe87367e941808183ae026f9b46b51baa3f22ea..c71bf77625a3515633eee60524b420f994e00ef0 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -130,7 +130,7 @@ const double kContentSettingBottomColor[] = { 0xff / 255.0,
// If widget is visible, increment the int pointed to by count.
// Suitible for use with gtk_container_foreach.
void CountVisibleWidgets(GtkWidget* widget, gpointer count) {
- if (GTK_WIDGET_VISIBLE(widget))
+ if (gtk_widget_get_visible(widget))
*static_cast<int*>(count) += 1;
}
@@ -1163,10 +1163,13 @@ void LocationBarViewGtk::AdjustChildrenVisibility() {
// Only one of |tab_to_search_alignment_| and |tab_to_search_hint_| can be
// visible at the same time.
- if (!show_selected_keyword_ && GTK_WIDGET_VISIBLE(tab_to_search_alignment_))
+ if (!show_selected_keyword_ &&
+ gtk_widget_get_visible(tab_to_search_alignment_)) {
gtk_widget_hide(tab_to_search_alignment_);
- else if (!show_keyword_hint_ && GTK_WIDGET_VISIBLE(tab_to_search_hint_))
+ } else if (!show_keyword_hint_ &&
+ gtk_widget_get_visible(tab_to_search_hint_)) {
gtk_widget_hide(tab_to_search_hint_);
+ }
if (show_selected_keyword_) {
GtkRequisition box, full_label, partial_label;
@@ -1176,7 +1179,7 @@ void LocationBarViewGtk::AdjustChildrenVisibility() {
int full_partial_width_diff = full_label.width - partial_label.width;
int full_box_width;
int partial_box_width;
- if (GTK_WIDGET_VISIBLE(tab_to_search_full_label_)) {
+ if (gtk_widget_get_visible(tab_to_search_full_label_)) {
full_box_width = box.width;
partial_box_width = full_box_width - full_partial_width_diff;
} else {
@@ -1269,6 +1272,10 @@ LocationBarViewGtk::ContentSettingImageViewGtk::~ContentSettingImageViewGtk() {
content_setting_bubble_->Close();
}
+bool LocationBarViewGtk::ContentSettingImageViewGtk::IsVisible() {
+ return gtk_widget_get_visible(widget());
+}
+
void LocationBarViewGtk::ContentSettingImageViewGtk::UpdateFromTabContents(
TabContents* tab_contents) {
content_setting_image_model_->UpdateFromTabContents(tab_contents);
@@ -1467,6 +1474,10 @@ LocationBarViewGtk::PageActionViewGtk::~PageActionViewGtk() {
g_object_unref(last_icon_pixbuf_);
}
+bool LocationBarViewGtk::PageActionViewGtk::IsVisible() {
+ return gtk_widget_get_visible(widget());
+}
+
void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility(
TabContents* contents, const GURL& url) {
// Save this off so we can pass it back to the extension when the action gets
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.h ('k') | chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698