mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Angus' preference patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1216 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a32d2c972f
commit
a4ccfd5ce3
23
ChangeLog
23
ChangeLog
@ -1,3 +1,26 @@
|
||||
2000-11-14 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/frontends/xforms/FormPreferences.C (ok): use AddName().
|
||||
|
||||
* src/frontends/xforms/Dialogs.C: add "using" directive.
|
||||
|
||||
2000-11-13 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* src/filedlg.C (Select): highlight suggested file in browser, if
|
||||
it is present.
|
||||
|
||||
* src/frontends/xforms/FormPreferences.[Ch]: re-written so that
|
||||
each tab folder is encapsulated in its own class.
|
||||
The Language keymaps are now chosen using a text input and a
|
||||
browser button, rather than a Combox.
|
||||
All the browser buttons are now functional, although LyXFileDlg
|
||||
still needs to be modified to make it straighhtforward to return a
|
||||
directory if that is what is desired.
|
||||
|
||||
* src/frontends/xforms/forms/form_preferences.fd: use text input
|
||||
and browse button to input the Language keymaps. Add a few
|
||||
callbacks for the browse buttons.
|
||||
|
||||
2000-11-14 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/support/tempname.C (tempName): small changes to make it
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
using std::map;
|
||||
using std::max;
|
||||
using std::sort;
|
||||
|
||||
#include "lyx_gui_misc.h" // CancelCloseCB
|
||||
@ -634,7 +635,7 @@ bool LyXFileDlg::HandleOK()
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Emulate a doubleclick
|
||||
return HandleDoubleClick();
|
||||
}
|
||||
@ -672,7 +673,7 @@ void LyXFileDlg::Force(bool cancel)
|
||||
|
||||
// Select: launches dialog and returns selected file
|
||||
string const LyXFileDlg::Select(string const & title, string const & path,
|
||||
string const & mask, string const & suggested)
|
||||
string const & mask, string const & suggested)
|
||||
{
|
||||
// handles new mask and path
|
||||
bool isOk = true;
|
||||
@ -685,10 +686,25 @@ string const LyXFileDlg::Select(string const & title, string const & path,
|
||||
isOk = false;
|
||||
}
|
||||
if (!isOk) Reread();
|
||||
else {
|
||||
fl_select_browser_line(pFileDlgForm->List, 1);
|
||||
fl_set_browser_topline(pFileDlgForm->List, 1);
|
||||
|
||||
// highlight the suggested file in the browser, if it exists.
|
||||
int sel = 0;
|
||||
string filename = OnlyFilename(suggested);
|
||||
if( !filename.empty() ) {
|
||||
for( int i = 0;
|
||||
i < fl_get_browser_maxline(pFileDlgForm->List); ++i ) {
|
||||
string s = fl_get_browser_line(pFileDlgForm->List, i+1);
|
||||
s = strip(frontStrip(s));
|
||||
if( s == filename ) {
|
||||
sel = i+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( sel != 0 ) fl_select_browser_line(pFileDlgForm->List, sel);
|
||||
int top = max(sel - 5, 1);
|
||||
fl_set_browser_topline(pFileDlgForm->List, top);
|
||||
|
||||
// checks whether dialog can be started
|
||||
if (pCurrentDlg) return string();
|
||||
|
@ -32,6 +32,8 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
using std::endl;
|
||||
|
||||
// temporary till ported
|
||||
extern void ShowCredits();
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -57,8 +57,6 @@ public:
|
||||
///
|
||||
~FormPreferences();
|
||||
///
|
||||
static void ComboLanguageCB(int, void *, Combox *);
|
||||
///
|
||||
static int FeedbackCB(FL_OBJECT *, int,
|
||||
FL_Coord, FL_Coord, int, void *);
|
||||
|
||||
@ -85,186 +83,8 @@ private:
|
||||
///
|
||||
virtual FL_FORM * form() const;
|
||||
|
||||
/** Folder specific apply functions.
|
||||
/** Helper functions available to the various tab folders.
|
||||
*/
|
||||
|
||||
///
|
||||
void applyColors(); // not const as modifies modifiedXformPrefs.
|
||||
///
|
||||
void applyConverters() const;
|
||||
///
|
||||
void applyFormats() const;
|
||||
///
|
||||
void applyInputsMisc() const;
|
||||
///
|
||||
void applyInterface() const;
|
||||
///
|
||||
void applyLanguage(); // not const because calls updateLanguage!
|
||||
///
|
||||
void applyLnFmisc() const;
|
||||
///
|
||||
void applyOutputsMisc() const;
|
||||
///
|
||||
void applyPaths(); // not const because calls updatePaths!
|
||||
///
|
||||
void applyPrinter() const;
|
||||
///
|
||||
void applyScreenFonts() const;
|
||||
///
|
||||
void applySpellChecker(); // not const because calls updateSpellChecker!
|
||||
|
||||
/** Folder specific build functions.
|
||||
*/
|
||||
|
||||
///
|
||||
void buildColors();
|
||||
///
|
||||
void buildConverters();
|
||||
///
|
||||
void buildFormats();
|
||||
///
|
||||
void buildInputsMisc();
|
||||
///
|
||||
void buildInterface();
|
||||
///
|
||||
void buildLanguage();
|
||||
///
|
||||
void buildLnFmisc();
|
||||
///
|
||||
void buildOutputsMisc();
|
||||
///
|
||||
void buildPaths();
|
||||
///
|
||||
void buildPrinter();
|
||||
///
|
||||
void buildScreenFonts();
|
||||
///
|
||||
void buildSpellchecker();
|
||||
|
||||
/** Folder specific feedback functions.
|
||||
*/
|
||||
|
||||
///
|
||||
string const feedbackColors(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackConverters(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackFormats( FL_OBJECT const * const ) const;
|
||||
///
|
||||
string const feedbackInputsMisc(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackInterface(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackLanguage(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackLnFmisc(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackOutputsMisc(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackPaths(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackPrinter(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackScreenFonts(FL_OBJECT const * const) const;
|
||||
///
|
||||
string const feedbackSpellChecker(FL_OBJECT const * const) const;
|
||||
|
||||
/** Folder specific input functions. Not all folders require one.
|
||||
*/
|
||||
|
||||
///
|
||||
bool inputColors(FL_OBJECT const * const);
|
||||
///
|
||||
bool inputConverters( FL_OBJECT const * const );
|
||||
///
|
||||
bool inputFormats( FL_OBJECT const * const );
|
||||
///
|
||||
bool inputLanguage(FL_OBJECT const * const);
|
||||
///
|
||||
bool inputPaths(FL_OBJECT const * const);
|
||||
///
|
||||
bool inputScreenFonts();
|
||||
///
|
||||
bool inputSpellChecker(FL_OBJECT const * const);
|
||||
|
||||
/** Folder specific update functions.
|
||||
*/
|
||||
|
||||
///
|
||||
void updateColors();
|
||||
///
|
||||
void updateConverters();
|
||||
///
|
||||
void updateFormats();
|
||||
///
|
||||
void updateInputsMisc();
|
||||
///
|
||||
void updateInterface();
|
||||
///
|
||||
void updateLanguage();
|
||||
///
|
||||
void updateLnFmisc();
|
||||
///
|
||||
void updateOutputsMisc();
|
||||
///
|
||||
void updatePaths();
|
||||
///
|
||||
void updatePrinter();
|
||||
///
|
||||
void updateScreenFonts();
|
||||
///
|
||||
void updateSpellChecker();
|
||||
|
||||
/** Some helper functions for specific folders.
|
||||
*/
|
||||
|
||||
///
|
||||
void ColorsAdjustVal( int, int, double ) const;
|
||||
///
|
||||
bool ColorsBrowserLyX() const;
|
||||
///
|
||||
bool ColorsBrowserX11() const;
|
||||
///
|
||||
bool ColorsBrowseDatabase() const;
|
||||
///
|
||||
bool ColorsDatabase() const;
|
||||
///
|
||||
void ColorsLoadBrowserLyX();
|
||||
///
|
||||
bool ColorsLoadBrowserX11(string const &) const;
|
||||
///
|
||||
bool ColorsModify() const;
|
||||
///
|
||||
bool ColorsRGB() const;
|
||||
///
|
||||
int ColorsSearchEntry(RGBColor const &) const;
|
||||
|
||||
///
|
||||
bool ConvertersAdd();
|
||||
///
|
||||
bool ConvertersBrowser();
|
||||
///
|
||||
void ConvertersUpdateBrowser();
|
||||
///
|
||||
bool ConvertersDelete();
|
||||
///
|
||||
bool ConvertersInput();
|
||||
///
|
||||
string const ConverterGetFrom() const;
|
||||
///
|
||||
string const ConverterGetTo() const;
|
||||
///
|
||||
void ConvertersUpdateChoices() const;
|
||||
|
||||
bool FormatsAdd();
|
||||
///
|
||||
bool FormatsBrowser();
|
||||
///
|
||||
void FormatsUpdateBrowser();
|
||||
///
|
||||
bool FormatsDelete();
|
||||
///
|
||||
bool FormatsInput();
|
||||
|
||||
///
|
||||
bool WriteableDir( string const & );
|
||||
@ -272,12 +92,34 @@ private:
|
||||
bool ReadableDir( string const & );
|
||||
///
|
||||
bool WriteableFile( string const &, string const & = string() );
|
||||
|
||||
///
|
||||
bool ReadableFile( string const &, string const & = string() );
|
||||
///
|
||||
void setPreHandler( FL_OBJECT * ) const;
|
||||
///
|
||||
void printWarning( string const & );
|
||||
|
||||
/** title: filedlg title, pattern: *.ps etc
|
||||
extra buttons on filedlg: dir1 = (name, dir), dir2 = (name, dir)
|
||||
*/
|
||||
|
||||
///
|
||||
bool browse( FL_OBJECT * input,
|
||||
string const & title, string const & pattern,
|
||||
std::pair<string,string> const & dir1 =
|
||||
std::pair<string,string>(),
|
||||
std::pair<string,string> const & dir2 =
|
||||
std::pair<string,string>() );
|
||||
/// called from browse()
|
||||
string const browseFile( string const & filename,
|
||||
string const & title, string const & pattern,
|
||||
std::pair<string,string> const & dir1,
|
||||
std::pair<string,string> const & dir2 ) const;
|
||||
|
||||
/** Flag whether a warning has been posted to the text window.
|
||||
If so, don't redraw the window when the mouse leaves an object. */
|
||||
bool warningPosted;
|
||||
|
||||
/// Type definitions from the fdesign produced header file.
|
||||
FD_form_preferences * build_preferences();
|
||||
///
|
||||
@ -309,62 +151,445 @@ private:
|
||||
|
||||
/// Real GUI implementation.
|
||||
FD_form_preferences * dialog_;
|
||||
/// Converters tabfolder
|
||||
FD_form_outer_tab * converters_tab_;
|
||||
/// reLyX and other import/input stuff
|
||||
FD_form_outer_tab * inputs_tab_;
|
||||
/// HCI configuration
|
||||
FD_form_outer_tab * look_n_feel_tab_;
|
||||
/// Converters tabfolder
|
||||
FD_form_outer_tab * converters_tab_;
|
||||
/// Outputs tabfolder
|
||||
FD_form_outer_tab * outputs_tab_;
|
||||
/// Spellchecker, language stuff, etc
|
||||
FD_form_outer_tab * usage_tab_;
|
||||
///
|
||||
FD_form_colors * colors_;
|
||||
///
|
||||
FD_form_converters * converters_;
|
||||
///
|
||||
FD_form_formats * formats_;
|
||||
///
|
||||
FD_form_inputs_misc * inputs_misc_;
|
||||
///
|
||||
FD_form_interface * interface_;
|
||||
///
|
||||
FD_form_language * language_;
|
||||
///
|
||||
FD_form_lnf_misc * lnf_misc_;
|
||||
///
|
||||
FD_form_outputs_misc * outputs_misc_;
|
||||
///
|
||||
FD_form_paths * paths_;
|
||||
///
|
||||
FD_form_printer * printer_;
|
||||
///
|
||||
FD_form_screen_fonts * screen_fonts_;
|
||||
///
|
||||
FD_form_spellchecker * spellchecker_;
|
||||
///
|
||||
Combox * combo_default_lang;
|
||||
///
|
||||
Combox * combo_kbmap_1;
|
||||
///
|
||||
Combox * combo_kbmap_2;
|
||||
|
||||
/// A vector of RGB colors and associated name.
|
||||
static std::vector<X11Color> colorDB;
|
||||
/// A vector of xform RGB colors and associated name.
|
||||
static std::vector<XformColor> xformColorDB;
|
||||
/** A collection of kmap files.
|
||||
First entry is the file name, full path.
|
||||
Second entry is the shorthand, as appears in the fl_choice.
|
||||
Eg, system_lyxdir/kbd/american2.kmap, american2
|
||||
*/
|
||||
static std::pair<std::vector<string>, std::vector<string> > dirlist;
|
||||
/** Flag whether a warning has been posted to the text window.
|
||||
If so, don't redraw the window when the mouse leaves an object. */
|
||||
bool warningPosted;
|
||||
/// Flag whether Xforms colors have been changed since last file save.
|
||||
bool modifiedXformPrefs;
|
||||
/** Each tab folder is encapsulated in its own class.
|
||||
*/
|
||||
|
||||
class Colors {
|
||||
public:
|
||||
///
|
||||
Colors( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~Colors();
|
||||
///
|
||||
FD_form_colors const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply(); // not const as modifies modifiedXformPrefs.
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
bool input(FL_OBJECT const * const);
|
||||
///
|
||||
void update();
|
||||
/// Flag whether Xforms colors have changed since last file save
|
||||
bool modifiedXformPrefs;
|
||||
|
||||
private:
|
||||
///
|
||||
void AdjustVal( int, int, double ) const;
|
||||
///
|
||||
bool BrowserLyX() const;
|
||||
///
|
||||
bool BrowserX11() const;
|
||||
///
|
||||
bool Database();
|
||||
///
|
||||
void LoadBrowserLyX();
|
||||
///
|
||||
bool LoadBrowserX11(string const &) const;
|
||||
///
|
||||
bool Modify() const;
|
||||
///
|
||||
bool RGB() const;
|
||||
///
|
||||
int SearchEntry(RGBColor const &) const;
|
||||
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_colors * dialog_;
|
||||
/// A vector of RGB colors and associated name.
|
||||
static std::vector<X11Color> colorDB;
|
||||
/// A vector of xform RGB colors and associated name.
|
||||
static std::vector<XformColor> xformColorDB;
|
||||
};
|
||||
///
|
||||
friend class Colors;
|
||||
|
||||
///
|
||||
class Converters {
|
||||
public:
|
||||
///
|
||||
Converters( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~Converters();
|
||||
///
|
||||
FD_form_converters const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply() const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
bool input( FL_OBJECT const * const );
|
||||
///
|
||||
void update();
|
||||
///
|
||||
void UpdateBrowser();
|
||||
///
|
||||
void UpdateChoices() const;
|
||||
|
||||
private:
|
||||
///
|
||||
bool Add();
|
||||
///
|
||||
bool Browser();
|
||||
///
|
||||
bool Delete();
|
||||
///
|
||||
bool Input();
|
||||
///
|
||||
string const GetFrom() const;
|
||||
///
|
||||
string const GetTo() const;
|
||||
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_converters * dialog_;
|
||||
};
|
||||
///
|
||||
friend class Converters;
|
||||
|
||||
///
|
||||
class Formats {
|
||||
public:
|
||||
///
|
||||
Formats( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~Formats();
|
||||
///
|
||||
FD_form_formats const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply() const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
bool input( FL_OBJECT const * const );
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
bool Add();
|
||||
///
|
||||
bool Browser();
|
||||
///
|
||||
void UpdateBrowser();
|
||||
///
|
||||
bool Delete();
|
||||
///
|
||||
bool Input();
|
||||
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_formats * dialog_;
|
||||
};
|
||||
///
|
||||
friend class Formats;
|
||||
|
||||
///
|
||||
class InputsMisc {
|
||||
public:
|
||||
///
|
||||
InputsMisc( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~InputsMisc();
|
||||
///
|
||||
FD_form_inputs_misc const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply() const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_inputs_misc * dialog_;
|
||||
};
|
||||
///
|
||||
friend class InputsMisc;
|
||||
|
||||
///
|
||||
class Interface {
|
||||
public:
|
||||
///
|
||||
Interface( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~Interface();
|
||||
///
|
||||
FD_form_interface const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply() const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
bool input( FL_OBJECT const * const );
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_interface * dialog_;
|
||||
};
|
||||
///
|
||||
friend class Interface;
|
||||
|
||||
///
|
||||
class Language {
|
||||
public:
|
||||
///
|
||||
Language( FormPreferences & p )
|
||||
: parent_(p), dialog_(0), combo_default_lang(0) {}
|
||||
///
|
||||
~Language();
|
||||
///
|
||||
FD_form_language const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply(); // not const because calls update()
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
bool input( FL_OBJECT const * const );
|
||||
///
|
||||
void update();
|
||||
///
|
||||
static void ComboCB(int, void *, Combox *);
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_language * dialog_;
|
||||
///
|
||||
Combox * combo_default_lang;
|
||||
};
|
||||
///
|
||||
friend class Language;
|
||||
|
||||
///
|
||||
class LnFmisc {
|
||||
public:
|
||||
///
|
||||
LnFmisc( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~LnFmisc();
|
||||
///
|
||||
FD_form_lnf_misc const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply() const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_lnf_misc * dialog_;
|
||||
};
|
||||
///
|
||||
friend class LnFmisc;
|
||||
|
||||
///
|
||||
class OutputsMisc {
|
||||
public:
|
||||
///
|
||||
OutputsMisc( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~OutputsMisc();
|
||||
///
|
||||
FD_form_outputs_misc const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply() const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_outputs_misc * dialog_;
|
||||
};
|
||||
///
|
||||
friend class OutputsMisc;
|
||||
|
||||
///
|
||||
class Paths {
|
||||
public:
|
||||
///
|
||||
Paths( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~Paths();
|
||||
///
|
||||
FD_form_paths const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply();
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
bool input(FL_OBJECT const * const);
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_paths * dialog_;
|
||||
};
|
||||
///
|
||||
friend class Paths;
|
||||
|
||||
///
|
||||
class Printer {
|
||||
public:
|
||||
///
|
||||
Printer( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~Printer();
|
||||
///
|
||||
FD_form_printer const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply() const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_printer * dialog_;
|
||||
};
|
||||
///
|
||||
friend class Printer;
|
||||
|
||||
///
|
||||
class ScreenFonts {
|
||||
public:
|
||||
///
|
||||
ScreenFonts( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~ScreenFonts();
|
||||
///
|
||||
FD_form_screen_fonts const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply() const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
bool input();
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_screen_fonts * dialog_;
|
||||
};
|
||||
///
|
||||
friend class ScreenFonts;
|
||||
|
||||
///
|
||||
class SpellChecker {
|
||||
public:
|
||||
///
|
||||
SpellChecker( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
||||
///
|
||||
~SpellChecker();
|
||||
///
|
||||
FD_form_spellchecker const * dialog() { return dialog_; }
|
||||
///
|
||||
void apply(); // not const because calls update()!
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
bool input(FL_OBJECT const * const);
|
||||
///
|
||||
void update();
|
||||
|
||||
private:
|
||||
///
|
||||
FormPreferences & parent_;
|
||||
///
|
||||
FD_form_spellchecker * dialog_;
|
||||
};
|
||||
///
|
||||
friend class SpellChecker;
|
||||
|
||||
|
||||
/** The tab folders.
|
||||
*/
|
||||
|
||||
///
|
||||
Colors colors_;
|
||||
///
|
||||
Converters converters_;
|
||||
///
|
||||
Formats formats_;
|
||||
///
|
||||
InputsMisc inputs_misc_;
|
||||
///
|
||||
Interface interface_;
|
||||
///
|
||||
Language language_;
|
||||
///
|
||||
LnFmisc lnf_misc_;
|
||||
///
|
||||
OutputsMisc outputs_misc_;
|
||||
///
|
||||
Paths paths_;
|
||||
///
|
||||
Printer printer_;
|
||||
///
|
||||
ScreenFonts screen_fonts_;
|
||||
///
|
||||
SpellChecker spellchecker_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -332,19 +332,11 @@ FD_form_language * FormPreferences::build_language()
|
||||
fl_set_button_shortcut(obj, scex(_("Default language|#l")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->check_use_kbmap = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 158, 113, 30, 30, idex(_("Keyboard map|#K")));
|
||||
fl_set_button_shortcut(obj, scex(_("Keyboard map|#K")), 1);
|
||||
fdui->check_use_kbmap = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 78, 113, 30, 30, idex(_("Keyboard\nmap|#K")));
|
||||
fl_set_button_shortcut(obj, scex(_("Keyboard\nmap|#K")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->choice_kbmap_1 = obj = fl_add_choice(FL_NORMAL_CHOICE, 231, 96, 200, 30, idex(_("1st|#1")));
|
||||
fl_set_button_shortcut(obj, scex(_("1st|#1")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->choice_kbmap_2 = obj = fl_add_choice(FL_NORMAL_CHOICE, 231, 128, 200, 30, idex(_("2nd|#2")));
|
||||
fl_set_button_shortcut(obj, scex(_("2nd|#2")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->check_rtl_support = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 154, 161, 30, 30, idex(_("RtL support|#R")));
|
||||
fl_set_button_shortcut(obj, scex(_("RtL support|#R")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -373,6 +365,18 @@ FD_form_language * FormPreferences::build_language()
|
||||
fl_set_button_shortcut(obj, scex(_("Command end|#e")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_kbmap1 = obj = fl_add_input(FL_NORMAL_INPUT, 144, 97, 195, 30, idex(_("1st|#1")));
|
||||
fl_set_button_shortcut(obj, scex(_("1st|#1")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_kbmap2 = obj = fl_add_input(FL_NORMAL_INPUT, 144, 129, 195, 30, idex(_("2nd|#2")));
|
||||
fl_set_button_shortcut(obj, scex(_("2nd|#2")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->button_kbmap1_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 341, 99, 90, 30, _("Browse"));
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->button_kbmap2_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 341, 128, 90, 30, _("Browse"));
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
@ -654,12 +658,14 @@ FD_form_interface * FormPreferences::build_interface()
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->button_bind_file_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 178, 80, 30, _("Browse..."));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_ui_file = obj = fl_add_input(FL_NORMAL_INPUT, 160, 148, 190, 30, idex(_("User Interface file|#U")));
|
||||
fl_set_button_shortcut(obj, scex(_("User Interface file|#U")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->button_ui_file_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 148, 80, 30, _("Browse..."));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->check_override_x_dead_keys = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 24, 230, 30, 30, idex(_("Override X-Windows dead-keys|#O")));
|
||||
fl_set_button_shortcut(obj, scex(_("Override X-Windows dead-keys|#O")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -771,8 +777,9 @@ FD_form_paths * FormPreferences::build_paths()
|
||||
fl_set_button_shortcut(obj, scex(_("Default path|#p")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->button_document_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 10, 90, 30, _("Browse..."));
|
||||
fdui->button_default_path_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 10, 90, 30, _("Browse..."));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->counter_lastfiles = obj = fl_add_counter(FL_SIMPLE_COUNTER, 170, 130, 90, 30, idex(_("Last file count|#L")));
|
||||
fl_set_button_shortcut(obj, scex(_("Last file count|#L")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -786,8 +793,9 @@ FD_form_paths * FormPreferences::build_paths()
|
||||
fl_set_button_shortcut(obj, scex(_("Template path|#T")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->button_template_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 40, 90, 30, _("Browse..."));
|
||||
fdui->button_template_path_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 40, 90, 30, _("Browse..."));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->check_last_files = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 134, 100, 30, 30, idex(_("Check last files|#C")));
|
||||
fl_set_button_shortcut(obj, scex(_("Check last files|#C")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -796,11 +804,13 @@ FD_form_paths * FormPreferences::build_paths()
|
||||
fl_set_button(obj, 1);
|
||||
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);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_lastfiles = obj = fl_add_input(FL_NORMAL_INPUT, 170, 100, 170, 30, "");
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 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);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->check_make_backups = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 134, 170, 30, 30, idex(_("Backup path|#B")));
|
||||
fl_set_button_shortcut(obj, scex(_("Backup path|#B")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -812,12 +822,14 @@ FD_form_paths * FormPreferences::build_paths()
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 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_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_serverpipe = obj = fl_add_input(FL_NORMAL_INPUT, 169, 217, 170, 30, idex(_("LyXServer pipe|#S")));
|
||||
fl_set_button_shortcut(obj, scex(_("LyXServer pipe|#S")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->button_serverpipe_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 339, 217, 90, 30, _("Browse..."));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_temp_dir = obj = fl_add_input(FL_NORMAL_INPUT, 170, 70, 170, 30, "");
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
|
@ -114,14 +114,16 @@ struct FD_form_language {
|
||||
FL_OBJECT *input_package;
|
||||
FL_OBJECT *choice_default_lang;
|
||||
FL_OBJECT *check_use_kbmap;
|
||||
FL_OBJECT *choice_kbmap_1;
|
||||
FL_OBJECT *choice_kbmap_2;
|
||||
FL_OBJECT *check_rtl_support;
|
||||
FL_OBJECT *check_mark_foreign;
|
||||
FL_OBJECT *check_auto_begin;
|
||||
FL_OBJECT *check_auto_end;
|
||||
FL_OBJECT *input_command_begin;
|
||||
FL_OBJECT *input_command_end;
|
||||
FL_OBJECT *input_kbmap1;
|
||||
FL_OBJECT *input_kbmap2;
|
||||
FL_OBJECT *button_kbmap1_browse;
|
||||
FL_OBJECT *button_kbmap2_browse;
|
||||
};
|
||||
struct FD_form_colors {
|
||||
~FD_form_colors();
|
||||
@ -216,10 +218,10 @@ struct FD_form_paths {
|
||||
|
||||
FL_FORM *form;
|
||||
FL_OBJECT *input_default_path;
|
||||
FL_OBJECT *button_document_browse;
|
||||
FL_OBJECT *button_default_path_browse;
|
||||
FL_OBJECT *counter_lastfiles;
|
||||
FL_OBJECT *input_template_path;
|
||||
FL_OBJECT *button_template_browse;
|
||||
FL_OBJECT *button_template_path_browse;
|
||||
FL_OBJECT *check_last_files;
|
||||
FL_OBJECT *button_temp_dir_browse;
|
||||
FL_OBJECT *input_lastfiles;
|
||||
|
@ -924,7 +924,7 @@ argument: 0
|
||||
Name: form_language
|
||||
Width: 450
|
||||
Height: 360
|
||||
Number of Objects: 12
|
||||
Number of Objects: 14
|
||||
|
||||
--------------------
|
||||
class: FL_BOX
|
||||
@ -983,14 +983,14 @@ argument: 0
|
||||
--------------------
|
||||
class: FL_CHECKBUTTON
|
||||
type: PUSH_BUTTON
|
||||
box: 158 113 30 30
|
||||
box: 78 113 30 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_COL1 FL_YELLOW
|
||||
alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Keyboard map|#K
|
||||
label: Keyboard\nmap|#K
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
@ -998,42 +998,6 @@ name: check_use_kbmap
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_CHOICE
|
||||
type: NORMAL_CHOICE
|
||||
box: 231 96 200 30
|
||||
boxtype: FL_FRAME_BOX
|
||||
colors: FL_COL1 FL_BLACK
|
||||
alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: 1st|#1
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_kbmap_1
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_CHOICE
|
||||
type: NORMAL_CHOICE
|
||||
box: 231 128 200 30
|
||||
boxtype: FL_FRAME_BOX
|
||||
colors: FL_COL1 FL_BLACK
|
||||
alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: 2nd|#2
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_kbmap_2
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_CHECKBUTTON
|
||||
type: PUSH_BUTTON
|
||||
@ -1142,6 +1106,78 @@ name: input_command_end
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_INPUT
|
||||
type: NORMAL_INPUT
|
||||
box: 144 97 195 30
|
||||
boxtype: FL_DOWN_BOX
|
||||
colors: FL_COL1 FL_MCOL
|
||||
alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: 1st|#1
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_kbmap1
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_INPUT
|
||||
type: NORMAL_INPUT
|
||||
box: 144 129 195 30
|
||||
boxtype: FL_DOWN_BOX
|
||||
colors: FL_COL1 FL_MCOL
|
||||
alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: 2nd|#2
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_kbmap2
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_BUTTON
|
||||
type: NORMAL_BUTTON
|
||||
box: 341 99 90 30
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Browse
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_kbmap1_browse
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_BUTTON
|
||||
type: NORMAL_BUTTON
|
||||
box: 341 128 90 30
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Browse
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_kbmap2_browse
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
=============== FORM ===============
|
||||
Name: form_colors
|
||||
Width: 450
|
||||
@ -1942,8 +1978,8 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_bind_file_browse
|
||||
callback:
|
||||
argument:
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_INPUT
|
||||
@ -1978,8 +2014,8 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_ui_file_browse
|
||||
callback:
|
||||
argument:
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_CHECKBUTTON
|
||||
@ -2422,9 +2458,9 @@ label: Browse...
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_document_browse
|
||||
callback:
|
||||
argument:
|
||||
name: button_default_path_browse
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_COUNTER
|
||||
@ -2480,9 +2516,9 @@ label: Browse...
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_template_browse
|
||||
callback:
|
||||
argument:
|
||||
name: button_template_path_browse
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_CHECKBUTTON
|
||||
@ -2518,8 +2554,8 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_temp_dir_browse
|
||||
callback:
|
||||
argument:
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_INPUT
|
||||
@ -2554,8 +2590,8 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_lastfiles_browse
|
||||
callback:
|
||||
argument:
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_CHECKBUTTON
|
||||
@ -2609,8 +2645,8 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_backup_path_browse
|
||||
callback:
|
||||
argument:
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_INPUT
|
||||
@ -2645,8 +2681,8 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_serverpipe_browse
|
||||
callback:
|
||||
argument:
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_INPUT
|
||||
|
Loading…
Reference in New Issue
Block a user