Commit 76594efa authored by yatinmaan's avatar yatinmaan

clipproperties: Refactor UI

parent 0e641610
Pipeline #105809 failed with stage
in 12 minutes and 7 seconds
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="135.46667mm"
height="50.799999mm"
viewBox="0 0 135.46667 50.799999"
version="1.1"
id="svg8"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="white.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="-195.42856"
inkscape:cy="-49.714291"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1850"
inkscape:window-height="1016"
inkscape:window-x="70"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-53.974998,-87.903572)">
<path
id="path10"
d="M 185.20833,121.77024 H 58.208331 c -2.328333,0 -4.233333,1.905 -4.233333,4.23333 v 8.46667 c 0,2.32833 1.905,4.23333 4.233333,4.23333 H 185.20833 c 2.32834,0 4.23334,-1.905 4.23334,-4.23333 v -8.46667 c 0,-2.32833 -1.905,-4.23333 -4.23334,-4.23333 z m 0,-33.866668 H 58.208331 c -2.328333,0 -4.233333,1.905 -4.233333,4.233334 v 8.466664 c 0,2.32834 1.905,4.23334 4.233333,4.23334 H 185.20833 c 2.32834,0 4.23334,-1.905 4.23334,-4.23334 v -8.466664 c 0,-2.328334 -1.905,-4.233334 -4.23334,-4.233334 z"
inkscape:connector-curvature="0"
style="fill:#ffffff;stroke-width:0.26458332" />
</g>
</svg>
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="grip-lines" class="svg-inline--fa fa-grip-lines fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="white" d="M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"></path></svg>
<!--Derived work based on
Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
......
This diff is collapsed.
......@@ -695,7 +695,7 @@ PROPS_TO_IGNORE = ['name', 'qos', 'silent', 'message', 'parent']
class EffectsPropertiesManager(GObject.Object, Loggable):
"""Provides and caches UIs for editing effects.
"""Provides UIs for editing effects.
Attributes:
app (Pitivi): The app.
......@@ -732,7 +732,6 @@ class EffectsPropertiesManager(GObject.Object, Loggable):
def __init__(self, app):
GObject.Object.__init__(self)
Loggable.__init__(self)
self.cache_dict = {}
self.app = app
def getEffectConfigurationUI(self, effect):
......@@ -744,21 +743,15 @@ class EffectsPropertiesManager(GObject.Object, Loggable):
Returns:
GstElementSettingsWidget: A container for configuring the effect.
"""
if effect not in self.cache_dict:
effect_widget = GstElementSettingsWidget(effect, PROPS_TO_IGNORE)
widget = self.emit("create_widget", effect_widget, effect)
# The default handler of `create_widget` handles visibility
# itself and returns None
if widget is not None:
effect_widget.show_widget(widget)
self.cache_dict[effect] = effect_widget
self._connectAllWidgetCallbacks(effect_widget, effect)
return self.cache_dict[effect]
def cleanCache(self, effect):
if effect in self.cache_dict:
return self.cache_dict.pop(effect)
effect_widget = GstElementSettingsWidget(effect, PROPS_TO_IGNORE)
widget = self.emit("create_widget", effect_widget, effect)
# The default handler of `create_widget` handles visibility
# itself and returns None
if widget is not None:
effect_widget.show_widget(widget)
self._connectAllWidgetCallbacks(effect_widget, effect)
return effect_widget
def _postConfiguration(self, effect, effect_set_ui):
effect_name = effect.get_property("bin-description")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment