]> git.lyx.org Git - features.git/commitdiff
Georg's add an editor to Formats / safe external_templates patch.
authorAngus Leeming <leeming@lyx.org>
Tue, 13 Apr 2004 10:36:09 +0000 (10:36 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 13 Apr 2004 10:36:09 +0000 (10:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8645 a592a061-630c-0410-9148-cb99ea01b6c8

32 files changed:
lib/ChangeLog
lib/configure.m4
lib/external_templates
src/ChangeLog
src/LyXAction.C
src/format.C
src/format.h
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlGraphics.C
src/frontends/controllers/ControlGraphics.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/QGraphics.C
src/frontends/qt2/QGraphics.h
src/frontends/qt2/QGraphicsDialog.C
src/frontends/qt2/QGraphicsDialog.h
src/frontends/qt2/QPrefsDialog.C
src/frontends/qt2/ui/QGraphicsDialogBase.ui
src/frontends/qt2/ui/QPrefFileformatsModule.ui
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/forms/form_graphics.fd
src/frontends/xforms/forms/form_preferences.fd
src/insets/ChangeLog
src/insets/ExternalSupport.C
src/insets/ExternalTemplate.C
src/insets/ExternalTemplate.h
src/insets/insetgraphics.C
src/insets/insetgraphics.h
src/lfuns.h
src/lyxfunc.C
src/lyxrc.C

index 76c08742599ea0a583c95a83416de889729a0fad..fc4080f14af3c605fd4ed0d6a82fc9235d518478 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-12  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * configure.m4: merge \viewer and \format. Add editor to \format
+       * configure.m4: check for more viewers and editors
+       * external_templates: remove EditCommand
+
 2004-04-06  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * external_templates: use some new variables instead of $$Basename
index f78a23643396044372da9c12226739fee9c7aad1..29621133d95ed1efe8cf0776c9de38a7f47c7761 100644 (file)
@@ -237,6 +237,20 @@ fi
 test $latex_to_dvi != "none" && latex_to_dvi="$latex_to_dvi \$\$i"
 test $latex_to_pdf != "none" && latex_to_pdf="$latex_to_pdf \$\$i"
 
+SEARCH_PROG([for a TGIF viewer and editor], TGIF_EDITOR, tgif)
+TGIF_VIEWER="$TGIF_EDITOR"
+
+SEARCH_PROG([for a FIG viewer and editor], FIG_EDITOR, xfig)
+FIG_VIEWER="$FIG_EDITOR"
+
+SEARCH_PROG([for a FEN viewer and editor], FEN_EDITOR, xboard)
+test "$FEN" = "xboard" && FEN_EDITOR="xboard -lpf \$\$i -mode EditPosition"
+FEN_VIEWER="$FEN_EDITOR"
+
+SEARCH_PROG([for a raster image viewer], RASTERIMAGE_VIEWER, xv kview gimp)
+
+SEARCH_PROG([for a raster image editor], RASTERIMAGE_EDITOR, gimp)
+
 # Search for an installed reLyX or a ready-to-install one
 save_PATH=${PATH}
 PATH=${PATH}:./reLyX/
@@ -492,113 +506,102 @@ cat >$outfile <<EOF
 # want to customize LyX, make a copy of the file LYXDIR/lyxrc as
 # ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will
 # override the values given here.
-\\Format asciichess asc "ASCII (chess output)" ""
-\\Format asciiimage asc "ASCII (image)" ""
-\\Format asciixfig  asc "ASCII (xfig output)" ""
-\\Format agr      agr  GRACE           ""
-\\Format bmp      bmp  BMP             ""
-\\Format date     ""    "date command"  ""
-\\Format dateout  "tmp" "date (output)" ""
-\\Format docbook  sgml DocBook         B
-\\Format dvi     dvi   DVI             D
-\\Format eps     eps   EPS             ""
-\\Format fax     ""    Fax             ""
-\\Format fen      fen   FEN             ""
-\\Format fig     fig   XFig            ""
-\\Format gif     gif   GIF             ""
-\\Format html    html  HTML            H
-\\Format jpg     jpg   JPG             ""
-\\Format latex   tex   LaTeX           L
-\\Format linuxdoc sgml LinuxDoc        x
-\\Format lyx      lyx  LyX             ""
-\\Format lyxpreview    lyxpreview      "LyX Preview"           ""
-\\Format literate nw   NoWeb           N
-\\Format pbm     pbm   PBM             ""
-\\Format pdf     pdf  "PDF (ps2pdf)"   P
-\\Format pdf2    pdf  "PDF (pdflatex)" F
-\\Format pdf3    pdf  "PDF (dvipdfm)"  m
-\\Format pdftex   pdftex_t PDFTEX       ""
-\\Format pgm     pgm   PGM             ""
-\\Format png     png   PNG             ""
-\\Format ppm     ppm   PPM             ""
-\\Format program  ""   Program         ""
-\\Format ps      ps    Postscript      t
-\\Format pstex    pstex_t PSTEX         ""
-\\Format text    txt   ASCII           A
-\\Format textparagraph txt ASCII(paragraphs)   ""
-\\Format tgif     obj  TGIF            ""
-\\Format tiff     tif  TIFF            ""
-\\Format word    doc   Word            W
-\\Format xbm     xbm   XBM             ""
-\\Format xpm     xpm   XPM             ""
-
-\\converter date dateout "date +%d-%m-%Y > \$\$o" ""
-\\converter docbook dvi "$docbook_to_dvi_command" ""
-\\converter docbook html "$docbook_to_html_command" ""
-\\converter dvi pdf3 "$dvi_to_pdf_command" ""
-\\converter dvi ps "$dvi_to_ps_command" ""
-\\converter fen asciichess "python \$\$s/fen2ascii.py \$\$i \$\$o" ""
-\\converter fig pdftex "sh \$\$s/fig2pdftex.sh \$\$i \$\$o" ""
-\\converter fig pstex  "sh \$\$s/fig2pstex.sh \$\$i \$\$o" ""
-\\converter html latex "$html_to_latex_command" ""
-\\converter latex html "$latex_to_html_command" "originaldir,needaux"
-\\converter latex dvi "$latex_to_dvi" "latex"
-\\converter latex lyx "$tex_to_lyx_command" ""
-\\converter latex pdf2 "$latex_to_pdf" "latex"
-\\converter linuxdoc dvi "$linuxdoc_to_dvi_command" ""
-\\converter linuxdoc html "$linuxdoc_to_html_command" ""
-\\converter linuxdoc latex "$linuxdoc_to_latex_command" ""
-\\converter linuxdoc lyx "$linuxdoc_to_lyx_command" ""
-\\converter literate latex "$literate_to_tex_command" ""
-\\converter literate lyx "$literate_to_lyx_command" ""
-\\converter lyxpreview ppm "$lyxpreview_to_bitmap_command" ""
-\\converter ps fax "$fax_command" ""
-\\converter ps pdf "$ps_to_pdf_command" ""
-\\converter word latex "$word_to_latex_command" ""
-
-\\viewer dvi "$DVI_VIEWER"
-\\viewer html "$HTML_VIEWER"
-\\viewer pdf "$PDF_VIEWER"
-\\viewer pdf2 "$PDF_VIEWER"
-\\viewer pdf3 "$PDF_VIEWER"
-\\viewer ps "$PS_VIEWER"
-\\viewer eps "$EPS_VIEWER"
-
-$rc_entries
-\\font_encoding "$chk_fontenc"
+\\Format asciichess asc    "ASCII (chess output)"  "" ""       ""
+\\Format asciiimage asc    "ASCII (image)"         "" ""       ""
+\\Format asciixfig  asc    "ASCII (xfig output)"   "" ""       ""
+\\Format agr        agr     GRACE                  "" ""       ""
+\\Format bmp        bmp     BMP                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format date       ""     "date command"          "" ""       ""
+\\Format dateout    tmp    "date (output)"         "" ""       ""
+\\Format docbook    sgml    DocBook                B  ""       ""
+\\Format dvi        dvi     DVI                    D  "$DVI_VIEWER"    ""
+\\Format eps        eps     EPS                    "" "$EPS_VIEWER"    ""
+\\Format fax        ""      Fax                    "" ""       ""
+\\Format fen        fen     FEN                    "" "$FEN_VIEWER"    "$FEN_EDITOR"
+\\Format fig        fig     XFig                   "" "$FIG_VIEWER"    "$FIG_EDITOR"
+\\Format gif        gif     GIF                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format html       html    HTML                   H  "$HTML_VIEWER"   ""
+\\Format jpg        jpg     JPG                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format latex      tex     LaTeX                  L  ""       ""
+\\Format linuxdoc   sgml    LinuxDoc               x  ""       ""
+\\Format lyx        lyx     LyX                    "" ""       ""
+\\Format lyxpreview lyxpreview "LyX Preview"       "" ""       ""
+\\Format literate   nw      NoWeb                  N  ""       ""
+\\Format pbm        pbm     PBM                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format pdf        pdf    "PDF (ps2pdf)"          P  "$PDF_VIEWER"    ""
+\\Format pdf2       pdf    "PDF (pdflatex)"        F  "$PDF_VIEWER"    ""
+\\Format pdf3       pdf    "PDF (dvipdfm)"         m  "$PDF_VIEWER"    ""
+\\Format pdftex     pdftex_t PDFTEX                "" ""       ""
+\\Format pgm        pgm     PGM                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format png        png     PNG                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format ppm        ppm     PPM                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format program    ""      Program                "" ""       ""
+\\Format ps         ps      Postscript             t  "$PS_VIEWER"     ""
+\\Format pstex      pstex_t PSTEX                  "" ""       ""
+\\Format text       txt     ASCII                  A  ""       ""
+\\Format textparagraph txt "ASCII (paragraphs)"    "" ""       ""
+\\Format tgif       obj     TGIF                   "" "$TGIF_VIEWER"   "$TGIF_EDITOR"
+\\Format tiff       tif     TIFF                   "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format word       doc     Word                   W  ""       ""
+\\Format xbm        xbm     XBM                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+\\Format xpm        xpm     XPM                    "" "$RASTERIMAGE_VIEWER"    "$RASTERIMAGE_EDITOR"
+
+\\converter date       dateout    "date +%d-%m-%Y > \$\$o"     ""
+\\converter docbook    dvi        "$docbook_to_dvi_command"    ""
+\\converter docbook    html       "$docbook_to_html_command"   ""
+\\converter dvi        pdf3       "$dvi_to_pdf_command"        ""
+\\converter dvi        ps         "$dvi_to_ps_command" ""
+\\converter fen        asciichess "python \$\$s/fen2ascii.py \$\$i \$\$o"      ""
+\\converter fig        pdftex     "sh \$\$s/fig2pdftex.sh \$\$i \$\$o" ""
+\\converter fig        pstex      "sh \$\$s/fig2pstex.sh \$\$i \$\$o"  ""
+\\converter html       latex      "$html_to_latex_command"     ""
+\\converter latex      html       "$latex_to_html_command"     "originaldir,needaux"
+\\converter latex      dvi        "$latex_to_dvi"      "latex"
+\\converter latex      lyx        "$tex_to_lyx_command"        ""
+\\converter latex      pdf2       "$latex_to_pdf"      "latex"
+\\converter linuxdoc   dvi        "$linuxdoc_to_dvi_command"   ""
+\\converter linuxdoc   html       "$linuxdoc_to_html_command"  ""
+\\converter linuxdoc   latex      "$linuxdoc_to_latex_command" ""
+\\converter linuxdoc   lyx        "$linuxdoc_to_lyx_command"   ""
+\\converter literate   latex      "$literate_to_tex_command"   ""
+\\converter literate   lyx        "$literate_to_lyx_command"   ""
+\\converter lyxpreview ppm        "$lyxpreview_to_bitmap_command"      ""
+\\converter ps         fax        "$fax_command"       ""
+\\converter ps         pdf        "$ps_to_pdf_command" ""
+\\converter word       latex      "$word_to_latex_command"     ""
 EOF
 
 ### the graphic converter part with the predefined ones
-#### Search for tne nonstandard converting progs
+#### Search for the nonstandard converting progs
 #
 SEARCH_PROG([for an FIG -> EPS/PPM converter], FIG2DEV, fig2dev)
 if test "$FIG2DEV" = "fig2dev"; then
 cat >>$outfile <<EOF
-\\converter fig eps "fig2dev -L eps \$\$i \$\$o" ""
-\\converter fig ppm "fig2dev -L ppm \$\$i \$\$o" ""
-\\converter fig png "fig2dev -L png \$\$i \$\$o" ""
+\\converter fig        eps        "fig2dev -L eps \$\$i \$\$o" ""
+\\converter fig        ppm        "fig2dev -L ppm \$\$i \$\$o" ""
+\\converter fig        png        "fig2dev -L png \$\$i \$\$o" ""
 EOF
 fi
 
 SEARCH_PROG([for an TIFF -> PS converter], TIFF2PS, tiff2ps)
 if test "$TIFF2PS" = "tiff2ps"; then
 cat >>$outfile <<EOF
-\\converter tiff eps "tiff2ps \$\$i > \$\$o" ""
+\\converter tiff        eps         "tiff2ps \$\$i > \$\$o" ""
 EOF
 fi
 
 SEARCH_PROG([for an TGIF -> EPS/PPM converter], TGIF, tgif)
 if test "$TGIF" = "tgif"; then
 cat >>$outfile <<EOF
-\\converter tgif eps "tgif -stdout -print -color -eps \$\$i > \$\$o" ""
-\\converter tgif png "tgif -stdout -print -color -xpm \$\$i | xpmtoppm | pnmtopng > \$\$o" ""
+\\converter tgif       eps        "tgif -stdout -print -color -eps \$\$i > \$\$o" ""
+\\converter tgif       pdf        "tgif -stdout -print -color -pdf \$\$i > \$\$o" ""
 EOF
 fi
 
 SEARCH_PROG([for an EPS -> PDF converter], EPSTOPDF, epstopdf)
 if test "$EPSTOPDF" = "epstopdf"; then
 cat >>$outfile <<EOF
-\\converter eps pdf "epstopdf --outfile=\$\$o \$\$i" ""
+\\converter eps        pdf        "epstopdf --outfile=\$\$o \$\$i" ""
 EOF
 fi
 
@@ -606,13 +609,19 @@ fi
 SEARCH_PROG([for a Grace -> Image converter], GRACE, gracebat)
 if test "$GRACE" = "gracebat"; then
 cat >>$outfile <<EOF
-\\converter agr eps "gracebat -hardcopy -printfile \$\$o -hdevice EPS \$\$i 2>/dev/null" ""
-\\converter agr png "gracebat -hardcopy -printfile \$\$o -hdevice PNG \$\$i 2>/dev/null" ""
-\\converter agr jpg "gracebat -hardcopy -printfile \$\$o -hdevice JPEG \$\$i 2>/dev/null" ""
-\\converter agr ppm "gracebat -hardcopy -printfile \$\$o -hdevice PNM \$\$i 2>/dev/null" ""
+\\converter agr        eps        "gracebat -hardcopy -printfile \$\$o -hdevice EPS \$\$i 2>/dev/null" ""
+\\converter agr        png        "gracebat -hardcopy -printfile \$\$o -hdevice PNG \$\$i 2>/dev/null" ""
+\\converter agr        jpg        "gracebat -hardcopy -printfile \$\$o -hdevice JPEG \$\$i 2>/dev/null" ""
+\\converter agr        ppm        "gracebat -hardcopy -printfile \$\$o -hdevice PNM \$\$i 2>/dev/null" ""
 EOF
 fi
 
+cat >>$outfile <<EOF
+
+$rc_entries
+\\font_encoding "$chk_fontenc"
+EOF
+
 ######## X FONTS
 # create a fonts.dir file to make X fonts available to LyX
 echo "checking for TeX fonts"
index f7526e81f0cd0eed5128309c7916aa4ce751d3f1..6c088d00dbf7417623887a9bc3ad0599d60ee4a8 100644 (file)
@@ -38,11 +38,9 @@ Template RasterImage
        GuiName "Bitmap: $$AbsOrRelPathParent$$Basename"
        HelpText
                A bitmap file.
-               This template uses Gimp for editing.
        HelpTextEnd
        InputFormat "*"
        FileFilter "*.{gif,png,jpg,bmp,pbm,ppm,tga,tif,xpm,xbm}"
-       EditCommand "gimp $$Absname"
        AutomaticProduction true
        Transform Rotate
        Transform Resize
@@ -90,11 +88,9 @@ Template XFig
        GuiName "XFig: $$AbsOrRelPathParent$$Basename"
        HelpText
                An XFig figure.
-               This template uses XFig for editing.
        HelpTextEnd
        InputFormat fig
        FileFilter "*.fig"
-       EditCommand "xfig $$Absname"
        AutomaticProduction true
        Transform Rotate
        Transform Resize
@@ -157,7 +153,6 @@ Template ChessDiagram
        HelpTextEnd
        InputFormat fen
        FileFilter "*.fen"
-       EditCommand "xboard -lpf $$Absname -mode EditPosition"
        AutomaticProduction true
        Format LaTeX
                Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
index d2b03a733dffcf1a168824113cc01d7a1d405675..a1a5c6b66493fc89e0a4653c2724da2da4ce020b 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-12  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * format.[Ch]: add editor to Format
+       * lyxrc.[Ch]: merge RC_FORMAT and RC_VIEWER. Add editor to Format
+       * LyXAction.C, lfuns.h, lyxfunc.C: add lfun LFUN_GRAPHICS_EDIT
 
 2004-04-08  André Pönitz  <poenitz@gmx.net>
 
index 5d2d637065b4cfe18d593ddc8b1036b9e0d47d99..49617b0621b5e749913b08a6c7f993c2611367e5 100644 (file)
@@ -325,6 +325,7 @@ void LyXAction::init()
                { LFUN_PARAGRAPH_APPLY, "paragraph-params-apply", Noop },
                { LFUN_PARAGRAPH_UPDATE, "", Noop },
                { LFUN_EXTERNAL_EDIT, "external-edit", Noop },
+               { LFUN_GRAPHICS_EDIT, "graphics-edit", Noop },
                { LFUN_REPEAT, "repeat", NoBuffer },
                { LFUN_WORD_FIND, "word-find", Noop },
                { LFUN_WORD_REPLACE, "word-replace", Noop },
index ef0d4ad968b958c52e36c6bc793ab46f550ef9a4..ec5585d73fd899fa95c47f918d5568a8672b8476 100644 (file)
@@ -27,6 +27,7 @@
 using lyx::support::bformat;
 using lyx::support::compare_ascii_no_case;
 using lyx::support::contains;
+using lyx::support::MakeDisplayPath;
 using lyx::support::OnlyFilename;
 using lyx::support::OnlyPath;
 using lyx::support::Path;
@@ -70,8 +71,8 @@ bool operator<(Format const & a, Format const & b)
 }
 
 Format::Format(string const & n, string const & e, string const & p,
-              string const & s, string const & v)
-       : name_(n), extension_(e), prettyname_(p),shortcut_(s), viewer_(v)
+              string const & s, string const & v, string const & ed)
+       : name_(n), extension_(e), prettyname_(p), shortcut_(s), viewer_(v), editor_(ed)
 {}
 
 
@@ -124,23 +125,22 @@ int Formats::getNumber(string const & name) const
 void Formats::add(string const & name)
 {
        if (!getFormat(name))
-               add(name, name, name, string());
+               add(name, name, name, string(), string(), string());
 }
 
 
 void Formats::add(string const & name, string const & extension,
-                 string const & prettyname, string const & shortcut)
+                  string const & prettyname, string const & shortcut,
+                  string const & viewer, string const & editor)
 {
        FormatList::iterator it =
                find_if(formatlist.begin(), formatlist.end(),
                        FormatNamesEqual(name));
        if (it == formatlist.end())
                formatlist.push_back(Format(name, extension, prettyname,
-                                           shortcut, ""));
-       else {
-               string viewer = it->viewer();
-               *it = Format(name, extension, prettyname, shortcut, viewer);
-       }
+                                           shortcut, viewer, editor));
+       else
+               *it = Format(name, extension, prettyname, shortcut, viewer, editor);
 }
 
 
@@ -172,7 +172,7 @@ void Formats::setViewer(string const & name, string const & command)
 
 
 bool Formats::view(Buffer const & buffer, string const & filename,
-                  string const & format_name) const
+                   string const & format_name) const
 {
        if (filename.empty())
                return false;
@@ -183,7 +183,7 @@ bool Formats::view(Buffer const & buffer, string const & filename,
                format = getFormat(format->parentFormat());
        if (!format || format->viewer().empty()) {
 // I believe this is the wrong place to show alerts, it should be done by
-// the caller (this should be "utility" code
+// the caller (this should be "utility" code)
                Alert::error(_("Cannot view file"),
                        bformat(_("No information for viewing %1$s"),
                                prettyName(format_name)));
@@ -220,7 +220,52 @@ bool Formats::view(Buffer const & buffer, string const & filename,
        if (res) {
                Alert::error(_("Cannot view file"),
                             bformat(_("An error occurred whilst running %1$s"),
-                              command.substr(0, 50)));
+                              MakeDisplayPath(command, 50)));
+               return false;
+       }
+       return true;
+}
+
+
+bool Formats::edit(Buffer const & buffer, string const & filename,
+                        string const & format_name) const
+{
+       if (filename.empty())
+               return false;
+
+       Format const * format = getFormat(format_name);
+       if (format && format->editor().empty() &&
+           format->isChildFormat())
+               format = getFormat(format->parentFormat());
+       if (!format || format->editor().empty()) {
+// I believe this is the wrong place to show alerts, it should be done by
+// the caller (this should be "utility" code)
+               Alert::error(_("Cannot edit file"),
+                       bformat(_("No information for editing %1$s"),
+                               prettyName(format_name)));
+               return false;
+       }
+
+       string command = format->editor();
+
+       if (!contains(command, token_from))
+               command += ' ' + token_from;
+
+       command = subst(command, token_from,
+                       QuoteName(OnlyFilename(filename)));
+       command = subst(command, token_path, QuoteName(OnlyPath(filename)));
+       command = subst(command, token_socket, QuoteName(lyxsocket->address()));
+       lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
+       buffer.message(_("Executing command: ") + command);
+
+       Path p(OnlyPath(filename));
+       Systemcall one;
+       int const res = one.startscript(Systemcall::DontWait, command);
+
+       if (res) {
+               Alert::error(_("Cannot edit file"),
+                            bformat(_("An error occurred whilst running %1$s"),
+                              MakeDisplayPath(command, 50)));
                return false;
        }
        return true;
index 5603367ad13692e415c316e0eb9d5d5caa8a522a..3751b6d0af2111d127d4ce4e46d860860809681e 100644 (file)
@@ -21,7 +21,7 @@ class Format {
 public:
        ///
        Format(std::string const & n, std::string const & e, std::string const & p,
-              std::string const & s, std::string const & v);
+              std::string const & s, std::string const & v, std::string const & ed);
        ///
        bool dummy() const;
        ///
@@ -52,6 +52,10 @@ public:
        void setViewer(std::string const & v) {
                viewer_ = v;
        }
+       ///
+       std::string const & editor() const {
+               return editor_;
+       }
 private:
        std::string name_;
        ///
@@ -62,6 +66,8 @@ private:
        std::string shortcut_;
        ///
        std::string viewer_;
+       ///
+       std::string editor_;
 };
 
 
@@ -86,7 +92,8 @@ public:
        void add(std::string const & name);
        ///
        void add(std::string const & name, std::string const & extension,
-                std::string const & prettyname, std::string const & shortcut);
+                std::string const & prettyname, std::string const & shortcut,
+                std::string const & viewer, std::string const & editor);
        ///
        void erase(std::string const & name);
        ///
@@ -97,6 +104,9 @@ public:
        bool view(Buffer const & buffer, std::string const & filename,
                  std::string const & format_name) const;
        ///
+       bool edit(Buffer const & buffer, std::string const & filename,
+                 std::string const & format_name) const;
+       ///
        std::string const prettyName(std::string const & name) const;
        ///
        std::string const extension(std::string const & name) const;
index ff80490396269f78a8cec7141595f65e203902bf..eb8aa9dd8a18e806e462a70a0bb6a856e8a9b6c7 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-12  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * ControlGraphics.[Ch] (editGraphics): new method
+
 2004-04-07  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * ControlDocument.C: 'assign' for opening/closing branch insets
index d478f1e5357256964e45c4606dedd5f5e4d82023..c546da8e15c0217ae25b564af471faccd2a9781d 100644 (file)
@@ -133,6 +133,16 @@ bool ControlGraphics::isFilenameValid(string const & fname) const
 }
 
 
+void ControlGraphics::editGraphics()
+{
+       BOOST_ASSERT(params_.get());
+
+       dialog().view().apply();
+       string const lfun =
+               InsetGraphicsMailer::params2string(params(), kernel().buffer());
+       kernel().dispatch(FuncRequest(LFUN_GRAPHICS_EDIT, lfun));
+}
+
 namespace frnt {
 
 namespace {
index cff095953011a7fc56c02836ebec698eda97fd49..3fec003e1945963361fae0cbaa6cf9e39f61f49a 100644 (file)
@@ -51,6 +51,8 @@ public:
        bool bbChanged;
        /// test if file exist
        bool isFilenameValid(std::string const & fname) const;
+       /// edit file
+       void editGraphics();
 
 private:
        ///
index 6be06189477c61812aeb52fc9bbe41444fb188f3..b737dd92d9921768ca2ec73fd1233f971e4407f3 100644 (file)
@@ -1,3 +1,10 @@
+2004-04-12  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * QPrefsDialog.C, ui/QPrefFileformatsModule.ui: add editor to format
+       * QGraphics.[Ch]: add slotEdit()
+       * QGraphicsDialog.[Ch]: add edit_clicked()
+       * ui/QGraphicsDialogBase.ui: add Edit button
+
 2004-04-07  Alfredo Braunstein  <abraunst@lyx.org>
 
        * QLPainter.[Ch]: adjust to changes in Painter.h
index 57613355b90a9286eef76da13556397223671be2..6b83c675f864599839f34bbbd598e0db377a46d6 100644 (file)
@@ -415,3 +415,9 @@ bool QGraphics::isValid()
 {
        return !dialog_->filename->text().isEmpty();
 }
+
+
+void QGraphics::slotEdit()
+{
+       controller().editGraphics();
+}
index be0d1c17e2c96495ea3c0e49ed3f859c552a3376..7783cbf4fd44f89643ada87f2884851833f7697f 100644 (file)
@@ -30,6 +30,8 @@ public:
        friend class QGraphicsDialog;
        ///
        QGraphics(Dialog &);
+public slots:
+       void slotEdit();
 protected:
        virtual bool isValid();
 private:
index 195abf78a3391b77c433f015302b28c23da019e2..8ba4dc7fbaea772976ea88b5dd39cb87eef7646a 100644 (file)
@@ -39,6 +39,8 @@ QGraphicsDialog::QGraphicsDialog(QGraphics * form)
                form, SLOT(slotClose()));
        connect(restorePB, SIGNAL(clicked()),
                form, SLOT(slotRestore()));
+       connect(editPB, SIGNAL(clicked()),
+               this, SLOT(edit_clicked()));
 }
 
 
@@ -93,3 +95,9 @@ void QGraphicsDialog::getBB_clicked()
 {
        form_->getBB();
 }
+
+
+void QGraphicsDialog::edit_clicked()
+{
+       form_->controller().editGraphics();
+}
index 15a696cae322c1700521aa613c09592ff95a499c..c2916b1410de2417fbe3fb3fc22c14519295ab14 100644 (file)
@@ -30,6 +30,7 @@ protected slots:
        virtual void change_WUnit();
        virtual void browse_clicked();
        virtual void getBB_clicked();
+       virtual void edit_clicked();
 protected:
        virtual void closeEvent(QCloseEvent * e);
 private:
index b187c8222caafed88a95985dc0333db279ba3050..cb6fb8361cca20dbe0d9dfc75c72c71d16b3f714 100644 (file)
@@ -381,6 +381,7 @@ void QPrefsDialog::switch_format(int nr)
        fileformatsModule->extensionED->setText(toqstr(f.extension()));
        fileformatsModule->shortcutED->setText(toqstr(f.shortcut()));
        fileformatsModule->viewerED->setText(toqstr(f.viewer()));
+       fileformatsModule->editorED->setText(toqstr(f.editor()));
        fileformatsModule->formatRemovePB->setEnabled(
                !form_->converters().formatIsUsed(f.name()));
 }
@@ -407,10 +408,10 @@ void QPrefsDialog::modify_format()
        string const extension = fromqstr(fileformatsModule->extensionED->text());
        string const shortcut = fromqstr(fileformatsModule->shortcutED->text());
        string const viewer = fromqstr(fileformatsModule->viewerED->text());
+       string const editor = fromqstr(fileformatsModule->editorED->text());
 
-       form_->formats().add(name, extension, prettyname, shortcut);
+       form_->formats().add(name, extension, prettyname, shortcut, viewer, editor);
        form_->formats().sort();
-       form_->formats().setViewer(name, viewer);
 
        fileformatsModule->formatsLB->setUpdatesEnabled(false);
        updateFormats();
index c3c5f098db9c28756aea90d7b2d8ebc4e75c5327..c07962c6eb32889e14776ec9463a9d304bcc573a 100644 (file)
@@ -13,8 +13,8 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>392</width>
-            <height>494</height>
+            <width>459</width>
+            <height>549</height>
         </rect>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
         <bool>true</bool>
     </property>
-    <vbox>
+    <widget>
+        <class>QLayoutWidget</class>
         <property stdset="1">
-            <name>margin</name>
-            <number>11</number>
+            <name>name</name>
+            <cstring>Layout20</cstring>
         </property>
         <property stdset="1">
-            <name>spacing</name>
-            <number>6</number>
+            <name>geometry</name>
+            <rect>
+                <x>11</x>
+                <y>500</y>
+                <width>437</width>
+                <height>38</height>
+            </rect>
         </property>
-        <widget>
-            <class>QTabWidget</class>
+        <hbox>
             <property stdset="1">
-                <name>name</name>
-                <cstring>TabWidget</cstring>
+                <name>margin</name>
+                <number>0</number>
             </property>
-            <property>
-                <name>toolTip</name>
-                <string></string>
+            <property stdset="1">
+                <name>spacing</name>
+                <number>6</number>
             </property>
             <widget>
-                <class>QWidget</class>
+                <class>QPushButton</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>restorePB</cstring>
+                </property>
+                <property stdset="1">
+                    <name>text</name>
+                    <string>&amp;Restore</string>
+                </property>
+                <property stdset="1">
+                    <name>autoDefault</name>
+                    <bool>false</bool>
+                </property>
+                <property stdset="1">
+                    <name>default</name>
+                    <bool>false</bool>
+                </property>
+            </widget>
+            <spacer>
+                <property>
+                    <name>name</name>
+                    <cstring>Spacer3</cstring>
+                </property>
+                <property stdset="1">
+                    <name>orientation</name>
+                    <enum>Horizontal</enum>
+                </property>
+                <property stdset="1">
+                    <name>sizeType</name>
+                    <enum>MinimumExpanding</enum>
+                </property>
+                <property>
+                    <name>sizeHint</name>
+                    <size>
+                        <width>20</width>
+                        <height>20</height>
+                    </size>
+                </property>
+            </spacer>
+            <widget>
+                <class>QPushButton</class>
                 <property stdset="1">
                     <name>name</name>
-                    <cstring>tab</cstring>
+                    <cstring>okPB</cstring>
                 </property>
-                <attribute>
-                    <name>title</name>
-                    <string>&amp;Graphics</string>
-                </attribute>
-                <grid>
+                <property stdset="1">
+                    <name>text</name>
+                    <string>OK</string>
+                </property>
+                <property stdset="1">
+                    <name>autoDefault</name>
+                    <bool>true</bool>
+                </property>
+                <property stdset="1">
+                    <name>default</name>
+                    <bool>true</bool>
+                </property>
+            </widget>
+            <widget>
+                <class>QPushButton</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>applyPB</cstring>
+                </property>
+                <property stdset="1">
+                    <name>sizePolicy</name>
+                    <sizepolicy>
+                        <hsizetype>1</hsizetype>
+                        <vsizetype>0</vsizetype>
+                    </sizepolicy>
+                </property>
+                <property stdset="1">
+                    <name>text</name>
+                    <string>&amp;Apply</string>
+                </property>
+                <property stdset="1">
+                    <name>autoDefault</name>
+                    <bool>false</bool>
+                </property>
+                <property stdset="1">
+                    <name>default</name>
+                    <bool>false</bool>
+                </property>
+            </widget>
+            <widget>
+                <class>QPushButton</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>closePB</cstring>
+                </property>
+                <property stdset="1">
+                    <name>sizePolicy</name>
+                    <sizepolicy>
+                        <hsizetype>1</hsizetype>
+                        <vsizetype>0</vsizetype>
+                    </sizepolicy>
+                </property>
+                <property stdset="1">
+                    <name>text</name>
+                    <string>Close</string>
+                </property>
+                <property stdset="1">
+                    <name>autoDefault</name>
+                    <bool>false</bool>
+                </property>
+            </widget>
+        </hbox>
+    </widget>
+    <widget>
+        <class>QTabWidget</class>
+        <property stdset="1">
+            <name>name</name>
+            <cstring>TabWidget</cstring>
+        </property>
+        <property stdset="1">
+            <name>geometry</name>
+            <rect>
+                <x>11</x>
+                <y>11</y>
+                <width>440</width>
+                <height>487</height>
+            </rect>
+        </property>
+        <property>
+            <name>toolTip</name>
+            <string></string>
+        </property>
+        <widget>
+            <class>QWidget</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>tab</cstring>
+            </property>
+            <attribute>
+                <name>title</name>
+                <string>&amp;Graphics</string>
+            </attribute>
+            <grid>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>11</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>6</number>
+                </property>
+                <spacer row="3"  column="1" >
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer11</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>orientation</name>
+                        <enum>Vertical</enum>
+                    </property>
+                    <property stdset="1">
+                        <name>sizeType</name>
+                        <enum>Expanding</enum>
+                    </property>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+                <widget row="2"  column="0"  rowspan="1"  colspan="2" >
+                    <class>QGroupBox</class>
                     <property stdset="1">
-                        <name>margin</name>
-                        <number>11</number>
+                        <name>name</name>
+                        <cstring>rotateGB</cstring>
                     </property>
                     <property stdset="1">
-                        <name>spacing</name>
-                        <number>6</number>
+                        <name>title</name>
+                        <string>Rotation</string>
                     </property>
-                    <widget row="0"  column="0"  rowspan="1"  colspan="2" >
-                        <class>QLayoutWidget</class>
+                    <hbox>
                         <property stdset="1">
-                            <name>name</name>
-                            <cstring>Layout2</cstring>
+                            <name>margin</name>
+                            <number>11</number>
                         </property>
-                        <hbox>
+                        <property stdset="1">
+                            <name>spacing</name>
+                            <number>6</number>
+                        </property>
+                        <widget>
+                            <class>QLabel</class>
                             <property stdset="1">
-                                <name>margin</name>
-                                <number>0</number>
+                                <name>name</name>
+                                <cstring>angleL_2</cstring>
                             </property>
                             <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
+                                <name>text</name>
+                                <string>A&amp;ngle:</string>
                             </property>
-                            <widget>
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>filenameL</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>&amp;File:</string>
-                                </property>
-                                <property>
-                                    <name>buddy</name>
-                                    <cstring>filename</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>File name of image</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QLineEdit</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>filename</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>File name of image</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QPushButton</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>browsePB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>&amp;Browse...</string>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Select an image file</string>
-                                </property>
-                            </widget>
-                        </hbox>
-                    </widget>
-                    <spacer row="3"  column="1" >
-                        <property>
-                            <name>name</name>
-                            <cstring>Spacer11</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>orientation</name>
-                            <enum>Vertical</enum>
-                        </property>
-                        <property stdset="1">
-                            <name>sizeType</name>
-                            <enum>Expanding</enum>
-                        </property>
-                        <property>
-                            <name>sizeHint</name>
-                            <size>
-                                <width>20</width>
-                                <height>20</height>
-                            </size>
-                        </property>
-                    </spacer>
-                    <widget row="1"  column="1" >
-                        <class>QGroupBox</class>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>angle</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Angle to rotate image by</string>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>angle</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>sizePolicy</name>
+                                <sizepolicy>
+                                    <hsizetype>3</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                </sizepolicy>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Angle to rotate image by</string>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>originL_2</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Origin:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>origin</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>The origin of the rotation</string>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QComboBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>origin</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>The origin of the rotation</string>
+                            </property>
+                        </widget>
+                    </hbox>
+                </widget>
+                <widget row="1"  column="0" >
+                    <class>QGroupBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>GroupBox5</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>title</name>
+                        <string>LyX Display</string>
+                    </property>
+                    <vbox>
                         <property stdset="1">
-                            <name>name</name>
-                            <cstring>GroupBox11</cstring>
+                            <name>margin</name>
+                            <number>11</number>
                         </property>
                         <property stdset="1">
-                            <name>title</name>
-                            <string>Output</string>
+                            <name>spacing</name>
+                            <number>6</number>
                         </property>
-                        <vbox>
+                        <widget>
+                            <class>QCheckBox</class>
                             <property stdset="1">
-                                <name>margin</name>
-                                <number>11</number>
+                                <name>name</name>
+                                <cstring>displayCB</cstring>
                             </property>
                             <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
+                                <name>text</name>
+                                <string>&amp;Show in LyX</string>
                             </property>
-                            <widget>
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>sizewidthL_2</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>enabled</name>
-                                    <bool>true</bool>
-                                </property>
-                                <property stdset="1">
+                            <property>
+                                <name>toolTip</name>
+                                <string>Display image in LyX</string>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>TextLabel1</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>Display:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>showCB</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Screen display</string>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QComboBox</class>
+                            <item>
+                                <property>
                                     <name>text</name>
-                                    <string>&amp;Width:</string>
+                                    <string>Default</string>
                                 </property>
+                            </item>
+                            <item>
                                 <property>
-                                    <name>buddy</name>
-                                    <cstring>width</cstring>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QLayoutWidget</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>Layout8</cstring>
-                                </property>
-                                <vbox>
-                                    <property stdset="1">
-                                        <name>margin</name>
-                                        <number>0</number>
-                                    </property>
-                                    <property stdset="1">
-                                        <name>spacing</name>
-                                        <number>6</number>
-                                    </property>
-                                    <widget>
-                                        <class>QLineEdit</class>
-                                        <property stdset="1">
-                                            <name>name</name>
-                                            <cstring>width</cstring>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>enabled</name>
-                                            <bool>true</bool>
-                                        </property>
-                                        <property>
-                                            <name>toolTip</name>
-                                            <string>Width of image in output</string>
-                                        </property>
-                                    </widget>
-                                    <widget>
-                                        <class>QComboBox</class>
-                                        <property stdset="1">
-                                            <name>name</name>
-                                            <cstring>widthUnit</cstring>
-                                        </property>
-                                    </widget>
-                                </vbox>
-                            </widget>
-                            <widget>
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>sizeheightL_2</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>enabled</name>
-                                    <bool>true</bool>
-                                </property>
-                                <property stdset="1">
                                     <name>text</name>
-                                    <string>&amp;Height:</string>
+                                    <string>Monochrome</string>
                                 </property>
+                            </item>
+                            <item>
                                 <property>
-                                    <name>buddy</name>
-                                    <cstring>height</cstring>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QLayoutWidget</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>Layout9</cstring>
-                                </property>
-                                <vbox>
-                                    <property stdset="1">
-                                        <name>margin</name>
-                                        <number>0</number>
-                                    </property>
-                                    <property stdset="1">
-                                        <name>spacing</name>
-                                        <number>6</number>
-                                    </property>
-                                    <widget>
-                                        <class>QLineEdit</class>
-                                        <property stdset="1">
-                                            <name>name</name>
-                                            <cstring>height</cstring>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>enabled</name>
-                                            <bool>true</bool>
-                                        </property>
-                                        <property>
-                                            <name>toolTip</name>
-                                            <string>Height of image in output</string>
-                                        </property>
-                                    </widget>
-                                    <widget>
-                                        <class>LengthCombo</class>
-                                        <property stdset="1">
-                                            <name>name</name>
-                                            <cstring>heightUnit</cstring>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>sizePolicy</name>
-                                            <sizepolicy>
-                                                <hsizetype>3</hsizetype>
-                                                <vsizetype>5</vsizetype>
-                                            </sizepolicy>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>minimumSize</name>
-                                            <size>
-                                                <width>0</width>
-                                                <height>0</height>
-                                            </size>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>focusPolicy</name>
-                                            <enum>StrongFocus</enum>
-                                        </property>
-                                        <property>
-                                            <name>toolTip</name>
-                                            <string>Units of height value</string>
-                                        </property>
-                                    </widget>
-                                </vbox>
-                            </widget>
-                            <widget>
-                                <class>QCheckBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>aspectratio</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>enabled</name>
-                                    <bool>true</bool>
-                                </property>
-                                <property stdset="1">
                                     <name>text</name>
-                                    <string>&amp;Maintain aspect ratio</string>
+                                    <string>Grayscale</string>
                                 </property>
+                            </item>
+                            <item>
                                 <property>
-                                    <name>toolTip</name>
-                                    <string>Maintain aspect ratio with largest dimension</string>
+                                    <name>text</name>
+                                    <string>Color</string>
                                 </property>
-                            </widget>
-                        </vbox>
-                    </widget>
-                    <widget row="1"  column="0" >
-                        <class>QGroupBox</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>GroupBox5</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>title</name>
-                            <string>LyX Display</string>
-                        </property>
-                        <vbox>
+                            </item>
                             <property stdset="1">
-                                <name>margin</name>
-                                <number>11</number>
+                                <name>name</name>
+                                <cstring>showCB</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Screen display</string>
                             </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
                             <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
+                                <name>name</name>
+                                <cstring>scaleLA</cstring>
                             </property>
-                            <widget>
-                                <class>QCheckBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>displayCB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>&amp;Show in LyX</string>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Display image in LyX</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QLabel</class>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>Scale:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>displayscale</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Percentage to scale by in LyX</string>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLayoutWidget</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>Layout10</cstring>
+                            </property>
+                            <hbox>
                                 <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>TextLabel1</cstring>
+                                    <name>margin</name>
+                                    <number>0</number>
                                 </property>
                                 <property stdset="1">
-                                    <name>text</name>
-                                    <string>Display:</string>
-                                </property>
-                                <property>
-                                    <name>buddy</name>
-                                    <cstring>showCB</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Screen display</string>
+                                    <name>spacing</name>
+                                    <number>6</number>
                                 </property>
-                            </widget>
-                            <widget>
-                                <class>QComboBox</class>
-                                <item>
-                                    <property>
-                                        <name>text</name>
-                                        <string>Default</string>
+                                <widget>
+                                    <class>QLineEdit</class>
+                                    <property stdset="1">
+                                        <name>name</name>
+                                        <cstring>displayscale</cstring>
                                     </property>
-                                </item>
-                                <item>
-                                    <property>
-                                        <name>text</name>
-                                        <string>Monochrome</string>
+                                    <property stdset="1">
+                                        <name>enabled</name>
+                                        <bool>true</bool>
                                     </property>
-                                </item>
-                                <item>
-                                    <property>
-                                        <name>text</name>
-                                        <string>Grayscale</string>
+                                    <property stdset="1">
+                                        <name>sizePolicy</name>
+                                        <sizepolicy>
+                                            <hsizetype>5</hsizetype>
+                                            <vsizetype>0</vsizetype>
+                                        </sizepolicy>
                                     </property>
-                                </item>
-                                <item>
                                     <property>
-                                        <name>text</name>
-                                        <string>Color</string>
+                                        <name>toolTip</name>
+                                        <string>Percentage to scale by in LyX</string>
+                                    </property>
+                                </widget>
+                                <widget>
+                                    <class>QLabel</class>
+                                    <property stdset="1">
+                                        <name>name</name>
+                                        <cstring>displayscaleL</cstring>
                                     </property>
-                                </item>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>showCB</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Screen display</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>scaleLA</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>Scale:</string>
-                                </property>
-                                <property>
-                                    <name>buddy</name>
-                                    <cstring>displayscale</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Percentage to scale by in LyX</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QLayoutWidget</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>Layout10</cstring>
-                                </property>
-                                <hbox>
                                     <property stdset="1">
-                                        <name>margin</name>
-                                        <number>0</number>
+                                        <name>enabled</name>
+                                        <bool>true</bool>
                                     </property>
                                     <property stdset="1">
-                                        <name>spacing</name>
-                                        <number>6</number>
+                                        <name>focusPolicy</name>
+                                        <enum>NoFocus</enum>
                                     </property>
-                                    <widget>
-                                        <class>QLineEdit</class>
-                                        <property stdset="1">
-                                            <name>name</name>
-                                            <cstring>displayscale</cstring>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>enabled</name>
-                                            <bool>true</bool>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>sizePolicy</name>
-                                            <sizepolicy>
-                                                <hsizetype>5</hsizetype>
-                                                <vsizetype>0</vsizetype>
-                                            </sizepolicy>
-                                        </property>
-                                        <property>
-                                            <name>toolTip</name>
-                                            <string>Percentage to scale by in LyX</string>
-                                        </property>
-                                    </widget>
-                                    <widget>
-                                        <class>QLabel</class>
-                                        <property stdset="1">
-                                            <name>name</name>
-                                            <cstring>displayscaleL</cstring>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>enabled</name>
-                                            <bool>true</bool>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>focusPolicy</name>
-                                            <enum>NoFocus</enum>
-                                        </property>
-                                        <property stdset="1">
-                                            <name>text</name>
-                                            <string>%</string>
-                                        </property>
-                                    </widget>
-                                </hbox>
-                            </widget>
-                        </vbox>
-                    </widget>
-                    <widget row="2"  column="0"  rowspan="1"  colspan="2" >
-                        <class>QGroupBox</class>
+                                    <property stdset="1">
+                                        <name>text</name>
+                                        <string>%</string>
+                                    </property>
+                                </widget>
+                            </hbox>
+                        </widget>
+                    </vbox>
+                </widget>
+                <widget row="1"  column="1" >
+                    <class>QGroupBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>GroupBox11</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>title</name>
+                        <string>Output</string>
+                    </property>
+                    <vbox>
                         <property stdset="1">
-                            <name>name</name>
-                            <cstring>rotateGB</cstring>
+                            <name>margin</name>
+                            <number>11</number>
                         </property>
                         <property stdset="1">
-                            <name>title</name>
-                            <string>Rotation</string>
+                            <name>spacing</name>
+                            <number>6</number>
                         </property>
-                        <hbox>
+                        <widget>
+                            <class>QLabel</class>
                             <property stdset="1">
-                                <name>margin</name>
-                                <number>11</number>
+                                <name>name</name>
+                                <cstring>sizewidthL_2</cstring>
                             </property>
                             <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
+                                <name>enabled</name>
+                                <bool>true</bool>
                             </property>
-                            <widget>
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>angleL_2</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>A&amp;ngle:</string>
-                                </property>
-                                <property>
-                                    <name>buddy</name>
-                                    <cstring>angle</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Angle to rotate image by</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QLineEdit</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>angle</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>sizePolicy</name>
-                                    <sizepolicy>
-                                        <hsizetype>3</hsizetype>
-                                        <vsizetype>0</vsizetype>
-                                    </sizepolicy>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Angle to rotate image by</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>originL_2</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>&amp;Origin:</string>
-                                </property>
-                                <property>
-                                    <name>buddy</name>
-                                    <cstring>origin</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>The origin of the rotation</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QComboBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>origin</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>The origin of the rotation</string>
-                                </property>
-                            </widget>
-                        </hbox>
-                    </widget>
-                </grid>
-            </widget>
-            <widget>
-                <class>QWidget</class>
-                <property stdset="1">
-                    <name>name</name>
-                    <cstring>tab</cstring>
-                </property>
-                <attribute>
-                    <name>title</name>
-                    <string>&amp;Clipping</string>
-                </attribute>
-                <grid>
-                    <property stdset="1">
-                        <name>margin</name>
-                        <number>11</number>
-                    </property>
-                    <property stdset="1">
-                        <name>spacing</name>
-                        <number>6</number>
-                    </property>
-                    <widget row="0"  column="0"  rowspan="1"  colspan="2" >
-                        <class>QLayoutWidget</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>Layout7</cstring>
-                        </property>
-                        <hbox>
                             <property stdset="1">
-                                <name>margin</name>
-                                <number>0</number>
+                                <name>text</name>
+                                <string>&amp;Width:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>width</cstring>
                             </property>
+                        </widget>
+                        <widget>
+                            <class>QLayoutWidget</class>
                             <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
+                                <name>name</name>
+                                <cstring>Layout8</cstring>
                             </property>
-                            <widget>
-                                <class>QCheckBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>clip</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>Clip to &amp;bounding box</string>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Clip to bounding box values</string>
-                                </property>
-                            </widget>
-                            <spacer>
-                                <property>
-                                    <name>name</name>
-                                    <cstring>Spacer48</cstring>
-                                </property>
+                            <vbox>
                                 <property stdset="1">
-                                    <name>orientation</name>
-                                    <enum>Horizontal</enum>
+                                    <name>margin</name>
+                                    <number>0</number>
                                 </property>
                                 <property stdset="1">
-                                    <name>sizeType</name>
-                                    <enum>Expanding</enum>
+                                    <name>spacing</name>
+                                    <number>6</number>
                                 </property>
-                                <property>
-                                    <name>sizeHint</name>
-                                    <size>
-                                        <width>20</width>
-                                        <height>20</height>
-                                    </size>
-                                </property>
-                            </spacer>
-                            <widget>
-                                <class>QPushButton</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>getPB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>&amp;Get from File</string>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Get bounding box from the (EPS) file</string>
-                                </property>
-                            </widget>
-                        </hbox>
-                    </widget>
-                    <widget row="1"  column="0" >
-                        <class>QFrame</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>Frame3</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>enabled</name>
-                            <bool>true</bool>
-                        </property>
-                        <property stdset="1">
-                            <name>sizePolicy</name>
-                            <sizepolicy>
-                                <hsizetype>5</hsizetype>
-                                <vsizetype>7</vsizetype>
-                            </sizepolicy>
-                        </property>
-                        <property stdset="1">
-                            <name>frameShape</name>
-                            <enum>StyledPanel</enum>
-                        </property>
-                        <property stdset="1">
-                            <name>frameShadow</name>
-                            <enum>Raised</enum>
-                        </property>
-                        <grid>
+                                <widget>
+                                    <class>QLineEdit</class>
+                                    <property stdset="1">
+                                        <name>name</name>
+                                        <cstring>width</cstring>
+                                    </property>
+                                    <property stdset="1">
+                                        <name>enabled</name>
+                                        <bool>true</bool>
+                                    </property>
+                                    <property>
+                                        <name>toolTip</name>
+                                        <string>Width of image in output</string>
+                                    </property>
+                                </widget>
+                                <widget>
+                                    <class>QComboBox</class>
+                                    <property stdset="1">
+                                        <name>name</name>
+                                        <cstring>widthUnit</cstring>
+                                    </property>
+                                </widget>
+                            </vbox>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
                             <property stdset="1">
-                                <name>margin</name>
-                                <number>11</number>
+                                <name>name</name>
+                                <cstring>sizeheightL_2</cstring>
                             </property>
                             <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
+                                <name>enabled</name>
+                                <bool>true</bool>
                             </property>
-                            <widget row="1"  column="2" >
-                                <class>QComboBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>lbXunit</cstring>
-                                </property>
-                            </widget>
-                            <widget row="2"  column="0" >
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>yL</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>y</string>
-                                </property>
-                            </widget>
-                            <widget row="2"  column="2" >
-                                <class>QComboBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>lbYunit</cstring>
-                                </property>
-                            </widget>
-                            <widget row="1"  column="0" >
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>xL</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>x</string>
-                                </property>
-                            </widget>
-                            <widget row="2"  column="1" >
-                                <class>QLineEdit</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>lbY</cstring>
-                                </property>
-                            </widget>
-                            <widget row="1"  column="1" >
-                                <class>QLineEdit</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>lbX</cstring>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string></string>
-                                </property>
-                            </widget>
-                            <widget row="0"  column="1"  rowspan="1"  colspan="2" >
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>lbL</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>&amp;Left bottom:</string>
-                                </property>
-                                <property>
-                                    <name>buddy</name>
-                                    <cstring>lbX</cstring>
-                                </property>
-                            </widget>
-                            <widget row="5"  column="2" >
-                                <class>QComboBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rtYunit</cstring>
-                                </property>
-                            </widget>
-                            <widget row="4"  column="2" >
-                                <class>QComboBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rtXunit</cstring>
-                                </property>
-                            </widget>
-                            <widget row="4"  column="1" >
-                                <class>QLineEdit</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rtX</cstring>
-                                </property>
-                            </widget>
-                            <widget row="4"  column="0" >
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>xL_2</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>x</string>
-                                </property>
-                            </widget>
-                            <widget row="3"  column="0"  rowspan="1"  colspan="3" >
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rtL</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>Right &amp;top:</string>
-                                </property>
-                                <property>
-                                    <name>buddy</name>
-                                    <cstring>rtX</cstring>
-                                </property>
-                            </widget>
-                            <widget row="5"  column="0" >
-                                <class>QLabel</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>yL_2</cstring>
-                                </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Height:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>height</cstring>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLayoutWidget</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>Layout9</cstring>
+                            </property>
+                            <vbox>
                                 <property stdset="1">
-                                    <name>text</name>
-                                    <string>y</string>
+                                    <name>margin</name>
+                                    <number>0</number>
                                 </property>
-                            </widget>
-                            <widget row="5"  column="1" >
-                                <class>QLineEdit</class>
                                 <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rtY</cstring>
+                                    <name>spacing</name>
+                                    <number>6</number>
                                 </property>
-                            </widget>
-                        </grid>
-                    </widget>
-                    <spacer row="2"  column="0" >
-                        <property>
-                            <name>name</name>
-                            <cstring>Spacer48_2</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>orientation</name>
-                            <enum>Vertical</enum>
-                        </property>
-                        <property stdset="1">
-                            <name>sizeType</name>
-                            <enum>MinimumExpanding</enum>
-                        </property>
-                        <property>
-                            <name>sizeHint</name>
-                            <size>
-                                <width>20</width>
-                                <height>20</height>
-                            </size>
-                        </property>
-                    </spacer>
-                </grid>
-            </widget>
-            <widget>
-                <class>QWidget</class>
-                <property stdset="1">
-                    <name>name</name>
-                    <cstring>tab</cstring>
-                </property>
-                <attribute>
-                    <name>title</name>
-                    <string>E&amp;xtra options</string>
-                </attribute>
-                <grid>
-                    <property stdset="1">
-                        <name>margin</name>
-                        <number>11</number>
-                    </property>
-                    <property stdset="1">
-                        <name>spacing</name>
-                        <number>6</number>
-                    </property>
-                    <widget row="0"  column="0"  rowspan="1"  colspan="2" >
-                        <class>QCheckBox</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>subfigure</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>text</name>
-                            <string>Su&amp;bfigure</string>
-                        </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>Is this just one part of a figure float ?</string>
-                        </property>
-                    </widget>
-                    <widget row="7"  column="0"  rowspan="1"  colspan="2" >
-                        <class>QCheckBox</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>unzipCB</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>text</name>
-                            <string>Don't un&amp;zip on export</string>
-                        </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>Don't uncompress image before exporting to LaTeX</string>
-                        </property>
-                    </widget>
-                    <widget row="3"  column="0" >
-                        <class>QLabel</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>latexoptionsLA</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>text</name>
-                            <string>LaTeX &amp;options:</string>
-                        </property>
-                        <property>
-                            <name>buddy</name>
-                            <cstring>latexoptions</cstring>
-                        </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>Additional LaTeX options</string>
-                        </property>
-                    </widget>
-                    <widget row="3"  column="1" >
-                        <class>QLineEdit</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>latexoptions</cstring>
-                        </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>Additional LaTeX options</string>
-                        </property>
-                    </widget>
-                    <widget row="5"  column="0"  rowspan="1"  colspan="2" >
-                        <class>QCheckBox</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>draftCB</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>text</name>
-                            <string>&amp;Draft mode</string>
-                        </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>Draft mode</string>
-                        </property>
-                    </widget>
-                    <spacer row="4"  column="0"  rowspan="1"  colspan="2" >
-                        <property>
-                            <name>name</name>
-                            <cstring>Spacer37</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>orientation</name>
-                            <enum>Horizontal</enum>
-                        </property>
-                        <property stdset="1">
-                            <name>sizeType</name>
-                            <enum>Expanding</enum>
-                        </property>
-                        <property>
-                            <name>sizeHint</name>
-                            <size>
-                                <width>20</width>
-                                <height>20</height>
-                            </size>
-                        </property>
-                    </spacer>
-                    <spacer row="6"  column="0"  rowspan="1"  colspan="2" >
-                        <property>
-                            <name>name</name>
-                            <cstring>Spacer38</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>orientation</name>
-                            <enum>Horizontal</enum>
-                        </property>
-                        <property stdset="1">
-                            <name>sizeType</name>
-                            <enum>Expanding</enum>
-                        </property>
-                        <property>
-                            <name>sizeHint</name>
-                            <size>
-                                <width>20</width>
-                                <height>20</height>
-                            </size>
-                        </property>
-                    </spacer>
-                    <spacer row="2"  column="0"  rowspan="1"  colspan="2" >
-                        <property>
-                            <name>name</name>
-                            <cstring>Spacer36</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>orientation</name>
-                            <enum>Horizontal</enum>
-                        </property>
-                        <property stdset="1">
-                            <name>sizeType</name>
-                            <enum>Expanding</enum>
-                        </property>
-                        <property>
-                            <name>sizeHint</name>
-                            <size>
-                                <width>20</width>
-                                <height>20</height>
-                            </size>
-                        </property>
-                    </spacer>
-                    <widget row="1"  column="0" >
-                        <class>QLabel</class>
+                                <widget>
+                                    <class>QLineEdit</class>
+                                    <property stdset="1">
+                                        <name>name</name>
+                                        <cstring>height</cstring>
+                                    </property>
+                                    <property stdset="1">
+                                        <name>enabled</name>
+                                        <bool>true</bool>
+                                    </property>
+                                    <property>
+                                        <name>toolTip</name>
+                                        <string>Height of image in output</string>
+                                    </property>
+                                </widget>
+                                <widget>
+                                    <class>LengthCombo</class>
+                                    <property stdset="1">
+                                        <name>name</name>
+                                        <cstring>heightUnit</cstring>
+                                    </property>
+                                    <property stdset="1">
+                                        <name>sizePolicy</name>
+                                        <sizepolicy>
+                                            <hsizetype>3</hsizetype>
+                                            <vsizetype>5</vsizetype>
+                                        </sizepolicy>
+                                    </property>
+                                    <property stdset="1">
+                                        <name>minimumSize</name>
+                                        <size>
+                                            <width>0</width>
+                                            <height>0</height>
+                                        </size>
+                                    </property>
+                                    <property stdset="1">
+                                        <name>focusPolicy</name>
+                                        <enum>StrongFocus</enum>
+                                    </property>
+                                    <property>
+                                        <name>toolTip</name>
+                                        <string>Units of height value</string>
+                                    </property>
+                                </widget>
+                            </vbox>
+                        </widget>
+                        <widget>
+                            <class>QCheckBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>aspectratio</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>true</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Maintain aspect ratio</string>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Maintain aspect ratio with largest dimension</string>
+                            </property>
+                        </widget>
+                    </vbox>
+                </widget>
+                <widget row="0"  column="0"  rowspan="1"  colspan="2" >
+                    <class>QLayoutWidget</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>Layout7</cstring>
+                    </property>
+                    <grid>
                         <property stdset="1">
-                            <name>name</name>
-                            <cstring>CaptionLA</cstring>
+                            <name>margin</name>
+                            <number>0</number>
                         </property>
                         <property stdset="1">
-                            <name>text</name>
-                            <string>Ca&amp;ption:</string>
-                        </property>
-                        <property>
-                            <name>buddy</name>
-                            <cstring>subcaption</cstring>
+                            <name>spacing</name>
+                            <number>6</number>
                         </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>The caption for the sub-figure</string>
-                        </property>
-                    </widget>
-                    <widget row="1"  column="1" >
-                        <class>QLineEdit</class>
+                        <spacer row="1"  column="1" >
+                            <property>
+                                <name>name</name>
+                                <cstring>Spacer3_2</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>orientation</name>
+                                <enum>Horizontal</enum>
+                            </property>
+                            <property stdset="1">
+                                <name>sizeType</name>
+                                <enum>MinimumExpanding</enum>
+                            </property>
+                            <property>
+                                <name>sizeHint</name>
+                                <size>
+                                    <width>20</width>
+                                    <height>20</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <widget row="1"  column="2" >
+                            <class>QPushButton</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>editPB</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Edit</string>
+                            </property>
+                            <property stdset="1">
+                                <name>autoDefault</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>default</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget row="0"  column="1" >
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>filename</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>File name of image</string>
+                            </property>
+                        </widget>
+                        <widget row="0"  column="2" >
+                            <class>QPushButton</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>browsePB</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Browse...</string>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Select an image file</string>
+                            </property>
+                        </widget>
+                        <widget row="0"  column="0" >
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>filenameL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;File:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>filename</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>File name of image</string>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+            </grid>
+        </widget>
+        <widget>
+            <class>QWidget</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>tab</cstring>
+            </property>
+            <attribute>
+                <name>title</name>
+                <string>&amp;Clipping</string>
+            </attribute>
+            <grid>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>11</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>6</number>
+                </property>
+                <widget row="0"  column="0"  rowspan="1"  colspan="2" >
+                    <class>QLayoutWidget</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>Layout7</cstring>
+                    </property>
+                    <hbox>
                         <property stdset="1">
-                            <name>name</name>
-                            <cstring>subcaption</cstring>
+                            <name>margin</name>
+                            <number>0</number>
                         </property>
                         <property stdset="1">
-                            <name>enabled</name>
-                            <bool>false</bool>
-                        </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>The caption for the sub-figure</string>
-                        </property>
-                    </widget>
-                    <spacer row="8"  column="1" >
-                        <property>
-                            <name>name</name>
-                            <cstring>Spacer76</cstring>
+                            <name>spacing</name>
+                            <number>6</number>
                         </property>
+                        <widget>
+                            <class>QCheckBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>clip</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>Clip to &amp;bounding box</string>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Clip to bounding box values</string>
+                            </property>
+                        </widget>
+                        <spacer>
+                            <property>
+                                <name>name</name>
+                                <cstring>Spacer48</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>orientation</name>
+                                <enum>Horizontal</enum>
+                            </property>
+                            <property stdset="1">
+                                <name>sizeType</name>
+                                <enum>Expanding</enum>
+                            </property>
+                            <property>
+                                <name>sizeHint</name>
+                                <size>
+                                    <width>20</width>
+                                    <height>20</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <widget>
+                            <class>QPushButton</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>getPB</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Get from File</string>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Get bounding box from the (EPS) file</string>
+                            </property>
+                        </widget>
+                    </hbox>
+                </widget>
+                <widget row="1"  column="0" >
+                    <class>QFrame</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>Frame3</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>enabled</name>
+                        <bool>true</bool>
+                    </property>
+                    <property stdset="1">
+                        <name>sizePolicy</name>
+                        <sizepolicy>
+                            <hsizetype>5</hsizetype>
+                            <vsizetype>7</vsizetype>
+                        </sizepolicy>
+                    </property>
+                    <property stdset="1">
+                        <name>frameShape</name>
+                        <enum>StyledPanel</enum>
+                    </property>
+                    <property stdset="1">
+                        <name>frameShadow</name>
+                        <enum>Raised</enum>
+                    </property>
+                    <grid>
                         <property stdset="1">
-                            <name>orientation</name>
-                            <enum>Vertical</enum>
+                            <name>margin</name>
+                            <number>11</number>
                         </property>
                         <property stdset="1">
-                            <name>sizeType</name>
-                            <enum>Expanding</enum>
-                        </property>
-                        <property>
-                            <name>sizeHint</name>
-                            <size>
-                                <width>20</width>
-                                <height>20</height>
-                            </size>
+                            <name>spacing</name>
+                            <number>6</number>
                         </property>
-                    </spacer>
-                </grid>
-            </widget>
+                        <widget row="1"  column="2" >
+                            <class>QComboBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>lbXunit</cstring>
+                            </property>
+                        </widget>
+                        <widget row="2"  column="0" >
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>yL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>y</string>
+                            </property>
+                        </widget>
+                        <widget row="2"  column="2" >
+                            <class>QComboBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>lbYunit</cstring>
+                            </property>
+                        </widget>
+                        <widget row="1"  column="0" >
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>xL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>x</string>
+                            </property>
+                        </widget>
+                        <widget row="2"  column="1" >
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>lbY</cstring>
+                            </property>
+                        </widget>
+                        <widget row="1"  column="1" >
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>lbX</cstring>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string></string>
+                            </property>
+                        </widget>
+                        <widget row="0"  column="1"  rowspan="1"  colspan="2" >
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>lbL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Left bottom:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>lbX</cstring>
+                            </property>
+                        </widget>
+                        <widget row="5"  column="2" >
+                            <class>QComboBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>rtYunit</cstring>
+                            </property>
+                        </widget>
+                        <widget row="4"  column="2" >
+                            <class>QComboBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>rtXunit</cstring>
+                            </property>
+                        </widget>
+                        <widget row="4"  column="1" >
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>rtX</cstring>
+                            </property>
+                        </widget>
+                        <widget row="4"  column="0" >
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>xL_2</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>x</string>
+                            </property>
+                        </widget>
+                        <widget row="3"  column="0"  rowspan="1"  colspan="3" >
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>rtL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>Right &amp;top:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>rtX</cstring>
+                            </property>
+                        </widget>
+                        <widget row="5"  column="0" >
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>yL_2</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>y</string>
+                            </property>
+                        </widget>
+                        <widget row="5"  column="1" >
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>rtY</cstring>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+                <spacer row="2"  column="0" >
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer48_2</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>orientation</name>
+                        <enum>Vertical</enum>
+                    </property>
+                    <property stdset="1">
+                        <name>sizeType</name>
+                        <enum>MinimumExpanding</enum>
+                    </property>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+            </grid>
         </widget>
         <widget>
-            <class>QLayoutWidget</class>
+            <class>QWidget</class>
             <property stdset="1">
                 <name>name</name>
-                <cstring>Layout20</cstring>
+                <cstring>tab</cstring>
             </property>
-            <hbox>
+            <attribute>
+                <name>title</name>
+                <string>E&amp;xtra options</string>
+            </attribute>
+            <grid>
                 <property stdset="1">
                     <name>margin</name>
-                    <number>0</number>
+                    <number>11</number>
                 </property>
                 <property stdset="1">
                     <name>spacing</name>
                     <number>6</number>
                 </property>
-                <widget>
-                    <class>QPushButton</class>
+                <widget row="0"  column="0"  rowspan="1"  colspan="2" >
+                    <class>QCheckBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>subfigure</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Su&amp;bfigure</string>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>Is this just one part of a figure float ?</string>
+                    </property>
+                </widget>
+                <widget row="7"  column="0"  rowspan="1"  colspan="2" >
+                    <class>QCheckBox</class>
                     <property stdset="1">
                         <name>name</name>
-                        <cstring>restorePB</cstring>
+                        <cstring>unzipCB</cstring>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>&amp;Restore</string>
+                        <string>Don't un&amp;zip on export</string>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>Don't uncompress image before exporting to LaTeX</string>
                     </property>
+                </widget>
+                <widget row="3"  column="0" >
+                    <class>QLabel</class>
                     <property stdset="1">
-                        <name>autoDefault</name>
-                        <bool>false</bool>
+                        <name>name</name>
+                        <cstring>latexoptionsLA</cstring>
                     </property>
                     <property stdset="1">
-                        <name>default</name>
-                        <bool>false</bool>
+                        <name>text</name>
+                        <string>LaTeX &amp;options:</string>
+                    </property>
+                    <property>
+                        <name>buddy</name>
+                        <cstring>latexoptions</cstring>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>Additional LaTeX options</string>
+                    </property>
+                </widget>
+                <widget row="3"  column="1" >
+                    <class>QLineEdit</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>latexoptions</cstring>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>Additional LaTeX options</string>
+                    </property>
+                </widget>
+                <widget row="5"  column="0"  rowspan="1"  colspan="2" >
+                    <class>QCheckBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>draftCB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Draft mode</string>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>Draft mode</string>
                     </property>
                 </widget>
-                <spacer>
+                <spacer row="4"  column="0"  rowspan="1"  colspan="2" >
                     <property>
                         <name>name</name>
-                        <cstring>Spacer3</cstring>
+                        <cstring>Spacer37</cstring>
                     </property>
                     <property stdset="1">
                         <name>orientation</name>
                     </property>
                     <property stdset="1">
                         <name>sizeType</name>
-                        <enum>MinimumExpanding</enum>
+                        <enum>Expanding</enum>
                     </property>
                     <property>
                         <name>sizeHint</name>
                         </size>
                     </property>
                 </spacer>
-                <widget>
-                    <class>QPushButton</class>
-                    <property stdset="1">
+                <spacer row="6"  column="0"  rowspan="1"  colspan="2" >
+                    <property>
                         <name>name</name>
-                        <cstring>okPB</cstring>
+                        <cstring>Spacer38</cstring>
                     </property>
                     <property stdset="1">
-                        <name>text</name>
-                        <string>OK</string>
+                        <name>orientation</name>
+                        <enum>Horizontal</enum>
                     </property>
                     <property stdset="1">
-                        <name>autoDefault</name>
-                        <bool>true</bool>
+                        <name>sizeType</name>
+                        <enum>Expanding</enum>
+                    </property>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+                <spacer row="2"  column="0"  rowspan="1"  colspan="2" >
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer36</cstring>
                     </property>
                     <property stdset="1">
-                        <name>default</name>
-                        <bool>true</bool>
+                        <name>orientation</name>
+                        <enum>Horizontal</enum>
                     </property>
-                </widget>
-                <widget>
-                    <class>QPushButton</class>
                     <property stdset="1">
-                        <name>name</name>
-                        <cstring>applyPB</cstring>
+                        <name>sizeType</name>
+                        <enum>Expanding</enum>
+                    </property>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
                     </property>
+                </spacer>
+                <widget row="1"  column="0" >
+                    <class>QLabel</class>
                     <property stdset="1">
-                        <name>sizePolicy</name>
-                        <sizepolicy>
-                            <hsizetype>1</hsizetype>
-                            <vsizetype>0</vsizetype>
-                        </sizepolicy>
+                        <name>name</name>
+                        <cstring>CaptionLA</cstring>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>&amp;Apply</string>
+                        <string>Ca&amp;ption:</string>
+                    </property>
+                    <property>
+                        <name>buddy</name>
+                        <cstring>subcaption</cstring>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>The caption for the sub-figure</string>
                     </property>
+                </widget>
+                <widget row="1"  column="1" >
+                    <class>QLineEdit</class>
                     <property stdset="1">
-                        <name>autoDefault</name>
-                        <bool>false</bool>
+                        <name>name</name>
+                        <cstring>subcaption</cstring>
                     </property>
                     <property stdset="1">
-                        <name>default</name>
+                        <name>enabled</name>
                         <bool>false</bool>
                     </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>The caption for the sub-figure</string>
+                    </property>
                 </widget>
-                <widget>
-                    <class>QPushButton</class>
-                    <property stdset="1">
+                <spacer row="8"  column="1" >
+                    <property>
                         <name>name</name>
-                        <cstring>closePB</cstring>
+                        <cstring>Spacer76</cstring>
                     </property>
                     <property stdset="1">
-                        <name>sizePolicy</name>
-                        <sizepolicy>
-                            <hsizetype>1</hsizetype>
-                            <vsizetype>0</vsizetype>
-                        </sizepolicy>
+                        <name>orientation</name>
+                        <enum>Vertical</enum>
                     </property>
                     <property stdset="1">
-                        <name>text</name>
-                        <string>Close</string>
+                        <name>sizeType</name>
+                        <enum>Expanding</enum>
                     </property>
-                    <property stdset="1">
-                        <name>autoDefault</name>
-                        <bool>false</bool>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
                     </property>
-                </widget>
-            </hbox>
+                </spacer>
+            </grid>
         </widget>
-    </vbox>
+    </widget>
 </widget>
 <customwidgets>
     <customwidget>
index 2f45ff9574270c02392073aaf4690e9274b75454..173ec5260007e43dd64bf2536a83145a6061297f 100644 (file)
                                 <cstring>viewerED</cstring>
                             </property>
                         </widget>
+                        <widget row="5"  column="1" >
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>editorED</cstring>
+                            </property>
+                        </widget>
                         <widget row="2"  column="1" >
                             <class>QLineEdit</class>
                             <property stdset="1">
                                 <cstring>viewerED</cstring>
                             </property>
                         </widget>
+                        <widget row="5"  column="0" >
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>editorLA</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>Ed&amp;itor:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>editorED</cstring>
+                            </property>
+                        </widget>
                         <widget row="0"  column="1" >
                             <class>QLineEdit</class>
                             <property stdset="1">
     <tabstop>shortcutED</tabstop>
     <tabstop>extensionED</tabstop>
     <tabstop>viewerED</tabstop>
+    <tabstop>editorED</tabstop>
 </tabstops>
 </UI>
index d5c4cd7696e6ad7d94a37307a2630cb456e72c6e..ddfd30f9c450b2b24cab90bc67c92dc1f0e97639 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-12  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * FormPreferences.C, forms/form_preferences.fd: add editor to format
+       * FormGraphics.C, forms/form_graphics.fd: add Edit button
 
 2004-04-07  Alfredo Braunstein  <abraunst@lyx.org>
 
index 7063625e96204a6b9870892cafbd3d0ba9dda1aa..bf31de4c237822c319633daffdd4c34fad17419e 100644 (file)
@@ -571,8 +571,12 @@ void FormGraphics::updateBB(string const & filename, string const & bb_inset)
 
 ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
 {
+       ButtonPolicy::SMInput activate = ButtonPolicy::SMI_VALID;
+
        // the file section
        if (ob == file_->button_browse) {
+               activate = ButtonPolicy::SMI_NOOP;
+
                // Get the filename from the dialog
                string const in_name = getString(file_->input_filename);
                string const out_name = controller().browse(in_name);
@@ -642,7 +646,11 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
                setEnabled(extra_->input_subcaption,
                           fl_get_button(extra_->check_subcaption));
 
+       } else if (ob == file_->button_edit) {
+               activate = ButtonPolicy::SMI_NOOP;
+               controller().editGraphics();
        }
 
-       return ButtonPolicy::SMI_VALID;
+
+       return activate;
 }
index 8654a865a67dc4b8b492b4d829cc7282a01a9975..f0ee6e3179fa175ce54d7844cb182b30f6e90a31 100644 (file)
@@ -996,6 +996,7 @@ void FormPreferences::Formats::build()
 
        fl_set_input_return(dialog_->input_format, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_viewer, FL_RETURN_CHANGED);
+       fl_set_input_return(dialog_->input_editor, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_shrtcut, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_gui_name, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_extension, FL_RETURN_CHANGED);
@@ -1010,6 +1011,7 @@ void FormPreferences::Formats::build()
        setPrehandler(dialog_->button_add);
        setPrehandler(dialog_->input_extension);
        setPrehandler(dialog_->input_viewer);
+       setPrehandler(dialog_->input_editor);
        setPrehandler(dialog_->input_shrtcut);
 }
 
@@ -1036,6 +1038,9 @@ FormPreferences::Formats::feedback(FL_OBJECT const * const ob) const
        if (ob == dialog_->input_viewer)
                return  _("The command used to launch the viewer application.");
 
+       if (ob == dialog_->input_editor)
+               return  _("The command used to launch the editor application.");
+
        if (ob == dialog_->button_delete)
                return  _("Remove the current format from the list of available "
                          "formats. Note: you must then \"Apply\" the change.");
@@ -1062,7 +1067,8 @@ bool FormPreferences::Formats::input(FL_OBJECT const * const ob)
            || ob == dialog_->input_gui_name
            || ob == dialog_->input_shrtcut
            || ob == dialog_->input_extension
-           || ob == dialog_->input_viewer)
+           || ob == dialog_->input_viewer
+           || ob == dialog_->input_editor)
                return Input();
 
        if (ob == dialog_->button_add)
@@ -1109,11 +1115,11 @@ bool FormPreferences::Formats::Add()
        string const extension = fl_get_input(dialog_->input_extension);
        string const shortcut =  fl_get_input(dialog_->input_shrtcut);
        string const viewer =  fl_get_input(dialog_->input_viewer);
+       string const editor =  fl_get_input(dialog_->input_editor);
 
        Format const * old = formats().getFormat(name);
        string const old_prettyname = old ? old->prettyname() : string();
-       formats().add(name, extension, prettyname, shortcut);
-       formats().setViewer(name, viewer);
+       formats().add(name, extension, prettyname, shortcut, viewer, editor);
        if (!old || prettyname != old_prettyname) {
                UpdateBrowser();
                if (old)
@@ -1140,6 +1146,7 @@ bool FormPreferences::Formats::Browser()
        fl_set_input(dialog_->input_shrtcut, f.shortcut().c_str());
        fl_set_input(dialog_->input_extension, f.extension().c_str());
        fl_set_input(dialog_->input_viewer, f.viewer().c_str());
+       fl_set_input(dialog_->input_editor, f.editor().c_str());
 
        fl_set_object_label(dialog_->button_add,
                            idex(_("Modify|#M")).c_str());
index 44a250fb6099cdb133e31bfd9e897ee8e244a0a8..f3876c2f38e3429fbc747b40047dceae9848e028 100644 (file)
@@ -9,14 +9,14 @@ SnapGrid: 5
 
 =============== FORM ===============
 Name: form_graphics
-Width: 395
-Height: 300
+Width: 490
+Height: 320
 Number of Objects: 6
 
 --------------------
 class: FL_BOX
 type: FLAT_BOX
-box: 0 0 395 300
+box: 0 0 490 320
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -34,7 +34,7 @@ argument:
 --------------------
 class: FL_TABFOLDER
 type: TOP_TABFOLDER
-box: 0 5 395 260
+box: 0 5 490 280
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
@@ -52,7 +52,7 @@ argument:
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 5 270 90 25
+box: 5 290 90 25
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -70,7 +70,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: RETURN_BUTTON
-box: 110 270 90 25
+box: 205 290 90 25
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -88,7 +88,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 300 270 90 25
+box: 395 290 90 25
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -106,7 +106,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 205 270 90 25
+box: 300 290 90 25
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -123,14 +123,14 @@ argument: 0
 
 =============== FORM ===============
 Name: form_graphics_file
-Width: 395
-Height: 235
-Number of Objects: 15
+Width: 490
+Height: 255
+Number of Objects: 16
 
 --------------------
 class: FL_BOX
 type: FLAT_BOX
-box: 0 0 395 235
+box: 0 0 490 255
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -148,7 +148,7 @@ argument:
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
-box: 5 125 385 105
+box: 5 145 480 105
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
@@ -166,7 +166,7 @@ argument:
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 60 10 225 25
+box: 60 10 320 25
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -184,7 +184,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 290 10 100 25
+box: 385 10 100 25
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -199,10 +199,28 @@ name: button_browse
 callback: C_FormDialogView_InputCB
 argument: 0
 
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 385 40 100 25
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Edit|#E
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NorthEast FL_NorthEast
+name: button_edit
+callback: C_FormDialogView_InputCB
+argument: 0
+
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
-box: 5 55 385 55
+box: 5 75 480 55
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
@@ -220,7 +238,7 @@ argument:
 --------------------
 class: FL_CHECKBUTTON
 type: PUSH_BUTTON
-box: 250 140 125 25
+box: 250 160 125 25
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_CENTER
@@ -238,7 +256,7 @@ argument: 0
 --------------------
 class: FL_CHECKBUTTON
 type: PUSH_BUTTON
-box: 250 170 125 25
+box: 250 190 125 25
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_CENTER
@@ -256,7 +274,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 85 70 70 25
+box: 85 90 70 25
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -274,7 +292,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 85 140 70 25
+box: 85 160 70 25
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -292,7 +310,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 155 140 60 25
+box: 155 160 60 25
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -310,7 +328,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 155 170 60 25
+box: 155 190 60 25
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -328,7 +346,7 @@ argument: 0
 --------------------
 class: FL_CHECKBUTTON
 type: PUSH_BUTTON
-box: 70 200 190 25
+box: 70 220 190 25
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_CENTER
@@ -346,7 +364,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 85 170 70 25
+box: 85 190 70 25
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -364,7 +382,7 @@ argument: 0
 --------------------
 class: FL_TEXT
 type: NORMAL_TEXT
-box: 155 70 25 25
+box: 155 90 25 25
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
@@ -382,7 +400,7 @@ argument:
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 265 70 115 25
+box: 265 90 115 25
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -399,14 +417,14 @@ argument: 0
 
 =============== FORM ===============
 Name: form_graphics_bbox
-Width: 395
+Width: 490
 Height: 235
 Number of Objects: 10
 
 --------------------
 class: FL_BOX
 type: FLAT_BOX
-box: 0 0 395 235
+box: 0 0 490 235
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -585,14 +603,14 @@ argument: 0
 
 =============== FORM ===============
 Name: form_graphics_extra
-Width: 395
+Width: 490
 Height: 235
 Number of Objects: 8
 
 --------------------
 class: FL_BOX
 type: FLAT_BOX
-box: 0 0 395 235
+box: 0 0 490 235
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
index 84dff5f585bd1f1cfe9d0df5c6d124ca0828de5c..1c34f14d28a985a5422ad7deb2a30db943a7b035 100644 (file)
@@ -1705,13 +1705,13 @@ argument:
 =============== FORM ===============
 Name: form_preferences_formats
 Width: 450
-Height: 360
-Number of Objects: 9
+Height: 400
+Number of Objects: 10
 
 --------------------
 class: FL_BOX
 type: FLAT_BOX
-box: 0 0 450 360
+box: 0 0 450 400
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -1834,10 +1834,28 @@ name: input_viewer
 callback: C_FormDialogView_InputCB
 argument: 0
 
+--------------------
+class: FL_INPUT
+type: NORMAL_INPUT
+box: 280 230 150 30
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Editor:|#i
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: input_editor
+callback: C_FormDialogView_InputCB
+argument: 0
+
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 240 270 90 30
+box: 240 300 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -1855,7 +1873,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 340 270 90 30
+box: 340 300 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
index 507ce4962f28727c766bd9c0c8d7c82830b5ac97..20102f68dc1450d9f53f5323da6b06fd4524ae26 100644 (file)
@@ -1,3 +1,11 @@
+2004-04-12  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * ExternalTemplate.[Ch]: remove editCommand
+       * ExternalSupport.C (editExternal): use formats.edit() instead of
+       the removed editCommand template parameter
+       * insetgraphics.C (priv_dispatch): handle LFUN_GRAPHICS_EDIT
+       * insetgraphics.[Ch] (editGraphics): new method
+
 2004-04-01  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * insetinclude.C (validate): set/reset features.buffer_ when
index a1964592346af3ceb0f927fbd0a7ee15e65d96ea..118b94e6407277cf91ce041961cde89c899ce0de 100644 (file)
@@ -19,6 +19,7 @@
 #include "buffer.h"
 #include "converter.h"
 #include "debug.h"
+#include "format.h"
 
 #include "support/filetools.h"
 #include "support/forkedcall.h"
@@ -51,23 +52,9 @@ Template const * getTemplatePtr(InsetExternalParams const & params)
 
 void editExternal(InsetExternalParams const & params, Buffer const & buffer)
 {
-       Template const * const et_ptr = getTemplatePtr(params);
-       if (!et_ptr)
-               return;
-       Template const & et = *et_ptr;
-
-       if (et.editCommand.empty())
-               return;
-
-       string const command = doSubstitution(params, buffer, et.editCommand);
-
-       support::Path p(buffer.filePath());
-       support::Forkedcall call;
-       if (lyxerr.debugging(Debug::EXTERNAL)) {
-               lyxerr << "Executing '" << command << "' in '"
-                      << buffer.filePath() << '\'' << endl;
-       }
-       call.startscript(support::Forkedcall::DontWait, command);
+       string const file_with_path = params.filename.absFilename();
+       formats.edit(buffer, file_with_path,
+                    support::getExtFromContents(file_with_path));
 }
 
 
index ba2bf86e4ec43875ac4ba3404dfb471fd6fff395..0bffe07c0fdc1f8612fee3fe58586ee0a63d870d 100644 (file)
@@ -101,7 +101,6 @@ public:
                    << "\tHelpTextEnd\n"
                    << "\tInputFormat " << et.inputFormat << '\n'
                    << "\tFileFilter " << et.fileRegExp << '\n'
-                   << "\tEditCommand " << et.editCommand << '\n'
                    << "\tAutomaticProduction " << et.automaticProduction << '\n';
 
                typedef vector<TransformID> IDs;
@@ -298,7 +297,6 @@ void Template::readTemplate(LyXLex & lex)
                TO_HELPTEXT,
                TO_INPUTFORMAT,
                TO_FILTER,
-               TO_EDITCMD,
                TO_AUTOMATIC,
                TO_TRANSFORM,
                TO_FORMAT,
@@ -307,7 +305,6 @@ void Template::readTemplate(LyXLex & lex)
 
        keyword_item templateoptiontags[] = {
                { "automaticproduction", TO_AUTOMATIC },
-               { "editcommand", TO_EDITCMD },
                { "filefilter", TO_FILTER },
                { "format", TO_FORMAT },
                { "guiname", TO_GUINAME },
@@ -340,11 +337,6 @@ void Template::readTemplate(LyXLex & lex)
                        fileRegExp = lex.getString();
                        break;
 
-               case TO_EDITCMD:
-                       lex.next(true);
-                       editCommand = lex.getString();
-                       break;
-
                case TO_AUTOMATIC:
                        lex.next();
                        automaticProduction = lex.getBool();
index 23667f4cc2fcabd6cbd3816b3825740cd588e217..80452e3041f8357ad5a277b6e7371f68366bc0be 100644 (file)
@@ -54,8 +54,6 @@ struct Template {
        std::string inputFormat;
        /// A file extension regular expression for the file browser
        std::string fileRegExp;
-       /// What command should be executed to edit the file?
-       std::string editCommand;
        /// Should we do automatic production of the output?
        bool automaticProduction;
        /// A collection of transforms that we can use to transform the data.
index 020f7de95811cd4a48dbb6fd45017e88670ab717..bdb569b48241957a6115fb3e1b360eb19a1b3272 100644 (file)
@@ -190,6 +190,14 @@ void InsetGraphics::statusChanged() const
 void InsetGraphics::priv_dispatch(LCursor & cur, FuncRequest & cmd)
 {
        switch (cmd.action) {
+        case LFUN_GRAPHICS_EDIT: {
+               Buffer const & buffer = *cur.bv().buffer();
+               InsetGraphicsParams p;
+               InsetGraphicsMailer::string2params(cmd.argument, buffer, p);
+               editGraphics(p, buffer);
+               break;
+       }
+
        case LFUN_INSET_MODIFY: {
                Buffer const & buffer = cur.buffer();
                InsetGraphicsParams p;
@@ -692,6 +700,13 @@ InsetGraphicsParams const & InsetGraphics::params() const
 }
 
 
+void InsetGraphics::editGraphics(InsetGraphicsParams const & p, Buffer const & buffer) const
+{
+       string const file_with_path = p.filename.absFilename();
+       formats.edit(buffer, file_with_path, getExtFromContents(file_with_path));
+}
+
+
 string const InsetGraphicsMailer::name_("graphics");
 
 InsetGraphicsMailer::InsetGraphicsMailer(InsetGraphics & inset)
index e36f49860fdcd711cdb65f59f826cbada0a8734f..b4ac3d51710fce7449d6f45125c8dff0b7c8db70 100644 (file)
@@ -79,6 +79,8 @@ public:
        void draw(PainterInfo & pi, int x, int y) const;
        ///
        void edit(LCursor & cur, bool left);
+       ///
+       void editGraphics(InsetGraphicsParams const &, Buffer const &) const;
 protected:
        ///
        void priv_dispatch(LCursor & cur, FuncRequest & cmd);
index 63360a31fb0e747e3f1ebaf767b42213fd4fa3e4..ef423ee02bf304818ced14cc76d49c590e40f3a4 100644 (file)
@@ -348,6 +348,7 @@ enum kb_action {
        LFUN_BUFFERPARAMS_APPLY,
        // 265
        LFUN_LYXRC_APPLY,
+       LFUN_GRAPHICS_EDIT,
 
        LFUN_LASTACTION                  // end of the table
 };
index f40ed8c229857fef5ffba519fd2dbb2107597061..3fa0f222ca7e23d88ca8594b4640a7c8d302e777 100644 (file)
@@ -483,6 +483,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        case LFUN_SET_COLOR:
        case LFUN_MESSAGE:
        case LFUN_EXTERNAL_EDIT:
+       case LFUN_GRAPHICS_EDIT:
        case LFUN_ALL_INSETS_TOGGLE:
        case LFUN_LANGUAGE_BUFFER:
        case LFUN_TEXTCLASS_APPLY:
@@ -1260,6 +1261,12 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
                        break;
                }
 
+               case LFUN_GRAPHICS_EDIT: {
+                       FuncRequest fr(action, argument);
+                       InsetGraphics().dispatch(view()->cursor(), fr);
+                       break;
+               }
+
                case LFUN_ALL_INSETS_TOGGLE: {
                        string action;
                        string const name = split(argument, action, ' ');
index 9481951d056352962e53e1dff86491c599e7d143..5faa48ad2070fc23fd3d149fd586539355b6da11 100644 (file)
@@ -161,6 +161,7 @@ keyword_item lyxrcTags[] = {
        { "\\user_email", LyXRC::RC_USER_EMAIL },
        { "\\user_name", LyXRC::RC_USER_NAME },
        { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
+       // compatibility with versions older than 1.4.0 only
        { "\\viewer" ,LyXRC::RC_VIEWER},
        { "\\wheel_jump", LyXRC::RC_WHEEL_JUMP }
 };
@@ -979,6 +980,7 @@ int LyXRC::read(LyXLex & lexrc)
                        }
                        break;
                }
+               // compatibility with versions older than 1.4.0 only
                case RC_VIEWER: {
                        string format, command;
                        if (lexrc.next()) {
@@ -1006,6 +1008,29 @@ int LyXRC::read(LyXLex & lexrc)
                        if (lexrc.next()) {
                                shortcut = lexrc.getString();
                        }
+                       string viewer, editor;
+                       // Hack to ensure compatibility with versions older
+                       // than 1.4.0
+                       int le = lexrc.lex();
+                       if (le != LyXLex::LEX_FEOF && le != LyXLex::LEX_UNDEF) {
+                               viewer = lexrc.getString();
+                               if (le == LyXLex::LEX_DATA) {
+                                       if (token(viewer, ' ', 0) == "none")
+                                               viewer.erase();
+                                       if (lexrc.next()) {
+                                               editor = lexrc.getString();
+                                               if (token(editor, ' ', 0) == "none")
+                                                       editor.erase();
+                                       }
+                               } else {
+                                       // We have got a known token.
+                                       // Therefore this is an old style
+                                       // format definition without
+                                       // viewer and editor.
+                                       lexrc.pushToken(viewer);
+                                       viewer.erase();
+                               }
+                       }
                        if (prettyname.empty()) {
                                if (converters.formatIsUsed(format)) {
                                        lyxerr << "Can't delete format "
@@ -1015,7 +1040,7 @@ int LyXRC::read(LyXLex & lexrc)
                                }
                        } else {
                                formats.add(format, extension, prettyname,
-                                           shortcut);
+                                           shortcut, viewer, editor);
                        }
                        break;
                }
@@ -1801,7 +1826,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
                   << "#\n\n";
 
        case RC_FORMAT:
-               // Look for deleted formats
+               // New/modifed formats
                for (Formats::const_iterator cit = formats.begin();
                     cit != formats.end(); ++cit) {
                        Format const * format =
@@ -1809,29 +1834,25 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
                        if (!format ||
                            format->extension() != cit->extension() ||
                            format->prettyname() != cit->prettyname() ||
-                           format->shortcut() != cit->shortcut())
+                           format->shortcut() != cit->shortcut() ||
+                           format->viewer() != cit->viewer() ||
+                           format->editor() != cit->editor())
                                os << "\\format \"" << cit->name() << "\" \""
                                   << cit->extension() << "\" \""
                                   << cit->prettyname() << "\" \""
-                                  << cit->shortcut() << "\"\n";
+                                  << cit->shortcut() << "\" \""
+                                  << cit->viewer() << "\" \""
+                                  << cit->editor() << "\"\n";
                }
 
-               // New/modifed formats
+               // Look for deleted formats
                for (Formats::const_iterator cit = system_formats.begin();
                     cit != system_formats.end(); ++cit)
                        if (!formats.getFormat(cit->name()))
                                os << "\\format \"" << cit->name()
-                                  << "\" \"\" \"\" \"\"\n";
+                                  << "\" \"\" \"\" \"\" \"\" \"\"\n";
        case RC_VIEWER:
-               for (Formats::const_iterator cit = formats.begin();
-                    cit != formats.end(); ++cit) {
-                       Format const * format =
-                               system_formats.getFormat(cit->name());
-                       if ((!format || format->viewer() != cit->viewer()) &&
-                           (format || !cit->viewer().empty()))
-                               os << "\\viewer \"" << cit->name() << "\" \""
-                                  << cit->viewer() << "\"\n";
-               }
+               // Ignore it
 
                os << "\n#\n"
                   << "# CONVERTERS SECTION ##########################\n"