spice-gtk/0006-Rename-spice-usbredir-filter-option-to-spice-usbredi.patch
2012-10-25 18:11:18 +02:00

59 lines
2.7 KiB
Diff

From fda148b982ef2d0a227e758b2818b9c480f34332 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 21 Sep 2012 15:32:21 +0000
Subject: [PATCH 06/21] Rename spice-usbredir-filter option to
spice-usbredir-auto-redirect-filter
The spice-usbredir-filter cmdline option was not chosen well, as it does
not indicate what it filters. Now that we are also getting a filter for
selecting already plugged in devices to redirect when a spice connection gets
established, it needs to be renamed to make its function more clear.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Resolves: rhbz#820964
---
gtk/spice-option.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/gtk/spice-option.c b/gtk/spice-option.c
index 715e84a..1333766 100644
--- a/gtk/spice-option.c
+++ b/gtk/spice-option.c
@@ -32,7 +32,7 @@ static char *ca_file = NULL;
static char *host_subject = NULL;
static char *smartcard_db = NULL;
static char *smartcard_certificates = NULL;
-static char *usbredir_filter = NULL;
+static char *usbredir_auto_redirect_filter = NULL;
static gboolean smartcard = FALSE;
static gboolean disable_audio = FALSE;
static gboolean disable_usbredir = FALSE;
@@ -131,8 +131,8 @@ GOptionGroup* spice_get_option_group(void)
N_("Path to the local certificate database to use for software smartcard certificates"), N_("<certificate-db>") },
{ "spice-disable-usbredir", '\0', 0, G_OPTION_ARG_NONE, &disable_usbredir,
N_("Disable USB redirection support"), NULL },
- { "spice-usbredir-filter", '\0', 0, G_OPTION_ARG_STRING, &usbredir_filter,
- N_("Filter for excluding USB devices from auto redirection"), N_("<filter-string>") },
+ { "spice-usbredir-auto-redirect-filter", '\0', 0, G_OPTION_ARG_STRING, &usbredir_auto_redirect_filter,
+ N_("Filter selecting USB devices to be auto-redirected when plugged in"), N_("<filter-string>") },
{ "spice-cache-size", '\0', 0, G_OPTION_ARG_INT, &cache_size,
N_("Image cache size"), N_("<bytes>") },
{ "spice-glz-window-size", '\0', 0, G_OPTION_ARG_INT, &glz_window_size,
@@ -195,10 +195,11 @@ void spice_set_session_option(SpiceSession *session)
if (smartcard_db)
g_object_set(session, "smartcard-db", smartcard_db, NULL);
}
- if (usbredir_filter) {
+ if (usbredir_auto_redirect_filter) {
SpiceUsbDeviceManager *m = spice_usb_device_manager_get(session, NULL);
if (m)
- g_object_set(m, "auto-connect-filter", usbredir_filter, NULL);
+ g_object_set(m, "auto-connect-filter",
+ usbredir_auto_redirect_filter, NULL);
}
if (disable_usbredir)
g_object_set(session, "enable-usbredir", FALSE, NULL);
--
1.7.12.1