Commit d9112996 authored by darin@chromium.org's avatar darin@chromium.org

2009-01-26 Adam Langley <agl@google.com>

        Reviewed by Nikolas Zimmermann.

        gtk2drawing: fix compiler warnings

        g_object_set_data expects a gpointer as the last argument. Cast the
          TRUE/FALSE values to avoid a warning.
        gtk_tree_view_column_new doesn't return a GtkWidget.

        * platform/gtk/gtk2drawing.c:
        (setup_widget_prototype):
        (moz_gtk_get_combo_box_inner_button):
        (moz_gtk_get_combo_box_button_inner_widgets):
        (ensure_combo_box_widgets):
        (moz_gtk_get_combo_box_entry_inner_widgets):
        (moz_gtk_get_combo_box_entry_arrow):
        (ensure_combo_box_entry_widgets):
        (ensure_toolbar_widget):
        (ensure_menu_bar_item_widget):
        (ensure_menu_popup_widget):
        (ensure_menu_item_widget):
        (ensure_image_menu_item_widget):
        (ensure_menu_separator_widget):
        (ensure_check_menu_item_widget):
        (ensure_tree_header_cell_widget):
        (moz_gtk_entry_paint):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 831beecd
2009-01-26 Adam Langley <agl@google.com>
Reviewed by Nikolas Zimmermann.
gtk2drawing: fix compiler warnings
g_object_set_data expects a gpointer as the last argument. Cast the
TRUE/FALSE values to avoid a warning.
gtk_tree_view_column_new doesn't return a GtkWidget.
* platform/gtk/gtk2drawing.c:
(setup_widget_prototype):
(moz_gtk_get_combo_box_inner_button):
(moz_gtk_get_combo_box_button_inner_widgets):
(ensure_combo_box_widgets):
(moz_gtk_get_combo_box_entry_inner_widgets):
(moz_gtk_get_combo_box_entry_arrow):
(ensure_combo_box_entry_widgets):
(ensure_toolbar_widget):
(ensure_menu_bar_item_widget):
(ensure_menu_popup_widget):
(ensure_menu_item_widget):
(ensure_image_menu_item_widget):
(ensure_menu_separator_widget):
(ensure_check_menu_item_widget):
(ensure_tree_header_cell_widget):
(moz_gtk_entry_paint):
2009-01-26 David Hyatt <hyatt@apple.com>
Change display:run-in handling so that we no longer reuse RenderBlock as though it is an inline flow.
......@@ -89,7 +89,7 @@ static GtkWidget* gMenuItemWidget;
static GtkWidget* gImageMenuItemWidget;
static GtkWidget* gCheckMenuItemWidget;
static GtkWidget* gTreeViewWidget;
static GtkWidget* gMiddleTreeViewColumn;
static GtkTreeViewColumn* gMiddleTreeViewColumn;
static GtkWidget* gTreeHeaderCellWidget;
static GtkWidget* gTreeHeaderSortArrowWidget;
static GtkWidget* gExpanderWidget;
......@@ -143,7 +143,7 @@ setup_widget_prototype(GtkWidget* widget)
gtk_container_add(GTK_CONTAINER(protoLayout), widget);
gtk_widget_realize(widget);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
return MOZ_GTK_SUCCESS;
}
......@@ -288,7 +288,7 @@ moz_gtk_get_combo_box_inner_button(GtkWidget *widget, gpointer client_data)
g_object_add_weak_pointer(G_OBJECT(widget),
(gpointer) &gComboBoxButtonWidget);
gtk_widget_realize(widget);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
}
......@@ -307,7 +307,7 @@ moz_gtk_get_combo_box_button_inner_widgets(GtkWidget *widget,
} else
return;
gtk_widget_realize(widget);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
static gint
......@@ -348,7 +348,7 @@ ensure_combo_box_widgets()
&gComboBoxArrowWidget);
gtk_widget_realize(gComboBoxArrowWidget);
g_object_set_data(G_OBJECT(gComboBoxArrowWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
} else {
/* Shouldn't be reached with current internal gtk implementation; we
......@@ -398,7 +398,7 @@ moz_gtk_get_combo_box_entry_inner_widgets(GtkWidget *widget,
} else
return;
gtk_widget_realize(widget);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
static void
......@@ -409,7 +409,8 @@ moz_gtk_get_combo_box_entry_arrow(GtkWidget *widget, gpointer client_data)
g_object_add_weak_pointer(G_OBJECT(widget),
(gpointer) &gComboBoxEntryArrowWidget);
gtk_widget_realize(widget);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint",
GINT_TO_POINTER(TRUE));
}
}
......@@ -461,7 +462,7 @@ ensure_combo_box_entry_widgets()
&gComboBoxEntryArrowWidget);
gtk_widget_realize(gComboBoxEntryArrowWidget);
g_object_set_data(G_OBJECT(gComboBoxEntryArrowWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
} else {
/* Shouldn't be reached with current internal gtk implementation;
......@@ -501,7 +502,8 @@ ensure_toolbar_widget()
gToolbarWidget = gtk_toolbar_new();
gtk_container_add(GTK_CONTAINER(gHandleBoxWidget), gToolbarWidget);
gtk_widget_realize(gToolbarWidget);
g_object_set_data(G_OBJECT(gToolbarWidget), "transparent-bg-hint", TRUE);
g_object_set_data(G_OBJECT(gToolbarWidget), "transparent-bg-hint",
GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
......@@ -590,7 +592,7 @@ ensure_menu_bar_item_widget()
gMenuBarItemWidget);
gtk_widget_realize(gMenuBarItemWidget);
g_object_set_data(G_OBJECT(gMenuBarItemWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
......@@ -605,7 +607,7 @@ ensure_menu_popup_widget()
gMenuPopupWidget);
gtk_widget_realize(gMenuPopupWidget);
g_object_set_data(G_OBJECT(gMenuPopupWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
......@@ -620,7 +622,7 @@ ensure_menu_item_widget()
gMenuItemWidget);
gtk_widget_realize(gMenuItemWidget);
g_object_set_data(G_OBJECT(gMenuItemWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
......@@ -635,7 +637,7 @@ ensure_image_menu_item_widget()
gImageMenuItemWidget);
gtk_widget_realize(gImageMenuItemWidget);
g_object_set_data(G_OBJECT(gImageMenuItemWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
......@@ -650,7 +652,7 @@ ensure_menu_separator_widget()
gMenuSeparatorWidget);
gtk_widget_realize(gMenuSeparatorWidget);
g_object_set_data(G_OBJECT(gMenuSeparatorWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
......@@ -665,7 +667,7 @@ ensure_check_menu_item_widget()
gCheckMenuItemWidget);
gtk_widget_realize(gCheckMenuItemWidget);
g_object_set_data(G_OBJECT(gCheckMenuItemWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
......@@ -720,9 +722,9 @@ ensure_tree_header_cell_widget()
gTreeHeaderCellWidget = GTK_TREE_VIEW_COLUMN(gMiddleTreeViewColumn)->button;
gTreeHeaderSortArrowWidget = GTK_TREE_VIEW_COLUMN(gMiddleTreeViewColumn)->arrow;
g_object_set_data(G_OBJECT(gTreeHeaderCellWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
g_object_set_data(G_OBJECT(gTreeHeaderSortArrowWidget),
"transparent-bg-hint", TRUE);
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
......@@ -1536,11 +1538,12 @@ moz_gtk_entry_paint(GdkDrawable* drawable, GdkRectangle* rect,
* If the theme is able to cope with transparency, then we can skip pre-filling
* and notify the theme it will paint directly on the canvas. */
if (theme_honors_transparency) {
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint",
GINT_TO_POINTER(TRUE));
} else {
gdk_draw_rectangle(drawable, style->base_gc[bg_state], TRUE,
cliprect->x, cliprect->y, cliprect->width, cliprect->height);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", FALSE);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(FALSE));
}
/* Get the position of the inner window, see _gtk_entry_get_borders */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment