Applied fixes for AIX (GTK 1.0 compilation).

Removed ostream from property classes.
  Removed Lisp output from wxExpr.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-06-28 13:22:00 +00:00
parent 64be695894
commit c693edf3bc
21 changed files with 377 additions and 253 deletions

View File

@@ -75,7 +75,7 @@ public:
void SetBitmapLabel( const wxBitmap& bitmap ); void SetBitmapLabel( const wxBitmap& bitmap );
void SetBitmapSelected( const wxBitmap& bitmap ); void SetBitmapSelected( const wxBitmap& bitmap );
virtual bool Enable(const bool); virtual bool Enable(bool enable);
// implementation // implementation

View File

@@ -75,7 +75,7 @@ public:
void SetBitmapLabel( const wxBitmap& bitmap ); void SetBitmapLabel( const wxBitmap& bitmap );
void SetBitmapSelected( const wxBitmap& bitmap ); void SetBitmapSelected( const wxBitmap& bitmap );
virtual bool Enable(const bool); virtual bool Enable(bool enable);
// implementation // implementation

View File

@@ -67,9 +67,6 @@ class WXDLLEXPORT wxPropertySheet: public wxObject
// Clear all properties // Clear all properties
virtual void Clear(void); virtual void Clear(void);
virtual bool Save(ostream& str);
virtual bool Load(ostream& str);
virtual void UpdateAllViews(wxPropertyView *thisView = NULL); virtual void UpdateAllViews(wxPropertyView *thisView = NULL);
inline virtual wxList& GetProperties(void) const { return (wxList&) m_properties; } inline virtual wxList& GetProperties(void) const { return (wxList&) m_properties; }
@@ -231,8 +228,8 @@ class WXDLLEXPORT wxPropertyValue: public wxObject
virtual wxPropertyValue *NewCopy(void) const; virtual wxPropertyValue *NewCopy(void) const;
virtual void Copy(wxPropertyValue& copyFrom); virtual void Copy(wxPropertyValue& copyFrom);
virtual void WritePropertyClause(ostream& stream); // Write this expression as a top-level clause virtual void WritePropertyClause(wxString &stream); // Write this expression as a top-level clause
virtual void WritePropertyType(ostream& stream); // Write as any other subexpression virtual void WritePropertyType(wxString &stream); // Write as any other subexpression
// Append an expression to a list // Append an expression to a list
virtual void Append(wxPropertyValue *expr); virtual void Append(wxPropertyValue *expr);

View File

@@ -141,7 +141,6 @@ class WXDLLEXPORT wxExpr
bool IsFunctor(const wxString& s) const; // Only for a clause bool IsFunctor(const wxString& s) const; // Only for a clause
void WriteClause(FILE* stream); // Write this expression as a top-level clause void WriteClause(FILE* stream); // Write this expression as a top-level clause
void WriteExpr(FILE* stream); // Write as any other subexpression void WriteExpr(FILE* stream); // Write as any other subexpression
void WriteLispExpr(FILE* stream);
// Append an expression to a list // Append an expression to a list
void Append(wxExpr *expr); void Append(wxExpr *expr);
@@ -243,7 +242,6 @@ public:
bool ReadFromString(const wxString& buffer); bool ReadFromString(const wxString& buffer);
bool Write(const wxString& fileName); bool Write(const wxString& fileName);
bool Write(FILE* stream); bool Write(FILE* stream);
void WriteLisp(FILE* stream);
// Compatibility // Compatibility
inline bool ReadProlog(wxChar *filename) { return Read(wxString(filename)); } inline bool ReadProlog(wxChar *filename) { return Read(wxString(filename)); }

View File

@@ -39,7 +39,6 @@
#include "wx/button.h" #include "wx/button.h"
#include "wx/bmpbuttn.h" #include "wx/bmpbuttn.h"
#include "wx/radiobox.h" #include "wx/radiobox.h"
#include "wx/radiobut.h"
#include "wx/listbox.h" #include "wx/listbox.h"
#include "wx/choice.h" #include "wx/choice.h"
#include "wx/checkbox.h" #include "wx/checkbox.h"
@@ -48,15 +47,13 @@
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/statbox.h" #include "wx/statbox.h"
#include "wx/statbmp.h" #include "wx/statbmp.h"
#if wxUSE_GAUGE
#include "wx/gauge.h" #include "wx/gauge.h"
#endif
#include "wx/textctrl.h" #include "wx/textctrl.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/intl.h" #include "wx/intl.h"
#endif #endif
#if wxUSE_RADIOBUTTON #if wxUSE_RADIOBTN
#include "wx/radiobut.h" #include "wx/radiobut.h"
#endif #endif
@@ -373,7 +370,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
((wxGauge *)control)->SetValue((int)childResource->GetValue1()); ((wxGauge *)control)->SetValue((int)childResource->GetValue1());
} }
#endif #endif
#if wxUSE_RADIOBUTTON #if wxUSE_RADIOBTN
else if (itemType == wxString(_T("wxRadioButton"))) else if (itemType == wxString(_T("wxRadioButton")))
{ {
control = new wxRadioButton(parent, id, childResource->GetTitle(), // (int)childResource->GetValue1(), control = new wxRadioButton(parent, id, childResource->GetTitle(), // (int)childResource->GetValue1(),
@@ -862,7 +859,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
} }
} }
#if wxUSE_RADIOBUTTON #if wxUSE_RADIOBTN
else if (controlType == _T("wxRadioButton")) else if (controlType == _T("wxRadioButton"))
{ {
// Check for default value // Check for default value

View File

@@ -796,54 +796,6 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression
} }
} }
void wxExpr::WriteLispExpr(FILE* stream)
{
switch (type)
{
case wxExprInteger:
{
fprintf( stream, "%ld", value.integer );
break;
}
case wxExprReal:
{
fprintf( stream, "%.6g", value.real );
break;
}
case wxExprString:
{
fprintf( stream, "\"" );
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.string);
fprintf( stream, (const char*) val );
fprintf( stream, "\"" );
break;
}
case wxExprWord:
{
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.word);
fprintf( stream, (const char*) val );
break;
}
case wxExprList:
{
wxExpr *expr = value.first;
fprintf( stream, "(" );
while (expr)
{
expr->WriteLispExpr(stream);
expr = expr->next;
if (expr)
fprintf( stream, " " );
}
fprintf( stream, ")" );
break;
}
case wxExprNull: break;
}
}
/* /*
* wxExpr 'database' (list of expressions) * wxExpr 'database' (list of expressions)
*/ */
@@ -1095,19 +1047,6 @@ bool wxExprDatabase::Write(FILE *stream)
return (noErrors == 0); return (noErrors == 0);
} }
void wxExprDatabase::WriteLisp(FILE* stream)
{
noErrors = 0;
wxNode *node = First();
while (node)
{
wxExpr *expr = (wxExpr *)node->Data();
expr->WriteLispExpr(stream);
fprintf( stream, "\n\n" );
node = node->Next();
}
}
void add_expr(wxExpr * expr) void add_expr(wxExpr * expr)
{ {
thewxExprDatabase->Append(expr); thewxExprDatabase->Append(expr);

View File

@@ -24,26 +24,14 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#include "wx/debug.h"
#include "wx/prop.h"
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#if wxUSE_IOSTREAMH
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
#include <strstrea.h>
#else
#include <strstream.h>
#endif
#else
#include <strstream>
#endif
#include "wx/window.h"
#include "wx/utils.h"
#include "wx/list.h"
#include "wx/debug.h"
#include "wx/prop.h"
IMPLEMENT_DYNAMIC_CLASS(wxPropertyValue, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxPropertyValue, wxObject)
@@ -457,7 +445,7 @@ int wxPropertyValue::Number(void) const
return i; return i;
} }
void wxPropertyValue::WritePropertyClause(ostream& stream) // Write this expression as a top-level clause void wxPropertyValue::WritePropertyClause(wxString& stream) // Write this expression as a top-level clause
{ {
if (m_type != wxPropertyValueList) if (m_type != wxPropertyValueList)
return; return;
@@ -466,86 +454,73 @@ void wxPropertyValue::WritePropertyClause(ostream& stream) // Write this expres
if (node) if (node)
{ {
node->WritePropertyType(stream); node->WritePropertyType(stream);
stream << "("; stream.Append( _T("(") );
node = node->m_next; node = node->m_next;
bool first = TRUE; bool first = TRUE;
while (node) while (node)
{ {
if (!first) if (!first)
stream << " "; stream.Append( _T(" ") );
node->WritePropertyType(stream); node->WritePropertyType(stream);
node = node->m_next; node = node->m_next;
if (node) stream << ",\n"; if (node)
stream.Append( _T(",\n" ) );
first = FALSE; first = FALSE;
} }
stream << ").\n\n"; stream.Append( _T(").\n\n") );
} }
} }
void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any other subexpression void wxPropertyValue::WritePropertyType(wxString& stream) // Write as any other subexpression
{ {
wxString tmp;
switch (m_type) switch (m_type)
{ {
case wxPropertyValueInteger: case wxPropertyValueInteger:
{ {
stream << m_value.integer; tmp.Printf( _T("%ld"), m_value.integer );
stream.Append( tmp );
break; break;
} }
case wxPropertyValueIntegerPtr: case wxPropertyValueIntegerPtr:
{ {
stream << *m_value.integerPtr; tmp.Printf( _T("%ld"), *m_value.integerPtr );
stream.Append( tmp );
break; break;
} }
case wxPropertyValuebool: case wxPropertyValuebool:
{ {
if (m_value.integer) if (m_value.integer)
stream << "True"; stream.Append( _T("True") );
else else
stream << "False"; stream.Append( _T("False") );
break; break;
} }
case wxPropertyValueboolPtr: case wxPropertyValueboolPtr:
{ {
if (*m_value.integerPtr) if (*m_value.integerPtr)
stream << "True"; stream.Append( _T("True") );
else else
stream << "False"; stream.Append( _T("False") );
break; break;
} }
case wxPropertyValueReal: case wxPropertyValueReal:
{ {
float f = m_value.real; double d = m_value.real;
wxSprintf(wxBuffer, _T("%.6g"), (double)f); tmp.Printf( _T("%.6g"), d );
stream << wxBuffer; stream.Append( tmp );
break; break;
} }
case wxPropertyValueRealPtr: case wxPropertyValueRealPtr:
{ {
float f = *m_value.realPtr; double d = *m_value.realPtr;
/* Now the parser can cope with this. tmp.Printf( _T("%.6g"), d );
// Prevent printing in 'e' notation. Any better way? stream.Append( tmp );
if (fabs(f) < 0.00001)
f = 0.0;
*/
wxSprintf(wxBuffer, _T("%.6g"), f);
stream << wxBuffer;
break; break;
} }
case wxPropertyValueString: case wxPropertyValueString:
{ {
// stream << "\""; stream.Append( m_value.string );
int i;
const wxWX2MBbuf strbuf = wxConvCurrent->cWX2MB(m_value.string);
int len = strlen(strbuf);
for (i = 0; i < len; i++)
{
char ch = strbuf[i];
// if (ch == '"' || ch == '\\')
// stream << "\\";
stream << ch;
}
// stream << "\"";
break; break;
} }
case wxPropertyValueStringPtr: case wxPropertyValueStringPtr:
@@ -565,19 +540,20 @@ void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any othe
case wxPropertyValueList: case wxPropertyValueList:
{ {
if (!m_value.first) if (!m_value.first)
stream << "[]"; stream.Append( _T("[]") );
else else
{ {
wxPropertyValue *expr = m_value.first; wxPropertyValue *expr = m_value.first;
stream << "["; stream.Append( _T("[") );
while (expr) while (expr)
{ {
expr->WritePropertyType(stream); expr->WritePropertyType(stream);
expr = expr->m_next; expr = expr->m_next;
if (expr) stream << ", "; if (expr)
stream.Append( _T(", ") );
} }
stream << "]"; stream.Append( _T("]") );
} }
break; break;
} }
@@ -587,16 +563,9 @@ void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any othe
wxString wxPropertyValue::GetStringRepresentation(void) wxString wxPropertyValue::GetStringRepresentation(void)
{ {
char buf[500]; wxString str;
buf[0] = 0;
ostrstream str((char *)buf, (int)500, ios::out);
WritePropertyType(str); WritePropertyType(str);
str << '\0'; return str;
str.flush();
wxString theString(buf);
return theString;
} }
void wxPropertyValue::operator=(const wxPropertyValue& val) void wxPropertyValue::operator=(const wxPropertyValue& val)
@@ -952,16 +921,6 @@ wxPropertySheet::~wxPropertySheet(void)
Clear(); Clear();
} }
bool wxPropertySheet::Save( ostream& WXUNUSED(str) )
{
return FALSE;
}
bool wxPropertySheet::Load( ostream& WXUNUSED(str) )
{
return FALSE;
}
void wxPropertySheet::UpdateAllViews( wxPropertyView *WXUNUSED(thisView) ) void wxPropertySheet::UpdateAllViews( wxPropertyView *WXUNUSED(thisView) )
{ {
} }

View File

@@ -24,25 +24,13 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#include "wx/propform.h"
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#if wxUSE_IOSTREAMH
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
#include <strstrea.h>
#else
#include <strstream.h>
#endif
#else
#include <strstream>
#endif
#include "wx/window.h"
#include "wx/utils.h"
#include "wx/list.h"
#include "wx/propform.h"
/* /*
* Property view * Property view

View File

@@ -24,26 +24,14 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#include "wx/colordlg.h"
#include "wx/proplist.h"
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#if wxUSE_IOSTREAMH
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
#include <strstrea.h>
#else
#include <strstream.h>
#endif
#else
#include <strstream>
#endif
#include "wx/window.h"
#include "wx/utils.h"
#include "wx/list.h"
#include "wx/colordlg.h"
#include "wx/proplist.h"
/* /*
* Property text edit control * Property text edit control

View File

@@ -69,19 +69,28 @@ static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation
// "configure_event" // "configure_event"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static gint gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxDialog *win ) static gint
#if (GTK_MINOR_VERSON > 0)
gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxDialog *win )
#else
gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxDialog *win )
#endif
{ {
if (g_isIdle) if (g_isIdle)
wxapp_install_idle_handler(); wxapp_install_idle_handler();
if (!win->m_hasVMT) return FALSE; if (!win->m_hasVMT) return FALSE;
#if (GTK_MINOR_VERSON > 0)
int x = 0; int x = 0;
int y = 0; int y = 0;
gdk_window_get_root_origin( win->m_widget->window, &x, &y ); gdk_window_get_root_origin( win->m_widget->window, &x, &y );
win->m_x = x; win->m_x = x;
win->m_y = y; win->m_y = y;
#else
win->m_x = event->x;
win->m_y = event->y;
#endif
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() ); wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
mevent.SetEventObject( win ); mevent.SetEventObject( win );

View File

@@ -152,19 +152,28 @@ static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSE
// "configure_event" // "configure_event"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win ) static gint
#if (GTK_MINOR_VERSON > 0)
gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win )
#else
gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win )
#endif
{ {
if (g_isIdle) if (g_isIdle)
wxapp_install_idle_handler(); wxapp_install_idle_handler();
if (!win->m_hasVMT) return FALSE; if (!win->m_hasVMT) return FALSE;
#if (GTK_MINOR_VERSON > 0)
int x = 0; int x = 0;
int y = 0; int y = 0;
gdk_window_get_root_origin( win->m_widget->window, &x, &y ); gdk_window_get_root_origin( win->m_widget->window, &x, &y );
win->m_x = x; win->m_x = x;
win->m_y = y; win->m_y = y;
#else
win->m_x = event->x;
win->m_y = event->y;
#endif
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() ); wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
mevent.SetEventObject( win ); mevent.SetEventObject( win );

View File

@@ -520,7 +520,7 @@ bool wxNotebook::InsertPage( int position, wxWindow* win, const wxString& text,
else else
gtk_notebook_insert_page( notebook, win->m_widget, page->m_box, position ); gtk_notebook_insert_page( notebook, win->m_widget, page->m_box, position );
page->m_page = GTK_NOTEBOOK_PAGE( g_list_last(notebook->children)->data ); page->m_page = (GtkNotebookPage*) g_list_last(notebook->children)->data;
gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate", gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate",
GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win ); GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win );

View File

@@ -80,8 +80,8 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
wxToolBar *tb = tool->m_owner; wxToolBar *tb = tool->m_owner;
/* we grey-out the tip text of disabled tool */ #if (GTK_MINOR_VERSION == 0)
#if 0 /* we grey-out the tip text of disabled tool in GTK 1.0 */
if (tool->m_enabled) if (tool->m_enabled)
{ {
if (tb->m_fg->red != 0) if (tb->m_fg->red != 0)
@@ -91,17 +91,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
tb->m_fg->blue = 0; tb->m_fg->blue = 0;
gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg ); gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg );
#if (GTK_MINOR_VERSION > 0)
GtkStyle *g_style =
gtk_style_copy(
gtk_widget_get_style(
GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window ) );
g_style->fg[GTK_STATE_NORMAL] = *tb->m_fg;
gtk_widget_set_style( GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window, g_style );
#else
gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg ); gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg );
#endif
} }
} }
else else
@@ -112,17 +102,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
tb->m_fg->green = 33000; tb->m_fg->green = 33000;
tb->m_fg->blue = 33000; tb->m_fg->blue = 33000;
gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg ); gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg );
#if (GTK_MINOR_VERSION > 0)
GtkStyle *g_style =
gtk_style_copy(
gtk_widget_get_style(
GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window ) );
g_style->fg[GTK_STATE_NORMAL] = *tb->m_fg;
gtk_widget_set_style( GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window, g_style );
#else
gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg ); gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg );
#endif
} }
} }
#endif #endif
@@ -294,7 +274,9 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
mask = bitmap.GetMask()->GetBitmap(); mask = bitmap.GetMask()->GetBitmap();
tool_pixmap = gtk_pixmap_new( pixmap, mask ); tool_pixmap = gtk_pixmap_new( pixmap, mask );
#if (GTK_MINOR_VERSION > 0)
gtk_pixmap_set_build_insensitive( GTK_PIXMAP(tool_pixmap), TRUE ); gtk_pixmap_set_build_insensitive( GTK_PIXMAP(tool_pixmap), TRUE );
#endif
gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 ); gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 );
@@ -376,11 +358,12 @@ void wxToolBar::EnableTool(int toolIndex, bool enable)
{ {
tool->m_enabled = enable; tool->m_enabled = enable;
/* we don't disable the tools for now as the bitmaps don't get #if (GTK_MINOR_VERSION > 0)
greyed anyway and this also disables tooltips */ /* we don't disable the tools for GTK 1.0 as the bitmaps don't get
greyed anyway and this also disables tooltips */
if (tool->m_item) if (tool->m_item)
gtk_widget_set_sensitive( tool->m_item, enable ); gtk_widget_set_sensitive( tool->m_item, enable );
#endif
return; return;
} }

View File

@@ -15,13 +15,14 @@
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/list.h" #include "wx/list.h"
#include "wx/log.h"
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#ifdef __SVR4__ //#ifdef __SVR4__
#include <sys/systeminfo.h> //#include <sys/systeminfo.h>
#endif //#endif
#include "gdk/gdkx.h" // GDK_DISPLAY #include "gdk/gdkx.h" // GDK_DISPLAY
#include "gdk/gdkprivate.h" // gdk_progclass #include "gdk/gdkprivate.h" // gdk_progclass
@@ -30,7 +31,6 @@
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xresource.h> #include <X11/Xresource.h>
#include "wx/log.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constants // constants

View File

@@ -215,6 +215,134 @@ extern bool g_isIdle;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if (GTK_MINOR_VERSION == 0) #if (GTK_MINOR_VERSION == 0)
/* these functions are copied verbatim from GTK 1.2 */
static void
gdkx_XConvertCase (KeySym symbol,
KeySym *lower,
KeySym *upper)
{
register KeySym sym = symbol;
g_return_if_fail (lower != NULL);
g_return_if_fail (upper != NULL);
*lower = sym;
*upper = sym;
switch (sym >> 8)
{
#if defined (GDK_A) && defined (GDK_Ooblique)
case 0: /* Latin 1 */
if ((sym >= GDK_A) && (sym <= GDK_Z))
*lower += (GDK_a - GDK_A);
else if ((sym >= GDK_a) && (sym <= GDK_z))
*upper -= (GDK_a - GDK_A);
else if ((sym >= GDK_Agrave) && (sym <= GDK_Odiaeresis))
*lower += (GDK_agrave - GDK_Agrave);
else if ((sym >= GDK_agrave) && (sym <= GDK_odiaeresis))
*upper -= (GDK_agrave - GDK_Agrave);
else if ((sym >= GDK_Ooblique) && (sym <= GDK_Thorn))
*lower += (GDK_oslash - GDK_Ooblique);
else if ((sym >= GDK_oslash) && (sym <= GDK_thorn))
*upper -= (GDK_oslash - GDK_Ooblique);
break;
#endif /* LATIN1 */
#if defined (GDK_Aogonek) && defined (GDK_tcedilla)
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym == GDK_Aogonek)
*lower = GDK_aogonek;
else if (sym >= GDK_Lstroke && sym <= GDK_Sacute)
*lower += (GDK_lstroke - GDK_Lstroke);
else if (sym >= GDK_Scaron && sym <= GDK_Zacute)
*lower += (GDK_scaron - GDK_Scaron);
else if (sym >= GDK_Zcaron && sym <= GDK_Zabovedot)
*lower += (GDK_zcaron - GDK_Zcaron);
else if (sym == GDK_aogonek)
*upper = GDK_Aogonek;
else if (sym >= GDK_lstroke && sym <= GDK_sacute)
*upper -= (GDK_lstroke - GDK_Lstroke);
else if (sym >= GDK_scaron && sym <= GDK_zacute)
*upper -= (GDK_scaron - GDK_Scaron);
else if (sym >= GDK_zcaron && sym <= GDK_zabovedot)
*upper -= (GDK_zcaron - GDK_Zcaron);
else if (sym >= GDK_Racute && sym <= GDK_Tcedilla)
*lower += (GDK_racute - GDK_Racute);
else if (sym >= GDK_racute && sym <= GDK_tcedilla)
*upper -= (GDK_racute - GDK_Racute);
break;
#endif /* LATIN2 */
#if defined (GDK_Hstroke) && defined (GDK_Cabovedot)
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Hstroke && sym <= GDK_Hcircumflex)
*lower += (GDK_hstroke - GDK_Hstroke);
else if (sym >= GDK_Gbreve && sym <= GDK_Jcircumflex)
*lower += (GDK_gbreve - GDK_Gbreve);
else if (sym >= GDK_hstroke && sym <= GDK_hcircumflex)
*upper -= (GDK_hstroke - GDK_Hstroke);
else if (sym >= GDK_gbreve && sym <= GDK_jcircumflex)
*upper -= (GDK_gbreve - GDK_Gbreve);
else if (sym >= GDK_Cabovedot && sym <= GDK_Scircumflex)
*lower += (GDK_cabovedot - GDK_Cabovedot);
else if (sym >= GDK_cabovedot && sym <= GDK_scircumflex)
*upper -= (GDK_cabovedot - GDK_Cabovedot);
break;
#endif /* LATIN3 */
#if defined (GDK_Rcedilla) && defined (GDK_Amacron)
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Rcedilla && sym <= GDK_Tslash)
*lower += (GDK_rcedilla - GDK_Rcedilla);
else if (sym >= GDK_rcedilla && sym <= GDK_tslash)
*upper -= (GDK_rcedilla - GDK_Rcedilla);
else if (sym == GDK_ENG)
*lower = GDK_eng;
else if (sym == GDK_eng)
*upper = GDK_ENG;
else if (sym >= GDK_Amacron && sym <= GDK_Umacron)
*lower += (GDK_amacron - GDK_Amacron);
else if (sym >= GDK_amacron && sym <= GDK_umacron)
*upper -= (GDK_amacron - GDK_Amacron);
break;
#endif /* LATIN4 */
#if defined (GDK_Serbian_DJE) && defined (GDK_Cyrillic_yu)
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Serbian_DJE && sym <= GDK_Serbian_DZE)
*lower -= (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (sym >= GDK_Serbian_dje && sym <= GDK_Serbian_dze)
*upper += (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (sym >= GDK_Cyrillic_YU && sym <= GDK_Cyrillic_HARDSIGN)
*lower -= (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
else if (sym >= GDK_Cyrillic_yu && sym <= GDK_Cyrillic_hardsign)
*upper += (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
break;
#endif /* CYRILLIC */
#if defined (GDK_Greek_ALPHAaccent) && defined (GDK_Greek_finalsmallsigma)
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Greek_ALPHAaccent && sym <= GDK_Greek_OMEGAaccent)
*lower += (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (sym >= GDK_Greek_alphaaccent && sym <= GDK_Greek_omegaaccent &&
sym != GDK_Greek_iotaaccentdieresis &&
sym != GDK_Greek_upsilonaccentdieresis)
*upper -= (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (sym >= GDK_Greek_ALPHA && sym <= GDK_Greek_OMEGA)
*lower += (GDK_Greek_alpha - GDK_Greek_ALPHA);
else if (sym >= GDK_Greek_alpha && sym <= GDK_Greek_omega &&
sym != GDK_Greek_finalsmallsigma)
*upper -= (GDK_Greek_alpha - GDK_Greek_ALPHA);
break;
#endif /* GREEK */
}
}
static guint static guint
gdk_keyval_to_upper (guint keyval) gdk_keyval_to_upper (guint keyval)
{ {
@@ -223,7 +351,7 @@ gdk_keyval_to_upper (guint keyval)
KeySym lower_val = 0; KeySym lower_val = 0;
KeySym upper_val = 0; KeySym upper_val = 0;
XConvertCase (keyval, &lower_val, &upper_val); gdkx_XConvertCase (keyval, &lower_val, &upper_val);
return upper_val; return upper_val;
} }
return 0; return 0;
@@ -2384,7 +2512,7 @@ bool wxWindow::AcceptsFocus() const
bool wxWindow::Reparent( wxWindow *newParent ) bool wxWindow::Reparent( wxWindow *newParent )
{ {
wxCHECK_MSG( (m_widget != NULL), (wxWindow*) NULL, _T("invalid window") ); wxCHECK_MSG( (m_widget != NULL), FALSE, _T("invalid window") );
wxWindow *oldParent = m_parent; wxWindow *oldParent = m_parent;

View File

@@ -69,19 +69,28 @@ static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation
// "configure_event" // "configure_event"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static gint gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxDialog *win ) static gint
#if (GTK_MINOR_VERSON > 0)
gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxDialog *win )
#else
gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxDialog *win )
#endif
{ {
if (g_isIdle) if (g_isIdle)
wxapp_install_idle_handler(); wxapp_install_idle_handler();
if (!win->m_hasVMT) return FALSE; if (!win->m_hasVMT) return FALSE;
#if (GTK_MINOR_VERSON > 0)
int x = 0; int x = 0;
int y = 0; int y = 0;
gdk_window_get_root_origin( win->m_widget->window, &x, &y ); gdk_window_get_root_origin( win->m_widget->window, &x, &y );
win->m_x = x; win->m_x = x;
win->m_y = y; win->m_y = y;
#else
win->m_x = event->x;
win->m_y = event->y;
#endif
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() ); wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
mevent.SetEventObject( win ); mevent.SetEventObject( win );

View File

@@ -152,19 +152,28 @@ static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSE
// "configure_event" // "configure_event"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win ) static gint
#if (GTK_MINOR_VERSON > 0)
gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win )
#else
gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win )
#endif
{ {
if (g_isIdle) if (g_isIdle)
wxapp_install_idle_handler(); wxapp_install_idle_handler();
if (!win->m_hasVMT) return FALSE; if (!win->m_hasVMT) return FALSE;
#if (GTK_MINOR_VERSON > 0)
int x = 0; int x = 0;
int y = 0; int y = 0;
gdk_window_get_root_origin( win->m_widget->window, &x, &y ); gdk_window_get_root_origin( win->m_widget->window, &x, &y );
win->m_x = x; win->m_x = x;
win->m_y = y; win->m_y = y;
#else
win->m_x = event->x;
win->m_y = event->y;
#endif
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() ); wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
mevent.SetEventObject( win ); mevent.SetEventObject( win );

View File

@@ -520,7 +520,7 @@ bool wxNotebook::InsertPage( int position, wxWindow* win, const wxString& text,
else else
gtk_notebook_insert_page( notebook, win->m_widget, page->m_box, position ); gtk_notebook_insert_page( notebook, win->m_widget, page->m_box, position );
page->m_page = GTK_NOTEBOOK_PAGE( g_list_last(notebook->children)->data ); page->m_page = (GtkNotebookPage*) g_list_last(notebook->children)->data;
gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate", gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate",
GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win ); GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win );

View File

@@ -80,8 +80,8 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
wxToolBar *tb = tool->m_owner; wxToolBar *tb = tool->m_owner;
/* we grey-out the tip text of disabled tool */ #if (GTK_MINOR_VERSION == 0)
#if 0 /* we grey-out the tip text of disabled tool in GTK 1.0 */
if (tool->m_enabled) if (tool->m_enabled)
{ {
if (tb->m_fg->red != 0) if (tb->m_fg->red != 0)
@@ -91,17 +91,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
tb->m_fg->blue = 0; tb->m_fg->blue = 0;
gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg ); gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg );
#if (GTK_MINOR_VERSION > 0)
GtkStyle *g_style =
gtk_style_copy(
gtk_widget_get_style(
GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window ) );
g_style->fg[GTK_STATE_NORMAL] = *tb->m_fg;
gtk_widget_set_style( GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window, g_style );
#else
gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg ); gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg );
#endif
} }
} }
else else
@@ -112,17 +102,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
tb->m_fg->green = 33000; tb->m_fg->green = 33000;
tb->m_fg->blue = 33000; tb->m_fg->blue = 33000;
gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg ); gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg );
#if (GTK_MINOR_VERSION > 0)
GtkStyle *g_style =
gtk_style_copy(
gtk_widget_get_style(
GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window ) );
g_style->fg[GTK_STATE_NORMAL] = *tb->m_fg;
gtk_widget_set_style( GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window, g_style );
#else
gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg ); gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg );
#endif
} }
} }
#endif #endif
@@ -294,7 +274,9 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
mask = bitmap.GetMask()->GetBitmap(); mask = bitmap.GetMask()->GetBitmap();
tool_pixmap = gtk_pixmap_new( pixmap, mask ); tool_pixmap = gtk_pixmap_new( pixmap, mask );
#if (GTK_MINOR_VERSION > 0)
gtk_pixmap_set_build_insensitive( GTK_PIXMAP(tool_pixmap), TRUE ); gtk_pixmap_set_build_insensitive( GTK_PIXMAP(tool_pixmap), TRUE );
#endif
gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 ); gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 );
@@ -376,11 +358,12 @@ void wxToolBar::EnableTool(int toolIndex, bool enable)
{ {
tool->m_enabled = enable; tool->m_enabled = enable;
/* we don't disable the tools for now as the bitmaps don't get #if (GTK_MINOR_VERSION > 0)
greyed anyway and this also disables tooltips */ /* we don't disable the tools for GTK 1.0 as the bitmaps don't get
greyed anyway and this also disables tooltips */
if (tool->m_item) if (tool->m_item)
gtk_widget_set_sensitive( tool->m_item, enable ); gtk_widget_set_sensitive( tool->m_item, enable );
#endif
return; return;
} }

View File

@@ -15,13 +15,14 @@
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/list.h" #include "wx/list.h"
#include "wx/log.h"
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#ifdef __SVR4__ //#ifdef __SVR4__
#include <sys/systeminfo.h> //#include <sys/systeminfo.h>
#endif //#endif
#include "gdk/gdkx.h" // GDK_DISPLAY #include "gdk/gdkx.h" // GDK_DISPLAY
#include "gdk/gdkprivate.h" // gdk_progclass #include "gdk/gdkprivate.h" // gdk_progclass
@@ -30,7 +31,6 @@
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xresource.h> #include <X11/Xresource.h>
#include "wx/log.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constants // constants

View File

@@ -215,6 +215,134 @@ extern bool g_isIdle;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if (GTK_MINOR_VERSION == 0) #if (GTK_MINOR_VERSION == 0)
/* these functions are copied verbatim from GTK 1.2 */
static void
gdkx_XConvertCase (KeySym symbol,
KeySym *lower,
KeySym *upper)
{
register KeySym sym = symbol;
g_return_if_fail (lower != NULL);
g_return_if_fail (upper != NULL);
*lower = sym;
*upper = sym;
switch (sym >> 8)
{
#if defined (GDK_A) && defined (GDK_Ooblique)
case 0: /* Latin 1 */
if ((sym >= GDK_A) && (sym <= GDK_Z))
*lower += (GDK_a - GDK_A);
else if ((sym >= GDK_a) && (sym <= GDK_z))
*upper -= (GDK_a - GDK_A);
else if ((sym >= GDK_Agrave) && (sym <= GDK_Odiaeresis))
*lower += (GDK_agrave - GDK_Agrave);
else if ((sym >= GDK_agrave) && (sym <= GDK_odiaeresis))
*upper -= (GDK_agrave - GDK_Agrave);
else if ((sym >= GDK_Ooblique) && (sym <= GDK_Thorn))
*lower += (GDK_oslash - GDK_Ooblique);
else if ((sym >= GDK_oslash) && (sym <= GDK_thorn))
*upper -= (GDK_oslash - GDK_Ooblique);
break;
#endif /* LATIN1 */
#if defined (GDK_Aogonek) && defined (GDK_tcedilla)
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym == GDK_Aogonek)
*lower = GDK_aogonek;
else if (sym >= GDK_Lstroke && sym <= GDK_Sacute)
*lower += (GDK_lstroke - GDK_Lstroke);
else if (sym >= GDK_Scaron && sym <= GDK_Zacute)
*lower += (GDK_scaron - GDK_Scaron);
else if (sym >= GDK_Zcaron && sym <= GDK_Zabovedot)
*lower += (GDK_zcaron - GDK_Zcaron);
else if (sym == GDK_aogonek)
*upper = GDK_Aogonek;
else if (sym >= GDK_lstroke && sym <= GDK_sacute)
*upper -= (GDK_lstroke - GDK_Lstroke);
else if (sym >= GDK_scaron && sym <= GDK_zacute)
*upper -= (GDK_scaron - GDK_Scaron);
else if (sym >= GDK_zcaron && sym <= GDK_zabovedot)
*upper -= (GDK_zcaron - GDK_Zcaron);
else if (sym >= GDK_Racute && sym <= GDK_Tcedilla)
*lower += (GDK_racute - GDK_Racute);
else if (sym >= GDK_racute && sym <= GDK_tcedilla)
*upper -= (GDK_racute - GDK_Racute);
break;
#endif /* LATIN2 */
#if defined (GDK_Hstroke) && defined (GDK_Cabovedot)
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Hstroke && sym <= GDK_Hcircumflex)
*lower += (GDK_hstroke - GDK_Hstroke);
else if (sym >= GDK_Gbreve && sym <= GDK_Jcircumflex)
*lower += (GDK_gbreve - GDK_Gbreve);
else if (sym >= GDK_hstroke && sym <= GDK_hcircumflex)
*upper -= (GDK_hstroke - GDK_Hstroke);
else if (sym >= GDK_gbreve && sym <= GDK_jcircumflex)
*upper -= (GDK_gbreve - GDK_Gbreve);
else if (sym >= GDK_Cabovedot && sym <= GDK_Scircumflex)
*lower += (GDK_cabovedot - GDK_Cabovedot);
else if (sym >= GDK_cabovedot && sym <= GDK_scircumflex)
*upper -= (GDK_cabovedot - GDK_Cabovedot);
break;
#endif /* LATIN3 */
#if defined (GDK_Rcedilla) && defined (GDK_Amacron)
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Rcedilla && sym <= GDK_Tslash)
*lower += (GDK_rcedilla - GDK_Rcedilla);
else if (sym >= GDK_rcedilla && sym <= GDK_tslash)
*upper -= (GDK_rcedilla - GDK_Rcedilla);
else if (sym == GDK_ENG)
*lower = GDK_eng;
else if (sym == GDK_eng)
*upper = GDK_ENG;
else if (sym >= GDK_Amacron && sym <= GDK_Umacron)
*lower += (GDK_amacron - GDK_Amacron);
else if (sym >= GDK_amacron && sym <= GDK_umacron)
*upper -= (GDK_amacron - GDK_Amacron);
break;
#endif /* LATIN4 */
#if defined (GDK_Serbian_DJE) && defined (GDK_Cyrillic_yu)
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Serbian_DJE && sym <= GDK_Serbian_DZE)
*lower -= (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (sym >= GDK_Serbian_dje && sym <= GDK_Serbian_dze)
*upper += (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (sym >= GDK_Cyrillic_YU && sym <= GDK_Cyrillic_HARDSIGN)
*lower -= (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
else if (sym >= GDK_Cyrillic_yu && sym <= GDK_Cyrillic_hardsign)
*upper += (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
break;
#endif /* CYRILLIC */
#if defined (GDK_Greek_ALPHAaccent) && defined (GDK_Greek_finalsmallsigma)
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Greek_ALPHAaccent && sym <= GDK_Greek_OMEGAaccent)
*lower += (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (sym >= GDK_Greek_alphaaccent && sym <= GDK_Greek_omegaaccent &&
sym != GDK_Greek_iotaaccentdieresis &&
sym != GDK_Greek_upsilonaccentdieresis)
*upper -= (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (sym >= GDK_Greek_ALPHA && sym <= GDK_Greek_OMEGA)
*lower += (GDK_Greek_alpha - GDK_Greek_ALPHA);
else if (sym >= GDK_Greek_alpha && sym <= GDK_Greek_omega &&
sym != GDK_Greek_finalsmallsigma)
*upper -= (GDK_Greek_alpha - GDK_Greek_ALPHA);
break;
#endif /* GREEK */
}
}
static guint static guint
gdk_keyval_to_upper (guint keyval) gdk_keyval_to_upper (guint keyval)
{ {
@@ -223,7 +351,7 @@ gdk_keyval_to_upper (guint keyval)
KeySym lower_val = 0; KeySym lower_val = 0;
KeySym upper_val = 0; KeySym upper_val = 0;
XConvertCase (keyval, &lower_val, &upper_val); gdkx_XConvertCase (keyval, &lower_val, &upper_val);
return upper_val; return upper_val;
} }
return 0; return 0;
@@ -2384,7 +2512,7 @@ bool wxWindow::AcceptsFocus() const
bool wxWindow::Reparent( wxWindow *newParent ) bool wxWindow::Reparent( wxWindow *newParent )
{ {
wxCHECK_MSG( (m_widget != NULL), (wxWindow*) NULL, _T("invalid window") ); wxCHECK_MSG( (m_widget != NULL), FALSE, _T("invalid window") );
wxWindow *oldParent = m_parent; wxWindow *oldParent = m_parent;