}
}
+#if wxUSE_COMBOBOX
+
extern "C" {
static
void wxgtk_combo_size_request_callback(GtkWidget *widget,
}
}
+#endif // wxUSE_COMBOBOX
+
//-----------------------------------------------------------------------------
// "expose_event" of m_wxwindow
//-----------------------------------------------------------------------------
g_lastButtonNumber = gdk_event->button;
- if (win->m_wxwindow && (g_focusWindow != win) && win->CanAcceptFocus())
+ if (win->m_wxwindow && (g_focusWindow != win) && win->IsFocusable())
{
gtk_widget_grab_focus( win->m_wxwindow );
}
return TRUE;
if ((event_type == wxEVT_LEFT_DOWN) && !win->IsOfStandardClass() &&
- (g_focusWindow != win) && win->CanAcceptFocus())
+ (g_focusWindow != win) && win->IsFocusable())
{
gtk_widget_grab_focus( win->m_wxwindow );
}
G_CALLBACK (gtk_window_size_callback), this);
}
+#if wxUSE_COMBOBOX
if (GTK_IS_COMBO(m_widget))
{
GtkCombo *gcombo = GTK_COMBO(m_widget);
g_signal_connect (gcombo->entry, "size_request",
G_CALLBACK (wxgtk_combo_size_request_callback),
this);
- }
+ } else
+#endif // wxUSE_COMBOBOX
#ifdef GTK_IS_FILE_CHOOSER_BUTTON
- else if (!gtk_check_version(2,6,0) && GTK_IS_FILE_CHOOSER_BUTTON(m_widget))
+ if (!gtk_check_version(2,6,0) && GTK_IS_FILE_CHOOSER_BUTTON(m_widget))
{
// If we connect to the "size_request" signal of a GtkFileChooserButton
// then that control won't be sized properly when placed inside sizers
// (this can be tested removing this elseif and running XRC or WIDGETS samples)
// FIXME: what should be done here ?
- }
+ } else
#endif
- else if ( !IsTopLevel() ) // top level windows use their own callback
+ if ( !IsTopLevel() ) // top level windows use their own callback
{
// This is needed if we want to add our windows into native
// GTK controls, such as the toolbar. With this callback, the
{
if (GTK_IS_CONTAINER(m_widget))
{
+#if wxUSE_RADIOBTN
if (IsKindOf(CLASSINFO(wxRadioButton)))
{
gtk_widget_grab_focus (m_widget);
return;
}
+#endif // wxUSE_RADIOBTN
gtk_widget_child_focus( m_widget, GTK_DIR_TAB_FORWARD );
}
}
else // navigate inside the container
{
- wxWindow *parent = wxGetTopLevelParent(this);
+ wxWindow *parent = wxGetTopLevelParent((wxWindow *)this);
wxCHECK_MSG( parent, false, _T("every window must have a TLW parent") );
GtkDirectionType dir;
pos = 0;
m_scrollPos[dir] = adj->value = pos;
- g_signal_handlers_disconnect_by_func( m_scrollBar[dir],
- (gpointer)gtk_scrollbar_value_changed, this);
+ g_signal_handlers_block_by_func(m_scrollBar[dir],
+ (gpointer)gtk_scrollbar_value_changed, this);
gtk_adjustment_value_changed(adj);
-
- g_signal_connect_after(m_scrollBar[dir], "value_changed",
- G_CALLBACK(gtk_scrollbar_value_changed), this);
+
+ g_signal_handlers_unblock_by_func(m_scrollBar[dir],
+ (gpointer)gtk_scrollbar_value_changed, this);
}
}