diff --git a/src/frontends/gtk/ChangeLog b/src/frontends/gtk/ChangeLog index 451a9e7a11..69094f8e60 100644 --- a/src/frontends/gtk/ChangeLog +++ b/src/frontends/gtk/ChangeLog @@ -1,3 +1,7 @@ +2006-02-07 John Spray + + * GCitation.[Ch]: Allow adding items by double clicking + 2006-02-06 John Spray * GGraphics.[Ch], glade/graphics.glade: Use GtkLengthEntry, touch up glade diff --git a/src/frontends/gtk/GCitation.C b/src/frontends/gtk/GCitation.C index 2afefa4060..4c3c9228d4 100644 --- a/src/frontends/gtk/GCitation.C +++ b/src/frontends/gtk/GCitation.C @@ -156,8 +156,11 @@ void GCitation::doBuild() findentry_->signal_changed().connect( sigc::mem_fun(*this, &GCitation::set_search_buttons)); + bibkeysview_->signal_row_activated().connect( + sigc::mem_fun(*this, &GCitation::bibkeysview_activated)); bibselection_->signal_changed().connect( sigc::mem_fun(*this, &GCitation::bib_selected)); + citeselection_->signal_changed().connect( sigc::mem_fun(*this, &GCitation::cite_selected)); @@ -667,5 +670,11 @@ void GCitation::next() find(biblio::FORWARD); } + +void GCitation::bibkeysview_activated(const Gtk::TreeModel::Path&, Gtk::TreeViewColumn*) +{ + add(); +} + } // namespace frontend } // namespace lyx diff --git a/src/frontends/gtk/GCitation.h b/src/frontends/gtk/GCitation.h index 61b2840a81..5b71b8993e 100644 --- a/src/frontends/gtk/GCitation.h +++ b/src/frontends/gtk/GCitation.h @@ -79,6 +79,9 @@ private: */ 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. true if no text is selected when the citation dialog is opened */