mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
More very minor syncing ..
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4375 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ab5f0efdcb
commit
6da2c4d96d
@ -1,3 +1,12 @@
|
||||
2002-06-12 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* intl.C:
|
||||
* intl.h:
|
||||
* kbmap.C:
|
||||
* kbsequence.C:
|
||||
* lyx_cb.C:
|
||||
* lyx_main.C: minor tidy
|
||||
|
||||
2002-06-12 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* BufferView_pimpl.h:
|
||||
|
@ -1,3 +1,12 @@
|
||||
2002-06-12 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* ColorHandler.C:
|
||||
* FontInfo.h:
|
||||
* FormBase.C:
|
||||
* FormBaseDeprecated.C:
|
||||
* MathsSymbols.C:
|
||||
* Menubar_pimpl.C: minor cleanups
|
||||
|
||||
2002-06-12 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* xformsGImage.C:
|
||||
|
@ -18,28 +18,26 @@
|
||||
#include "gettext.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "frontends/GUIRunTime.h"
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/scoped_array.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::pow;
|
||||
#endif
|
||||
|
||||
using std::endl;
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
LyXColorHandler::LyXColorHandler()
|
||||
{
|
||||
display = GUIRunTime::x11Display();
|
||||
display = fl_get_display();
|
||||
drawable = XCreatePixmap(display,
|
||||
RootWindow(display, GUIRunTime::x11Screen()),
|
||||
10, 10,
|
||||
GUIRunTime::x11VisualDepth());
|
||||
RootWindow(display, fl_screen),
|
||||
10, 10, fl_get_visual_depth());
|
||||
|
||||
colormap = GUIRunTime::x11Colormap();
|
||||
colormap = fl_state[fl_get_vclass()].colormap;
|
||||
// Clear the GC cache
|
||||
for (int i = 0; i <= LColor::ignore; ++i) {
|
||||
colorGCcache[i] = 0;
|
||||
|
@ -88,4 +88,5 @@ private:
|
||||
/// Build newly sized font string
|
||||
string const resize(string const &, int size) const;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // FONTINFO_H
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "FormBase.h"
|
||||
#include "xformsBC.h"
|
||||
#include "xforms_resize.h"
|
||||
#include "GUIRunTime.h"
|
||||
#include "Tooltips.h"
|
||||
#include "support/LAssert.h"
|
||||
|
||||
@ -118,7 +117,6 @@ void FormBase::hide()
|
||||
// So we try to clear out motion events in the queue before the
|
||||
// DestroyNotify
|
||||
XSync(fl_get_display(), false);
|
||||
GUIRunTime::processEvents();
|
||||
|
||||
if (form() && form()->visible)
|
||||
fl_hide_form(form());
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "FormBaseDeprecated.h"
|
||||
#include "xformsBC.h"
|
||||
#include "xforms_resize.h"
|
||||
#include "GUIRunTime.h"
|
||||
#include "Tooltips.h"
|
||||
#include "lyxrc.h"
|
||||
|
||||
@ -140,7 +139,6 @@ void FormBaseDeprecated::hide()
|
||||
// So we try to clear out motion events in the queue before the
|
||||
// DestroyNotify
|
||||
XSync(fl_get_display(), false);
|
||||
GUIRunTime::processEvents();
|
||||
|
||||
if (form() && form()->visible) {
|
||||
// some dialogs might do things to the form first
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "debug.h"
|
||||
#include "MathsSymbols.h"
|
||||
#include "GUIRunTime.h"
|
||||
|
||||
using std::max;
|
||||
using std::endl;
|
||||
@ -30,6 +29,8 @@ using std::ostream;
|
||||
using std::strstr;
|
||||
#endif
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
/* Latex code for those bitmaps */
|
||||
|
||||
#include "greek.xbm"
|
||||
@ -384,7 +385,7 @@ static char const ** pixmapFromBitmapData(char const * s, int wx, int hx)
|
||||
}
|
||||
int ww = w / dw;
|
||||
int hh = h / dh;
|
||||
XImage * xima = XCreateImage(GUIRunTime::x11Display(), 0, 1, XYBitmap, 0,
|
||||
XImage * xima = XCreateImage(fl_get_display(), 0, 1, XYBitmap, 0,
|
||||
const_cast<char*>(reinterpret_cast<char const *>(bdata)), w, h, 8, 0);
|
||||
xima->byte_order = LSBFirst;
|
||||
xima->bitmap_bit_order = LSBFirst;
|
||||
@ -393,7 +394,7 @@ static char const ** pixmapFromBitmapData(char const * s, int wx, int hx)
|
||||
if (ww > wx) ww = wx;
|
||||
if (hh > hx) hh = hx;
|
||||
XImage * sbima = XSubImage(xima, x, y, ww, hh);
|
||||
XpmCreateDataFromImage(GUIRunTime::x11Display(), const_cast<char***>(&data), sbima, sbima, 0);
|
||||
XpmCreateDataFromImage(fl_get_display(), const_cast<char***>(&data), sbima, sbima, 0);
|
||||
|
||||
// Dirty hack to get blue symbols quickly
|
||||
char * sx = const_cast<char*>(strstr(data[2], "FFFFFFFF"));
|
||||
|
@ -157,10 +157,9 @@ void Menubar::Pimpl::makeMenubar(Menu const & menu)
|
||||
|
||||
void Menubar::Pimpl::set(string const & menu_name)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Entering Menubar::Pimpl::set "
|
||||
<< "for menu `" << menu_name << "'" << endl;
|
||||
if (menu_name == current_menu_name_)
|
||||
return;
|
||||
|
||||
if (menu_name != current_menu_name_) {
|
||||
MenubarMap::iterator mbit = menubarmap_.find(menu_name);
|
||||
|
||||
if (mbit == menubarmap_.end()) {
|
||||
@ -182,9 +181,6 @@ void Menubar::Pimpl::set(string const & menu_name)
|
||||
current_group_ = mbit->second;
|
||||
lyxerr[Debug::GUI] << "Menubar::Pimpl::set: Menubar set."
|
||||
<< endl;
|
||||
} else
|
||||
lyxerr [Debug::GUI] << "Menubar::Pimpl::set: Nothing to do."
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
|
17
src/intl.C
17
src/intl.C
@ -1,15 +1,10 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
/**
|
||||
* \file intl.C
|
||||
* Copyright 1995-2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
* ====================================================== */
|
||||
|
||||
/*
|
||||
* International support for LyX
|
||||
* \author unknown
|
||||
* \author John Levon <moz@compsoc.man.ac.uk>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
15
src/intl.h
15
src/intl.h
@ -1,5 +1,14 @@
|
||||
// -*- C++ -*-
|
||||
/* International support for LyX */
|
||||
/**
|
||||
* \file intl.h
|
||||
* Copyright 1995-2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author unknown
|
||||
* \author John Levon <moz@compsoc.man.ac.uk>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef INTL_H
|
||||
#define INTL_H
|
||||
|
||||
@ -11,6 +20,10 @@
|
||||
#include "trans_mgr.h"
|
||||
|
||||
|
||||
/**
|
||||
* This class is used for managing keymaps
|
||||
* for composing characters in LyX.
|
||||
*/
|
||||
class Intl {
|
||||
public:
|
||||
/// which keymap is currently used ?
|
||||
|
19
src/kbmap.C
19
src/kbmap.C
@ -1,17 +1,14 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
/**
|
||||
* \file kbmap.C
|
||||
* Copyright 1995-2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
* ====================================================== */
|
||||
* \author unknown
|
||||
* \author John Levon <moz@compsoc.man.ac.uk>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
@ -21,6 +18,8 @@
|
||||
#include "kbsequence.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
using std::endl;
|
||||
|
||||
// The only modifiers that we handle. We want to throw away things
|
||||
|
@ -1,16 +1,12 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
/**
|
||||
* \file kbsequence.C
|
||||
* Copyright 1995-2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
* ====================================================== */
|
||||
* \author John Levon <moz@compsoc.man.ac.uk>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
//#include <cstring>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "gettext.h"
|
||||
|
||||
@ -24,6 +20,7 @@
|
||||
#include "commandtags.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
using std::make_pair;
|
||||
using std::vector;
|
||||
@ -67,6 +64,7 @@ string::size_type kb_sequence::parse(string const & s)
|
||||
string::size_type i = 0;
|
||||
key_modifier::state mod = key_modifier::none;
|
||||
key_modifier::state nmod = key_modifier::none;
|
||||
|
||||
while (i < s.length()) {
|
||||
if (s[i] == ' ')
|
||||
++i;
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include "frontends/Alert.h"
|
||||
#include "frontends/FileDialog.h"
|
||||
#include "frontends/GUIRunTime.h"
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "support/FileInfo.h"
|
||||
#include "support/filetools.h"
|
||||
@ -81,9 +81,6 @@ void ShowMessage(Buffer const * buf,
|
||||
// should be moved to lyxfunc.C
|
||||
bool MenuWrite(BufferView * bv, Buffer * buffer)
|
||||
{
|
||||
// FIXME: needed ?
|
||||
XFlush(GUIRunTime::x11Display());
|
||||
|
||||
if (!buffer->save()) {
|
||||
if (Alert::askQuestion(_("Save failed. Rename and try again?"),
|
||||
MakeDisplayPath(buffer->fileName(), 50),
|
||||
|
@ -1,12 +1,10 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
/**
|
||||
* \file lyx_main.C
|
||||
* Copyright 1995-2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
* ====================================================== */
|
||||
* \author unknown
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <version.h>
|
||||
@ -62,9 +60,8 @@ extern void QuitLyX();
|
||||
string system_lyxdir;
|
||||
string build_lyxdir;
|
||||
string system_tempdir;
|
||||
string user_lyxdir; // Default $HOME/.lyx
|
||||
string user_lyxdir;
|
||||
|
||||
// Should this be kept global? Asger says Yes.
|
||||
DebugStream lyxerr;
|
||||
|
||||
boost::scoped_ptr<LastFiles> lastfiles;
|
||||
|
Loading…
Reference in New Issue
Block a user