]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GView.C
make it compile again
[lyx.git] / src / frontends / gtk / GView.C
index edaa95f8537f98a7738cb9151d3b5ffee30cefdd..dae159db6a2f9c853f5bc74e0eb1be3a54e95f16 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "GView.h"
 #include "GMenubar.h"
+#include "GToolbar.h"
 #include "GMiniBuffer.h"
 
 #include "BufferView.h"
@@ -32,6 +33,7 @@
 #include "funcrequest.h"
 
 #include "frontends/Toolbars.h"
+#include "frontends/WorkArea.h"
 
 #include "support/filetools.h"
 #include "support/convert.h"
@@ -57,7 +59,7 @@ void add_el(Gtk::Box::BoxList & list, Gtk::Box & box, bool shrink)
 } // namespace anon
 
 
-GView::GView(Gui & owner) : LyXView(owner)
+GView::GView() : LyXView()
 {
        // The physical store for the boxes making up the layout.
        box_store_.push_back(BoxPtr(new Gtk::VBox));
@@ -97,7 +99,6 @@ GView::GView(Gui & owner) : LyXView(owner)
 
        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::mem_fun(*this, &GView::onFocusIn));
        //
        int width = 750;
@@ -159,7 +160,9 @@ bool GView::onFocusIn(GdkEventFocus * /*event*/)
 
 void GView::prohibitInput() const
 {
-       view()->hideCursor();
+       // FIXME: Why is prohibitInput const?
+       // FIXME: hideCursor is protected
+       //const_cast<GView*>(this)->workArea()->hideCursor();
        const_cast<GView*>(this)->set_sensitive(false);
 }
 
@@ -170,28 +173,30 @@ void GView::allowInput() const
 }
 
 
-void GView::message(string const & msg)
+void GView::message(docstring const & msg)
 {
-       minibuffer_->message(msg);
+       minibuffer_->message(lyx::to_utf8(msg));
 }
 
 
-void GView::showViewState()
+void GView::updateStatusBar()
 {
-       message(getLyXFunc().viewStatusMessage());
+       message(lyx::from_utf8(getLyXFunc().viewStatusMessage()));
 }
 
 
-void GView::setWindowTitle(string const & t, string const & /*it*/)
+void GView::setWindowTitle(docstring const & t, docstring const & /*it*/)
 {
-       set_title(Glib::locale_to_utf8(t));
+       set_title(lyx::to_utf8(t));
 }
 
 
 void GView::busy(bool yes) const
 {
-       if (yes ) {
-               view()->hideCursor();
+       // FIXME: Why is busy const?
+       if (yes) {
+               // FIXME: hideCursor is protected
+               //const_cast<GView*>(this)->workArea()->hideCursor();
                Gdk::Cursor cursor(Gdk::WATCH);
                const_cast<GView *>(this)->get_window()->set_cursor(cursor);
                const_cast<GView *>(this)->set_sensitive(false);
@@ -204,7 +209,7 @@ void GView::busy(bool yes) const
 
 void GView::clearMessage()
 {
-       message(getLyXFunc().viewStatusMessage());
+       message(lyx::from_utf8(getLyXFunc().viewStatusMessage()));
 }
 
 
@@ -215,5 +220,10 @@ bool GView::hasFocus() const
 }
 
 
+Toolbars::ToolbarPtr GView::makeToolbar(ToolbarBackend::Toolbar const & tbb)
+{
+       return make_toolbar(tbb, *this);
+}
+
 } // namespace frontend
 } // namespace lyx