author | Erkin Bahceci <> | 03-29 19:30:38 (GMT) |
---|---|---|
committer | Erkin Bahceci <> | 03-29 19:30:38 (GMT) |
commit | aa6559724b6b37c7a50ad89f08fe6f8412bce27a (patch) | |
tree | 8a6f880035061466752eb2949c89957061adf1b5 | |
parent | 63fb415ab7239e20429cf25788c94baf39540a7a (diff) | |
download | ccsm-master.tar.gz ccsm-master.tar.bz2 |
Track compizconfig changes.master
-rw-r--r-- | ccm/Conflicts.py | 3 | ||||
-rw-r--r-- | ccm/Utils.py | 20 | ||||
-rwxr-xr-x | ccsm | 3 |
3 files changed, 10 insertions, 16 deletions
diff --git a/ccm/Conflicts.py b/ccm/Conflicts.py index 7fb709d..5f6f01f 100644 --- a/ccm/Conflicts.py +++ b/ccm/Conflicts.py @@ -88,8 +88,7 @@ class ActionConflict (Conflict): if not settings: for plugin in self.Setting.Plugin.Context.Plugins.values (): if plugin.Enabled: - pluginActions = GetSettings(plugin, displayOnly=True, - types=self.ActionTypes) + pluginActions = GetSettings(plugin, types=self.ActionTypes) if len(setting.Info) and setting.Info[0] and plugin is not setting.Plugin: settings.extend(ExcludeInternal(pluginActions)) diff --git a/ccm/Utils.py b/ccm/Utils.py index 16f8e83..d7fc256 100644 --- a/ccm/Utils.py +++ b/ccm/Utils.py @@ -58,6 +58,10 @@ def getScreens(): screens.append(i) return screens +def getDefaultScreen(): + display = gtk.gdk.display_get_default() + return display.get_default_screen().get_number() + def protect_markup_dict (dict_): return dict((k, protect_pango_markup (v)) for (k, v) in dict_.iteritems()) @@ -383,7 +387,7 @@ PluginKeyFunc = operator.attrgetter('ShortDesc') def HasOnlyType (settings, stype): return settings and not [s for s in settings if s.Type != stype] -def GetSettings(group, displayOnly=False, types=None): +def GetSettings(group, types=None): def TypeFilter (settings, types): for setting in settings: @@ -391,19 +395,11 @@ def GetSettings(group, displayOnly=False, types=None): yield setting if types: - display = TypeFilter(group.Display.itervalues(), types) - else: - display = group.Display.itervalues() - - if displayOnly: - return display - - if types: - screen = TypeFilter(group.Screens[CurrentScreenNum].itervalues(), types) + screen = TypeFilter(group.Screen.itervalues(), types) else: - screen = group.Screens[CurrentScreenNum].itervalues() + screen = group.Screen.itervalues() - return itertools.chain(screen, display) + return screen # Support python 2.4 try: @@ -122,8 +122,7 @@ if options.plugin: if options.category: category = options.category -screens = ccm.getScreens() -context = compizconfig.Context(screens) +context = compizconfig.Context(ccm.getDefaultScreen()) GlobalUpdater.SetContext (context) mainWin = ccm.MainWin(context, plugin, category) if dbusObj is not None: |