Merge lp:~townsend/compiz/fix-ccsm-int-fields into lp:compiz/0.9.11

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3857
Merged at revision: 3858
Proposed branch: lp:~townsend/compiz/fix-ccsm-int-fields
Merge into: lp:compiz/0.9.11
Diff against target: 53 lines (+9/-9)
2 files modified
compizconfig/ccsm/ccm/Settings.py (+2/-1)
debian/patches/ccsm_remove_redundant_sliders.patch (+7/-8)
To merge this branch: bzr merge lp:~townsend/compiz/fix-ccsm-int-fields
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+215449@code.launchpad.net

Commit message

Due to some change in Gtk SpinButton, setting the initial value in Adjustment does not work for integers, so now just explicitly set the value after the SpinButton is created.

Description of the change

Due to some change in Gtk SpinButton, setting the initial value in Adjustment does not work for integers, so now just explicitly set the value after the SpinButton is created.

Once this is applied, you should see any integer fields in CCSM now have the current value displayed.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Nice. LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'compizconfig/ccsm/ccm/Settings.py'
--- compizconfig/ccsm/ccm/Settings.py 2013-12-02 17:37:06 +0000
+++ compizconfig/ccsm/ccm/Settings.py 2014-04-11 15:58:55 +0000
@@ -439,8 +439,9 @@
439 self.Inc = info[2]439 self.Inc = info[2]
440 inc = self.Inc440 inc = self.Inc
441 self.NoneValue = info[0]441 self.NoneValue = info[0]
442 self.Adj = gtk.Adjustment(self.Get(), info[0], info[1], inc, inc*10)442 self.Adj = gtk.Adjustment(0, info[0], info[1], inc, inc*10)
443 self.Spin = gtk.SpinButton(self.Adj)443 self.Spin = gtk.SpinButton(self.Adj)
444 self.Spin.set_value(self.Get())
444445
445 self.Scale = gtk.HScale(self.Adj)446 self.Scale = gtk.HScale(self.Adj)
446447
447448
=== modified file 'debian/patches/ccsm_remove_redundant_sliders.patch'
--- debian/patches/ccsm_remove_redundant_sliders.patch 2012-06-19 11:22:48 +0000
+++ debian/patches/ccsm_remove_redundant_sliders.patch 2014-04-11 15:58:55 +0000
@@ -1,11 +1,10 @@
1=== modified file 'ccm/Settings.py'1=== modified file 'ccm/Settings.py'
2diff -Nur -x '*.orig' -x '*~' a/compizconfig/ccsm/ccm/Settings.py b/compizconfig/Settings.py2--- a/compizconfig/ccsm/ccm/Settings.py 2014-04-11 11:28:28.731117694 -0400
3--- a/compizconfig/ccsm/ccm/Settings.py 2011-08-22 13:38:46.000000000 +02003+++ b/compizconfig/ccsm/ccm/Settings.py 2014-04-11 11:29:59.443116911 -0400
4+++ b/compizconfig/ccsm/ccm/Settings.py 2012-02-01 12:44:46.254767412 +01004@@ -442,16 +442,10 @@
5@@ -441,16 +441,10 @@5 self.Adj = gtk.Adjustment(0, info[0], info[1], inc, inc*10)
6 self.NoneValue = info[0]
7 self.Adj = gtk.Adjustment(self.Get(), info[0], info[1], inc, inc*10)
8 self.Spin = gtk.SpinButton(self.Adj)6 self.Spin = gtk.SpinButton(self.Adj)
7 self.Spin.set_value(self.Get())
9-8-
10- self.Scale = gtk.HScale(self.Adj)9- self.Scale = gtk.HScale(self.Adj)
11-10-
@@ -21,7 +20,7 @@
21 20
22 def _Read(self):21 def _Read(self):
23 self.Adj.set_value(self.Get())22 self.Adj.set_value(self.Get())
24@@ -464,7 +458,6 @@23@@ -465,7 +459,6 @@
25 self.Inc = 124 self.Inc = 1
26 NumberSetting._Init(self)25 NumberSetting._Init(self)
27 self.Spin.set_digits(0)26 self.Spin.set_digits(0)
@@ -29,7 +28,7 @@
29 28
30 class FloatSetting(NumberSetting):29 class FloatSetting(NumberSetting):
31 30
32@@ -474,7 +467,6 @@31@@ -475,7 +468,6 @@
33 self.Inc = None32 self.Inc = None
34 NumberSetting._Init(self)33 NumberSetting._Init(self)
35 self.Spin.set_digits(4)34 self.Spin.set_digits(4)

Subscribers

People subscribed via source and target branches