[empathy] Fix a warning when the ADIUM_PATH gconf key is unset.
- From: Xavier Claessens <xclaesse src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Fix a warning when the ADIUM_PATH gconf key is unset.
- Date: Thu, 11 Jun 2009 14:55:34 -0400 (EDT)
commit 9526e4a4b28eab55a52d3fb9d1d3cfc9d990af24
Author: Xavier Claessens <xclaesse gmail com>
Date: Tue Nov 4 00:20:39 2008 +0100
Fix a warning when the ADIUM_PATH gconf key is unset.
src/empathy-preferences.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index cc8b450..b74c85c 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]