From 90e23183f4268e873356ea55682d4a44ee550557 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sep 06 2009 02:59:50 +0000 Subject: Fix warnings at startup --- diff --git a/vinagre-prefs.patch b/vinagre-prefs.patch new file mode 100644 index 0000000..f5b951e --- /dev/null +++ b/vinagre-prefs.patch @@ -0,0 +1,70 @@ +--- vinagre-2.27.91/vinagre/vinagre-prefs.c 2009-07-30 16:13:29.000000000 -0400 ++++ hacked/vinagre/vinagre-prefs.c 2009-09-05 22:51:22.750568356 -0400 +@@ -152,41 +152,51 @@ + static void + vinagre_prefs_set_bool (VinagrePrefs *prefs, const gchar* key, gboolean value) + { +- g_return_if_fail (gconf_client_key_is_writable ( +- prefs->priv->gconf_client, key, NULL)); ++ GError *error = NULL; + +- gconf_client_set_bool (prefs->priv->gconf_client, key, value, NULL); ++ if (!gconf_client_set_bool (prefs->priv->gconf_client, key, value, &error)) ++ { ++ g_warning ("Setting key %s failed: %s", key, error->message); ++ g_error_free (error); ++ } + } + + static void + vinagre_prefs_set_int (VinagrePrefs *prefs, const gchar* key, gint value) + { +- g_return_if_fail (gconf_client_key_is_writable ( +- prefs->priv->gconf_client, key, NULL)); ++ GError *error = NULL; + +- gconf_client_set_int (prefs->priv->gconf_client, key, value, NULL); ++ if (!gconf_client_set_int (prefs->priv->gconf_client, key, value, &error)) ++ { ++ g_warning ("Setting key %s failed: %s", key, error->message); ++ g_error_free (error); ++ } + } + + static void + vinagre_prefs_set_string (VinagrePrefs *prefs, const gchar *key, const gchar *value) + { +- g_return_if_fail (gconf_client_key_is_writable ( +- prefs->priv->gconf_client, key, NULL)); ++ GError *error = NULL; + +- gconf_client_set_string (prefs->priv->gconf_client, key, value, NULL); ++ if (!gconf_client_set_string (prefs->priv->gconf_client, key, value, &error)) ++ { ++ g_warning ("Setting key %s failed: %s", key, error->message); ++ g_error_free (error); ++ } + } + + static void + vinagre_prefs_set_list (VinagrePrefs *prefs, const gchar* key, GSList *list) + { +- g_return_if_fail (gconf_client_key_is_writable ( +- prefs->priv->gconf_client, key, NULL)); ++ GError *error = NULL; + +- gconf_client_set_list (prefs->priv->gconf_client, +- key, +- GCONF_VALUE_STRING, +- list, +- NULL); ++ if (!gconf_client_set_list (prefs->priv->gconf_client, key, ++ GCONF_VALUE_STRING, list, ++ &error)) ++ { ++ g_warning ("Setting key %s failed: %s", key, error->message); ++ g_error_free (error); ++ } + } + + static void diff --git a/vinagre.spec b/vinagre.spec index 929956b..ab823e9 100644 --- a/vinagre.spec +++ b/vinagre.spec @@ -1,6 +1,6 @@ Name: vinagre Version: 2.27.91 -Release: 2%{?dist} +Release: 3%{?dist} Summary: VNC client for GNOME Group: Applications/System @@ -26,7 +26,10 @@ BuildRequires: telepathy-glib-devel # for /usr/share/dbus-1/services Requires: dbus +# fixed upstream Patch0: vinagre-unique-ids.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=594286 +Patch1: vinagre-prefs.patch %description Vinagre is a VNC client for the GNOME desktop. @@ -52,6 +55,7 @@ to vinagre. %prep %setup -q %patch0 -p1 -b .unique-ids +%patch1 -p1 -b .prefs %build %configure --enable-avahi=yes --disable-static @@ -158,6 +162,9 @@ fi %changelog +* Sat Sep 5 2009 Matthias Clasen - 2.27.91-3 +- Fix warnings at startup (#521382) + * Thu Sep 3 2009 Matthias Clasen - 2.27.91-2 - Make ids unique