Adds the correct graphic options depending of the OS
426007
def _graphic(self):
        

        if sys.platform.startswith("win"):
            return []
        if len(os.environ.get("DISPLAY", "")) > 0:
            return []
        if "-nographic" not in self._options:
            return ["-nographic"]
        return []
565044
def complete_opt_display(self, text, *_):
        
        return [t + " " for t in DISPLAYS if t.startswith(text)]
993461
def _update_preview(self):
        """"""
        color = self.hexa.get()
        if self.alpha_channel:
            prev = overlay(self._transparent_bg, hexa_to_rgb(color))
            self._im_color = ImageTk.PhotoImage(prev, master=self)
            self.color_preview.configure(image=self._im_color)
        else:
            self.color_preview.configure(background=color)
160714
def add_options(self):
        
        super(ThemeSwitcher, self).add_options()

        self.add_bool_option("-l", "--list",
            help="list available themes")
        self.add_bool_option("-c", "--current",
            help="print path to currently selected theme")
        self.add_bool_option("-n", "--next",
            help="rotate through selected themes, and print new path")
        self.add_bool_option("-a", "--all",
            help="remove any selections, and use all themes")
        self.add_value_option("-t", "--toggle", "NAME",
            help="toggle selection of a theme")
392229
function configureLocalBrowsers (config) {
  var isMac = /^darwin/.test(process.platform);
  var isWindows = /^win/.test(process.platform);
  var isLinux = !isMac && !isWindows;

  if (isMac) {
    config.browsers = ['Firefox', 'Chrome', 'Safari'];
  }
  else if (isLinux) {
    config.browsers = ['Firefox', 'ChromeHeadless'];
  }
  else if (isWindows) {
    config.browsers = ['Firefox', 'Chrome', 'IE9', 'IE10', 'IE'];

    // NOTE: IE 6, 7, 8 are not supported by Chai
    config.customLaunchers = {
      IE9: {
        base: 'IE',
        'x-ua-compatible': 'IE=EmulateIE9'
      },
      IE10: {
        base: 'IE',
        'x-ua-compatible': 'IE=EmulateIE10'
      }
    };
  }
}
75596
def setup_ui(self, ):
        
        plus_icon = get_icon('glyphicons_433_plus_bright.png', asicon=True)
        self.add_tb.setIcon(plus_icon)

        self.shot_browser = ListBrowser(4, parent=self, headers=["Project", "Sequence", "Shot", "Type"])
        self.asset_browser = ListBrowser(4, parent=self, headers=["Project", "Assettype", "Asset", "Type"])

        self.shotmodel = self.create_shot_model()
        self.assetmodel = self.create_asset_model()

        self.shot_browser.set_model(self.shotmodel)
        self.asset_browser.set_model(self.assetmodel)

        self.shot_vbox.addWidget(self.shot_browser)
        self.asset_vbox.addWidget(self.asset_browser)
398636
def set(opts)
      # Store new window attributes, or ignore if nil
      @title           = opts[:title]           || @title
      if Color.is_valid? opts[:background]
        @background    = Color.new(opts[:background])
      end
      @icon            = opts[:icon]            || @icon
      @width           = opts[:width]           || @width
      @height          = opts[:height]          || @height
      @fps_cap         = opts[:fps_cap]         || @fps_cap
      @viewport_width  = opts[:viewport_width]  || @viewport_width
      @viewport_height = opts[:viewport_height] || @viewport_height
      @resizable       = opts[:resizable]       || @resizable
      @borderless      = opts[:borderless]      || @borderless
      @fullscreen      = opts[:fullscreen]      || @fullscreen
      @highdpi         = opts[:highdpi]         || @highdpi
      unless opts[:diagnostics].nil?
        @diagnostics = opts[:diagnostics]
        ext_diagnostics(@diagnostics)
      end
    end
443297
function () {

			if ( 'GlobalSettings' in fbxTree && 'AmbientColor' in fbxTree.GlobalSettings ) {

				var ambientColor = fbxTree.GlobalSettings.AmbientColor.value;
				var r = ambientColor[ 0 ];
				var g = ambientColor[ 1 ];
				var b = ambientColor[ 2 ];

				if ( r !== 0 || g !== 0 || b !== 0 ) {

					var color = new THREE.Color( r, g, b );
					sceneGraph.add( new THREE.AmbientLight( color, 1 ) );

				}

			}

		}
405331
function setOptions(options) {
  exports.options = options;
  home.options = options;
  renderMarkdown.options = options;
  renderGithubMarkdown.options = options;
}
1145290
protected void configurePopup() {
        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        setBorderPainted(true);
        setBorder(LIST_BORDER);
        setOpaque(false);
        add(scroller);
        setDoubleBuffered(true);
        setFocusable(false);
    }
3922
function(options) {
        options = options || {};

        if(options.extractStyles !== false) {
            options.defaultStyle = {
                'externalGraphic': OpenLayers.Util.getImageLocation("marker.png"),
                'graphicWidth': 21,
                'graphicHeight': 25,
                'graphicXOffset': -10.5,
                'graphicYOffset': -12.5
            };
        }
        
        OpenLayers.Format.prototype.initialize.apply(this, [options]);
    }
387472
def _set_config(c):
    """"""
    gl_attribs = [glcanvas.WX_GL_RGBA,
                  glcanvas.WX_GL_DEPTH_SIZE, c['depth_size'],
                  glcanvas.WX_GL_STENCIL_SIZE, c['stencil_size'],
                  glcanvas.WX_GL_MIN_RED, c['red_size'],
                  glcanvas.WX_GL_MIN_GREEN, c['green_size'],
                  glcanvas.WX_GL_MIN_BLUE, c['blue_size'],
                  glcanvas.WX_GL_MIN_ALPHA, c['alpha_size']]
    gl_attribs += [glcanvas.WX_GL_DOUBLEBUFFER] if c['double_buffer'] else []
    gl_attribs += [glcanvas.WX_GL_STEREO] if c['stereo'] else []
    return gl_attribs
912946
def optipng(ext_args):
    """"""
    args = _OPTIPNG_ARGS + [ext_args.new_filename]
    extern.run_ext(args)
    return _PNG_FORMAT
673851
def register_palette(self):
        """"""
        default = 'default'
        palette = list(self.palette)
        mapping = CONFIG['rgb_to_short']
        for tok in self.style.styles.keys():
            for t in tok.split()[::-1]:
                st = self.style.styles[t]
                if '#' in st:
                    break
            if '#' not in st:
                st = ''
            st = st.split()
            st.sort()   # '#' comes before '[A-Za-z0-9]'
            if len(st) == 0:
                c = default
            elif st[0].startswith('bg:'):
                c = default
            elif len(st[0]) == 7:
                c = 'h' + rgb_to_short(st[0][1:], mapping)[0]
            elif len(st[0]) == 4:
                c = 'h' + rgb_to_short(st[0][1]*2 + st[0][2]*2 + st[0][3]*2, mapping)[0]
            else:
                c = default
            a = urwid.AttrSpec(c, default, colors=256)
            row = (tok, default, default, default, a.foreground, default)
            palette.append(row)
        self.loop.screen.register_palette(palette)
821095
def options_for_render(options = {})
      style = options_for_style(options[:style] || DEFAULT_OPTIONS[:style])
      DEFAULT_OPTIONS.merge(style).merge(options)
    end
283484
def interface_options(score=False, raw=False, features=None, rgb=None):
  """"""
  interface = sc_pb.InterfaceOptions()
  interface.score = score
  interface.raw = raw
  if features:
    interface.feature_layer.width = 24
    interface.feature_layer.resolution.x = features
    interface.feature_layer.resolution.y = features
    interface.feature_layer.minimap_resolution.x = features
    interface.feature_layer.minimap_resolution.y = features
  if rgb:
    interface.render.resolution.x = rgb
    interface.render.resolution.y = rgb
    interface.render.minimap_resolution.x = rgb
    interface.render.minimap_resolution.y = rgb
  return interface
849561
def _configure(self, *args):
        
        # Obtain a reference to the OpenGL drawable
        # and rendering context.
        gldrawable = self.get_gl_drawable()
        glcontext = self.get_gl_context()

        # logger.debug("configure")
        # OpenGL begin
        if not gldrawable or not gldrawable.gl_begin(glcontext):
            return False

        # Draw on the full viewport
        glViewport(0, 0, self.get_allocation().width, self.get_allocation().height)

        glMatrixMode(GL_PROJECTION)
        glLoadIdentity()

        # Orthogonal view with correct aspect ratio
        self._apply_orthogonal_view()

        glMatrixMode(GL_MODELVIEW)
        glLoadIdentity()

        # OpenGL end
        gldrawable.gl_end()

        return False