From d928a9d0a2a6cbde6b520d5fc83bbad6e44045c6 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 6 Feb 2006 22:52:53 +0000 Subject: [PATCH] Whitespace git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10819 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/gtk/GBibItem.C | 2 +- src/frontends/gtk/GBranch.C | 2 +- src/frontends/gtk/GBranch.h | 6 +-- src/frontends/gtk/GCitation.C | 92 ++++++++++++++++---------------- src/frontends/gtk/GCitation.h | 10 ++-- src/frontends/gtk/GDocument.C | 18 +++---- src/frontends/gtk/GDocument.h | 2 +- src/frontends/gtk/GPreferences.C | 6 +-- src/frontends/gtk/GRef.C | 16 +++--- src/frontends/gtk/GTabular.C | 4 +- src/frontends/gtk/GTabular.h | 2 +- src/frontends/gtk/GThesaurus.C | 2 +- src/frontends/gtk/GThesaurus.h | 6 +-- src/frontends/gtk/GToc.C | 2 +- src/frontends/gtk/LyXGdkImage.C | 6 +-- 15 files changed, 88 insertions(+), 88 deletions(-) diff --git a/src/frontends/gtk/GBibItem.C b/src/frontends/gtk/GBibItem.C index 3e6bd32965..1cbc2b4eb9 100644 --- a/src/frontends/gtk/GBibItem.C +++ b/src/frontends/gtk/GBibItem.C @@ -76,7 +76,7 @@ void GBibItem::apply() void GBibItem::changed() { if (keyentry_->get_text().size() > 0) - bc().valid(TRUE); + bc().valid(TRUE); else bc().valid(FALSE); } diff --git a/src/frontends/gtk/GBranch.C b/src/frontends/gtk/GBranch.C index e1c1798df1..18cf62fbbd 100644 --- a/src/frontends/gtk/GBranch.C +++ b/src/frontends/gtk/GBranch.C @@ -75,7 +75,7 @@ void GBranch::update() string const cur_branch = controller().params().branch; // FIXME: deprecated in favor of clear_items since gtkmm 2.8 - branchescombo_.clear(); + branchescombo_.clear(); const_iterator const begin = branchlist.begin(); const_iterator const end = branchlist.end(); diff --git a/src/frontends/gtk/GBranch.h b/src/frontends/gtk/GBranch.h index 99f61b9580..b15875169a 100644 --- a/src/frontends/gtk/GBranch.h +++ b/src/frontends/gtk/GBranch.h @@ -29,11 +29,11 @@ private: virtual void doBuild(); virtual void update(); - /// enables the apply button if a synonym is selected from the list + /// enables the apply button if a synonym is selected from the list void selection_changed(); - /** apply() won't act when this is true. - true if no text is selected when the Branch dialog is opened + /** apply() won't act when this is true. + true if no text is selected when the Branch dialog is opened */ bool applylock_; diff --git a/src/frontends/gtk/GCitation.C b/src/frontends/gtk/GCitation.C index 7ebbd6c0b9..2afefa4060 100644 --- a/src/frontends/gtk/GCitation.C +++ b/src/frontends/gtk/GCitation.C @@ -178,7 +178,7 @@ void GCitation::doBuild() void GCitation::enable_apply() { // if we passed !applylock_ directly as an argument, the restore button // would be activated - if (!applylock_ && !(citeFilter_->children()).empty()) + if (!applylock_ && !(citeFilter_->children()).empty()) bc().valid(true); } @@ -194,7 +194,7 @@ void GCitation::fill_styles() int orig = stylecombo_->get_active_row_number(); Gtk::TreeModel::iterator iter = citeselection_->get_selected(); - if(!iter) + if(!iter) iter = (citeFilter_->children()).begin(); string key = Glib::locale_from_utf8((*iter)[bibColumns.name]); @@ -244,7 +244,7 @@ void GCitation::update_style() std::find(styles.begin(), styles.end(), cs.style); //restore the latest natbib style - if (style_ >= 0 && Gtk::TreeModel::Children::size_type(style_) < + if (style_ >= 0 && Gtk::TreeModel::Children::size_type(style_) < (styleStore_->children()).size()) stylecombo_->set_active(style_); else @@ -267,7 +267,7 @@ void GCitation::update_contents() biblio::InfoMap const & theMap = controller().bibkeysInfo(); std::vector bibkeys = biblio::getKeys(theMap); std::vector citekeys = support::getVectorFromString( - controller().params().getContents()); + controller().params().getContents()); int bib_order = 0; allListStore_->clear(); @@ -288,13 +288,13 @@ void GCitation::update_contents() for (std::vector::const_iterator ccit = citekeys.begin(); ccit != citekeys.end(); ++ccit) { - for (Gtk::TreeModel::const_iterator cbit = - (allListStore_->children()).begin(); + for (Gtk::TreeModel::const_iterator cbit = + (allListStore_->children()).begin(); cbit != (allListStore_->children()).end(); ++cbit) { if ((*cbit)[bibColumns.name] == (*ccit)) { (*cbit)[bibColumns.cite] = true; - allListStore_->move(cbit, + allListStore_->move(cbit, (allListStore_->children()).end()); break; } @@ -334,17 +334,17 @@ void GCitation::update() void GCitation::up() { - Gtk::TreeModel::iterator src = + Gtk::TreeModel::iterator src = citeselection_->get_selected(); Gtk::TreeModel::iterator dest = src; - if(--dest == (citeFilter_->children()).begin()) + if(--dest == (citeFilter_->children()).begin()) upbutton_->set_sensitive(false); src = citeFilter_->convert_iter_to_child_iter(src); dest = citeFilter_->convert_iter_to_child_iter(dest); allListStore_->iter_swap(src, dest); - + bc().valid(true); downbutton_->set_sensitive(true); } @@ -352,13 +352,13 @@ void GCitation::up() void GCitation::down() { - Gtk::TreeModel::iterator src = + Gtk::TreeModel::iterator src = citeselection_->get_selected(); Gtk::TreeModel::iterator dest = src; // Avoid slow operator-- by using an extra variable - Gtk::TreeModel::iterator endtest = ++dest; + Gtk::TreeModel::iterator endtest = ++dest; - if(++endtest == (citeFilter_->children()).end()) + if(++endtest == (citeFilter_->children()).end()) downbutton_->set_sensitive(false); src = citeFilter_->convert_iter_to_child_iter(src); @@ -378,8 +378,8 @@ void GCitation::add() Gtk::TreeModel::iterator next_iter = iter; // Select the right key in bibkeysview_ afterwards - if(++next_iter == (bibFilter_->children()).end()) { - if(iter != (bibFilter_->children()).begin()) { + if(++next_iter == (bibFilter_->children()).end()) { + if(iter != (bibFilter_->children()).begin()) { bibselection_->select(--iter); ++iter; } else { // bibkeysview_ will be left empty... @@ -397,7 +397,7 @@ void GCitation::add() // If a cite key is selected, move bib key to the position above // Otherwise to the last position in citekeysview_ Gtk::TreeModel::iterator cite_iter(citeselection_->get_selected()); - if (cite_iter) { + if (cite_iter) { cite_iter = citeFilter_->convert_iter_to_child_iter(cite_iter); } else { cite_iter = (allListStore_->children()).end(); @@ -421,7 +421,7 @@ void GCitation::add() void GCitation::remove() { Gtk::TreeModel::iterator iter(citeselection_->get_selected()); - + if (iter) { Gtk::TreeModel::iterator next_iter(iter); @@ -457,29 +457,29 @@ void GCitation::remove() void GCitation::cite_selected() { - Gtk::TreeModel::iterator iter = + Gtk::TreeModel::iterator iter = citeselection_->get_selected(); if (iter) { info_->set_text((*iter)[bibColumns.info]); - removebutton_->set_sensitive(true); + removebutton_->set_sensitive(true); // Set sensitivity of Up/Down buttons if (iter == (citeFilter_->children()).begin()) { upbutton_->set_sensitive(false); } else { upbutton_->set_sensitive(true); - } + } if (++iter == (citeFilter_->children()).end()) { downbutton_->set_sensitive(false); } else { - downbutton_->set_sensitive(true); + downbutton_->set_sensitive(true); } } else { info_->set_text(""); - removebutton_->set_sensitive(false); + removebutton_->set_sensitive(false); // Set sensitivity of Up/Down buttons upbutton_->set_sensitive(false); @@ -491,15 +491,15 @@ void GCitation::cite_selected() void GCitation::bib_selected() { - Gtk::TreeModel::iterator iter = + Gtk::TreeModel::iterator iter = bibselection_->get_selected(); if (iter) { info_->set_text((*iter)[bibColumns.info]); - addbutton_->set_sensitive(true); + addbutton_->set_sensitive(true); } else { info_->set_text(""); - addbutton_->set_sensitive(false); + addbutton_->set_sensitive(false); } } @@ -522,9 +522,9 @@ void GCitation::apply() string citekeys; int i = 0; - for (Gtk::TreeModel::const_iterator cit=children.begin(); + for (Gtk::TreeModel::const_iterator cit=children.begin(); cit!=children.end(); ++cit) { - + string item(support::trim(Glib::locale_from_utf8((*cit)[bibColumns.name]))); if (item.empty()) continue; @@ -532,9 +532,9 @@ void GCitation::apply() citekeys += ","; citekeys += item; } - + controller().params().setCmdName(command); - controller().params().setContents(citekeys); + controller().params().setContents(citekeys); controller().params().setSecOptions(Glib::locale_from_utf8(beforeentry_->get_text())); controller().params().setOptions(Glib::locale_from_utf8(afterentry_->get_text())); @@ -545,7 +545,7 @@ void GCitation::apply() void GCitation::find(biblio::Direction dir) { biblio::InfoMap const & theMap = controller().bibkeysInfo(); - std::vector bibkeys; + std::vector bibkeys; biblio::Search const type = regexpcheck_->get_active() ? biblio::REGEX : biblio::SIMPLE; @@ -559,36 +559,36 @@ void GCitation::find(biblio::Direction dir) Gtk::TreeModel::iterator iter; Gtk::TreeModel::Children::difference_type sel = 0; - if (search_cite) { - for (iter = (citeFilter_->children()).begin(); + if (search_cite) { + for (iter = (citeFilter_->children()).begin(); iter != (citeFilter_->children()).end(); ++iter) { bibkeys.push_back(Glib::locale_from_utf8( (*iter)[bibColumns.name])); } - iter = citeselection_->get_selected(); + iter = citeselection_->get_selected(); if (iter) sel = std::distance((citeFilter_->children()).begin(), iter); } else { - for (iter = (bibFilter_->children()).begin(); + for (iter = (bibFilter_->children()).begin(); iter != (bibFilter_->children()).end(); ++iter) { bibkeys.push_back(Glib::locale_from_utf8( (*iter)[bibColumns.name])); } - iter = bibselection_->get_selected(); + iter = bibselection_->get_selected(); if (iter) sel = std::distance( (bibFilter_->children()).begin(), iter); } - + start = bibkeys.begin(); - if (sel >= 0 && + if (sel >= 0 && Gtk::TreeModel::Children::size_type(sel) < bibkeys.size()) - std::advance(start, sel); + std::advance(start, sel); bool is_cite = !search_cite; while(is_cite != search_cite) { @@ -618,28 +618,28 @@ void GCitation::find(biblio::Direction dir) } } vector::const_iterator bibstart = bibkeys.begin(); - vector::difference_type const found = + vector::difference_type const found = std::distance(bibstart, cit); - if (found == sel) + if (found == sel) return; start = cit; if (search_cite) iter = (citeFilter_->children()).begin(); else - iter = (bibFilter_->children()).begin(); - std::advance(iter, found); + iter = (bibFilter_->children()).begin(); + std::advance(iter, found); is_cite = (*iter)[bibColumns.cite]; - } + } // Highlight and scroll to the key that was found if (search_cite) { - citeselection_->select(iter); + citeselection_->select(iter); citekeysview_->set_cursor(Gtk::TreePath(iter)); citekeysview_->scroll_to_row(Gtk::TreePath(iter)); cite_selected(); } else { - bibselection_->select(iter); + bibselection_->select(iter); bibkeysview_->set_cursor(Gtk::TreePath(iter)); bibkeysview_->scroll_to_row(Gtk::TreePath(iter)); bib_selected(); @@ -655,7 +655,7 @@ void GCitation::set_search_buttons() backbutton_->set_sensitive(val); forwardbutton_->set_sensitive(val); } - + void GCitation::previous() { find(biblio::BACKWARD); diff --git a/src/frontends/gtk/GCitation.h b/src/frontends/gtk/GCitation.h index daf6b3ee3a..61b2840a81 100644 --- a/src/frontends/gtk/GCitation.h +++ b/src/frontends/gtk/GCitation.h @@ -74,13 +74,13 @@ private: */ inline void set_search_buttons(); - /** Helper function for bibFilter_; true if argument's + /** Helper function for bibFilter_; true if argument's [bibColumns.cite] is false. */ - static inline bool bib_visible(const Gtk::TreeModel::const_iterator&); + static inline bool bib_visible(const Gtk::TreeModel::const_iterator&); - /** apply() won't act when this is true. - true if no text is selected when the citation dialog is opened + /** apply() won't act when this is true. + true if no text is selected when the citation dialog is opened */ bool applylock_; @@ -119,7 +119,7 @@ private: Gtk::CheckButton * authorcheck_; Gtk::CheckButton * uppercasecheck_; - Glib::RefPtr info_; + Glib::RefPtr info_; Glib::RefPtr allListStore_; Glib::RefPtr styleStore_; diff --git a/src/frontends/gtk/GDocument.C b/src/frontends/gtk/GDocument.C index 3912c147f3..c9c253b786 100644 --- a/src/frontends/gtk/GDocument.C +++ b/src/frontends/gtk/GDocument.C @@ -297,17 +297,17 @@ void GDocument::doBuild() branchCols_.add(branchColName_); branchCols_.add(branchColActivated_); branchCols_.add(branchColColor_); - + branchliststore_ = Gtk::ListStore::create(branchCols_); branchesview_->set_model(branchliststore_); branchesview_->append_column_editable(_("Name"), branchColName_); branchesview_->append_column_editable(_("Activated"), branchColActivated_); branchesview_->append_column_editable(_("Color"), branchColColor_); branchsel_ = branchesview_->get_selection(); - + branchsel_->signal_changed().connect( sigc::mem_fun(*this, &GDocument::branchSelChanged)); - + /* ErrorList::const_iterator cit = errors.begin(); ErrorList::const_iterator end = errors.end(); @@ -521,7 +521,7 @@ void GDocument::update() // *** Start "Branches" Page *** branchliststore_->clear(); - + BranchList::const_iterator it = params.branchlist().begin(); BranchList::const_iterator const end = params.branchlist().end(); for (; it != end; ++it) { @@ -698,7 +698,7 @@ void GDocument::apply() // *** Start "Branches" Page *** /*branchliststore_->clear(); - + BranchList::const_iterator it = params.branchlist().begin(); BranchList::const_iterator const end = params.branchlist().end(); for (; it != end; ++it) { @@ -707,9 +707,9 @@ void GDocument::apply() (*row)[branchColActivated_] = (*it).getSelected(); (*row)[branchColColor_] = (*it).getColor(); }*/ - + BranchList branchlist; - + Gtk::ListStore::iterator it = branchliststore_->children().begin(); Gtk::ListStore::iterator const end = branchliststore_->children().end(); for (; it != end; ++it) { @@ -723,9 +723,9 @@ void GDocument::apply() newbranch->setColor(color); } } - + params.branchlist() = branchlist; - + // *** End "Branches" Page *** // *** Begin "Preamble" Page *** diff --git a/src/frontends/gtk/GDocument.h b/src/frontends/gtk/GDocument.h index e3c34cbc91..9a7d554263 100644 --- a/src/frontends/gtk/GDocument.h +++ b/src/frontends/gtk/GDocument.h @@ -144,7 +144,7 @@ private: Gtk::TreeModelColumn branchColActivated_; Gtk::TreeModelColumn branchColColor_; Gtk::TreeModel::ColumnRecord branchCols_; - + Glib::RefPtr branchliststore_; Glib::RefPtr branchsel_; void addBranch(); diff --git a/src/frontends/gtk/GPreferences.C b/src/frontends/gtk/GPreferences.C index dd77a9d6bb..a9386ec7eb 100644 --- a/src/frontends/gtk/GPreferences.C +++ b/src/frontends/gtk/GPreferences.C @@ -56,7 +56,7 @@ void GPreferences::doBuild() // *** Screen fonts *** // FIXME: these font buttons display a dialog - // with options for size and bold/etc which are + // with options for size and bold/etc which are // ignored xml_->get_widget("Roman", romanfontbutton_); xml_->get_widget("SansSerif", sansseriffontbutton_); @@ -81,7 +81,7 @@ void GPreferences::update() LyXRC const & rc(controller().rc()); - // *** Screen fonts *** + // *** Screen fonts *** std::cerr << "Update: got font_name:font_foundry:\n"; std::cerr << rc.roman_font_name << ":" << rc.roman_font_foundry << "\n"; std::cerr << rc.sans_font_name << ":" << rc.sans_font_foundry << "\n"; @@ -116,7 +116,7 @@ void GPreferences::apply() rc.typewriter_font_name = Pango::FontDescription( typewriterfontbutton_->get_font_name()).get_family (); rc.typewriter_font_foundry = ""; - + rc.zoom = zoomadj_->get_value(); rc.dpi = dpiadj_->get_value(); diff --git a/src/frontends/gtk/GRef.C b/src/frontends/gtk/GRef.C index 19faad74aa..7ef931bc54 100644 --- a/src/frontends/gtk/GRef.C +++ b/src/frontends/gtk/GRef.C @@ -100,14 +100,14 @@ void GRef::doBuild() sigc::mem_fun(*this, &GRef::back)); refreshbutton_->signal_clicked().connect( sigc::mem_fun(*this, &GRef::update_labels)); - + labelentry_->signal_changed().connect( sigc::mem_fun(*this, &GRef::update_validity)); formatcombo_->signal_changed().connect( sigc::mem_fun(*this, &GRef::update_validity)); nameentry_->signal_changed().connect( sigc::mem_fun(*this, &GRef::update_validity)); - + applylock_ = false; bc().valid(false); } @@ -121,14 +121,14 @@ void GRef::selection_changed () Gtk::TreeModel::iterator iter = refview_->get_selection()->get_selected(); if(iter) { Gtk::TreeModel::Row row = *iter; - labelentry_->set_text(row[refColumns.name]); + labelentry_->set_text(row[refColumns.name]); } } void GRef::jumpto() { - + if (backbutton_->is_sensitive()) { // controller().gotoAnotherRef(labelentry_->get_text()); // OR @@ -145,7 +145,7 @@ void GRef::jumpto() void GRef::back() { - controller().gotoBookmark(); + controller().gotoBookmark(); backbutton_->set_sensitive(false); jumptobutton_->set_sensitive(true); } @@ -162,7 +162,7 @@ void GRef::buffer_changed() void GRef::update() { applylock_ = true; - + bc().refreshReadOnly(); jumptobutton_->set_sensitive(true); backbutton_->set_sensitive(false); @@ -181,12 +181,12 @@ void GRef::update() if (doctype == Kernel::LINUXDOC || doctype == Kernel::DOCBOOK) { formatcombo_->set_active(0); formatcombo_->set_sensitive(false); - + } else { formatcombo_->set_active(InsetRef::getType(controller().params().getCmdName())); formatcombo_->set_sensitive(true); } - + bufferstore_ = Gtk::ListStore::create(bufferColumns); vector const buffers = controller().getBufferList(); buffercombo_->set_model(bufferstore_); diff --git a/src/frontends/gtk/GTabular.C b/src/frontends/gtk/GTabular.C index 3cc5d16c51..74c200b926 100644 --- a/src/frontends/gtk/GTabular.C +++ b/src/frontends/gtk/GTabular.C @@ -114,7 +114,7 @@ void GTabular::doBuild() void GTabular::apply() { - + } @@ -193,7 +193,7 @@ void GTabular::updateSensitivity() { bool specifywidth = specifywidthcheck_->get_active(); widthlength_->set_sensitive(specifywidth); - vertaligncombo_->set_sensitive(specifywidth); + vertaligncombo_->set_sensitive(specifywidth); } } // namespace frontend diff --git a/src/frontends/gtk/GTabular.h b/src/frontends/gtk/GTabular.h index 87ff169590..6a54acd5e3 100644 --- a/src/frontends/gtk/GTabular.h +++ b/src/frontends/gtk/GTabular.h @@ -67,7 +67,7 @@ private: Gtk::CheckButton *rightbordercheck_; Gtk::CheckButton *rotatecellcheck_; Gtk::CheckButton *multicolcheck_; - + // **** Longtable tab **** }; diff --git a/src/frontends/gtk/GThesaurus.C b/src/frontends/gtk/GThesaurus.C index 2ffe591f03..4b7f8d659c 100644 --- a/src/frontends/gtk/GThesaurus.C +++ b/src/frontends/gtk/GThesaurus.C @@ -144,7 +144,7 @@ void GThesaurus::update_lists() Gtk::TreeModel::Row row = *(synTreeStore_->append()); row[synColumns.name] = cit->first; - for (std::vector::const_iterator cit2 = cit->second.begin(); + for (std::vector::const_iterator cit2 = cit->second.begin(); cit2 != cit->second.end(); ++cit2) { Gtk::TreeModel::Row childrow = *(synTreeStore_->append(row.children())); childrow[synColumns.name] = *cit2; diff --git a/src/frontends/gtk/GThesaurus.h b/src/frontends/gtk/GThesaurus.h index 1f98c2771c..487a1c0577 100644 --- a/src/frontends/gtk/GThesaurus.h +++ b/src/frontends/gtk/GThesaurus.h @@ -31,13 +31,13 @@ private: /// updates the synonym list (e.g. when the keyword is changed) void update_lists(); - /// enables the apply button if a synonym is selected from the list + /// enables the apply button if a synonym is selected from the list void selection_changed(); /// changes the keyword entry content to the synonym double-clicked on void meaningsview_activated(const Gtk::TreeModel::Path&, Gtk::TreeViewColumn*); - /** apply() won't act when this is true. - true if no text is selected when the thesaurus dialog is opened + /** apply() won't act when this is true. + true if no text is selected when the thesaurus dialog is opened */ bool applylock_; diff --git a/src/frontends/gtk/GToc.C b/src/frontends/gtk/GToc.C index 3ff57bbc80..1c812c875c 100644 --- a/src/frontends/gtk/GToc.C +++ b/src/frontends/gtk/GToc.C @@ -88,7 +88,7 @@ void GToc::update() void GToc::updateType() { changing_views_ = true; - string const targettype = + string const targettype = toc::getType(controller().params().getCmdName()); typestore_->clear(); diff --git a/src/frontends/gtk/LyXGdkImage.C b/src/frontends/gtk/LyXGdkImage.C index 6bd8ca64bd..bb40727213 100644 --- a/src/frontends/gtk/LyXGdkImage.C +++ b/src/frontends/gtk/LyXGdkImage.C @@ -74,7 +74,7 @@ Image::FormatList LyXGdkImage::loadableFormats() Gdk::Pixbuf::SListHandle_PixbufFormat gdkformats = Gdk::Pixbuf::get_formats(); Gdk::Pixbuf::SListHandle_PixbufFormat::iterator it = gdkformats.begin(); Gdk::Pixbuf::SListHandle_PixbufFormat::iterator gdk_end = gdkformats.end(); - + for (; it != gdk_end; ++it) { Gdk::PixbufFormat thisformat = (*it); lyxerr[Debug::GRAPHICS] << thisformat.get_name() << endl; @@ -265,8 +265,8 @@ void LyXGdkImage::rotate_impl(Params const & params) rotation = Gdk::PIXBUF_ROTATE_UPSIDEDOWN; else if (params.angle == 270.0) rotation = Gdk::PIXBUF_ROTATE_CLOCKWISE; - - + + transformed_ = transformed_->rotate_simple(rotation); */ } -- 2.39.5