You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.9 KiB
63 lines
2.9 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../wxwidgets24/gtk.patch |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
diff -Naur wxPythonSrc-2.4.2.4_orig/src/gtk/menu.cpp wxPythonSrc-2.4.2.4/src/gtk/menu.cpp |
|
--- wxPythonSrc-2.4.2.4_orig/src/gtk/menu.cpp 2003-09-22 21:09:53.000000000 +0200 |
|
+++ wxPythonSrc-2.4.2.4/src/gtk/menu.cpp 2005-03-31 15:59:17.027519408 +0200 |
|
@@ -30,13 +30,13 @@ |
|
#ifdef __WXGTK20__ |
|
#include <glib-object.h> |
|
|
|
- #define gtk_accel_group_attach(g, o) _gtk_accel_group_attach((g), (o)) |
|
- #define gtk_accel_group_detach(g, o) _gtk_accel_group_detach((g), (o)) |
|
+ #define gtk_accel_group_attach(g, o) gtk_window_add_accel_group((o), (g)) |
|
+ #define gtk_accel_group_detach(g, o) gtk_window_remove_accel_group((o), (g)) |
|
#define gtk_menu_ensure_uline_accel_group(m) gtk_menu_get_accel_group(m) |
|
|
|
- #define ACCEL_OBJECT GObject |
|
+ #define ACCEL_OBJECT GtkWindow |
|
#define ACCEL_OBJECTS(a) (a)->acceleratables |
|
- #define ACCEL_OBJ_CAST(obj) G_OBJECT(obj) |
|
+ #define ACCEL_OBJ_CAST(obj) ((GtkWindow*) obj) |
|
#else // GTK+ 1.x |
|
#define ACCEL_OBJECT GtkObject |
|
#define ACCEL_OBJECTS(a) (a)->attach_objects |
|
diff -Naur wxPythonSrc-2.4.2.4_orig/src/gtk/settings.cpp wxPythonSrc-2.4.2.4/src/gtk/settings.cpp |
|
--- wxPythonSrc-2.4.2.4_orig/src/gtk/settings.cpp 2003-06-25 21:12:40.000000000 +0200 |
|
+++ wxPythonSrc-2.4.2.4/src/gtk/settings.cpp 2005-03-31 15:59:17.028519256 +0200 |
|
@@ -340,9 +340,20 @@ |
|
} |
|
else |
|
{ |
|
- const gchar *font_name = |
|
- _gtk_rc_context_get_default_font_name(gtk_settings_get_default()); |
|
- g_systemFont = new wxFont(wxString::FromAscii(font_name)); |
|
+ GtkSettings *settings = gtk_settings_get_default(); |
|
+ gchar *font_name = NULL; |
|
+ g_object_get ( settings, |
|
+ "gtk-font-name", |
|
+ &font_name, |
|
+ NULL); |
|
+ |
|
+ if (!font_name) |
|
+ g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL ); |
|
+ |
|
+ else |
|
+ g_systemFont = new wxFont(wxString::FromAscii(font_name)); |
|
+ g_free (font_name); |
|
+ |
|
} |
|
gtk_widget_destroy( widget ); |
|
#else
|
|
|