libjpeg not used by default (it didn't even link)
no menu's help texts disappear again now that is git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
2
configure
vendored
2
configure
vendored
@@ -4856,7 +4856,7 @@ DEFAULT_wxUSE_IOSTREAMH=1
|
||||
|
||||
DEFAULT_wxUSE_ZLIB=1
|
||||
DEFAULT_wxUSE_LIBPNG=1
|
||||
DEFAULT_wxUSE_LIBJPEG=1
|
||||
DEFAULT_wxUSE_LIBJPEG=0
|
||||
DEFAULT_wxUSE_ODBC=1
|
||||
|
||||
DEFAULT_wxUSE_TIMEDATE=1
|
||||
|
@@ -749,7 +749,7 @@ DEFAULT_wxUSE_IOSTREAMH=1
|
||||
|
||||
DEFAULT_wxUSE_ZLIB=1
|
||||
DEFAULT_wxUSE_LIBPNG=1
|
||||
DEFAULT_wxUSE_LIBJPEG=1
|
||||
DEFAULT_wxUSE_LIBJPEG=0
|
||||
DEFAULT_wxUSE_ODBC=1
|
||||
|
||||
DEFAULT_wxUSE_TIMEDATE=1
|
||||
|
@@ -298,6 +298,27 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
if (win) win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "deselect"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
{
|
||||
int id = menu->FindMenuIdByMenuItem(widget);
|
||||
|
||||
wxASSERT( id != -1 ); // should find it!
|
||||
|
||||
if (!menu->IsEnabled(id)) return;
|
||||
|
||||
wxMenuEvent event( wxEVT_MENU_HIGHLIGHT, -1 );
|
||||
event.SetEventObject( menu );
|
||||
|
||||
if (menu->GetEventHandler()->ProcessEvent(event)) return;
|
||||
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win) win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuItem
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -433,6 +454,10 @@ void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool
|
||||
GTK_SIGNAL_FUNC(gtk_menu_hilight_callback),
|
||||
(gpointer*)this );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menuItem), "deselect",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_nolight_callback),
|
||||
(gpointer*)this );
|
||||
|
||||
gtk_menu_append( GTK_MENU(m_menu), menuItem );
|
||||
gtk_widget_show( menuItem );
|
||||
m_items.Append( mitem );
|
||||
@@ -449,6 +474,14 @@ void wxMenu::Append( int id, const wxString &text, wxMenu *subMenu, const wxStri
|
||||
mitem->SetMenuItem(menuItem);
|
||||
mitem->SetSubMenu(subMenu);
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menuItem), "select",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_hilight_callback),
|
||||
(gpointer*)this );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menuItem), "deselect",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_nolight_callback),
|
||||
(gpointer*)this );
|
||||
|
||||
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), subMenu->m_menu );
|
||||
gtk_menu_append( GTK_MENU(m_menu), menuItem );
|
||||
gtk_widget_show( menuItem );
|
||||
|
@@ -298,6 +298,27 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
if (win) win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "deselect"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
{
|
||||
int id = menu->FindMenuIdByMenuItem(widget);
|
||||
|
||||
wxASSERT( id != -1 ); // should find it!
|
||||
|
||||
if (!menu->IsEnabled(id)) return;
|
||||
|
||||
wxMenuEvent event( wxEVT_MENU_HIGHLIGHT, -1 );
|
||||
event.SetEventObject( menu );
|
||||
|
||||
if (menu->GetEventHandler()->ProcessEvent(event)) return;
|
||||
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win) win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuItem
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -433,6 +454,10 @@ void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool
|
||||
GTK_SIGNAL_FUNC(gtk_menu_hilight_callback),
|
||||
(gpointer*)this );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menuItem), "deselect",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_nolight_callback),
|
||||
(gpointer*)this );
|
||||
|
||||
gtk_menu_append( GTK_MENU(m_menu), menuItem );
|
||||
gtk_widget_show( menuItem );
|
||||
m_items.Append( mitem );
|
||||
@@ -449,6 +474,14 @@ void wxMenu::Append( int id, const wxString &text, wxMenu *subMenu, const wxStri
|
||||
mitem->SetMenuItem(menuItem);
|
||||
mitem->SetSubMenu(subMenu);
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menuItem), "select",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_hilight_callback),
|
||||
(gpointer*)this );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menuItem), "deselect",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_nolight_callback),
|
||||
(gpointer*)this );
|
||||
|
||||
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), subMenu->m_menu );
|
||||
gtk_menu_append( GTK_MENU(m_menu), menuItem );
|
||||
gtk_widget_show( menuItem );
|
||||
|
Reference in New Issue
Block a user