rpms/rhythmbox-equalizer/F-13 import.log, NONE, 1.1 rhythmbox-equalizer-1.3-fix-presets-per-user.patch, NONE, 1.1 rhythmbox-equalizer.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Hicham HAOUARI
hicham at fedoraproject.org
Tue May 4 20:24:15 UTC 2010
Author: hicham
Update of /cvs/pkgs/rpms/rhythmbox-equalizer/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv728/F-13
Modified Files:
.cvsignore sources
Added Files:
import.log rhythmbox-equalizer-1.3-fix-presets-per-user.patch
rhythmbox-equalizer.spec
Log Message:
Initial Import
--- NEW FILE import.log ---
rhythmbox-equalizer-1_3-2_fc13:F-13:rhythmbox-equalizer-1.3-2.fc13.src.rpm:1273004528
rhythmbox-equalizer-1.3-fix-presets-per-user.patch:
equalizer.py | 27 +++++++++++++++++++++------
rbeq_ui.xml | 1 +
2 files changed, 22 insertions(+), 6 deletions(-)
--- NEW FILE rhythmbox-equalizer-1.3-fix-presets-per-user.patch ---
diff -up rhythmbox/plugins/rbeq/equalizer.py.old rhythmbox/plugins/rbeq/equalizer.py
--- rhythmbox/plugins/rbeq/equalizer.py.old 2010-04-15 12:34:27.000000000 +0000
+++ rhythmbox/plugins/rbeq/equalizer.py 2010-04-15 13:48:27.000000000 +0000
@@ -24,11 +24,17 @@ import gst
import pygtk
import gtk
import gconf
+import os.path
+import shutil
+import gobject
gconf_str = "/apps/rhythmbox/plugins/rbeq/last_values"
+user_presets = os.path.expanduser('~')+"/.gnome2/rhythmbox/plugins/rbeq/presets"
+rbeq_dir_user = os.path.expanduser('~')+"/.gnome2/rhythmbox/plugins/rbeq/"
+
class Equalizer:
presets = {}
- presetListStore = gtk.ListStore(None)
+ presetListStore = gtk.ListStore(gobject.TYPE_STRING)
sliders = []
def __init__(self):
self.equ = gst.element_factory_make("equalizer-10bands")
@@ -60,21 +66,30 @@ class Equalizer:
def preset_changed(self, preset_combo):
model = preset_combo.get_model()
current_sel = preset_combo.get_active_iter()
- selected = model.get_value(current_sel,0)
- levels = list(float(i) for i in self.presets[selected].split(","))
- self.change_levels(levels)
+ if current_sel != None :
+ selected = model.get_value(current_sel,0)
+ levels = list(float(i) for i in self.presets[selected].split(","))
+ self.change_levels(levels)
def set_initial_levels(self):
self.change_levels(self.get_current_levels())
def read_preset_file(self, rb_context):
- presetFile = open(rb_context.find_file("presets"))
+ if not os.path.exists(rbeq_dir_user):
+ os.makedirs(rbeq_dir_user)
+ if not os.path.isfile(user_presets):
+ shutil.copyfile(rb_context.find_file("presets"), user_presets)
+ presetFile = open(user_presets)
lines = presetFile.readlines()
presetFile.close()
return lines
def write_preset_file(self, rb_context):
- presetFile = open(rb_context.find_file("presets"), "w")
+ if not os.path.exists(rbeq_dir_user):
+ os.makedirs(rbeq_dir_user)
+ if not os.path.isfile(user_presets):
+ shutil.copyfile(rb_context.find_file("presets"), user_presets)
+ presetFile = open(user_presets, "w")
presetFile.seek(0)
for key in self.presets.keys():
presetFile.write(key)
diff -up rhythmbox/plugins/rbeq/rbeq_ui.xml.old rhythmbox/plugins/rbeq/rbeq_ui.xml
--- rhythmbox/plugins/rbeq/rbeq_ui.xml.old 2010-04-15 16:06:54.000000000 +0000
+++ rhythmbox/plugins/rbeq/rbeq_ui.xml 2010-04-15 16:07:43.000000000 +0000
@@ -66,6 +66,7 @@
<property name="extension_events">all</property>
<property name="border_width">4</property>
<property name="type_hint">utility</property>
+ <property name="title">Rhythmbox Equalizer</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
--- NEW FILE rhythmbox-equalizer.spec ---
%global debug_package %{nil}
%define rb_plugins_dir %{_libdir}/rhythmbox/plugins
Name: rhythmbox-equalizer
Version: 1.3
Release: 2%{?dist}
Group: Applications/Multimedia
Summary: An Equalizer plugin for Rhythmbox
License: GPLv2+
URL: http://code.google.com/p/rbeq/
Source0: http://rbeq.googlecode.com/files/rbeq-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires: rhythmbox
Patch0: %{name}-%{version}-fix-presets-per-user.patch
%description
10 Band Equalizer for Rhythmbox
%prep
%setup -q -n rhythmbox
%patch0 -p1 -b .fix-presets-per-user
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{rb_plugins_dir}/rbeq
install -p -D -m 644 plugins/rbeq/*.py plugins/rbeq/rbeq.rb-plugin plugins/rbeq/rbeq_ui.xml plugins/rbeq/presets $RPM_BUILD_ROOT/%{rb_plugins_dir}/rbeq
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc plugins/rbeq/COPYING plugins/rbeq/ChangeLog
%{rb_plugins_dir}/rbeq
%changelog
* Mon Apr 15 2010 Hicham HAOUARI <hicham.haouari at gmail.com> 1.3-2
- Added patch to fix the presets saving issue
* Mon Apr 12 2010 Hicham HAOUARI <hicham.haouari at gmail.com> 1.3-1
- New upstream version
* Sat Aug 15 2009 Hicham HAOUARI <hicham.haouari at gmail.com> 1.2-1
- New upstream version
* Mon Jul 13 2009 Hicham HAOUARI <hicham.haouari at gmail.com> 1.1-1
- Initial package for Fedora
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox-equalizer/F-13/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 4 May 2010 02:59:29 -0000 1.1
+++ .cvsignore 4 May 2010 20:24:14 -0000 1.2
@@ -0,0 +1 @@
+rbeq-1.3.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox-equalizer/F-13/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 4 May 2010 02:59:29 -0000 1.1
+++ sources 4 May 2010 20:24:15 -0000 1.2
@@ -0,0 +1 @@
+eab2aa29df03b565351b4f1aba60e71f rbeq-1.3.tar.gz
More information about the scm-commits
mailing list