[telepathy-account-widgets/next] tpaw_account_settings_parameter_is_valid: use tp_vardict_has_key



commit dfe8d99243fc390f55662ece0d40382baa9d70f1
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Tue Mar 25 18:04:23 2014 +0000

    tpaw_account_settings_parameter_is_valid: use tp_vardict_has_key
    
    Based on a patch by Guillaume Desmottes.

 tp-account-widgets/tpaw-account-settings.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/tp-account-widgets/tpaw-account-settings.c b/tp-account-widgets/tpaw-account-settings.c
index 2f5077a..4c1fdc4 100644
--- a/tp-account-widgets/tpaw-account-settings.c
+++ b/tp-account-widgets/tpaw-account-settings.c
@@ -1549,18 +1549,15 @@ tpaw_account_settings_parameter_is_valid (
           !tpaw_account_settings_is_unset (settings, param))
         {
           GVariant *account_params;
-          GVariant *v;
 
           account_params = tp_account_dup_parameters (settings->priv->account);
 
-          v = g_variant_lookup_value (account_params, param, NULL);
-          g_variant_unref (account_params);
-
-          if (v != NULL)
+          if (tp_vardict_has_key (account_params, param))
             {
-              g_variant_unref (v);
+              g_variant_unref (account_params);
               goto test_regex;
             }
+          g_variant_unref (account_params);
         }
 
       return FALSE;


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