OpenSDE Packages Database (without history before r20070)
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

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../wxwidgets24/gtk.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. diff -Naur wxPythonSrc-2.4.2.4_orig/src/gtk/menu.cpp wxPythonSrc-2.4.2.4/src/gtk/menu.cpp
  17. --- wxPythonSrc-2.4.2.4_orig/src/gtk/menu.cpp 2003-09-22 21:09:53.000000000 +0200
  18. +++ wxPythonSrc-2.4.2.4/src/gtk/menu.cpp 2005-03-31 15:59:17.027519408 +0200
  19. @@ -30,13 +30,13 @@
  20. #ifdef __WXGTK20__
  21. #include <glib-object.h>
  22. - #define gtk_accel_group_attach(g, o) _gtk_accel_group_attach((g), (o))
  23. - #define gtk_accel_group_detach(g, o) _gtk_accel_group_detach((g), (o))
  24. + #define gtk_accel_group_attach(g, o) gtk_window_add_accel_group((o), (g))
  25. + #define gtk_accel_group_detach(g, o) gtk_window_remove_accel_group((o), (g))
  26. #define gtk_menu_ensure_uline_accel_group(m) gtk_menu_get_accel_group(m)
  27. - #define ACCEL_OBJECT GObject
  28. + #define ACCEL_OBJECT GtkWindow
  29. #define ACCEL_OBJECTS(a) (a)->acceleratables
  30. - #define ACCEL_OBJ_CAST(obj) G_OBJECT(obj)
  31. + #define ACCEL_OBJ_CAST(obj) ((GtkWindow*) obj)
  32. #else // GTK+ 1.x
  33. #define ACCEL_OBJECT GtkObject
  34. #define ACCEL_OBJECTS(a) (a)->attach_objects
  35. diff -Naur wxPythonSrc-2.4.2.4_orig/src/gtk/settings.cpp wxPythonSrc-2.4.2.4/src/gtk/settings.cpp
  36. --- wxPythonSrc-2.4.2.4_orig/src/gtk/settings.cpp 2003-06-25 21:12:40.000000000 +0200
  37. +++ wxPythonSrc-2.4.2.4/src/gtk/settings.cpp 2005-03-31 15:59:17.028519256 +0200
  38. @@ -340,9 +340,20 @@
  39. }
  40. else
  41. {
  42. - const gchar *font_name =
  43. - _gtk_rc_context_get_default_font_name(gtk_settings_get_default());
  44. - g_systemFont = new wxFont(wxString::FromAscii(font_name));
  45. + GtkSettings *settings = gtk_settings_get_default();
  46. + gchar *font_name = NULL;
  47. + g_object_get ( settings,
  48. + "gtk-font-name",
  49. + &font_name,
  50. + NULL);
  51. +
  52. + if (!font_name)
  53. + g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL );
  54. +
  55. + else
  56. + g_systemFont = new wxFont(wxString::FromAscii(font_name));
  57. + g_free (font_name);
  58. +
  59. }
  60. gtk_widget_destroy( widget );
  61. #else