Add items with double click in GCitation

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10822 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Spray 2006-02-07 10:42:10 +00:00
parent 3b19fb295a
commit 78b20cb25a
3 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2006-02-07 John Spray <spray@lyx.org>
* GCitation.[Ch]: Allow adding items by double clicking
2006-02-06 John Spray <spray@lyx.org> 2006-02-06 John Spray <spray@lyx.org>
* GGraphics.[Ch], glade/graphics.glade: Use GtkLengthEntry, touch up glade * GGraphics.[Ch], glade/graphics.glade: Use GtkLengthEntry, touch up glade

View File

@ -156,8 +156,11 @@ void GCitation::doBuild()
findentry_->signal_changed().connect( findentry_->signal_changed().connect(
sigc::mem_fun(*this, &GCitation::set_search_buttons)); sigc::mem_fun(*this, &GCitation::set_search_buttons));
bibkeysview_->signal_row_activated().connect(
sigc::mem_fun(*this, &GCitation::bibkeysview_activated));
bibselection_->signal_changed().connect( bibselection_->signal_changed().connect(
sigc::mem_fun(*this, &GCitation::bib_selected)); sigc::mem_fun(*this, &GCitation::bib_selected));
citeselection_->signal_changed().connect( citeselection_->signal_changed().connect(
sigc::mem_fun(*this, &GCitation::cite_selected)); sigc::mem_fun(*this, &GCitation::cite_selected));
@ -667,5 +670,11 @@ void GCitation::next()
find(biblio::FORWARD); find(biblio::FORWARD);
} }
void GCitation::bibkeysview_activated(const Gtk::TreeModel::Path&, Gtk::TreeViewColumn*)
{
add();
}
} // namespace frontend } // namespace frontend
} // namespace lyx } // namespace lyx

View File

@ -79,6 +79,9 @@ private:
*/ */
static inline bool bib_visible(const Gtk::TreeModel::const_iterator&); static inline bool bib_visible(const Gtk::TreeModel::const_iterator&);
/// Handle adding a bib key by double clicking
void bibkeysview_activated(const Gtk::TreeModel::Path&, Gtk::TreeViewColumn*);
/** apply() won't act when this is true. /** apply() won't act when this is true.
true if no text is selected when the citation dialog is opened true if no text is selected when the citation dialog is opened
*/ */