]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/menu.cpp
Initialize m_privData before doign the assignment
[wxWidgets.git] / src / gtk1 / menu.cpp
index 7922dd438b03a2c416f4221e38aa74aa151a6ff3..00919081b2613fa340ee1b1e33ce14939c72ab78 100644 (file)
@@ -96,12 +96,14 @@ struct _GtkPixmapMenuItemClass
     guint have_pixmap_count;
 };
 
     guint have_pixmap_count;
 };
 
-
+extern "C" {
 GtkType    gtk_pixmap_menu_item_get_type       (void);
 GtkWidget* gtk_pixmap_menu_item_new            (void);
 void       gtk_pixmap_menu_item_set_pixmap     (GtkPixmapMenuItem *menu_item,
 GtkType    gtk_pixmap_menu_item_get_type       (void);
 GtkWidget* gtk_pixmap_menu_item_new            (void);
 void       gtk_pixmap_menu_item_set_pixmap     (GtkPixmapMenuItem *menu_item,
-                                                                    GtkWidget *pixmap);
-#endif // GTK 2.0
+                                                GtkWidget *pixmap);
+}
+
+#endif // !__WXGTK20__
 
 //-----------------------------------------------------------------------------
 // idle system
 
 //-----------------------------------------------------------------------------
 // idle system
@@ -149,6 +151,7 @@ static wxString wxReplaceUnderscore( const wxString& title )
 // activate message from GTK
 //-----------------------------------------------------------------------------
 
 // activate message from GTK
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_menu_open_callback( GtkWidget *widget, wxMenu *menu )
 {
     if (g_isIdle) wxapp_install_idle_handler();
 static void gtk_menu_open_callback( GtkWidget *widget, wxMenu *menu )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -163,6 +166,7 @@ static void gtk_menu_open_callback( GtkWidget *widget, wxMenu *menu )
     wxWindow *win = menu->GetInvokingWindow();
     if (win) win->GetEventHandler()->ProcessEvent( event );
 }
     wxWindow *win = menu->GetInvokingWindow();
     if (win) win->GetEventHandler()->ProcessEvent( event );
 }
+}
 
 //-----------------------------------------------------------------------------
 // wxMenuBar
 
 //-----------------------------------------------------------------------------
 // wxMenuBar
@@ -581,6 +585,7 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label )
 // "activate"
 //-----------------------------------------------------------------------------
 
 // "activate"
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
 {
     if (g_isIdle)
 static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
 {
     if (g_isIdle)
@@ -651,11 +656,13 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
         menu->SendEvent(id, item->IsCheckable() ? item->IsChecked() : -1);
     }
 }
         menu->SendEvent(id, item->IsCheckable() ? item->IsChecked() : -1);
     }
 }
+}
 
 //-----------------------------------------------------------------------------
 // "select"
 //-----------------------------------------------------------------------------
 
 
 //-----------------------------------------------------------------------------
 // "select"
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
 {
     if (g_isIdle) wxapp_install_idle_handler();
 static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -677,11 +684,13 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
     wxWindow *win = menu->GetInvokingWindow();
     if (win) win->GetEventHandler()->ProcessEvent( event );
 }
     wxWindow *win = menu->GetInvokingWindow();
     if (win) win->GetEventHandler()->ProcessEvent( event );
 }
+}
 
 //-----------------------------------------------------------------------------
 // "deselect"
 //-----------------------------------------------------------------------------
 
 
 //-----------------------------------------------------------------------------
 // "deselect"
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
 {
     if (g_isIdle) wxapp_install_idle_handler();
 static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -704,6 +713,7 @@ static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
     if (win)
         win->GetEventHandler()->ProcessEvent( event );
 }
     if (win)
         win->GetEventHandler()->ProcessEvent( event );
 }
+}
 
 //-----------------------------------------------------------------------------
 // wxMenuItem
 
 //-----------------------------------------------------------------------------
 // wxMenuItem
@@ -1525,7 +1535,7 @@ static void changed_have_pixmap_status         (GtkPixmapMenuItem *menu_item);
 
 static GtkMenuItemClass *parent_class = NULL;
 
 
 static GtkMenuItemClass *parent_class = NULL;
 
-}
+} // extern "C"
 
 #define BORDER_SPACING  3
 #define PMAP_WIDTH 20
 
 #define BORDER_SPACING  3
 #define PMAP_WIDTH 20
@@ -1556,6 +1566,8 @@ gtk_pixmap_menu_item_get_type (void)
   return pixmap_menu_item_type;
 }
 
   return pixmap_menu_item_type;
 }
 
+extern "C" {
+
 /**
  * gtk_pixmap_menu_item_new
  *
 /**
  * gtk_pixmap_menu_item_new
  *
@@ -1834,5 +1846,7 @@ changed_have_pixmap_status (GtkPixmapMenuItem *menu_item)
     gtk_widget_queue_resize(GTK_WIDGET(menu_item));
 }
 
     gtk_widget_queue_resize(GTK_WIDGET(menu_item));
 }
 
-#endif
+} // extern "C"
+
+#endif // !__WXGTK20__