OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/pulseaudio-equalizer?expand=0&rev=13
This commit is contained in:
parent
a8e1fb3c41
commit
bb8fb62b98
@ -114,7 +114,7 @@
|
||||
+ windowtitle = "PulseAudio " + ladspa_label
|
||||
+
|
||||
+ clearpreset = 1
|
||||
+ presetmatch = ''
|
||||
+ presetmatch = ""
|
||||
+ for i in range(len(rawpresets)):
|
||||
+ if rawpresets[i] == preset:
|
||||
+ print("Match!")
|
||||
@ -216,13 +216,13 @@
|
||||
+ if current_input < 99:
|
||||
+ a = current_input
|
||||
+ suffix = "Hz"
|
||||
+ elif current_input < 999:
|
||||
+ if current_input > 99 and current_input < 999:
|
||||
+ a = current_input
|
||||
+ suffix = "Hz"
|
||||
+ elif current_input < 9999:
|
||||
+ if current_input > 999 and current_input < 9999:
|
||||
+ a = float(current_input) / 1000
|
||||
+ suffix = "KHz"
|
||||
+ else:
|
||||
+ if current_input > 9999:
|
||||
+ a = float(current_input) / 1000
|
||||
+ suffix = "KHz"
|
||||
+
|
||||
@ -361,7 +361,7 @@
|
||||
+ preampscalevalue.set_markup(str(preampscale.get_value()) + "x")
|
||||
+ windowtitle = "PulseAudio " + ladspa_label
|
||||
+ self.window.set_title(windowtitle + " [" + realstatus + "]")
|
||||
+ clearpreset = ''
|
||||
+ clearpreset = ""
|
||||
+ for i in range(1,num_ladspa_controls + 1):
|
||||
+ self.scales[i].set_value(float(ladspa_controls[i - 1]))
|
||||
+ FormatLabels(i)
|
||||
@ -464,7 +464,7 @@
|
||||
+ rawdata.append(str(ladspa_inputs[i]))
|
||||
+
|
||||
+ for i in rawdata:
|
||||
+ f.write(str(i)+'\n')
|
||||
+ f.write(str(i) + "\n")
|
||||
+ f.close()
|
||||
+
|
||||
+ # Clear preset list from ComboBox
|
||||
@ -581,7 +581,7 @@
|
||||
+
|
||||
+ # Clear preset (if it is the same as removed preset), or restore preset
|
||||
+ if (presetdir1 + "/" + preset + ".preset") == filename:
|
||||
+ preset = ''
|
||||
+ preset = ""
|
||||
+ else:
|
||||
+ preset = realpreset
|
||||
+
|
@ -49,7 +49,7 @@
|
||||
filename = dialog.get_filename()
|
||||
path_and_name = os.path.split(filename)
|
||||
name = path_and_name[1]
|
||||
@@ -358,14 +364,14 @@ class Equalizer:
|
||||
@@ -358,14 +364,13 @@ class Equalizer:
|
||||
def __init__(self):
|
||||
GetSettings()
|
||||
|
||||
@ -59,14 +59,14 @@
|
||||
|
||||
self.window.connect("destroy", self.destroy_equalizer)
|
||||
self.window.set_title(windowtitle + " [" + realstatus + "]")
|
||||
self.window.set_border_width(0)
|
||||
- self.window.set_border_width(0)
|
||||
|
||||
- icon_theme = gtk.icon_theme_get_default()
|
||||
+ icon_theme = gtk.IconTheme.get_default()
|
||||
if icon_theme.has_icon("multimedia-volume-control"):
|
||||
icon = icon_theme.load_icon("multimedia-volume-control", 16, 0)
|
||||
self.window.set_icon(icon)
|
||||
@@ -380,19 +386,22 @@ class Equalizer:
|
||||
@@ -380,42 +385,59 @@ class Equalizer:
|
||||
|
||||
menu = gtk.Menu()
|
||||
|
||||
@ -93,16 +93,23 @@
|
||||
self.window.add(vbox1)
|
||||
vbox1.show()
|
||||
menu_bar = gtk.MenuBar()
|
||||
@@ -400,22 +409,31 @@ class Equalizer:
|
||||
- vbox1.pack_start(menu_bar, False, False, 2)
|
||||
+ if GTK_VERSION >= (3, 0, 0):
|
||||
+ menu_bar.set_margin_bottom(4)
|
||||
+ vbox1.add(menu_bar)
|
||||
+ else:
|
||||
+ vbox1.pack_start(menu_bar, False, False, 2)
|
||||
menu_bar.show()
|
||||
menu_bar.append (root_menu)
|
||||
- menu_bar.append (root_menu)
|
||||
+ menu_bar.append(root_menu)
|
||||
|
||||
- hbox1 = gtk.HBox(False, 1)
|
||||
- #hbox1.set_border_width(10)
|
||||
+ if GTK_VERSION >= (3, 0, 0):
|
||||
+ hbox1 = gtk.Box(orientation=gtk.Orientation.HORIZONTAL, spacing=1)
|
||||
+ else:
|
||||
+ hbox1 = gtk.HBox(spacing=1)
|
||||
#hbox1.set_border_width(10)
|
||||
+ #hbox1.props.margin = 10
|
||||
vbox1.add(hbox1)
|
||||
hbox1.show()
|
||||
|
||||
@ -111,9 +118,10 @@
|
||||
- hbox1.add(table)
|
||||
+ if GTK_VERSION >= (3, 10, 0):
|
||||
+ grid = gtk.Grid()
|
||||
+ grid.props.margin = 5
|
||||
+ else:
|
||||
+ grid = gtk.Table(n_rows=3, n_columns=17)
|
||||
+ grid.set_border_width(5)
|
||||
+ grid.set_border_width(5)
|
||||
+ hbox1.add(grid)
|
||||
|
||||
# Preamp widget
|
||||
@ -131,7 +139,7 @@
|
||||
preampscale.set_range(0.0, 2.0)
|
||||
preampscale.set_increments(1, 0.1)
|
||||
preampscale.set_digits(1)
|
||||
@@ -426,16 +444,25 @@ class Equalizer:
|
||||
@@ -426,16 +448,25 @@ class Equalizer:
|
||||
label.set_markup("<small>Preamp</small>")
|
||||
preampscalevalue = gtk.Label()
|
||||
preampscalevalue.set_markup(str(preampscale.get_value()) + "x")
|
||||
@ -162,7 +170,15 @@
|
||||
#separator.show()
|
||||
|
||||
# Equalizer bands
|
||||
@@ -448,7 +475,7 @@ class Equalizer:
|
||||
@@ -444,11 +475,14 @@ class Equalizer:
|
||||
self.labels = {}
|
||||
self.scalevalues = {}
|
||||
for x in range(1,num_ladspa_controls+1):
|
||||
- scale = gtk.VScale()
|
||||
+ if GTK_VERSION >= (3, 2, 0):
|
||||
+ scale = gtk.Scale(orientation=gtk.Orientation.VERTICAL)
|
||||
+ else:
|
||||
+ scale = gtk.VScale()
|
||||
self.scales[x] = scale
|
||||
scale.set_draw_value(0)
|
||||
scale.set_inverted(1)
|
||||
@ -171,7 +187,7 @@
|
||||
scale.set_range(float(ranges[0]), float(ranges[1]))
|
||||
scale.set_increments(1, 0.1)
|
||||
scale.set_digits(1)
|
||||
@@ -462,16 +489,24 @@ class Equalizer:
|
||||
@@ -462,67 +496,79 @@ class Equalizer:
|
||||
scalevalue = gtk.Label()
|
||||
self.scalevalues[x] = scalevalue
|
||||
scalevalue.set_markup("<small>" + str(scale.get_value()) + "\ndB</small>")
|
||||
@ -194,29 +210,37 @@
|
||||
+ grid.show()
|
||||
|
||||
- vbox2 = gtk.VBox(True, 1)
|
||||
- vbox2.set_border_width(10)
|
||||
+ if GTK_VERSION >= (3, 0, 0):
|
||||
+ vbox2 = gtk.Box(orientation=gtk.Orientation.VERTICAL, homogeneous=True, spacing=1)
|
||||
+ vbox2.props.margin = 10
|
||||
+ else:
|
||||
+ vbox2 = gtk.VBox(homogeneous=True, spacing=1)
|
||||
vbox2.set_border_width(10)
|
||||
+ vbox2.set_border_width(10)
|
||||
hbox1.add(vbox2)
|
||||
vbox2.show()
|
||||
@@ -482,7 +517,7 @@ class Equalizer:
|
||||
|
||||
presetslabel = gtk.Label()
|
||||
presetslabel.set_markup("<small>Preset:</small>")
|
||||
- vbox2.pack_start(presetslabel, False, False, 0)
|
||||
+ vbox2.add(presetslabel)
|
||||
presetslabel.show()
|
||||
|
||||
global presetsbox
|
||||
- presetsbox = gtk.combo_box_entry_new_text()
|
||||
- vbox2.pack_start(presetsbox, False, False, 0)
|
||||
+ presetsbox = gtk.ComboBoxText.new_with_entry()
|
||||
vbox2.pack_start(presetsbox, False, False, 0)
|
||||
+ vbox2.add(presetsbox)
|
||||
presetsbox.get_child().set_text(preset)
|
||||
for i in range(len(rawpresets)):
|
||||
@@ -490,38 +525,41 @@ class Equalizer:
|
||||
presetsbox.append_text(rawpresets[i])
|
||||
presetsbox.connect("changed", self.on_presetsbox, x)
|
||||
presetsbox.show()
|
||||
|
||||
- savepreset = gtk.Button("Save Preset")
|
||||
- vbox2.pack_start(savepreset, False, False, 0)
|
||||
+ savepreset = gtk.Button(label="Save Preset")
|
||||
vbox2.pack_start(savepreset, False, False, 0)
|
||||
+ vbox2.add(savepreset)
|
||||
savepreset.connect("clicked", self.on_savepreset)
|
||||
savepreset.show()
|
||||
|
||||
@ -227,7 +251,8 @@
|
||||
- eqenabled.unset_flags(gtk.CAN_FOCUS)
|
||||
+ eqenabled.set_can_focus(False)
|
||||
eqenabled.connect("clicked", self.on_eqenabled)
|
||||
vbox2.pack_start(eqenabled, False, False, 0)
|
||||
- vbox2.pack_start(eqenabled, False, False, 0)
|
||||
+ vbox2.add(eqenabled)
|
||||
eqenabled.show()
|
||||
|
||||
global keepsettings
|
||||
@ -237,26 +262,31 @@
|
||||
- keepsettings.unset_flags(gtk.CAN_FOCUS)
|
||||
+ keepsettings.set_can_focus(False)
|
||||
keepsettings.connect("clicked", self.on_keepsettings)
|
||||
vbox2.pack_start(keepsettings, False, False, 0)
|
||||
- vbox2.pack_start(keepsettings, False, False, 0)
|
||||
+ vbox2.add(keepsettings)
|
||||
keepsettings.show()
|
||||
|
||||
- applysettings = gtk.Button("Apply Settings")
|
||||
- vbox2.pack_start(applysettings, False, False, 0)
|
||||
+ applysettings = gtk.Button(label="Apply Settings")
|
||||
vbox2.pack_start(applysettings, False, False, 0)
|
||||
+ vbox2.add(applysettings)
|
||||
applysettings.connect("clicked", self.on_applysettings)
|
||||
applysettings.show()
|
||||
|
||||
- quitbutton = gtk.Button("Quit")
|
||||
- vbox2.pack_start(quitbutton, False, False, 0)
|
||||
+ quitbutton = gtk.Button(label="Quit")
|
||||
vbox2.pack_start(quitbutton, False, False, 0)
|
||||
+ vbox2.add(quitbutton)
|
||||
quitbutton.connect("clicked", lambda w: gtk.main_quit())
|
||||
quitbutton.show()
|
||||
|
||||
- separator = gtk.HSeparator()
|
||||
- vbox2.pack_start(separator, False, False, 0)
|
||||
+ if GTK_VERSION >= (3, 2, 0):
|
||||
+ separator = gtk.Separator(orientation=gtk.Orientation.HORIZONTAL)
|
||||
+ else:
|
||||
+ separator = gtk.HSeparator()
|
||||
vbox2.pack_start(separator, False, False, 0)
|
||||
+ vbox2.add(separator)
|
||||
separator.set_size_request(100, 10)
|
||||
#separator.show()
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 25 18:16:05 UTC 2018 - sor.alexei@meowr.ru
|
||||
|
||||
- Add 0000-fix-python-indent.patch: Fix Python indentation.
|
||||
- Add 0000-add-python3-compat.patch: Add Python3 compatibility.
|
||||
- Rebase and improve 0001-pulse-path.patch.
|
||||
- Squash 0007-remove-all-preamp.patch into 0002-remove-preamp.patch.
|
||||
- Rebase 0003-force-default-persistence-value.patch,
|
||||
|
@ -20,12 +20,12 @@ Name: pulseaudio-equalizer
|
||||
Version: 2.7.0.2
|
||||
Release: 0
|
||||
Summary: PulseAudio's LADSPA plugin graphical user interface
|
||||
License: GPL-3.0+
|
||||
License: GPL-3.0-or-later
|
||||
Group: Productivity/Multimedia/Sound/Mixers
|
||||
Url: https://ubuntuforums.org/showthread.php?t=1308838
|
||||
Source: https://launchpad.net/~nilarimogard/+archive/ubuntu/webupd8/+files/%{name}_%{version}.orig.tar.gz
|
||||
# PATCH-FIX-UPSTREAM 0000-fix-python-indent.patch sor.alexei@meowr.ru -- Fix Python indentation.
|
||||
Patch0: 0000-fix-python-indent.patch
|
||||
# PATCH-FIX-UPSTREAM 0000-add-python3-compat.patch sor.alexei@meowr.ru -- Add Python3 compatibility.
|
||||
Patch0: 0000-add-python3-compat.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-pulse-path.patch webupd8@gmail.com -- Update path to PulseAudio files to the new one.
|
||||
Patch1: 0001-pulse-path.patch
|
||||
# PATCH-FIX-UPSTREAM 0002-remove-preamp.patch -- Remove preamp.
|
||||
|
Loading…
Reference in New Issue
Block a user