From: Jean-Marc Lasgouttes Date: Sun, 13 Jan 2002 19:19:05 +0000 (+0000) Subject: document_path defaults to empty; fix handling of function args from minibuffer X-Git-Tag: 1.6.10~20031 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=836d40440f15053aaabbdde2a29d83e79b5807ac;p=lyx.git document_path defaults to empty; fix handling of function args from minibuffer git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3359 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 8081e1fa8f..e83de61a16 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2002-01-13 Jean-Marc Lasgouttes + + * lyxfunc.C (verboseDispatch): fix handling of arguments + + * lyxrc.C (setDefaults): do not initialize document_path to $HOME. + + * lyxrc.C: use string::erase() instead of initializing to "". + + 2001-11-26 John Levon * BufferView_pimpl.h: diff --git a/src/lyxfunc.C b/src/lyxfunc.C index adfe50ce56..26c1f9fa9d 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -756,16 +756,11 @@ void LyXFunc::miniDispatch(string const & s) void const LyXFunc::verboseDispatch(string const & s, bool show_sc) { - // Split command string into command and argument - string cmd; - string line = frontStrip(s); - string const arg = strip(frontStrip(split(line, cmd, ' '))); - - int action = lyxaction.LookupFunc(cmd); + int action = lyxaction.LookupFunc(frontStrip(s)); if (action == LFUN_UNKNOWN_ACTION) { string const msg = string(_("Unknown function (")) - + cmd + ")"; + + s + ")"; owner->message(msg); } else { verboseDispatch(action, show_sc); diff --git a/src/lyxrc.C b/src/lyxrc.C index 9828ec4bcc..334259ea6d 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -182,11 +182,11 @@ void LyXRC::setDefaults() { print_file_extension = ".ps"; print_paper_flag = "-t"; print_paper_dimension_flag = "-T"; - document_path = GetEnvPath("HOME"); + document_path.erase(); tempdir_path = "/tmp"; use_tempdir = true; ps_command = "gs"; - view_dvi_paper_option = ""; + view_dvi_paper_option.erase(); default_papersize = BufferParams::PAPER_USLETTER; custom_export_format = "ps"; chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38"; @@ -214,7 +214,7 @@ void LyXRC::setDefaults() { popup_normal_font = "-*-helvetica-medium-r"; font_norm = "iso8859-1"; font_norm_type = ISO_8859_1; - popup_font_encoding = ""; + popup_font_encoding.erase(); override_x_deadkeys = true; autosave = 300; auto_region_delete = true; @@ -223,7 +223,7 @@ void LyXRC::setDefaults() { num_lastfiles = 4; check_lastfiles = true; make_backup = true; - backupdir_path = ""; + backupdir_path.erase(); exit_confirmation = true; display_graphics = "mono"; display_shortcuts = true; @@ -535,7 +535,7 @@ int LyXRC::read(string const & filename) if (lexrc.next()) view_dvi_paper_option = lexrc.getString(); else - view_dvi_paper_option = ""; + view_dvi_paper_option.erase(); break; case RC_PS_COMMAND: