Skip to content

Commit

Permalink
reinstate WinstonDisplay to julia 0.3
Browse files Browse the repository at this point in the history
a984d96 was too aggressive. Fixes JuliaGraphics#137.
  • Loading branch information
nolta committed Apr 9, 2014
1 parent 5720176 commit 7c86677
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Winston.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ if VERSION < v"0.3-"
typealias AbstractVecOrMat{T} Union(AbstractVector{T}, AbstractMatrix{T})
extrema(x) = (minimum(x),maximum(x))
Base.push!(x, a, b) = (push!(x, a); push!(x, b))
immutable WinstonDisplay <: Display end
if !isdefined(Main, :IJulia)
pushdisplay(WinstonDisplay())
end
end

type WinstonException <: Exception
Expand Down Expand Up @@ -2549,6 +2545,8 @@ writemime(io::IO, ::MIME"image/png", p::PlotContainer) =
output_surface = Winston.config_value("default","output_surface")
output_surface = symbol(lowercase(get(ENV, "WINSTON_OUTPUT", output_surface)))

immutable WinstonDisplay <: Display end

if !isdefined(Main, :IJulia)
if output_surface == :gtk
include("gtk.jl")
Expand All @@ -2559,9 +2557,9 @@ if !isdefined(Main, :IJulia)
else
assert(false)
end
if VERSION < v"0.3-"
display(::WinstonDisplay, p::PlotContainer) = xtk(p)
else
display(::WinstonDisplay, p::PlotContainer) = xtk(p)
pushdisplay(WinstonDisplay())
if VERSION >= v"0.3-"
display(::Base.REPL.REPLDisplay, ::MIME"text/plain", p::PlotContainer) = xtk(p)
end
end
Expand Down

0 comments on commit 7c86677

Please sign in to comment.