diff options
| author | Dmitry Antipov | 2013-09-17 10:33:24 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-09-17 10:33:24 +0400 |
| commit | 19452b86657532741d78fa3bcc12b12b58a8a54b (patch) | |
| tree | 5c928382e6df92cb838f8483415b8932bb3e15a4 /src | |
| parent | 1149ffdb07563832d2593320d79970c8266ae85c (diff) | |
| download | emacs-19452b86657532741d78fa3bcc12b12b58a8a54b.tar.gz emacs-19452b86657532741d78fa3bcc12b12b58a8a54b.zip | |
* configure.ac: Do not check for g_type_init because we
require glib >= 2.28 for GTK3, glib >= 2.10 for GTK2,
glib >= 2.26 for GSettings and glib >= 2.7.0 for GConf, so
suitable glib should provide g_type_init unconditionally.
* src/image.c (fn_g_type_init) [WINDOWSNT]: Define and load
only if Glib < 2.36.0.
(fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
* src/xsettings.c (init_gconf, init_gsettings): Do not check
for g_type_init.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/image.c | 13 | ||||
| -rw-r--r-- | src/xsettings.c | 4 |
3 files changed, 19 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ceae9e1a63e..c3c64f79d89 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * image.c (fn_g_type_init) [WINDOWSNT]: Define and load | ||
| 4 | only if Glib < 2.36.0. | ||
| 5 | (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0. | ||
| 6 | * xsettings.c (init_gconf, init_gsettings): Do not check | ||
| 7 | for g_type_init. | ||
| 8 | |||
| 1 | 2013-09-16 Jan Djärv <jan.h.d@swipnet.se> | 9 | 2013-09-16 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 10 | ||
| 3 | * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0 | 11 | * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0 |
diff --git a/src/image.c b/src/image.c index f0f7ff4b01f..e3159533664 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8590,7 +8590,9 @@ DEF_IMGLIB_FN (int, gdk_pixbuf_get_n_channels, (const GdkPixbuf *)); | |||
| 8590 | DEF_IMGLIB_FN (gboolean, gdk_pixbuf_get_has_alpha, (const GdkPixbuf *)); | 8590 | DEF_IMGLIB_FN (gboolean, gdk_pixbuf_get_has_alpha, (const GdkPixbuf *)); |
| 8591 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_bits_per_sample, (const GdkPixbuf *)); | 8591 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_bits_per_sample, (const GdkPixbuf *)); |
| 8592 | 8592 | ||
| 8593 | #if ! GLIB_CHECK_VERSION (2, 36, 0) | ||
| 8593 | DEF_IMGLIB_FN (void, g_type_init, (void)); | 8594 | DEF_IMGLIB_FN (void, g_type_init, (void)); |
| 8595 | #endif | ||
| 8594 | DEF_IMGLIB_FN (void, g_object_unref, (gpointer)); | 8596 | DEF_IMGLIB_FN (void, g_object_unref, (gpointer)); |
| 8595 | DEF_IMGLIB_FN (void, g_error_free, (GError *)); | 8597 | DEF_IMGLIB_FN (void, g_error_free, (GError *)); |
| 8596 | 8598 | ||
| @@ -8622,7 +8624,9 @@ init_svg_functions (void) | |||
| 8622 | LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_has_alpha); | 8624 | LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_has_alpha); |
| 8623 | LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_bits_per_sample); | 8625 | LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_bits_per_sample); |
| 8624 | 8626 | ||
| 8627 | #if ! GLIB_CHECK_VERSION (2, 36, 0) | ||
| 8625 | LOAD_IMGLIB_FN (gobject, g_type_init); | 8628 | LOAD_IMGLIB_FN (gobject, g_type_init); |
| 8629 | #endif | ||
| 8626 | LOAD_IMGLIB_FN (gobject, g_object_unref); | 8630 | LOAD_IMGLIB_FN (gobject, g_object_unref); |
| 8627 | LOAD_IMGLIB_FN (glib, g_error_free); | 8631 | LOAD_IMGLIB_FN (glib, g_error_free); |
| 8628 | 8632 | ||
| @@ -8647,7 +8651,9 @@ init_svg_functions (void) | |||
| 8647 | #define fn_gdk_pixbuf_get_has_alpha gdk_pixbuf_get_has_alpha | 8651 | #define fn_gdk_pixbuf_get_has_alpha gdk_pixbuf_get_has_alpha |
| 8648 | #define fn_gdk_pixbuf_get_bits_per_sample gdk_pixbuf_get_bits_per_sample | 8652 | #define fn_gdk_pixbuf_get_bits_per_sample gdk_pixbuf_get_bits_per_sample |
| 8649 | 8653 | ||
| 8654 | #if ! GLIB_CHECK_VERSION (2, 36, 0) | ||
| 8650 | #define fn_g_type_init g_type_init | 8655 | #define fn_g_type_init g_type_init |
| 8656 | #endif | ||
| 8651 | #define fn_g_object_unref g_object_unref | 8657 | #define fn_g_object_unref g_object_unref |
| 8652 | #define fn_g_error_free g_error_free | 8658 | #define fn_g_error_free g_error_free |
| 8653 | #endif /* !WINDOWSNT */ | 8659 | #endif /* !WINDOWSNT */ |
| @@ -8732,9 +8738,12 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 8732 | int x; | 8738 | int x; |
| 8733 | int y; | 8739 | int y; |
| 8734 | 8740 | ||
| 8735 | /* g_type_init is a glib function that must be called prior to using | 8741 | #if ! GLIB_CHECK_VERSION (2, 36, 0) |
| 8736 | gnome type library functions. */ | 8742 | /* g_type_init is a glib function that must be called prior to |
| 8743 | using gnome type library functions (obsolete since 2.36.0). */ | ||
| 8737 | fn_g_type_init (); | 8744 | fn_g_type_init (); |
| 8745 | #endif | ||
| 8746 | |||
| 8738 | /* Make a handle to a new rsvg object. */ | 8747 | /* Make a handle to a new rsvg object. */ |
| 8739 | rsvg_handle = fn_rsvg_handle_new (); | 8748 | rsvg_handle = fn_rsvg_handle_new (); |
| 8740 | 8749 | ||
diff --git a/src/xsettings.c b/src/xsettings.c index a64e09c92e7..770cd8e4a56 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -803,11 +803,9 @@ init_gsettings (void) | |||
| 803 | const gchar *const *schemas; | 803 | const gchar *const *schemas; |
| 804 | int schema_found = 0; | 804 | int schema_found = 0; |
| 805 | 805 | ||
| 806 | #ifdef HAVE_G_TYPE_INIT | ||
| 807 | #if ! GLIB_CHECK_VERSION (2, 36, 0) | 806 | #if ! GLIB_CHECK_VERSION (2, 36, 0) |
| 808 | g_type_init (); | 807 | g_type_init (); |
| 809 | #endif | 808 | #endif |
| 810 | #endif | ||
| 811 | 809 | ||
| 812 | schemas = g_settings_list_schemas (); | 810 | schemas = g_settings_list_schemas (); |
| 813 | if (schemas == NULL) return; | 811 | if (schemas == NULL) return; |
| @@ -862,11 +860,9 @@ init_gconf (void) | |||
| 862 | #if defined (HAVE_GCONF) | 860 | #if defined (HAVE_GCONF) |
| 863 | char *s; | 861 | char *s; |
| 864 | 862 | ||
| 865 | #ifdef HAVE_G_TYPE_INIT | ||
| 866 | #if ! GLIB_CHECK_VERSION (2, 36, 0) | 863 | #if ! GLIB_CHECK_VERSION (2, 36, 0) |
| 867 | g_type_init (); | 864 | g_type_init (); |
| 868 | #endif | 865 | #endif |
| 869 | #endif | ||
| 870 | 866 | ||
| 871 | gconf_client = gconf_client_get_default (); | 867 | gconf_client = gconf_client_get_default (); |
| 872 | gconf_client_set_error_handling (gconf_client, GCONF_CLIENT_HANDLE_NONE); | 868 | gconf_client_set_error_handling (gconf_client, GCONF_CLIENT_HANDLE_NONE); |