]> git.lyx.org Git - features.git/commitdiff
Add items with double click in GCitation
authorJohn Spray <spray@lyx.org>
Tue, 7 Feb 2006 10:42:10 +0000 (10:42 +0000)
committerJohn Spray <spray@lyx.org>
Tue, 7 Feb 2006 10:42:10 +0000 (10:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10822 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/ChangeLog
src/frontends/gtk/GCitation.C
src/frontends/gtk/GCitation.h

index 451a9e7a1173b05187327a12a296f6bf0b2b0d75..69094f8e605edaf50178aee9c106382756f93dcb 100644 (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>
 
        * GGraphics.[Ch], glade/graphics.glade: Use GtkLengthEntry, touch up glade
index 2afefa4060e641bef44fd172322d6aad259fa8a4..4c3c9228d40faad1758a42d61e60872ddba05aa6 100644 (file)
@@ -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
index 61b2840a81028e20eade8ddd200fb1626f78baca..5b71b8993eea42096b89638e0850f5d25fd1fb9e 100644 (file)
@@ -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
         */