mirror of
https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
synced 2024-11-21 08:20:40 -05:00
gvc-mixer-ui-device: make stream-id unsigned int
GvcMixerStream id is unsigned int and starts with 1, so we can use 0 as invalid id. This fixes build error/warning - comparison between signed and unsigned integer expressions.
This commit is contained in:
parent
26ea473077
commit
b7bce32944
@ -33,7 +33,7 @@ struct GvcMixerUIDevicePrivate
|
|||||||
GvcMixerCard *card;
|
GvcMixerCard *card;
|
||||||
gchar *port_name;
|
gchar *port_name;
|
||||||
char *icon_name;
|
char *icon_name;
|
||||||
gint stream_id;
|
guint stream_id;
|
||||||
guint id;
|
guint id;
|
||||||
gboolean port_available;
|
gboolean port_available;
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ gvc_mixer_ui_device_get_property (GObject *object,
|
|||||||
g_value_set_string (value, self->priv->port_name);
|
g_value_set_string (value, self->priv->port_name);
|
||||||
break;
|
break;
|
||||||
case PROP_STREAM_ID:
|
case PROP_STREAM_ID:
|
||||||
g_value_set_int (value, self->priv->stream_id);
|
g_value_set_uint (value, self->priv->stream_id);
|
||||||
break;
|
break;
|
||||||
case PROP_UI_DEVICE_TYPE:
|
case PROP_UI_DEVICE_TYPE:
|
||||||
g_value_set_uint (value, (guint)self->priv->type);
|
g_value_set_uint (value, (guint)self->priv->type);
|
||||||
@ -152,7 +152,7 @@ gvc_mixer_ui_device_set_property (GObject *object,
|
|||||||
self->priv->port_name);
|
self->priv->port_name);
|
||||||
break;
|
break;
|
||||||
case PROP_STREAM_ID:
|
case PROP_STREAM_ID:
|
||||||
self->priv->stream_id = g_value_get_int (value);
|
self->priv->stream_id = g_value_get_uint (value);
|
||||||
g_debug ("gvc-mixer-output-set-property - sink/source id: %i\n",
|
g_debug ("gvc-mixer-output-set-property - sink/source id: %i\n",
|
||||||
self->priv->stream_id);
|
self->priv->stream_id);
|
||||||
break;
|
break;
|
||||||
@ -262,11 +262,11 @@ gvc_mixer_ui_device_class_init (GvcMixerUIDeviceClass *klass)
|
|||||||
G_PARAM_READWRITE);
|
G_PARAM_READWRITE);
|
||||||
g_object_class_install_property (object_class, PROP_PORT_NAME, pspec);
|
g_object_class_install_property (object_class, PROP_PORT_NAME, pspec);
|
||||||
|
|
||||||
pspec = g_param_spec_int ("stream-id",
|
pspec = g_param_spec_uint ("stream-id",
|
||||||
"stream id assigned by gvc-stream",
|
"stream id assigned by gvc-stream",
|
||||||
"Set/Get stream id",
|
"Set/Get stream id",
|
||||||
-1,
|
0,
|
||||||
G_MAXINT,
|
G_MAXUINT,
|
||||||
GVC_MIXER_UI_DEVICE_INVALID,
|
GVC_MIXER_UI_DEVICE_INVALID,
|
||||||
G_PARAM_READWRITE);
|
G_PARAM_READWRITE);
|
||||||
g_object_class_install_property (object_class, PROP_STREAM_ID, pspec);
|
g_object_class_install_property (object_class, PROP_STREAM_ID, pspec);
|
||||||
@ -600,7 +600,7 @@ gvc_mixer_ui_device_get_id (GvcMixerUIDevice *device)
|
|||||||
return device->priv->id;
|
return device->priv->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
guint
|
||||||
gvc_mixer_ui_device_get_stream_id (GvcMixerUIDevice *device)
|
gvc_mixer_ui_device_get_stream_id (GvcMixerUIDevice *device)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GVC_IS_MIXER_UI_DEVICE (device), 0);
|
g_return_val_if_fail (GVC_IS_MIXER_UI_DEVICE (device), 0);
|
||||||
|
@ -31,7 +31,7 @@ G_BEGIN_DECLS
|
|||||||
#define GVC_IS_MIXER_UI_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GVC_TYPE_MIXER_UI_DEVICE))
|
#define GVC_IS_MIXER_UI_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GVC_TYPE_MIXER_UI_DEVICE))
|
||||||
#define GVC_MIXER_UI_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GVC_TYPE_MIXER_UI_DEVICE, GvcMixerUIDeviceClass))
|
#define GVC_MIXER_UI_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GVC_TYPE_MIXER_UI_DEVICE, GvcMixerUIDeviceClass))
|
||||||
|
|
||||||
#define GVC_MIXER_UI_DEVICE_INVALID -1
|
#define GVC_MIXER_UI_DEVICE_INVALID 0
|
||||||
|
|
||||||
typedef struct GvcMixerUIDevicePrivate GvcMixerUIDevicePrivate;
|
typedef struct GvcMixerUIDevicePrivate GvcMixerUIDevicePrivate;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ typedef enum
|
|||||||
GType gvc_mixer_ui_device_get_type (void) G_GNUC_CONST;
|
GType gvc_mixer_ui_device_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
guint gvc_mixer_ui_device_get_id (GvcMixerUIDevice *device);
|
guint gvc_mixer_ui_device_get_id (GvcMixerUIDevice *device);
|
||||||
gint gvc_mixer_ui_device_get_stream_id (GvcMixerUIDevice *device);
|
guint gvc_mixer_ui_device_get_stream_id (GvcMixerUIDevice *device);
|
||||||
const gchar * gvc_mixer_ui_device_get_description (GvcMixerUIDevice *device);
|
const gchar * gvc_mixer_ui_device_get_description (GvcMixerUIDevice *device);
|
||||||
const gchar * gvc_mixer_ui_device_get_icon_name (GvcMixerUIDevice *device);
|
const gchar * gvc_mixer_ui_device_get_icon_name (GvcMixerUIDevice *device);
|
||||||
GIcon * gvc_mixer_ui_device_get_gicon (GvcMixerUIDevice *device);
|
GIcon * gvc_mixer_ui_device_get_gicon (GvcMixerUIDevice *device);
|
||||||
|
Loading…
Reference in New Issue
Block a user