Commit dc2933eb authored by Jan Djärv's avatar Jan Djärv

Make Emacs compile when Gtk+ and -DGTK_DISABLE_DEPRECATED is used.

* gtkutil.c (xg_tool_bar_menu_proxy, update_frame_tool_bar): Use
G_CALLBACK instead of GTK_SIGNAL_FUNC which is deprecated.
(xg_initialize): Use g_type_class_ref instead of gtk_type_class which
is deprecated.

* configure.in (HAVE_GTK_FILE_SELECTION, HAVE_GTK_FILE_CHOOSER): Check
if it is declared in gtk.h.
parent c3f9cd46
2009-04-19 Jan Djärv <jan.h.d@swipnet.se>
* configure.in (HAVE_GTK_FILE_SELECTION, HAVE_GTK_FILE_CHOOSER): Check
if it is declared in gtk.h.
2009-04-12 Andreas Schwab <schwab@linux-m68k.org>
* Makefile.in (install-arch-indep): Remove .gitignore files.
......
This diff is collapsed.
......@@ -1573,15 +1573,28 @@ if test "${HAVE_GTK}" = "yes"; then
[Define to 1 if GTK can handle more than one display.])
fi
dnl Check if we have the old file selection dialog.
dnl If gdk_display_open exists, assume all others are there also.
dnl Check if we have the old file selection dialog declared and
dnl in the link library. In 2.x it may be in the library,
dnl but not declared if deprecated featured has been selected out.
dnl AC_CHECK_DECL checks for a macro, so check for GTK_TYPE_FILE_SELECTION.
HAVE_GTK_FILE_SELECTION=no
AC_CHECK_FUNCS(gtk_file_selection_new, HAVE_GTK_FILE_SELECTION=yes)
AC_CHECK_DECL(GTK_TYPE_FILE_SELECTION, HAVE_GTK_FILE_SELECTION=yes,
HAVE_GTK_FILE_SELECTION=no, [AC_INCLUDES_DEFAULT
#include <gtk/gtk.h>])
if test "$HAVE_GTK_FILE_SELECTION" = yes; then
AC_CHECK_FUNCS(gtk_file_selection_new, HAVE_GTK_FILE_SELECTION=yes,
HAVE_GTK_FILE_SELECTION=no)
fi
dnl Check if we have the new file chooser dialog
dnl If gdk_display_open exists, assume all others are there also.
HAVE_GTK_FILE_CHOOSER=no
AC_CHECK_FUNCS(gtk_file_chooser_dialog_new, HAVE_GTK_FILE_CHOOSER=yes)
AC_CHECK_DECL(GTK_TYPE_FILE_CHOOSER, HAVE_GTK_FILE_CHOOSER=yes,
HAVE_GTK_FILE_CHOOSER=no, [AC_INCLUDES_DEFAULT
#include <gtk/gtk.h>])
if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
AC_CHECK_FUNCS(gtk_file_chooser_dialog_new, HAVE_GTK_FILE_CHOOSER=yes,
HAVE_GTK_FILE_CHOOSER=no)
fi
if test "$HAVE_GTK_FILE_SELECTION" = yes \
&& test "$HAVE_GTK_FILE_CHOOSER" = yes; then
......
2009-04-19 Jan Djärv <jan.h.d@swipnet.se>
* gtkutil.c (xg_tool_bar_menu_proxy, update_frame_tool_bar): Use
G_CALLBACK instead of GTK_SIGNAL_FUNC which is deprecated.
(xg_initialize): Use g_type_class_ref instead of gtk_type_class which
is deprecated.
2009-04-18 Andreas Schwab <schwab@linux-m68k.org>
* font.c (font_put_frame_data): Use xfree instead of free.
......
......@@ -3568,7 +3568,7 @@ xg_tool_bar_menu_proxy (toolitem, user_data)
g_signal_connect (G_OBJECT (wmenuitem),
"activate",
GTK_SIGNAL_FUNC (xg_tool_bar_proxy_callback),
G_CALLBACK (xg_tool_bar_proxy_callback),
user_data);
g_object_set_data (G_OBJECT (wmenuitem), XG_TOOL_BAR_PROXY_BUTTON,
......@@ -4018,11 +4018,11 @@ update_frame_tool_bar (f)
/* The EMACS_INT cast avoids a warning. */
g_signal_connect (G_OBJECT (ti), "create-menu-proxy",
GTK_SIGNAL_FUNC (xg_tool_bar_menu_proxy),
G_CALLBACK (xg_tool_bar_menu_proxy),
(gpointer) (EMACS_INT) i);
g_signal_connect (G_OBJECT (wbutton), "clicked",
GTK_SIGNAL_FUNC (xg_tool_bar_callback),
G_CALLBACK (xg_tool_bar_callback),
(gpointer) (EMACS_INT) i);
gtk_widget_show_all (GTK_WIDGET (ti));
......@@ -4044,7 +4044,7 @@ update_frame_tool_bar (f)
no distinction based on modifiers in the activate callback,
so we have to do it ourselves. */
g_signal_connect (wbutton, "button-release-event",
GTK_SIGNAL_FUNC (xg_tool_bar_button_cb),
G_CALLBACK (xg_tool_bar_button_cb),
NULL);
g_object_set_data (G_OBJECT (wbutton), XG_FRAME_DATA, (gpointer)f);
......@@ -4217,12 +4217,13 @@ xg_initialize ()
/* Make dialogs close on C-g. Since file dialog inherits from
dialog, this works for them also. */
binding_set = gtk_binding_set_by_class (gtk_type_class (GTK_TYPE_DIALOG));
binding_set = gtk_binding_set_by_class (g_type_class_ref (GTK_TYPE_DIALOG));
gtk_binding_entry_add_signal (binding_set, GDK_g, GDK_CONTROL_MASK,
"close", 0);
/* Make menus close on C-g. */
binding_set = gtk_binding_set_by_class (gtk_type_class (GTK_TYPE_MENU_SHELL));
binding_set = gtk_binding_set_by_class (g_type_class_ref
(GTK_TYPE_MENU_SHELL));
gtk_binding_entry_add_signal (binding_set, GDK_g, GDK_CONTROL_MASK,
"cancel", 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment