/**
* \file FormGraphics.C
- * Copyright 2000-2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * \author Baruch Even, baruch.even@writeme.com
- * \author Herbert Voss, voss@perce.de
+ * \author Baruch Even
+ * \author Herbert Voss
+ *
+ * Full author contact details are available in file CREDITS
*/
#include <config.h>
fl_set_input_maxchars(file_->input_filename, FILENAME_MAXCHARS);
fl_set_input_filter(file_->input_lyxscale, fl_unsigned_int_filter);
- // width default is scaling, thus unsigned integer input
+ // width default is scaling, thus unsigned integer input
fl_set_input_filter(file_->input_width, fl_unsigned_int_filter);
fl_set_input_maxchars(file_->input_height, SIZE_MAXDIGITS);
-
-
+
string const display_List = _("Default|Monochrome|Grayscale|Color|Do not display");
fl_addto_choice(file_->choice_display, display_List.c_str());
str = _("Browse the directories.");
tooltips().init(file_->button_browse, str);
- str = _("Scale the image to inserted percentage value");
+ str = _("Scale the image to inserted percentage value.");
tooltips().init(file_->input_lyxscale, str);
str = _("Select display mode for this image.");
tooltips().init(file_->choice_display, str);
str = _("Set the image width to the inserted value.");
tooltips().init(file_->input_width, str);
- str = _("Select unit for width; Scale% for scaling whole image");
+ str = _("Select unit for width; Scale% for scaling whole image.");
tooltips().init(file_->choice_width, str);
str = _("Set the image height to the inserted value.");
tooltips().init(file_->input_height, str);
tooltips().init(file_->check_aspectratio, str);
str = _("Pass a filename like \"file.eps.gz\" to the LaTeX output. "
- "This is useful when LaTeX should unzip the file. Needs an additional file "
+ "Useful when LaTeX should unzip the file. Needs an additional file "
"like \"file.eps.bb\" which holds the values for the bounding box.");
tooltips().init(file_->check_nounzip, str);
str = _("Read the image coordinates new from file. If it's an (e)ps-file "
"then the bounding box is read otherwise the imagesize in pixels. "
- "The default unit is \"bp\", the PostScript's b(ig) p(oint).");
+ "Default unit is \"bp\", the PostScript's b(ig) p(oint).");
tooltips().init(bbox_->button_getBB, str);
- str = _("Enable this checkbox when the image should be clipped to the "
- "bounding box values.");
+ str = _("Clip image to the bounding box values.");
tooltips().init(bbox_->check_clip, str);
// the extra section
// Store the identifiers for later
origins_ = getSecond(origindata);
- string const choice = " " + getStringFromVector(getFirst(origindata), " | ") + " ";
+ string const choice = "Default|" + getStringFromVector(getFirst(origindata), "|");
fl_addto_choice(extra_->choice_origin, choice.c_str());
// set up the tooltips for the extra section
str = _("Insert the rotation angle in degrees. "
- "Positive value rotates anti-clockwise, negative value clockwise");
+ "Positive value rotates anti-clockwise, negative value clockwise.");
tooltips().init(extra_->input_rotate_angle, str);
- str = _("Insert the point of origin for rotation ");
+ str = _("Insert the point of origin for rotation.");
tooltips().init(extra_->choice_origin, str);
str = _("Enables use of subfigure with its own caption.");
tooltips().init(extra_->check_subcaption, str);
- str = _("Insert the optional subfigure caption");
+ str = _("Insert the optional subfigure caption.");
tooltips().init(extra_->input_subcaption, str);
str = _("Add any additional latex option, which is defined in the "
"graphicx-package and not mentioned in the gui's tabfolders.");
fl_set_input(extra_->input_rotate_angle, tostr(igp.rotateAngle).c_str());
int const origin_pos = fl_get_choice(extra_->choice_origin);
- igp.rotateOrigin = origins_[origin_pos-1];
+ if (origin_pos == 1) {
+ igp.rotateOrigin.erase();
+ } else {
+ igp.rotateOrigin = origins_[origin_pos - 2];
+ }
igp.subcaption = fl_get_button(extra_->check_subcaption);
igp.subcaptionText = getString(extra_->input_subcaption);
fl_set_input(extra_->input_rotate_angle,
tostr(igp.rotateAngle).c_str());
- int const origin_pos = findPos(origins_, igp.rotateOrigin);
- fl_set_choice(extra_->choice_origin, 1 + origin_pos);
+ int origin_pos;
+ if (igp.rotateOrigin.empty()) {
+ origin_pos = 1;
+ } else {
+ origin_pos = 2 + findPos(origins_, igp.rotateOrigin);
+ }
+ fl_set_choice(extra_->choice_origin, origin_pos);
fl_set_button(extra_->check_subcaption, igp.subcaption);
fl_set_input(extra_->input_subcaption, igp.subcaptionText.c_str());