From: Xavier Claessens Date: Mon, 3 Nov 2008 23:20:39 +0000 (+0100) Subject: Fix a warning when the ADIUM_PATH gconf key is unset. X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=9526e4a4b28eab55a52d3fb9d1d3cfc9d990af24 Fix a warning when the ADIUM_PATH gconf key is unset. --- diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c index cc8b4508..b74c85c6 100644 --- a/src/empathy-preferences.c +++ b/src/empathy-preferences.c @@ -968,14 +968,21 @@ preferences_theme_adium_path_notify_cb (EmpathyConf *conf, EmpathyPreferences *preferences = user_data; GtkFileChooser *chooser; gchar *value; + const gchar *path; if (!empathy_conf_get_string (conf, key, &value)) { return; } + if (G_STR_EMPTY (value)) { + path = g_get_home_dir (); + } else { + path = value; + } + chooser = GTK_FILE_CHOOSER (preferences->filechooserbutton_adium_theme); - gtk_file_chooser_set_current_folder (chooser, value); - preferences_theme_adium_update_validity (preferences, value); + gtk_file_chooser_set_current_folder (chooser, path); + preferences_theme_adium_update_validity (preferences, path); g_free (value); }