# HG changeset patch # User Elliott Sales de Andrade # Date 1252035691 0 # Node ID de93712181c156721ffeb7745baae553582b015a # Parent 561679822c97b7b0e5a6232f6a04a9e413aaa0ec Don't reset the sound theme pref if we're just loading the list of themes. Otherwise, any custom sounds will be reset whenever you open the preferences. Fixes #9955. diff -r 561679822c97 -r de93712181c1 ChangeLog --- a/ChangeLog Fri Sep 04 03:00:04 2009 +0000 +++ b/ChangeLog Fri Sep 04 03:41:31 2009 +0000 @@ -47,6 +47,8 @@ * Fix the auto-personize functionality in the Buddy List. * Set the window icon for the media window to an icon corresponding to the type of call (headphone or webcam). + * Customized sound files are no longer reset whenever opening the + Preferences dialog. version 2.6.1 (08/18/2009): * Fix a crash when some users send you a link in a Yahoo IM diff -r 561679822c97 -r de93712181c1 pidgin/gtkprefs.c --- a/pidgin/gtkprefs.c Fri Sep 04 03:00:04 2009 +0000 +++ b/pidgin/gtkprefs.c Fri Sep 04 03:41:31 2009 +0000 @@ -91,6 +91,8 @@ static GtkWidget *prefs_blist_themes_combo_box; static GtkWidget *prefs_status_themes_combo_box; +static gboolean prefs_sound_themes_loading; + /* * PROTOTYPES */ @@ -580,6 +582,7 @@ gchar *filename; GtkTreeIter iter; + prefs_sound_themes_loading = TRUE; /* refresh the list of themes in the manager */ purple_theme_manager_refresh(); @@ -614,6 +617,7 @@ prefs_set_active_theme_combo(prefs_sound_themes_combo_box, prefs_sound_themes, purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/theme")); prefs_set_active_theme_combo(prefs_blist_themes_combo_box, prefs_blist_themes, purple_prefs_get_string(PIDGIN_PREFS_ROOT "/blist/theme")); prefs_set_active_theme_combo(prefs_status_themes_combo_box, prefs_status_icon_themes, purple_prefs_get_string(PIDGIN_PREFS_ROOT "/status/icon-theme")); + prefs_sound_themes_loading = FALSE; } /* init all the theme variables so that the themes can be sorted later and used by pref pages */ @@ -965,7 +969,7 @@ gchar *new_theme; GtkTreeIter new_iter; - if(gtk_combo_box_get_active_iter(combo_box, &new_iter)) { + if(gtk_combo_box_get_active_iter(combo_box, &new_iter) && !prefs_sound_themes_loading) { gtk_tree_model_get(GTK_TREE_MODEL(prefs_sound_themes), &new_iter, 2, &new_theme, -1);