home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import gconf
- import subprocess
- from optparse import OptionParser
- parser = OptionParser()
- parser.add_option('-g', '--get', action = 'store_true', dest = 'get', help = 'get the current gnome/gtk theme settings')
- parser.add_option('-s', '--set', dest = 'set', help = 'set the current gnome/gtk theme settings')
- parser.add_option('-d', '--defaults', dest = 'defaults', action = 'store_true', help = 'set gtk/gnome settings to save defaults')
- (options, args) = parser.parse_args()
- client = gconf.client_get_default()
- if options.get:
- gtk_theme = client.get_string('/desktop/gnome/interface/gtk_theme')
- icon_theme = client.get_string('/desktop/gnome/interface/icon_theme')
- metacity_theme = client.get_string('/apps/metacity/general/theme')
- print gtk_theme
- print icon_theme
- print metacity_theme
-
- if options.defaults:
- client.set_string('/desktop/gnome/interface/gtk_theme', 'Human')
- client.set_string('/desktop/gnome/interface/icon_theme', 'Human')
- client.set_string('/apps/metacity/general/theme', 'Human')
-
- if options.set:
- (gtk_theme, icon_theme, metacity_theme) = open(options.set).read().strip().split('\n')
- print gtk_theme
- print icon_theme
- print metacity_theme
- client.set_string('/desktop/gnome/interface/gtk_theme', gtk_theme)
- client.set_string('/desktop/gnome/interface/icon_theme', icon_theme)
- client.set_string('/apps/metacity/general/theme', metacity_theme)
-
-