John Spray <[EMAIL PROTECTED]> writes:

| Hi,
>
| Due to an unexpected bout of insomnia,

You can sleep when you get old.

| I've replaced the deprecated
| Combo with a ComboBox in GToolbar.[Ch].

nice.

| Index: GToolbar.C
| ===================================================================
| RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GToolbar.C,v
| retrieving revision 1.19
| diff -u -3 -p -r1.19 GToolbar.C
| --- GToolbar.C        2004/09/27 00:08:33     1.19
| +++ GToolbar.C        2004/09/28 05:56:26
| @@ -72,65 +57,90 @@ GLayoutBox::GLayoutBox(LyXView & owner,
|       : owner_(owner),
|         internal_(false)
|  {
| -     combo_.set_value_in_list();
| -     combo_.get_entry()->set_editable(false);
| -     combo_.unset_flags(Gtk::CAN_FOCUS | Gtk::CAN_DEFAULT);
| -     combo_.get_entry()->unset_flags(Gtk::CAN_FOCUS | Gtk::CAN_DEFAULT);
| -     comboClear(combo_);
| -
| -     combo_.get_entry()->signal_changed().connect(
| +     combo_.signal_changed().connect(
|               sigc::mem_fun(*this,&GLayoutBox::selected));
|  
| -     combo_.show();
| +     cols_ = new stringcolumns;
| +     model_ = Gtk::ListStore::create(*cols_);
| +     combo_.set_model(model_);
| +     Gtk::CellRendererText * cell = new Gtk::CellRendererText;

Are you sure that no Gtk::manage is needed here?

|  void GLayoutBox::set(string const & layout)
|  {
|       LyXTextClass const & tc = getTextClass(owner_);
| +     std::string const target = tc[layout]->name();

drop the 'std::'

| Index: GToolbar.h
| ===================================================================
| RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GToolbar.h,v
| retrieving revision 1.11
| diff -u -3 -p -r1.11 GToolbar.h
| --- GToolbar.h        2004/09/26 18:36:07     1.11
| +++ GToolbar.h        2004/09/28 05:56:26
| @@ -41,8 +52,11 @@ public:
|  private:
|       ///
|       void selected();
| +
| +     Gtk::ComboBox combo_;
| +     Glib::RefPtr<Gtk::ListStore> model_;
| +     stringcolumns * cols_;

Does this have to be a raw pointer? Who manages it?

-- 
        Lgb

Reply via email to