home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / DistUpgrade / theme-switch-helper.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  1.3 KB  |  35 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import gconf
  5. import subprocess
  6. from optparse import OptionParser
  7. parser = OptionParser()
  8. parser.add_option('-g', '--get', action = 'store_true', dest = 'get', help = 'get the current gnome/gtk theme settings')
  9. parser.add_option('-s', '--set', dest = 'set', help = 'set the current gnome/gtk theme settings')
  10. parser.add_option('-d', '--defaults', dest = 'defaults', action = 'store_true', help = 'set gtk/gnome settings to save defaults')
  11. (options, args) = parser.parse_args()
  12. client = gconf.client_get_default()
  13. if options.get:
  14.     gtk_theme = client.get_string('/desktop/gnome/interface/gtk_theme')
  15.     icon_theme = client.get_string('/desktop/gnome/interface/icon_theme')
  16.     metacity_theme = client.get_string('/apps/metacity/general/theme')
  17.     print gtk_theme
  18.     print icon_theme
  19.     print metacity_theme
  20.  
  21. if options.defaults:
  22.     client.set_string('/desktop/gnome/interface/gtk_theme', 'Human')
  23.     client.set_string('/desktop/gnome/interface/icon_theme', 'Human')
  24.     client.set_string('/apps/metacity/general/theme', 'Human')
  25.  
  26. if options.set:
  27.     (gtk_theme, icon_theme, metacity_theme) = open(options.set).read().strip().split('\n')
  28.     print gtk_theme
  29.     print icon_theme
  30.     print metacity_theme
  31.     client.set_string('/desktop/gnome/interface/gtk_theme', gtk_theme)
  32.     client.set_string('/desktop/gnome/interface/icon_theme', icon_theme)
  33.     client.set_string('/apps/metacity/general/theme', metacity_theme)
  34.  
  35.