From: André Pönitz Date: Tue, 16 Jul 2002 14:13:11 +0000 (+0000) Subject: some more changes X-Git-Tag: 1.6.10~18861 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9bb9c32bbc60d16b25a840789604d289a4b82230;p=lyx.git some more changes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4652 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/xforms/FormFiledialog.C b/src/frontends/xforms/FormFiledialog.C index ca54f7d423..2713a1e05a 100644 --- a/src/frontends/xforms/FormFiledialog.C +++ b/src/frontends/xforms/FormFiledialog.C @@ -14,7 +14,6 @@ #include #include #include -#include using std::map; using std::max; @@ -311,7 +310,8 @@ void FileDialog::Private::Reread() tmp.ls_entry_ = buffer; // creates used name string temp = fname; - if (isDir) temp += '/'; + if (isDir) + temp += '/'; tmp.name_ = temp; // creates displayed name @@ -433,28 +433,30 @@ void FileDialog::Private::redraw() // SetButton: sets file selector user button action -void FileDialog::Private::SetButton(int iIndex, string const & name_, - string const & pszPath) +void FileDialog::Private::SetButton(int index, string const & name, + string const & path) { FL_OBJECT * ob; - string * pTemp; + string * tmp; - if (iIndex == 0) { + if (index == 0) { ob = file_dlg_form_->User1; - pTemp = &user_path1_; - } else if (iIndex == 1) { + tmp = &user_path1_; + } else if (index == 1) { ob = file_dlg_form_->User2; - pTemp = &user_path2_; - } else return; + tmp = &user_path2_; + } else { + return; + } - if (!name_.empty()) { - fl_set_object_label(ob, idex(name_.c_str())); - fl_set_button_shortcut(ob, scex(name_.c_str()), 1); + if (!name.empty()) { + fl_set_object_label(ob, idex(name.c_str())); + fl_set_button_shortcut(ob, scex(name.c_str()), 1); fl_show_object(ob); - *pTemp = pszPath; + *tmp = path; } else { fl_hide_object(ob); - pTemp->erase(); + tmp->erase(); } } @@ -490,8 +492,7 @@ bool FileDialog::Private::RunDialog() if (HandleOK()) return x_sync_kludge(true); - } else if (ob == file_dlg_form_->Cancel - || force_cancel_) + } else if (ob == file_dlg_form_->Cancel || force_cancel_) return x_sync_kludge(false); else if (force_ok_) @@ -579,7 +580,7 @@ bool FileDialog::Private::HandleDoubleClick() // set info line bool isDir = true; int const select_ = fl_get_browser(file_dlg_form_->List); - if (select_ > depth_) { + if (select_ > depth_) { tmp = dir_entries_[select_ - depth_ - 1].name_; SetInfoLine(dir_entries_[select_ - depth_ - 1].ls_entry_); if (!suffixIs(tmp, '/')) { @@ -716,7 +717,8 @@ string const FileDialog::Private::Select(string const & title, } } - if (sel != 0) fl_select_browser_line(file_dlg_form_->List, sel); + if (sel != 0) + fl_select_browser_line(file_dlg_form_->List, sel); int const top = max(sel - 5, 1); fl_set_browser_topline(file_dlg_form_->List, top);