Hello, I've finished A. Klostermann's reference dialog, and in the process added something to ControlRef which may or may not please. The function added (gotoAnotherRef) is simply a version of gotoRef which does not set the bookmark for the "Back" button in the reference dialog. This means that GRef allows the user to "Go to" a number of labels without losing the original position, or having to go back to it in between each label. I suppose it could have been implemented more concisely as a boolean argument to the original function, but I didn't want to upset the existing API.
Patches attached. I won't apply this GRef until someone loves the addition to ControlRef enough to commit it (I only have write access to frontends/gtk, I think). John
Index: Dialogs.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/gtk/Dialogs.C,v retrieving revision 1.41 diff -u -p -r1.41 Dialogs.C --- Dialogs.C 19 May 2005 18:53:07 -0000 1.41 +++ Dialogs.C 3 Aug 2005 20:41:59 -0000 @@ -85,7 +85,7 @@ #include "FormPreamble.h" #include "FormPreferences.h" #include "GPrint.h" -#include "FormRef.h" +#include "GRef.h" #include "GSearch.h" #include "GSendto.h" #include "FormTabular.h" @@ -490,8 +490,9 @@ Dialogs::DialogPtr Dialogs::build(string dialog->setView(new GPrint(*dialog)); dialog->bc().bp(new OkCancelPolicy); } else if (name == "ref") { + dialog->bc().view(new GBC(dialog->bc())); dialog->setController(new ControlRef(*dialog)); - dialog->setView(new FormRef(*dialog)); + dialog->setView(new GRef(*dialog)); dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy); } else if (name == "sendto") { dialog->bc().view(new GBC(dialog->bc())); Index: GRef.C =================================================================== RCS file: GRef.C diff -N GRef.C --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ GRef.C 3 Aug 2005 20:41:59 -0000 @@ -0,0 +1,260 @@ +/** + * \file GRef.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author John Spray + * \author Andreas Klostermann + * Full author contact details are available in file CREDITS. + */ + +#include <config.h> + +// Too hard to make concept checks work with this file +#ifdef _GLIBCXX_CONCEPT_CHECKS +#undef _GLIBCXX_CONCEPT_CHECKS +#endif +#ifdef _GLIBCPP_CONCEPT_CHECKS +#undef _GLIBCPP_CONCEPT_CHECKS +#endif + +#include "GRef.h" +#include "ControlRef.h" +#include "ghelpers.h" +#include "insets/insetref.h" +#include "debug.h" +#include "buffer.h" +#include "insets/insetnote.h" + +#include <libglademm.h> + +using std::string; +using std::vector; + + +namespace lyx { +namespace frontend { + +class refModelColumns : public Gtk::TreeModel::ColumnRecord +{ +public: + + refModelColumns() + { add(name);} + + Gtk::TreeModelColumn<Glib::ustring> name; +}; + +refModelColumns refColumns; + + +class bufferModelColumns : public Gtk::TreeModel::ColumnRecord +{ +public: + + bufferModelColumns() + { add(name);} + + Gtk::TreeModelColumn<Glib::ustring> name; +}; + +bufferModelColumns bufferColumns; + + +GRef::GRef(Dialog & parent) + : GViewCB<ControlRef, GViewGladeB>(parent, _("Cross-reference"), false) +{} + + +void GRef::doBuild() +{ + string const gladeName = findGladeFile("ref"); + xml_ = Gnome::Glade::Xml::create(gladeName); + xml_->get_widget("Cancel", cancelbutton_); + setCancel(cancelbutton_); + xml_->get_widget("Apply", applybutton_); + setApply(applybutton_); + xml_->get_widget("OK", okbutton_); + setOK(okbutton_); + + xml_->get_widget("Labels", refview_); + xml_->get_widget("Label", labelentry_); + xml_->get_widget("Name", nameentry_); + xml_->get_widget("Format", formatcombo_); + xml_->get_widget("Buffer", buffercombo_ ); + xml_->get_widget("JumpTo", jumptobutton_); + xml_->get_widget("Back", backbutton_); + xml_->get_widget("Refresh", refreshbutton_); + + + refview_->append_column(_("Label"), refColumns.name); + refview_->signal_cursor_changed().connect( + sigc::mem_fun(*this, &GRef::selection_changed)); + buffercombo_->signal_changed().connect( + sigc::mem_fun(*this, &GRef::buffer_changed)); + jumptobutton_->signal_clicked().connect( + sigc::mem_fun(*this, &GRef::jumpto)); + backbutton_->signal_clicked().connect( + 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::label_changed)); + refview_->signal_row_activated().connect( + sigc::mem_fun(*this, &GRef::refview_activated)); + + applylock_ = false; + bc().valid(false); +} + + +void GRef::selection_changed () +{ + if (applylock_) + return; + + Gtk::TreeModel::iterator iter = refview_->get_selection()->get_selected(); + if(iter) { + Gtk::TreeModel::Row row = *iter; + labelentry_->set_text(row[refColumns.name]); + } + + /*if (backbutton_->is_sensitive()) + controller().gotoBookmark();*/ + + /*jumptobutton_->set_sensitive(true); + backbutton_->set_sensitive(false);*/ +} + + +void GRef::jumpto() +{ + + if (backbutton_->is_sensitive()) + controller().gotoAnotherRef(labelentry_->get_text()); + else + controller().gotoRef(labelentry_->get_text()); + backbutton_->set_sensitive(true); + //jumptobutton_->set_sensitive(false); +} + + +void GRef::back() +{ + controller().gotoBookmark(); + backbutton_->set_sensitive(false); + jumptobutton_->set_sensitive(true); +} + + +void GRef::buffer_changed() +{ + if (applylock_) + return; + update_labels(); +} + + +void GRef::update() +{ + applylock_ = true; + + bc().refreshReadOnly(); + jumptobutton_->set_sensitive(true); + backbutton_->set_sensitive(false); + labelentry_->set_text(controller().params().getContents()); + nameentry_->set_text(controller().params().getOptions()); + // Name is irrelevant to LaTeX/Literate documents + + + Kernel::DocType doctype = kernel().docType(); + if (doctype == Kernel::LATEX || doctype == Kernel::LITERATE) { + nameentry_->set_sensitive(false); + } else { + nameentry_->set_sensitive(true); + } + + // type is irrelevant to LinuxDoc/DocBook. + 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<string> const buffers = controller().getBufferList(); + buffercombo_->set_model(bufferstore_); + + vector<string>::const_iterator it = buffers.begin(); + vector<string>::const_iterator const end = buffers.end(); + for (; it != end; ++it) { + Gtk::TreeModel::iterator iter = bufferstore_->append(); + (*iter)[bufferColumns.name] = *it; + } + + + buffercombo_->set_active(controller().getBufferNum()); + + update_labels(); + applylock_ = false; + bc().valid(false); +} + + +void GRef::update_labels() +{ + int buffernum = buffercombo_->get_active_row_number(); + if (buffernum < 0) + buffernum=0; + + string const name = controller().getBufferName(buffernum); + vector<string> keys = controller().getLabelList(name); + refListStore_ = Gtk::ListStore::create(refColumns); + + if (!keys.empty()) { + vector<string>::const_iterator it = keys.begin(); + vector<string>::const_iterator end = keys.end(); + for (;it != keys.end(); ++it) { + Gtk::TreeModel::iterator iter =refListStore_->append(); + (*iter)[refColumns.name] = *it; + } + refview_->set_sensitive(true); + } else { + Gtk::TreeModel::iterator iter =refListStore_->append(); + (*iter)[refColumns.name] = _("No labels found."); + refview_->set_sensitive(false); + } + refview_->set_model(refListStore_); +} + + +void GRef::apply() +{ + if (applylock_) + return; + + controller().params().setContents(labelentry_->get_text()); + controller().params().setOptions(nameentry_->get_text()); + int const type = formatcombo_->get_active_row_number(); + controller().params().setCmdName(InsetRef::getName(type)); +} + + +void GRef::label_changed() +{ + bc().valid(!labelentry_->get_text().empty()); +} + + +void GRef::refview_activated(const Gtk::TreeModel::Path&, Gtk::TreeViewColumn*) +{ + if (!labelentry_->get_text().empty()) + okbutton_->clicked(); +} + + +} // namespace frontend +} // namespace lyx Index: GRef.h =================================================================== RCS file: GRef.h diff -N GRef.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ GRef.h 3 Aug 2005 20:41:59 -0000 @@ -0,0 +1,62 @@ +// -*- C++ -*- +/** + * \file GRef.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author John Spray + * \author Andreas Klostermann + * + * Full author contact details are available in file CREDITS. + */ + +#ifndef GREF_H +#define GREF_H + +#include "GViewBase.h" +#include <string> +namespace lyx { +namespace frontend { + +class ControlRef; + +/** This class provides a GTK+ implementation of the Note Dialog. + */ +class GRef : public GViewCB<ControlRef, GViewGladeB> { +public: + GRef(Dialog & parent); +private: + virtual void apply(); + virtual void doBuild(); + virtual void update(); + virtual void update_labels(); + // Signal callbacks + void selection_changed (); + void buffer_changed(); + void label_changed(); + void jumpto(); + void back(); + void refview_activated(const Gtk::TreeModel::Path&, Gtk::TreeViewColumn*); + // apply() won't act when this is true + bool applylock_; + std::string lastbuffer_; + Gtk::Entry * labelentry_; + Gtk::Entry * nameentry_; + Gtk::TreeView * refview_; + Glib::RefPtr<Gtk::ListStore> refListStore_; + Glib::RefPtr<Gtk::ListStore> bufferstore_; + Gtk::ComboBox * formatcombo_; + Gtk::ComboBox * buffercombo_; + Gtk::Button * jumptobutton_; + Gtk::Button * backbutton_; + Gtk::Button * cancelbutton_; + Gtk::Button * okbutton_; + Gtk::Button * applybutton_; + Gtk::Button * refreshbutton_; + +}; + +} // namespace frontend +} // namespace lyx + +#endif // GREF_H Index: Makefile.am =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/gtk/Makefile.am,v retrieving revision 1.41 diff -u -p -r1.41 Makefile.am --- Makefile.am 12 Jul 2005 23:42:22 -0000 1.41 +++ Makefile.am 3 Aug 2005 20:41:59 -0000 @@ -71,6 +71,8 @@ libgtk_la_SOURCES = \ GParagraph.h \ GPrint.C \ GPrint.h \ + GRef.C \ + GRef.h \ GScreen.C \ GScreen.h \ GSearch.C \ @@ -143,7 +145,6 @@ xforms_objects = \ ../xforms/FormMathsStyle.lo \ ../xforms/FormPreamble.lo \ ../xforms/FormPreferences.lo \ - ../xforms/FormRef.lo \ ../xforms/forms_gettext.lo \ ../xforms/FormTabular.lo \ ../xforms/FormText.lo \ Index: glade/Makefile.am =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/gtk/glade/Makefile.am,v retrieving revision 1.7 diff -u -p -r1.7 Makefile.am --- glade/Makefile.am 18 Apr 2005 17:55:06 -0000 1.7 +++ glade/Makefile.am 3 Aug 2005 20:41:59 -0000 @@ -21,6 +21,7 @@ dist_glade_DATA = \ note.glade \ paragraph.glade \ print.glade \ + ref.glade \ search.glade \ sendto.glade \ showfile.glade \ Index: glade/ref.glade =================================================================== RCS file: glade/ref.glade diff -N glade/ref.glade --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ glade/ref.glade 3 Aug 2005 20:42:00 -0000 @@ -0,0 +1,416 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkDialog" id="dialog"> + <property name="visible">True</property> + <property name="title" translatable="yes">dialog1</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="has_separator">False</property> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + + <child> + <widget class="GtkButton" id="Cancel"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-cancel</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-6</property> + <accelerator key="Escape" modifiers="0" signal="clicked"/> + </widget> + </child> + + <child> + <widget class="GtkButton" id="Apply"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-apply</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-10</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="OK"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-ok</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-5</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox2"> + <property name="border_width">12</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">12</property> + + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">12</property> + + <child> + <widget class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Document:</property> + <property name="use_underline">True</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0.490000009537</property> + <property name="yalign">0.490000009537</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="Buffer"> + <property name="width_request">150</property> + <property name="visible">True</property> + <property name="items" translatable="yes">help</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">12</property> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <widget class="GtkTreeView" id="Labels"> + <property name="width_request">150</property> + <property name="height_request">300</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">True</property> + <property name="rules_hint">False</property> + <property name="reorderable">False</property> + <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkVButtonBox" id="vbuttonbox1"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_START</property> + <property name="spacing">12</property> + + <child> + <widget class="GtkButton" id="JumpTo"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Jump to the position of the selected label</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-jump-to</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="Back"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Return to original position in document</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-go-back</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="Refresh"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Refresh the label list</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-refresh</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkTable" id="table1"> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + + <child> + <widget class="GtkEntry" id="Name"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Label:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Format:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">0</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="label" translatable="yes">_Name:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="Format"> + <property name="visible">True</property> + <property name="items" translatable="yes"><reference> +(<reference>) +<page> +on page <page> +<reference> on page <page> +Formatted reference</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="Label"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface>
Index: ControlRef.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/frontends/controllers/ControlRef.C,v retrieving revision 1.33 diff -u -p -r1.33 ControlRef.C --- ControlRef.C 2005/05/08 10:02:37 1.33 +++ ControlRef.C 2005/08/03 21:12:35 @@ -45,6 +45,12 @@ vector<string> const ControlRef::getLabe } +void ControlRef::gotoAnotherRef(string const & ref) +{ + kernel().dispatch(FuncRequest(LFUN_LABEL_GOTO, ref)); +} + + void ControlRef::gotoRef(string const & ref) { kernel().dispatch(FuncRequest(LFUN_BOOKMARK_SAVE, "0")); Index: ControlRef.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/frontends/controllers/ControlRef.h,v retrieving revision 1.17 diff -u -p -r1.17 ControlRef.h --- ControlRef.h 2004/05/19 15:11:30 1.17 +++ ControlRef.h 2005/08/03 21:12:35 @@ -28,6 +28,8 @@ public: /// std::vector<std::string> const getLabelList(std::string const &) const; /// + void gotoAnotherRef(std::string const & ref); + /// void gotoRef(std::string const &); /// void gotoBookmark();