mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
Added enum parsing...
Original commit message from CVS: Added enum parsing...
This commit is contained in:
parent
4a1566b7ee
commit
bbcfa2b2c9
1 changed files with 7 additions and 1 deletions
|
@ -235,6 +235,7 @@ gst_util_set_object_arg (GtkObject *object, guchar *name, gchar *value)
|
|||
case GTK_TYPE_STRING:
|
||||
gtk_object_set (GTK_OBJECT (object), name, value, NULL);
|
||||
break;
|
||||
case GTK_TYPE_ENUM:
|
||||
case GTK_TYPE_INT: {
|
||||
gint i;
|
||||
sscanf (value, "%d", &i);
|
||||
|
@ -284,7 +285,12 @@ gst_util_set_object_arg (GtkObject *object, guchar *name, gchar *value)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
if (info->type == GST_TYPE_FILENAME) {
|
||||
if (GTK_FUNDAMENTAL_TYPE(info->type) == GTK_TYPE_ENUM) {
|
||||
gint i;
|
||||
sscanf (value, "%d", &i);
|
||||
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||
}
|
||||
else if (info->type == GST_TYPE_FILENAME) {
|
||||
gtk_object_set (GTK_OBJECT (object), name, value, NULL);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue