summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2020-05-29 15:24:09 -0500
committerTristan Partin <tristan@partin.io>2020-05-29 15:24:09 -0500
commit6a507c0b63993bfd5d72ce24984cdc8c57caa874 (patch)
treeb726fce0fb8d1d0add23a0bdf9a246f111072c64
parente930c7ef6416b8b1843a32d2169eb1a3b378effb (diff)
downloadgtk+-6a507c0b63993bfd5d72ce24984cdc8c57caa874.tar.gz
Fix GPtrArray sorting function
GPtrArray's GCompareFunc passes a double pointer that needs to be dereferenced in order to use the data you are actually wanting to compare. See: https://developer.gnome.org/glib/stable/glib-Pointer-Arrays.html#g-ptr-array-sort
-rw-r--r--gtk/gtktoolpalette.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index b826663bae..e43e5b9f4a 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -48,7 +48,7 @@
*
* A #GtkToolPalette is created with a call to gtk_tool_palette_new().
*
- * #GtkToolItems cannot be added directly to a #GtkToolPalette -
+ * #GtkToolItems cannot be added directly to a #GtkToolPalette -
* instead they are added to a #GtkToolItemGroup which can than be added
* to a #GtkToolPalette. To add a #GtkToolItemGroup to a #GtkToolPalette,
* use gtk_container_add().
@@ -859,12 +859,12 @@ gtk_tool_palette_set_child_property (GtkContainer *container,
switch (prop_id)
{
case CHILD_PROP_EXCLUSIVE:
- gtk_tool_palette_set_exclusive (palette, GTK_TOOL_ITEM_GROUP (child),
+ gtk_tool_palette_set_exclusive (palette, GTK_TOOL_ITEM_GROUP (child),
g_value_get_boolean (value));
break;
case CHILD_PROP_EXPAND:
- gtk_tool_palette_set_expand (palette, GTK_TOOL_ITEM_GROUP (child),
+ gtk_tool_palette_set_expand (palette, GTK_TOOL_ITEM_GROUP (child),
g_value_get_boolean (value));
break;
@@ -886,12 +886,12 @@ gtk_tool_palette_get_child_property (GtkContainer *container,
switch (prop_id)
{
case CHILD_PROP_EXCLUSIVE:
- g_value_set_boolean (value,
+ g_value_set_boolean (value,
gtk_tool_palette_get_exclusive (palette, GTK_TOOL_ITEM_GROUP (child)));
break;
case CHILD_PROP_EXPAND:
- g_value_set_boolean (value,
+ g_value_set_boolean (value,
gtk_tool_palette_get_expand (palette, GTK_TOOL_ITEM_GROUP (child)));
break;
@@ -1228,8 +1228,8 @@ static gint
gtk_tool_palette_compare_groups (gconstpointer a,
gconstpointer b)
{
- const GtkToolItemGroupInfo *group_a = a;
- const GtkToolItemGroupInfo *group_b = b;
+ const GtkToolItemGroupInfo *group_a = *((GtkToolItemGroupInfo **) a);
+ const GtkToolItemGroupInfo *group_b = *((GtkToolItemGroupInfo **) b);
return group_a->pos - group_b->pos;
}