[fusion-commits] A simple settings manager for CompizConfig: Changes to 'master' (4bfb4d9eef833c7a27e318e7ae837f88dd9af528)

marex at server.opencompositing.org marex at server.opencompositing.org
Mon May 12 18:56:46 CEST 2008


New commits:
commit 4bfb4d9eef833c7a27e318e7ae837f88dd9af528
Author: Patrick Niklaus <marex at opencompositing.org>
Date:   Mon May 12 18:56:42 2008 +0200

    Made focus animation configureable


 simple-ccsm.glade |   74 ++++++++++++++++++++++++++++++++++++++++------------
 simple-ccsm.in    |   20 ++++++++++----
 2 files changed, 71 insertions(+), 23 deletions(-)


Modified: fusion/compizconfig/simple-ccsm/simple-ccsm.glade
===================================================================
--- fusion/compizconfig/simple-ccsm/simple-ccsm.glade
+++ fusion/compizconfig/simple-ccsm/simple-ccsm.glade
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.2 on Mon May 12 17:57:20 2008 -->
+<!--Generated with glade3 3.4.2 on Mon May 12 18:42:26 2008 -->
 <glade-interface>
   <widget class="GtkWindow" id="mainWin">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -419,6 +419,46 @@
                     <property name="position">3</property>
                   </packing>
                 </child>
+                <child>
+                  <widget class="GtkFrame" id="focusFrame">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="focusAlignment">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="border_width">6</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkComboBox" id="focusAnimationBox">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <signal name="changed" handler="AnimationBoxChanged"/>
+                            <signal name="changed" handler="SetAnimationRating"/>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="focusLabel">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Focus window&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
               </widget>
               <packing>
                 <property name="position">1</property>
@@ -506,53 +546,53 @@
                                 <property name="column_spacing">12</property>
                                 <property name="row_spacing">6</property>
                                 <child>
-                                  <widget class="GtkHScale" id="cubeOpacity">
+                                  <widget class="GtkComboBox" id="deformationChooser">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
                                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="adjustment">100 0 100 5 5 0</property>
-                                    <property name="digits">0</property>
-                                    <property name="value_pos">GTK_POS_RIGHT</property>
-                                    <signal name="value_changed" handler="OpacityChanged"/>
+                                    <signal name="changed" handler="DeformationBoxChanged"/>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label3">
+                                  <widget class="GtkLabel" id="label1">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Opacity:</property>
+                                    <property name="label" translatable="yes">Deformation:</property>
                                   </widget>
                                   <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label1">
+                                  <widget class="GtkLabel" id="label3">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Deformation:</property>
+                                    <property name="label" translatable="yes">Opacity:</property>
                                   </widget>
                                   <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkComboBox" id="deformationChooser">
+                                  <widget class="GtkHScale" id="cubeOpacity">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
                                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="changed" handler="DeformationBoxChanged"/>
+                                    <property name="adjustment">100 0 100 5 5 0</property>
+                                    <property name="digits">0</property>
+                                    <property name="value_pos">GTK_POS_RIGHT</property>
+                                    <signal name="value_changed" handler="OpacityChanged"/>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
                                   </packing>
                                 </child>
                               </widget>

Modified: fusion/compizconfig/simple-ccsm/simple-ccsm.in
===================================================================
--- fusion/compizconfig/simple-ccsm/simple-ccsm.in
+++ fusion/compizconfig/simple-ccsm/simple-ccsm.in
@@ -65,7 +65,10 @@ MinimizeEffectNames = [\
 'Domino', 'Dream', 'Explode', 'Fade', 'Fold', 'Glide 1', 'Glide 2',
 'Horizontal Folds', 'Leaf Spread','Magic Lamp', 'Razr', 'Sidekick',
 'Skewer', 'Zoom'
+]
 
+FocusEffectNames = [\
+'None', 'Dodge', 'Fade', 'Wave'
 ]
 
 # 0 to 5 stars
@@ -91,7 +94,8 @@ AnimationRatings = {\
 'Skewer': 3,
 'Vacuum': 5,
 'Wave': 4,
-'Zoom': 2
+'Zoom': 2,
+'Dodge': 5
 }
 
 gtk.glade.bindtextdomain("simple-ccsm", "@prefix@/share/locale")
@@ -124,7 +128,8 @@ Pages = {
 AnimationSettings = {
 'openAnimationBox': "open_effects",
 'closeAnimationBox': "close_effects",
-'minimizeAnimationBox': "minimize_effects"
+'minimizeAnimationBox': "minimize_effects",
+'focusAnimationBox': "focus_effects"
 }
 
 Tooltips = gtk.Tooltips()
@@ -408,7 +413,8 @@ class ProfilePage:
         names = {
             'close_effects': CloseOpenEffectNames,
             'open_effects': CloseOpenEffectNames,
-            'minimize_effects': MinimizeEffectNames
+            'minimize_effects': MinimizeEffectNames,
+            'focus_effects': FocusEffectNames
         }
         plugin = self.Context.Plugins['animation']
 
@@ -427,7 +433,7 @@ class ProfilePage:
         if not plugin.Enabled:
             rating = 0.0
 
-        rating = rating / 3.0
+        rating = rating / len(AnimationSettings)
 
         self.AnimationStars.set_value(rating)
 
@@ -465,7 +471,8 @@ class AnimationPage:
         active = widget.get_active()
         plugin = self.Context.Plugins['animation']
         EnablePlugin(plugin, active)
-        for name in ("openAnimationBox", "closeAnimationBox", "minimizeAnimationBox"):
+        for prefix in ("open", "close", "minimize", "focus"):
+            name = prefix + "AnimationBox"
             widget = self.GladeXML.get_widget(name)
             widget.set_sensitive(active)
     
@@ -498,7 +505,8 @@ class AnimationPage:
             active = plugin.Enabled
 
         widget.set_active(active)
-        for name in ("openAnimationBox", "closeAnimationBox", "minimizeAnimationBox"):
+        for prefix in ("open", "close", "minimize", "focus"):
+            name = prefix + "AnimationBox"
             widget = self.GladeXML.get_widget(name)
             widget.set_sensitive(active)
     


More information about the commits mailing list