Merge lp:~andrewsomething/ubuntu/precise/compizconfig-settings-manager/disable_unity_checkbox into lp:ubuntu/precise/compizconfig-settings-manager

Proposed by Andrew Starr-Bochicchio
Status: Merged
Merge reported by: Andrew Starr-Bochicchio
Merged at revision: not available
Proposed branch: lp:~andrewsomething/ubuntu/precise/compizconfig-settings-manager/disable_unity_checkbox
Merge into: lp:ubuntu/precise/compizconfig-settings-manager
Diff against target: 60 lines (+48/-0)
2 files modified
debian/changelog (+8/-0)
debian/patches/03_disable_unity_checkbox.patch (+40/-0)
To merge this branch: bzr merge lp:~andrewsomething/ubuntu/precise/compizconfig-settings-manager/disable_unity_checkbox
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Needs Fixing
Ubuntu branches Pending
Review via email: mp+91375@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

I have upload rights for this package, but I'd appreciate a code review.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Looks good! Thanks for your work here :)

If I were you, I would try that code to make something a little bit more beautiful:
backlist_plugins = ['core']
if os.getenv('DESKTOP_SESSION') == "ubuntu":
    backlist_plugin.append('unityshell')

if plugin.Name not in backlist_plugins:
  … keep there the other code.

That would end in a way smaller diff, wdyt?
Oh btw, the packaging branch for ccsm is https://code.launchpad.net/~compiz/compizconfig-settings-manager/ubuntu as pointed by vcs-bzr, can you please propose a merge here and subscribe me?

Thanks a lot :)

review: Needs Fixing
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

On Mon, Feb 13, 2012 at 10:47 AM, Didier Roche <email address hidden> wrote:
> Review: Needs Fixing
>
> Looks good! Thanks for your work here :)
>
> If I were you, I would try that code to make something a little bit more beautiful:
> backlist_plugins = ['core']
> if os.getenv('DESKTOP_SESSION') == "ubuntu":
>    backlist_plugin.append('unityshell')
>
> if plugin.Name not in backlist_plugins:
>  … keep there the other code.
>
> That would end in a way smaller diff, wdyt?

That is much nicer. =)

> Oh btw, the packaging branch for ccsm is https://code.launchpad.net/~compiz/compizconfig-settings-manager/ubuntu as pointed by vcs-bzr, can you please propose a merge here and subscribe me?

Re-targeting both merge proposals.

Thanks,

-- Andrew Starr-Bochicchio

   Ubuntu Developer <https://launchpad.net/~andrewsomething>
   Debian Maintainer
<http://qa.debian.org/developer.php?login=a.starr.b%40gmail.com>
   PGP/GPG Key ID: D53FDCB1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-02-01 12:50:42 +0000
3+++ debian/changelog 2012-02-03 00:13:25 +0000
4@@ -1,3 +1,11 @@
5+compizconfig-settings-manager (0.9.5.92-0ubuntu3) precise; urgency=low
6+
7+ * debian/patches/03_disable_unity_checkbox.patch:
8+ - If in a Unity session, don't allow the user to disable
9+ Unity from main view.
10+
11+ -- Andrew Starr-Bochicchio <a.starr.b@gmail.com> Thu, 02 Feb 2012 19:07:59 -0500
12+
13 compizconfig-settings-manager (0.9.5.92-0ubuntu2) precise; urgency=low
14
15 [Alan Bell]
16
17=== added file 'debian/patches/03_disable_unity_checkbox.patch'
18--- debian/patches/03_disable_unity_checkbox.patch 1970-01-01 00:00:00 +0000
19+++ debian/patches/03_disable_unity_checkbox.patch 2012-02-03 00:13:25 +0000
20@@ -0,0 +1,40 @@
21+Description: If in a Unity session, don't allow the user to disable Unity from main view.
22+Author: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
23+
24+=== modified file 'ccm/Widgets.py'
25+--- ccm/Widgets.py 2011-02-24 17:39:03 +0000
26++++ ccm/Widgets.py 2012-02-03 00:00:30 +0000
27+@@ -1401,14 +1401,24 @@
28+ button.set_tooltip_text (plugin.LongDesc)
29+ button.add (box)
30+
31+- if plugin.Name != 'core':
32+- enable = gtk.CheckButton ()
33+- enable.set_tooltip_text(_("Enable %s") % plugin.ShortDesc)
34+- enable.set_active (plugin.Enabled)
35+- enable.set_sensitive (plugin.Context.AutoSort)
36+- self._toggled_handler = enable.connect ("toggled", self.enable_plugin)
37+- PluginSetting (plugin, enable, self._toggled_handler)
38+- self.pack_start (enable, False, False)
39++ if os.getenv('DESKTOP_SESSION') == "ubuntu":
40++ if plugin.Name != 'core' and plugin.Name != 'unityshell':
41++ enable = gtk.CheckButton ()
42++ enable.set_tooltip_text(_("Enable %s") % plugin.ShortDesc)
43++ enable.set_active (plugin.Enabled)
44++ enable.set_sensitive (plugin.Context.AutoSort)
45++ self._toggled_handler = enable.connect ("toggled", self.enable_plugin)
46++ PluginSetting (plugin, enable, self._toggled_handler)
47++ self.pack_start (enable, False, False)
48++ else:
49++ if plugin.Name != 'core':
50++ enable = gtk.CheckButton ()
51++ enable.set_tooltip_text(_("Enable %s") % plugin.ShortDesc)
52++ enable.set_active (plugin.Enabled)
53++ enable.set_sensitive (plugin.Context.AutoSort)
54++ self._toggled_handler = enable.connect ("toggled", self.enable_plugin)
55++ PluginSetting (plugin, enable, self._toggled_handler)
56++ self.pack_start (enable, False, False)
57+ self.pack_start (button, False, False)
58+
59+ self.set_size_request (220, -1)
60+

Subscribers

People subscribed via source and target branches