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

Unified Diff: chrome/browser/ui/gtk/download/download_item_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/download/download_item_gtk.cc
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index e189c931ab37dde39ad971ec5efdfd75e658283e..192387692e65815bde9245f475a1e5239d2aa1e2 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -116,7 +116,7 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf,
G_CALLBACK(OnClickThunk), this);
g_signal_connect(body_.get(), "button-press-event",
G_CALLBACK(OnButtonPressThunk), this);
- GTK_WIDGET_UNSET_FLAGS(body_.get(), GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus(body_.get(), FALSE);
// Remove internal padding on the button.
GtkRcStyle* no_padding_style = gtk_rc_style_new();
no_padding_style->xthickness = 0;
@@ -156,7 +156,7 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf,
menu_button_ = gtk_button_new();
gtk_widget_set_app_paintable(menu_button_, TRUE);
- GTK_WIDGET_UNSET_FLAGS(menu_button_, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus(menu_button_, FALSE);
g_signal_connect(menu_button_, "expose-event",
G_CALLBACK(OnExposeThunk), this);
g_signal_connect(menu_button_, "button-press-event",
@@ -716,7 +716,7 @@ gboolean DownloadItemGtk::OnHboxExpose(GtkWidget* widget, GdkEventExpose* e) {
GtkShadowType body_shadow =
GTK_BUTTON(body_.get())->depressed ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
gtk_paint_box(style, widget->window,
- static_cast<GtkStateType>(GTK_WIDGET_STATE(body_.get())),
+ gtk_widget_get_state(body_.get()),
body_shadow,
&left_clip, widget, "button",
x, y, width, height);
@@ -724,7 +724,7 @@ gboolean DownloadItemGtk::OnHboxExpose(GtkWidget* widget, GdkEventExpose* e) {
GtkShadowType menu_shadow =
GTK_BUTTON(menu_button_)->depressed ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
gtk_paint_box(style, widget->window,
- static_cast<GtkStateType>(GTK_WIDGET_STATE(menu_button_)),
+ gtk_widget_get_state(menu_button_),
menu_shadow,
&right_clip, widget, "button",
x, y, width, height);
@@ -735,7 +735,7 @@ gboolean DownloadItemGtk::OnHboxExpose(GtkWidget* widget, GdkEventExpose* e) {
// the conservative side).
GtkAllocation arrow_allocation = arrow_->allocation;
gtk_paint_vline(style, widget->window,
- static_cast<GtkStateType>(GTK_WIDGET_STATE(widget)),
+ gtk_widget_get_state(widget),
&e->area, widget, "button",
arrow_allocation.y,
arrow_allocation.y + arrow_allocation.height,
@@ -751,9 +751,9 @@ gboolean DownloadItemGtk::OnExpose(GtkWidget* widget, GdkEventExpose* e) {
NineBox* nine_box = NULL;
// If true, this widget is |body_|, otherwise it is |menu_button_|.
- if (GTK_WIDGET_STATE(widget) == GTK_STATE_PRELIGHT)
+ if (gtk_widget_get_state(widget) == GTK_STATE_PRELIGHT)
nine_box = is_body ? body_nine_box_prelight_ : menu_nine_box_prelight_;
- else if (GTK_WIDGET_STATE(widget) == GTK_STATE_ACTIVE)
+ else if (gtk_widget_get_state(widget) == GTK_STATE_ACTIVE)
nine_box = is_body ? body_nine_box_active_ : menu_nine_box_active_;
else
nine_box = is_body ? body_nine_box_normal_ : menu_nine_box_normal_;
« no previous file with comments | « chrome/browser/ui/gtk/custom_button.cc ('k') | chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698