summaryrefslogtreecommitdiff
path: root/gtk/gtkmenutoolbutton.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-08-08 18:14:26 +0000
committerChristian Persch <chpe@src.gnome.org>2005-08-08 18:14:26 +0000
commit1992b3139645397e00057c8c208cee7d0b5f1e76 (patch)
treedf4359b0183b62ed6b2d8fd94e1e4c30bd2f09d0 /gtk/gtkmenutoolbutton.c
parentd24e9eea16fff5eca3a29c159cbd1d0b72c13d2b (diff)
downloadgtk+-1992b3139645397e00057c8c208cee7d0b5f1e76.tar.gz
Use ->priv instead of GTK_MENU_TOOL_BUTTON_GET_PRIVATE. Surviving part of
2005-08-08 Christian Persch <chpe@cvs.gnome.org> * gtk/gtkmenutoolbutton.c: (gtk_menu_tool_button_construct_contents), (button_state_changed_cb), (menu_position_func), (arrow_button_toggled_cb): Use ->priv instead of GTK_MENU_TOOL_BUTTON_GET_PRIVATE. Surviving part of bug #310589.
Diffstat (limited to 'gtk/gtkmenutoolbutton.c')
-rw-r--r--gtk/gtkmenutoolbutton.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/gtk/gtkmenutoolbutton.c b/gtk/gtkmenutoolbutton.c
index 713aa3f884..039aadef46 100644
--- a/gtk/gtkmenutoolbutton.c
+++ b/gtk/gtkmenutoolbutton.c
@@ -111,12 +111,10 @@ gtk_menu_tool_button_set_tooltip (GtkToolItem *tool_item,
static void
gtk_menu_tool_button_construct_contents (GtkMenuToolButton *button)
{
- GtkMenuToolButtonPrivate *priv;
+ GtkMenuToolButtonPrivate *priv = button->priv;
GtkWidget *box;
GtkOrientation orientation;
- priv = GTK_MENU_TOOL_BUTTON_GET_PRIVATE (button);
-
orientation = gtk_tool_item_get_orientation (GTK_TOOL_ITEM (button));
if (orientation == GTK_ORIENTATION_HORIZONTAL)
@@ -261,15 +259,13 @@ button_state_changed_cb (GtkWidget *widget,
GtkStateType previous_state,
GtkMenuToolButton *button)
{
- GtkMenuToolButtonPrivate *priv;
+ GtkMenuToolButtonPrivate *priv = button->priv;
GtkWidget *other;
GtkStateType state = GTK_WIDGET_STATE (widget);
if (state == GTK_STATE_INSENSITIVE)
return;
- priv = GTK_MENU_TOOL_BUTTON_GET_PRIVATE (button);
-
other = (widget == priv->arrow_button) ? priv->button : priv->arrow_button;
g_signal_handlers_block_by_func (other,
@@ -307,14 +303,12 @@ menu_position_func (GtkMenu *menu,
gboolean *push_in,
GtkMenuToolButton *button)
{
- GtkMenuToolButtonPrivate *priv;
+ GtkMenuToolButtonPrivate *priv = button->priv;
GtkRequisition req;
GtkRequisition menu_req;
GtkOrientation orientation;
GtkTextDirection direction;
- priv = GTK_MENU_TOOL_BUTTON_GET_PRIVATE (button);
-
gdk_window_get_origin (GTK_BUTTON (priv->arrow_button)->event_window, x, y);
gtk_widget_size_request (priv->arrow_button, &req);
gtk_widget_size_request (GTK_WIDGET (priv->menu), &menu_req);
@@ -366,9 +360,7 @@ static void
arrow_button_toggled_cb (GtkToggleButton *togglebutton,
GtkMenuToolButton *button)
{
- GtkMenuToolButtonPrivate *priv;
-
- priv = GTK_MENU_TOOL_BUTTON_GET_PRIVATE (button);
+ GtkMenuToolButtonPrivate *priv = button->priv;
if (!priv->menu)
return;