]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/choice.cpp
GTK2: gtk_notebook_set_page -> gtk_notebook_set_current_page
[wxWidgets.git] / src / gtk / choice.cpp
index 1f7e3160428b96de991c51269bdc455fd824e4cb..8765445a98351a98d897b61d215f5ea21708897e 100644 (file)
@@ -334,7 +334,7 @@ int wxChoice::FindString( const wxString &string, bool bCase ) const
         if (bin->child)
             label = GTK_LABEL(bin->child);
         if (!label)
         if (bin->child)
             label = GTK_LABEL(bin->child);
         if (!label)
-            label = GTK_LABEL( BUTTON_CHILD(m_widget) );
+            label = GTK_LABEL(GTK_BIN(m_widget)->child);
 
         wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
 
 
         wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
 
@@ -373,7 +373,7 @@ void wxChoice::SetString( int n, const wxString& str )
             if (bin->child)
                 label = GTK_LABEL(bin->child);
             if (!label)
             if (bin->child)
                 label = GTK_LABEL(bin->child);
             if (!label)
-                label = GTK_LABEL( BUTTON_CHILD(m_widget) );
+                label = GTK_LABEL(GTK_BIN(m_widget)->child);
 
             wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
 
 
             wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
 
@@ -402,7 +402,7 @@ wxString wxChoice::GetString( int n ) const
             if (bin->child)
                 label = GTK_LABEL(bin->child);
             if (!label)
             if (bin->child)
                 label = GTK_LABEL(bin->child);
             if (!label)
-                label = GTK_LABEL( BUTTON_CHILD(m_widget) );
+                label = GTK_LABEL(GTK_BIN(m_widget)->child);
 
             wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
 
 
             wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
 
@@ -475,7 +475,7 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style)
         if (bin->child)
             label = bin->child;
         if (!label)
         if (bin->child)
             label = bin->child;
         if (!label)
-            label = BUTTON_CHILD(m_widget);
+            label = GTK_BIN(m_widget)->child;
 
         gtk_widget_modify_style( label, style );
 
 
         gtk_widget_modify_style( label, style );
 
@@ -495,7 +495,7 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, int pos, const wxString& item)
         // sorted control, need to insert at the correct index
         index = m_strings->Add(item);
 
         // sorted control, need to insert at the correct index
         index = m_strings->Add(item);
 
-        gtk_menu_insert( GTK_MENU(menu), menu_item, index );
+        gtk_menu_shell_insert( GTK_MENU_SHELL(menu), menu_item, index );
 
         if ( index )
         {
 
         if ( index )
         {
@@ -515,13 +515,13 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, int pos, const wxString& item)
         // normal control, just append
         if (pos == (int)m_clientList.GetCount())
         {
         // normal control, just append
         if (pos == (int)m_clientList.GetCount())
         {
-            gtk_menu_append( GTK_MENU(menu), menu_item );
+            gtk_menu_shell_append( GTK_MENU_SHELL(menu), menu_item );
             m_clientList.Append( (wxObject*) NULL );
             index = m_clientList.GetCount() - 1;
         }
         else
         {
             m_clientList.Append( (wxObject*) NULL );
             index = m_clientList.GetCount() - 1;
         }
         else
         {
-            gtk_menu_insert( GTK_MENU(menu), menu_item, pos );
+            gtk_menu_shell_insert( GTK_MENU_SHELL(menu), menu_item, pos );
             m_clientList.Insert( pos, (wxObject*) NULL );
             index = pos;
         }
             m_clientList.Insert( pos, (wxObject*) NULL );
             index = pos;
         }
@@ -541,8 +541,9 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, int pos, const wxString& item)
     // it has to change. Adapted from Matt Ownby.
     InvalidateBestSize();
 
     // it has to change. Adapted from Matt Ownby.
     InvalidateBestSize();
 
-    gtk_signal_connect_after( GTK_OBJECT( menu_item ), "activate",
-      GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
+    g_signal_connect_after (menu_item, "activate",
+                            G_CALLBACK (gtk_choice_clicked_callback),
+                            this);
 
     gtk_widget_show( menu_item );
 
 
     gtk_widget_show( menu_item );