Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv28527
Modified Files:
prefs.c
Log Message:
hi.
Index: prefs.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/prefs.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- prefs.c 2001/09/28 12:15:54 1.183
+++ prefs.c 2001/10/10 00:26:26 1.184
@@ -1356,6 +1356,7 @@
static GtkWidget *sndent[NUM_SOUNDS];
static GtkWidget *sndcmd = NULL;
+static char *last_sound_dir = NULL;
void close_sounddialog(GtkWidget *w, GtkWidget *w2)
{
@@ -1396,6 +1397,10 @@
/* Close the window! It's getting cold in here! */
close_sounddialog(NULL, sounddialog);
+
+ if (last_sound_dir)
+ g_free(last_sound_dir);
+ last_sound_dir = g_dirname(sound_file[snd]);
}
static void reset_sound(GtkWidget *button, int snd)
@@ -1409,7 +1414,6 @@
static void sel_sound(GtkWidget *button, int snd)
{
-
char *buf = g_malloc(BUF_LEN);
if (!sounddialog) {
@@ -1417,7 +1421,7 @@
gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(sounddialog));
- g_snprintf(buf, BUF_LEN - 1, "%s/", getenv("HOME"));
+ g_snprintf(buf, BUF_LEN - 1, "%s/", last_sound_dir ? last_sound_dir : g_get_home_dir());
gtk_file_selection_set_filename(GTK_FILE_SELECTION(sounddialog), buf);
|