[pitivi/1.0] Use GObject.ParamFlags instead of deprecated constants
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/1.0] Use GObject.ParamFlags instead of deprecated constants
- Date: Wed, 29 Aug 2018 13:40:48 +0000 (UTC)
commit 723fd4c47818386f3445a9e9589296cd84897be1
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sun Aug 26 23:36:03 2018 +0200
Use GObject.ParamFlags instead of deprecated constants
pitivi/timeline/previewers.py | 6 +++---
pitivi/undo/timeline.py | 2 +-
pitivi/utils/widgets.py | 3 +--
3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index edced463..e2312a52 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -101,7 +101,7 @@ class ThumbnailBin(PreviewerBin):
"uri of the media file",
"A URI",
"",
- GObject.PARAM_READWRITE),
+ GObject.ParamFlags.READWRITE),
}
def __init__(self, bin_desc="videoconvert ! videorate ! "
@@ -178,11 +178,11 @@ class WaveformPreviewer(PreviewerBin):
"uri of the media file",
"A URI",
"",
- GObject.PARAM_READWRITE),
+ GObject.ParamFlags.READWRITE),
"duration": (GObject.TYPE_UINT64,
"Duration",
"Duration",
- 0, GLib.MAXUINT64 - 1, 0, GObject.PARAM_READWRITE)
+ 0, GLib.MAXUINT64 - 1, 0, GObject.ParamFlags.READWRITE)
}
def __init__(self):
diff --git a/pitivi/undo/timeline.py b/pitivi/undo/timeline.py
index 390ddcde..62cb2d08 100644
--- a/pitivi/undo/timeline.py
+++ b/pitivi/undo/timeline.py
@@ -165,7 +165,7 @@ class TrackElementAction(UndoableAction):
self.track_element = track_element
self.track_element_props = []
for prop in self.track_element.list_children_properties():
- if not prop.flags & GObject.PARAM_WRITABLE or \
+ if not prop.flags & GObject.ParamFlags.WRITABLE or \
prop.name in PROPS_TO_IGNORE:
continue
prop_name = child_property_name(prop)
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index 46e83655..f98b3d25 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -755,7 +755,6 @@ class GstElementSettingsWidget(Gtk.Box, Loggable):
if src_caps_fields:
srccaps = self.element.get_static_pad('src').get_pad_template().caps
- vals = {}
for field, prefered_value in src_caps_fields.items():
gvalue = srccaps[0][field]
if isinstance(gvalue, Gst.ValueList) and isinstance(prefered_value, Gst.ValueList):
@@ -953,7 +952,7 @@ class GstElementSettingsWidget(Gtk.Box, Loggable):
"""Gets a name/value dict with the properties."""
values = {}
for prop, widget in self.properties.items():
- if not prop.flags & GObject.PARAM_WRITABLE:
+ if not prop.flags & GObject.ParamFlags.WRITABLE:
continue
value = widget.getWidgetValue()
if value is not None and (value != prop.default_value or with_default):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]