Ejemplo n.º 1
0
    def windowDidLoad(self):
        NSWindowController.windowDidLoad(self)

        # window
        self.windowObjc.setValue_forKey_(_('Preferences'), 'title')
        # tab view
        tab_view_objc = self.tabViewObjc.valueForKey_('tabViewItems')

        # General
        tab_view_objc.objectAtIndex_(0).setValue_forKey_(_('General'), 'label')
        self.uiLanguageLabel.setStringValue_(_('UI Language'))
        self.ui_language_helper = PopUpButtonHelper(
            objc_obj=self.uiLanguage,
            values=Languages,
            selected_value=config.Common.ui_language,
            text_map=Languages.text_map(),
        )
        self.destLanguageLabel.setStringValue_(_('Destination Language'))
        self.dest_language_helper = PopUpButtonHelper(
            objc_obj=self.destLanguage,
            values=Languages,
            selected_value=config.Common.dest_language,
            text_map=Languages.text_map(),
        )
        self.translationServiceLabel.setStringValue_(_('Translation Service'))
        self.translation_service_helper = PopUpButtonHelper(
            objc_obj=self.translationService,
            values=TranslationServices,
            selected_value=config.Common.translation_service,
            text_map=TranslationServices.text_map(),
        )

        # Google
        self.googleServiceURLLabel.setStringValue_(_('Service URL'))
        self.google_service_url_helper = PopUpButtonHelper(
            objc_obj=self.googleServiceURL,
            values=GOOGLE_SERVICE_URLS,
            selected_value=config.Google.service_url,
            text_map=None,
        )

        # Support
        self.sentryDsn.setStringValue_(config.Support.sentry_dsn)
Ejemplo n.º 2
0
 def windowDidLoad(self):
     NSWindowController.windowDidLoad(self)
     self.Unicron = Unicron()
Ejemplo n.º 3
0
    def windowDidLoad(self):
        NSWindowController.windowDidLoad(self)

        # Start the counter
        self.count = 0
Ejemplo n.º 4
0
 def windowDidLoad(self):
     NSWindowController.windowDidLoad(self)
Ejemplo n.º 5
0
 def windowDidLoad(self):
     NSWindowController.windowDidLoad(self)