diff -u compizconfig-settings-manager-0.9.5.92/debian/changelog compizconfig-settings-manager-0.9.5.92/debian/changelog --- compizconfig-settings-manager-0.9.5.92/debian/changelog +++ compizconfig-settings-manager-0.9.5.92/debian/changelog @@ -1,3 +1,14 @@ +compizconfig-settings-manager (0.9.5.92-0ubuntu3) precise; urgency=low + + [ Andrew Starr-Bochicchio ] + * debian/patches/02_add_first_run_warning.patch: + - Add a first run dialog providing a user warning. + * debian/patches/03_disable_unity_checkbox.patch: + - If in a Unity session, don't allow the user to disable + Unity from main view. + + -- Didier Roche Wed, 15 Feb 2012 12:25:07 +0100 + compizconfig-settings-manager (0.9.5.92-0ubuntu2) precise; urgency=low [Alan Bell] only in patch2: unchanged: --- compizconfig-settings-manager-0.9.5.92.orig/debian/patches/02_add_first_run_warning.patch +++ compizconfig-settings-manager-0.9.5.92/debian/patches/02_add_first_run_warning.patch @@ -0,0 +1,105 @@ +Description: Add a first run dialog providing a user warning. +Author: Andrew Starr-Bochicchio + +=== modified file 'ccm/Widgets.py' +diff -Nur -x '*.orig' -x '*~' ccsm-warning//ccm/Constants.py.in ccsm-warning.new//ccm/Constants.py.in +--- ccsm-warning//ccm/Constants.py.in 2012-02-01 13:30:19.131478000 -0500 ++++ ccsm-warning.new//ccm/Constants.py.in 2012-02-13 18:26:19.699626332 -0500 +@@ -23,6 +23,7 @@ + import pygtk + import gtk + import gtk.gdk ++import os + + # Current Screen + # +@@ -66,6 +67,11 @@ + DataDir = "@prefix@/share" + IconDir = DataDir+"/ccsm/icons" + PixmapDir = DataDir+"/ccsm/images" ++ConfigHome = os.getenv("XDG_CONFIG_HOME") ++if not ConfigHome: ++ ConfigHome = os.path.join(os.getenv("HOME"), ".config") ++ConfDir = os.path.join(ConfigHome, "compiz-1/compizconfig/") ++ConfFile = os.path.join(ConfDir, "firstrun") + + # Version + # +diff -Nur -x '*.orig' -x '*~' ccsm-warning//ccm/Widgets.py ccsm-warning.new//ccm/Widgets.py +--- ccsm-warning//ccm/Widgets.py 2012-02-02 22:43:52.623481000 -0500 ++++ ccsm-warning.new//ccm/Widgets.py 2012-02-13 18:25:55.659409730 -0500 +@@ -1371,6 +1371,42 @@ + self.set_transient_for (parent) + self.connect_after ("response", lambda *args: self.destroy ()) + ++# First run dialog providing a user warning. ++# ++class FirstRun (gtk.MessageDialog): ++ '''First run dialog providing a user warning.''' ++ ++ def __init__(self, parent): ++ gtk.MessageDialog.__init__ (self, parent, ++ gtk.DIALOG_DESTROY_WITH_PARENT, ++ gtk.MESSAGE_WARNING, ++ gtk.BUTTONS_OK) ++ self.set_position (gtk.WIN_POS_CENTER) ++ title = _("CCSM is an advanced tool. Use with caution.") ++ self.set_markup("%s" % title) ++ message = _("This tool allows you to deeply configure Compiz's settings. Some options may be incompatible with each other. Unless used with care, it is possible to be left with an unusable desktop.") ++ self.format_secondary_markup(message) ++ check_button = gtk.CheckButton(label=_("Show this warning next time?")) ++ check_button.set_active(True) ++ self.vbox.pack_start(check_button, True, True, 2) ++ check_button.show() ++ check_button.connect("toggled", self.callback, "check button 1") ++ self.set_transient_for(parent) ++ self.set_modal(True) ++ self.show_all() ++ self.connect("response", lambda *args: self.destroy ()) ++ ++ def callback(self, widget, data=None): ++ if widget.get_active() == True: ++ if os.path.isfile(ConfFile): ++ os.remove(ConfFile) ++ else: ++ if not os.path.exists(ConfDir): ++ os.mkdir(ConfDir) ++ if os.path.isdir(ConfDir): ++ f = open(ConfFile, "w") ++ f.close() ++ + # Plugin Button + # + class PluginButton (gtk.HBox): +diff -Nur -x '*.orig' -x '*~' ccsm-warning//ccsm ccsm-warning.new//ccsm +--- ccsm-warning//ccsm 2012-02-02 16:42:01.161305000 -0500 ++++ ccsm-warning.new//ccsm 2012-02-13 18:25:55.663409766 -0500 +@@ -31,6 +31,7 @@ + pygtk.require('2.0') + import gtk + import sys ++import os + + def try_register_dbus (): + '''Return instance of dbus control object on success, None on failure''' +@@ -92,7 +93,7 @@ + import compizconfig + import ccm + from ccm.Utils import GlobalUpdater +-from ccm.Constants import Version ++from ccm.Constants import Version, ConfFile + + plugin = None + category = None +@@ -124,4 +125,11 @@ + idle = ccm.IdleSettingsParser(context, mainWin) + mainWin.show_all() + ++# Check if we should show the first run warning dialog. ++if os.path.isfile(ConfFile): ++ pass ++else: ++ warning = ccm.FirstRun(mainWin) ++ warning.show_all() ++ + gtk.main() only in patch2: unchanged: --- compizconfig-settings-manager-0.9.5.92.orig/debian/patches/03_disable_unity_checkbox.patch +++ compizconfig-settings-manager-0.9.5.92/debian/patches/03_disable_unity_checkbox.patch @@ -0,0 +1,20 @@ +Description: If in a Unity session, don't allow the user to disable Unity from main view. +Author: Andrew Starr-Bochicchio + +=== modified file 'ccm/Widgets.py' +diff -Nur -x '*.orig' -x '*~' ccsm-checkbox//ccm/Widgets.py ccsm-checkbox.new//ccm/Widgets.py +--- ccsm-checkbox//ccm/Widgets.py 2012-02-02 19:05:53.690931000 -0500 ++++ ccsm-checkbox.new//ccm/Widgets.py 2012-02-13 18:42:47.612544975 -0500 +@@ -1401,7 +1401,11 @@ + button.set_tooltip_text (plugin.LongDesc) + button.add (box) + +- if plugin.Name != 'core': ++ blacklist_plugins = ['core'] ++ if os.getenv('DESKTOP_SESSION') == 'ubuntu': ++ blacklist_plugins.append('unityshell') ++ ++ if plugin.Name not in blacklist_plugins: + enable = gtk.CheckButton () + enable.set_tooltip_text(_("Enable %s") % plugin.ShortDesc) + enable.set_active (plugin.Enabled)