From 29a21a5a4c00c8023a2b7ac612d5d6bd2e9bc16e Mon Sep 17 00:00:00 2001 From: Luca Bacci <luca.bacci982@gmail.com> Date: Wed, 29 Aug 2018 10:35:15 +0200 Subject: [PATCH 09/26] port-to-gtk3: Rework Gtk header includes (#7) In Gtk3 individual headers cannot be included directly in application code, only the header <gtk/gtk.h> can be included (with a few exceptions for some platform specific headers). This has always been considered good practice even for Gtk2, though was not a hard requirement. In Gtk3 this is enforced by preprocessor checks. Failure to do so yields a preprocessor error and compilation fails: "error: Only <gtk/gtk.h> can be included directly." Change specific Gtk header includes to: #include <gtk/gtk.h> References: [1] Migrating from GTK+ 2.x to GTK+ 3 - "Do not include individual headers" https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3.3 [2] Commit - "Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDES" https://gitlab.gnome.org/GNOME/gtk/commit/5e29973773d4e2177f234675cc2a2b2016aa9fbc Closes #7 - Port to Gtk3 --- src/DialogPasswordEntry.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DialogPasswordEntry.cc b/src/DialogPasswordEntry.cc index 905472f3..cbf4d4fa 100644 --- a/src/DialogPasswordEntry.cc +++ b/src/DialogPasswordEntry.cc @@ -21,7 +21,8 @@ #include <gtkmm/box.h> #include <gtkmm/stock.h> #include <gtkmm/button.h> -#include <gtk/gtkentry.h> +#include <gtk/gtk.h> + namespace GParted { -- 2.21.0