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
1=== modified file 'compizconfig/ccsm/ccm/Settings.py'
2--- compizconfig/ccsm/ccm/Settings.py 2013-12-02 17:37:06 +0000
3+++ compizconfig/ccsm/ccm/Settings.py 2014-04-11 15:58:55 +0000
4@@ -439,8 +439,9 @@
5 self.Inc = info[2]
6 inc = self.Inc
7 self.NoneValue = info[0]
8- self.Adj = gtk.Adjustment(self.Get(), info[0], info[1], inc, inc*10)
9+ self.Adj = gtk.Adjustment(0, info[0], info[1], inc, inc*10)
10 self.Spin = gtk.SpinButton(self.Adj)
11+ self.Spin.set_value(self.Get())
12
13 self.Scale = gtk.HScale(self.Adj)
14
15
16=== modified file 'debian/patches/ccsm_remove_redundant_sliders.patch'
17--- debian/patches/ccsm_remove_redundant_sliders.patch 2012-06-19 11:22:48 +0000
18+++ debian/patches/ccsm_remove_redundant_sliders.patch 2014-04-11 15:58:55 +0000
19@@ -1,11 +1,10 @@
20 === modified file 'ccm/Settings.py'
21-diff -Nur -x '*.orig' -x '*~' a/compizconfig/ccsm/ccm/Settings.py b/compizconfig/Settings.py
22---- a/compizconfig/ccsm/ccm/Settings.py 2011-08-22 13:38:46.000000000 +0200
23-+++ b/compizconfig/ccsm/ccm/Settings.py 2012-02-01 12:44:46.254767412 +0100
24-@@ -441,16 +441,10 @@
25- self.NoneValue = info[0]
26- self.Adj = gtk.Adjustment(self.Get(), info[0], info[1], inc, inc*10)
27+--- a/compizconfig/ccsm/ccm/Settings.py 2014-04-11 11:28:28.731117694 -0400
28++++ b/compizconfig/ccsm/ccm/Settings.py 2014-04-11 11:29:59.443116911 -0400
29+@@ -442,16 +442,10 @@
30+ self.Adj = gtk.Adjustment(0, info[0], info[1], inc, inc*10)
31 self.Spin = gtk.SpinButton(self.Adj)
32+ self.Spin.set_value(self.Get())
33 -
34 - self.Scale = gtk.HScale(self.Adj)
35 -
36@@ -21,7 +20,7 @@
37
38 def _Read(self):
39 self.Adj.set_value(self.Get())
40-@@ -464,7 +458,6 @@
41+@@ -465,7 +459,6 @@
42 self.Inc = 1
43 NumberSetting._Init(self)
44 self.Spin.set_digits(0)
45@@ -29,7 +28,7 @@
46
47 class FloatSetting(NumberSetting):
48
49-@@ -474,7 +467,6 @@
50+@@ -475,7 +468,6 @@
51 self.Inc = None
52 NumberSetting._Init(self)
53 self.Spin.set_digits(4)

Subscribers

People subscribed via source and target branches