summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Bellanger <keeguon@perception.(none)>2007-06-04 10:29:39 +0200
committerFelix Bellanger <keeguon@perception.(none)>2007-06-04 10:29:39 +0200
commite2af59e041e556ce5deaa2a05aa7cc5099270430 (patch)
treec1bc14231ca40520d8000ed42cb4784825dff71a
parent7bc5bafc7d413f28f1188ba3c0a9633d8f1aa53e (diff)
downloadcompiz-icon-e2af59e041e556ce5deaa2a05aa7cc5099270430.tar.gz
compiz-icon-e2af59e041e556ce5deaa2a05aa7cc5099270430.tar.bz2
Added the missing 'Metacity Theme' option.HEADmaster
Added borders to the compiz logo in the 'About Window'.
-rw-r--r--pixmaps/about.pngbin8556 -> 8590 bytes
-rwxr-xr-xsrc/compiz-icon.py27
2 files changed, 27 insertions, 0 deletions
diff --git a/pixmaps/about.png b/pixmaps/about.png
index dfbc5e3..cce8c4f 100644
--- a/pixmaps/about.png
+++ b/pixmaps/about.png
Binary files differ
diff --git a/src/compiz-icon.py b/src/compiz-icon.py
index b3b0908..e5bd00b 100755
--- a/src/compiz-icon.py
+++ b/src/compiz-icon.py
@@ -256,6 +256,17 @@ def gwd_menu_activate(widget):
Popen(['killall' , 'gtk-window-decorator' , 'kde-window-decorator' , 'emerald' , 'metacity' , 'kwin'])
Popen([set_active_decorator , decorator_replace])
+def use_metacity_activate(widget):
+ global metacity_theme_active
+ global use_metacity
+ is_metacity_theme = use_metacity_theme.get_active()
+ if is_metacity_theme == True:
+ use_metacity = gwd_backend.set_bool('/apps/gwd/use_metacity_theme', True)
+ metacity_theme_active = gwd_backend.get_bool('/apps/gwd/use_metacity_theme')
+ else:
+ use_metacity = gwd_backend.set_bool('/apps/gwd/use_metacity_theme', False)
+ metacity_theme_active = gwd_backend.get_bool('/apps/gwd/use_metacity_theme')
+
def about_window(widget):
# About Window
about_window = gtk.Window(type=gtk.WINDOW_TOPLEVEL)
@@ -374,6 +385,7 @@ for line in processes:
if 'gnome-session' in line.strip():
dcop = 0
gnome_session = 1
+ import gconf
# Get installed application
app_is_installed = []
@@ -385,6 +397,10 @@ for application in apps:
# Get default GL Decorator
default_gl_decorator()
+# Check if gwd runs with cairo or metacity
+gwd_backend = gconf.client_get_default()
+metacity_theme_active = gwd_backend.get_bool('/apps/gwd/use_metacity_theme')
+
# Variables
user = getoutput("whoami")
home_directory = '/home/' + user + '/.compiz-icon'
@@ -549,6 +565,17 @@ item.set_image(img_wd)
menu.append(item)
item = gtk.SeparatorMenuItem()
menu.append(item)
+# Decorator Option
+if installed('gtk-window-decorator') and installed('metacity'):
+ use_metacity_theme = gtk.CheckMenuItem(" Use Metacity Theme (GWD)")
+ if metacity_theme_active == True:
+ use_metacity_theme.set_active(True)
+ else:
+ use_metacity_theme.set_active(False)
+ use_metacity_theme.connect("activate", use_metacity_activate)
+ menu.append(use_metacity_theme)
+ item = gtk.SeparatorMenuItem()
+ menu.append(item)
# Compiz-Manager About and Quit
item = gtk.ImageMenuItem(stock_id=gtk.STOCK_ABOUT)
item.connect("activate", about_window)