* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtktypebuiltins.h"
+#include "gtkwidgetpath.h"
+#include "gtkwidgetprivate.h"
/**
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
GtkToolbarPrivate *priv = toolbar->priv;
GtkStyleContext *context;
- GtkStateFlags state;
GList *list;
guint border_width;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
context = gtk_widget_get_style_context (widget);
- state = gtk_widget_get_state_flags (widget);
-
- gtk_style_context_save (context);
- gtk_style_context_set_state (context, state);
gtk_render_background (context, cr, border_width, border_width,
gtk_widget_get_allocated_width (widget) - 2 * border_width,
priv->arrow_button,
cr);
- gtk_style_context_restore (context);
-
return FALSE;
}
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->style_updated (widget);
priv->max_homogeneous_pixels = -1;
-
- if (gtk_widget_get_realized (widget))
- gtk_style_context_set_background (gtk_widget_get_style_context (widget),
- gtk_widget_get_window (widget));
-
gtk_toolbar_update_button_relief (GTK_TOOLBAR (widget));
}
return return_value;
}
+ if (event->type != GDK_BUTTON_PRESS)
+ return FALSE;
+
window = gtk_widget_get_toplevel (toolbar);
if (window)
g_list_foreach (children, add_widget_to_path, sibling_path);
g_list_free (children);
- path = gtk_widget_path_copy (gtk_widget_get_path (GTK_WIDGET (container)));
+ path = _gtk_widget_create_path (GTK_WIDGET (container));
if (gtk_widget_get_visible (child))
{
vis_index = gtk_toolbar_get_visible_position (toolbar, child);
return path;
}
+static void
+gtk_toolbar_invalidate_order_foreach (GtkWidget *widget)
+{
+ _gtk_widget_invalidate_style_context (widget, GTK_CSS_CHANGE_POSITION | GTK_CSS_CHANGE_SIBLING_POSITION);
+}
+
static void
gtk_toolbar_invalidate_order (GtkToolbar *toolbar)
{
gtk_container_forall (GTK_CONTAINER (toolbar),
- (GtkCallback) gtk_widget_reset_style,
+ (GtkCallback) gtk_toolbar_invalidate_order_foreach,
NULL);
}