diff options
author | Po Lu <luangruo@yahoo.com> | 2022-02-22 18:46:12 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-02-22 18:46:19 +0800 |
commit | f7b5553045e2903852f0a9a90b382d1617ff18a0 (patch) | |
tree | 9339bfcb1f6ca388d43303a732ff9e18be9e79c3 | |
parent | c914572a46ca1e9de14bfeb4a6e993714f146851 (diff) | |
download | emacs-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.
-rw-r--r-- | src/gtkutil.c | 10 | ||||
-rw-r--r-- | src/gtkutil.h | 4 |
2 files changed, 8 insertions, 6 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 diff --git a/src/gtkutil.h b/src/gtkutil.h index f850ecc4219..b74244d84d0 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -83,10 +83,6 @@ typedef struct xg_menu_item_cb_data_ } xg_menu_item_cb_data; -#ifdef HAVE_GTK3 -G_DECLARE_FINAL_TYPE (EmacsMenuBar, emacs_menu_bar, EMACS, MENU_BAR, GtkMenuBar) -#endif - extern bool xg_uses_old_file_dialog (void); extern char *xg_get_file_name (struct frame *f, |