]> git.0d.be Git - empathy.git/commitdiff
Fix a warning when the ADIUM_PATH gconf key is unset.
authorXavier Claessens <xclaesse@gmail.com>
Mon, 3 Nov 2008 23:20:39 +0000 (00:20 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Thu, 11 Jun 2009 16:06:31 +0000 (18:06 +0200)
src/empathy-preferences.c

index cc8b4508bb661b7ea5de9fce64bde8b4134d9e80..b74c85c6193cca7aa48aaf779eab0050348e8fea 100644 (file)
@@ -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);
 }