Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Wed, 04 Jun 2014 12:31:12 UTC Commit: c79c983364c8754a0944693cae0439d97b874067 https://github.com/geany/geany/commit/c79c983364c8754a0944693cae0439d97b8740...
Log Message: ----------- Fix build with GLib < 2.32
Second part of #1047.
Modified Paths: -------------- src/document.c
Modified: src/document.c 9 lines changed, 4 insertions(+), 5 deletions(-) =================================================================== @@ -3180,17 +3180,16 @@ static gboolean on_sci_key(GtkWidget *widget, GdkEventKey *event, gpointer data) }
/* g_signal_handlers_disconnect_by_data is a macro that cannot be used as GCallback */ -static gint nonmacro_g_signal_handlers_disconnect_by_data(gpointer instance, gpointer data) +static void on_bar_unrealize(GtkWidget *bar, ScintillaObject *sci) { - return g_signal_handlers_disconnect_by_data(instance, data); + g_signal_handlers_disconnect_by_func(sci, on_sci_key, bar); }
static void enable_key_intercept(GeanyDocument *doc, GtkWidget *bar) { - g_signal_connect(doc->editor->sci, "key-press-event", G_CALLBACK(on_sci_key), bar); + g_signal_connect(doc->editor->sci, "key-press-event", G_CALLBACK(on_sci_key), bar); /* make the signal disconnect automatically */ - g_signal_connect_swapped(bar, "unrealize", - G_CALLBACK(nonmacro_g_signal_handlers_disconnect_by_data), doc->editor->sci); + g_signal_connect(bar, "unrealize", G_CALLBACK(on_bar_unrealize), doc->editor->sci); }
static void monitor_reload_file(GeanyDocument *doc)
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).