]> git.saurik.com Git - wxWidgets.git/commitdiff
libjpeg not used by default (it didn't even link)
authorRobert Roebling <robert@roebling.de>
Fri, 5 Feb 1999 19:07:42 +0000 (19:07 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 5 Feb 1999 19:07:42 +0000 (19:07 +0000)
  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

configure
configure.in
src/gtk/menu.cpp
src/gtk1/menu.cpp

index 04fd49fbfb54bbdc07d3771bf74e81fd98678cfb..167c981c990cec711a82b660de3944f9071bef28 100755 (executable)
--- a/configure
+++ b/configure
@@ -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
index fca457f34673409386a850075e6d7bc47d42638d..c76a98080559c707fd15e4df8057883a6e3af214 100644 (file)
@@ -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
index 110c8f958f4a634dadd92713e2398abd43453911..faa9236de76a6e8090038432db1e3339fae488fc 100644 (file)
@@ -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 );
index 110c8f958f4a634dadd92713e2398abd43453911..faa9236de76a6e8090038432db1e3339fae488fc 100644 (file)
@@ -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 );