On Sat, 2004-09-25 at 15:02, Lars Gullik Bj�nnes wrote:
> This patch is not really for inclusion, but is more for people
> interested in getting gtk 2.4 to work with LyX.
That would be me :-)

I've fixed the toolbar, with the exception of the tooltips which are
mysteriously not working.  However, I think it's better to hasten the
move to 2.4 and fix the tooltips some other time.  I've changed the
tooltip stuff for 2.4, it's all there, I'm just not sure why it isn't
working.

The attached patch is derived from yours, but includes an update of
GToolbar.  I've also undone one or two of your reordering of #includes
from earlier today, since they seemed to break compilation for me.

Was there anything other than the toolbar blocking the move to 2.4?  I
would prefer to do this as soon as possible.

John
> 
> ______________________________________________________________________
Index: configure.ac
===================================================================
RCS file: /cvs/lyx/lyx-devel/configure.ac,v
retrieving revision 1.25
diff -u -3 -p -r1.25 configure.ac
--- configure.ac	2004/09/04 12:13:48	1.25
+++ configure.ac	2004/09/26 14:57:18
@@ -192,13 +192,13 @@ for frontend in $FRONTENDS ; do
   dnl     FRONTEND_LIBS="@XPM_LIB@ @XFORMS_LIB@ ${GNOME_FRONTEND_LIBS}"
   dnl	;;
     gtk)
-	  PKG_CHECK_MODULES(GTK_FRONTEND, gtkmm-2.0 libglademm-2.0)
+	  PKG_CHECK_MODULES(GTK_FRONTEND, gtkmm-2.4 libglademm-2.4)
 	  FRONTENDS_PROGS="$FRONTENDS_PROGS lyx-gtk\$(EXEEXT)"
 	  FRONTENDS_SUBDIRS="$FRONTENDS_SUBDIRS gtk"
 	  RPM_FRONTEND="gtk"
-	  RPM_FRONTEND_DEPS='gtkmm >= 2.2.0'
-	  GTKMM_VERSION=`pkg-config --modversion gtkmm-2.0`
-	  LIBGLADEMM_VERSION=`pkg-config --modversion libglademm-2.0`
+	  RPM_FRONTEND_DEPS='gtkmm >= 2.4.0'
+	  GTKMM_VERSION=`pkg-config --modversion gtkmm-2.4`
+	  LIBGLADEMM_VERSION=`pkg-config --modversion libglademm-2.4`
 	  FRONTEND_INFO="${FRONTEND_INFO}\
   GTK Frontend:\n\
     libgtkmm version:\t\t${GTKMM_VERSION}\n\
Index: src/frontends/gtk/Alert_pimpl.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/Alert_pimpl.C,v
retrieving revision 1.4
diff -u -3 -p -r1.4 Alert_pimpl.C
--- src/frontends/gtk/Alert_pimpl.C	2003/10/08 11:31:49	1.4
+++ src/frontends/gtk/Alert_pimpl.C	2004/09/26 14:57:18
@@ -37,8 +37,8 @@ string translateShortcut(string const & 
 void warning_pimpl(string const &, string const & message)
 {
 	Gtk::MessageDialog dlg(Glib::locale_to_utf8(message),
-			       Gtk::MESSAGE_WARNING,
-			       Gtk::BUTTONS_CLOSE, true, true);
+			       true, Gtk::MESSAGE_WARNING,
+			       Gtk::BUTTONS_CLOSE, true);
 	dlg.run();
 }
 
@@ -46,8 +46,8 @@ void warning_pimpl(string const &, strin
 void error_pimpl(string const &, string const & message)
 {
 	Gtk::MessageDialog dlg(Glib::locale_to_utf8(message),
-			       Gtk::MESSAGE_ERROR,
-			       Gtk::BUTTONS_CLOSE, true, true);
+			       true, Gtk::MESSAGE_ERROR,
+			       Gtk::BUTTONS_CLOSE, true);
 	dlg.run();
 }
 
@@ -55,8 +55,8 @@ void error_pimpl(string const &, string 
 void information_pimpl(string const &, string const & message)
 {
 	Gtk::MessageDialog dlg(Glib::locale_to_utf8(message),
-			       Gtk::MESSAGE_INFO,
-			       Gtk::BUTTONS_CLOSE, true, true);
+			       true, Gtk::MESSAGE_INFO,
+			       Gtk::BUTTONS_CLOSE, true);
 	dlg.run();
 }
 
@@ -71,8 +71,8 @@ int prompt_pimpl(string const &, string 
 	if (!b3.empty())
 		gb3 = Glib::locale_to_utf8(translateShortcut(b3));
 	Gtk::MessageDialog dlg(Glib::locale_to_utf8(question),
-			       Gtk::MESSAGE_QUESTION,
-			       Gtk::BUTTONS_NONE, true, true);
+			       true, Gtk::MESSAGE_QUESTION,
+			       Gtk::BUTTONS_NONE, true);
 	dlg.add_button(gb1, 0);
 	dlg.add_button(gb2, 1);
 	if (!b3.empty())
@@ -86,9 +86,9 @@ std::pair<bool, string> const askForText
 					       string const & dflt)
 {
 	Gtk::MessageDialog dlg(Glib::locale_to_utf8(msg),
-			       Gtk::MESSAGE_QUESTION,
+			       true, Gtk::MESSAGE_QUESTION,
 			       Gtk::BUTTONS_OK_CANCEL,
-			       true, true);
+			       true);
 	Gtk::Entry entry;
 	entry.set_text(Glib::locale_to_utf8(dflt));
 	entry.set_position(-1);
Index: src/frontends/gtk/FileDialogPrivate.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/FileDialogPrivate.C,v
retrieving revision 1.7
diff -u -3 -p -r1.7 FileDialogPrivate.C
--- src/frontends/gtk/FileDialogPrivate.C	2004/03/27 01:18:50	1.7
+++ src/frontends/gtk/FileDialogPrivate.C	2004/09/26 14:57:18
@@ -28,9 +28,9 @@ FileDialog::Private::Private(string cons
 	fileSelection_.get_button_area()->children().push_back(
 		Gtk::Box_Helpers::Element(button2_));
 	button1_.signal_clicked().connect(
-		SigC::slot(*this, &FileDialog::Private::onButton1Clicked));
+		sigc::mem_fun(*this, &FileDialog::Private::onButton1Clicked));
 	button2_.signal_clicked().connect(
-	SigC::slot(*this, &FileDialog::Private::onButton2Clicked));
+	sigc::mem_fun(*this, &FileDialog::Private::onButton2Clicked));
 	if (!b1.first.empty() && !b1.second.empty()) {
 		string::size_type pos = b1.first.find('|');
 		button1_.set_label(
Index: src/frontends/gtk/FileDialogPrivate.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/FileDialogPrivate.h,v
retrieving revision 1.5
diff -u -3 -p -r1.5 FileDialogPrivate.h
--- src/frontends/gtk/FileDialogPrivate.h	2004/09/26 13:18:29	1.5
+++ src/frontends/gtk/FileDialogPrivate.h	2004/09/26 14:57:18
@@ -15,7 +15,7 @@
 #include <gtkmm.h>
 #include "frontends/FileDialog.h"
 
-class FileDialog::Private : public SigC::Object {
+class FileDialog::Private : public sigc::trackable{
 public:
 	Private(std::string const & title,
 		kb_action action,
Index: src/frontends/gtk/GAboutlyx.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GAboutlyx.C,v
retrieving revision 1.8
diff -u -3 -p -r1.8 GAboutlyx.C
--- src/frontends/gtk/GAboutlyx.C	2004/05/19 15:11:32	1.8
+++ src/frontends/gtk/GAboutlyx.C	2004/09/26 14:57:18
@@ -173,7 +173,7 @@ void GAboutlyx::doBuild()
 	Gtk::Button * btn;
 	xml_->get_widget("close_button", btn);
 	setCancel(btn);
-	//btn->signal_clicked().connect(SigC::slot(*this, &GViewBase::onCancel));
+	//btn->signal_clicked().connect(sigc::mem_fun(*this, &GViewBase::onCancel));
 }
 
 } // namespace frontend
Index: src/frontends/gtk/GMathDelim.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GMathDelim.C,v
retrieving revision 1.4
diff -u -3 -p -r1.4 GMathDelim.C
--- src/frontends/gtk/GMathDelim.C	2004/09/26 13:18:29	1.4
+++ src/frontends/gtk/GMathDelim.C	2004/09/26 14:57:18
@@ -123,7 +123,7 @@ void GMathDelim::doBuild()
 	rightSel_ = 1;
 	xml_->get_widget("Box", box);
 	delimTbl_.signalClicked().connect(
-		SigC::slot(*this, &GMathDelim::onDelimTblClicked));
+		sigc::mem_fun(*this, &GMathDelim::onDelimTblClicked));
 	delimTbl_.show();
 	box->children().push_back(
 		Gtk::Box_Helpers::Element(delimTbl_));
@@ -133,11 +133,11 @@ void GMathDelim::doBuild()
 	bcview().addReadOnly(both_);
 	bcview().addReadOnly(demo_);
 	left_->signal_clicked().connect(
-		SigC::slot(*this, &GMathDelim::onRadioClicked));
+		sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
 	right_->signal_clicked().connect(
-		SigC::slot(*this, &GMathDelim::onRadioClicked));
+		sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
 	both_->signal_clicked().connect(
-		SigC::slot(*this, &GMathDelim::onRadioClicked));
+		sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
 }
 
 
@@ -147,7 +147,7 @@ void GMathDelim::setDemoPixmap()
 	pixmap_ = Gdk::Pixmap::create_from_xpm(demo_->get_colormap(),
 					       mask_,
 					       delim0);
-	image = SigC::manage(new Gtk::Image(pixmap_, mask_));
+	image = Gtk::manage(new Gtk::Image(pixmap_, mask_));
 	image->show();
 	demo_->add(*image);
 	gcMask_ = Gdk::GC::create(mask_);
Index: src/frontends/gtk/GMathPanel.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GMathPanel.C,v
retrieving revision 1.5
diff -u -3 -p -r1.5 GMathPanel.C
--- src/frontends/gtk/GMathPanel.C	2004/09/26 13:18:29	1.5
+++ src/frontends/gtk/GMathPanel.C	2004/09/26 14:57:18
@@ -114,10 +114,10 @@ void GMathPanel::doBuild()
 	setCancel(close);
 
 	tableUp_.signalClicked().connect(
-		SigC::slot(*this, &GMathPanel::onTableUpClicked));
+		sigc::mem_fun(*this, &GMathPanel::onTableUpClicked));
 	tableUp_.show();
 	tableDown_.signalClicked().connect(
-		SigC::slot(*this, &GMathPanel::onTableDownClicked));
+		sigc::mem_fun(*this, &GMathPanel::onTableDownClicked));
 	tableDown_.show();
 
 	xml_->get_widget("Vbox", vbox);
@@ -132,7 +132,7 @@ void GMathPanel::doBuild()
 	functions_->append_column("Functions", listCol_);
 	listSel_ = functions_->get_selection();
 	listSel_->signal_changed().connect(
-		SigC::slot(*this, &GMathPanel::onFunctionSelected));
+		sigc::mem_fun(*this, &GMathPanel::onFunctionSelected));
 	for (int i = 0; i < nr_function_names; ++i)
 		(*listStore_->append())[listCol_] =
 			Glib::locale_to_utf8(function_names[i]);
Index: src/frontends/gtk/GMenubar.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GMenubar.C,v
retrieving revision 1.12
diff -u -3 -p -r1.12 GMenubar.C
--- src/frontends/gtk/GMenubar.C	2004/09/26 13:18:29	1.12
+++ src/frontends/gtk/GMenubar.C	2004/09/26 14:57:18
@@ -85,7 +85,7 @@ GMenubar::GMenubar(LyXView * lyxView, Me
 				labelTrans(i->label(), i->shortcut()),
 				*gmenu));
 		menubar_.items().back().signal_activate().connect(
-			SigC::bind(SigC::slot(*this, &GMenubar::onSubMenuActivate), &(*i),
+			sigc::bind(sigc::mem_fun(*this, &GMenubar::onSubMenuActivate), &(*i),
 				   &menubar_.items().back()));
 		mainMenuNames_.push_back(i->submenuname());
 	}
@@ -173,7 +173,7 @@ void GMenubar::onSubMenuActivate(MenuIte
 					labelTrans(i->label(), i->shortcut()),
 					*gmenu_new));
 			gmenu->items().back().signal_activate().connect(
-				SigC::bind(SigC::slot(*this, &GMenubar::onSubMenuActivate),
+				sigc::bind(sigc::mem_fun(*this, &GMenubar::onSubMenuActivate),
 					   &(*i),
 					   &gmenu->items().back()));
 			if (submenuDisabled(&(*i)))
@@ -206,7 +206,7 @@ void GMenubar::onSubMenuActivate(MenuIte
 			}
 			Gtk::MenuItem & item = gmenu->items().back();
 			item.signal_activate().connect(
-				SigC::bind(SigC::slot(*this, &GMenubar::onCommandActivate),
+				sigc::bind(sigc::mem_fun(*this, &GMenubar::onCommandActivate),
 					   &(*i), &item));
 			if (!flag.enabled())
 				item.set_sensitive(false);
Index: src/frontends/gtk/GMenubar.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GMenubar.h,v
retrieving revision 1.4
diff -u -3 -p -r1.4 GMenubar.h
--- src/frontends/gtk/GMenubar.h	2004/05/19 15:11:32	1.4
+++ src/frontends/gtk/GMenubar.h	2004/09/26 14:57:18
@@ -21,7 +21,7 @@ class LyXView;
 namespace lyx {
 namespace frontend {
 
-class GMenubar : public Menubar, public SigC::Object {
+class GMenubar : public Menubar, public sigc::trackable {
 public:
 	GMenubar(LyXView *, MenuBackend const &);
 	~GMenubar();
Index: src/frontends/gtk/GMiniBuffer.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GMiniBuffer.C,v
retrieving revision 1.7
diff -u -3 -p -r1.7 GMiniBuffer.C
--- src/frontends/gtk/GMiniBuffer.C	2004/09/26 13:18:29	1.7
+++ src/frontends/gtk/GMiniBuffer.C	2004/09/26 14:57:18
@@ -34,14 +34,14 @@ GMiniBuffer::GMiniBuffer(GView * view, C
 	listView_.set_model(listStore_);
 	listView_.append_column("Completions", listCol_);
 	listView_.signal_key_press_event().connect(
-		SigC::slot(*this, &GMiniBuffer::onListKeyPress));
+		sigc::mem_fun(*this, &GMiniBuffer::onListKeyPress));
 	listView_.signal_focus_in_event().connect(
-		SigC::slot(*this, &GMiniBuffer::onListFocusIn));
+		sigc::mem_fun(*this, &GMiniBuffer::onListFocusIn));
 	listView_.signal_focus_out_event().connect(
-		SigC::slot(*this, &GMiniBuffer::onFocusOut));
+		sigc::mem_fun(*this, &GMiniBuffer::onFocusOut));
 	listSel_ = listView_.get_selection();
 	listSel_->signal_changed().connect(
-		SigC::slot(*this, &GMiniBuffer::onSelected));
+		sigc::mem_fun(*this, &GMiniBuffer::onSelected));
 
 	listView_.show();
 	scrolledWindow_.set_policy(Gtk::POLICY_AUTOMATIC,
@@ -53,13 +53,13 @@ GMiniBuffer::GMiniBuffer(GView * view, C
 		Gtk::Box_Helpers::Element(scrolledWindow_,Gtk::PACK_SHRINK));
 
 	entry_.signal_key_press_event().connect(
-		SigC::slot(*this, &GMiniBuffer::onKeyPress));
+		sigc::mem_fun(*this, &GMiniBuffer::onKeyPress));
 	entry_.signal_focus_in_event().connect(
-		SigC::slot(*this, &GMiniBuffer::onFocusIn));
+		sigc::mem_fun(*this, &GMiniBuffer::onFocusIn));
 	entry_.signal_focus_out_event().connect(
-		SigC::slot(*this, &GMiniBuffer::onFocusOut));
+		sigc::mem_fun(*this, &GMiniBuffer::onFocusOut));
 	entry_.signal_activate().connect(
-		SigC::slot(*this, &GMiniBuffer::onCommit));
+		sigc::mem_fun(*this, &GMiniBuffer::onCommit));
 	entry_.show();
 
 	view_->getBox(GView::Bottom).children().push_back(
Index: src/frontends/gtk/GMiniBuffer.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GMiniBuffer.h,v
retrieving revision 1.6
diff -u -3 -p -r1.6 GMiniBuffer.h
--- src/frontends/gtk/GMiniBuffer.h	2004/09/26 13:18:29	1.6
+++ src/frontends/gtk/GMiniBuffer.h	2004/09/26 14:57:18
@@ -20,7 +20,7 @@ namespace frontend {
 
 class ControlCommandBuffer;
 
-class GMiniBuffer : public SigC::Object {
+class GMiniBuffer : public sigc::trackable{
 public:
 	GMiniBuffer(GView * view, ControlCommandBuffer & control);
 	~GMiniBuffer();
Index: src/frontends/gtk/GPainter.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GPainter.h,v
retrieving revision 1.9
diff -u -3 -p -r1.9 GPainter.h
--- src/frontends/gtk/GPainter.h	2004/05/19 15:11:32	1.9
+++ src/frontends/gtk/GPainter.h	2004/09/26 14:57:18
@@ -15,6 +15,7 @@
 #include "frontends/Painter.h"
 
 #include <X11/Xft/Xft.h>
+#include <gtkmm.h>
 
 #include <map>
 
Index: src/frontends/gtk/GPrint.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GPrint.C,v
retrieving revision 1.6
diff -u -3 -p -r1.6 GPrint.C
--- src/frontends/gtk/GPrint.C	2004/09/26 13:18:29	1.6
+++ src/frontends/gtk/GPrint.C	2004/09/26 14:57:18
@@ -150,22 +150,23 @@ void GPrint::doBuild()
 	Gtk::Button * apply;
 	xml_->get_widget("PrintButton", ok);
 	xml_->get_widget("CancelButton", cancel);
+
 	setOK(ok);
 	setCancel(cancel);
 
 	Gtk::Button * browse;
 	xml_->get_widget("Browse", browse);
-	browse->signal_clicked().connect(SigC::slot(*this, &GPrint::onBrowse));
+	browse->signal_clicked().connect(sigc::mem_fun(*this, &GPrint::onBrowse));
 
-	fileEntry_->signal_changed().connect(SigC::bind(SigC::slot(*this, &GPrint::onTargetEdit), fileEntry_));
-	printerEntry_->signal_changed().connect(SigC::bind(SigC::slot(*this, &GPrint::onTargetEdit), printerEntry_));
-	fromEntry_->signal_changed().connect(SigC::slot(*this, &GPrint::onFromToEdit));
-	toEntry_->signal_changed().connect(SigC::slot(*this, &GPrint::onFromToEdit));
-	printer_->signal_toggled().connect(SigC::slot(*this, &GPrint::updateUI));
-	file_->signal_toggled().connect(SigC::slot(*this, &GPrint::updateUI));
-	all_->signal_toggled().connect(SigC::slot(*this, &GPrint::updateUI));
-	fromTo_->signal_toggled().connect(SigC::slot(*this, &GPrint::updateUI));
-	number_->signal_changed().connect(SigC::slot(*this, &GPrint::updateUI));
+	fileEntry_->signal_changed().connect(sigc::bind(sigc::mem_fun(*this, &GPrint::onTargetEdit), fileEntry_));
+	printerEntry_->signal_changed().connect(sigc::bind(sigc::mem_fun(*this, &GPrint::onTargetEdit), printerEntry_));
+	fromEntry_->signal_changed().connect(sigc::mem_fun(*this, &GPrint::onFromToEdit));
+	toEntry_->signal_changed().connect(sigc::mem_fun(*this, &GPrint::onFromToEdit));
+	printer_->signal_toggled().connect(sigc::mem_fun(*this, &GPrint::updateUI));
+	file_->signal_toggled().connect(sigc::mem_fun(*this, &GPrint::updateUI));
+	all_->signal_toggled().connect(sigc::mem_fun(*this, &GPrint::updateUI));
+	fromTo_->signal_toggled().connect(sigc::mem_fun(*this, &GPrint::updateUI));
+	number_->signal_changed().connect(sigc::mem_fun(*this, &GPrint::updateUI));
 
 	controller().initialiseParams("");
 	update();
Index: src/frontends/gtk/GSearch.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GSearch.C,v
retrieving revision 1.2
diff -u -3 -p -r1.2 GSearch.C
--- src/frontends/gtk/GSearch.C	2004/09/26 13:18:29	1.2
+++ src/frontends/gtk/GSearch.C	2004/09/26 14:57:18
@@ -48,13 +48,13 @@ void GSearch::doBuild()
 	xml_->get_widget("SearchBackwards", backwardscheck);
 
 	findnextbutton->signal_clicked().connect(
-		SigC::slot(*this, &GSearch::onFindNext));
+		sigc::mem_fun(*this, &GSearch::onFindNext));
 	replacebutton->signal_clicked().connect(
-		SigC::slot(*this, &GSearch::onReplace));
+		sigc::mem_fun(*this, &GSearch::onReplace));
 	replaceallbutton->signal_clicked().connect(
-		SigC::slot(*this, &GSearch::onReplaceAll));
+		sigc::mem_fun(*this, &GSearch::onReplaceAll));
 	findentry->signal_changed().connect(
-		SigC::slot(*this,&GSearch::onFindEntryChanged));
+		sigc::mem_fun(*this,&GSearch::onFindEntryChanged));
 
 	bcview().addReadOnly(replaceentry);
 	bcview().addReadOnly(replacebutton);
Index: src/frontends/gtk/GText.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GText.C,v
retrieving revision 1.7
diff -u -3 -p -r1.7 GText.C
--- src/frontends/gtk/GText.C	2004/09/26 13:18:29	1.7
+++ src/frontends/gtk/GText.C	2004/09/26 14:57:18
@@ -67,7 +67,7 @@ void GText::doBuild()
 	setRestore(restore);
 	bcview().addReadOnly(entry_);
 	entry_->signal_changed().connect(
-		SigC::slot(*this, &GText::onEntryChanged));
+		sigc::mem_fun(*this, &GText::onEntryChanged));
 }
 
 
Index: src/frontends/gtk/GTimeout.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GTimeout.C,v
retrieving revision 1.3
diff -u -3 -p -r1.3 GTimeout.C
--- src/frontends/gtk/GTimeout.C	2004/05/19 15:11:32	1.3
+++ src/frontends/gtk/GTimeout.C	2004/09/26 14:57:18
@@ -51,7 +51,7 @@ void GTimeout::start()
 	}
 
 	conn_ = Glib::signal_timeout().connect(
-			 SigC::slot(*this, &GTimeout::timeoutEvent),
+			 sigc::mem_fun(*this, &GTimeout::timeoutEvent),
 			 timeout_ms()
 			);
 	running_ = true;
Index: src/frontends/gtk/GTimeout.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GTimeout.h,v
retrieving revision 1.4
diff -u -3 -p -r1.4 GTimeout.h
--- src/frontends/gtk/GTimeout.h	2004/09/26 13:18:29	1.4
+++ src/frontends/gtk/GTimeout.h	2004/09/26 14:57:18
@@ -24,7 +24,7 @@ namespace frontend {
  * This class executes the callback when the timeout expires
  * using Gtk mechanisms
  */
-class GTimeout : public Timeout::Impl, public SigC::Object {
+class GTimeout : public Timeout::Impl, public sigc::trackable {
 public:
 	///
 	GTimeout(Timeout & owner_);
@@ -40,8 +40,8 @@ public:
 	bool timeoutEvent();
 private:
 	/// Timer connection
-	SigC::Connection conn_;
-	/// Used for running as SigC::Connection::connected() isn't const
+	sigc::connection conn_;
+	/// Used for running as sigc::connection::connected() isn't const
 	bool running_;
 };
 
Index: src/frontends/gtk/GToolbar.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GToolbar.C,v
retrieving revision 1.16
diff -u -3 -p -r1.16 GToolbar.C
--- src/frontends/gtk/GToolbar.C	2004/09/26 13:18:29	1.16
+++ src/frontends/gtk/GToolbar.C	2004/09/26 14:57:18
@@ -79,18 +79,20 @@ GLayoutBox::GLayoutBox(LyXView & owner,
 	combo_.get_entry()->unset_flags(Gtk::CAN_FOCUS | Gtk::CAN_DEFAULT);
 	comboClear(combo_);
 
-	combo_.get_entry()->signal_changed().connect(
-		SigC::slot(*this,
-			   &GLayoutBox::selected));
+ 	combo_.get_entry()->signal_changed().connect(
+		sigc::mem_fun(*this,&GLayoutBox::selected));
 
 	combo_.show();
-	toolbar.tools().push_back(Gtk::Toolbar_Helpers::Element(combo_));
-	toolbar.tools().back().get_widget()->set_data(
+
+	combo_.set_data(
 		gToolData,
 		reinterpret_cast<void*>(&const_cast<FuncRequest &>(func)));
+		
+	Gtk::ToolItem * toolitem = Gtk::manage(new Gtk::ToolItem);
+	toolitem->add(combo_);
+	toolbar.insert(*toolitem,-1);
 }
 
-
 void GLayoutBox::set(string const & layout)
 {
 	LyXTextClass const & tc = getTextClass(owner_);
@@ -188,6 +190,7 @@ GToolbar::GToolbar(ToolbarBackend::Toolb
 		add(it->first, it->second);
 
 	toolbar_.set_toolbar_style(Gtk::TOOLBAR_ICONS);
+	toolbar_.show_all();
 
 	GView::Position const position = getPosition(tbb.flags);
 
@@ -196,51 +199,54 @@ GToolbar::GToolbar(ToolbarBackend::Toolb
 
 	owner_.getBox(position).children().push_back(
 		Gtk::Box_Helpers::Element(toolbar_, Gtk::PACK_SHRINK));
+		
+	tooltips_.enable();
 }
 
-
 void GToolbar::add(FuncRequest const & func, string const & tooltip)
 {
-	switch (func.action) {
-	case ToolbarBackend::SEPARATOR:
-		toolbar_.tools().push_back(Gtk::Toolbar_Helpers::Space());
-		break;
-	case ToolbarBackend::MINIBUFFER:
-		// Not supported yet.
-		break;
-	case ToolbarBackend::LAYOUTS:
-	{
-		layout_.reset(new GLayoutBox(owner_, toolbar_, func));
-		break;
+ 	switch (func.action) {
+	case ToolbarBackend::SEPARATOR: {
+		Gtk::SeparatorToolItem * space =
+			Gtk::manage(new Gtk::SeparatorToolItem);
+		toolbar_.insert(*space,-1);
+ 		break;
 	}
-	default:
+
+ 	case ToolbarBackend::MINIBUFFER:
+ 		// Not supported yet.
+ 		break;
+
+	case ToolbarBackend::LAYOUTS: {
+		layout_.reset(new GLayoutBox(owner_, toolbar_, func));
+ 		break;
+ 	}
+
+	default: {
 		Glib::ustring xpmName =
 			Glib::locale_to_utf8(toolbarbackend.getIcon(func));
 		Glib::ustring tip = Glib::locale_to_utf8(tooltip);
+		Gtk::ToolButton * toolbutton;
 		if (xpmName.size() == 0) {
-			toolbar_.tools().push_back(
-				Gtk::Toolbar_Helpers::ButtonElem(
-					"",
-					SigC::bind(SigC::slot(*this, &GToolbar::clicked),
-						   FuncRequest(func)),
-					tip));
+			toolbutton = Gtk::manage(new Gtk::ToolButton);
 		} else {
-			Gtk::Image * image =
-				Gtk::manage(new Gtk::Image(xpmName));
+			Gtk::Image * image = Gtk::manage(new Gtk::Image(xpmName));
 			image->show();
-			toolbar_.tools().push_back(
-				Gtk::Toolbar_Helpers::ButtonElem(
-					"",
-					*image,
-					SigC::bind(SigC::slot(*this, &GToolbar::clicked),
-						   FuncRequest(func)),
-					tip));
+			toolbutton = Gtk::manage(new Gtk::ToolButton(*image));
 		}
-		toolbar_.tools().back().get_content()->set_data(
-			gToolData,
+		// This code is putting a function reference into the GObject data field
+		// named gToolData.  That's how we know how to update the status of the 
+		// toolitem later.
+		toolbutton->set_data(gToolData,
 			reinterpret_cast<void*>(&const_cast<FuncRequest &>(func)));
+		tooltips_.set_tip(*toolbutton, tip, tip);
+		toolbutton->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this,
+			&GToolbar::clicked), FuncRequest(func)));		
+		toolbar_.insert(*toolbutton,-1);
 		break;
 	}
+
+	}
 }
 
 
@@ -264,40 +270,17 @@ void GToolbar::show(bool)
 
 void GToolbar::update()
 {
-	Gtk::Toolbar_Helpers::ToolList::iterator it =
-		toolbar_.tools().begin();
-	Gtk::Toolbar_Helpers::ToolList::iterator const end =
-		toolbar_.tools().end();
+	int items = toolbar_.get_n_items();
 
-	for (; it != end; ++it) {
-		Gtk::Widget * widget;
-		switch (it->get_type()) {
-		case Gtk::TOOLBAR_CHILD_WIDGET:
-			widget = it->get_widget();
-			break;
-		case Gtk::TOOLBAR_CHILD_SPACE:
-			continue;
-		default:
-			widget = it->get_content();
-		}
+	for (int i = 0; i < items; ++i) {
+		Gtk::ToolItem * item = toolbar_.get_nth_item(i);
 
-		FuncRequest const & func = *reinterpret_cast<FuncRequest *>(
-			widget->get_data(gToolData));
-
-		if (func.action == int(ToolbarBackend::LAYOUTS))
-			continue;
-
-		FuncStatus const status = owner_.getLyXFunc().getStatus(func);
-		bool sensitive = status.enabled();
-		widget->set_sensitive(sensitive);
-		if (it->get_type() != Gtk::TOOLBAR_CHILD_BUTTON)
-			return;
-		if (status.onoff(true))
-			static_cast<Gtk::Button*>(widget)->
-				set_relief(Gtk::RELIEF_NORMAL);
-		if (status.onoff(false))
-			static_cast<Gtk::Button*>(widget)->
-				set_relief(Gtk::RELIEF_NONE);
+		FuncRequest const * func = reinterpret_cast<FuncRequest *>(
+			item->get_data(gToolData));
+		if (func) {
+			FuncStatus const status = owner_.getLyXFunc().getStatus(*func);
+			item->set_sensitive(status.enabled());
+		}
 	}
 }
 
Index: src/frontends/gtk/GToolbar.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GToolbar.h,v
retrieving revision 1.9
diff -u -3 -p -r1.9 GToolbar.h
--- src/frontends/gtk/GToolbar.h	2004/09/26 13:18:29	1.9
+++ src/frontends/gtk/GToolbar.h	2004/09/26 14:57:18
@@ -24,7 +24,7 @@ namespace frontend {
 
 class GView;
 
-class GLayoutBox: public LayoutBox, public SigC::Object {
+class GLayoutBox: public LayoutBox, public sigc::trackable {
 public:
 	GLayoutBox(LyXView &, Gtk::Toolbar &, FuncRequest const &);
 
@@ -48,7 +48,7 @@ private:
 };
 
 
-class GToolbar : public Toolbar, public SigC::Object {
+class GToolbar : public Toolbar, public sigc::trackable {
 public:
 	GToolbar(ToolbarBackend::Toolbar const &, LyXView &);
 	void add(FuncRequest const & func, std::string const & tooltip);
@@ -61,6 +61,7 @@ private:
 
 	GView & owner_;
 	Gtk::Toolbar toolbar_;
+	Gtk::Tooltips tooltips_;
 	boost::scoped_ptr<GLayoutBox> layout_;
 };
 
Index: src/frontends/gtk/GUrl.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GUrl.C,v
retrieving revision 1.5
diff -u -3 -p -r1.5 GUrl.C
--- src/frontends/gtk/GUrl.C	2004/09/26 13:18:29	1.5
+++ src/frontends/gtk/GUrl.C	2004/09/26 14:57:18
@@ -54,9 +54,9 @@ void GUrl::doBuild()
 	bcview().addReadOnly(htmlType_);
 
 	url_->signal_changed().connect(
-		SigC::slot(*this, &GUrl::onEntryChanged));
+		sigc::mem_fun(*this, &GUrl::onEntryChanged));
 	name_->signal_changed().connect(
-		SigC::slot(*this, &GUrl::onEntryChanged));
+		sigc::mem_fun(*this, &GUrl::onEntryChanged));
 }
 
 
Index: src/frontends/gtk/GViewBase.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GViewBase.C,v
retrieving revision 1.7
diff -u -3 -p -r1.7 GViewBase.C
--- src/frontends/gtk/GViewBase.C	2004/09/26 13:18:29	1.7
+++ src/frontends/gtk/GViewBase.C	2004/09/26 14:57:18
@@ -44,7 +44,7 @@ void GViewBase::build()
 	if (!iconName.empty())
 		window()->set_icon_from_file(iconName);
 	window()->signal_delete_event().connect(
-		SigC::slot(*this, &GViewBase::onDeleteEvent));
+		sigc::mem_fun(*this, &GViewBase::onDeleteEvent));
 	window()->set_title(Glib::locale_to_utf8(getTitle()));
 }
 
@@ -74,7 +74,7 @@ void GViewBase::setCancel(Gtk::Button * 
 {
 	bcview().setCancel(cancel);
 	cancel->signal_clicked().connect(
-		SigC::slot(*this, &GViewBase::onCancel));
+		sigc::mem_fun(*this, &GViewBase::onCancel));
 }
 
 
@@ -82,7 +82,7 @@ void GViewBase::setApply(Gtk::Button * a
 {
 	bcview().setApply(apply);
 	apply->signal_clicked().connect(
-		SigC::slot(*this, &GViewBase::onApply));
+		sigc::mem_fun(*this, &GViewBase::onApply));
 }
 
 
@@ -90,7 +90,7 @@ void GViewBase::setOK(Gtk::Button * ok)
 {
 	bcview().setOK(ok);
 	ok->signal_clicked().connect(
-		SigC::slot(*this, &GViewBase::onOK));
+		sigc::mem_fun(*this, &GViewBase::onOK));
 }
 
 
@@ -98,7 +98,7 @@ void GViewBase::setRestore(Gtk::Button *
 {
 	bcview().setRestore(restore);
 	restore->signal_clicked().connect(
-		SigC::slot(*this, &GViewBase::onRestore));
+		sigc::mem_fun(*this, &GViewBase::onRestore));
 }
 
 
Index: src/frontends/gtk/GViewBase.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GViewBase.h,v
retrieving revision 1.6
diff -u -3 -p -r1.6 GViewBase.h
--- src/frontends/gtk/GViewBase.h	2004/09/26 13:18:29	1.6
+++ src/frontends/gtk/GViewBase.h	2004/09/26 14:57:18
@@ -22,7 +22,8 @@
 namespace lyx {
 namespace frontend {
 
-class GViewBase : public Dialog::View, public SigC::Object {
+class GViewBase : public Dialog::View, public sigc::trackable
+{
 public:
 	GViewBase(Dialog &, std::string const &, bool allowResize);
 	virtual ~GViewBase();
Index: src/frontends/gtk/GView.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GView.C,v
retrieving revision 1.14
diff -u -3 -p -r1.14 GView.C
--- src/frontends/gtk/GView.C	2004/09/26 13:18:29	1.14
+++ src/frontends/gtk/GView.C	2004/09/26 14:57:19
@@ -91,7 +91,7 @@ GView::GView()
 	focus_command_buffer.connect(
 		boost::bind(&GMiniBuffer::editMode, minibuffer_.get()));
 	view_state_changed.connect(boost::bind(&GView::showViewState, this));
-	signal_focus_in_event().connect(SigC::slot(*this, &GView::onFocusIn));
+	signal_focus_in_event().connect(sigc::mem_fun(*this, &GView::onFocusIn));
 	set_default_size(500, 550);
 	// Make sure the buttons are disabled if needed.
 	updateToolbars();
Index: src/frontends/gtk/GWorkArea.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GWorkArea.C,v
retrieving revision 1.13
diff -u -3 -p -r1.13 GWorkArea.C
--- src/frontends/gtk/GWorkArea.C	2004/09/26 13:18:29	1.13
+++ src/frontends/gtk/GWorkArea.C	2004/09/26 14:57:19
@@ -160,22 +160,22 @@ GWorkArea::GWorkArea(LyXView & owner, in
 			     Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK |
 			     Gdk::KEY_PRESS_MASK | Gdk::BUTTON1_MOTION_MASK);
 	workArea_.signal_expose_event().connect(
-		SigC::slot(*this, &GWorkArea::onExpose));
+		sigc::mem_fun(*this, &GWorkArea::onExpose));
 	workArea_.signal_configure_event().connect(
-		SigC::slot(*this, &GWorkArea::onConfigure));
+		sigc::mem_fun(*this, &GWorkArea::onConfigure));
 	workArea_.signal_button_press_event().connect(
-		SigC::slot(*this, &GWorkArea::onButtonPress));
+		sigc::mem_fun(*this, &GWorkArea::onButtonPress));
 	workArea_.signal_button_release_event().connect(
-		SigC::slot(*this, &GWorkArea::onButtonRelease));
+		sigc::mem_fun(*this, &GWorkArea::onButtonRelease));
 	workArea_.signal_key_press_event().connect(
-		SigC::slot(*this, &GWorkArea::onKeyPress));
+		sigc::mem_fun(*this, &GWorkArea::onKeyPress));
 	workArea_.signal_motion_notify_event().connect(
-		SigC::slot(*this, &GWorkArea::onMotionNotify));
+		sigc::mem_fun(*this, &GWorkArea::onMotionNotify));
 	workArea_.show();
 	vscrollbar_.get_adjustment()->signal_value_changed().connect(
-		SigC::slot(*this, &GWorkArea::onScroll));
+		sigc::mem_fun(*this, &GWorkArea::onScroll));
 	workArea_.signal_scroll_event().connect(
-		SigC::slot(*this, &GWorkArea::onScrollWheel));
+		sigc::mem_fun(*this, &GWorkArea::onScrollWheel));
 	vscrollbar_.show();
 	hbox_.children().push_back(Gtk::Box_Helpers::Element(workArea_));
 	hbox_.children().push_back(
@@ -469,9 +469,9 @@ void GWorkArea::haveSelection(bool toHav
 		std::vector<Gtk::TargetEntry> listTargets;
 		listTargets.push_back(Gtk::TargetEntry("UTF8_STRING"));
 		clipboard->set(listTargets,
-			       SigC::slot(const_cast<GWorkArea&>(*this),
+			       sigc::mem_fun(const_cast<GWorkArea&>(*this),
 					  &GWorkArea::onClipboardGet),
-			       SigC::slot(const_cast<GWorkArea&>(*this),
+			       sigc::mem_fun(const_cast<GWorkArea&>(*this),
 					  &GWorkArea::onClipboardClear));
 	}
 }
Index: src/frontends/gtk/GWorkArea.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GWorkArea.h,v
retrieving revision 1.11
diff -u -3 -p -r1.11 GWorkArea.h
--- src/frontends/gtk/GWorkArea.h	2004/09/26 13:18:29	1.11
+++ src/frontends/gtk/GWorkArea.h	2004/09/26 14:57:19
@@ -55,7 +55,8 @@ private:
 };
 
 
-class GWorkArea : public WorkArea, public SigC::Object {
+class GWorkArea : public WorkArea, public sigc::trackable
+{
 public:
 	GWorkArea(LyXView & owner, int width, int height);
 	~GWorkArea();
Index: src/frontends/gtk/GXpmBtnTbl.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GXpmBtnTbl.C,v
retrieving revision 1.3
diff -u -3 -p -r1.3 GXpmBtnTbl.C
--- src/frontends/gtk/GXpmBtnTbl.C	2004/09/26 13:18:29	1.3
+++ src/frontends/gtk/GXpmBtnTbl.C	2004/09/26 14:57:19
@@ -23,7 +23,7 @@ void GXpmBtnTbl::GXpmBtn::setXpm(XpmData
 	pixmap_ = Gdk::Pixmap::create_from_xpm(clrmap,
 					       mask_,
 					       xpm);
-	Gtk::Image * image = SigC::manage(new Gtk::Image(pixmap_, mask_));
+	Gtk::Image* image = Gtk::manage(new Gtk::Image(pixmap_, mask_));
 	image->show();
 	add(*image);
 }
@@ -34,7 +34,8 @@ void GXpmBtnTbl::GXpmBtn::setXpm(Glib::R
 {
 	pixmap_ = pixmap;
 	mask_ = mask;
-	Gtk::Image * image = SigC::manage(new Gtk::Image(pixmap_, mask_));
+	Gtk::Image * image;
+	image = Gtk::manage(new Gtk::Image(pixmap_, mask_));
 	image->show();
 	add(*image);
 }
@@ -74,7 +75,7 @@ void GXpmBtnTbl::construct()
 			GXpmBtn * btn = &btns_[index(row, col)];
 			btn->setRow(row);
 			btn->setCol(col);
-			btn->signalClicked().connect(signalClicked_.slot());
+			btn->signalClicked().connect(signalClicked_);
 			btn->show();
 			attach(*btn, col, col + 1,  row, row + 1);
 		}
@@ -165,12 +166,12 @@ void buttonSetXpm(Gtk::Button * btn, cha
 	Glib::RefPtr<Gdk::Bitmap> mask;
 
 	Glib::RefPtr<Gdk::Colormap> clrmap = btn->get_colormap();
-
+	Gtk::Image * image;
 	Glib::RefPtr<Gdk::Pixmap> pixmap =
 		Gdk::Pixmap::create_from_xpm(clrmap,
 					     mask,
 					     xpm);
-	Gtk::Image * image = SigC::manage(new Gtk::Image(pixmap, mask));
+	image = Gtk::manage(new Gtk::Image(pixmap, mask));
 	image->show();
 	btn->add(*image);
 }
Index: src/frontends/gtk/GXpmBtnTbl.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/GXpmBtnTbl.h,v
retrieving revision 1.2
diff -u -3 -p -r1.2 GXpmBtnTbl.h
--- src/frontends/gtk/GXpmBtnTbl.h	2004/09/26 13:18:29	1.2
+++ src/frontends/gtk/GXpmBtnTbl.h	2004/09/26 14:57:19
@@ -13,14 +13,14 @@
 #define XPM_BTN_TBL_H
 
 #include <boost/scoped_array.hpp>
+#include <gtkmm.h>
 
-
 class GXpmBtnTbl : public Gtk::Table {
 public:
 	typedef char const ** XpmData;
-	typedef SigC::Signal2<void, int, int> SigType;
-
-	struct XbmData {
+	typedef sigc::signal<void, int, int> SigType;
+	struct XbmData
+	{
 		unsigned char const* data_;
 		int width_;
 		int height_;
@@ -31,8 +31,7 @@ public:
 	public:
 		GXpmBtn() : row_(-1), col_(-1)
 		{
-			signal_clicked().connect(
-				SigC::slot(*this,
+			signal_clicked().connect(sigc::mem_fun(*this,
 					   &GXpmBtn::onButtonClicked));
 		}
 		void setRow(int row) { row_ = row; }
Index: src/frontends/gtk/io_callback.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/io_callback.C,v
retrieving revision 1.2
diff -u -3 -p -r1.2 io_callback.C
--- src/frontends/gtk/io_callback.C	2004/09/26 13:18:29	1.2
+++ src/frontends/gtk/io_callback.C	2004/09/26 14:57:19
@@ -17,9 +17,7 @@
 io_callback::io_callback(int fd, boost::function<void()> func)
 	: func_(func)
 {
-	conn_ = Glib::signal_io().connect(
-		SigC::slot(*this, &io_callback::data_received),
-		fd, Glib::IO_IN);
+	conn_ = Glib::signal_io().connect(sigc::mem_fun(*this, &io_callback::data_received), fd, Glib::IO_IN);
 }
 
 
Index: src/frontends/gtk/io_callback.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/io_callback.h,v
retrieving revision 1.1
diff -u -3 -p -r1.1 io_callback.h
--- src/frontends/gtk/io_callback.h	2004/07/22 13:44:39	1.1
+++ src/frontends/gtk/io_callback.h	2004/09/26 14:57:19
@@ -26,14 +26,14 @@
  * connected/read.
  *
  */
-class io_callback : public SigC::Object {
+class io_callback : public sigc::trackable {
 public:
 	/// connect a connection notification from the LyXServerSocket
 	io_callback(int fd, boost::function<void()> func);
 private:
         bool data_received(Glib::IOCondition);
 	/// our notifier
-	SigC::Connection conn_;
+	sigc::connection conn_;
 	/// The callback function
 	boost::function<void()> func_;
 };
Index: src/frontends/gtk/LyXScreenFactory.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/LyXScreenFactory.C,v
retrieving revision 1.4
diff -u -3 -p -r1.4 LyXScreenFactory.C
--- src/frontends/gtk/LyXScreenFactory.C	2004/09/26 13:18:29	1.4
+++ src/frontends/gtk/LyXScreenFactory.C	2004/09/26 14:57:19
@@ -10,12 +10,12 @@
 
 #include <config.h>
 
+#include <gtkmm.h>
+#include "frontends/LyXScreenFactory.h"
 #include "GWorkArea.h"
 #include "GScreen.h"
 
-#include "frontends/LyXScreenFactory.h"
 
-#include <gtkmm.h>
 
 
 namespace LyXScreenFactory {
Index: src/frontends/gtk/xftFontLoader.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/gtk/xftFontLoader.C,v
retrieving revision 1.5
diff -u -3 -p -r1.5 xftFontLoader.C
--- src/frontends/gtk/xftFontLoader.C	2004/09/26 13:18:29	1.5
+++ src/frontends/gtk/xftFontLoader.C	2004/09/26 14:57:19
@@ -10,6 +10,7 @@
 
 #include <config.h>
 
+#include <gtkmm.h>
 #include "xftFontLoader.h"
 #include "FontInfo.h"
 #include "gettext.h"
@@ -24,7 +25,6 @@
 #include "support/systemcall.h"
 #include "support/filetools.h"
 
-#include <gtkmm.h>
 
 #include <X11/Xft/Xft.h>
 

Reply via email to