Updated distrib.
Corrected listbox dclick. Modified char/key event stuff. Added WXWIN_COMPATIBILITY_2 = 1 to setup.hin git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
46499442ee
commit
74505862d0
@ -440,6 +440,16 @@ cp *.cpp ~/wxgtk_dist/wxGTK/samples/dynamic
|
||||
cp *.xpm ~/wxgtk_dist/wxGTK/samples/dynamic
|
||||
cd ..
|
||||
|
||||
echo Drawing sample..
|
||||
|
||||
cd drawing
|
||||
mkdir ~/wxgtk_dist/wxGTK/samples/drawing
|
||||
cp Makefile ~/wxgtk_dist/wxGTK/samples/drawing
|
||||
cp Makefile.in ~/wxgtk_dist/wxGTK/samples/drawing
|
||||
cp *.cpp ~/wxgtk_dist/wxGTK/samples/drawing
|
||||
cp *.xpm ~/wxgtk_dist/wxGTK/samples/drawing
|
||||
cd ..
|
||||
|
||||
echo Forty sample..
|
||||
|
||||
cd forty
|
||||
|
@ -271,11 +271,17 @@
|
||||
* Use Apple Ieee-double converter
|
||||
*/
|
||||
#define wxUSE_APPLE_IEEE 0
|
||||
/* Compatibility with 1.66 API.
|
||||
Level 0: no backward compatibility, all new features
|
||||
Level 1: wxDC, OnSize (etc.) compatibility, but
|
||||
some new features such as event tables */
|
||||
#define WXWIN_COMPATIBILITY 0
|
||||
/*
|
||||
* Compatibility with 1.66 API.
|
||||
* Level 0: no backward compatibility, all new features
|
||||
* Level 1: wxDC, OnSize (etc.) compatibility, but
|
||||
* some new features such as event tables
|
||||
*/
|
||||
#define WXWIN_COMPATIBILITY 0
|
||||
/*
|
||||
* Compatibility with 2.0 API.
|
||||
*/
|
||||
#define WXWIN_COMPATIBILITY_2 1
|
||||
/*
|
||||
* Enables debugging: memory tracing, assert, etc., contains debug level
|
||||
*/
|
||||
|
@ -457,6 +457,11 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
(GtkSignalFunc)gtk_listbox_button_press_callback,
|
||||
(gpointer) this );
|
||||
|
||||
gtk_signal_connect_after( GTK_OBJECT(list_item),
|
||||
"button_release_event",
|
||||
(GtkSignalFunc)gtk_listbox_button_release_callback,
|
||||
(gpointer) this );
|
||||
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(list_item),
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include "gtk/gtk.h"
|
||||
#include "gdk/gdkprivate.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gdk/gdkx.h"
|
||||
#include "wx/gtk/win_gtk.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -386,14 +385,6 @@ static long map_to_wx_keysym( KeySym keysym )
|
||||
return (key_code);
|
||||
}
|
||||
|
||||
static long get_unmodified_wx_keysym( GdkEventKey *event )
|
||||
{
|
||||
KeyCode keycode = XKeysymToKeycode( GDK_DISPLAY(), event->keyval );
|
||||
KeySym keysym = XKeycodeToKeysym( GDK_DISPLAY(), keycode, 0 );
|
||||
|
||||
return (map_to_unmodified_wx_keysym( keysym ));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// local code (see below)
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -568,7 +559,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
GdkModifierType state;
|
||||
if (gdk_event->window) gdk_window_get_pointer(gdk_event->window, &x, &y, &state);
|
||||
|
||||
long key_code = get_unmodified_wx_keysym( gdk_event );
|
||||
long key_code = map_to_unmodified_wx_keysym( gdk_event->keyval );
|
||||
|
||||
/* sending unknown key events doesn't really make sense */
|
||||
if (key_code == 0) return FALSE;
|
||||
@ -704,7 +695,7 @@ static gint gtk_window_key_release_callback( GtkWidget *widget, GdkEventKey *gdk
|
||||
printf( "\n" );
|
||||
*/
|
||||
|
||||
long key_code = get_unmodified_wx_keysym( gdk_event );
|
||||
long key_code = map_to_unmodified_wx_keysym( gdk_event->keyval );
|
||||
|
||||
/* sending unknown key events doesn't really make sense */
|
||||
if (key_code == 0) return FALSE;
|
||||
|
@ -457,6 +457,11 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
(GtkSignalFunc)gtk_listbox_button_press_callback,
|
||||
(gpointer) this );
|
||||
|
||||
gtk_signal_connect_after( GTK_OBJECT(list_item),
|
||||
"button_release_event",
|
||||
(GtkSignalFunc)gtk_listbox_button_release_callback,
|
||||
(gpointer) this );
|
||||
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(list_item),
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include "gtk/gtk.h"
|
||||
#include "gdk/gdkprivate.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gdk/gdkx.h"
|
||||
#include "wx/gtk/win_gtk.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -386,14 +385,6 @@ static long map_to_wx_keysym( KeySym keysym )
|
||||
return (key_code);
|
||||
}
|
||||
|
||||
static long get_unmodified_wx_keysym( GdkEventKey *event )
|
||||
{
|
||||
KeyCode keycode = XKeysymToKeycode( GDK_DISPLAY(), event->keyval );
|
||||
KeySym keysym = XKeycodeToKeysym( GDK_DISPLAY(), keycode, 0 );
|
||||
|
||||
return (map_to_unmodified_wx_keysym( keysym ));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// local code (see below)
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -568,7 +559,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
GdkModifierType state;
|
||||
if (gdk_event->window) gdk_window_get_pointer(gdk_event->window, &x, &y, &state);
|
||||
|
||||
long key_code = get_unmodified_wx_keysym( gdk_event );
|
||||
long key_code = map_to_unmodified_wx_keysym( gdk_event->keyval );
|
||||
|
||||
/* sending unknown key events doesn't really make sense */
|
||||
if (key_code == 0) return FALSE;
|
||||
@ -704,7 +695,7 @@ static gint gtk_window_key_release_callback( GtkWidget *widget, GdkEventKey *gdk
|
||||
printf( "\n" );
|
||||
*/
|
||||
|
||||
long key_code = get_unmodified_wx_keysym( gdk_event );
|
||||
long key_code = map_to_unmodified_wx_keysym( gdk_event->keyval );
|
||||
|
||||
/* sending unknown key events doesn't really make sense */
|
||||
if (key_code == 0) return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user