[Spice-devel] [spice-gtk v1 2/2] option: Remove --spice-color-depth

Christophe Fergeau cfergeau at redhat.com
Wed Dec 12 17:03:36 UTC 2018


On Tue, Dec 11, 2018 at 01:48:15PM +0100, Victor Toso wrote:
> From: Victor Toso <me at victortoso.com>
> 
> As this is NOP from previous patch and has been deprecated since v0.34

When --spice-color-depth is used, it might be nicer for now to add an
error message that this feature has been removed because it was limited
to win7 and older.

Christophe
> 
> Signed-off-by: Victor Toso <victortoso at redhat.com>
> ---
>  src/spice-option.c | 32 --------------------------------
>  1 file changed, 32 deletions(-)
> 
> diff --git a/src/spice-option.c b/src/spice-option.c
> index 6b400bc..d91b10a 100644
> --- a/src/spice-option.c
> +++ b/src/spice-option.c
> @@ -26,7 +26,6 @@
>  #include "usb-device-manager.h"
>  
>  static GStrv disable_effects = NULL;
> -static gint color_depth = 0;
>  static char *ca_file = NULL;
>  static char *host_subject = NULL;
>  static char *smartcard_db = NULL;
> @@ -55,33 +54,6 @@ static gboolean option_debug(void)
>      return TRUE;
>  }
>  
> -static gboolean parse_color_depth(const gchar *option_name, const gchar *value,
> -                                  gpointer data, GError **error)
> -{
> -    unsigned long parsed_depth;
> -    char *end;
> -
> -    if (option_name == NULL) {
> -        g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_FAILED, _("missing color depth, must be 16 or 32"));
> -        return FALSE;
> -    }
> -
> -    parsed_depth = strtoul(value, &end, 0);
> -    if (*end != '\0')
> -        goto error;
> -
> -    if ((parsed_depth != 16) && (parsed_depth != 32))
> -        goto error;
> -
> -    color_depth = parsed_depth;
> -
> -    return TRUE;
> -
> -error:
> -    g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_FAILED, _("invalid color depth (%s), must be 16 or 32"), value);
> -    return FALSE;
> -}
> -
>  static gboolean parse_disable_effects(const gchar *option_name, const gchar *value,
>                                        gpointer data, GError **error)
>  {
> @@ -195,8 +167,6 @@ GOptionGroup* spice_get_option_group(void)
>            N_("Force the specified channels to be secured"), "<main,display,inputs,...,all>" },
>          { "spice-disable-effects", '\0', 0, G_OPTION_ARG_CALLBACK, parse_disable_effects,
>            N_("Disable guest display effects"), "<wallpaper,font-smooth,animation,all>" },
> -        { "spice-color-depth", '\0', 0, G_OPTION_ARG_CALLBACK, parse_color_depth,
> -          N_("Guest display color depth (deprecated)"), "<16,32>" },
>          { "spice-ca-file", '\0', 0, G_OPTION_ARG_FILENAME, &ca_file,
>            N_("Truststore file for secure connections"), N_("<file>") },
>          { "spice-host-subject", '\0', 0, G_OPTION_ARG_STRING, &host_subject,
> @@ -278,8 +248,6 @@ void spice_set_session_option(SpiceSession *session)
>          g_strfreev(channels);
>      }
>  
> -    if (color_depth)
> -        g_object_set(session, "color-depth", color_depth, NULL);
>      if (ca_file)
>          g_object_set(session, "ca-file", ca_file, NULL);
>      if (host_subject)
> -- 
> 2.19.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20181212/58fa056a/attachment.sig>


More information about the Spice-devel mailing list