[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [libosinfo] Consistent properties enum naming



On Thu, Oct 20, 2011 at 10:16:13PM +0300, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
> 
> ---
>  osinfo/osinfo_devicelink.c |    2 +-
>  osinfo/osinfo_entity.c     |   12 ++++++------
>  osinfo/osinfo_os.c         |   10 +++++-----
>  3 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/osinfo/osinfo_devicelink.c b/osinfo/osinfo_devicelink.c
> index a967ed8..ae197e6 100644
> --- a/osinfo/osinfo_devicelink.c
> +++ b/osinfo/osinfo_devicelink.c
> @@ -43,7 +43,7 @@ struct _OsinfoDeviceLinkPrivate
>      OsinfoDevice *target;
>  };
>  
> -enum OSI_ENTITY_PROPERTIES {
> +enum {
>      PROP_0,
>  
>      PROP_TARGET
> diff --git a/osinfo/osinfo_entity.c b/osinfo/osinfo_entity.c
> index 01eaded..a9af782 100644
> --- a/osinfo/osinfo_entity.c
> +++ b/osinfo/osinfo_entity.c
> @@ -51,10 +51,10 @@ struct _OsinfoEntityPrivate
>  
>  static void osinfo_entity_finalize (GObject *object);
>  
> -enum OSI_ENTITY_PROPERTIES {
> -    OSI_ENTITY_PROP_0,
> +enum {
> +    PROP_0,
>  
> -    OSI_ENTITY_ID,
> +    PROP_ID,
>  };
>  
>  static void
> @@ -67,7 +67,7 @@ osinfo_entity_set_property (GObject      *object,
>  
>      switch (property_id)
>          {
> -        case OSI_ENTITY_ID:
> +        case PROP_ID:
>              g_free(entity->priv->id);
>              entity->priv->id = g_value_dup_string (value);
>              break;
> @@ -88,7 +88,7 @@ osinfo_entity_get_property (GObject    *object,
>  
>      switch (property_id)
>          {
> -        case OSI_ENTITY_ID:
> +        case PROP_ID:
>              g_value_set_string (value, entity->priv->id);
>              break;
>          default:
> @@ -138,7 +138,7 @@ osinfo_entity_class_init (OsinfoEntityClass *klass)
>                                   G_PARAM_STATIC_NICK |
>                                   G_PARAM_STATIC_BLURB);
>      g_object_class_install_property (g_klass,
> -                                     OSI_ENTITY_ID,
> +                                     PROP_ID,
>                                       pspec);
>  
>      g_klass->finalize = osinfo_entity_finalize;
> diff --git a/osinfo/osinfo_os.c b/osinfo/osinfo_os.c
> index bc013aa..8bb9252 100644
> --- a/osinfo/osinfo_os.c
> +++ b/osinfo/osinfo_os.c
> @@ -55,10 +55,10 @@ struct _OsinfoOsDeviceLink {
>      gchar *driver;
>  };
>  
> -enum OSI_OS_PROPERTIES {
> -    OSI_OS_PROP_0,
> +enum {
> +    PROP_0,
>  
> -    OSI_OS_FAMILY,
> +    PROP_FAMILY,
>  };
>  
>  static void osinfo_os_finalize (GObject *object);
> @@ -78,7 +78,7 @@ osinfo_os_get_property (GObject    *object,
>  
>      switch (property_id)
>          {
> -        case OSI_OS_FAMILY:
> +        case PROP_FAMILY:
>              g_value_set_string (value,
>                                  osinfo_entity_get_param_value (entity,
>                                                                 "family"));
> @@ -129,7 +129,7 @@ osinfo_os_class_init (OsinfoOsClass *klass)
>                                   G_PARAM_STATIC_NICK |
>                                   G_PARAM_STATIC_BLURB);
>      g_object_class_install_property (g_klass,
> -                                     OSI_OS_FAMILY,
> +                                     PROP_FAMILY,
>                                       pspec);
>  }

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]