From: Allan Rae Date: Fri, 28 Jul 2000 04:59:45 +0000 (+0000) Subject: the 50% overclock Preferences dialog patch X-Git-Tag: 1.6.10~22072 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ef59101fe7f9231107b32b753fc9690474f58785;p=features.git the 50% overclock Preferences dialog patch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@935 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index 5ff837006f..007a3ebbd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2000-07-28 Allan Rae + + * src/frontends/xforms/FormPreferences.C (build): Setup input return + checking. NOTE: It seems that pressing ESC to cancel the dialog also + triggers the callback for input checking. As a result we sometimes get + "LyX: This shouldn't happen..." printed to cerr. + (input): Started using status variable since I only free() on + destruction. Some input checking for paths and font sizes. + + * src/frontends/xforms/FormPreferences.h: Use status to control + activation of Ok and Apply + + * src/frontends/xforms/forms/form_preferences.fd: Setup input return + callback. Also resized to stop segfaults with 0.88. The problem is + that xforms-0.88 requires the folder to be wide enough to fit all the + tabs. If it isn't it causes all sorts of problems. + + * src/frontends/xforms/FormCopyright.[hC]: forward declare FD_form... + + * src/frontends/xforms/forms/README: Reflect reality. + + * src/frontends/xforms/forms/fdfix.sh: Clean up comments + * src/frontends/xforms/forms/makefile: ditto. + + * src/commandtags.h: Get access to new Preferences dialog + * src/LyXAction.C: ditto + * src/lyxfunc.C: ditto + * lib/ui/default.ui: ditto + 2000-07-27 Jean-Marc Lasgouttes * src/frontends/xforms/forms/makefile (.c.C): change call to fdfix.sh. diff --git a/lib/ui/default.ui b/lib/ui/default.ui index d998e90558..749ab2cde9 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -221,7 +221,7 @@ Menuset Item "Keyboard...|K" "keyboard-options" Separator Item "Reconfigure|R" "reconfigure" - Item "Preferences|P" "options-preferences" + Item "Preferences|P" "dialog-preferences" End Menu "documents" diff --git a/src/LyXAction.C b/src/LyXAction.C index 0e00c99510..2afc45f1ab 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -341,6 +341,8 @@ void LyXAction::init() N_("Select previous paragraph"), ReadOnly }, { LFUN_PARENTINSERT, "parent-insert", "", Noop }, { LFUN_PASTE, "paste", N_("Paste") , Noop }, + { LFUN_DIALOG_PREFERENCES, "dialog-preferences", + N_("Edit Preferences"), NoBuffer }, { LFUN_SAVEPREFERENCES, "preferences-save", N_("Save Preferences"), NoBuffer }, { LFUN_PASTESELECTION, "primary-selection-paste", "", Noop }, diff --git a/src/commandtags.h b/src/commandtags.h index 51fdc26a98..908eac720e 100644 --- a/src/commandtags.h +++ b/src/commandtags.h @@ -243,6 +243,7 @@ enum kb_action { LFUN_IMPORT, // Asger 980724 LFUN_MENU_SEPARATOR, // Asger 990220 LFUN_SEQUENCE, // Andre' 991111 + LFUN_DIALOG_PREFERENCES, // ARRae 20000726 LFUN_SAVEPREFERENCES, // Lgb 991127 LFUN_HELP_COPYRIGHT, // ARRae 20000129 LFUN_HELP_CREDITS, // ARRae 981017 diff --git a/src/ext_l10n.h b/src/ext_l10n.h index 0307595dc0..a12de2d6b3 100644 --- a/src/ext_l10n.h +++ b/src/ext_l10n.h @@ -149,18 +149,17 @@ _("Credits...|e"); _("Version...|V"); _(""); _("A&A"); -_("ACT"); -_("AT_RISE:"); _("Abstract"); _("Accepted"); _("Acknowledgement"); -_("Acknowledgement(s)"); _("Acknowledgement*"); _("Acknowledgement-numbered"); -_("Acknowledgement-unnumbered"); +_("Acknowledgement(s)"); _("Acknowledgements"); +_("Acknowledgement-unnumbered"); _("Acknowledgments"); _("Acnowledgement"); +_("ACT"); _("Addchap"); _("Addchap*"); _("Addition"); @@ -178,15 +177,15 @@ _("Anlagen"); _("Anrede"); _("Appendices"); _("Appendix"); +_("AT_RISE:"); _("Author"); -_("AuthorRunning"); _("Author_Email"); _("Author_Running"); +_("AuthorRunning"); _("Author_URL"); _("Axiom"); _("Axiom-numbered"); _("Axiom-plain"); -_("BLZ"); _("Backaddress"); _("Bank"); _("BankAccount"); @@ -194,12 +193,13 @@ _("BankCode"); _("Betreff"); _("Bibliography"); _("Biography"); +_("BLZ"); _("Brieftext"); -_("CC"); -_("CURTAIN"); _("Caption"); _("Case"); _("Case-numbered"); +_("CC"); +_("cc"); _("CenteredCaption"); _("Chapter"); _("Chapter*"); @@ -239,6 +239,7 @@ _("Criterion-plain"); _("CrossList"); _("Current"); _("Current_Address"); +_("CURTAIN"); _("Customer"); _("Data"); _("Date"); @@ -253,10 +254,10 @@ _("Definition-unnumbered"); _("Description"); _("Dialogue"); _("EMail"); -_("EXT."); _("Email"); _("Encl"); _("Encl."); +_("encl"); _("End_All_Slides"); _("Enumerate"); _("Example"); @@ -267,43 +268,48 @@ _("Example-unnumbered"); _("Exercise"); _("Exercise-numbered"); _("Exercise-plain"); +_("EXT."); _("Extratitle"); -_("FADE_IN:"); -_("FADE_OUT:"); _("Fact"); _("Fact*"); _("Fact-numbered"); _("Fact-plain"); _("Fact-unnumbered"); +_("FADE_IN:"); +_("FADE_OUT:"); _("FigCaption"); +_("first"); _("FirstAuthor"); _("FirstName"); _("FitBitmap"); _("FitFigure"); _("Foilhead"); +_("foilhead"); _("Footernote"); _("FourAffiliations"); _("FourAuthors"); _("Gruss"); -_("HTTP"); _("Headnote"); -_("INT."); +_("HTTP"); _("Idea"); _("IhrSchreiben"); _("IhrZeichen"); _("Institute"); _("Institution"); +_("INT."); _("InvisibleText"); _("Invoice"); _("Itemize"); _("Journal"); +_("journal"); _("Keywords"); _("Konto"); -_("LaTeX"); -_("LaTeX_Title"); _("Labeling"); _("Land"); +_("landscape"); _("LandscapeSlide"); +_("LaTeX"); +_("LaTeX_Title"); _("Lemma"); _("Lemma*"); _("Lemma-numbered"); @@ -322,8 +328,10 @@ _("MarkBoth"); _("MathLetters"); _("MeinZeichen"); _("Minisec"); -_("MyRef"); +_("modying"); +_("msnumber"); _("My_Address"); +_("MyRef"); _("Myref"); _("Name"); _("Narrative"); @@ -333,18 +341,18 @@ _("Note"); _("Note*"); _("Note-numbered"); _("Note-plain"); -_("Note-unnumbered"); _("NoteToEditor"); _("Notetoeditor"); +_("Note-unnumbered"); _("Offprint"); _("Offprints"); _("Offsets"); +_("offsets"); _("Oggetto"); _("Opening"); _("Ort"); _("Overlay"); _("PACS"); -_("PS"); _("Paragraph"); _("Paragraph*"); _("Paragraph-numbered"); @@ -355,8 +363,8 @@ _("Petit"); _("Phone"); _("Place"); _("PlaceFigure"); -_("PlaceTable"); _("Placefigure"); +_("PlaceTable"); _("Placetable"); _("PortraitSlide"); _("PostalCommend"); @@ -373,11 +381,12 @@ _("Proposition*"); _("Proposition-numbered"); _("Proposition-plain"); _("Proposition-unnumbered"); +_("PS"); +_("ps"); _("Publishers"); _("Question"); _("Quotation"); _("Quote"); -_("REVTEX_Title"); _("Received"); _("Recieved"); _("Recieved/Accepted"); @@ -387,17 +396,17 @@ _("Remark"); _("Remark*"); _("Remark-numbered"); _("Remark-plain"); -_("Remark-unnumbered"); _("Remarks"); +_("Remark-unnumbered"); _("RetourAdresse"); _("ReturnAddress"); -_("RightHeader"); +_("REVTEX_Title"); _("Right_Address"); +_("RightHeader"); _("Rotatefoilhead"); _("Running_LaTeX_Title"); _("SCENE"); _("SCENE*"); -_("SGML"); _("Scrap"); _("Section"); _("Section*"); @@ -405,10 +414,11 @@ _("Section-numbered"); _("Send"); _("Send_To_Address"); _("Seriate"); +_("SGML"); _("ShortFoilhead"); +_("Shortfoilhead"); _("ShortRotatefoilhead"); _("ShortTitle"); -_("Shortfoilhead"); _("Signature"); _("Slide"); _("Slide*"); @@ -424,26 +434,26 @@ _("State"); _("Strasse"); _("Street"); _("Style"); -_("SubSection"); -_("SubTitle"); +_("style"); _("Subitle"); _("Subject"); _("Subjectclass"); _("Subparagraph"); _("Subparagraph*"); +_("SubSection"); _("Subsection"); _("Subsection*"); _("Subsection-numbered"); _("Subsubsection"); _("Subsubsection*"); _("Subsubsection-numbered"); +_("SubTitle"); _("Subtitle"); _("Suggested"); _("Summary"); _("Summary-numbered"); _("Surname"); -_("TOC_Author"); -_("TOC_Title"); +_("surname"); _("TableComments"); _("TableRefs"); _("Telefax"); @@ -455,8 +465,8 @@ _("Theorem"); _("Theorem*"); _("Theorem-numbered"); _("Theorem-plain"); -_("Theorem-unnumbered"); _("TheoremTemplate"); +_("Theorem-unnumbered"); _("Thesaurus"); _("ThickLine"); _("This"); @@ -464,39 +474,29 @@ _("ThreeAffiliations"); _("ThreeAuthors"); _("TickList"); _("Title"); -_("Title_Running"); _("Titlehead"); +_("Title_Running"); +_("TOC_Author"); +_("TOC_Title"); _("Town"); -_("Trans_Keywords"); _("Transition"); +_("Trans_Keywords"); _("Translated"); _("TranslatedAbstract"); _("Translated_Title"); _("Translator"); _("TwoAffiliations"); _("TwoAuthors"); -_("URL"); _("Unterschrift"); _("Uppertitleback"); +_("URL"); _("Use"); _("Verbatim"); _("Verse"); _("Verteiler"); _("VisibleText"); _("YourMail"); -_("YourRef"); _("Yourmail"); +_("YourRef"); _("Yourref"); _("Zusatz"); -_("cc"); -_("encl"); -_("first"); -_("foilhead"); -_("journal"); -_("landscape"); -_("modying"); -_("msnumber"); -_("offsets"); -_("ps"); -_("style"); -_("surname"); diff --git a/src/frontends/xforms/FormCopyright.C b/src/frontends/xforms/FormCopyright.C index 6406d8483b..5a8ecdc14d 100644 --- a/src/frontends/xforms/FormCopyright.C +++ b/src/frontends/xforms/FormCopyright.C @@ -11,6 +11,7 @@ #endif #include "xform_macros.h" +#include "form_copyright.h" #include "FormCopyright.h" #include "Dialogs.h" #include "LyXView.h" diff --git a/src/frontends/xforms/FormCopyright.h b/src/frontends/xforms/FormCopyright.h index 5647a40494..dffdafd21d 100644 --- a/src/frontends/xforms/FormCopyright.h +++ b/src/frontends/xforms/FormCopyright.h @@ -28,6 +28,7 @@ class Dialogs; // same arguement as in Dialogs.h s/LyX/UI/ class LyXView; +struct FD_form_copyright; /** This class provides an XForms implementation of the FormCopyright Dialog. */ @@ -85,4 +86,3 @@ private: #endif - diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 92fa4acdba..5c678d436d 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -19,6 +19,8 @@ #include "Dialogs.h" #include "lyxrc.h" #include "debug.h" +#include "support/FileInfo.h" +#include "support/filetools.h" #include "lyx_gui_misc.h" #include "gettext.h" @@ -36,7 +38,7 @@ C_GENERICCB(FormPreferences, InputCB) FormPreferences::FormPreferences(LyXView * lv, Dialogs * d) : dialog_(0), bind_(0), misc_(0), screen_fonts_(0), interface_fonts_(0), printer_(0), paths_(0), - lv_(lv), d_(d), u_(0), h_(0) + lv_(lv), d_(d), u_(0), h_(0), status(DIALOG_UNMODIFIED) { // let the dialog be shown // This is a permanent connection so we won't bother @@ -61,6 +63,63 @@ void FormPreferences::build() printer_ = build_printer(); paths_ = build_paths(); + // setup the input returns + // Bind tab + fl_set_input_return(bind_->input_bind, FL_RETURN_CHANGED); + // Misc tab + fl_set_counter_return(misc_->counter_autosave, FL_RETURN_CHANGED); + fl_set_counter_return(misc_->counter_line_len, FL_RETURN_CHANGED); + // Screen fonts + fl_set_input_return(screen_fonts_->input_roman, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_sans, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_typewriter, + FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_encoding, FL_RETURN_CHANGED); + fl_set_counter_return(screen_fonts_->counter_zoom, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_tiny, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_script, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_footnote, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_small, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_normal, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_large, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_larger, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_largest, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_huge, FL_RETURN_CHANGED); + fl_set_input_return(screen_fonts_->input_huger, FL_RETURN_CHANGED); + // interface fonts + fl_set_input_return(interface_fonts_->input_popup_font, + FL_RETURN_CHANGED); + fl_set_input_return(interface_fonts_->input_menu_font, + FL_RETURN_CHANGED); + fl_set_input_return(interface_fonts_->input_encoding, + FL_RETURN_CHANGED); + // printer + fl_set_input_return(printer_->input_command, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_page_range, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_copies, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_reverse, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_to_printer, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_file_extension, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_spool_command, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_paper_type, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_even_pages, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_odd_pages, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_collated, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_landscape, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_to_file, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_extra_options, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_spool_prefix, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_paper_size, FL_RETURN_CHANGED); + fl_set_input_return(printer_->input_name, FL_RETURN_CHANGED); + // paths + fl_set_input_return(paths_->input_default_path, FL_RETURN_CHANGED); + fl_set_input_return(paths_->input_template_path, FL_RETURN_CHANGED); + fl_set_input_return(paths_->input_temp_dir, FL_RETURN_CHANGED); + fl_set_input_return(paths_->input_lastfiles, FL_RETURN_CHANGED); + fl_set_input_return(paths_->input_backup_path, FL_RETURN_CHANGED); + fl_set_counter_return(paths_->counter_lastfiles, FL_RETURN_CHANGED); + + // Now add them to the tabfolder fl_addto_tabfolder(dialog_->tabfolder_prefs, _("Bindings"), bind_->form_bind); @@ -82,6 +141,21 @@ void FormPreferences::build() fl_set_form_atclose(dialog_->form_preferences, C_FormPreferencesWMHideCB, 0); + + // deactivate the various browse buttons because they + // currently aren't implemented + fl_deactivate_object(bind_->button_bind_file_browse); + fl_deactivate_object(paths_->button_document_browse); + fl_deactivate_object(paths_->button_template_browse); + fl_deactivate_object(paths_->button_temp_dir_browse); + fl_deactivate_object(paths_->button_lastfiles_browse); + fl_deactivate_object(paths_->button_backup_path_browse); + fl_set_object_lcol(bind_->button_bind_file_browse, FL_INACTIVE); + fl_set_object_lcol(paths_->button_document_browse, FL_INACTIVE); + fl_set_object_lcol(paths_->button_template_browse, FL_INACTIVE); + fl_set_object_lcol(paths_->button_temp_dir_browse, FL_INACTIVE); + fl_set_object_lcol(paths_->button_lastfiles_browse, FL_INACTIVE); + fl_set_object_lcol(paths_->button_backup_path_browse, FL_INACTIVE); } @@ -95,6 +169,12 @@ void FormPreferences::show() if (dialog_->form_preferences->visible) { fl_raise_form(dialog_->form_preferences); } else { + status = DIALOG_UNMODIFIED; + fl_deactivate_object(dialog_->button_ok); + fl_deactivate_object(dialog_->button_apply); + fl_set_object_lcol(dialog_->button_ok, FL_INACTIVE); + fl_set_object_lcol(dialog_->button_apply, FL_INACTIVE); + fl_show_form(dialog_->form_preferences, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, @@ -128,7 +208,8 @@ void FormPreferences::apply() lyxrc.auto_region_delete = fl_get_button(misc_-> check_auto_region_delete); lyxrc.exit_confirmation = fl_get_button(misc_->check_exit_confirm); - lyxrc.display_shortcuts = fl_get_button(misc_->check_display_shortcuts); + lyxrc.display_shortcuts = + fl_get_button(misc_->check_display_shortcuts); lyxrc.autosave = static_cast (fl_get_counter_value(misc_->counter_autosave)); lyxrc.ascii_linelen = static_cast @@ -139,7 +220,8 @@ void FormPreferences::apply() lyxrc.typewriter_font_name = fl_get_input(screen_fonts_-> input_typewriter); lyxrc.font_norm = fl_get_input(screen_fonts_->input_encoding); - lyxrc.use_scalable_fonts = fl_get_button(screen_fonts_->check_scalable); + lyxrc.use_scalable_fonts = + fl_get_button(screen_fonts_->check_scalable); lyxrc.zoom = static_cast (fl_get_counter_value(screen_fonts_->counter_zoom)); lyxrc.font_sizes[LyXFont::SIZE_TINY] = @@ -328,9 +410,79 @@ void FormPreferences::input() { bool activate = true; // - // whatever checks you need + // whatever checks you need to ensure the user hasn't entered + // some totally ridiculous value somewhere. Change activate to suit. + // + // Examples: + // paths -- all dirs in the path should exist, be writable & absolute + if (!AbsolutePath(fl_get_input(paths_->input_default_path)) + || 1 != IsDirWriteable(fl_get_input(paths_->input_default_path)) + || !AbsolutePath(fl_get_input(paths_->input_template_path)) + || 1 != IsDirWriteable(fl_get_input(paths_->input_template_path)) + // lastfiles: exists && writeable || non-existent && isn't a dir + // NOTE: assumes IsFileWriteable == -1 means non-existent hence + // the extra check to see if its a directory + || !AbsolutePath(fl_get_input(paths_->input_lastfiles)) + || 1 != IsDirWriteable(OnlyPath(fl_get_input(paths_-> + input_lastfiles))) + || 0 == IsFileWriteable(OnlyPath(fl_get_input(paths_-> + input_lastfiles))) + || FileInfo(fl_get_input(paths_->input_lastfiles)).isDir() + // tmpdir: only check if we are using it + || (fl_get_button(paths_->check_use_temp_dir) + && (1 != IsDirWriteable(fl_get_input(paths_->input_temp_dir)) + || !AbsolutePath(fl_get_input(paths_->input_temp_dir)))) + // backupdir: can safely be left empty + || (fl_get_button(paths_->check_make_backups) + && (!string(fl_get_input(paths_->input_backup_path)).empty() + && (1 != IsDirWriteable(fl_get_input(paths_-> + input_backup_path)) + || !AbsolutePath(fl_get_input(paths_-> + input_backup_path)))))) { + activate = false; + } + + // fontsizes -- tiny < script < footnote etc. + if (0.0 >= strToDbl(fl_get_input(screen_fonts_->input_tiny)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_script)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_footnote)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_small)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_normal)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_large)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_larger)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_largest)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_huge)) + || 0.0 >= strToDbl(fl_get_input(screen_fonts_->input_huger))) { + // make sure they all have positive entries + // Also note that an empty entry is returned as 0.0 by strToDbl + activate = false; + } else if (strToDbl(fl_get_input(screen_fonts_->input_tiny)) > + strToDbl(fl_get_input(screen_fonts_->input_script)) || + strToDbl(fl_get_input(screen_fonts_->input_script)) > + strToDbl(fl_get_input(screen_fonts_->input_footnote)) || + strToDbl(fl_get_input(screen_fonts_->input_footnote)) > + strToDbl(fl_get_input(screen_fonts_->input_small)) || + strToDbl(fl_get_input(screen_fonts_->input_small)) > + strToDbl(fl_get_input(screen_fonts_->input_normal)) || + strToDbl(fl_get_input(screen_fonts_->input_normal)) > + strToDbl(fl_get_input(screen_fonts_->input_large)) || + strToDbl(fl_get_input(screen_fonts_->input_large)) > + strToDbl(fl_get_input(screen_fonts_->input_larger)) || + strToDbl(fl_get_input(screen_fonts_->input_larger)) > + strToDbl(fl_get_input(screen_fonts_->input_largest)) || + strToDbl(fl_get_input(screen_fonts_->input_largest)) > + strToDbl(fl_get_input(screen_fonts_->input_huge)) || + strToDbl(fl_get_input(screen_fonts_->input_huge)) > + strToDbl(fl_get_input(screen_fonts_->input_huger))) { + activate = false; + } + // - if (activate) { + // You can modify the dialog and still have the buttons disabled + status = DIALOG_MODIFIED; + + if (status == DIALOG_MODIFIED + && activate) { fl_activate_object(dialog_->button_ok); fl_activate_object(dialog_->button_apply); fl_set_object_lcol(dialog_->button_ok, FL_BLACK); @@ -399,6 +551,3 @@ void FormPreferences::InputCB(FL_OBJECT * ob, long) FormPreferences * pre = static_cast(ob->form->u_vdata); pre->input(); } - - - diff --git a/src/frontends/xforms/FormPreferences.h b/src/frontends/xforms/FormPreferences.h index b53dddd99f..231053397f 100644 --- a/src/frontends/xforms/FormPreferences.h +++ b/src/frontends/xforms/FormPreferences.h @@ -120,6 +120,8 @@ private: Connection u_; /// Hide connection. Connection h_; + /// + EnumDialogStatus status; //@} }; diff --git a/src/frontends/xforms/form_citation.C b/src/frontends/xforms/form_citation.C index 691317faa2..d67a5d0574 100644 --- a/src/frontends/xforms/form_citation.C +++ b/src/frontends/xforms/form_citation.C @@ -1,4 +1,4 @@ -// File modified by fdfix.sh for use by lyx (with xforms >= 0.86) and gettext +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext #include #include "lyx_gui_misc.h" #include "gettext.h" diff --git a/src/frontends/xforms/form_citation.h b/src/frontends/xforms/form_citation.h index 3c01384330..c4b5c4b397 100644 --- a/src/frontends/xforms/form_citation.h +++ b/src/frontends/xforms/form_citation.h @@ -1,4 +1,4 @@ -/** Header file generated with fdesign on Wed Jul 19 09:20:42 2000.**/ +/** Header file generated with fdesign on Fri Jul 28 11:50:10 2000.**/ #ifndef FD_form_citation_h_ #define FD_form_citation_h_ diff --git a/src/frontends/xforms/form_copyright.C b/src/frontends/xforms/form_copyright.C index 7e2e9639ef..be07dafc77 100644 --- a/src/frontends/xforms/form_copyright.C +++ b/src/frontends/xforms/form_copyright.C @@ -1,4 +1,4 @@ -// File modified by fdfix.sh for use by lyx (with xforms >= 0.86) and gettext +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext #include #include "lyx_gui_misc.h" #include "gettext.h" diff --git a/src/frontends/xforms/form_copyright.h b/src/frontends/xforms/form_copyright.h index 3c70c88d52..87f70a9bc4 100644 --- a/src/frontends/xforms/form_copyright.h +++ b/src/frontends/xforms/form_copyright.h @@ -1,4 +1,4 @@ -/** Header file generated with fdesign on Fri Jul 14 09:35:06 2000.**/ +/** Header file generated with fdesign on Fri Jul 28 11:50:10 2000.**/ #ifndef FD_form_copyright_h_ #define FD_form_copyright_h_ diff --git a/src/frontends/xforms/form_preferences.C b/src/frontends/xforms/form_preferences.C index 60433b3440..c25420881d 100644 --- a/src/frontends/xforms/form_preferences.C +++ b/src/frontends/xforms/form_preferences.C @@ -1,4 +1,4 @@ -// File modified by fdfix.sh for use by lyx (with xforms >= 0.86) and gettext +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext #include #include "lyx_gui_misc.h" #include "gettext.h" @@ -15,12 +15,13 @@ FD_form_bind * FormPreferences::build_bind() FL_OBJECT *obj; FD_form_bind *fdui = new FD_form_bind; - fdui->form_bind = fl_bgn_form(FL_NO_BOX, 380, 320); + fdui->form_bind = fl_bgn_form(FL_NO_BOX, 450, 320); fdui->form_bind->u_vdata = this; - obj = fl_add_box(FL_FLAT_BOX, 0, 0, 380, 320, ""); - fdui->input_bind = obj = fl_add_input(FL_NORMAL_INPUT, 80, 80, 190, 30, _("Bind file")); + obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, ""); + fdui->input_bind = obj = fl_add_input(FL_NORMAL_INPUT, 145, 80, 190, 30, _("Bind file")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - obj = fl_add_button(FL_NORMAL_BUTTON, 270, 80, 80, 30, _("Browse...")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->button_bind_file_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 335, 80, 80, 30, _("Browse...")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_end_form(); @@ -35,31 +36,37 @@ FD_form_misc * FormPreferences::build_misc() FL_OBJECT *obj; FD_form_misc *fdui = new FD_form_misc; - fdui->form_misc = fl_bgn_form(FL_NO_BOX, 380, 320); + fdui->form_misc = fl_bgn_form(FL_NO_BOX, 450, 320); fdui->form_misc->u_vdata = this; - obj = fl_add_box(FL_FLAT_BOX, 0, 0, 380, 320, ""); + obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, ""); fdui->check_banner = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 30, 240, 30, _("Show banner")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_button(obj, 1); fdui->check_auto_region_delete = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 60, 240, 30, _("Auto region delete")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_button(obj, 1); fdui->check_exit_confirm = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 90, 240, 30, _("Exit confirmation")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_button(obj, 1); fdui->check_display_shortcuts = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 120, 240, 30, _("Display keyboard shortcuts")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_button(obj, 1); - fdui->counter_autosave = obj = fl_add_counter(FL_NORMAL_COUNTER, 160, 250, 170, 30, _("Autosave interval")); + fdui->counter_autosave = obj = fl_add_counter(FL_NORMAL_COUNTER, 240, 255, 170, 30, _("Autosave interval")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, 0, 1200); fl_set_counter_value(obj, 300); fl_set_counter_step(obj, 1, 1); - fdui->counter_line_len = obj = fl_add_counter(FL_NORMAL_COUNTER, 160, 220, 170, 30, _("Ascii line length")); + fdui->counter_line_len = obj = fl_add_counter(FL_NORMAL_COUNTER, 240, 225, 170, 30, _("Ascii line length")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, 0, 120); fl_set_counter_value(obj, 75); @@ -77,47 +84,63 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts() FL_OBJECT *obj; FD_form_screen_fonts *fdui = new FD_form_screen_fonts; - fdui->form_screen_fonts = fl_bgn_form(FL_NO_BOX, 380, 320); + fdui->form_screen_fonts = fl_bgn_form(FL_NO_BOX, 450, 320); fdui->form_screen_fonts->u_vdata = this; - obj = fl_add_box(FL_FLAT_BOX, 0, 0, 380, 320, ""); - fdui->input_roman = obj = fl_add_input(FL_NORMAL_INPUT, 160, 10, 200, 30, _("Roman")); + obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, ""); + fdui->input_roman = obj = fl_add_input(FL_NORMAL_INPUT, 210, 5, 200, 30, _("Roman")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_sans = obj = fl_add_input(FL_NORMAL_INPUT, 160, 40, 200, 30, _("Sans Serif")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_sans = obj = fl_add_input(FL_NORMAL_INPUT, 210, 35, 200, 30, _("Sans Serif")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_typewriter = obj = fl_add_input(FL_NORMAL_INPUT, 160, 70, 200, 30, _("Typewriter")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_typewriter = obj = fl_add_input(FL_NORMAL_INPUT, 210, 65, 200, 30, _("Typewriter")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->counter_zoom = obj = fl_add_counter(FL_NORMAL_COUNTER, 160, 130, 200, 30, _("%")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->counter_zoom = obj = fl_add_counter(FL_NORMAL_COUNTER, 210, 125, 200, 30, _("%")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_RIGHT); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, 0, 999); fl_set_counter_value(obj, 150); fl_set_counter_step(obj, 1, 1); - fdui->check_scalable = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 0, 130, 160, 30, _("Allow scaling")); + fdui->check_scalable = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 50, 125, 160, 30, _("Allow scaling")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_button(obj, 1); - fdui->input_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 160, 100, 200, 30, _("Encoding")); + fdui->input_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 210, 95, 200, 30, _("Encoding")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_tiny = obj = fl_add_input(FL_FLOAT_INPUT, 120, 170, 70, 30, _("tiny")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_tiny = obj = fl_add_input(FL_FLOAT_INPUT, 140, 165, 70, 30, _("tiny")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_script = obj = fl_add_input(FL_FLOAT_INPUT, 290, 170, 70, 30, _("script")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_script = obj = fl_add_input(FL_FLOAT_INPUT, 340, 165, 70, 30, _("script")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_footnote = obj = fl_add_input(FL_FLOAT_INPUT, 120, 200, 70, 30, _("footnote")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_footnote = obj = fl_add_input(FL_FLOAT_INPUT, 140, 195, 70, 30, _("footnote")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_small = obj = fl_add_input(FL_FLOAT_INPUT, 290, 200, 70, 30, _("small")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_small = obj = fl_add_input(FL_FLOAT_INPUT, 340, 195, 70, 30, _("small")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_large = obj = fl_add_input(FL_FLOAT_INPUT, 290, 230, 70, 30, _("large")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_large = obj = fl_add_input(FL_FLOAT_INPUT, 340, 225, 70, 30, _("large")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_larger = obj = fl_add_input(FL_FLOAT_INPUT, 120, 260, 70, 30, _("larger")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_larger = obj = fl_add_input(FL_FLOAT_INPUT, 140, 255, 70, 30, _("larger")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_largest = obj = fl_add_input(FL_FLOAT_INPUT, 290, 260, 70, 30, _("largest")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_largest = obj = fl_add_input(FL_FLOAT_INPUT, 340, 255, 70, 30, _("largest")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_normal = obj = fl_add_input(FL_FLOAT_INPUT, 120, 230, 70, 30, _("normal")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_normal = obj = fl_add_input(FL_FLOAT_INPUT, 140, 225, 70, 30, _("normal")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_huge = obj = fl_add_input(FL_FLOAT_INPUT, 120, 290, 70, 30, _("huge")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_huge = obj = fl_add_input(FL_FLOAT_INPUT, 140, 285, 70, 30, _("huge")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_huger = obj = fl_add_input(FL_FLOAT_INPUT, 290, 290, 70, 30, _("huger")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_huger = obj = fl_add_input(FL_FLOAT_INPUT, 340, 285, 70, 30, _("huger")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_end_form(); fdui->form_screen_fonts->fdui = fdui; @@ -131,15 +154,18 @@ FD_form_interface_fonts * FormPreferences::build_interface_fonts() FL_OBJECT *obj; FD_form_interface_fonts *fdui = new FD_form_interface_fonts; - fdui->form_interface_fonts = fl_bgn_form(FL_NO_BOX, 380, 320); + fdui->form_interface_fonts = fl_bgn_form(FL_NO_BOX, 450, 320); fdui->form_interface_fonts->u_vdata = this; - obj = fl_add_box(FL_FLAT_BOX, 0, 0, 380, 320, ""); - fdui->input_popup_font = obj = fl_add_input(FL_NORMAL_INPUT, 120, 50, 200, 30, _("Popup")); + obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, ""); + fdui->input_popup_font = obj = fl_add_input(FL_NORMAL_INPUT, 215, 50, 200, 30, _("Popup")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_menu_font = obj = fl_add_input(FL_NORMAL_INPUT, 120, 80, 200, 30, _("Menu")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_menu_font = obj = fl_add_input(FL_NORMAL_INPUT, 215, 80, 200, 30, _("Menu")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 120, 110, 200, 30, _("Encoding")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 215, 110, 200, 30, _("Encoding")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_end_form(); fdui->form_interface_fonts->fdui = fdui; @@ -153,45 +179,63 @@ FD_form_printer * FormPreferences::build_printer() FL_OBJECT *obj; FD_form_printer *fdui = new FD_form_printer; - fdui->form_printer = fl_bgn_form(FL_NO_BOX, 380, 320); + fdui->form_printer = fl_bgn_form(FL_NO_BOX, 450, 320); fdui->form_printer->u_vdata = this; - obj = fl_add_box(FL_FLAT_BOX, 0, 0, 380, 320, ""); - fdui->input_command = obj = fl_add_input(FL_NORMAL_INPUT, 110, 60, 80, 30, _("command")); + obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, ""); + fdui->input_command = obj = fl_add_input(FL_NORMAL_INPUT, 130, 60, 80, 30, _("command")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_page_range = obj = fl_add_input(FL_NORMAL_INPUT, 110, 90, 80, 30, _("page range")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_page_range = obj = fl_add_input(FL_NORMAL_INPUT, 130, 90, 80, 30, _("page range")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_copies = obj = fl_add_input(FL_NORMAL_INPUT, 110, 120, 80, 30, _("copies")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_copies = obj = fl_add_input(FL_NORMAL_INPUT, 130, 120, 80, 30, _("copies")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_reverse = obj = fl_add_input(FL_NORMAL_INPUT, 110, 150, 80, 30, _("reverse")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_reverse = obj = fl_add_input(FL_NORMAL_INPUT, 130, 150, 80, 30, _("reverse")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_to_printer = obj = fl_add_input(FL_NORMAL_INPUT, 110, 180, 80, 30, _("to printer")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_to_printer = obj = fl_add_input(FL_NORMAL_INPUT, 130, 180, 80, 30, _("to printer")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_file_extension = obj = fl_add_input(FL_NORMAL_INPUT, 110, 210, 80, 30, _("file extension")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_file_extension = obj = fl_add_input(FL_NORMAL_INPUT, 130, 210, 80, 30, _("file extension")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_spool_command = obj = fl_add_input(FL_NORMAL_INPUT, 110, 240, 80, 30, _("spool command")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_spool_command = obj = fl_add_input(FL_NORMAL_INPUT, 130, 240, 80, 30, _("spool command")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_paper_type = obj = fl_add_input(FL_NORMAL_INPUT, 110, 270, 80, 30, _("paper type")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_paper_type = obj = fl_add_input(FL_NORMAL_INPUT, 130, 270, 80, 30, _("paper type")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_even_pages = obj = fl_add_input(FL_NORMAL_INPUT, 300, 60, 80, 30, _("even pages")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_even_pages = obj = fl_add_input(FL_NORMAL_INPUT, 360, 60, 80, 30, _("even pages")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_odd_pages = obj = fl_add_input(FL_NORMAL_INPUT, 300, 90, 80, 30, _("odd pages")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_odd_pages = obj = fl_add_input(FL_NORMAL_INPUT, 360, 90, 80, 30, _("odd pages")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_collated = obj = fl_add_input(FL_NORMAL_INPUT, 300, 120, 80, 30, _("collated")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_collated = obj = fl_add_input(FL_NORMAL_INPUT, 360, 120, 80, 30, _("collated")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_landscape = obj = fl_add_input(FL_NORMAL_INPUT, 300, 150, 80, 30, _("landscape")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_landscape = obj = fl_add_input(FL_NORMAL_INPUT, 360, 150, 80, 30, _("landscape")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_to_file = obj = fl_add_input(FL_NORMAL_INPUT, 300, 180, 80, 30, _("to file")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_to_file = obj = fl_add_input(FL_NORMAL_INPUT, 360, 180, 80, 30, _("to file")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_extra_options = obj = fl_add_input(FL_NORMAL_INPUT, 300, 210, 80, 30, _("extra options")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_extra_options = obj = fl_add_input(FL_NORMAL_INPUT, 360, 210, 80, 30, _("extra options")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_spool_prefix = obj = fl_add_input(FL_NORMAL_INPUT, 300, 240, 80, 30, _("spool printer prefix")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_spool_prefix = obj = fl_add_input(FL_NORMAL_INPUT, 360, 240, 80, 30, _("spool printer prefix")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_paper_size = obj = fl_add_input(FL_NORMAL_INPUT, 300, 270, 80, 30, _("paper size")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_paper_size = obj = fl_add_input(FL_NORMAL_INPUT, 360, 270, 80, 30, _("paper size")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_name = obj = fl_add_input(FL_NORMAL_INPUT, 110, 10, 80, 30, _("name")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->input_name = obj = fl_add_input(FL_NORMAL_INPUT, 130, 10, 80, 30, _("name")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->check_adapt_output = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 230, 10, 120, 30, _("adapt output")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->check_adapt_output = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 240, 10, 120, 30, _("adapt output")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_end_form(); fdui->form_printer->fdui = fdui; @@ -205,45 +249,54 @@ FD_form_paths * FormPreferences::build_paths() FL_OBJECT *obj; FD_form_paths *fdui = new FD_form_paths; - fdui->form_paths = fl_bgn_form(FL_NO_BOX, 380, 430); + fdui->form_paths = fl_bgn_form(FL_NO_BOX, 450, 320); fdui->form_paths->u_vdata = this; - obj = fl_add_box(FL_FLAT_BOX, 0, 0, 380, 430, ""); - fdui->input_default_path = obj = fl_add_input(FL_NORMAL_INPUT, 110, 10, 170, 30, _("Default path")); + obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, ""); + fdui->input_default_path = obj = fl_add_input(FL_NORMAL_INPUT, 170, 10, 170, 30, _("Default path")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->button_document_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 280, 10, 90, 30, _("Browse...")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->button_document_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 10, 90, 30, _("Browse...")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->counter_lastfiles = obj = fl_add_counter(FL_NORMAL_COUNTER, 110, 130, 110, 30, _("Last file count")); + fdui->counter_lastfiles = obj = fl_add_counter(FL_NORMAL_COUNTER, 170, 130, 110, 30, _("Last file count")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, 0, 9); fl_set_counter_value(obj, 4); fl_set_counter_step(obj, 1, 1); - fdui->input_template_path = obj = fl_add_input(FL_NORMAL_INPUT, 110, 40, 170, 30, _("Template path")); + fdui->input_template_path = obj = fl_add_input(FL_NORMAL_INPUT, 170, 40, 170, 30, _("Template path")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->button_template_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 280, 40, 90, 30, _("Browse...")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->button_template_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 40, 90, 30, _("Browse...")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->check_last_files = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 230, 130, 140, 30, _("Check last files")); + fdui->check_last_files = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 290, 130, 140, 30, _("Check last files")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_button(obj, 1); - fdui->input_temp_dir = obj = fl_add_input(FL_NORMAL_INPUT, 110, 70, 170, 30, _("Temp dir")); + fdui->input_temp_dir = obj = fl_add_input(FL_NORMAL_INPUT, 170, 70, 170, 30, _("Temp dir")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->button_temp_dir_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 280, 70, 90, 30, _("Browse...")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->button_temp_dir_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 70, 90, 30, _("Browse...")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->input_lastfiles = obj = fl_add_input(FL_NORMAL_INPUT, 110, 100, 170, 30, _("Lastfiles")); + fdui->input_lastfiles = obj = fl_add_input(FL_NORMAL_INPUT, 170, 100, 170, 30, _("Lastfiles")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->button_lastfiles_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 280, 100, 90, 30, _("Browse...")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->button_lastfiles_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 100, 90, 30, _("Browse...")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->check_use_temp_dir = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 70, 50, 30, ""); + fdui->check_use_temp_dir = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 35, 70, 50, 30, ""); fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_button(obj, 1); - fdui->check_make_backups = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 170, 40, 30, ""); + fdui->check_make_backups = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 170, 40, 30, ""); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); fl_set_button(obj, 1); - fdui->input_backup_path = obj = fl_add_input(FL_NORMAL_INPUT, 110, 170, 170, 30, _("Backup path")); + fdui->input_backup_path = obj = fl_add_input(FL_NORMAL_INPUT, 170, 170, 170, 30, _("Backup path")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fdui->button_backup_path_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 280, 170, 90, 30, _("Browse...")); + fl_set_object_callback(obj, C_FormPreferencesInputCB, 0); + fdui->button_backup_path_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 170, 90, 30, _("Browse...")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_end_form(); @@ -258,19 +311,21 @@ FD_form_preferences * FormPreferences::build_preferences() FL_OBJECT *obj; FD_form_preferences *fdui = new FD_form_preferences; - fdui->form_preferences = fl_bgn_form(FL_NO_BOX, 380, 430); + fdui->form_preferences = fl_bgn_form(FL_NO_BOX, 460, 435); fdui->form_preferences->u_vdata = this; - obj = fl_add_box(FL_UP_BOX, 0, 0, 380, 430, ""); - fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 170, 380, 90, 30, _("Apply")); + obj = fl_add_box(FL_UP_BOX, 0, 0, 460, 435, ""); + fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 250, 395, 90, 30, idex(_("Apply|#A"))); + fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPreferencesApplyCB, 0); - fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 270, 380, 90, 30, _("Cancel")); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 395, 90, 30, idex(_("Cancel|^["))); + fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPreferencesCancelCB, 0); - fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 70, 380, 90, 30, _("Ok")); + fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 150, 395, 90, 30, _("Ok")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPreferencesOKCB, 0); - fdui->tabfolder_prefs = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 0, 0, 380, 360, ""); + fdui->tabfolder_prefs = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 5, 5, 450, 385, ""); fl_set_object_boxtype(obj, FL_FLAT_BOX); fl_end_form(); diff --git a/src/frontends/xforms/form_preferences.h b/src/frontends/xforms/form_preferences.h index a419617a0f..e6ce493e39 100644 --- a/src/frontends/xforms/form_preferences.h +++ b/src/frontends/xforms/form_preferences.h @@ -1,14 +1,20 @@ -/** Header file generated with fdesign on Fri Jul 14 09:35:06 2000.**/ +/** Header file generated with fdesign on Fri Jul 28 11:50:11 2000.**/ #ifndef FD_form_bind_h_ #define FD_form_bind_h_ /** Callbacks, globals and object handlers **/ +extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long); +extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long); +extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long); +extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long); +extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long); +extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long); extern "C" void C_FormPreferencesApplyCB(FL_OBJECT *, long); extern "C" void C_FormPreferencesCancelCB(FL_OBJECT *, long); @@ -20,6 +26,7 @@ struct FD_form_bind { FL_FORM *form_bind; FL_OBJECT *input_bind; + FL_OBJECT *button_bind_file_browse; }; struct FD_form_misc { diff --git a/src/frontends/xforms/form_print.C b/src/frontends/xforms/form_print.C index 8c8db52b29..7115f67329 100644 --- a/src/frontends/xforms/form_print.C +++ b/src/frontends/xforms/form_print.C @@ -1,4 +1,4 @@ -// File modified by fdfix.sh for use by lyx (with xforms >= 0.86) and gettext +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext #include #include "lyx_gui_misc.h" #include "gettext.h" @@ -32,10 +32,12 @@ FD_form_print * FormPrint::build_print() fl_set_object_callback(obj, C_FormPrintInputCB, 0); fdui->group_radio_printto = fl_bgn_group(); - fdui->radio_printer = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 225, 80, 30, idex(_("Printer|#P")));fl_set_button_shortcut(obj, scex(_("Printer|#P")), 1); + fdui->radio_printer = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 225, 80, 30, idex(_("Printer|#P"))); + fl_set_button_shortcut(obj, scex(_("Printer|#P")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintInputCB, 0); - fdui->radio_file = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 265, 80, 30, idex(_("File|#F")));fl_set_button_shortcut(obj, scex(_("File|#F")), 1); + fdui->radio_file = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 265, 80, 30, idex(_("File|#F"))); + fl_set_button_shortcut(obj, scex(_("File|#F")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintInputCB, 0); fl_end_group(); @@ -47,31 +49,38 @@ FD_form_print * FormPrint::build_print() fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 315, 100, 30, _("OK")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintOKCB, 0); - fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 120, 315, 100, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1); + fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 120, 315, 100, 30, idex(_("Apply|#A"))); + fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintApplyCB, 0); - fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 315, 100, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 315, 100, 30, idex(_("Cancel|^["))); + fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintCancelCB, 0); fdui->group_radio_pages = fl_bgn_group(); - fdui->radio_all_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 30, 160, 30, idex(_("All Pages|#G")));fl_set_button_shortcut(obj, scex(_("All Pages|#G")), 1); + fdui->radio_all_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 30, 160, 30, idex(_("All Pages|#G"))); + fl_set_button_shortcut(obj, scex(_("All Pages|#G")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintInputCB, 0); - fdui->radio_odd_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 60, 160, 30, idex(_("Only Odd Pages|#O")));fl_set_button_shortcut(obj, scex(_("Only Odd Pages|#O")), 1); + fdui->radio_odd_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 60, 160, 30, idex(_("Only Odd Pages|#O"))); + fl_set_button_shortcut(obj, scex(_("Only Odd Pages|#O")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintInputCB, 0); - fdui->radio_even_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 90, 160, 30, idex(_("Only Even Pages|#E")));fl_set_button_shortcut(obj, scex(_("Only Even Pages|#E")), 1); + fdui->radio_even_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 90, 160, 30, idex(_("Only Even Pages|#E"))); + fl_set_button_shortcut(obj, scex(_("Only Even Pages|#E")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintInputCB, 0); fl_end_group(); fdui->group_radio_order = fl_bgn_group(); - fdui->radio_order_normal = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 180, 30, 150, 30, idex(_("Normal Order|#N")));fl_set_button_shortcut(obj, scex(_("Normal Order|#N")), 1); + fdui->radio_order_normal = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 180, 30, 150, 30, idex(_("Normal Order|#N"))); + fl_set_button_shortcut(obj, scex(_("Normal Order|#N")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintInputCB, 0); - fdui->radio_order_reverse = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 180, 60, 150, 30, idex(_("Reverse Order|#R")));fl_set_button_shortcut(obj, scex(_("Reverse Order|#R")), 1); + fdui->radio_order_reverse = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 180, 60, 150, 30, idex(_("Reverse Order|#R"))); + fl_set_button_shortcut(obj, scex(_("Reverse Order|#R")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintInputCB, 0); fl_end_group(); @@ -98,7 +107,8 @@ FD_form_print * FormPrint::build_print() fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); fl_set_object_callback(obj, C_FormPrintInputCB, 0); - fdui->radio_unsorted = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 115, 140, 30, idex(_("Unsorted|#U")));fl_set_button_shortcut(obj, scex(_("Unsorted|#U")), 1); + fdui->radio_unsorted = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 115, 140, 30, idex(_("Unsorted|#U"))); + fl_set_button_shortcut(obj, scex(_("Unsorted|#U")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormPrintInputCB, 0); fdui->input_to_page = obj = fl_add_input(FL_INT_INPUT, 110, 160, 50, 30, _("to")); diff --git a/src/frontends/xforms/form_print.h b/src/frontends/xforms/form_print.h index c8461fd8f1..63a4d1ee64 100644 --- a/src/frontends/xforms/form_print.h +++ b/src/frontends/xforms/form_print.h @@ -1,4 +1,4 @@ -/** Header file generated with fdesign on Fri Jul 14 09:35:06 2000.**/ +/** Header file generated with fdesign on Fri Jul 28 11:50:11 2000.**/ #ifndef FD_form_print_h_ #define FD_form_print_h_ diff --git a/src/frontends/xforms/form_tabular.C b/src/frontends/xforms/form_tabular.C index a6e45438ff..3d76fea049 100644 --- a/src/frontends/xforms/form_tabular.C +++ b/src/frontends/xforms/form_tabular.C @@ -1,4 +1,4 @@ -// File modified by fdfix.sh for use by lyx (with xforms >= 0.86) and gettext +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext #include #include "lyx_gui_misc.h" #include "gettext.h" @@ -20,7 +20,8 @@ FD_form_tabular * FormTabular::build_tabular() obj = fl_add_box(FL_FLAT_BOX, 0, 0, 510, 285, ""); fdui->tabFolder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 0, 0, 505, 245, _("Tabbed folder")); fl_set_object_resize(obj, FL_RESIZE_ALL); - fdui->button_close = obj = fl_add_button(FL_NORMAL_BUTTON, 415, 250, 90, 30, idex(_("Close|#C")));fl_set_button_shortcut(obj, scex(_("Close|#C")), 1); + fdui->button_close = obj = fl_add_button(FL_NORMAL_BUTTON, 415, 250, 90, 30, idex(_("Close|#C"))); + fl_set_button_shortcut(obj, scex(_("Close|#C")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularCloseCB, 0); fdui->input_tabular_column = obj = fl_add_input(FL_NORMAL_INPUT, 64, 250, 60, 30, ""); @@ -51,27 +52,34 @@ FD_form_tabular_options * FormTabular::build_tabular_options() obj = fl_add_box(FL_UP_BOX, 0, 0, 505, 227, ""); obj = fl_add_frame(FL_ENGRAVED_FRAME, 280, 20, 120, 75, ""); fl_set_object_color(obj, FL_COL1, FL_COL1); - fdui->button_append_column = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 40, 120, 30, idex(_("Append Column|#A")));fl_set_button_shortcut(obj, scex(_("Append Column|#A")), 1); + fdui->button_append_column = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 40, 120, 30, idex(_("Append Column|#A"))); + fl_set_button_shortcut(obj, scex(_("Append Column|#A")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->button_delete_column = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 40, 120, 30, idex(_("Delete Column|#O")));fl_set_button_shortcut(obj, scex(_("Delete Column|#O")), 1); + fdui->button_delete_column = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 40, 120, 30, idex(_("Delete Column|#O"))); + fl_set_button_shortcut(obj, scex(_("Delete Column|#O")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->button_append_row = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 70, 120, 30, idex(_("Append Row|#p")));fl_set_button_shortcut(obj, scex(_("Append Row|#p")), 1); + fdui->button_append_row = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 70, 120, 30, idex(_("Append Row|#p"))); + fl_set_button_shortcut(obj, scex(_("Append Row|#p")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->button_delete_row = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 70, 120, 30, idex(_("Delete Row|#w")));fl_set_button_shortcut(obj, scex(_("Delete Row|#w")), 1); + fdui->button_delete_row = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 70, 120, 30, idex(_("Delete Row|#w"))); + fl_set_button_shortcut(obj, scex(_("Delete Row|#w")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->button_set_borders = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 10, 120, 30, idex(_("Set Borders|#S")));fl_set_button_shortcut(obj, scex(_("Set Borders|#S")), 1); + fdui->button_set_borders = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 10, 120, 30, idex(_("Set Borders|#S"))); + fl_set_button_shortcut(obj, scex(_("Set Borders|#S")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->button_unset_borders = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 10, 120, 30, idex(_("Unset Borders|#U")));fl_set_button_shortcut(obj, scex(_("Unset Borders|#U")), 1); + fdui->button_unset_borders = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 10, 120, 30, idex(_("Unset Borders|#U"))); + fl_set_button_shortcut(obj, scex(_("Unset Borders|#U")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); fdui->radio_longtable = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 280, 30, 90, 25, _("Longtable")); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_rotate_tabular = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 280, 55, 90, 25, idex(_("Rotate 90°|#9")));fl_set_button_shortcut(obj, scex(_("Rotate 90°|#9")), 1); + fdui->radio_rotate_tabular = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 280, 55, 90, 25, idex(_("Rotate 90°|#9"))); + fl_set_button_shortcut(obj, scex(_("Rotate 90°|#9")), 1); fl_set_object_callback(obj, C_FormTabularInputCB, 0); obj = fl_add_text(FL_NORMAL_TEXT, 285, 10, 100, 20, _("Spec. Table")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); @@ -100,19 +108,23 @@ FD_form_column_options * FormTabular::build_column_options() fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj, FL_BOLD_STYLE); - fdui->radio_border_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 45, 25, 25, idex(_("Top|#t")));fl_set_button_shortcut(obj, scex(_("Top|#t")), 1); + fdui->radio_border_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 45, 25, 25, idex(_("Top|#t"))); + fl_set_button_shortcut(obj, scex(_("Top|#t")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 75, 25, 25, idex(_("Bottom|#b")));fl_set_button_shortcut(obj, scex(_("Bottom|#b")), 1); + fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 75, 25, 25, idex(_("Bottom|#b"))); + fl_set_button_shortcut(obj, scex(_("Bottom|#b")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_BOTTOM_LEFT); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 65, 60, 25, 25, idex(_("Left|#l")));fl_set_button_shortcut(obj, scex(_("Left|#l")), 1); + fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 65, 60, 25, 25, idex(_("Left|#l"))); + fl_set_button_shortcut(obj, scex(_("Left|#l")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 105, 60, 25, 25, idex(_("Right|#r")));fl_set_button_shortcut(obj, scex(_("Right|#r")), 1); + fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 105, 60, 25, 25, idex(_("Right|#r"))); + fl_set_button_shortcut(obj, scex(_("Right|#r")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormTabularInputCB, 0); @@ -122,13 +134,16 @@ FD_form_column_options * FormTabular::build_column_options() fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj, FL_BOLD_STYLE); - fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 30, 110, 25, idex(_("Left|#e")));fl_set_button_shortcut(obj, scex(_("Left|#e")), 1); + fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 30, 110, 25, idex(_("Left|#e"))); + fl_set_button_shortcut(obj, scex(_("Left|#e")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 80, 115, 25, idex(_("Right|#i")));fl_set_button_shortcut(obj, scex(_("Right|#i")), 1); + fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 80, 115, 25, idex(_("Right|#i"))); + fl_set_button_shortcut(obj, scex(_("Right|#i")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 55, 115, 25, idex(_("Center|#c")));fl_set_button_shortcut(obj, scex(_("Center|#c")), 1); + fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 55, 115, 25, idex(_("Center|#c"))); + fl_set_button_shortcut(obj, scex(_("Center|#c")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); fdui->input_column_width = obj = fl_add_input(FL_NORMAL_INPUT, 375, 150, 95, 30, _("Width of column:")); @@ -150,13 +165,16 @@ FD_form_column_options * FormTabular::build_column_options() fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj, FL_BOLD_STYLE); - fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 30, 125, 25, idex(_("Top|#p")));fl_set_button_shortcut(obj, scex(_("Top|#p")), 1); + fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 30, 125, 25, idex(_("Top|#p"))); + fl_set_button_shortcut(obj, scex(_("Top|#p")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 55, 125, 25, idex(_("Center|#n")));fl_set_button_shortcut(obj, scex(_("Center|#n")), 1); + fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 55, 125, 25, idex(_("Center|#n"))); + fl_set_button_shortcut(obj, scex(_("Center|#n")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 80, 120, 25, idex(_("Bottom|#o")));fl_set_button_shortcut(obj, scex(_("Bottom|#o")), 1); + fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 80, 120, 25, idex(_("Bottom|#o"))); + fl_set_button_shortcut(obj, scex(_("Bottom|#o")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); fl_end_form(); @@ -198,9 +216,11 @@ FD_form_cell_options * FormTabular::build_cell_options() fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj, FL_BOLD_STYLE); - fdui->radio_multicolumn = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 25, 145, 25, idex(_("Multicolumn|#M")));fl_set_button_shortcut(obj, scex(_("Multicolumn|#M")), 1); + fdui->radio_multicolumn = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 25, 145, 25, idex(_("Multicolumn|#M"))); + fl_set_button_shortcut(obj, scex(_("Multicolumn|#M")), 1); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_linebreak_cell = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 50, 145, 25, idex(_("Linebreaks|#N")));fl_set_button_shortcut(obj, scex(_("Linebreaks|#N")), 1); + fdui->radio_linebreak_cell = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 50, 145, 25, idex(_("Linebreaks|#N"))); + fl_set_button_shortcut(obj, scex(_("Linebreaks|#N")), 1); fl_set_object_callback(obj, C_FormTabularInputCB, 0); fdui->radio_rotate_cell = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 75, 145, 25, _("Rotate 90°")); fl_set_object_callback(obj, C_FormTabularInputCB, 0); @@ -217,38 +237,48 @@ FD_form_cell_options * FormTabular::build_cell_options() fdui->input_mcolumn_width = obj = fl_add_input(FL_NORMAL_INPUT, 360, 65, 125, 30, _("Width of multi-column:")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_border_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 75, 135, 25, 25, idex(_("Top|#t")));fl_set_button_shortcut(obj, scex(_("Top|#t")), 1); + fdui->radio_border_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 75, 135, 25, 25, idex(_("Top|#t"))); + fl_set_button_shortcut(obj, scex(_("Top|#t")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 75, 165, 25, 25, idex(_("Bottom|#b")));fl_set_button_shortcut(obj, scex(_("Bottom|#b")), 1); + fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 75, 165, 25, 25, idex(_("Bottom|#b"))); + fl_set_button_shortcut(obj, scex(_("Bottom|#b")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_BOTTOM_LEFT); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 55, 150, 25, 25, idex(_("Left|#l")));fl_set_button_shortcut(obj, scex(_("Left|#l")), 1); + fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 55, 150, 25, 25, idex(_("Left|#l"))); + fl_set_button_shortcut(obj, scex(_("Left|#l")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 95, 150, 25, 25, idex(_("Right|#r")));fl_set_button_shortcut(obj, scex(_("Right|#r")), 1); + fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 95, 150, 25, 25, idex(_("Right|#r"))); + fl_set_button_shortcut(obj, scex(_("Right|#r")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 195, 120, 110, 25, idex(_("Left|#e")));fl_set_button_shortcut(obj, scex(_("Left|#e")), 1); + fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 195, 120, 110, 25, idex(_("Left|#e"))); + fl_set_button_shortcut(obj, scex(_("Left|#e")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 195, 170, 115, 25, idex(_("Right|#i")));fl_set_button_shortcut(obj, scex(_("Right|#i")), 1); + fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 195, 170, 115, 25, idex(_("Right|#i"))); + fl_set_button_shortcut(obj, scex(_("Right|#i")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 195, 145, 115, 25, idex(_("Center|#c")));fl_set_button_shortcut(obj, scex(_("Center|#c")), 1); + fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 195, 145, 115, 25, idex(_("Center|#c"))); + fl_set_button_shortcut(obj, scex(_("Center|#c")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 120, 140, 25, idex(_("Top|#p")));fl_set_button_shortcut(obj, scex(_("Top|#p")), 1); + fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 120, 140, 25, idex(_("Top|#p"))); + fl_set_button_shortcut(obj, scex(_("Top|#p")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 145, 140, 25, idex(_("Center|#n")));fl_set_button_shortcut(obj, scex(_("Center|#n")), 1); + fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 145, 140, 25, idex(_("Center|#n"))); + fl_set_button_shortcut(obj, scex(_("Center|#n")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); - fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 170, 140, 25, idex(_("Bottom|#o")));fl_set_button_shortcut(obj, scex(_("Bottom|#o")), 1); + fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 170, 140, 25, idex(_("Bottom|#o"))); + fl_set_button_shortcut(obj, scex(_("Bottom|#o")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularInputCB, 0); fl_end_form(); @@ -311,10 +341,12 @@ FD_form_create_tabular * FormTabular::build_create_tabular() fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 90, 90, 30, _("OK")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularOKCB, 0); - fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 90, 90, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1); + fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 90, 90, 30, idex(_("Apply|#A"))); + fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularApplyCB, 0); - fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 210, 90, 90, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 210, 90, 90, 30, idex(_("Cancel|^["))); + fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormTabularCancelCB, 0); fdui->slider_columns = obj = fl_add_valslider(FL_HOR_SLIDER, 80, 50, 220, 30, _("Columns")); diff --git a/src/frontends/xforms/form_tabular.h b/src/frontends/xforms/form_tabular.h index 51e35d5649..a0c162adc5 100644 --- a/src/frontends/xforms/form_tabular.h +++ b/src/frontends/xforms/form_tabular.h @@ -1,4 +1,4 @@ -/** Header file generated with fdesign on Mon Jul 17 13:48:45 2000.**/ +/** Header file generated with fdesign on Fri Jul 28 11:50:11 2000.**/ #ifndef FD_form_tabular_h_ #define FD_form_tabular_h_ diff --git a/src/frontends/xforms/form_url.C b/src/frontends/xforms/form_url.C index 90903fc619..7b388bdad4 100644 --- a/src/frontends/xforms/form_url.C +++ b/src/frontends/xforms/form_url.C @@ -1,4 +1,4 @@ -// File modified by fdfix.sh for use by lyx (with xforms >= 0.86) and gettext +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext #include #include "lyx_gui_misc.h" #include "gettext.h" diff --git a/src/frontends/xforms/form_url.h b/src/frontends/xforms/form_url.h index 7621a3c8fc..20a31be8ed 100644 --- a/src/frontends/xforms/form_url.h +++ b/src/frontends/xforms/form_url.h @@ -1,4 +1,4 @@ -/** Header file generated with fdesign on Thu Jul 27 12:19:49 2000.**/ +/** Header file generated with fdesign on Fri Jul 28 11:50:11 2000.**/ #ifndef FD_form_url_h_ #define FD_form_url_h_ diff --git a/src/frontends/xforms/forms/README b/src/frontends/xforms/forms/README index aeae400469..273d06b4a6 100644 --- a/src/frontends/xforms/forms/README +++ b/src/frontends/xforms/forms/README @@ -8,7 +8,7 @@ NOTE: An exception to the above is any tabbed form which All forms should be named form_xxx and saved into a file by the same name. For example, the copyright notice is called form_copyright and is stored in form_copyright.fd. Its used by class FormCopyright. If you match this pattern -the fdfix.sh script will do nearly all the conversions for you. That'll make +the fdfix.sh script will do all the conversions for you. That'll make updating the source incredibly easy. Name all buttons and other form components that are likely to cause a callback. @@ -30,23 +30,38 @@ The name of the wrapped dialog will be dialog_ eg. FD_form_copyright * dialog_; -If you follow these simple rules then the generated code for create_form can -be directly used as the FormXxxx::build method without any extra editting to -make it work. Every forms implementation will follow a very simple pattern -and make it easier to maintain. +Angus Leeming has modified the scripts to forward declare FD_form_xxxx thereby +removing one inter-file dependency and removing the struct declaration from the +FormXxxx.h file which was the previous practice. + +If you follow these simple rules then the generated code for create_form_form_xxxx +can will be converted as the FormXxxx::build_xxxx method without any extra +editting to make it work. Every forms implementation will thereby follow a very +simple pattern and make it easier to maintain. + +All the forms are rebuild by running `make updatesrc`. This will generate all +the form_xxxx.[Ch] files. You should run `make install` to install them in the +parent directory. `make install` will also regenerate all the files for you +so you don't have to do the `make updatesrc` step unless, for example, you are +testing the conversion scripts. The fdfix.sh, fdfixh.sed and makefile contain +the necessary smarts to convert the generated code into something that can be +used directly in the LyX codebase.. + +The easiest way to fit into the pattern is to copy an existing dialogs +implementation and adjust it to suit, keeping the variable names the same. +Take a look at the existing .fd files as well to see what is needed in there +in the way of callback names and widget names. -The easiest way to fit into this pattern is to copy an existing dialogs -implementation and adjust it to suit keeping the variable names the same. In addition a lot of work can be saved by using the code that has already been written in the "lyx" module of the LyX CVS repository. This is where the old development branch is kept. The code there will need to be modified slightly to meet these new guidelines. In addition, an earlier generation signalling -system was used in that code. A conversion script called gtmmconvert2 is +system was used in that code. A conversion script called gtkmmconvert2 is available from the gtk-- distribution. It updates all the signals to use libsigc++. -Don't reinvent the wheel. There's 18 months worth of code in the "lyx" +Don't reinvent the wheel. There's 18 months worth of code in the "lyx" cvs module that you should at least use as a guide even if you don't actually make direct use of it. - + Allan. (ARRae) diff --git a/src/frontends/xforms/forms/fdfix.sh b/src/frontends/xforms/forms/fdfix.sh index 5fdb627495..74f413d72d 100644 --- a/src/frontends/xforms/forms/fdfix.sh +++ b/src/frontends/xforms/forms/fdfix.sh @@ -27,7 +27,7 @@ if [ -f "$2.patch" ]; then patch -s $1 < "$2.patch" fi -echo "// File modified by fdfix.sh for use by lyx (with xforms >= 0.86) and gettext" > $2 +echo "// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext" > $2 echo "#include " >> $2 echo "#include \"lyx_gui_misc.h\"" >> $2 echo "#include \"gettext.h\"" >> $2 @@ -35,58 +35,59 @@ echo >> $2 # The commands to sed does this: # -# -e 's/#include "forms\.h"/#include FORMS_H_LOCATION/' +# -e 's/#include \"forms\.h\"/#include FORMS_H_LOCATION/' # # Replace "forms.h" by FORMS_H_LOCATION in #include directives. This # macro is defined in config.h and is either or # . # -# -e '/fl_/ s/".[^|]*"/_(&)/' -# -# For all lines containing "fl_" and a string _not_ containging |, -# replace the string with _(string) -# # -e "/#include \"form_.*\"/a\\ # #include \"$classname.h\" " # # For all lines containing "#include "form_*"", append a line # containing the header file of the parent class # +# -e '/fl_/ s/".[^|]*"/_(&)/' +# +# For all lines containing "fl_" and a string _not_ containing |, +# replace the string with _(string) +# # -e '/shortcut/ s/".*[|].*"/scex(_(&))/' # # For all lines containing "shortcut" and a string containing |, replace # the string with scex(_(string)) # # -e '/fl_add/ s/".*[|].*"/idex(_(&))/' +# # For all lines containing "fl_add" and a string containing |, replace # the string with idex(_(string)) # -# -e '/fl_add/ s/idex("\(.*\)").*$/&fl_set_button_shortcut(obj,"\1",1);/' +# -e '/fl_add/ s/idex("\(.*\)").*$/&\ +# fl_set_button_shortcut(obj,"\1",1);/' +# # For all lines containing "fl_add" and a string containing |, add the # shortcut command after the end of this line # -# -e 's/,\([^ ]\)/, \1/g' -# -# Someone got busy and put spaces in after commas but didn't allow for the -# autogeneration of the files so their pretty formatting got lost. Not anymore. -# -# -e 's/\(\(FD_[^ ]*\) \*fdui =\).*sizeof(\*fdui))/\1 dialog_ = new \2/' +# -e 's/\(\(FD_[^ ]*\) \*fdui =\).*sizeof(\*fdui))/\1 new \2/' # -# We use new/delete not malloc/free so change to suit. Also the local -# variable for our dialog is called dialog_ so do that fix also. +# We use new/delete not malloc/free so change to suit. # -#-e 's/\(FD_f\([^ ]*\)_\([^ ]*\)\) \*create[^ ]*/void F\2\3::build()/' +# -e "s/\(FD_f\([^ _]*\)_\([^ ]*\)\) \*create_form_form[^ ]*/\1 * $classname::build_\3()/" # -# Fixup the name of the create_form... function to have a signature almost -# matching that of the method it will become. You just need to capitalize -# the forms name. +# Fixup the name of the create_form... function to have a signature matching +# that of the method it will become. # -# -e 's/\(fdui->form[^ ]*\)\(.*bgn_form.*\)/\1\2\ +# -e 's/\(fdui->form[^ ]*\)\(.*bgn_form.*\)/\1\2\ # \1->u_vdata = this;/' \ # # We need to store a pointer to the dialog in u_vdata so that the callbacks # will work. # +# -e 's/,\([^ ]\)/, \1/g' +# +# Someone got busy and put spaces in after commas but didn't allow for the +# autogeneration of the files so their pretty formatting got lost. Not anymore. +# classname=`basename $1 .c | cut -c6-` firstchar=`echo $classname | cut -c1 | tr a-z A-Z` @@ -101,7 +102,8 @@ cat $1 | sed \ -e '/fl_/ s/".[^|]*"/_(&)/' \ -e '/shortcut/ s/".*[|].*"/scex(_(&))/' \ -e '/fl_add/ s/".*[|].*"/idex(_(&))/' \ --e '/fl_add/ s/idex(\(.*\)").*$/&fl_set_button_shortcut(obj,scex(\1")),1);/' \ +-e '/fl_add/ s/idex(\(.*\)").*$/&\ + fl_set_button_shortcut(obj,scex(\1")),1);/' \ -e 's/\(\(FD_[^ ]*\) \*fdui =\).*sizeof(\*fdui))/\1 new \2/' \ -e "s/\(FD_f\([^ _]*\)_\([^ ]*\)\) \*create_form_form[^ ]*/\1 * $classname::build_\3()/" \ -e 's/\(fdui->form[^ ]*\)\(.*bgn_form.*\)/\1\2\ diff --git a/src/frontends/xforms/forms/form_preferences.fd b/src/frontends/xforms/forms/form_preferences.fd index 92aca65459..a28eb5009e 100644 --- a/src/frontends/xforms/forms/form_preferences.fd +++ b/src/frontends/xforms/forms/form_preferences.fd @@ -5,17 +5,18 @@ Internal Form Definition File Number of forms: 7 Unit of measure: FL_COORD_PIXEL +SnapGrid: 5 =============== FORM =============== Name: form_bind -Width: 380 +Width: 450 Height: 320 Number of Objects: 3 -------------------- class: FL_BOX type: FLAT_BOX -box: 0 0 380 320 +box: 0 0 450 320 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -33,7 +34,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 80 80 190 30 +box: 145 80 190 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -45,13 +46,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_bind -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 270 80 80 30 +box: 335 80 80 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -62,20 +63,20 @@ label: Browse... shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: +name: button_bind_file_browse callback: argument: =============== FORM =============== Name: form_misc -Width: 380 +Width: 450 Height: 320 Number of Objects: 7 -------------------- class: FL_BOX type: FLAT_BOX -box: 0 0 380 320 +box: 0 0 450 320 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -105,8 +106,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_banner -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 value: 1 -------------------- @@ -124,8 +125,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_auto_region_delete -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 value: 1 -------------------- @@ -143,8 +144,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_exit_confirm -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 value: 1 -------------------- @@ -162,14 +163,14 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_display_shortcuts -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 value: 1 -------------------- class: FL_COUNTER type: NORMAL_COUNTER -box: 160 250 170 30 +box: 240 255 170 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_LEFT @@ -181,8 +182,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: counter_autosave -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 bounds: 0 1200 precision: 0 value: 300 @@ -191,7 +192,7 @@ argument: -------------------- class: FL_COUNTER type: NORMAL_COUNTER -box: 160 220 170 30 +box: 240 225 170 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_LEFT @@ -203,8 +204,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: counter_line_len -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 bounds: 0 120 precision: 0 value: 75 @@ -212,14 +213,14 @@ argument: =============== FORM =============== Name: form_screen_fonts -Width: 380 +Width: 450 Height: 320 Number of Objects: 17 -------------------- class: FL_BOX type: FLAT_BOX -box: 0 0 380 320 +box: 0 0 450 320 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -237,7 +238,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 160 10 200 30 +box: 210 5 200 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -249,13 +250,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_roman -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 160 40 200 30 +box: 210 35 200 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -267,13 +268,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_sans -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 160 70 200 30 +box: 210 65 200 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -285,13 +286,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_typewriter -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_COUNTER type: NORMAL_COUNTER -box: 160 130 200 30 +box: 210 125 200 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_RIGHT @@ -303,8 +304,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: counter_zoom -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 bounds: 0 999 precision: 0 value: 150 @@ -313,7 +314,7 @@ argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 0 130 160 30 +box: 50 125 160 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -325,14 +326,14 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_scalable -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 value: 1 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 160 100 200 30 +box: 210 95 200 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -344,13 +345,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_encoding -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 120 170 70 30 +box: 140 165 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -362,13 +363,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_tiny -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 290 170 70 30 +box: 340 165 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -380,13 +381,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_script -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 120 200 70 30 +box: 140 195 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -398,13 +399,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_footnote -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 290 200 70 30 +box: 340 195 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -416,13 +417,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_small -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 290 230 70 30 +box: 340 225 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -434,13 +435,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_large -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 120 260 70 30 +box: 140 255 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -452,13 +453,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_larger -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 290 260 70 30 +box: 340 255 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -470,13 +471,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_largest -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 120 230 70 30 +box: 140 225 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -488,13 +489,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_normal -callback: +callback: C_FormPreferencesInputCB argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 120 290 70 30 +box: 140 285 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -506,13 +507,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_huge -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT -box: 290 290 70 30 +box: 340 285 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -524,19 +525,19 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_huger -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 =============== FORM =============== Name: form_interface_fonts -Width: 380 +Width: 450 Height: 320 Number of Objects: 4 -------------------- class: FL_BOX type: FLAT_BOX -box: 0 0 380 320 +box: 0 0 450 320 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -554,7 +555,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 120 50 200 30 +box: 215 50 200 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -566,13 +567,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_popup_font -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 120 80 200 30 +box: 215 80 200 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -584,13 +585,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_menu_font -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 120 110 200 30 +box: 215 110 200 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -602,19 +603,19 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_encoding -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 =============== FORM =============== Name: form_printer -Width: 380 +Width: 450 Height: 320 Number of Objects: 19 -------------------- class: FL_BOX type: FLAT_BOX -box: 0 0 380 320 +box: 0 0 450 320 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -632,7 +633,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 60 80 30 +box: 130 60 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -644,13 +645,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_command -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 90 80 30 +box: 130 90 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -662,13 +663,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_page_range -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 120 80 30 +box: 130 120 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -680,13 +681,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_copies -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 150 80 30 +box: 130 150 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -698,13 +699,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_reverse -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 180 80 30 +box: 130 180 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -716,13 +717,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_to_printer -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 210 80 30 +box: 130 210 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -734,13 +735,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_file_extension -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 240 80 30 +box: 130 240 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -752,13 +753,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_spool_command -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 270 80 30 +box: 130 270 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -770,13 +771,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_paper_type -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 300 60 80 30 +box: 360 60 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -788,13 +789,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_even_pages -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 300 90 80 30 +box: 360 90 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -806,13 +807,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_odd_pages -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 300 120 80 30 +box: 360 120 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -824,13 +825,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_collated -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 300 150 80 30 +box: 360 150 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -842,13 +843,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_landscape -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 300 180 80 30 +box: 360 180 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -860,13 +861,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_to_file -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 300 210 80 30 +box: 360 210 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -878,13 +879,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_extra_options -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 300 240 80 30 +box: 360 240 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -896,13 +897,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_spool_prefix -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 300 270 80 30 +box: 360 270 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -914,13 +915,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_paper_size -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 10 80 30 +box: 130 10 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -932,13 +933,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_name -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 230 10 120 30 +box: 240 10 120 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -950,19 +951,19 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_adapt_output -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 =============== FORM =============== Name: form_paths -Width: 380 -Height: 430 +Width: 450 +Height: 320 Number of Objects: 15 -------------------- class: FL_BOX type: FLAT_BOX -box: 0 0 380 430 +box: 0 0 450 320 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -980,7 +981,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 10 170 30 +box: 170 10 170 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -992,13 +993,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_default_path -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 280 10 90 30 +box: 340 10 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -1016,7 +1017,7 @@ argument: -------------------- class: FL_COUNTER type: NORMAL_COUNTER -box: 110 130 110 30 +box: 170 130 110 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_LEFT @@ -1028,8 +1029,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: counter_lastfiles -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 bounds: 0 9 precision: 0 value: 4 @@ -1038,7 +1039,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 40 170 30 +box: 170 40 170 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -1050,13 +1051,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_template_path -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 280 40 90 30 +box: 340 40 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -1074,7 +1075,7 @@ argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 230 130 140 30 +box: 290 130 140 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -1086,14 +1087,14 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_last_files -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 value: 1 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 70 170 30 +box: 170 70 170 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -1105,13 +1106,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_temp_dir -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 280 70 90 30 +box: 340 70 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -1129,7 +1130,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 100 170 30 +box: 170 100 170 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -1141,13 +1142,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_lastfiles -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 280 100 90 30 +box: 340 100 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -1165,7 +1166,7 @@ argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 10 70 50 30 +box: 35 70 50 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -1177,14 +1178,14 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_use_temp_dir -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 value: 1 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 10 170 40 30 +box: 30 170 40 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE @@ -1196,14 +1197,14 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_make_backups -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 value: 1 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 170 170 30 +box: 170 170 170 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -1215,13 +1216,13 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_backup_path -callback: -argument: +callback: C_FormPreferencesInputCB +argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 280 170 90 30 +box: 340 170 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -1238,14 +1239,14 @@ argument: =============== FORM =============== Name: form_preferences -Width: 380 -Height: 430 +Width: 460 +Height: 435 Number of Objects: 5 -------------------- class: FL_BOX type: UP_BOX -box: 0 0 380 430 +box: 0 0 460 435 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -1263,14 +1264,14 @@ argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 170 380 90 30 +box: 250 395 90 30 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: Apply +label: Apply|#A shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -1281,14 +1282,14 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 270 380 90 30 +box: 350 395 90 30 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: Cancel +label: Cancel|^[ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -1299,7 +1300,7 @@ argument: 0 -------------------- class: FL_BUTTON type: RETURN_BUTTON -box: 70 380 90 30 +box: 150 395 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -1317,7 +1318,7 @@ argument: 0 -------------------- class: FL_TABFOLDER type: TOP_TABFOLDER -box: 0 0 380 360 +box: 5 5 450 385 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT diff --git a/src/frontends/xforms/forms/makefile b/src/frontends/xforms/forms/makefile index d85a1d526d..5f3281a8cd 100644 --- a/src/frontends/xforms/forms/makefile +++ b/src/frontends/xforms/forms/makefile @@ -53,15 +53,6 @@ e: c done updatesrc: d e - @echo >&2 - @echo "Everythings been generated now.">&2 - @echo "It's up to you to actually merge it into the respective">&2 - @echo "implementations in the parent directory. Most of the work">&2 - @echo "simply involves cutting and pasting the FormXxxx::build()">&2 - @echo "code into that forms FormXxxx.C file. You'll also want to">&2 - @echo "copy the FD_form... declaration from the header into the">&2 - @echo "classes header file.">&2 - @echo >&2 .fd.c: $(FDESIGN) -convert $< diff --git a/src/lyx_gui_misc.h b/src/lyx_gui_misc.h index 8b959bd089..82233ed756 100644 --- a/src/lyx_gui_misc.h +++ b/src/lyx_gui_misc.h @@ -33,6 +33,7 @@ void CloseAllBufferRelatedDialogs(); /// Ensures info in visible popups are always correct. void updateAllVisibleBufferRelatedDialogs(); +/* These shortcut extractors should be shifted to frontends/xforms/ eventually */ /// Extract shortcut from | string char const * flyx_shortcut_extract(char const * sc); /// Make a shortnamed version of the above func diff --git a/src/lyxfunc.C b/src/lyxfunc.C index c7121450d8..ee19d7e66f 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -2764,6 +2764,10 @@ string LyXFunc::Dispatch(int ac, } break; + case LFUN_DIALOG_PREFERENCES: + owner->getDialogs()->showPreferences(); + break; + case LFUN_SAVEPREFERENCES: { Path p(user_lyxdir);