summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-02-22 18:46:12 +0800
committerPo Lu <luangruo@yahoo.com>2022-02-22 18:46:19 +0800
commitf7b5553045e2903852f0a9a90b382d1617ff18a0 (patch)
tree9339bfcb1f6ca388d43303a732ff9e18be9e79c3 /src/gtkutil.c
parentc914572a46ca1e9de14bfeb4a6e993714f146851 (diff)
downloademacs-f7b5553045e2903852f0a9a90b382d1617ff18a0.tar.gz
Fix GTK build with GLib <2.44
* src/gtkutil.c (struct _EmacsMenuBar, EmacsMenuBar): New structs. (emacs_menu_bar_get_type): New function declaration. * src/gtkutil.c: Remove declaration of EmacsMenuBar class.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 72eb7ef2bb1..d4726014c01 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -78,11 +78,17 @@ typedef struct pgtk_output xp_output;
#ifdef HAVE_GTK3
static void emacs_menu_bar_get_preferred_width (GtkWidget *, gint *, gint *);
+static GType emacs_menu_bar_get_type (void);
-struct _EmacsMenuBar
+typedef struct _EmacsMenuBar
{
GtkMenuBar parent;
-};
+} EmacsMenuBar;
+
+typedef struct _EmacsMenuBarClass
+{
+ GtkMenuBarClass parent;
+} EmacsMenuBarClass;
G_DEFINE_TYPE (EmacsMenuBar, emacs_menu_bar, GTK_TYPE_MENU_BAR)
#endif