OK, there's a couple of things badly wrong with lyxkeysym and I don't
know how they should be fixed.

1) I don't know how to return a suitable local encoding of the symbol -
I need to know what the encoding /is/ first, in order to convert it from
QString's unicode

2) it is not possible to convert from lyx core's "symbolname" into a
QLyXKeySym - observe horrible hack in operator== to get around this.
This interface is back-to-front

3) it's REALLY hard to type "LyXKeySym" :)

The attached patch is needed to allow qt2 frontend compilation, in case
anybody is interested in playing around ...

regards
john

-- 
"If a thing is not diminished by being shared, it is not rightly owned if
 it is only owned & not shared."
        - St. Augustine
? a.diff
? qt-compile-hackery.diff
? frontends/qt2/a.diff
Index: Makefile.am
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/Makefile.am,v
retrieving revision 1.131
diff -u -r1.131 Makefile.am
--- Makefile.am 14 Jun 2002 16:08:31 -0000      1.131
+++ Makefile.am 19 Jun 2002 05:21:47 -0000
@@ -40,7 +40,7 @@
        tracer.C \
        tracer.h
 
-INCLUDES = $(SIGC_CFLAGS) $(BOOST_INCLUDES) $(PSPELL_INCLUDES)
+INCLUDES = $(SIGC_CFLAGS) $(BOOST_INCLUDES) $(PSPELL_INCLUDES) $(FRONTEND_INCLUDES) 
+-Ifrontends/
 #INCLUDES = $(BOOST_INCLUDES) $(PSPELL_INCLUDES)
 
 localedir = $(datadir)/locale
Index: lyxfunc.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.325
diff -u -r1.325 lyxfunc.C
--- lyxfunc.C   18 Jun 2002 20:47:47 -0000      1.325
+++ lyxfunc.C   19 Jun 2002 05:21:53 -0000
@@ -20,7 +20,7 @@
 #include "lyxrow.h"
 #include "bufferlist.h"
 #include "BufferView.h"
-#include "frontends/xforms/ColorHandler.h"
+//#include "frontends/xforms/ColorHandler.h"
 #include "lyxserver.h"
 #include "intl.h"
 #include "lyx_main.h"
@@ -41,7 +41,6 @@
 #include "converter.h"
 #include "exporter.h"
 #include "importer.h"
-#include "frontends/font_loader.h"
 #include "TextCache.h"
 #include "lyxfind.h"
 #include "undo_funcs.h"
@@ -100,6 +99,7 @@
 #include <utility>
 #include <algorithm>
 
+#include "frontends/font_loader.h"
 
 using std::pair;
 using std::make_pair;
@@ -1629,7 +1629,7 @@
                        break;
                }
 
-               lyxColorHandler->updateColor(lcolor.getFromLyXName(lyx_name));
+               //lyxColorHandler->updateColor(lcolor.getFromLyXName(lyx_name));
 
                if (graphicsbg_changed) {
                        grfx::GCache & gc = grfx::GCache::get();
Index: minibuffer.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/minibuffer.C,v
retrieving revision 1.54
diff -u -r1.54 minibuffer.C
--- minibuffer.C        10 Jun 2002 07:57:36 -0000      1.54
+++ minibuffer.C        19 Jun 2002 05:21:55 -0000
@@ -295,8 +295,8 @@
        text.erase();
        set_input("");
        activate();
-       fl_set_focus_object(static_cast<XFormsView *>(owner_)->getForm(),
-                           the_buffer);
+       //fl_set_focus_object(static_cast<XFormsView *>(owner_)->getForm(),
+       //                  the_buffer);
 }
 
 
@@ -325,6 +325,8 @@
 
 void MiniBuffer::message(string const & str)
 {
+       return;
+ 
        timer->restart();
        string const ntext = strip(str);
        if (!the_buffer->focus) {
@@ -336,6 +338,8 @@
 
 void MiniBuffer::messagePush(string const & str)
 {
+       return;
+ 
        text_stored = text;
        message(str);
 }
@@ -343,6 +347,8 @@
 
 void MiniBuffer::messagePop()
 {
+       return;
+ 
        if (!text_stored.empty()) {
                message(text_stored);
                text_stored.erase();
@@ -352,6 +358,8 @@
 
 void MiniBuffer::addSet(string const & s1, string const & s2)
 {
+       return;
+ 
        string const str = text + ' ' +  s1 + ' ' + s2;
        message(str);
 }
@@ -361,6 +369,8 @@
                           vector<string> const & completion,
                           vector<string> & history)
 {
+       return;
+ 
        state_ = spaces;
        completion_ = completion;
        history_ = &history;
Index: frontends/font_loader.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/font_loader.h,v
retrieving revision 1.1
diff -u -r1.1 font_loader.h
--- frontends/font_loader.h     24 May 2002 18:24:13 -0000      1.1
+++ frontends/font_loader.h     19 Jun 2002 05:21:55 -0000
@@ -1,3 +1,4 @@
 // very temporary
 
-#include "xforms/xfont_loader.h"
+//#include "xforms/xfont_loader.h"
+#include "qt2/qfont_loader.h"
Index: mathed/Makefile.am
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/Makefile.am,v
retrieving revision 1.93
diff -u -r1.93 Makefile.am
--- mathed/Makefile.am  18 Jun 2002 15:44:29 -0000      1.93
+++ mathed/Makefile.am  19 Jun 2002 05:21:57 -0000
@@ -2,7 +2,7 @@
 
 noinst_LTLIBRARIES = libmathed.la
 
-INCLUDES = -I$(srcdir)/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES)
+INCLUDES = -I$(srcdir)/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES) -I$(srcdir)/../frontends/ 
+$(FRONTEND_INCLUDES)
 
 libmathed_la_SOURCES = \
        preview.h \

Reply via email to