Change to wxMenuBar::Remove(),
"make dist" knows about src/tiff now, configure has a new shared library thing which Debian seems to require. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
280108ed82
commit
1d62a8b425
11
Makefile.in
11
Makefile.in
@ -1,5 +1,5 @@
|
||||
#
|
||||
# This file was automatically generated by tmake at 18:51, 1999/11/30
|
||||
# This file was automatically generated by tmake at 16:17, 1999/12/04
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
|
||||
|
||||
#
|
||||
@ -109,6 +109,7 @@ HTMLDIR = $(WXDIR)/src/html
|
||||
UNIXDIR = $(WXDIR)/src/unix
|
||||
PNGDIR = $(WXDIR)/src/png
|
||||
JPEGDIR = $(WXDIR)/src/jpeg
|
||||
TIFFDIR = $(WXDIR)/src/tiff
|
||||
ZLIBDIR = $(WXDIR)/src/zlib
|
||||
GTKDIR = $(WXDIR)/src/gtk
|
||||
MOTIFDIR = $(WXDIR)/src/motif
|
||||
@ -2090,6 +2091,8 @@ DEPFILES = @ALL_DEPFILES@
|
||||
|
||||
HEADERS = @ALL_HEADERS@
|
||||
|
||||
BURNT_LIBRARY_NAME = @BURNT_LIBRARY_NAME@
|
||||
|
||||
all: @WX_ALL@
|
||||
|
||||
@WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
|
||||
@ -2099,7 +2102,7 @@ all: @WX_ALL@
|
||||
|
||||
@WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
|
||||
@$(INSTALL) -d ./lib
|
||||
$(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS)
|
||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME) $(OBJECTS) $(EXTRALIBS)
|
||||
|
||||
CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK1@
|
||||
@ -2272,6 +2275,7 @@ ALL_DIST:
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
mkdir $(DISTDIR)/src/png
|
||||
mkdir $(DISTDIR)/src/jpeg
|
||||
mkdir $(DISTDIR)/src/tiff
|
||||
mkdir $(DISTDIR)/src/zlib
|
||||
mkdir $(DISTDIR)/src/iodbc
|
||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||
@ -2295,6 +2299,9 @@ ALL_DIST:
|
||||
cp $(JPEGDIR)/*.h $(DISTDIR)/src/jpeg
|
||||
cp $(JPEGDIR)/*.c $(DISTDIR)/src/jpeg
|
||||
cp $(JPEGDIR)/README $(DISTDIR)/src/jpeg
|
||||
cp $(TIFFDIR)/*.h $(DISTDIR)/src/tiff
|
||||
cp $(TIFFDIR)/*.c $(DISTDIR)/src/tiff
|
||||
cp $(TIFFDIR)/README $(DISTDIR)/src/tiff
|
||||
cp $(ODBCDIR)/*.h $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/*.c $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/*.ci $(DISTDIR)/src/iodbc
|
||||
|
@ -1735,6 +1735,7 @@ SHARED_LD=
|
||||
PIC_FLAG=
|
||||
WX_ALL=
|
||||
WX_ALL_INSTALLED=
|
||||
BURNT_LIBRARY_NAME=
|
||||
|
||||
if test "$wxUSE_SHARED" = "yes"; then
|
||||
case "${host}" in
|
||||
@ -1754,6 +1755,7 @@ if test "$wxUSE_SHARED" = "yes"; then
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
BURNT_LIBRARY_NAME="-Wl,-soname -Wl,${WX_LIBRARY_NAME_SHARED}"
|
||||
;;
|
||||
*-*-irix5* | *-*-irix6* )
|
||||
if test "$GCC" = yes ; then
|
||||
@ -3031,6 +3033,7 @@ AC_SUBST(WX_ALL_INSTALLED)
|
||||
AC_SUBST(SHARED_LD)
|
||||
AC_SUBST(PIC_FLAG)
|
||||
AC_SUBST(DEP_INFO_FLAGS)
|
||||
AC_SUBST(BURNT_LIBRARY_NAME)
|
||||
|
||||
dnl debugging options
|
||||
AC_SUBST(WXDEBUG_DEFINE)
|
||||
|
@ -289,6 +289,7 @@ HTMLDIR = $(WXDIR)/src/html
|
||||
UNIXDIR = $(WXDIR)/src/unix
|
||||
PNGDIR = $(WXDIR)/src/png
|
||||
JPEGDIR = $(WXDIR)/src/jpeg
|
||||
TIFFDIR = $(WXDIR)/src/tiff
|
||||
ZLIBDIR = $(WXDIR)/src/zlib
|
||||
GTKDIR = $(WXDIR)/src/gtk
|
||||
MOTIFDIR = $(WXDIR)/src/motif
|
||||
@ -567,6 +568,8 @@ DEPFILES = @ALL_DEPFILES@
|
||||
|
||||
HEADERS = @ALL_HEADERS@
|
||||
|
||||
BURNT_LIBRARY_NAME = @BURNT_LIBRARY_NAME@
|
||||
|
||||
all: @WX_ALL@
|
||||
|
||||
@WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
|
||||
@ -576,7 +579,7 @@ all: @WX_ALL@
|
||||
|
||||
@WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
|
||||
@$(INSTALL) -d ./lib
|
||||
$(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS)
|
||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME) $(OBJECTS) $(EXTRALIBS)
|
||||
|
||||
CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK1@
|
||||
@ -749,6 +752,7 @@ ALL_DIST:
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
mkdir $(DISTDIR)/src/png
|
||||
mkdir $(DISTDIR)/src/jpeg
|
||||
mkdir $(DISTDIR)/src/tiff
|
||||
mkdir $(DISTDIR)/src/zlib
|
||||
mkdir $(DISTDIR)/src/iodbc
|
||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||
@ -772,6 +776,9 @@ ALL_DIST:
|
||||
cp $(JPEGDIR)/*.h $(DISTDIR)/src/jpeg
|
||||
cp $(JPEGDIR)/*.c $(DISTDIR)/src/jpeg
|
||||
cp $(JPEGDIR)/README $(DISTDIR)/src/jpeg
|
||||
cp $(TIFFDIR)/*.h $(DISTDIR)/src/tiff
|
||||
cp $(TIFFDIR)/*.c $(DISTDIR)/src/tiff
|
||||
cp $(TIFFDIR)/README $(DISTDIR)/src/tiff
|
||||
cp $(ODBCDIR)/*.h $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/*.c $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/*.ci $(DISTDIR)/src/iodbc
|
||||
|
@ -328,13 +328,13 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
||||
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
||||
{
|
||||
if ( !wxMenuBarBase::Replace(pos, menu, title) )
|
||||
return FALSE;
|
||||
return (wxMenu*) NULL;
|
||||
|
||||
// remove the old item and insert a new one
|
||||
wxMenu *menuOld = Remove(pos);
|
||||
if ( menuOld && !Insert(pos, menu, title) )
|
||||
{
|
||||
return NULL;
|
||||
return (wxMenu*) NULL;
|
||||
}
|
||||
|
||||
// either Insert() succeeded or Remove() failed and menuOld is NULL
|
||||
@ -345,35 +345,23 @@ wxMenu *wxMenuBar::Remove(size_t pos)
|
||||
{
|
||||
wxMenu *menu = wxMenuBarBase::Remove(pos);
|
||||
if ( !menu )
|
||||
return FALSE;
|
||||
return (wxMenu*) NULL;
|
||||
|
||||
#ifdef __WXGTK12__
|
||||
// gtk_item_factory_delete_entry() is buggy as of GTK+ 1.2.6, so don't use
|
||||
// it but delete the widget manually instead
|
||||
wxString path = _T("<main>/"),
|
||||
title = menu->GetTitle();
|
||||
for ( const wxChar *p = title.c_str(); *p; p++ )
|
||||
{
|
||||
if ( *p != _T('_') )
|
||||
path += *p;
|
||||
}
|
||||
|
||||
GtkWidget *widget = gtk_item_factory_get_item(m_factory, path.mb_str());
|
||||
if ( widget )
|
||||
{
|
||||
gtk_widget_destroy(widget);
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
// shouldn't happen (FIXME but does now)
|
||||
wxFAIL_MSG( _T("gtk_item_factory_get_item() failed") );
|
||||
#else // GTK < 1.2
|
||||
// this should be very simple to implement
|
||||
wxFAIL_MSG( wxT("TODO") );
|
||||
#endif // GTK 1.2/1.0
|
||||
|
||||
return NULL;
|
||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL(m_factory->widget);
|
||||
printf( "factory entries before %d\n", (int)g_slist_length(m_factory->items) );
|
||||
printf( "menu shell entries before %d\n", (int)g_list_length( menu_shell->children ) );
|
||||
|
||||
// unparent calls unref() and that would delete the widget so we raise
|
||||
// the ref count to 2 artificially before invoking unparent.
|
||||
gtk_widget_ref( menu->m_menu );
|
||||
gtk_widget_unparent( menu->m_menu );
|
||||
|
||||
gtk_widget_destroy( menu->m_owner );
|
||||
|
||||
printf( "factory entries after %d\n", (int)g_slist_length(m_factory->items) );
|
||||
printf( "menu shell entries after %d\n", (int)g_list_length( menu_shell->children ) );
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString, const wxString &itemString )
|
||||
|
@ -328,13 +328,13 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
||||
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
||||
{
|
||||
if ( !wxMenuBarBase::Replace(pos, menu, title) )
|
||||
return FALSE;
|
||||
return (wxMenu*) NULL;
|
||||
|
||||
// remove the old item and insert a new one
|
||||
wxMenu *menuOld = Remove(pos);
|
||||
if ( menuOld && !Insert(pos, menu, title) )
|
||||
{
|
||||
return NULL;
|
||||
return (wxMenu*) NULL;
|
||||
}
|
||||
|
||||
// either Insert() succeeded or Remove() failed and menuOld is NULL
|
||||
@ -345,35 +345,23 @@ wxMenu *wxMenuBar::Remove(size_t pos)
|
||||
{
|
||||
wxMenu *menu = wxMenuBarBase::Remove(pos);
|
||||
if ( !menu )
|
||||
return FALSE;
|
||||
return (wxMenu*) NULL;
|
||||
|
||||
#ifdef __WXGTK12__
|
||||
// gtk_item_factory_delete_entry() is buggy as of GTK+ 1.2.6, so don't use
|
||||
// it but delete the widget manually instead
|
||||
wxString path = _T("<main>/"),
|
||||
title = menu->GetTitle();
|
||||
for ( const wxChar *p = title.c_str(); *p; p++ )
|
||||
{
|
||||
if ( *p != _T('_') )
|
||||
path += *p;
|
||||
}
|
||||
|
||||
GtkWidget *widget = gtk_item_factory_get_item(m_factory, path.mb_str());
|
||||
if ( widget )
|
||||
{
|
||||
gtk_widget_destroy(widget);
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
// shouldn't happen (FIXME but does now)
|
||||
wxFAIL_MSG( _T("gtk_item_factory_get_item() failed") );
|
||||
#else // GTK < 1.2
|
||||
// this should be very simple to implement
|
||||
wxFAIL_MSG( wxT("TODO") );
|
||||
#endif // GTK 1.2/1.0
|
||||
|
||||
return NULL;
|
||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL(m_factory->widget);
|
||||
printf( "factory entries before %d\n", (int)g_slist_length(m_factory->items) );
|
||||
printf( "menu shell entries before %d\n", (int)g_list_length( menu_shell->children ) );
|
||||
|
||||
// unparent calls unref() and that would delete the widget so we raise
|
||||
// the ref count to 2 artificially before invoking unparent.
|
||||
gtk_widget_ref( menu->m_menu );
|
||||
gtk_widget_unparent( menu->m_menu );
|
||||
|
||||
gtk_widget_destroy( menu->m_owner );
|
||||
|
||||
printf( "factory entries after %d\n", (int)g_slist_length(m_factory->items) );
|
||||
printf( "menu shell entries after %d\n", (int)g_list_length( menu_shell->children ) );
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString, const wxString &itemString )
|
||||
|
Loading…
Reference in New Issue
Block a user