configure and #ifdef wxUSE_XXX updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -24,8 +24,9 @@
|
||||
#endif
|
||||
#include "wx/module.h"
|
||||
#include "wx/image.h"
|
||||
#ifdef wxUSE_THREADS
|
||||
#include "wx/thread.h"
|
||||
|
||||
#endif
|
||||
#include "unistd.h"
|
||||
|
||||
#include "glib.h"
|
||||
@@ -145,9 +146,13 @@ END_EVENT_TABLE()
|
||||
gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
||||
{
|
||||
if (wxTheApp) while (wxTheApp->ProcessIdle()) {}
|
||||
#ifdef wxUSE_THREADS
|
||||
wxMutexGuiLeave();
|
||||
#endif
|
||||
usleep(10000);
|
||||
#ifdef wxUSE_THREADS
|
||||
wxMutexGuiEnter();
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "wx/clipbrd.h"
|
||||
|
||||
#ifdef wxUSE_CLIPBOARD
|
||||
|
||||
#include "glib.h"
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
@@ -547,3 +549,8 @@ void wxClipboardModule::OnExit()
|
||||
if (wxTheClipboard) delete wxTheClipboard;
|
||||
wxTheClipboard = (wxClipboard*) NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// wxUSE_CLIPBOARD
|
||||
|
||||
|
@@ -11,7 +11,11 @@
|
||||
#pragma implementation "combobox.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "wx/combobox.h"
|
||||
|
||||
#ifdef wxUSE_COMBOBOX
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
@@ -538,3 +542,7 @@ bool wxComboBox::IsOwnGtkWindow( GdkWindow *window )
|
||||
return ( (window == GTK_ENTRY( GTK_COMBO(m_widget)->entry )->text_area) ||
|
||||
(window == GTK_COMBO(m_widget)->button->window ) );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// wxUSE_COMBOBOX
|
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/dnd.h"
|
||||
|
||||
#ifdef wxUSE_DRAG_AND_DROP
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/gdicmn.h"
|
||||
@@ -986,9 +989,9 @@ shape_create_icon (char **data,
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
// NEW_GTK_DND_CODE
|
||||
|
||||
#endif
|
||||
|
||||
// wxUSE_DRAG_AND_DROP
|
@@ -394,9 +394,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
int yy = m_miniEdge + m_miniTitle;
|
||||
int ww = m_width - 2*m_miniEdge;
|
||||
int hh = wxMENU_HEIGHT;
|
||||
int yy = m_miniEdge + m_miniTitle;
|
||||
int ww = m_width - 2*m_miniEdge;
|
||||
int hh = wxMENU_HEIGHT;
|
||||
m_frameMenuBar->m_x = xx;
|
||||
m_frameMenuBar->m_y = yy;
|
||||
m_frameMenuBar->m_width = ww;
|
||||
@@ -409,9 +409,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
int yy = m_miniEdge + m_miniTitle;
|
||||
int yy = m_miniEdge + m_miniTitle;
|
||||
if (m_frameMenuBar) yy += wxMENU_HEIGHT;
|
||||
int ww = m_width - 2*m_miniEdge;
|
||||
int ww = m_width - 2*m_miniEdge;
|
||||
int hh = m_frameToolBar->m_height;
|
||||
|
||||
m_frameToolBar->m_x = xx;
|
||||
@@ -426,9 +426,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
if (m_frameStatusBar)
|
||||
{
|
||||
int xx = 0 + m_miniEdge;
|
||||
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge;
|
||||
int ww = m_width - 2*m_miniEdge;
|
||||
int hh = wxSTATUS_HEIGHT;
|
||||
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge;
|
||||
int ww = m_width - 2*m_miniEdge;
|
||||
int hh = wxSTATUS_HEIGHT;
|
||||
|
||||
m_frameStatusBar->m_x = xx;
|
||||
m_frameStatusBar->m_y = yy;
|
||||
|
@@ -319,9 +319,11 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
|
||||
ConnectWidget( list_item );
|
||||
|
||||
#ifdef wxUSE_DRAG_AND_DROP
|
||||
#ifndef NEW_GTK_DND_CODE
|
||||
if (m_dropTarget) m_dropTarget->RegisterWidget( list_item );
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxListBox::Append( const wxString &item )
|
||||
@@ -650,6 +652,7 @@ int wxListBox::GetIndex( GtkWidget *item ) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef wxUSE_DRAG_AND_DROP
|
||||
void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
|
||||
{
|
||||
wxCHECK_RET( m_list != NULL, "invalid listbox" );
|
||||
@@ -680,6 +683,7 @@ void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
GtkWidget *wxListBox::GetConnectWidget()
|
||||
{
|
||||
|
@@ -21,8 +21,9 @@
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/dcclient.h"
|
||||
#ifdef wxUSE_DRAG_AND_DROP
|
||||
#include "wx/dnd.h"
|
||||
#endif
|
||||
#include "wx/menu.h"
|
||||
#include "wx/statusbr.h"
|
||||
#include "wx/intl.h"
|
||||
@@ -1166,7 +1167,9 @@ wxWindow::wxWindow()
|
||||
m_isShown = FALSE;
|
||||
m_isEnabled = TRUE;
|
||||
|
||||
#ifdef wxUSE_DRAG_AND_DROP
|
||||
m_dropTarget = (wxDropTarget*) NULL;
|
||||
#endif
|
||||
m_resizing = FALSE;
|
||||
m_scrollGC = (GdkGC*) NULL;
|
||||
m_widgetStyle = (GtkStyle*) NULL;
|
||||
@@ -1332,7 +1335,9 @@ wxWindow::~wxWindow()
|
||||
{
|
||||
m_hasVMT = FALSE;
|
||||
|
||||
#ifdef wxUSE_DRAG_AND_DROP
|
||||
if (m_dropTarget) delete m_dropTarget;
|
||||
#endif
|
||||
|
||||
if (m_parent) m_parent->RemoveChild( this );
|
||||
if (m_widget) Show( FALSE );
|
||||
@@ -1451,7 +1456,9 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id,
|
||||
m_isShown = FALSE;
|
||||
m_isEnabled = TRUE;
|
||||
|
||||
#ifdef wxUSE_DRAG_AND_DROP
|
||||
m_dropTarget = (wxDropTarget *) NULL;
|
||||
#endif
|
||||
m_resizing = FALSE;
|
||||
m_windowValidator = (wxValidator *) NULL;
|
||||
m_scrollGC = (GdkGC*) NULL;
|
||||
@@ -2488,6 +2495,8 @@ bool wxWindow::PopupMenu( wxMenu *menu, int WXUNUSED(x), int WXUNUSED(y) )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef wxUSE_DRAG_AND_DROP
|
||||
|
||||
void wxWindow::SetDropTarget( wxDropTarget *dropTarget )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid window" );
|
||||
@@ -2507,6 +2516,8 @@ wxDropTarget *wxWindow::GetDropTarget() const
|
||||
return m_dropTarget;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
GtkWidget* wxWindow::GetConnectWidget()
|
||||
{
|
||||
GtkWidget *connect_widget = m_widget;
|
||||
|
Reference in New Issue
Block a user