summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <Sam@ACER-SUSE.SUSE>2008-01-06 02:00:50 +0900
committerSam Spilsbury <Sam@ACER-SUSE.SUSE>2008-01-06 02:00:50 +0900
commitaf6950c1708f5b21e51d0e7bd6deacf3bbbe7964 (patch)
tree23c2617849a65ff9c26bd1e8fdfe6c4fbf527eb1
parent3151167a597675dc88ad2f8f368832a788c1ce86 (diff)
downloadcompiz-tools-af6950c1708f5b21e51d0e7bd6deacf3bbbe7964.tar.gz
compiz-tools-af6950c1708f5b21e51d0e7bd6deacf3bbbe7964.tar.bz2
* Add Compiz-Settings-List, a tool that allows you to see all compiz settings at a glance, for development
-rw-r--r--Compiz-Settings-List/compiz-settings-list.glade346
-rwxr-xr-xCompiz-Settings-List/compiz-settings-list.in154
-rw-r--r--Compiz-Settings-List/compiz-settings-list.in~157
-rw-r--r--Compiz-Settings-List/livedesktop-settings~157
-rw-r--r--Compiz-Settings-List/setup.py36
5 files changed, 850 insertions, 0 deletions
diff --git a/Compiz-Settings-List/compiz-settings-list.glade b/Compiz-Settings-List/compiz-settings-list.glade
new file mode 100644
index 0000000..9fb5bad
--- /dev/null
+++ b/Compiz-Settings-List/compiz-settings-list.glade
@@ -0,0 +1,346 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="MainWin">
+ <property name="width_request">700</property>
+ <property name="height_request">500</property>
+ <property name="title" translatable="yes">Compiz Settings List</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">700</property>
+ <property name="default_height">500</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="OkButton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox15">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox16">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">This is a list of all settings availiable in Compiz Fusion, listed by thier
+short description, short name (Used for referencing the setting)
+and their type.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox19">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="settingsView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">True</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox17">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox18">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Search</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="filterBox">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">‚óŹ</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkWindow" id="waitDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Please Wait....</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox9">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox20">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox21">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="icon_name">gtk-dialog-info</property>
+ <property name="pixel_size">50</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Please wait a moment while settings initialize</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/Compiz-Settings-List/compiz-settings-list.in b/Compiz-Settings-List/compiz-settings-list.in
new file mode 100755
index 0000000..ab76ca3
--- /dev/null
+++ b/Compiz-Settings-List/compiz-settings-list.in
@@ -0,0 +1,154 @@
+#!/usr/bin/env python
+
+# This program is used list Compiz Settings and Types for Developers
+
+import pygtk
+import gtk
+import gtk.glade
+import os
+import gobject
+import subprocess
+import compizconfig
+import time
+import threading, thread
+from LiveDesktopSettings.execute import run
+
+settingsStore = gtk.TreeStore(
+ str, # Short Description
+ str, # Setting Name
+ str, # Display or Screen
+ str, # Setting Type
+ object, # Setting Object
+ )
+
+class MainWin:
+
+ def __init__(self):
+
+ self.GladeXML = gtk.glade.XML('@prefix@/CompizSettingsList/compiz-settings-list.glade')
+ self.Window = self.GladeXML.get_widget('MainWin')
+ self.Window.connect('delete-event', self.Quit)
+
+ self.alreadyCreated = False;
+
+ self.context = compizconfig.Context()
+
+ self.filterBox = self.GladeXML.get_widget('filterBox')
+ self.filterBox.connect('changed', self.filterChanged)
+
+ self.RefreshSettings(None)
+
+ def filterChanged(self, widget):
+ filterText = widget.get_text()
+ self.RefreshSettings(filterText)
+
+ def RefreshSettings(self, match):
+
+ ## Screensaver Setting
+
+ self.settingsView = self.GladeXML.get_widget('settingsView')
+
+ settingsStore.clear()
+ Categories = []
+
+
+ # From Setting up, sort things out
+ for category in self.context.Categories:
+ if category is '':
+ category = 'Unknown'
+ Categories.append([category, []])
+ for pluginName, plugin in self.context.Plugins.items():
+ pluginInfo = [pluginName, plugin, plugin.Category]
+ pluginSettings = []
+ for settingName, setting in plugin.Screens[0].items():
+ settingShortDesc = setting.ShortDesc
+ settingInfo = [setting, settingName, settingShortDesc, "Screen", setting.Type]
+ pluginSettings.append(settingInfo)
+ for settingName, setting in plugin.Display.items():
+ settingShortDesc = setting.ShortDesc
+ settingInfo = [setting, settingName, settingShortDesc, "Display", setting.Type]
+ pluginSettings.append(settingInfo)
+ for categoryInfo in Categories:
+ if pluginInfo[2] == '':
+ pluginInfo[2] = 'Unknown'
+ if pluginInfo[2] == categoryInfo[0]:
+ categoryInfo[1].append([pluginInfo, pluginSettings])
+ for categoryInfo in Categories:
+ print "Category is ", categoryInfo[0]
+ for plugin in categoryInfo[1]:
+ print " *Plugin is ", plugin[0][1].Name
+ print " ** Settings **"
+ for settingInfo in plugin[1]:
+ print " ***Setting Name is ", settingInfo[1]
+ print " ***Setting Short Description is ", settingInfo[2]
+
+ # Append everything to the treestore
+ for categoryInfo in Categories:
+ categoryIter = settingsStore.append(None, [categoryInfo[0], '', '', '', None])
+ for plugin in categoryInfo[1]:
+ categorySubIter = settingsStore.append(categoryIter, [plugin[0][1].ShortDesc, '', '', '', None])
+ for settingInfo in plugin[1]:
+ if match != None:
+ if match in settingInfo[2]:
+ settingsStore.append(categorySubIter,
+ [settingInfo[2],
+ settingInfo[1],
+ settingInfo[3],
+ settingInfo[4],
+ settingInfo[0],
+ ]
+ )
+ else:
+ settingsStore.append(categorySubIter,
+ [settingInfo[2],
+ settingInfo[1],
+ settingInfo[3],
+ settingInfo[4],
+ settingInfo[0],
+ ]
+ )
+
+ self.settingsView.set_model(settingsStore)
+ if self.alreadyCreated is False:
+ # Short Description, Name that user sees
+ self.descColumn = gtk.TreeViewColumn('Name')
+ self.settingsView.append_column(self.descColumn)
+ self.descCell = gtk.CellRendererText()
+ self.descColumn.pack_start(self.descCell, True)
+ self.descColumn.add_attribute(self.descCell, 'text', 0)
+
+ # Actual Name
+ self.nameColumn = gtk.TreeViewColumn('Setting Name')
+ self.settingsView.append_column(self.nameColumn)
+ self.nameCell = gtk.CellRendererText()
+ self.nameColumn.pack_start(self.nameCell, True)
+ self.nameColumn.add_attribute(self.nameCell, 'text', 1)
+
+ # Display or screen
+ self.dsColumn = gtk.TreeViewColumn('Type')
+ self.settingsView.append_column(self.dsColumn)
+ self.dsCell = gtk.CellRendererText()
+ self.dsColumn.pack_start(self.dsCell, True)
+ self.dsColumn.add_attribute(self.dsCell, 'text', 2)
+
+ # Setting type
+ self.typeColumn = gtk.TreeViewColumn('Setting Type')
+ self.settingsView.append_column(self.typeColumn)
+ self.typeCell = gtk.CellRendererText()
+ self.typeColumn.pack_start(self.typeCell, True)
+ self.typeColumn.add_attribute(self.typeCell, 'text', 3)
+
+ self.alreadyCreated = True
+ pass
+
+ # Show the window
+ self.Wait.hide_all()
+ self.Window.show_all()
+
+ def Quit(self, signal, nothing='Nothing'):
+ gtk.main_quit()
+
+
+if __name__ == '__main__':
+ MainWin()
+ gtk.main()
diff --git a/Compiz-Settings-List/compiz-settings-list.in~ b/Compiz-Settings-List/compiz-settings-list.in~
new file mode 100644
index 0000000..0095d1a
--- /dev/null
+++ b/Compiz-Settings-List/compiz-settings-list.in~
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+
+# This program is used to configure XWinWrap via a GUI
+
+import pygtk
+import gtk
+import gtk.glade
+import os
+import gobject
+import subprocess
+import compizconfig
+import time
+import threading, thread
+from LiveDesktopSettings.execute import run
+
+settingsStore = gtk.TreeStore(
+ str, # Short Description
+ str, # Setting Name
+ str, # Display or Screen
+ str, # Setting Type
+ object, # Setting Object
+ )
+
+class MainWin:
+
+ def __init__(self):
+
+ self.GladeXML = gtk.glade.XML('xwinwrapgui.glade')
+ self.Window = self.GladeXML.get_widget('MainWin')
+ self.Window.connect('delete-event', self.Quit)
+ self.Window.set_icon_from_file('/usr/local/share/icons/hicolor/scalable/apps/livedesktop-settings.svg')
+ self.Wait = self.GladeXML.get_widget('waitDialog')
+ self.Wait.show_all()
+
+ self.alreadyCreated = False;
+
+ self.context = compizconfig.Context()
+
+ self.filterBox = self.GladeXML.get_widget('filterBox')
+ self.filterBox.connect('changed', self.filterChanged)
+
+ self.RefreshSettings(None)
+
+ def filterChanged(self, widget):
+ filterText = widget.get_text()
+ self.RefreshSettings(filterText)
+
+ def RefreshSettings(self, match):
+
+ ## Screensaver Setting
+
+ self.settingsView = self.GladeXML.get_widget('settingsView')
+
+ settingsStore.clear()
+ Categories = []
+
+
+ # From Setting up, sort things out
+ for category in self.context.Categories:
+ if category is '':
+ category = 'Unknown'
+ Categories.append([category, []])
+ for pluginName, plugin in self.context.Plugins.items():
+ pluginInfo = [pluginName, plugin, plugin.Category]
+ pluginSettings = []
+ for settingName, setting in plugin.Screens[0].items():
+ settingShortDesc = setting.ShortDesc
+ settingInfo = [setting, settingName, settingShortDesc, "Screen", setting.Type]
+ pluginSettings.append(settingInfo)
+ for settingName, setting in plugin.Display.items():
+ settingShortDesc = setting.ShortDesc
+ settingInfo = [setting, settingName, settingShortDesc, "Display", setting.Type]
+ pluginSettings.append(settingInfo)
+ for categoryInfo in Categories:
+ if pluginInfo[2] == '':
+ pluginInfo[2] = 'Unknown'
+ if pluginInfo[2] == categoryInfo[0]:
+ categoryInfo[1].append([pluginInfo, pluginSettings])
+ for categoryInfo in Categories:
+ print "Category is ", categoryInfo[0]
+ for plugin in categoryInfo[1]:
+ print " *Plugin is ", plugin[0][1].Name
+ print " ** Settings **"
+ for settingInfo in plugin[1]:
+ print " ***Setting Name is ", settingInfo[1]
+ print " ***Setting Short Description is ", settingInfo[2]
+
+ # Append everything to the treestore
+ for categoryInfo in Categories:
+ categoryIter = settingsStore.append(None, [categoryInfo[0], '', '', '', None])
+ for plugin in categoryInfo[1]:
+ categorySubIter = settingsStore.append(categoryIter, [plugin[0][1].ShortDesc, '', '', '', None])
+ for settingInfo in plugin[1]:
+ if match != None:
+ if match in settingInfo[2]:
+ settingsStore.append(categorySubIter,
+ [settingInfo[2],
+ settingInfo[1],
+ settingInfo[3],
+ settingInfo[4],
+ settingInfo[0],
+ ]
+ )
+ else:
+ settingsStore.append(categorySubIter,
+ [settingInfo[2],
+ settingInfo[1],
+ settingInfo[3],
+ settingInfo[4],
+ settingInfo[0],
+ ]
+ )
+
+ self.settingsView.set_model(settingsStore)
+ if self.alreadyCreated is False:
+ # Short Description, Name that user sees
+ self.descColumn = gtk.TreeViewColumn('Name')
+ self.settingsView.append_column(self.descColumn)
+ self.descCell = gtk.CellRendererText()
+ self.descColumn.pack_start(self.descCell, True)
+ self.descColumn.add_attribute(self.descCell, 'text', 0)
+
+ # Actual Name
+ self.nameColumn = gtk.TreeViewColumn('Setting Name')
+ self.settingsView.append_column(self.nameColumn)
+ self.nameCell = gtk.CellRendererText()
+ self.nameColumn.pack_start(self.nameCell, True)
+ self.nameColumn.add_attribute(self.nameCell, 'text', 1)
+
+ # Display or screen
+ self.dsColumn = gtk.TreeViewColumn('Type')
+ self.settingsView.append_column(self.dsColumn)
+ self.dsCell = gtk.CellRendererText()
+ self.dsColumn.pack_start(self.dsCell, True)
+ self.dsColumn.add_attribute(self.dsCell, 'text', 2)
+
+ # Setting type
+ self.typeColumn = gtk.TreeViewColumn('Setting Type')
+ self.settingsView.append_column(self.typeColumn)
+ self.typeCell = gtk.CellRendererText()
+ self.typeColumn.pack_start(self.typeCell, True)
+ self.typeColumn.add_attribute(self.typeCell, 'text', 3)
+
+ self.alreadyCreated = True
+ pass
+
+ # Show the window
+ self.Wait.hide_all()
+ self.Window.show_all()
+
+ def Quit(self, signal, nothing='Nothing'):
+ gtk.main_quit()
+
+
+if __name__ == '__main__':
+ MainWin()
+ gtk.main()
diff --git a/Compiz-Settings-List/livedesktop-settings~ b/Compiz-Settings-List/livedesktop-settings~
new file mode 100644
index 0000000..e846c39
--- /dev/null
+++ b/Compiz-Settings-List/livedesktop-settings~
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+
+# This program is used to configure XWinWrap via a GUI
+
+import pygtk
+import gtk
+import gtk.glade
+import os
+import gobject
+import subprocess
+import compizconfig
+import time
+import threading, thread
+from LiveDesktopSettings.execute import run
+
+settingsStore = gtk.TreeStore(
+ str, # Short Description
+ str, # Setting Name
+ str, # Display or Screen
+ str, # Setting Type
+ object, # Setting Object
+ )
+
+class MainWin:
+
+ def __init__(self):
+
+ self.GladeXML = gtk.glade.XML('xwinwrapgui.glade')
+ self.Window = self.GladeXML.get_widget('MainWin')
+ self.Window.connect('delete-event', self.Quit)
+ self.Window.set_icon_from_file('/usr/local/share/icons/hicolor/scalable/apps/livedesktop-settings.svg')
+ self.Wait = self.GladeXML.get_widget('waitDialog')
+ self.Wait.show_all()
+
+ self.alreadyCreated = False;
+
+ self.context = compizconfig.Context()
+
+ self.filterBox = self.GladeXML.get_widget('filterBox')
+ self.filterBox.connect('changed', self.filterChanged)
+
+ self.RefreshSettings(None)
+
+ def filterChanged(self, widget):
+ filterText = widget.get_text()
+ self.RefreshSettings(filterText)
+
+ def RefreshSettings(self, match):
+
+ ## Screensaver Setting
+
+ self.settingsView = self.GladeXML.get_widget('settingsView')
+
+ settingsStore.clear()
+ Categories = []
+
+
+ # From Setting up, sort things out
+ for category in self.context.Categories:
+ if category is '':
+ category = 'Unknown'
+ Categories.append([category, []])
+ for pluginName, plugin in self.context.Plugins.items():
+ pluginInfo = [pluginName, plugin, plugin.Category]
+ pluginSettings = []
+ for settingName, setting in plugin.Screens[0].items():
+ settingShortDesc = setting.ShortDesc
+ settingInfo = [setting, settingName, settingShortDesc, "Screen", setting.Type]
+ pluginSettings.append(settingInfo)
+ for settingName, setting in plugin.Display.items():
+ settingShortDesc = setting.ShortDesc
+ settingInfo = [setting, settingName, settingShortDesc, "Display", setting.Type]
+ pluginSettings.append(settingInfo)
+ for categoryInfo in Categories:
+ if pluginInfo[2] == '':
+ pluginInfo[2] = 'Unknown'
+ if pluginInfo[2] == categoryInfo[0]:
+ categoryInfo[1].append([pluginInfo, pluginSettings])
+ for categoryInfo in Categories:
+ print "Category is ", categoryInfo[0]
+ for plugin in categoryInfo[1]:
+ print " *Plugin is ", plugin[0][1].Name
+ print " ** Settings **"
+ for settingInfo in plugin[1]:
+ print " ***Setting Name is ", settingInfo[1]
+ print " ***Setting Short Description is ", settingInfo[2]
+
+ # Append everything to the treestore
+ for categoryInfo in Categories:
+ categoryIter = settingsStore.append(None, [categoryInfo[0], '', '', '', None])
+ for plugin in categoryInfo[1]:
+ categorySubIter = settingsStore.append(categoryIter, [plugin[0][1].ShortDesc, '', '', '', None])
+ for settingInfo in plugin[1]:
+ if match != None:
+ if match in settingInfo[2]:
+ settingsStore.append(categorySubIter,
+ [settingInfo[2],
+ settingInfo[1],
+ settingInfo[3],
+ settingInfo[4],
+ settingInfo[0],
+ ]
+ )
+ else:
+ settingsStore.append(categorySubIter,
+ [settingInfo[2],
+ settingInfo[1],
+ settingInfo[3],
+ settingInfo[4],
+ settingInfo[0],
+ ]
+ )
+
+ self.settingsView.set_model(settingsStore)
+ if self.alreadyCreated is not False:
+ # Short Description, Name that user sees
+ self.descColumn = gtk.TreeViewColumn('Name')
+ self.settingsView.append_column(self.descColumn)
+ self.descCell = gtk.CellRendererText()
+ self.descColumn.pack_start(self.descCell, True)
+ self.descColumn.add_attribute(self.descCell, 'text', 0)
+
+ # Actual Name
+ self.nameColumn = gtk.TreeViewColumn('Setting Name')
+ self.settingsView.append_column(self.nameColumn)
+ self.nameCell = gtk.CellRendererText()
+ self.nameColumn.pack_start(self.nameCell, True)
+ self.nameColumn.add_attribute(self.nameCell, 'text', 1)
+
+ # Display or screen
+ self.dsColumn = gtk.TreeViewColumn('Type')
+ self.settingsView.append_column(self.dsColumn)
+ self.dsCell = gtk.CellRendererText()
+ self.dsColumn.pack_start(self.dsCell, True)
+ self.dsColumn.add_attribute(self.dsCell, 'text', 2)
+
+ # Setting type
+ self.typeColumn = gtk.TreeViewColumn('Setting Type')
+ self.settingsView.append_column(self.typeColumn)
+ self.typeCell = gtk.CellRendererText()
+ self.typeColumn.pack_start(self.typeCell, True)
+ self.typeColumn.add_attribute(self.typeCell, 'text', 3)
+
+ self.alreadyCreated = True
+ pass
+
+ # Show the window
+ self.Wait.hide_all()
+ self.Window.show_all()
+
+ def Quit(self, signal, nothing='Nothing'):
+ gtk.main_quit()
+
+
+if __name__ == '__main__':
+ MainWin()
+ gtk.main()
diff --git a/Compiz-Settings-List/setup.py b/Compiz-Settings-List/setup.py
new file mode 100644
index 0000000..dd6833f
--- /dev/null
+++ b/Compiz-Settings-List/setup.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+from distutils.core import setup
+import os
+
+INSTALL_PREFIX = '/usr/local'
+
+prefix = INSTALL_PREFIX
+
+# Stolen from simple-ccsm's setup.py
+f = open (os.path.join ("compiz-settings-list.in"), "rt")
+data = f.read ()
+f.close ()
+data = data.replace ("@prefix@", prefix)
+f = open (os.path.join ("compiz-settings-list"), "wt")
+f.write (data)
+f.close ()
+
+os.system("chmod +x compiz-settings-list")
+setup(name='Compiz-Settings-List',
+ version='0.1',
+ description='List all Compiz Fusion Settings - For Development',
+ author='Sam Spilsbury',
+ author_email='SmSpillaz@gmail.com',
+ url='http://www.compiz-fusion.org',
+ data_files = [
+ (INSTALL_PREFIX + '/bin',
+ ['compiz-settings-list']),
+ (INSTALL_PREFIX + '/share/CompizSettingsList',
+ ['compiz-settings-list.glade']),
+ ]
+)
+
+# Practically stolen from CCSM's setup.py
+gtk_update_icon_cache = '''gtk-update-icon-cache -f -t %s/share/icons/hicolor''' % prefix
+os.system(gtk_update_icon_cache)