def do_activate(self): api = self.object self.app = api.app try: self.app.settings.addConfigSection("console") except ConfigError: pass try: self.app.settings.addConfigOption(attrname="consoleColor", section="console", key="console-color", notify=True, default=Console.DEFAULT_COLOR) except ConfigError: pass try: self.app.settings.addConfigOption( attrname="consoleErrorColor", section="console", key="console-error-color", notify=True, default=Console.DEFAULT_STDERR_COLOR) except ConfigError: pass try: self.app.settings.addConfigOption( attrname="consoleOutputColor", section="console", key="console-output-color", notify=True, default=Console.DEFAULT_STDOUT_COLOR) except ConfigError: pass try: self.app.settings.addConfigOption( attrname="consoleFont", section="console", key="console-font", notify=True, default=Console.DEFAULT_FONT.to_string()) except ConfigError: pass self.app.settings.reload_attribute_from_file("console", "consoleColor") self.app.settings.reload_attribute_from_file("console", "consoleErrorColor") self.app.settings.reload_attribute_from_file("console", "consoleOutputColor") self.app.settings.reload_attribute_from_file("console", "consoleFont") PreferencesDialog.add_section("console", _("Console")) PreferencesDialog.addColorPreference(attrname="consoleColor", label=_("Color"), description=None, section="console") PreferencesDialog.addColorPreference( attrname="consoleErrorColor", # Translators: The color of the content from stderr. label=_("Standard error color"), description=None, section="console") PreferencesDialog.addColorPreference( attrname="consoleOutputColor", # Translators: The color of the content from stdout. label=_("Standard output color"), description=None, section="console") PreferencesDialog.addFontPreference(attrname="consoleFont", label=_("Font"), description=None, section="console") self._setup_dialog() self.add_menu_item() self.menu_item.show()
def do_activate(self): api = self.object self.app = api.app self.app.settings.addConfigSection("console") self.app.settings.addConfigOption(attrname="consoleColor", section="console", key="console-color", notify=True, default=Console.DEFAULT_COLOR) self.app.settings.addConfigOption(attrname="consoleErrorColor", section="console", key="console-error-color", notify=True, default=Console.DEFAULT_STDERR_COLOR) self.app.settings.addConfigOption(attrname="consoleOutputColor", section="console", key="console-output-color", notify=True, default=Console.DEFAULT_STDOUT_COLOR) self.app.settings.addConfigOption( attrname="consoleFont", section="console", key="console-font", notify=True, default=Console.DEFAULT_FONT.to_string()) self.app.settings.reload_attribute_from_file("console", "consoleColor") self.app.settings.reload_attribute_from_file("console", "consoleErrorColor") self.app.settings.reload_attribute_from_file("console", "consoleOutputColor") self.app.settings.reload_attribute_from_file("console", "consoleFont") PreferencesDialog.add_section("console", _("Console")) PreferencesDialog.addColorPreference(attrname="consoleColor", label=_("Color"), description=None, section="console") PreferencesDialog.addColorPreference( attrname="consoleErrorColor", # Translators: The color of the content from stderr. label=_("Standard error color"), description=None, section="console") PreferencesDialog.addColorPreference( attrname="consoleOutputColor", # Translators: The color of the content from stdout. label=_("Standard output color"), description=None, section="console") PreferencesDialog.addFontPreference(attrname="consoleFont", label=_("Font"), description=None, section="console") open_action = Gio.SimpleAction.new("open_console", None) open_action.connect("activate", self.__menu_item_activate_cb) self.app.add_action(open_action) self.app.shortcuts.add("app.open_console", ["<Primary>d"], _("Developer Console")) self._setup_dialog() self.add_menu_item() self.menu_item.show()
os.path.join(configure.get_pixmap_dir(), "trimbar-normal.png")) TRIMBAR_PIXBUF_FOCUS = GdkPixbuf.Pixbuf.new_from_file( os.path.join(configure.get_pixmap_dir(), "trimbar-focused.png")) NAME_HOFFSET = 10 NAME_VOFFSET = 5 NAME_PADDING = 2 NAME_PADDING2X = 2 * NAME_PADDING GlobalSettings.addConfigOption('videoClipBg', section='user-interface', key='videoclip-background', default=993737707, notify=True) PreferencesDialog.addColorPreference('videoClipBg', section=_("Appearance"), label=_("Color for video clips"), description=_("The background color for clips in video tracks.")) GlobalSettings.addConfigOption('audioClipBg', section='user-interface', key='audioclip-background', default=996806336, notify=True) PreferencesDialog.addColorPreference('audioClipBg', section=_("Appearance"), label=_("Color for audio clips"), description=_("The background color for clips in audio tracks.")) GlobalSettings.addConfigOption('titleClipBg', section='user-interface',
def do_activate(self): api = self.object self.app = api.app try: self.app.settings.addConfigSection("console") except ConfigError: pass try: self.app.settings.addConfigOption(attrname="consoleColor", section="console", key="console-color", notify=True, default=Console.DEFAULT_COLOR) except ConfigError: pass try: self.app.settings.addConfigOption(attrname="consoleErrorColor", section="console", key="console-error-color", notify=True, default=Console.DEFAULT_STDERR_COLOR) except ConfigError: pass try: self.app.settings.addConfigOption(attrname="consoleOutputColor", section="console", key="console-output-color", notify=True, default=Console.DEFAULT_STDOUT_COLOR) except ConfigError: pass try: self.app.settings.addConfigOption(attrname="consoleFont", section="console", key="console-font", notify=True, default=Console.DEFAULT_FONT.to_string()) except ConfigError: pass self.app.settings.reload_attribute_from_file("console", "consoleColor") self.app.settings.reload_attribute_from_file("console", "consoleErrorColor") self.app.settings.reload_attribute_from_file("console", "consoleOutputColor") self.app.settings.reload_attribute_from_file("console", "consoleFont") PreferencesDialog.add_section("console", _("Console")) PreferencesDialog.addColorPreference(attrname="consoleColor", label=_("Color"), description=None, section="console") PreferencesDialog.addColorPreference(attrname="consoleErrorColor", # Translators: The color of the content from stderr. label=_("Standard error color"), description=None, section="console") PreferencesDialog.addColorPreference(attrname="consoleOutputColor", # Translators: The color of the content from stdout. label=_("Standard output color"), description=None, section="console") PreferencesDialog.addFontPreference(attrname="consoleFont", label=_("Font"), description=None, section="console") open_action = Gio.SimpleAction.new("open_console", None) open_action.connect("activate", self.__menu_item_activate_cb) self.app.add_action(open_action) self.app.shortcuts.add("app.open_console", ["<Primary>d"], _("Developer Console")) self._setup_dialog() self.add_menu_item() self.menu_item.show()