Added zillions of #if wxUSE_XXX
Removed cmndlgs usage of wxSizer and constraints Changed occurences of wxConv_xxx to wxConvXxxx and changed some wxConvLibc to wxConvCurrent Added Unicode tests to typetests (not finished) Compile fix for wxString in Unicode mode - we have to use the "experimental" printf then, I guess. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// Name: accel.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $id$
|
||||
// Id: $id:$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -13,14 +13,9 @@
|
||||
|
||||
#include "wx/accel.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#if wxUSE_ACCEL
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
#ifdef NULL
|
||||
#undef NULL
|
||||
#endif
|
||||
#define NULL ((void*)0L)
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAcceleratorTable
|
||||
@@ -94,3 +89,4 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event )
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -662,7 +662,7 @@ int wxEntry( int argc, char *argv[] )
|
||||
{
|
||||
gtk_set_locale();
|
||||
|
||||
if (!wxOKlibc()) wxConv_current = &wxConv_local;
|
||||
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
|
||||
|
||||
gtk_init( &argc, &argv );
|
||||
|
||||
|
@@ -59,7 +59,7 @@ bool wxMask::Create( const wxBitmap& bitmap, const wxColour& colour )
|
||||
m_bitmap = (GdkBitmap*) NULL;
|
||||
}
|
||||
|
||||
wxFAIL_MSG( "TODO" );
|
||||
wxFAIL_MSG( _T("TODO") );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ bool wxMask::Create( const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex
|
||||
m_bitmap = (GdkBitmap*) NULL;
|
||||
}
|
||||
|
||||
wxFAIL_MSG( "not implemented" );
|
||||
wxFAIL_MSG( _T("not implemented") );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ bool wxMask::Create( const wxBitmap& bitmap )
|
||||
|
||||
if (!bitmap.Ok()) return FALSE;
|
||||
|
||||
wxCHECK_MSG( bitmap.GetBitmap(), FALSE, "Cannot create mask from colour bitmap" );
|
||||
wxCHECK_MSG( bitmap.GetBitmap(), FALSE, _T("Cannot create mask from colour bitmap") );
|
||||
|
||||
m_bitmap = gdk_pixmap_new( (GdkWindow*) &gdk_root_parent, bitmap.GetWidth(), bitmap.GetHeight(), 1 );
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "wx/bmpbuttn.h"
|
||||
|
||||
#if wxUSE_BMPBUTTON
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
@@ -309,3 +311,5 @@ void wxBitmapButton::EndSelect()
|
||||
m_isSelected = FALSE;
|
||||
SetBitmap();
|
||||
}
|
||||
|
||||
#endif
|
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "wx/checkbox.h"
|
||||
|
||||
#if wxUSE_CHECKBOX
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
@@ -184,3 +186,4 @@ void wxCheckBox::ApplyWidgetStyle()
|
||||
gtk_widget_set_style( m_widgetLabel, m_widgetStyle );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "wx/checklst.h"
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
@@ -69,7 +71,7 @@ void wxCheckListBox::Check( int index, bool check )
|
||||
GtkBin *bin = GTK_BIN( child->data );
|
||||
GtkLabel *label = GTK_LABEL( bin->child );
|
||||
|
||||
wxString str = wxString(label->label,*wxConv_current);
|
||||
wxString str = wxString(label->label,*wxConvCurrent);
|
||||
|
||||
if (check == (str[1] == _T('X'))) return;
|
||||
|
||||
@@ -91,3 +93,5 @@ int wxCheckListBox::GetItemHeight() const
|
||||
// FIXME
|
||||
return 22;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -251,7 +251,7 @@ int wxChoice::FindString( const wxString &string ) const
|
||||
|
||||
wxASSERT_MSG( label != NULL , _T("wxChoice: invalid label") );
|
||||
|
||||
if (string == wxString(label->label,*wxConv_current))
|
||||
if (string == wxString(label->label,*wxConvCurrent))
|
||||
return count;
|
||||
|
||||
child = child->next;
|
||||
@@ -304,7 +304,7 @@ wxString wxChoice::GetString( int n ) const
|
||||
|
||||
wxASSERT_MSG( label != NULL , _T("wxChoice: invalid label") );
|
||||
|
||||
return wxString(label->label,*wxConv_current);
|
||||
return wxString(label->label,*wxConvCurrent);
|
||||
}
|
||||
child = child->next;
|
||||
count++;
|
||||
@@ -323,7 +323,7 @@ wxString wxChoice::GetStringSelection() const
|
||||
|
||||
wxASSERT_MSG( label != NULL , _T("wxChoice: invalid label") );
|
||||
|
||||
return wxString(label->label,*wxConv_current);
|
||||
return wxString(label->label,*wxConvCurrent);
|
||||
}
|
||||
|
||||
int wxChoice::Number() const
|
||||
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/combobox.h"
|
||||
|
||||
#if wxUSE_COMBOBOX
|
||||
|
||||
#include "wx/settings.h"
|
||||
|
||||
#include <wx/intl.h>
|
||||
@@ -625,3 +628,4 @@ bool wxComboBox::IsOwnGtkWindow( GdkWindow *window )
|
||||
(window == GTK_COMBO(m_widget)->button->window ) );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -145,13 +145,13 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
|
||||
GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this );
|
||||
|
||||
// strange way to internationalize
|
||||
gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->ok_button)->child ), wxConv_current->cWX2MB(_("OK")) );
|
||||
gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->ok_button)->child ), wxConvCurrent->cWX2MB(_("OK")) );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
|
||||
GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
|
||||
|
||||
// strange way to internationalize
|
||||
gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->cancel_button)->child ), wxConv_current->cWX2MB(_("Cancel")) );
|
||||
gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->cancel_button)->child ), wxConvCurrent->cWX2MB(_("Cancel")) );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
||||
GTK_SIGNAL_FUNC(gtk_filedialog_delete_callback), (gpointer)this );
|
||||
|
@@ -401,7 +401,7 @@ static GdkFont*wxLoadQueryFont( int pointSize, int family, int style, int weight
|
||||
if (!facename.IsEmpty())
|
||||
{
|
||||
wxSprintf( wxBuffer, _T("-*-%s-*-*-normal-*-*-*-*-*-*-*-*-*"), facename.c_str() );
|
||||
GdkFont *test = gdk_font_load( wxConv_libc.cWX2MB(wxBuffer) );
|
||||
GdkFont *test = gdk_font_load( wxConvCurrent->cWX2MB(wxBuffer) );
|
||||
if (test)
|
||||
{
|
||||
gdk_font_unref( test );
|
||||
@@ -427,7 +427,7 @@ static GdkFont*wxLoadQueryFont( int pointSize, int family, int style, int weight
|
||||
wxSprintf( wxBuffer, _T("-*-%s-%s-%s-normal-*-*-%d-*-*-*-*-*-*"),
|
||||
xfamily, xweight, xstyle, pointSize);
|
||||
|
||||
return gdk_font_load( wxConv_libc.cWX2MB(wxBuffer) );
|
||||
return gdk_font_load( wxConvCurrent->cWX2MB(wxBuffer) );
|
||||
}
|
||||
|
||||
static GdkFont *wxLoadQueryNearestFont( int point_size, int family, int style, int weight,
|
||||
|
@@ -16,8 +16,12 @@
|
||||
#include "wx/control.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/menu.h"
|
||||
#if wxUSE_TOOLBAR
|
||||
#include "wx/toolbar.h"
|
||||
#endif
|
||||
#if wxUSE_STATUSBAR
|
||||
#include "wx/statusbr.h"
|
||||
#endif
|
||||
#include "wx/dcclient.h"
|
||||
|
||||
#include "glib.h"
|
||||
@@ -560,9 +564,12 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
(*height) -= wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
/* status bar */
|
||||
if (m_frameStatusBar) (*height) -= wxSTATUS_HEIGHT;
|
||||
#endif
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
/* tool bar */
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
@@ -575,6 +582,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
else
|
||||
(*height) -= wxPLACE_HOLDER;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* mini edge */
|
||||
(*height) -= m_miniEdge*2 + m_miniTitle;
|
||||
@@ -598,9 +606,12 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
height += wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
/* status bar */
|
||||
if (m_frameStatusBar) height += wxSTATUS_HEIGHT;
|
||||
#endif
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
/* tool bar */
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
@@ -613,6 +624,7 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
else
|
||||
height += wxPLACE_HOLDER;
|
||||
}
|
||||
#endif
|
||||
|
||||
wxWindow::DoSetClientSize( width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle );
|
||||
}
|
||||
@@ -674,6 +686,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
client_area_y_offset += hh;
|
||||
}
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
@@ -697,6 +710,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
xx, yy, ww, hh );
|
||||
client_area_y_offset += hh;
|
||||
}
|
||||
#endif
|
||||
|
||||
int client_x = m_miniEdge;
|
||||
int client_y = client_area_y_offset + m_miniEdge + m_miniTitle;
|
||||
@@ -712,6 +726,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
is no need to set the size or position of m_wxwindow. */
|
||||
}
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if (m_frameStatusBar)
|
||||
{
|
||||
int xx = 0 + m_miniEdge;
|
||||
@@ -726,6 +741,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
m_frameStatusBar->m_widget,
|
||||
xx, yy, ww, hh );
|
||||
}
|
||||
#endif
|
||||
|
||||
/* we actually set the size of a frame here and no-where else */
|
||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||
@@ -764,8 +780,12 @@ void wxFrame::OnInternalIdle()
|
||||
DoMenuUpdates();
|
||||
|
||||
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
|
||||
#if wxUSE_TOOLBAR
|
||||
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
|
||||
#endif
|
||||
#if wxUSE_STATUSBAR
|
||||
if (m_frameStatusBar) m_frameStatusBar->OnInternalIdle();
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxFrame::OnCloseWindow( wxCloseEvent& WXUNUSED(event) )
|
||||
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/gauge.h"
|
||||
|
||||
#if wxUSE_GAUGE
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
@@ -78,3 +81,4 @@ void wxGauge::ApplyWidgetStyle()
|
||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -12,8 +12,11 @@
|
||||
#pragma implementation "listbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/listbox.h"
|
||||
|
||||
#if wxUSE_LISTBOX
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/checklst.h"
|
||||
@@ -159,6 +162,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event,
|
||||
// "key_press_event"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
static gint
|
||||
gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxListBox *listbox )
|
||||
{
|
||||
@@ -170,7 +174,6 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
|
||||
if (gdk_event->keyval != ' ') return FALSE;
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
int sel = listbox->GetIndex( widget );
|
||||
|
||||
wxCheckListBox *clb = (wxCheckListBox *)listbox;
|
||||
@@ -181,10 +184,10 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
event.SetEventObject( listbox );
|
||||
event.SetInt( sel );
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "select" and "deselect"
|
||||
@@ -854,7 +857,7 @@ void wxListBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
|
||||
GList *child = m_list->children;
|
||||
while (child)
|
||||
{
|
||||
gtk_tooltips_set_tip( tips, GTK_WIDGET( child->data ), wxConv_local.cWX2MB(tip), (gchar*) NULL );
|
||||
gtk_tooltips_set_tip( tips, GTK_WIDGET( child->data ), wxConvLocal.cWX2MB(tip), (gchar*) NULL );
|
||||
child = child->next;
|
||||
}
|
||||
}
|
||||
@@ -940,3 +943,5 @@ void wxListBox::ApplyWidgetStyle()
|
||||
child = child->next;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/mdi.h"
|
||||
|
||||
#if wxUSE_MDI_ARCHITECTURE
|
||||
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/menu.h"
|
||||
#include <wx/intl.h>
|
||||
@@ -421,3 +424,4 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/minifram.h"
|
||||
|
||||
#if wxUSE_MINIFRAME
|
||||
|
||||
#include "wx/dcscreen.h"
|
||||
|
||||
#include "gtk/gtk.h"
|
||||
@@ -318,3 +321,5 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/notebook.h"
|
||||
|
||||
#if wxUSE_NOTEBOOK
|
||||
|
||||
#include "wx/panel.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/imaglist.h"
|
||||
@@ -623,3 +626,4 @@ bool wxNotebook::IsOwnGtkWindow( GdkWindow *window )
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
|
||||
|
||||
#endif
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/radiobox.h"
|
||||
|
||||
#if wxUSE_RADIOBOX
|
||||
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/frame.h"
|
||||
|
||||
@@ -180,7 +183,7 @@ wxSize wxRadioBox::LayoutItems()
|
||||
if (len > max_len) max_len = len;
|
||||
|
||||
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, m_x+x, m_y+y );
|
||||
y += 20;
|
||||
y += 22;
|
||||
|
||||
node = node->Next();
|
||||
if (!node) break;
|
||||
@@ -516,3 +519,5 @@ bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/radiobut.h"
|
||||
|
||||
#if wxUSE_RADIOBOX
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
@@ -152,3 +155,5 @@ void wxRadioButton::ApplyWidgetStyle()
|
||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/scrolbar.h"
|
||||
|
||||
#if wxUSE_SCROLLBAR
|
||||
|
||||
#include "wx/utils.h"
|
||||
#include <math.h>
|
||||
|
||||
@@ -307,3 +310,4 @@ void wxScrollBar::ApplyWidgetStyle()
|
||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/slider.h"
|
||||
|
||||
#if wxUSE_SLIDER
|
||||
|
||||
#include "wx/utils.h"
|
||||
#include <math.h>
|
||||
|
||||
@@ -289,3 +292,5 @@ void wxSlider::ApplyWidgetStyle()
|
||||
SetWidgetStyle();
|
||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/spinbutt.h"
|
||||
|
||||
#ifdef wxUSE_SPINBTN
|
||||
|
||||
#include "wx/utils.h"
|
||||
#include <math.h>
|
||||
|
||||
@@ -208,3 +211,5 @@ wxSpinEvent::wxSpinEvent(wxEventType commandType, int id):
|
||||
wxScrollEvent(commandType, id)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "wx/statbmp.h"
|
||||
|
||||
#if wxUSE_STATBMP
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
@@ -80,3 +82,5 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
|
||||
gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "wx/statbox.h"
|
||||
|
||||
#if wxUSE_STATBOX
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
@@ -72,3 +74,5 @@ void wxStaticBox::ApplyWidgetStyle()
|
||||
SetWidgetStyle();
|
||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "wx/statline.h"
|
||||
|
||||
#if wxUSE_STATLINE
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
@@ -55,3 +57,4 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/toolbar.h"
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
#include "wx/frame.h"
|
||||
|
||||
#include "glib.h"
|
||||
@@ -584,3 +587,4 @@ void wxToolBar::OnIdle( wxIdleEvent &WXUNUSED(ievent) )
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -301,12 +301,12 @@ wxString wxTextCtrl::GetValue() const
|
||||
{
|
||||
gint len = gtk_text_get_length( GTK_TEXT(m_text) );
|
||||
char *text = gtk_editable_get_chars( GTK_EDITABLE(m_text), 0, len );
|
||||
tmp = wxString(text,*wxConv_current);
|
||||
tmp = wxString(text,*wxConvCurrent);
|
||||
g_free( text );
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = wxString(gtk_entry_get_text( GTK_ENTRY(m_text) ),*wxConv_current);
|
||||
tmp = wxString(gtk_entry_get_text( GTK_ENTRY(m_text) ),*wxConvCurrent);
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
@@ -103,5 +103,6 @@ void wxToolTip::SetDelay( long msecs )
|
||||
|
||||
gtk_tooltips_set_delay( ss_tooltips, msecs );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -74,7 +74,7 @@ static wxChar *GetResourcePath(wxChar *buf, wxChar *name, bool create)
|
||||
if (create)
|
||||
{
|
||||
// Touch the file to create it
|
||||
FILE *fd = fopen(wxConv_file.cWX2MB(buf), "w");
|
||||
FILE *fd = fopen(wxConvCurrent->cWX2MB(buf), "w");
|
||||
if (fd) fclose(fd);
|
||||
}
|
||||
return buf;
|
||||
@@ -139,7 +139,7 @@ static void wxXMergeDatabases()
|
||||
else
|
||||
{
|
||||
(void)GetIniFile(filename, (wxChar *) NULL);
|
||||
serverDB = XrmGetFileDatabase(wxConv_file.cWX2MB(filename));
|
||||
serverDB = XrmGetFileDatabase(wxConvCurrent->cWX2MB(filename));
|
||||
}
|
||||
if (serverDB)
|
||||
XrmMergeDatabases(serverDB, &wxResourceDatabase);
|
||||
@@ -169,10 +169,10 @@ static void wxXMergeDatabases()
|
||||
#endif
|
||||
#endif
|
||||
#if wxUSE_UNICODE
|
||||
wxStrcat(environment, wxConv_libc.cMB2WX(hostbuf));
|
||||
wxStrcat(environment, wxConvCurrent->cMB2WX(hostbuf));
|
||||
#endif
|
||||
}
|
||||
if ((homeDB = XrmGetFileDatabase(wxConv_file.cWX2MB(environment))))
|
||||
if ((homeDB = XrmGetFileDatabase(wxConvCurrent->cWX2MB(environment))))
|
||||
XrmMergeDatabases(homeDB, &wxResourceDatabase);
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ void wxFlushResources()
|
||||
(void)GetResourcePath(nameBuffer, file, TRUE);
|
||||
|
||||
XrmDatabase database = (XrmDatabase)node->Data();
|
||||
XrmPutFileDatabase(database, wxConv_file.cWX2MB(nameBuffer));
|
||||
XrmPutFileDatabase(database, wxConvCurrent->cWX2MB(nameBuffer));
|
||||
XrmDestroyDatabase(database);
|
||||
wxNode *next = node->Next();
|
||||
// delete node;
|
||||
@@ -231,7 +231,7 @@ bool wxWriteResource(const wxString& section, const wxString& entry, const wxStr
|
||||
if (node)
|
||||
database = (XrmDatabase)node->Data();
|
||||
else {
|
||||
database = XrmGetFileDatabase(wxConv_file.cWX2MB(buffer));
|
||||
database = XrmGetFileDatabase(wxConvCurrent->cWX2MB(buffer));
|
||||
wxLogTrace(wxTraceResAlloc, _T("Write: Number = %d"), wxTheResourceCache->Number());
|
||||
wxTheResourceCache->Append(buffer, (wxObject *)database);
|
||||
}
|
||||
@@ -285,7 +285,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
|
||||
}
|
||||
else
|
||||
{
|
||||
database = XrmGetFileDatabase(wxConv_file.cWX2MB(buffer));
|
||||
database = XrmGetFileDatabase(wxConvCurrent->cWX2MB(buffer));
|
||||
wxLogTrace(wxTraceResAlloc, _T("Get: Number = %d"), wxTheResourceCache->Number());
|
||||
wxTheResourceCache->Append(buffer, (wxObject *)database);
|
||||
}
|
||||
|
@@ -2545,7 +2545,7 @@ void wxWindow::DoSetToolTip( wxToolTip *tip )
|
||||
|
||||
void wxWindow::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
|
||||
{
|
||||
gtk_tooltips_set_tip( tips, GetConnectWidget(), wxConv_current->cWX2MB(tip), (gchar*) NULL );
|
||||
gtk_tooltips_set_tip( tips, GetConnectWidget(), wxConvCurrent->cWX2MB(tip), (gchar*) NULL );
|
||||
}
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
|
Reference in New Issue
Block a user