- fixes some small bugs - adding support for tgif-files - small changes to the layout
I for myself close the GUI until 1.2.0pre is out and will fix only bugs in there. The discussion about converting or not and how a.s.o. can go on ... ;-) Herbert -- http://www.lyx.org/help/
Index: src/frontends/xforms/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v retrieving revision 1.288 diff -u -r1.288 ChangeLog --- src/frontends/xforms/ChangeLog 2002/02/12 10:01:52 1.288 +++ src/frontends/xforms/ChangeLog 2002/02/12 20:43:18 @@ -1,3 +1,12 @@ +2002-02-12 Herbert Voss <[EMAIL PROTECTED]> + + * forms/form_graphics.fd: + * form_graphics.[Ch]: small changes to the layout, mentioned + by Rob + + * FormGraphics.C: fix bug with use of updateWidget... when + no unit is given. + 2002-02-11 John Levon <[EMAIL PROTECTED]> * FormMinipage.C: return SMI_VALID on other form changes Index: src/frontends/xforms/FormGraphics.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormGraphics.C,v retrieving revision 1.47 diff -u -r1.47 FormGraphics.C --- src/frontends/xforms/FormGraphics.C 2002/02/11 10:42:11 1.47 +++ src/frontends/xforms/FormGraphics.C 2002/02/12 20:43:18 @@ -96,7 +96,6 @@ bc().addReadOnly(file_->button_browse); bc().addReadOnly(file_->check_subcaption); bc().addReadOnly(file_->check_rotate); - bc().addReadOnly(file_->button_clip); bc().addReadOnly(file_->button_draft); bc().addReadOnly(file_->button_nounzip); @@ -147,6 +146,7 @@ string const bb_units = "pt|cm|in"; fl_addto_choice(bbox_->choice_bb_units, bb_units.c_str()); bc().addReadOnly(bbox_->button_getBB); + bc().addReadOnly(bbox_->button_clip); // the rotate section special_.reset(build_special()); @@ -186,7 +186,6 @@ else igp.rotateOrigin = string(); igp.draft = fl_get_button(file_->button_draft); - igp.clip = fl_get_button(file_->button_clip); igp.noUnzip = fl_get_button(file_->button_nounzip); // the lyxview section @@ -254,6 +253,7 @@ bbox_->choice_bb_units)+" "); igp.bb = bb; } + igp.clip = fl_get_button(bbox_->button_clip); // the special section igp.special = getStringFromInput(special_->input_special); @@ -284,7 +284,6 @@ setEnabled(file_->choice_origin, fl_get_button(file_->check_rotate)); fl_set_button(file_->button_draft, igp.draft); - fl_set_button(file_->button_clip, igp.clip); fl_set_button(file_->button_nounzip, igp.noUnzip); // the lyxview section @@ -384,12 +383,11 @@ // the bb section // set the bounding box values, if exists. First we need the whole // path, because the controller knows nothing about the doc-dir - lyxerr << "GraphicsUpdate::BoundingBox = " << igp.bb << "\n"; controller().bbChanged = false; if (igp.bb.empty()) { - string const fileWithAbsPath = MakeAbsPath(igp.filename, OnlyPath(igp.filename)); - string bb = controller().readBB(fileWithAbsPath); - lyxerr << "file::BoundingBox = " << bb << "\n"; + string const fileWithAbsPath = + MakeAbsPath(igp.filename, OnlyPath(igp.filename)); + string bb = controller().readBB(fileWithAbsPath); if (!bb.empty()) { // get the values from the file // in this case we always have the point-unit @@ -397,7 +395,14 @@ fl_set_input(bbox_->input_bb_y0, token(bb,' ',1).c_str()); fl_set_input(bbox_->input_bb_x1, token(bb,' ',2).c_str()); fl_set_input(bbox_->input_bb_y1, token(bb,' ',3).c_str()); + } else { // no bb from file + fl_set_input(bbox_->input_bb_x0, bb.c_str()); + fl_set_input(bbox_->input_bb_y0, bb.c_str()); + fl_set_input(bbox_->input_bb_x1, bb.c_str()); + fl_set_input(bbox_->input_bb_y1, bb.c_str()); } + string const unit("pt"); + fl_set_choice_text(bbox_->choice_bb_units, unit.c_str()); } else { // get the values from the inset controller().bbChanged = true; LyXLength anyLength; @@ -414,6 +419,7 @@ updateWidgetsFromLength(bbox_->input_bb_y1, bbox_->choice_bb_units,anyLength,"pt"); } + fl_set_button(bbox_->button_clip, igp.clip); // the special section fl_set_input(special_->input_special, igp.special.c_str()); @@ -479,7 +485,7 @@ size_->choice_width_units)); updateWidgetsFromLength(lyxview_->input_lyxheight, lyxview_->choice_width_lyxheight, dummy, defaultUnit); - string const scale = fl_get_input(size_->input_scale); + string const scale = getStringFromInput(size_->input_scale); fl_set_input(lyxview_->input_lyxscale, scale.c_str()); // the bb section @@ -493,22 +499,23 @@ if (!filename.empty()) { string const fileWithAbsPath = MakeAbsPath(filename, OnlyPath(filename)); string bb = controller().readBB(fileWithAbsPath); - lyxerr << "getBB::BoundingBox = " << bb << "\n"; if (!bb.empty()) { - updateWidgetsFromLengthString(bbox_->input_bb_x0, - bbox_->choice_bb_units, - token(bb,' ',0), "pt"); - updateWidgetsFromLengthString(bbox_->input_bb_y0, - bbox_->choice_bb_units, - token(bb,' ',1), "pt"); - updateWidgetsFromLengthString(bbox_->input_bb_x1, - bbox_->choice_bb_units, - token(bb,' ',2), "pt"); - updateWidgetsFromLengthString(bbox_->input_bb_y1, - bbox_->choice_bb_units, - token(bb,' ',3), "pt"); + fl_set_input(bbox_->input_bb_x0, token(bb,' ',0).c_str()); + fl_set_input(bbox_->input_bb_y0, token(bb,' ',1).c_str()); + fl_set_input(bbox_->input_bb_x1, token(bb,' ',2).c_str()); + fl_set_input(bbox_->input_bb_y1, token(bb,' ',3).c_str()); + string const unit("pt"); + fl_set_choice_text(bbox_->choice_bb_units, unit.c_str()); } controller().bbChanged = false; + } else { + string const empty = string(); + fl_set_input(bbox_->input_bb_x0, empty.c_str()); + fl_set_input(bbox_->input_bb_y0, empty.c_str()); + fl_set_input(bbox_->input_bb_x1, empty.c_str()); + fl_set_input(bbox_->input_bb_y1, empty.c_str()); + string const unit("pt"); + fl_set_choice_text(bbox_->choice_bb_units, unit.c_str()); } // the size section @@ -542,7 +549,7 @@ lyxview_->choice_width_lyxheight)); updateWidgetsFromLength(size_->input_height, size_->choice_height_units, dummy, defaultUnit); - string const scale = fl_get_input(lyxview_->input_lyxscale); + string const scale = getStringFromInput(lyxview_->input_lyxscale); fl_set_input(size_->input_scale, scale.c_str()); } Index: src/frontends/xforms/form_graphics.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/form_graphics.C,v retrieving revision 1.31 diff -u -r1.31 form_graphics.C --- src/frontends/xforms/form_graphics.C 2002/02/11 10:42:11 1.31 +++ src/frontends/xforms/form_graphics.C 2002/02/12 20:43:19 @@ -27,35 +27,37 @@ obj = fl_add_box(FL_FLAT_BOX, 0, 0, 510, 360, ""); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fdui->tabFolder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 5, 5, 500, 270, _("Tabbed folder")); + fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_resize(obj, FL_RESIZE_ALL); { char const * const dummy = N_("Restore|#R"); - fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 5, 320, 80, 30, idex(_(dummy))); + fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 5, 310, 80, 30, +idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest); fl_set_object_callback(obj, C_FormBaseRestoreCB, 0); - fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 225, 320, 90, 30, _("Ok")); + fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 225, 310, 90, 30, _("Ok")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseOKCB, 0); { char const * const dummy = N_("Cancel|^["); - fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 415, 320, 90, 30, idex(_(dummy))); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 415, 310, 90, 30, +idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseCancelCB, 0); { char const * const dummy = N_("Apply|#A"); - fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 320, 320, 90, 30, idex(_(dummy))); + fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 320, 310, 90, 30, +idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseApplyCB, 0); - fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 15, 275, 485, 35, ""); + fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 5, 280, 495, 25, ""); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); fl_end_form(); fdui->form->fdui = fdui; @@ -112,7 +114,7 @@ } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 110, 475, 60, ""); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 105, 475, 65, ""); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lstyle(obj, FL_BOLD_STYLE); { @@ -133,18 +135,10 @@ fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 180, 475, 50, _("Options")); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 170, 475, 60, _("Options")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lstyle(obj, FL_BOLD_STYLE); { - char const * const dummy = N_("clip to bounding box|#b"); - fdui->button_clip = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 140, 190, 30, 30, idex(_(dummy))); - fl_set_button_shortcut(obj, scex(_(dummy)), 1); - } - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_lalign(obj, FL_ALIGN_RIGHT); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - { char const * const dummy = N_("draft mode|#m"); fdui->button_draft = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 15, 190, 30, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); @@ -162,7 +156,7 @@ fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("don't unzip, when \nexporting to LaTeX|#u"); - fdui->button_nounzip = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 315, 190, 30, 30, idex(_(dummy))); + fdui->button_nounzip = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 320, 190, 30, 30, +idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); @@ -267,7 +261,6 @@ fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 15, 60, 470, 65, ""); { char const * const dummy = N_("Get LyX size|#x"); fdui->button_lyx_values = obj = fl_add_button(FL_NORMAL_BUTTON, 360, 20, 115, 30, idex(_(dummy))); @@ -275,7 +268,6 @@ } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 340, 10, 5, 50, ""); fl_end_form(); fdui->form->fdui = fdui; @@ -343,10 +335,18 @@ fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Get values from file|#G"); - fdui->button_getBB = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 160, 165, 30, idex(_(dummy))); + fdui->button_getBB = obj = fl_add_button(FL_NORMAL_BUTTON, 45, 160, 165, 30, +idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); + { + char const * const dummy = N_("clip to bounding box|#b"); + fdui->button_clip = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 245, 160, 30, 30, +idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); fl_end_form(); @@ -448,7 +448,6 @@ obj = fl_add_text(FL_NORMAL_TEXT, 430, 75, 25, 30, _("%")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 150, 60, 340, 55, ""); fdui->radio_display = fl_bgn_group(); { @@ -469,7 +468,7 @@ fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Grayscale|#G"); - fdui->radio_gray = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 20, 100, 30, 30, idex(_(dummy))); + fdui->radio_gray = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 20, 105, 30, 30, +idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_color(obj, FL_COL1, FL_YELLOW); @@ -477,7 +476,7 @@ fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Color|#o"); - fdui->radio_color = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 20, 130, 30, 30, idex(_(dummy))); + fdui->radio_color = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 20, 140, 30, 30, +idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_color(obj, FL_COL1, FL_YELLOW); @@ -485,7 +484,7 @@ fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Don't display|#y"); - fdui->radio_nodisplay = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 20, 160, 30, 30, idex(_(dummy))); + fdui->radio_nodisplay = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 20, 175, 30, +30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_color(obj, FL_COL1, FL_YELLOW); @@ -493,7 +492,7 @@ fl_set_object_callback(obj, C_FormBaseInputCB, 0); fl_end_group(); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 150, 10, 340, 50, _("Screen Size")); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 150, 10, 340, 205, _("Screen Size")); fl_set_object_lstyle(obj, FL_BOLD_STYLE); { char const * const dummy = N_("Width|#w"); @@ -517,7 +516,6 @@ fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 150, 115, 340, 100, ""); obj = fl_add_text(FL_NORMAL_TEXT, 30, 45, 115, 25, _("(from Preferences)")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); @@ -528,7 +526,6 @@ } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 320, 10, 5, 50, ""); fl_end_form(); fdui->form->fdui = fdui; Index: src/frontends/xforms/form_graphics.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/form_graphics.h,v retrieving revision 1.17 diff -u -r1.17 form_graphics.h --- src/frontends/xforms/form_graphics.h 2002/02/11 10:42:11 1.17 +++ src/frontends/xforms/form_graphics.h 2002/02/12 20:43:19 @@ -9,6 +9,7 @@ extern "C" void C_FormBaseOKCB(FL_OBJECT *, long); extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long); extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long); +extern "C" void C_FormBaseInputCB(FL_OBJECT *, long); extern "C" void C_FormBaseInputCB(FL_OBJECT *, long); @@ -43,7 +44,6 @@ FL_OBJECT *input_subcaption; FL_OBJECT *input_rotate_angle; FL_OBJECT *choice_origin; - FL_OBJECT *button_clip; FL_OBJECT *button_draft; FL_OBJECT *check_rotate; FL_OBJECT *button_nounzip; @@ -74,6 +74,7 @@ FL_OBJECT *input_bb_y0; FL_OBJECT *choice_bb_units; FL_OBJECT *button_getBB; + FL_OBJECT *button_clip; }; struct FD_form_special { ~FD_form_special(); Index: src/frontends/xforms/forms/form_graphics.fd =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/forms/form_graphics.fd,v retrieving revision 1.23 diff -u -r1.23 form_graphics.fd --- src/frontends/xforms/forms/form_graphics.fd 2002/02/11 10:42:11 1.23 +++ src/frontends/xforms/forms/form_graphics.fd 2002/02/12 20:43:19 @@ -35,7 +35,7 @@ class: FL_TABFOLDER type: TOP_TABFOLDER box: 5 5 500 270 -boxtype: FL_UP_BOX +boxtype: FL_FRAME_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE @@ -52,7 +52,7 @@ -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 5 320 80 30 +box: 5 310 80 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -70,7 +70,7 @@ -------------------- class: FL_BUTTON type: RETURN_BUTTON -box: 225 320 90 30 +box: 225 310 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -88,7 +88,7 @@ -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 415 320 90 30 +box: 415 310 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -106,7 +106,7 @@ -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 320 320 90 30 +box: 320 310 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -124,7 +124,7 @@ -------------------- class: FL_TEXT type: NORMAL_TEXT -box: 15 275 485 35 +box: 5 280 495 25 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE @@ -136,14 +136,14 @@ resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: text_warning -callback: -argument: +callback: C_FormBaseInputCB +argument: 0 =============== FORM =============== Name: form_file Width: 505 Height: 235 -Number of Objects: 15 +Number of Objects: 14 -------------------- class: FL_BOX @@ -256,7 +256,7 @@ -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME -box: 10 110 475 60 +box: 10 105 475 65 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT @@ -328,7 +328,7 @@ -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME -box: 10 180 475 50 +box: 10 170 475 60 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT @@ -346,24 +346,6 @@ -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 140 190 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: clip to bounding box|#b -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: button_clip -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_CHECKBUTTON -type: PUSH_BUTTON box: 15 190 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW @@ -400,7 +382,7 @@ -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 315 190 30 30 +box: 320 190 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_RIGHT @@ -419,7 +401,7 @@ Name: form_size Width: 505 Height: 235 -Number of Objects: 17 +Number of Objects: 15 -------------------- class: FL_BOX @@ -674,24 +656,6 @@ argument: 0 -------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 15 60 470 65 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 360 20 115 30 @@ -709,29 +673,11 @@ callback: C_FormBaseInputCB argument: 0 --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 340 10 5 50 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - =============== FORM =============== Name: form_bbox Width: 505 Height: 235 -Number of Objects: 10 +Number of Objects: 11 -------------------- class: FL_BOX @@ -898,7 +844,7 @@ -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 110 160 165 30 +box: 45 160 165 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -913,6 +859,24 @@ callback: C_FormBaseInputCB argument: 0 +-------------------- +class: FL_CHECKBUTTON +type: PUSH_BUTTON +box: 245 160 30 30 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_RIGHT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: clip to bounding box|#b +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: button_clip +callback: C_FormBaseInputCB +argument: 0 + =============== FORM =============== Name: form_special Width: 505 @@ -977,7 +941,7 @@ Name: form_lyxview Width: 505 Height: 235 -Number of Objects: 26 +Number of Objects: 23 -------------------- class: FL_BOX @@ -1142,24 +1106,6 @@ argument: -------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 150 60 340 55 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- class: FL_BEGIN_GROUP type: 0 box: 0 10 10 0 @@ -1216,7 +1162,7 @@ -------------------- class: FL_ROUND3DBUTTON type: RADIO_BUTTON -box: 20 100 30 30 +box: 20 105 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -1234,7 +1180,7 @@ -------------------- class: FL_ROUND3DBUTTON type: RADIO_BUTTON -box: 20 130 30 30 +box: 20 140 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -1252,7 +1198,7 @@ -------------------- class: FL_ROUND3DBUTTON type: RADIO_BUTTON -box: 20 160 30 30 +box: 20 175 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -1288,7 +1234,7 @@ -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME -box: 150 10 340 50 +box: 150 10 340 205 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT @@ -1376,24 +1322,6 @@ argument: 0 -------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 150 115 340 100 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- class: FL_TEXT type: NORMAL_TEXT box: 30 45 115 25 @@ -1428,24 +1356,6 @@ name: button_latex_values callback: C_FormBaseInputCB argument: 0 - --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 320 10 5 50 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: ============================== -------------------- Index: src/insets/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v retrieving revision 1.309 diff -u -r1.309 ChangeLog --- src/insets/ChangeLog 2002/02/12 10:01:52 1.309 +++ src/insets/ChangeLog 2002/02/12 20:43:20 @@ -1,3 +1,7 @@ +2002-02-12 Herbert Voss <[EMAIL PROTECTED]> + + * insetgraphic.C: latex(), return the correct newlines + 2002-02-11 John Levon <[EMAIL PROTECTED]> * insetnote.C: use notebg for background Index: src/insets/insetgraphics.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v retrieving revision 1.79 diff -u -r1.79 insetgraphics.C --- src/insets/insetgraphics.C 2002/02/11 13:04:38 1.79 +++ src/insets/insetgraphics.C 2002/02/12 20:43:20 @@ -115,6 +115,8 @@ #include "support/lyxmanip.h" #include "debug.h" #include "gettext.h" +//#include "LOStream.h" +#include "support/lyxalgo.h" extern string system_tempdir; @@ -581,31 +583,30 @@ << _("empty figure path") << "}\n"; return 1; // One end of line marker added to the stream. } - // Keep count of newlines that we issued. -#warning the newlines=0 were in the original code. where is the sense? (Herbert) - int newlines = 0; // This variables collect all the latex code that should be before and // after the actual includegraphics command. - string before; - string after; + string before = string(); + string after = string(); // Do we want subcaptions? if (params.subcaption) { before += "\\subfigure[" + params.subcaptionText + "]{"; - after = '}' + after; + after = '}'; } // We never use the starred form, we use the "clip" option instead. - os << before << "\\includegraphics"; + before += "\\includegraphics"; // Write the options if there are any. string const opts = createLatexOptions(); - if (!opts.empty()) { - os << "[%\n" << opts << ']'; - } + if (!opts.empty()) + before += ("[%\n" + opts +']'); // Make the filename relative to the lyx file // and remove the extension so the LaTeX will use whatever is // appropriate (when there are several versions in different formats) string const filename = prepareFile(buf); - os << '{' << filename << '}' << after; + before += ('{' + filename + '}' + after); + os << before; // Return how many newlines we issued. + int newlines = lyx::count(before.begin(),before.end(),'\n') + 1; +// lyxerr << "includegraphics: " << newlines << " lines of text" << endl; return newlines; } Index: src/support/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/ChangeLog,v retrieving revision 1.67 diff -u -r1.67 ChangeLog --- src/support/ChangeLog 2002/02/11 10:07:28 1.67 +++ src/support/ChangeLog 2002/02/12 20:43:21 @@ -1,3 +1,8 @@ +2002-02-08 Herbert Voss <[EMAIL PROTECTED]> + + * filetools.C: (getExtFromContents) adding TGIF-format + and return type "user" when no type is detected + 2002-02-10 Kayvan Sylvan <[EMAIL PROTECTED]> * os_win32.C: Add "using std::endl" to fix compilation for GCC 3.X. Index: src/support/filetools.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/filetools.C,v retrieving revision 1.99 diff -u -r1.99 filetools.C --- src/support/filetools.C 2002/02/08 14:32:17 1.99 +++ src/support/filetools.C 2002/02/12 20:43:21 @@ -967,6 +967,7 @@ // the different filetypes and what they contain in one of the first lines // (dots are any characters). (Herbert 20020131) // EPS %!PS-Adobe-3.0 EPSF... +// TGIF %TGIF... // GIF GIF... // JPG JFIF // PDF %PDF-... @@ -1012,6 +1013,8 @@ } if (contains(str,"EPSF")) // dummy, if we have wrong file return "eps"; // description like "%!PS-Adobe-2.0EPSF" + else if (contains(str,"TGIF")) + return "tgif"; else if (contains(str,"GIF")) return "gif"; else if (contains(str,"JFIF")) @@ -1032,9 +1035,10 @@ else if (contains(str,"XPM")) return "xpm"; } - lyxerr[Debug::INFO] << "filetools(getExtFromContents)" - " Couldn't find a known Type!" << endl; - return string(); + lyxerr[Debug::INFO] << "filetools(getExtFromContents)\n" + "\tCouldn't find a known Type!" + "\twill use \"user\" defines format" << endl; + return "user"; }