From fc128c82c6262847b0e795afbaebcef11e0ec134 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 2 Feb 2020 12:38:47 +0800 Subject: [PATCH] Enable Gtk3 migration checks --- .gitignore | 1 + src/Makefile.am | 5 +++-- src/bubblegen.c | 5 +++-- src/xcowsay.c | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ad0e46f..9a58aca 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ po/insert-header.sin ABOUT-NLS config.h.in config.rpath +compile_commands.json diff --git a/src/Makefile.am b/src/Makefile.am index a7b2487..60745c0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,9 @@ bin_PROGRAMS = xcowsay bin_SCRIPTS = xcowfortune xcowdream xcowthink -GTK3_CHECK = #-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \ - -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE +GTK3_CHECK = -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE +#GTK3_CHECK += -DGDK_DISABLE_DEPRECATED + AM_CFLAGS = $(XCOWSAY_CFLAGS) -Wall $(GTK3_CHECK) LDADD = $(XCOWSAY_LIBS) diff --git a/src/bubblegen.c b/src/bubblegen.c index 327d2eb..1390654 100644 --- a/src/bubblegen.c +++ b/src/bubblegen.c @@ -1,5 +1,5 @@ /* bubblegen.c -- Generate various sorts of bubbles. - * Copyright (C) 2008-2010 Nick Gasson + * Copyright (C) 2008-2019 Nick Gasson * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -403,7 +403,8 @@ static void bubble_init(bubble_t *b, bubble_style_t style) GdkVisual *root_visual; root_visual = gdk_visual_get_system(); - b->pixmap = gdk_pixmap_new(NULL, b->width, b->height, root_visual->depth); + b->pixmap = gdk_pixmap_new(NULL, b->width, b->height, + gdk_visual_get_depth(root_visual)); g_assert(b->pixmap); b->gc = gdk_gc_new(b->pixmap); diff --git a/src/xcowsay.c b/src/xcowsay.c index b68e265..5d05628 100644 --- a/src/xcowsay.c +++ b/src/xcowsay.c @@ -1,5 +1,5 @@ /* xcowsay.c -- Cute talking cow for GTK+. - * Copyright (C) 2008-2010 Nick Gasson + * Copyright (C) 2008-2019 Nick Gasson * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -155,7 +155,7 @@ static void usage() static void version() { static const char *copy = - "Copyright (C) 2008-2010 Nick Gasson\n" + "Copyright (C) 2008-2019 Nick Gasson\n" "This program comes with ABSOLUTELY NO WARRANTY. This is free software, and\n" "you are welcome to redistribute it under certain conditions. See the GNU\n" "General Public Licence for details."; -- 2.39.2