Distrib corrections,
Changed way to prevent toolbar from sending event when changes programmatically. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e90196a556
commit
59fe1666ce
@ -1,5 +1,5 @@
|
||||
#
|
||||
# This file was automatically generated by tmake at 00:24, 1999/10/28
|
||||
# This file was automatically generated by tmake at 16:39, 1999/10/31
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
|
||||
|
||||
#
|
||||
@ -2474,7 +2474,6 @@ SAMPLES_DIST:
|
||||
mkdir $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/Makefile.in $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/*.cpp $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/*.h $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/*.xpm $(DISTDIR)/samples/toolbar
|
||||
mkdir $(DISTDIR)/samples/toolbar/bitmaps
|
||||
cp $(SAMPDIR)/toolbar/bitmaps/*.xpm $(DISTDIR)/samples/toolbar/bitmaps
|
||||
|
@ -984,7 +984,6 @@ SAMPLES_DIST:
|
||||
mkdir $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/Makefile.in $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/*.cpp $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/*.h $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/*.xpm $(DISTDIR)/samples/toolbar
|
||||
mkdir $(DISTDIR)/samples/toolbar/bitmaps
|
||||
cp $(SAMPDIR)/toolbar/bitmaps/*.xpm $(DISTDIR)/samples/toolbar/bitmaps
|
||||
|
@ -116,6 +116,7 @@ public:
|
||||
int m_xMargin;
|
||||
int m_yMargin;
|
||||
bool m_hasToolAlready;
|
||||
bool m_blockNextEvent;
|
||||
|
||||
void OnInternalIdle();
|
||||
|
||||
|
@ -116,6 +116,7 @@ public:
|
||||
int m_xMargin;
|
||||
int m_yMargin;
|
||||
bool m_hasToolAlready;
|
||||
bool m_blockNextEvent;
|
||||
|
||||
void OnInternalIdle();
|
||||
|
||||
|
@ -41,7 +41,14 @@ extern wxCursor g_globalCursor;
|
||||
|
||||
static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget), wxToolBarTool *tool )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (tool->m_owner->m_blockNextEvent)
|
||||
{
|
||||
tool->m_owner->m_blockNextEvent = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_blockEventsOnDrag) return;
|
||||
if (!tool->m_enabled) return;
|
||||
@ -147,6 +154,7 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
|
||||
long style, const wxString& name )
|
||||
{
|
||||
m_needParent = TRUE;
|
||||
m_blockNextEvent = FALSE;
|
||||
|
||||
if (!PreCreation( parent, pos, size ) ||
|
||||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||
@ -409,13 +417,9 @@ void wxToolBar::ToggleTool( int toolIndex, bool toggle )
|
||||
gtk_pixmap_set( pixmap, bitmap.GetPixmap(), mask );
|
||||
}
|
||||
|
||||
gtk_signal_disconnect_by_func( GTK_OBJECT(tool->m_item),
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_callback), (gpointer*)tool );
|
||||
m_blockNextEvent = TRUE; // we cannot use gtk_signal_disconnect here
|
||||
|
||||
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(tool->m_item), toggle );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(tool->m_item), "clicked",
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_callback), (gpointer*)tool );
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -41,7 +41,14 @@ extern wxCursor g_globalCursor;
|
||||
|
||||
static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget), wxToolBarTool *tool )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (tool->m_owner->m_blockNextEvent)
|
||||
{
|
||||
tool->m_owner->m_blockNextEvent = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_blockEventsOnDrag) return;
|
||||
if (!tool->m_enabled) return;
|
||||
@ -147,6 +154,7 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
|
||||
long style, const wxString& name )
|
||||
{
|
||||
m_needParent = TRUE;
|
||||
m_blockNextEvent = FALSE;
|
||||
|
||||
if (!PreCreation( parent, pos, size ) ||
|
||||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||
@ -409,13 +417,9 @@ void wxToolBar::ToggleTool( int toolIndex, bool toggle )
|
||||
gtk_pixmap_set( pixmap, bitmap.GetPixmap(), mask );
|
||||
}
|
||||
|
||||
gtk_signal_disconnect_by_func( GTK_OBJECT(tool->m_item),
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_callback), (gpointer*)tool );
|
||||
m_blockNextEvent = TRUE; // we cannot use gtk_signal_disconnect here
|
||||
|
||||
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(tool->m_item), toggle );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(tool->m_item), "clicked",
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_callback), (gpointer*)tool );
|
||||
}
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user