mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
[ merge from stable ]
2002-05-27 Daniel Elstner <daniel.elstner@gmx.net> [ merge from stable ] Fixes for #83190 * gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing fields to anonymous union: glong, gulong, gint64 and guint64. This is an internal header file, so it should not affect ABI or API compatibility. * gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value): Implement missing support for glong, gulong, gint64 and guint64 fundamental types. Use data.v_uint instead of data.v_int for G_TYPE_FLAGS, as GValue does. (_gtk_tree_data_list_value_to_node): ditto (_gtk_tree_data_list_node_copy): Add case labels for missing fundamental types, and reorder them to match the other functions. (gtk_tree_data_list_compare_func): Implement comparison for glong, gulong, gint64 and guint64. Use g_value_get_enum() for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather than accessing them as gint/guint. The G_VALUE_HOLDS() check probably won't like this.
This commit is contained in:
parent
cffb8ea32d
commit
810e488074
24
ChangeLog
24
ChangeLog
@ -1,3 +1,27 @@
|
|||||||
|
2002-05-27 Daniel Elstner <daniel.elstner@gmx.net>
|
||||||
|
|
||||||
|
[ merge from stable ]
|
||||||
|
|
||||||
|
Fixes for #83190
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing
|
||||||
|
fields to anonymous union: glong, gulong, gint64 and guint64.
|
||||||
|
This is an internal header file, so it should not affect ABI
|
||||||
|
or API compatibility.
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
|
||||||
|
Implement missing support for glong, gulong, gint64 and guint64
|
||||||
|
fundamental types. Use data.v_uint instead of data.v_int for
|
||||||
|
G_TYPE_FLAGS, as GValue does.
|
||||||
|
(_gtk_tree_data_list_value_to_node): ditto
|
||||||
|
(_gtk_tree_data_list_node_copy): Add case labels for missing
|
||||||
|
fundamental types, and reorder them to match the other functions.
|
||||||
|
(gtk_tree_data_list_compare_func): Implement comparison for
|
||||||
|
glong, gulong, gint64 and guint64. Use g_value_get_enum()
|
||||||
|
for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather
|
||||||
|
than accessing them as gint/guint. The G_VALUE_HOLDS() check
|
||||||
|
probably won't like this.
|
||||||
|
|
||||||
2002-05-24 Dave Camp <dave@ximian.com>
|
2002-05-24 Dave Camp <dave@ximian.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
||||||
|
@ -1,3 +1,27 @@
|
|||||||
|
2002-05-27 Daniel Elstner <daniel.elstner@gmx.net>
|
||||||
|
|
||||||
|
[ merge from stable ]
|
||||||
|
|
||||||
|
Fixes for #83190
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing
|
||||||
|
fields to anonymous union: glong, gulong, gint64 and guint64.
|
||||||
|
This is an internal header file, so it should not affect ABI
|
||||||
|
or API compatibility.
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
|
||||||
|
Implement missing support for glong, gulong, gint64 and guint64
|
||||||
|
fundamental types. Use data.v_uint instead of data.v_int for
|
||||||
|
G_TYPE_FLAGS, as GValue does.
|
||||||
|
(_gtk_tree_data_list_value_to_node): ditto
|
||||||
|
(_gtk_tree_data_list_node_copy): Add case labels for missing
|
||||||
|
fundamental types, and reorder them to match the other functions.
|
||||||
|
(gtk_tree_data_list_compare_func): Implement comparison for
|
||||||
|
glong, gulong, gint64 and guint64. Use g_value_get_enum()
|
||||||
|
for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather
|
||||||
|
than accessing them as gint/guint. The G_VALUE_HOLDS() check
|
||||||
|
probably won't like this.
|
||||||
|
|
||||||
2002-05-24 Dave Camp <dave@ximian.com>
|
2002-05-24 Dave Camp <dave@ximian.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
||||||
|
@ -1,3 +1,27 @@
|
|||||||
|
2002-05-27 Daniel Elstner <daniel.elstner@gmx.net>
|
||||||
|
|
||||||
|
[ merge from stable ]
|
||||||
|
|
||||||
|
Fixes for #83190
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing
|
||||||
|
fields to anonymous union: glong, gulong, gint64 and guint64.
|
||||||
|
This is an internal header file, so it should not affect ABI
|
||||||
|
or API compatibility.
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
|
||||||
|
Implement missing support for glong, gulong, gint64 and guint64
|
||||||
|
fundamental types. Use data.v_uint instead of data.v_int for
|
||||||
|
G_TYPE_FLAGS, as GValue does.
|
||||||
|
(_gtk_tree_data_list_value_to_node): ditto
|
||||||
|
(_gtk_tree_data_list_node_copy): Add case labels for missing
|
||||||
|
fundamental types, and reorder them to match the other functions.
|
||||||
|
(gtk_tree_data_list_compare_func): Implement comparison for
|
||||||
|
glong, gulong, gint64 and guint64. Use g_value_get_enum()
|
||||||
|
for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather
|
||||||
|
than accessing them as gint/guint. The G_VALUE_HOLDS() check
|
||||||
|
probably won't like this.
|
||||||
|
|
||||||
2002-05-24 Dave Camp <dave@ximian.com>
|
2002-05-24 Dave Camp <dave@ximian.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
||||||
|
@ -1,3 +1,27 @@
|
|||||||
|
2002-05-27 Daniel Elstner <daniel.elstner@gmx.net>
|
||||||
|
|
||||||
|
[ merge from stable ]
|
||||||
|
|
||||||
|
Fixes for #83190
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing
|
||||||
|
fields to anonymous union: glong, gulong, gint64 and guint64.
|
||||||
|
This is an internal header file, so it should not affect ABI
|
||||||
|
or API compatibility.
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
|
||||||
|
Implement missing support for glong, gulong, gint64 and guint64
|
||||||
|
fundamental types. Use data.v_uint instead of data.v_int for
|
||||||
|
G_TYPE_FLAGS, as GValue does.
|
||||||
|
(_gtk_tree_data_list_value_to_node): ditto
|
||||||
|
(_gtk_tree_data_list_node_copy): Add case labels for missing
|
||||||
|
fundamental types, and reorder them to match the other functions.
|
||||||
|
(gtk_tree_data_list_compare_func): Implement comparison for
|
||||||
|
glong, gulong, gint64 and guint64. Use g_value_get_enum()
|
||||||
|
for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather
|
||||||
|
than accessing them as gint/guint. The G_VALUE_HOLDS() check
|
||||||
|
probably won't like this.
|
||||||
|
|
||||||
2002-05-24 Dave Camp <dave@ximian.com>
|
2002-05-24 Dave Camp <dave@ximian.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
||||||
|
@ -1,3 +1,27 @@
|
|||||||
|
2002-05-27 Daniel Elstner <daniel.elstner@gmx.net>
|
||||||
|
|
||||||
|
[ merge from stable ]
|
||||||
|
|
||||||
|
Fixes for #83190
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing
|
||||||
|
fields to anonymous union: glong, gulong, gint64 and guint64.
|
||||||
|
This is an internal header file, so it should not affect ABI
|
||||||
|
or API compatibility.
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
|
||||||
|
Implement missing support for glong, gulong, gint64 and guint64
|
||||||
|
fundamental types. Use data.v_uint instead of data.v_int for
|
||||||
|
G_TYPE_FLAGS, as GValue does.
|
||||||
|
(_gtk_tree_data_list_value_to_node): ditto
|
||||||
|
(_gtk_tree_data_list_node_copy): Add case labels for missing
|
||||||
|
fundamental types, and reorder them to match the other functions.
|
||||||
|
(gtk_tree_data_list_compare_func): Implement comparison for
|
||||||
|
glong, gulong, gint64 and guint64. Use g_value_get_enum()
|
||||||
|
for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather
|
||||||
|
than accessing them as gint/guint. The G_VALUE_HOLDS() check
|
||||||
|
probably won't like this.
|
||||||
|
|
||||||
2002-05-24 Dave Camp <dave@ximian.com>
|
2002-05-24 Dave Camp <dave@ximian.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
||||||
|
@ -1,3 +1,27 @@
|
|||||||
|
2002-05-27 Daniel Elstner <daniel.elstner@gmx.net>
|
||||||
|
|
||||||
|
[ merge from stable ]
|
||||||
|
|
||||||
|
Fixes for #83190
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing
|
||||||
|
fields to anonymous union: glong, gulong, gint64 and guint64.
|
||||||
|
This is an internal header file, so it should not affect ABI
|
||||||
|
or API compatibility.
|
||||||
|
|
||||||
|
* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
|
||||||
|
Implement missing support for glong, gulong, gint64 and guint64
|
||||||
|
fundamental types. Use data.v_uint instead of data.v_int for
|
||||||
|
G_TYPE_FLAGS, as GValue does.
|
||||||
|
(_gtk_tree_data_list_value_to_node): ditto
|
||||||
|
(_gtk_tree_data_list_node_copy): Add case labels for missing
|
||||||
|
fundamental types, and reorder them to match the other functions.
|
||||||
|
(gtk_tree_data_list_compare_func): Implement comparison for
|
||||||
|
glong, gulong, gint64 and guint64. Use g_value_get_enum()
|
||||||
|
for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather
|
||||||
|
than accessing them as gint/guint. The G_VALUE_HOLDS() check
|
||||||
|
probably won't like this.
|
||||||
|
|
||||||
2002-05-24 Dave Camp <dave@ximian.com>
|
2002-05-24 Dave Camp <dave@ximian.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
|
||||||
|
@ -133,11 +133,23 @@ _gtk_tree_data_list_node_to_value (GtkTreeDataList *list,
|
|||||||
case G_TYPE_UINT:
|
case G_TYPE_UINT:
|
||||||
g_value_set_uint (value, (guint) list->data.v_uint);
|
g_value_set_uint (value, (guint) list->data.v_uint);
|
||||||
break;
|
break;
|
||||||
|
case G_TYPE_LONG:
|
||||||
|
g_value_set_long (value, list->data.v_long);
|
||||||
|
break;
|
||||||
|
case G_TYPE_ULONG:
|
||||||
|
g_value_set_ulong (value, list->data.v_ulong);
|
||||||
|
break;
|
||||||
|
case G_TYPE_INT64:
|
||||||
|
g_value_set_int64 (value, list->data.v_int64);
|
||||||
|
break;
|
||||||
|
case G_TYPE_UINT64:
|
||||||
|
g_value_set_uint64 (value, list->data.v_uint64);
|
||||||
|
break;
|
||||||
case G_TYPE_ENUM:
|
case G_TYPE_ENUM:
|
||||||
g_value_set_enum (value, list->data.v_int);
|
g_value_set_enum (value, list->data.v_int);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_FLAGS:
|
case G_TYPE_FLAGS:
|
||||||
g_value_set_flags (value, (int) list->data.v_int);
|
g_value_set_flags (value, list->data.v_uint);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_FLOAT:
|
case G_TYPE_FLOAT:
|
||||||
g_value_set_float (value, (gfloat) list->data.v_float);
|
g_value_set_float (value, (gfloat) list->data.v_float);
|
||||||
@ -181,14 +193,26 @@ _gtk_tree_data_list_value_to_node (GtkTreeDataList *list,
|
|||||||
case G_TYPE_INT:
|
case G_TYPE_INT:
|
||||||
list->data.v_int = g_value_get_int (value);
|
list->data.v_int = g_value_get_int (value);
|
||||||
break;
|
break;
|
||||||
|
case G_TYPE_UINT:
|
||||||
|
list->data.v_uint = g_value_get_uint (value);
|
||||||
|
break;
|
||||||
|
case G_TYPE_LONG:
|
||||||
|
list->data.v_long = g_value_get_long (value);
|
||||||
|
break;
|
||||||
|
case G_TYPE_ULONG:
|
||||||
|
list->data.v_ulong = g_value_get_ulong (value);
|
||||||
|
break;
|
||||||
|
case G_TYPE_INT64:
|
||||||
|
list->data.v_int64 = g_value_get_int64 (value);
|
||||||
|
break;
|
||||||
|
case G_TYPE_UINT64:
|
||||||
|
list->data.v_uint64 = g_value_get_uint64 (value);
|
||||||
|
break;
|
||||||
case G_TYPE_ENUM:
|
case G_TYPE_ENUM:
|
||||||
list->data.v_int = g_value_get_enum (value);
|
list->data.v_int = g_value_get_enum (value);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_FLAGS:
|
case G_TYPE_FLAGS:
|
||||||
list->data.v_int = g_value_get_flags (value);
|
list->data.v_uint = g_value_get_flags (value);
|
||||||
break;
|
|
||||||
case G_TYPE_UINT:
|
|
||||||
list->data.v_uint = g_value_get_uint (value);
|
|
||||||
break;
|
break;
|
||||||
case G_TYPE_POINTER:
|
case G_TYPE_POINTER:
|
||||||
list->data.v_pointer = g_value_get_pointer (value);
|
list->data.v_pointer = g_value_get_pointer (value);
|
||||||
@ -233,11 +257,17 @@ _gtk_tree_data_list_node_copy (GtkTreeDataList *list,
|
|||||||
|
|
||||||
switch (G_TYPE_FUNDAMENTAL (type))
|
switch (G_TYPE_FUNDAMENTAL (type))
|
||||||
{
|
{
|
||||||
case G_TYPE_UINT:
|
|
||||||
case G_TYPE_INT:
|
|
||||||
case G_TYPE_UCHAR:
|
|
||||||
case G_TYPE_CHAR:
|
|
||||||
case G_TYPE_BOOLEAN:
|
case G_TYPE_BOOLEAN:
|
||||||
|
case G_TYPE_CHAR:
|
||||||
|
case G_TYPE_UCHAR:
|
||||||
|
case G_TYPE_INT:
|
||||||
|
case G_TYPE_UINT:
|
||||||
|
case G_TYPE_LONG:
|
||||||
|
case G_TYPE_ULONG:
|
||||||
|
case G_TYPE_INT64:
|
||||||
|
case G_TYPE_UINT64:
|
||||||
|
case G_TYPE_ENUM:
|
||||||
|
case G_TYPE_FLAGS:
|
||||||
case G_TYPE_POINTER:
|
case G_TYPE_POINTER:
|
||||||
case G_TYPE_FLOAT:
|
case G_TYPE_FLOAT:
|
||||||
case G_TYPE_DOUBLE:
|
case G_TYPE_DOUBLE:
|
||||||
@ -323,20 +353,52 @@ gtk_tree_data_list_compare_func (GtkTreeModel *model,
|
|||||||
else
|
else
|
||||||
retval = 1;
|
retval = 1;
|
||||||
break;
|
break;
|
||||||
|
case G_TYPE_LONG:
|
||||||
|
if (g_value_get_long (&a_value) < g_value_get_long (&b_value))
|
||||||
|
retval = -1;
|
||||||
|
else if (g_value_get_long (&a_value) == g_value_get_long (&b_value))
|
||||||
|
retval = 0;
|
||||||
|
else
|
||||||
|
retval = 1;
|
||||||
|
break;
|
||||||
|
case G_TYPE_ULONG:
|
||||||
|
if (g_value_get_ulong (&a_value) < g_value_get_ulong (&b_value))
|
||||||
|
retval = -1;
|
||||||
|
else if (g_value_get_ulong (&a_value) == g_value_get_ulong (&b_value))
|
||||||
|
retval = 0;
|
||||||
|
else
|
||||||
|
retval = 1;
|
||||||
|
break;
|
||||||
|
case G_TYPE_INT64:
|
||||||
|
if (g_value_get_int64 (&a_value) < g_value_get_int64 (&b_value))
|
||||||
|
retval = -1;
|
||||||
|
else if (g_value_get_int64 (&a_value) == g_value_get_int64 (&b_value))
|
||||||
|
retval = 0;
|
||||||
|
else
|
||||||
|
retval = 1;
|
||||||
|
break;
|
||||||
|
case G_TYPE_UINT64:
|
||||||
|
if (g_value_get_uint64 (&a_value) < g_value_get_uint64 (&b_value))
|
||||||
|
retval = -1;
|
||||||
|
else if (g_value_get_uint64 (&a_value) == g_value_get_uint64 (&b_value))
|
||||||
|
retval = 0;
|
||||||
|
else
|
||||||
|
retval = 1;
|
||||||
|
break;
|
||||||
case G_TYPE_ENUM:
|
case G_TYPE_ENUM:
|
||||||
/* this is somewhat bogus. */
|
/* this is somewhat bogus. */
|
||||||
if (g_value_get_int (&a_value) < g_value_get_int (&b_value))
|
if (g_value_get_enum (&a_value) < g_value_get_enum (&b_value))
|
||||||
retval = -1;
|
retval = -1;
|
||||||
else if (g_value_get_int (&a_value) == g_value_get_int (&b_value))
|
else if (g_value_get_enum (&a_value) == g_value_get_enum (&b_value))
|
||||||
retval = 0;
|
retval = 0;
|
||||||
else
|
else
|
||||||
retval = 1;
|
retval = 1;
|
||||||
break;
|
break;
|
||||||
case G_TYPE_FLAGS:
|
case G_TYPE_FLAGS:
|
||||||
/* this is even more bogus. */
|
/* this is even more bogus. */
|
||||||
if (g_value_get_uint (&a_value) < g_value_get_uint (&b_value))
|
if (g_value_get_flags (&a_value) < g_value_get_flags (&b_value))
|
||||||
retval = -1;
|
retval = -1;
|
||||||
else if (g_value_get_uint (&a_value) == g_value_get_uint (&b_value))
|
else if (g_value_get_flags (&a_value) == g_value_get_flags (&b_value))
|
||||||
retval = 0;
|
retval = 0;
|
||||||
else
|
else
|
||||||
retval = 1;
|
retval = 1;
|
||||||
|
@ -35,6 +35,10 @@ struct _GtkTreeDataList
|
|||||||
gint8 v_char;
|
gint8 v_char;
|
||||||
guint8 v_uchar;
|
guint8 v_uchar;
|
||||||
guint v_uint;
|
guint v_uint;
|
||||||
|
glong v_long;
|
||||||
|
gulong v_ulong;
|
||||||
|
gint64 v_int64;
|
||||||
|
guint64 v_uint64;
|
||||||
gfloat v_float;
|
gfloat v_float;
|
||||||
gdouble v_double;
|
gdouble v_double;
|
||||||
gpointer v_pointer;
|
gpointer v_pointer;
|
||||||
|
Loading…
Reference in New Issue
Block a user