sound-juicer r2065 - in trunk: . src
- From: rburton svn gnome org
- To: svn-commits-list gnome org
- Subject: sound-juicer r2065 - in trunk: . src
- Date: Mon, 25 Feb 2008 19:20:29 +0000 (GMT)
Author: rburton
Date: Mon Feb 25 19:20:29 2008
New Revision: 2065
URL: http://svn.gnome.org/viewvc/sound-juicer?rev=2065&view=rev
Log:
2008-02-25 Ross Burton <ross burtonini com>
* src/sj-prefs.c:
When setting the base path, if it is unset default to the XDG
music directory, and only emit change signals if the path has
actually changed (#471971, thanks Matthew Martin).
Modified:
trunk/ChangeLog
trunk/src/sj-prefs.c
Modified: trunk/src/sj-prefs.c
==============================================================================
--- trunk/src/sj-prefs.c (original)
+++ trunk/src/sj-prefs.c Mon Feb 25 19:20:29 2008
@@ -118,10 +118,16 @@
*/
void prefs_base_folder_changed (GtkWidget *chooser, gpointer user_data)
{
- char *uri;
- uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser));
- gconf_client_set_string (gconf_client, GCONF_BASEURI, uri, NULL);
- g_free (uri);
+ char *new_uri, *current_uri;
+
+ current_uri = gconf_client_get_string (gconf_client, GCONF_BASEURI, NULL);
+ new_uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser));
+
+ if (strcmp(current_uri, new_uri) != 0)
+ gconf_client_set_string (gconf_client, GCONF_BASEURI, new_uri, NULL);
+
+ g_free (new_uri);
+ g_free (current_uri);
}
void prefs_path_option_changed (GtkComboBox *combo, gpointer user_data)
@@ -198,7 +204,12 @@
g_return_if_fail (entry->value->type == GCONF_VALUE_STRING);
current_uri = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (basepath_fcb));
if (current_uri == NULL || strcmp (current_uri, base_uri) != 0) {
- gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (basepath_fcb), base_uri);
+ char *dir;
+
+ dir = sj_get_default_music_directory ();
+ gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (basepath_fcb), dir);
+ g_free (dir);
+
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]