[goobox] use the home dir if the destination is null
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goobox] use the home dir if the destination is null
- Date: Sun, 4 Jul 2010 20:04:05 +0000 (UTC)
commit 104956d610a3bb69e26dab4beb876f1696b2c836
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Jul 4 22:03:18 2010 +0200
use the home dir if the destination is null
src/dlg-preferences.c | 2 ++
src/dlg-ripper.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/dlg-preferences.c b/src/dlg-preferences.c
index 8141992..0952310 100644
--- a/src/dlg-preferences.c
+++ b/src/dlg-preferences.c
@@ -230,6 +230,8 @@ dlg_preferences (GooWindow *window)
destination = eel_gconf_get_uri (PREF_EXTRACT_DESTINATION, "");
if ((destination == NULL) || (strcmp (destination, "") == 0))
destination = g_filename_to_uri (g_get_user_special_dir (G_USER_DIRECTORY_MUSIC), NULL, NULL);
+ if (destination == NULL)
+ destination = g_filename_to_uri (g_get_home_dir (), NULL, NULL);
gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (GET_WIDGET ("destination_filechooserbutton")), destination);
g_free (destination);
diff --git a/src/dlg-ripper.c b/src/dlg-ripper.c
index 944228b..ad40d75 100644
--- a/src/dlg-ripper.c
+++ b/src/dlg-ripper.c
@@ -732,6 +732,8 @@ dlg_ripper (GooWindow *window,
data->destination = eel_gconf_get_uri (PREF_EXTRACT_DESTINATION, "");
if ((data->destination == NULL) || (strcmp (data->destination, "") == 0))
data->destination = g_filename_to_uri (g_get_user_special_dir (G_USER_DIRECTORY_MUSIC), NULL, NULL);
+ if (data->destination == NULL)
+ data->destination = g_filename_to_uri (g_get_home_dir (), NULL, NULL);
data->drive = g_object_ref (goo_player_get_drive (player));
data->format = pref_get_file_format ();
data->album = goo_player_get_album (player);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]