Compile fix in dialup,
Removed GTK's native tab traversal and fixed some related probs, Fixed a crash in wxListCtrl, Added configure correction ofr HP-UX GNU shared linker. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1718,7 +1718,7 @@ if test "$wxUSE_SHARED" = "yes"; then
|
||||
case "${host}" in
|
||||
*-hp-hpux* )
|
||||
if test "$GCC" = yes ; then
|
||||
SHARED_LD="${CC} -shared -o"
|
||||
SHARED_LD="${CC} -shared -fPIC -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
else
|
||||
SHARED_LD="${CXX} -b -o"
|
||||
|
@@ -2225,10 +2225,10 @@ void wxListMainWindow::CalculatePositions()
|
||||
line->GetSize( lineWidth, lineHeight );
|
||||
if (lineWidth > maxWidth) maxWidth = lineWidth;
|
||||
y += lineSpacing;
|
||||
if (m_currentVisibleLines > m_visibleLines)
|
||||
m_visibleLines = m_currentVisibleLines;
|
||||
if (y+lineSpacing-6 >= clientHeight) // -6 for earlier "line breaking"
|
||||
{
|
||||
if (m_currentVisibleLines > m_visibleLines)
|
||||
m_visibleLines = m_currentVisibleLines;
|
||||
m_currentVisibleLines = 0;
|
||||
y = 5;
|
||||
x += maxWidth+6;
|
||||
@@ -2247,7 +2247,6 @@ void wxListMainWindow::CalculatePositions()
|
||||
if (!node) tries = 1; // everything fits, no second try required
|
||||
}
|
||||
}
|
||||
// m_visibleLines = (5+clientHeight+6) / (lineSpacing); // +6 for earlier "line breaking"
|
||||
|
||||
int scroll_pos = GetScrollPos( wxHORIZONTAL );
|
||||
SetScrollbars( m_xScroll, m_yScroll, (entireWidth+15) / m_xScroll, 0, scroll_pos, 0, TRUE );
|
||||
|
@@ -190,7 +190,7 @@ void wxPanel::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
void wxPanel::SetFocus()
|
||||
{
|
||||
// If the panel gets the focus *by way of getting it set directly*
|
||||
// we move it to the first window that can get it.
|
||||
// we move the focus to the first window that can get it.
|
||||
|
||||
wxNode *node = GetChildren().First();
|
||||
while (node)
|
||||
@@ -213,13 +213,15 @@ void wxPanel::SetFocus()
|
||||
void wxPanel::OnFocus(wxFocusEvent& event)
|
||||
{
|
||||
// If the panel gets the focus *by way of getting clicked on*
|
||||
// we move it to either the last window that had the focus or
|
||||
// the first one that can get it.
|
||||
// we move the focus to either the last window that had the
|
||||
// focus or the first one that can get it.
|
||||
|
||||
if (m_winLastFocused)
|
||||
{
|
||||
// it might happen that the window got reparented...
|
||||
if ( m_winLastFocused->GetParent() == this )
|
||||
// It might happen that the window got reparented or no longer
|
||||
// accepts the focus.
|
||||
if ((m_winLastFocused->GetParent() == this) &&
|
||||
(m_winLastFocused->AcceptsFocus()))
|
||||
{
|
||||
m_winLastFocused->SetFocus();
|
||||
return;
|
||||
|
@@ -14,16 +14,12 @@
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/cursor.h"
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "wx/gtk/win_gtk.h"
|
||||
#include "wx/cursor.h"
|
||||
|
||||
/*
|
||||
#include "gdk/gdkprivate.h"
|
||||
#include "gdk/gdkx.h"
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// idle system
|
||||
@@ -39,6 +35,20 @@ extern int g_openDialogs;
|
||||
|
||||
extern wxList wxPendingDelete;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "focus" from m_window
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static gint gtk_dialog_focus_callback( GtkWidget *widget, GtkDirectionType WXUNUSED(d), wxWindow *WXUNUSED(win) )
|
||||
{
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
// This disables GTK's tab traversal
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus" );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "delete_event"
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -268,6 +278,9 @@ bool wxDialog::Create( wxWindow *parent,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// All dialogs should really have this style
|
||||
m_windowStyle |= wxTAB_TRAVERSAL;
|
||||
|
||||
m_insertCallback = (wxInsertChildFunction) wxInsertChildInDialog;
|
||||
|
||||
m_widget = gtk_window_new( GTK_WINDOW_DIALOG );
|
||||
@@ -307,6 +320,10 @@ bool wxDialog::Create( wxWindow *parent,
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event",
|
||||
GTK_SIGNAL_FUNC(gtk_dialog_configure_callback), (gpointer)this );
|
||||
|
||||
/* disable native tab traversal */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "focus",
|
||||
GTK_SIGNAL_FUNC(gtk_dialog_focus_callback), (gpointer)this );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -63,6 +63,20 @@ extern void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar
|
||||
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "focus" from m_window
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static gint gtk_frame_focus_callback( GtkWidget *widget, GtkDirectionType WXUNUSED(d), wxWindow *WXUNUSED(win) )
|
||||
{
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
// This disables GTK's tab traversal
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus" );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "size_allocate"
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -465,6 +479,10 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event",
|
||||
GTK_SIGNAL_FUNC(gtk_frame_configure_callback), (gpointer)this );
|
||||
|
||||
/* disable native tab traversal */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "focus",
|
||||
GTK_SIGNAL_FUNC(gtk_frame_focus_callback), (gpointer)this );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,7 @@ extern bool g_isIdle;
|
||||
// data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern bool g_blockEventsOnDrag;
|
||||
extern bool g_blockEventsOnDrag;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "clicked"
|
||||
@@ -334,7 +334,6 @@ void wxRadioBox::SetFocus()
|
||||
if (button->active)
|
||||
{
|
||||
gtk_widget_grab_focus( GTK_WIDGET(button) );
|
||||
|
||||
return;
|
||||
}
|
||||
node = node->Next();
|
||||
|
@@ -795,29 +795,6 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
Damn, I forgot why this didn't work, but it didn't work.
|
||||
|
||||
// win is a panel: up can be propagated to the panel
|
||||
if ((!ret) && (win->m_wxwindow) && (win->m_parent) && (win->m_parent->AcceptsFocus()) &&
|
||||
(gdk_event->keyval == GDK_Up))
|
||||
{
|
||||
win->m_parent->SetFocus();
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
// win is a panel: left/right can be propagated to the panel
|
||||
if ((!ret) && (win->m_wxwindow) &&
|
||||
((gdk_event->keyval == GDK_Right) || (gdk_event->keyval == GDK_Left) ||
|
||||
(gdk_event->keyval == GDK_Up) || (gdk_event->keyval == GDK_Down)))
|
||||
{
|
||||
wxNavigationKeyEvent new_event;
|
||||
new_event.SetDirection( (gdk_event->keyval == GDK_Right) || (gdk_event->keyval == GDK_Down) );
|
||||
new_event.SetCurrentFocus( win );
|
||||
ret = win->GetEventHandler()->ProcessEvent( new_event );
|
||||
}
|
||||
*/
|
||||
|
||||
if (ret)
|
||||
{
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" );
|
||||
|
@@ -14,16 +14,12 @@
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/cursor.h"
|
||||
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "wx/gtk/win_gtk.h"
|
||||
#include "wx/cursor.h"
|
||||
|
||||
/*
|
||||
#include "gdk/gdkprivate.h"
|
||||
#include "gdk/gdkx.h"
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// idle system
|
||||
@@ -39,6 +35,20 @@ extern int g_openDialogs;
|
||||
|
||||
extern wxList wxPendingDelete;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "focus" from m_window
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static gint gtk_dialog_focus_callback( GtkWidget *widget, GtkDirectionType WXUNUSED(d), wxWindow *WXUNUSED(win) )
|
||||
{
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
// This disables GTK's tab traversal
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus" );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "delete_event"
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -268,6 +278,9 @@ bool wxDialog::Create( wxWindow *parent,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// All dialogs should really have this style
|
||||
m_windowStyle |= wxTAB_TRAVERSAL;
|
||||
|
||||
m_insertCallback = (wxInsertChildFunction) wxInsertChildInDialog;
|
||||
|
||||
m_widget = gtk_window_new( GTK_WINDOW_DIALOG );
|
||||
@@ -307,6 +320,10 @@ bool wxDialog::Create( wxWindow *parent,
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event",
|
||||
GTK_SIGNAL_FUNC(gtk_dialog_configure_callback), (gpointer)this );
|
||||
|
||||
/* disable native tab traversal */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "focus",
|
||||
GTK_SIGNAL_FUNC(gtk_dialog_focus_callback), (gpointer)this );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -63,6 +63,20 @@ extern void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar
|
||||
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "focus" from m_window
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static gint gtk_frame_focus_callback( GtkWidget *widget, GtkDirectionType WXUNUSED(d), wxWindow *WXUNUSED(win) )
|
||||
{
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
// This disables GTK's tab traversal
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus" );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "size_allocate"
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -465,6 +479,10 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event",
|
||||
GTK_SIGNAL_FUNC(gtk_frame_configure_callback), (gpointer)this );
|
||||
|
||||
/* disable native tab traversal */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "focus",
|
||||
GTK_SIGNAL_FUNC(gtk_frame_focus_callback), (gpointer)this );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,7 @@ extern bool g_isIdle;
|
||||
// data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern bool g_blockEventsOnDrag;
|
||||
extern bool g_blockEventsOnDrag;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "clicked"
|
||||
@@ -334,7 +334,6 @@ void wxRadioBox::SetFocus()
|
||||
if (button->active)
|
||||
{
|
||||
gtk_widget_grab_focus( GTK_WIDGET(button) );
|
||||
|
||||
return;
|
||||
}
|
||||
node = node->Next();
|
||||
|
@@ -795,29 +795,6 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
Damn, I forgot why this didn't work, but it didn't work.
|
||||
|
||||
// win is a panel: up can be propagated to the panel
|
||||
if ((!ret) && (win->m_wxwindow) && (win->m_parent) && (win->m_parent->AcceptsFocus()) &&
|
||||
(gdk_event->keyval == GDK_Up))
|
||||
{
|
||||
win->m_parent->SetFocus();
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
// win is a panel: left/right can be propagated to the panel
|
||||
if ((!ret) && (win->m_wxwindow) &&
|
||||
((gdk_event->keyval == GDK_Right) || (gdk_event->keyval == GDK_Left) ||
|
||||
(gdk_event->keyval == GDK_Up) || (gdk_event->keyval == GDK_Down)))
|
||||
{
|
||||
wxNavigationKeyEvent new_event;
|
||||
new_event.SetDirection( (gdk_event->keyval == GDK_Right) || (gdk_event->keyval == GDK_Down) );
|
||||
new_event.SetCurrentFocus( win );
|
||||
ret = win->GetEventHandler()->ProcessEvent( new_event );
|
||||
}
|
||||
*/
|
||||
|
||||
if (ret)
|
||||
{
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" );
|
||||
|
@@ -524,7 +524,7 @@ wxDialUpManagerImpl::CheckIfconfig(void)
|
||||
|| strstr(output,"sl") // slip
|
||||
|| strstr(output,"pl") // plip
|
||||
#else
|
||||
wxASSERT(0); // unreachable code
|
||||
FALSE
|
||||
#endif
|
||||
)
|
||||
rc = 1;
|
||||
|
Reference in New Issue
Block a user