Exemplo n.º 1
0
 def getNSWindowController(self):
     """
     Return an *NSWindowController* for the *NSWindow* that this Vanilla
     object wraps, creating a one if needed.
     """
     controller = self._window.windowController()
     if controller is None:
         controller = NSWindowController.alloc().initWithWindow_(self._window)
     return controller
Exemplo n.º 2
0
 def getNSWindowController(self):
     """
     Return an *NSWindowController* for the *NSWindow* that this Vanilla
     object wraps, creating a one if needed.
     """
     controller = self._window.windowController()
     if controller is None:
         controller = NSWindowController.alloc().initWithWindow_(
             self._window)
     return controller
Exemplo n.º 3
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)
Exemplo n.º 4
0
 def progress_window_show(self):
     self.showing_bubbles = False
     if not self.window_controller:
         self.window_controller = NSWindowController.alloc().initWithWindow_(CameraProgressWindow(self))
     self.window_controller.showWindow_(None)
     NSApp().activateIgnoringOtherApps_(True)
Exemplo n.º 5
0
 def windowDidLoad(self):
     NSWindowController.windowDidLoad(self)
     self.Unicron = Unicron()
Exemplo n.º 6
0
 def windowDidLoad(self):
     NSWindowController.windowDidLoad(self)
Exemplo n.º 7
0
    def windowDidLoad(self):
        NSWindowController.windowDidLoad(self)

        # Start the counter
        self.count = 0
 def openPolygonPanel(self):
     if self.__polyPanelWindowController is None:
         _wc = NSWindowController.alloc().initWithWindow_(self.polygonPanel)
         self.__polyPanelWindowController = _wc
     self.__polyPanelWindowController.showWindow_(self)
Exemplo n.º 9
0
 def openPolygonPanel(self):
     if self.__polyPanelWindowController is None:
         _wc = NSWindowController.alloc().initWithWindow_(self.polygonPanel)
         self.__polyPanelWindowController = _wc
     self.__polyPanelWindowController.showWindow_(self)
Exemplo n.º 10
0
 def windowDidLoad(self):
     NSWindowController.windowDidLoad(self)