]> git.lyx.org Git - features.git/commitdiff
convert tooltips to unicode
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 18 Oct 2006 20:51:16 +0000 (20:51 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 18 Oct 2006 20:51:16 +0000 (20:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15365 a592a061-630c-0410-9148-cb99ea01b6c8

src/ToolbarBackend.C
src/ToolbarBackend.h
src/frontends/gtk/GToolbar.C
src/frontends/qt3/QLToolbar.C
src/frontends/qt4/QLToolbar.C

index b4cd8042fe8bc3377b10e15b0e5c3e7943bc1786..a1f2ffa637870d2af7bd8dca0cbf089ccafa4c12 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "frontends/controllers/ControlMath.h"
 
+using lyx::docstring;
 using lyx::support::compare_ascii_no_case;
 using lyx::support::getVectorFromString;
 using lyx::support::libFileSearch;
@@ -94,7 +95,7 @@ void ToolbarBackend::read(LyXLex & lex)
                switch (lex.lex()) {
                case TO_ADD:
                        if (lex.next(true)) {
-                               string const tooltip = lyx::to_utf8(_(lex.getString()));
+                               docstring const tooltip = _(lex.getString());
                                lex.next(true);
                                string const func_arg = lex.getString();
                                lyxerr[Debug::PARSER]
@@ -204,7 +205,7 @@ void ToolbarBackend::readToolbars(LyXLex & lex)
 
 
 void ToolbarBackend::add(Toolbar & tb,
-                        FuncRequest const & func, string const & tooltip)
+                        FuncRequest const & func, docstring const & tooltip)
 {
        tb.items.push_back(make_pair(func, tooltip));
        tb.items.back().first.origin = FuncRequest::UI;
index 8169ea910a9f60d4541cf84c06f1f8a14a025791..59f1ee65ca5221f18e3706128fe2aa1264bde75e 100644 (file)
@@ -35,7 +35,7 @@ public:
        };
 
        /// action, tooltip
-       typedef std::pair<FuncRequest, std::string> Item;
+       typedef std::pair<FuncRequest, lyx::docstring> Item;
 
        /// the toolbar items
        typedef std::vector<Item> Items;
@@ -91,7 +91,7 @@ public:
 private:
        /// add the given lfun with tooltip if relevant
        void add(Toolbar & tb, FuncRequest const &,
-                std::string const & tooltip = std::string());
+                lyx::docstring const & tooltip = lyx::docstring());
 
        /// all the toolbars
        Toolbars toolbars;
index f87119a88d7797700eb9b445ae0e56c3279a3029..8ada3e7b541c49e2300fc532254885b58f0660a4 100644 (file)
@@ -197,7 +197,7 @@ GToolbar::GToolbar(ToolbarBackend::Toolbar const & tbb, LyXView & owner)
        ToolbarBackend::item_iterator it = tbb.items.begin();
        ToolbarBackend::item_iterator end = tbb.items.end();
        for (; it != end; ++it)
-               add(it->first, lyx::from_utf8(it->second));
+               add(it->first, it->second);
 
        toolbar_.set_toolbar_style(Gtk::TOOLBAR_ICONS);
        toolbar_.show_all();
index c10210d55a8553bb04d700adf27ae026d1e8943f..41bb62a8790ade259ac06c151428f5e0b622ae0c 100644 (file)
@@ -174,7 +174,7 @@ QLToolbar::QLToolbar(ToolbarBackend::Toolbar const & tbb, LyXView & owner)
        ToolbarBackend::item_iterator it = tbb.items.begin();
        ToolbarBackend::item_iterator end = tbb.items.end();
        for (; it != end; ++it)
-               add(it->first, lyx::from_utf8(it->second));
+               add(it->first, it->second);
 }
 
 
index 311646b5c78c02a622731982b5141a9cc9b0c9a4..b7761fee33ec6b8256ce8c345e46e7e0b0f999e8 100644 (file)
@@ -158,9 +158,8 @@ QLToolbar::QLToolbar(ToolbarBackend::Toolbar const & tbb, GuiView & owner)
 
        ToolbarBackend::item_iterator it = tbb.items.begin();
        ToolbarBackend::item_iterator end = tbb.items.end();
-       // FIXME UNICODE: ToolbarBackend!!!
        for (; it != end; ++it)
-               add(it->first, lyx::from_utf8(it->second));
+               add(it->first, it->second);
 }