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

Subscribers

People subscribed via source and target branches