diff options
author | Matthias Clasen <mclasen@fedoraproject.org> | 2010-06-21 14:34:25 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@fedoraproject.org> | 2010-06-21 14:34:25 +0000 |
commit | 15308e3ea9c2cb755ff12fcca9bac0b54d2d4c5a (patch) | |
tree | 21c649e777bcc897b289f681d2040053cd56c5b4 /0001-Prevent-concurrent-use-of-GTK-2-and-3.patch | |
parent | fix spec (diff) | |
download | gtk3-classic-build-gtk3-15308e3ea9c2cb755ff12fcca9bac0b54d2d4c5a.tar.gz gtk3-classic-build-gtk3-15308e3ea9c2cb755ff12fcca9bac0b54d2d4c5a.tar.bz2 gtk3-classic-build-gtk3-15308e3ea9c2cb755ff12fcca9bac0b54d2d4c5a.zip |
2.90.3
Diffstat (limited to '0001-Prevent-concurrent-use-of-GTK-2-and-3.patch')
-rw-r--r-- | 0001-Prevent-concurrent-use-of-GTK-2-and-3.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/0001-Prevent-concurrent-use-of-GTK-2-and-3.patch b/0001-Prevent-concurrent-use-of-GTK-2-and-3.patch new file mode 100644 index 0000000..d49b478 --- /dev/null +++ b/0001-Prevent-concurrent-use-of-GTK-2-and-3.patch @@ -0,0 +1,49 @@ +From 2a2843c041d8d20da7ddd130812451bc93f83e42 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen <mclasen@redhat.com> +Date: Fri, 18 Jun 2010 22:27:26 -0400 +Subject: [PATCH] Prevent concurrent use of GTK+ 2 and 3 + +If we detect a gtk2-only symbol, error out early. +--- + gtk/gtkmain.c | 18 ++++++++++++++++++ + 1 files changed, 18 insertions(+), 0 deletions(-) + +diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c +index 017d000..2220658 100644 +--- a/gtk/gtkmain.c ++++ b/gtk/gtkmain.c +@@ -608,6 +608,22 @@ setlocale_initialization (void) + } + + static void ++check_mixed_deps (void) ++{ ++ GModule *module; ++ gpointer func; ++ ++ module = g_module_open (NULL, 0); ++ ++ if (g_module_symbol (module, "gtk_progress_get_type", &func)) ++ { ++ g_error ("GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported"); ++ } ++ ++ g_module_close (module); ++} ++ ++static void + do_pre_parse_initialization (int *argc, + char ***argv) + { +@@ -618,6 +634,8 @@ do_pre_parse_initialization (int *argc, + + pre_initialized = TRUE; + ++ check_mixed_deps (); ++ + gdk_pre_parse_libgtk_only (); + gdk_event_handler_set ((GdkEventFunc)gtk_main_do_event, NULL, NULL); + +-- +1.7.1 + |