Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Thu, 16 Nov 2023 09:56:02 UTC Commit: 50f4178ecce6abf802a44f563107bd0bca90720a https://github.com/geany/geany/commit/50f4178ecce6abf802a44f563107bd0bca9072...
Log Message: ----------- Do not use GtkResponseType as response ID type
`GtkResponseType` is supposed to be extensible by user code, and as such is not used as a type in GTK public API, but as `gint`, which allows passing other values (possibly from other enumerations) without risking type conversion issues or compiler warnings.
Do the same in our own helper not to trigger GCC's `-Wenum-conversion`.
Modified Paths: -------------- src/document.c
Modified: src/document.c 12 lines changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -115,9 +115,9 @@ static void document_redo_add(GeanyDocument *doc, guint type, gpointer data); static gboolean remove_page(guint page_num); static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgtype, void (*response_cb)(GtkWidget *info_bar, gint response_id, GeanyDocument *doc), - const gchar *btn_1, GtkResponseType response_1, - const gchar *btn_2, GtkResponseType response_2, - const gchar *btn_3, GtkResponseType response_3, + const gchar *btn_1, gint response_1, + const gchar *btn_2, gint response_2, + const gchar *btn_3, gint response_3, const gchar *extra_text, const gchar *format, ...) G_GNUC_PRINTF(11, 12);
@@ -3452,9 +3452,9 @@ gboolean document_close_all(void) * */ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgtype, void (*response_cb)(GtkWidget *info_bar, gint response_id, GeanyDocument *doc), - const gchar *btn_1, GtkResponseType response_1, - const gchar *btn_2, GtkResponseType response_2, - const gchar *btn_3, GtkResponseType response_3, + const gchar *btn_1, gint response_1, + const gchar *btn_2, gint response_2, + const gchar *btn_3, gint response_3, const gchar *extra_text, const gchar *format, ...) { va_list args;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).