[pitivi: 8/9] ui/timeline: fixing the sensitivity of the timeline actions.



commit 9b755cf08e4abb0cc6cc52a661570c4ca6111aa7
Author: Luis de Bethencourt <luis debethencourt com>
Date:   Fri Sep 3 10:59:11 2010 +0200

    ui/timeline: fixing the sensitivity of the timeline actions.

 pitivi/pixmaps/pitivi-relink-24.svg |  123 ++++++++++---------
 pitivi/pixmaps/pitivi-unlink-24.svg |  228 +++++++++++++++++++++++++----------
 pitivi/ui/timeline.py               |   14 ++-
 3 files changed, 245 insertions(+), 120 deletions(-)
---
diff --git a/pitivi/pixmaps/pitivi-relink-24.svg b/pitivi/pixmaps/pitivi-relink-24.svg
index 80791e3..d0cacd6 100644
--- a/pitivi/pixmaps/pitivi-relink-24.svg
+++ b/pitivi/pixmaps/pitivi-relink-24.svg
@@ -18,7 +18,10 @@
    sodipodi:modified="true"
    version="1.0"
    sodipodi:docname="pitivi-relink-24.svg"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/luisbg/development/pitivi/git/pitivi/pixmaps/pitivi-relink-24.png"
+   inkscape:export-xdpi="120.65119"
+   inkscape:export-ydpi="120.65119">
   <defs
      id="defs4">
     <linearGradient
@@ -534,7 +537,7 @@
        xlink:href="#linearGradient4381-8"
        id="linearGradient3884"
        gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.3751547,0,0,1.373626,-3.061905,-3.4748654)"
+       gradientTransform="matrix(1.402628,0,0,1.1521068,-3.2859015,-1.0301348)"
        x1="10.905469"
        y1="12.225972"
        x2="10.905469"
@@ -544,7 +547,7 @@
        xlink:href="#linearGradient3167-8"
        id="linearGradient3889"
        gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.3335171,0,0,1.3762049,-2.6357607,-3.5032668)"
+       gradientTransform="matrix(1.3091353,0,0,1.3673763,-2.6423298,-3.4621556)"
        x1="6.2321348"
        y1="14.247577"
        x2="6.2321348"
@@ -554,7 +557,7 @@
        xlink:href="#linearGradient3175-8"
        id="linearGradient3892"
        gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.3127106,0,0,1.3775105,-2.3234785,-3.5178664)"
+       gradientTransform="matrix(1.302842,0,0,1.3667591,-2.1422067,-3.5178284)"
        x1="15.838346"
        y1="14.284512"
        x2="15.838346"
@@ -567,9 +570,9 @@
      borderopacity="1.0"
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
-     inkscape:zoom="29.966286"
-     inkscape:cx="8.3355591"
-     inkscape:cy="12.718216"
+     inkscape:zoom="42.378728"
+     inkscape:cx="18.069319"
+     inkscape:cy="12.4858"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      width="48px"
@@ -587,7 +590,9 @@
        type="xygrid"
        id="grid2380"
        visible="true"
-       enabled="true" />
+       enabled="true"
+       empspacing="5"
+       snapvisiblegridlinesonly="true" />
   </sodipodi:namedview>
   <metadata
      id="metadata7">
@@ -597,6 +602,7 @@
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title></dc:title>
       </cc:Work>
     </rdf:RDF>
   </metadata>
@@ -604,54 +610,57 @@
      inkscape:label="Calque 1"
      inkscape:groupmode="layer"
      id="layer1">
-    <rect
-       style="fill:url(#linearGradient3892);fill-opacity:1;stroke:#4e9a06;stroke-width:1.02970886;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-       id="rect2964-6"
-       width="10.043802"
-       height="8.0537081"
-       x="13.445786"
-       y="7.5780807"
-       ry="2.5718317"
-       transform="matrix(0.99999985,5.4606899e-4,-5.164136e-4,0.99999987,0,0)"
-       rx="0" />
-    <rect
-       style="fill:url(#linearGradient3889);fill-opacity:1;stroke:#204a87;stroke-width:1.03734517;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-       id="rect2964"
-       width="10.202996"
-       height="8.0460739"
-       x="0.57339925"
-       y="7.5313344"
-       ry="2.5693941"
-       transform="matrix(0.99999986,5.3703935e-4,-5.2509645e-4,0.99999986,0,0)"
-       rx="0" />
-    <rect
-       style="fill:#ffffff;fill-opacity:1;stroke:#4e9a06;stroke-width:1.02970886;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-       id="rect2964-7-7"
-       width="6.4101086"
-       height="4.2564669"
-       x="15.213999"
-       y="9.4767036"
-       ry="1.3592395"
-       transform="matrix(0.99999985,5.4606899e-4,-5.164136e-4,0.99999987,0,0)"
-       rx="0" />
-    <rect
-       style="fill:#ffffff;fill-opacity:1;stroke:#204a87;stroke-width:1.03734517;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-       id="rect2964-7"
-       width="6.5117087"
-       height="4.2524328"
-       x="2.4438126"
-       y="9.4027386"
-       ry="1.357951"
-       transform="matrix(0.99999986,5.3703935e-4,-5.2509645e-4,0.99999986,0,0)"
-       rx="0" />
-    <rect
-       style="fill:url(#linearGradient3884);fill-opacity:1;stroke:#2e3436;stroke-width:1.05242825;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-       id="rect2964-2"
-       width="10.854786"
-       height="2.5278754"
-       x="6.5074105"
-       y="10.26525"
-       ry="0.80723941"
-       transform="matrix(0.99999986,5.1980269e-4,-5.4250864e-4,0.99999985,0,0)" />
+    <g
+       id="g3851">
+      <rect
+         rx="0"
+         transform="matrix(0.99999985,5.45911e-4,-5.1656305e-4,0.99999987,0,0)"
+         ry="2.5517588"
+         y="7.4915152"
+         x="13.508508"
+         height="7.9991751"
+         width="10.001671"
+         id="rect2964-6"
+         style="fill:url(#linearGradient3892);fill-opacity:1;stroke:#4e9a06;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <rect
+         rx="0"
+         transform="matrix(0.99999985,5.4353198e-4,-5.1882404e-4,0.99999987,0,0)"
+         ry="2.5529108"
+         y="7.5016565"
+         x="0.50815421"
+         height="7.9944663"
+         width="9.9997597"
+         id="rect2964"
+         style="fill:url(#linearGradient3889);fill-opacity:1;stroke:#204a87;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <rect
+         rx="0"
+         transform="matrix(0.99999985,5.4543096e-4,-5.1701767e-4,0.99999987,0,0)"
+         ry="1.2802691"
+         y="9.4990044"
+         x="15.507705"
+         height="3.9925082"
+         width="6.0030284"
+         id="rect2964-7-7"
+         style="fill:#ffffff;fill-opacity:1;stroke:#4e9a06;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <rect
+         rx="0"
+         transform="matrix(0.99999985,5.4891252e-4,-5.1373842e-4,0.99999987,0,0)"
+         ry="1.2731286"
+         y="9.5088358"
+         x="2.5163693"
+         height="3.9868016"
+         width="5.9895978"
+         id="rect2964-7"
+         style="fill:#ffffff;fill-opacity:1;stroke:#204a87;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <rect
+         transform="matrix(0.99999991,4.2743668e-4,-6.5974089e-4,0.99999978,0,0)"
+         ry="0.67705905"
+         y="10.494152"
+         x="6.5079651"
+         height="2.0034456"
+         width="11.004829"
+         id="rect2964-2"
+         style="fill:url(#linearGradient3884);fill-opacity:1;stroke:#2e3436;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
   </g>
 </svg>
diff --git a/pitivi/pixmaps/pitivi-unlink-24.svg b/pitivi/pixmaps/pitivi-unlink-24.svg
index b660285..0315444 100644
--- a/pitivi/pixmaps/pitivi-unlink-24.svg
+++ b/pitivi/pixmaps/pitivi-unlink-24.svg
@@ -549,6 +549,106 @@
        y1="14.284512"
        x2="15.838346"
        y2="7.6722026" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3167-8"
+       id="linearGradient3846"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3335171,0,0,1.3762049,-2.6357607,-3.5032668)"
+       x1="6.2321348"
+       y1="14.247577"
+       x2="6.2321348"
+       y2="7.6352677" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3175-8"
+       id="linearGradient3849"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3127106,0,0,1.3775105,-2.3234785,-3.5178664)"
+       x1="15.838346"
+       y1="14.284512"
+       x2="15.838346"
+       y2="7.6722026" />
+    <inkscape:perspective
+       id="perspective3866"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3175-8-5"
+       id="linearGradient3892-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.302842,0,0,1.3667591,-2.1422067,-3.5178284)"
+       x1="15.838346"
+       y1="14.284512"
+       x2="15.838346"
+       y2="7.6722026" />
+    <linearGradient
+       id="linearGradient3175-8-5">
+      <stop
+         style="stop-color:#73d216;stop-opacity:1;"
+         offset="0"
+         id="stop3177-3-7" />
+      <stop
+         style="stop-color:#73d216;stop-opacity:0.51127821;"
+         offset="1"
+         id="stop3179-8-6" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3167-8-3"
+       id="linearGradient3889-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3091353,0,0,1.3673763,-2.6423298,-3.4621556)"
+       x1="6.2321348"
+       y1="14.247577"
+       x2="6.2321348"
+       y2="7.6352677" />
+    <linearGradient
+       id="linearGradient3167-8-3">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop3169-8-5" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:0.51127821;"
+         offset="1"
+         id="stop3171-8-3" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4381-8-7"
+       id="linearGradient3884"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.402628,0,0,1.1521068,-3.2859015,-1.0301348)"
+       x1="10.905469"
+       y1="12.225972"
+       x2="10.905469"
+       y2="9.6199369" />
+    <linearGradient
+       id="linearGradient4381-8-7">
+      <stop
+         style="stop-color:#646662;stop-opacity:1;"
+         offset="0"
+         id="stop4383-8-3" />
+      <stop
+         style="stop-color:#3c3d3b;stop-opacity:1;"
+         offset="1"
+         id="stop4385-9-2" />
+    </linearGradient>
+    <linearGradient
+       y2="9.6199369"
+       x2="10.905469"
+       y1="12.225972"
+       x1="10.905469"
+       gradientTransform="matrix(1.402628,0,0,1.1521068,-3.2859015,-1.0301348)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3888"
+       xlink:href="#linearGradient4381-8-7"
+       inkscape:collect="always" />
   </defs>
   <sodipodi:namedview
      id="base"
@@ -557,9 +657,9 @@
      borderopacity="1.0"
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
-     inkscape:zoom="59.932572"
-     inkscape:cx="11.754106"
-     inkscape:cy="12.718216"
+     inkscape:zoom="29.966286"
+     inkscape:cx="12.100819"
+     inkscape:cy="13.06845"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      width="48px"
@@ -595,68 +695,72 @@
      inkscape:groupmode="layer"
      id="layer1">
     <g
-       id="g2941">
-      <rect
-         rx="0"
-         transform="matrix(0.99999985,5.4606899e-4,-5.164136e-4,0.99999987,0,0)"
-         ry="2.5718317"
-         y="7.5780807"
-         x="13.445786"
-         height="8.0537081"
-         width="10.043802"
-         id="rect2964-6"
-         style="fill:url(#linearGradient3892);fill-opacity:1;stroke:#4e9a06;stroke-width:1.02970886;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-      <rect
-         rx="0"
-         transform="matrix(0.99999986,5.3703935e-4,-5.2509645e-4,0.99999986,0,0)"
-         ry="2.5693941"
-         y="7.5313344"
-         x="0.57339925"
-         height="8.0460739"
-         width="10.202996"
-         id="rect2964"
-         style="fill:url(#linearGradient3889);fill-opacity:1;stroke:#204a87;stroke-width:1.03734517;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-      <rect
-         rx="0"
-         transform="matrix(0.99999985,5.4606899e-4,-5.164136e-4,0.99999987,0,0)"
-         ry="1.3592395"
-         y="9.4767036"
-         x="15.213999"
-         height="4.2564669"
-         width="6.4101086"
-         id="rect2964-7-7"
-         style="fill:#ffffff;fill-opacity:1;stroke:#4e9a06;stroke-width:1.02970886;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-      <rect
-         rx="0"
-         transform="matrix(0.99999986,5.3703935e-4,-5.2509645e-4,0.99999986,0,0)"
-         ry="1.357951"
-         y="9.4027386"
-         x="2.4438126"
-         height="4.2524328"
-         width="6.5117087"
-         id="rect2964-7"
-         style="fill:#ffffff;fill-opacity:1;stroke:#204a87;stroke-width:1.03734517;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-      <rect
-         transform="matrix(0.99999986,5.1980269e-4,-5.4250864e-4,0.99999985,0,0)"
-         ry="0.80723941"
-         y="10.26525"
-         x="6.5074105"
-         height="2.5278754"
-         width="10.854786"
-         id="rect2964-2"
-         style="fill:#ffffff;fill-opacity:1;stroke:#2e3436;stroke-width:1.05242824999999995;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+       id="g3935">
+      <g
+         id="g3851"
+         transform="translate(0.00236731,0.00242867)">
+        <rect
+           style="fill:url(#linearGradient3892-0);fill-opacity:1;stroke:#4e9a06;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect2964-6-8"
+           width="10.001671"
+           height="7.9991751"
+           x="13.508508"
+           y="7.4915152"
+           ry="2.5517588"
+           transform="matrix(0.99999985,5.45911e-4,-5.1656305e-4,0.99999987,0,0)"
+           rx="0" />
+        <rect
+           style="fill:url(#linearGradient3889-4);fill-opacity:1;stroke:#204a87;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect2964-3"
+           width="9.9997597"
+           height="7.9944663"
+           x="0.50815421"
+           y="7.5016565"
+           ry="2.5529108"
+           transform="matrix(0.99999985,5.4353198e-4,-5.1882404e-4,0.99999987,0,0)"
+           rx="0" />
+        <rect
+           style="fill:#ffffff;fill-opacity:1;stroke:#4e9a06;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect2964-7-7-0"
+           width="6.0030284"
+           height="3.9925082"
+           x="15.507705"
+           y="9.4990044"
+           ry="1.2802691"
+           transform="matrix(0.99999985,5.4543096e-4,-5.1701767e-4,0.99999987,0,0)"
+           rx="0" />
+        <rect
+           style="fill:#ffffff;fill-opacity:1;stroke:#204a87;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect2964-7-8"
+           width="5.9895978"
+           height="3.9868016"
+           x="2.5163693"
+           y="9.5088358"
+           ry="1.2731286"
+           transform="matrix(0.99999985,5.4891252e-4,-5.1373842e-4,0.99999987,0,0)"
+           rx="0" />
+        <rect
+           style="fill:url(#linearGradient3888);fill-opacity:1;stroke:#2e3436;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect2964-2-6"
+           width="11.004829"
+           height="2.0034456"
+           x="6.5079651"
+           y="10.494152"
+           ry="0.67705905"
+           transform="matrix(0.99999991,4.2743668e-4,-6.5974089e-4,0.99999978,0,0)" />
+      </g>
       <rect
-         inkscape:transform-center-y="0.0020366925"
-         inkscape:transform-center-x="-0.13721443"
-         transform="matrix(0.82328584,-0.56762701,0.82508747,0.56500501,0,0)"
+         inkscape:transform-center-y="0.0019434167"
+         inkscape:transform-center-x="-0.11976446"
+         transform="matrix(0.79841593,-0.60210631,0.80038266,0.59948945,0,0)"
          rx="0"
-         ry="1.6347809"
-         y="15.914885"
-         x="-4.507153"
-         height="3.2695618"
-         width="3.265569"
+         ry="1.4709437"
+         y="15.613731"
+         x="-3.5621581"
+         height="2.9418874"
+         width="2.9391017"
          id="rect3680"
-         style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.88213307;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+         style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.79383492;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
     </g>
   </g>
 </svg>
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 9861262..546eb01 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -304,16 +304,18 @@ class Timeline(gtk.Table, Loggable, Zoomable):
 
         actiongroup = gtk.ActionGroup("timelinepermanent")
         actiongroup.add_actions(actions)
-        actiongroup.add_actions(playhead_actions)
         self.ui_manager.insert_action_group(actiongroup, 0)
 
         actiongroup = gtk.ActionGroup("timelineselection")
         actiongroup.add_actions(selection_actions)
+        actiongroup.add_actions(playhead_actions)
         self.link_action = actiongroup.get_action("LinkObj")
         self.unlink_action = actiongroup.get_action("UnlinkObj")
         self.group_action = actiongroup.get_action("GroupObj")
         self.ungroup_action = actiongroup.get_action("UngroupObj")
         self.delete_action = actiongroup.get_action("DeleteObj")
+        self.split_action = actiongroup.get_action("Split")
+        self.keyframe_action = actiongroup.get_action("Keyframe")
 
         self.ui_manager.insert_action_group(actiongroup, -1)
 
@@ -563,6 +565,8 @@ class Timeline(gtk.Table, Loggable, Zoomable):
         unlink = False
         group = False
         ungroup = False
+        split = False
+        keyframe = False
         timeline_objects = {}
         if timeline.selection:
             delete = True
@@ -574,6 +578,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
             duration = None
             for obj in self.timeline.selection:
                 if obj.link:
+                    link = False
                     unlink = True
 
                 if len(obj.track_objects) > 1:
@@ -586,11 +591,18 @@ class Timeline(gtk.Table, Loggable, Zoomable):
                     start = obj.start
                     duration = obj.duration
 
+            split = True
+            keyframe = True
+
         self.delete_action.set_sensitive(delete)
         self.link_action.set_sensitive(link)
         self.unlink_action.set_sensitive(unlink)
         self.group_action.set_sensitive(group)
         self.ungroup_action.set_sensitive(ungroup)
+        self.split_action.set_sensitive(split)
+        self.keyframe_action.set_sensitive(keyframe)
+        print self.keyframe_action.get_sensitive()
+
 
 ## ToolBar callbacks
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]