Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class SelectedToEnd(aeidon.EnumerationItem):
pass
class Current(aeidon.EnumerationItem):
pass
class All(aeidon.EnumerationItem):
pass
targets = aeidon.Enumeration()
targets.SELECTED = Selected()
targets.SELECTED_TO_END = SelectedToEnd()
targets.CURRENT = Current()
targets.ALL = All()
class BothHoriz(aeidon.EnumerationItem):
value = Gtk.ToolbarStyle.BOTH_HORIZ
class Icons(aeidon.EnumerationItem):
value = Gtk.ToolbarStyle.ICONS
class Text(aeidon.EnumerationItem):
value = Gtk.ToolbarStyle.TEXT
toolbar_styles = aeidon.Enumeration()
toolbar_styles.ICONS = Icons()
toolbar_styles.TEXT = Text()
toolbar_styles.BOTH = Both()
toolbar_styles.BOTH_HORIZ = BothHoriz()
from gi.repository import Gtk
__all__ = ("orientation",)
class Horizontal(aeidon.EnumerationItem):
value = Gtk.Orientation.HORIZONTAL
class Vertical(aeidon.EnumerationItem):
value = Gtk.Orientation.VERTICAL
orientation = aeidon.Enumeration()
orientation.HORIZONTAL = Horizontal()
orientation.VERTICAL = Vertical()
command = " ".join((_get_vlc_executable(),
"$VIDEOFILE",
":start-time=$SECONDS",
":sub-file=$SUBFILE",))
command_utf_8 = " ".join((_get_vlc_executable(),
"$VIDEOFILE",
":start-time=$SECONDS",
":sub-file=$SUBFILE",
":subsdec-encoding=UTF-8",))
label = "VLC"
players = aeidon.Enumeration()
players.MPLAYER = MPlayer()
players.VLC = VLC()
from aeidon.i18n import _
__all__ = ("align_methods",)
class Number(aeidon.EnumerationItem):
label = _("Subtitle number")
class Position(aeidon.EnumerationItem):
label = _("Subtitle position")
align_methods = aeidon.Enumeration()
align_methods.NUMBER = Number()
align_methods.POSITION = Position()
class LengthUnitEm(aeidon.EnumerationItem):
label = _("ems")
length_units = aeidon.Enumeration()
length_units.CHAR = LengthUnitChar()
length_units.EM = LengthUnitEm()
class OrientationHorizontal(aeidon.EnumerationItem):
value = Gtk.Orientation.HORIZONTAL
class OrientationVertical(aeidon.EnumerationItem):
value = Gtk.Orientation.VERTICAL
orientation = aeidon.Enumeration()
orientation.HORIZONTAL = OrientationHorizontal()
orientation.VERTICAL = OrientationVertical()
class TargetSelected(aeidon.EnumerationItem): pass
class TargetSelectedToEnd(aeidon.EnumerationItem): pass
class TargetCurrent(aeidon.EnumerationItem): pass
class TargetAll(aeidon.EnumerationItem): pass
targets = aeidon.Enumeration()
targets.SELECTED = TargetSelected()
targets.SELECTED_TO_END = TargetSelectedToEnd()
targets.CURRENT = TargetCurrent()
targets.ALL = TargetAll()
def _reset_columns(self):
"""Recreate the columns enumeration and set all items to ``None``."""
self.columns = aeidon.Enumeration()
self.columns.NUMBER = None
self.columns.START = None
self.columns.END = None
self.columns.DURATION = None
self.columns.MAIN_TEXT = None
self.columns.TRAN_TEXT = None
class Time(aeidon.EnumerationItem):
pass
class Frame(aeidon.EnumerationItem):
pass
class Seconds(aeidon.EnumerationItem):
pass
modes = aeidon.Enumeration()
modes.TIME = Time()
modes.FRAME = Frame()
modes.SECONDS = Seconds()
label = _("Dur.")
tooltip = _("Duration")
class FieldMainText(aeidon.EnumerationItem):
is_position = False
is_text = True
label = _("Text")
tooltip = _("Text")
class FieldTranslationText(aeidon.EnumerationItem):
is_position = False
is_text = True
label = _("Translation")
tooltip = _("Translation")
fields = aeidon.Enumeration()
fields.NUMBER = FieldNumber()
fields.START = FieldStart()
fields.END = FieldEnd()
fields.DURATION = FieldDuration()
fields.MAIN_TEXT = FieldMainText()
fields.TRAN_TEXT = FieldTranslationText()
class LengthUnitChar(aeidon.EnumerationItem):
label = _("characters")
class LengthUnitEm(aeidon.EnumerationItem):
label = _("ems")
length_units = aeidon.Enumeration()
length_units.CHAR = LengthUnitChar()
def __get_enumerations(self):
"""Return a dictionary mapping enumeration names to values."""
enumerations = {} # name: value
for name in dir(aeidon):
value = getattr(aeidon, name)
if isinstance(value, aeidon.Enumeration):
enumerations[name] = value
for name in dir(gaupol):
value = getattr(gaupol, name)
if isinstance(value, aeidon.Enumeration):
enumerations[name] = value
return enumerations