pidgin: 9589af68: Don't reset the sound theme pref if we'r...

qulogic at pidgin.im qulogic at pidgin.im
Fri Sep 4 01:30:53 EDT 2009


-----------------------------------------------------------------
Revision: 9589af684f8628439a79759a954a7ee6c3801e59
Ancestor: dc875c9760f3020a45d8e31b5a9af6678d53776e
Author: qulogic at pidgin.im
Date: 2009-09-04T03:41:31
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/9589af684f8628439a79759a954a7ee6c3801e59

Modified files:
        ChangeLog pidgin/gtkprefs.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- ChangeLog	114070101ac233eabd438827009fee6d94d98731
+++ ChangeLog	5228804983e8e03d26b44f2d1c90923cbd4ac586
@@ -47,6 +47,8 @@ version 2.6.2 (??/??/2009):
 	* 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
============================================================
--- pidgin/gtkprefs.c	9797dec7f7e899160ea43f045293be027a5b547d
+++ pidgin/gtkprefs.c	b06069380f9b5e68a0d43f34609d473ba18371fa
@@ -91,6 +91,8 @@ static GtkWidget *prefs_status_themes_co
 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 @@ prefs_themes_refresh(void)
 	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_themes_refresh(void)
 	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 @@ prefs_set_sound_theme_cb(GtkComboBox *co
 	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);
 


More information about the Commits mailing list