[pitivi] titleeditor: Stop using deprecated alignment enums



commit 929bf58ad506676a545a86a97ce2d68cf983ec52
Author: p-murli <sidharthmu1 gmail com>
Date:   Fri Mar 22 17:02:11 2019 +0000

    titleeditor: Stop using deprecated alignment enums
    
    Fixes #2286

 pitivi/titleeditor.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/titleeditor.py b/pitivi/titleeditor.py
index c8f9381e..aaca7c4f 100644
--- a/pitivi/titleeditor.py
+++ b/pitivi/titleeditor.py
@@ -49,8 +49,8 @@ PreferencesDialog.addNumericPreference('titleClipLength',
 FOREGROUND_DEFAULT_COLOR = 0xFFFFFFFF  # White
 BACKGROUND_DEFAULT_COLOR = 0x00000000  # Transparent
 DEFAULT_FONT_DESCRIPTION = "Sans 36"
-DEFAULT_VALIGNMENT = GES.TextVAlign.ABSOLUTE.real
-DEFAULT_HALIGNMENT = GES.TextHAlign.ABSOLUTE.real
+DEFAULT_VALIGNMENT = "absolute"
+DEFAULT_HALIGNMENT = "absolute"
 
 
 class TitleEditor(Loggable):
@@ -180,14 +180,13 @@ class TitleEditor(Loggable):
         for name, obj in list(self.settings.items()):
             if obj == updated_obj:
                 if name == "valignment":
-                    value = getattr(GES.TextVAlign, obj.get_active_id().upper())
+                    value = obj.get_active_id()
                     self._updateWidgetsVisibility()
                 elif name == "halignment":
-                    value = getattr(GES.TextHAlign, obj.get_active_id().upper())
+                    value = obj.get_active_id()
                     self._updateWidgetsVisibility()
                 else:
                     value = obj.get_value()
-
                 self._setChildProperty(name, value)
                 return
 


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