GtkWidget *child);
static void gtk_toolbar_invalidate_order (GtkToolbar *toolbar);
-static void gtk_toolbar_direction_changed (GtkWidget *widget,
- GtkTextDirection previous_direction);
static void gtk_toolbar_orientation_changed (GtkToolbar *toolbar,
GtkOrientation orientation);
static void gtk_toolbar_real_style_changed (GtkToolbar *toolbar,
widget_class->unmap = gtk_toolbar_unmap;
widget_class->popup_menu = gtk_toolbar_popup_menu;
widget_class->show_all = gtk_toolbar_show_all;
- widget_class->direction_changed = gtk_toolbar_direction_changed;
container_class->add = gtk_toolbar_add;
container_class->remove = gtk_toolbar_remove;
priv->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
- gdk_window_set_user_data (priv->event_window, toolbar);
+ gtk_widget_register_window (widget, priv->event_window);
}
static void
if (priv->event_window)
{
- gdk_window_set_user_data (priv->event_window, NULL);
+ gtk_widget_unregister_window (widget, priv->event_window);
gdk_window_destroy (priv->event_window);
priv->event_window = NULL;
}
g_assert (count.found);
- if (toolbar->priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
- gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_RTL)
- return count.after;
-
return count.before;
}
{
GtkWidgetPath *path;
GtkToolbar *toolbar;
- GtkToolbarPrivate *priv;
GtkWidgetPath *sibling_path;
gint vis_index;
GList *children;
toolbar = GTK_TOOLBAR (container);
- priv = toolbar->priv;
/* build a path for all the visible children;
* get_children works in visible order
*/
sibling_path = gtk_widget_path_new ();
children = _gtk_container_get_all_children (container);
-
- if (priv->orientation != GTK_ORIENTATION_HORIZONTAL ||
- gtk_widget_get_direction (GTK_WIDGET (toolbar)) != GTK_TEXT_DIR_RTL)
- children = g_list_reverse (children);
+ children = g_list_reverse (children);
g_list_foreach (children, add_widget_to_path, sibling_path);
g_list_free (children);
NULL);
}
-static void
-gtk_toolbar_direction_changed (GtkWidget *widget,
- GtkTextDirection previous_direction)
-{
- GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->direction_changed (widget, previous_direction);
-
- gtk_toolbar_invalidate_order (GTK_TOOLBAR (widget));
-}
-