forked from GitHub/gf-core
minibar: include the grammar's last modification in the grammar info shown by the "i" button
Also bumped version number in gf.cabal to 3.6-darcs. Also removed some unecessary use of CPP.
This commit is contained in:
2
gf.cabal
2
gf.cabal
@@ -1,5 +1,5 @@
|
|||||||
name: gf
|
name: gf
|
||||||
version: 3.6
|
version: 3.6-darcs
|
||||||
|
|
||||||
cabal-version: >= 1.10
|
cabal-version: >= 1.10
|
||||||
build-type: Custom
|
build-type: Custom
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
-- LANGUAGE CPP
|
|
||||||
module GF.Infra.Option
|
module GF.Infra.Option
|
||||||
(
|
(
|
||||||
-- * Option types
|
-- * Option types
|
||||||
@@ -285,14 +284,7 @@ defaultFlags = Flags {
|
|||||||
optTagsOnly = False,
|
optTagsOnly = False,
|
||||||
optHeuristicFactor = Nothing,
|
optHeuristicFactor = Nothing,
|
||||||
optMetaProb = Nothing,
|
optMetaProb = Nothing,
|
||||||
optMetaToknProb = Nothing{-,
|
optMetaToknProb = Nothing
|
||||||
optNewComp =
|
|
||||||
#ifdef NEW_COMP
|
|
||||||
True
|
|
||||||
#else
|
|
||||||
False
|
|
||||||
#endif
|
|
||||||
-}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- | Option descriptions
|
-- | Option descriptions
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
|
|
||||||
module GF.Text.Coding where
|
module GF.Text.Coding where
|
||||||
|
|
||||||
import qualified Data.ByteString as BS
|
import qualified Data.ByteString as BS
|
||||||
@@ -25,11 +23,7 @@ encodeUnicode enc s =
|
|||||||
where
|
where
|
||||||
translate cod cbuf
|
translate cod cbuf
|
||||||
| i < w = do bbuf <- newByteBuffer 128 WriteBuffer
|
| i < w = do bbuf <- newByteBuffer 128 WriteBuffer
|
||||||
#if __GLASGOW_HASKELL__ >= 702
|
|
||||||
(_,cbuf,bbuf) <- cod cbuf bbuf
|
(_,cbuf,bbuf) <- cod cbuf bbuf
|
||||||
#else
|
|
||||||
(cbuf,bbuf) <- cod cbuf bbuf
|
|
||||||
#endif
|
|
||||||
if isEmptyBuffer bbuf
|
if isEmptyBuffer bbuf
|
||||||
then ioe_invalidCharacter1
|
then ioe_invalidCharacter1
|
||||||
else do let bs = PS (bufRaw bbuf) (bufL bbuf) (bufR bbuf-bufL bbuf)
|
else do let bs = PS (bufRaw bbuf) (bufL bbuf) (bufR bbuf-bufL bbuf)
|
||||||
@@ -54,11 +48,7 @@ decodeUnicodeIO enc (PS fptr l len) = do
|
|||||||
where
|
where
|
||||||
translate cod bbuf cbuf
|
translate cod bbuf cbuf
|
||||||
| i < w = do
|
| i < w = do
|
||||||
#if __GLASGOW_HASKELL__ >= 702
|
|
||||||
(_,bbuf,cbuf) <- cod bbuf cbuf
|
(_,bbuf,cbuf) <- cod bbuf cbuf
|
||||||
#else
|
|
||||||
(bbuf,cbuf) <- cod bbuf cbuf
|
|
||||||
#endif
|
|
||||||
if isEmptyBuffer cbuf
|
if isEmptyBuffer cbuf
|
||||||
then ioe_invalidCharacter2
|
then ioe_invalidCharacter2
|
||||||
else unpack cod bbuf cbuf
|
else unpack cod bbuf cbuf
|
||||||
|
|||||||
@@ -244,8 +244,13 @@ Minibar.prototype.show_grammarinfo=function() {
|
|||||||
var btn=button("More info",more)
|
var btn=button("More info",more)
|
||||||
|
|
||||||
clear(t.translations.main)
|
clear(t.translations.main)
|
||||||
|
var hdr=[text(g.name)]
|
||||||
|
if(g.lastmodified) {
|
||||||
|
hdr.push(text(" "))
|
||||||
|
hdr.push(wrap("small",text("("+g.lastmodified+")")))
|
||||||
|
}
|
||||||
appendChildren(this.translations.main,
|
appendChildren(this.translations.main,
|
||||||
[wrap("h3",text(g.name)),
|
[wrap("h3",hdr),
|
||||||
btn,
|
btn,
|
||||||
wrap("h4",text("Start category")), text(g.startcat || ""),
|
wrap("h4",text("Start category")), text(g.startcat || ""),
|
||||||
wrap("h4",text("Categories")), cats,
|
wrap("h4",text("Categories")), cats,
|
||||||
|
|||||||
Reference in New Issue
Block a user