From 5c9e26f898ab481887297ab2eed8348d41a74230 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 24 Jan 2004 12:09:48 +0000 Subject: Fall back to Home directory when the pref is NULL. 2004-01-24 Christian Persch * src/prefs-dialog.c: (get_download_button_label): Fall back to Home directory when the pref is NULL. --- ChangeLog | 6 ++++++ src/prefs-dialog.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index b77bacc5f..fb64d8581 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-01-24 Christian Persch + + * src/prefs-dialog.c: (get_download_button_label): + + Fall back to Home directory when the pref is NULL. + 2004-01-24 Christian Persch * lib/ephy-file-chooser.c: (ephy_file_chooser_get_type), diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 883406862..18d4dd1c4 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -1090,6 +1090,12 @@ get_download_button_label () downloads_path = g_build_path (g_get_home_dir (), "Desktop", _("Downloads"), NULL); + /* fallback to Home directory */ + if (key == NULL) + { + key = g_strdup ("~"); + } + if (g_utf8_collate (key, "~/Desktop") == 0) { g_free (key); -- cgit v1.2.3