[soundconverter] Fix crash when GNOME Audio Profile description changes translation (#714454).

Michael Schwendt mschwendt at fedoraproject.org
Tue Jun 21 10:40:06 UTC 2011


commit 2db18f6f5d6ff15ff2c8f1c2fe3a4514daa3b212
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Tue Jun 21 12:39:53 2011 +0200

    Fix crash when GNOME Audio Profile description changes translation (#714454).

 soundconverter-1.5.4-gst-profile-lang.patch |   46 +++++++++++++++++++++++++++
 soundconverter.spec                         |    9 ++++-
 2 files changed, 53 insertions(+), 2 deletions(-)
---
diff --git a/soundconverter-1.5.4-gst-profile-lang.patch b/soundconverter-1.5.4-gst-profile-lang.patch
new file mode 100644
index 0000000..3de162f
--- /dev/null
+++ b/soundconverter-1.5.4-gst-profile-lang.patch
@@ -0,0 +1,46 @@
+diff -Nur soundconverter-1.5.4-orig/src/soundconverter.py soundconverter-1.5.4/src/soundconverter.py
+--- soundconverter-1.5.4-orig/src/soundconverter.py	2011-01-06 21:47:14.000000000 +0100
++++ soundconverter-1.5.4/src/soundconverter.py	2011-06-21 12:38:01.825025454 +0200
+@@ -456,6 +456,21 @@
+ 		audio_profiles_list.append(profile)
+ 		audio_profiles_dict[description] = profile
+ 
++gconfsc = '/apps/SoundConverter'
++forceprefs = False
++if _GCONF.get_string(gconfsc+'/output-mime-type') == 'gst-profile':
++       pdesc = _GCONF.get_string(gconfsc+'/audio-profile')
++       desclist = []
++       for p in audio_profiles_list:
++               description, extension, pipeline = p
++               desclist.append(description)
++       if pdesc not in desclist:
++               if desclist:
++                       _GCONF.set_string(gconfsc+'/audio-profile',desclist[0])
++               _GCONF.set_string(gconfsc+'/output-mime-type','audio/x-vorbis')
++               _GCONF.set_int(gconfsc+'/delete-original',0)
++               forceprefs = True
++
+ # logging & debugging
+ 
+ def log(*args):
+@@ -1979,7 +1994,10 @@
+ 		self.gconf.clear_cache()
+ 		output_type = self.get_string('output-mime-type')
+ 		profile = self.get_string('audio-profile')
+-		profile_ext = audio_profiles_dict[profile][1] if profile else ''
++		if audio_profiles_dict.has_key(profile):
++			profile_ext = audio_profiles_dict[profile][1]
++		else:
++			profile_ext = ''
+ 		output_suffix = {
+ 						'audio/x-vorbis': '.ogg',
+ 						'audio/x-flac': '.flac',
+@@ -2863,6 +2881,8 @@
+ 	#TODO
+ 	gobject.idle_add(win.filelist.add_uris, input_files)
+ 	win.set_sensitive()
++	if forceprefs:
++		win.prefs.run()
+ 	#gtk.threads_enter()
+ 	gtk.main()
+ 	#gtk.threads_leave()
diff --git a/soundconverter.spec b/soundconverter.spec
index 87b0e71..9010e58 100644
--- a/soundconverter.spec
+++ b/soundconverter.spec
@@ -1,6 +1,6 @@
 Name:           soundconverter
 Version:        1.5.4
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Simple sound converter application for GNOME
 
 Group:          Applications/Multimedia
@@ -19,6 +19,8 @@ BuildRequires:  gnome-python2-gnome
 # in 1.5.4 translatable strings are either untranslated and/or marked as fuzzy
 # NOT APPLIED in 1.5.4
 Patch0: soundconverter-1.5.3-bz647336.patch
+# Fedora bz 714454
+Patch1: soundconverter-1.5.4-gst-profile-lang.patch
 
 # enforce availability of this and its requirement "desktop-notification-daemon"
 Requires:       notify-python
@@ -44,7 +46,7 @@ writes anything the GStreamer library can.
 %setup -q
 # see Patch0
 #patch0 -p1 -b .bz647336
-
+%patch1 -p1 -b .bz714454
 
 %build
 %configure --disable-dependency-tracking
@@ -97,6 +99,9 @@ update-desktop-database &> /dev/null ||:
 
 
 %changelog
+* Tue Jun 21 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.4-4
+- Fix crash when GNOME Audio Profile description changes translation (#714454).
+
 * Tue Mar 22 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.4-3
 - Add dependency on gnome-python2-bonobo, which is a missing dep of
   gnome-python2-gnome (#689836) and causes a crash if not installed,


More information about the scm-commits mailing list