~ubuntu-branches/ubuntu/trusty/vino/trusty-proposed

« back to all changes in this revision

Viewing changes to capplet/vino-preferences.c

  • Committer: Package Import Robot
  • Author(s): Ritesh Khadgaray
  • Date: 2013-03-20 22:12:06 UTC
  • Revision ID: package-import@ubuntu.com-20130320221206-my0ztfmn9esw59p8
Tags: 3.6.2-0ubuntu3
* debian/patches/git_auth_methods_setting.patch:  
  - incorrect schema setting used for authentication-methods in 
    vino server ( lp: #1027086)

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
  return g_variant_new_boolean (!g_value_get_boolean (value));
69
69
}
70
70
 
71
 
/* Next, one that maps between the array-of-strings list of
72
 
 * authentication mechanisms and a boolean that is FALSE if the 'none'
73
 
 * and TRUE otherwise (ie: for 'vnc' in the list).
 
71
/* Next, one that maps between the array-of-strings list of authentication
 
72
 * mechanisms and a boolean that is TRUE only if "vnc" is in the list and FALSE
 
73
 * otherwise.
74
74
 */
75
75
static gboolean
76
76
get_authtype (GValue   *value,
81
81
  const gchar *type;
82
82
 
83
83
  g_variant_iter_init (&iter, variant);
84
 
  g_value_set_boolean (value, TRUE);
 
84
  g_value_set_boolean (value, FALSE);
85
85
 
86
86
  while (g_variant_iter_next (&iter, "s", &type))
87
 
    if (strcmp (type, "none") == 0)
88
 
      g_value_set_boolean (value, FALSE);
 
87
    if (strcmp (type, "vnc") == 0)
 
88
      g_value_set_boolean (value, TRUE);
89
89
 
90
90
  return TRUE;
91
91
}
95
95
              const GVariantType *type,
96
96
              gpointer            user_data)
97
97
{
98
 
  const gchar *authtype;
 
98
  const gchar *vnc_auth = "vnc";
99
99
 
100
100
  if (g_value_get_boolean (value))
101
 
    authtype = "vnc";
 
101
    return g_variant_new_strv (&vnc_auth, 1);
102
102
  else
103
 
    authtype = "none";
104
 
 
105
 
  return g_variant_new_strv (&authtype, 1);
 
103
    return g_variant_new_strv (NULL, 0);
106
104
}
107
105
 
108
106