]> git.lyx.org Git - features.git/commitdiff
even more unicode work...
authorAbdelrazak Younes <younes@lyx.org>
Mon, 9 Oct 2006 13:28:32 +0000 (13:28 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 9 Oct 2006 13:28:32 +0000 (13:28 +0000)
qt3 and gtk not guaranted to compile nor work.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15288 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/BCView.h
src/frontends/controllers/BCView.tmpl
src/frontends/gtk/GBC.C
src/frontends/gtk/GBC.h
src/frontends/qt3/Qt2BC.C
src/frontends/qt3/Qt2BC.h
src/frontends/qt4/Qt2BC.C
src/frontends/qt4/Qt2BC.h

index 00f9d4a153ca90c6cd403f18bb88c1443f302123..c90f66ec5b341f438dee0de11340ded8bcbe6cf5 100644 (file)
 #ifndef BCVIEW_H
 #define BCVIEW_H
 
+#include "support/docstring.h"
+
 #include <boost/shared_ptr.hpp>
 #include <list>
-#include <string>
 
 namespace lyx {
 namespace frontend {
@@ -94,7 +95,7 @@ class GuiBC : public BCView {
 public:
        ///
        GuiBC(ButtonController const & parent,
-             std::string const & cancel, std::string const & close);
+             lyx::docstring const & cancel, lyx::docstring const & close);
 
        //@{
        /** Store pointers to these widgets. The pointers are _not_
@@ -123,10 +124,10 @@ private:
        /// Enable/Disable a button
        virtual void setButtonEnabled(Button * obj, bool enable) const = 0;
        /// Set the Label on the button
-       virtual void setButtonLabel(Button * obj, std::string const & label) const = 0;
+       virtual void setButtonLabel(Button * obj, lyx::docstring const & label) const = 0;
 
-       std::string const cancel_label_;
-       std::string const close_label_;
+       lyx::docstring const cancel_label_;
+       lyx::docstring const close_label_;
 
        Button * okay_;
        Button * apply_;
index cb7f895fc3d783c444b63f3e1018af1ec9059c21..c8567f01d405b96f44c51471dea8c84e56d6c08a 100644 (file)
@@ -23,7 +23,7 @@ namespace frontend {
 
 template <class Button, class Widget>
 GuiBC<Button, Widget>::GuiBC(ButtonController const & parent,
-                            std::string const & cancel, std::string const & close)
+                            lyx::docstring const & cancel, lyx::docstring const & close)
        : BCView(parent),
          cancel_label_(cancel), close_label_(close),
          okay_(0), apply_(0), cancel_(0), restore_(0)
index 8f238db65913bbb59c4964e58bac7636be2d6404..68605830810c81cd4b38482504773bf72a89895c 100644 (file)
 
 #include "GBC.h"
 
-using std::string;
+using lyx::docstring;
 
 namespace lyx {
 namespace frontend {
 
 GBC::GBC(ButtonController const & parent,
-        string const & cancel, string const & close)
+        docstring const & cancel, docstring const & close)
        : GuiBC<Gtk::Button, Gtk::Widget>(parent, cancel, close)
 {
 }
@@ -44,11 +44,11 @@ void GBC::setWidgetEnabled(Gtk::Widget * widget, bool enabled) const
 }
 
 
-void GBC::setButtonLabel(Gtk::Button * btn, string const & label) const
+void GBC::setButtonLabel(Gtk::Button * btn, docstring const & label) const
 {
        // GTK+ Stock buttons take precedence
        if (!btn->get_use_stock())
-               btn->set_label(Glib::locale_to_utf8(label));
+               btn->set_label(label);
 }
 
 } // namespace frontend
index 9990830275b12b9d71fec60eca506a23fcf29620..a8527950137b6bcf818f76e78765eaeb53c6ce3c 100644 (file)
@@ -24,8 +24,8 @@ namespace frontend {
 class GBC : public GuiBC<Gtk::Button, Gtk::Widget> {
 public:
        GBC(ButtonController const & parent,
-           std::string const & cancel = lyx::to_utf8(_("Cancel")),
-           std::string const & close = lyx::to_utf8(_("Close")));
+           lyx::docstring const & cancel = _("Cancel"),
+           lyx::docstring const & close = _("Close"));
 private:
        /// Updates the button sensitivity (enabled/disabled)
        void setButtonEnabled(Gtk::Button *, bool enabled) const;
@@ -34,7 +34,7 @@ private:
        void setWidgetEnabled(Gtk::Widget *, bool enabled) const;
 
        /// Set the label on the button
-       void setButtonLabel(Gtk::Button *, std::string const & label) const;
+       void setButtonLabel(Gtk::Button *, lyx::docstring const & label) const;
 };
 
 } // namespace frontend
index 3902338784f9897703cfc8c5b50990bc1ca9e219..e290042ae3f703f2a3a2e22356ab642a4af358a1 100644 (file)
 #include <qbutton.h>
 #include <qlineedit.h>
 
-using std::string;
+using lyx::docstring;
 
 namespace lyx {
 namespace frontend {
 
 Qt2BC::Qt2BC(ButtonController const & parent,
-            string const & cancel, string const & close)
+            docstring const & cancel, docstring const & close)
        : GuiBC<QButton, QWidget>(parent, cancel, close)
 {}
 
@@ -50,7 +50,7 @@ void Qt2BC::setWidgetEnabled(QWidget * obj, bool enabled) const
 }
 
 
-void Qt2BC::setButtonLabel(QButton * obj, string const & label) const
+void Qt2BC::setButtonLabel(QButton * obj, docstring const & label) const
 {
        obj->setText(toqstr(label));
 }
index 8b838e7ee1a035aafad16274483dc075eb31691b..7a140868f3dac5fef30120fbdca26b9b40b3cec3 100644 (file)
@@ -33,8 +33,8 @@ class Qt2BC : public GuiBC<QButton, QWidget> {
 public:
        ///
        Qt2BC(ButtonController const &,
-             std::string const & = lyx::to_utf8(_("Cancel")),
-             std::string const & = lyx::to_utf8(_("Close")));
+             lyx::docstring const & = _("Cancel"),
+             lyx::docstring const & = _("Close"));
 private:
        /// Updates the button sensitivity (enabled/disabled)
        void setButtonEnabled(QButton *, bool enabled) const;
@@ -43,7 +43,7 @@ private:
        void setWidgetEnabled(QWidget *, bool enabled) const;
 
        /// Set the label on the button
-       void setButtonLabel(QButton *, std::string const & label) const;
+       void setButtonLabel(QButton *, lyx::docstring const & label) const;
 };
 
 } // namespace frontend
index d38fdf3be0d1ff8cb2d40ff4e23dcf5244183c76..be3c9b722e37a217cf592e2c8798058cf5d0a127 100644 (file)
 #include <QPushButton>
 #include <QLineEdit>
 
-using std::string;
+using lyx::docstring;
 
 namespace lyx {
 namespace frontend {
 
 Qt2BC::Qt2BC(ButtonController const & parent,
-            string const & cancel, string const & close)
+            docstring const & cancel, docstring const & close)
        : GuiBC<QPushButton, QWidget>(parent, cancel, close)
 {}
 
@@ -50,7 +50,7 @@ void Qt2BC::setWidgetEnabled(QWidget * obj, bool enabled) const
 }
 
 
-void Qt2BC::setButtonLabel(QPushButton * obj, string const & label) const
+void Qt2BC::setButtonLabel(QPushButton * obj, docstring const & label) const
 {
        obj->setText(toqstr(label));
 }
index a851a118f1c456c50fa59d2a43c2b07ee13f663b..e71a16a1cfaf0d1ae670a973c1738ed2bba930fb 100644 (file)
@@ -33,8 +33,8 @@ class Qt2BC : public GuiBC<QPushButton, QWidget> {
 public:
        ///
        Qt2BC(ButtonController const &,
-             std::string const & = lyx::to_utf8(_("Cancel")),
-             std::string const & = lyx::to_utf8(_("Close")));
+             lyx::docstring const & = _("Cancel"),
+             lyx::docstring const & = _("Close"));
 private:
        /// Updates the button sensitivity (enabled/disabled)
        void setButtonEnabled(QPushButton *, bool enabled) const;
@@ -43,7 +43,7 @@ private:
        void setWidgetEnabled(QWidget *, bool enabled) const;
 
        /// Set the label on the button
-       void setButtonLabel(QPushButton *, std::string const & label) const;
+       void setButtonLabel(QPushButton *, lyx::docstring const & label) const;
 };
 
 } // namespace frontend