diff options
| author | Po Lu | 2022-02-22 18:46:12 +0800 |
|---|---|---|
| committer | Po Lu | 2022-02-22 18:46:19 +0800 |
| commit | f7b5553045e2903852f0a9a90b382d1617ff18a0 (patch) | |
| tree | 9339bfcb1f6ca388d43303a732ff9e18be9e79c3 /src | |
| parent | c914572a46ca1e9de14bfeb4a6e993714f146851 (diff) | |
| download | emacs-f7b5553045e2903852f0a9a90b382d1617ff18a0.tar.gz emacs-f7b5553045e2903852f0a9a90b382d1617ff18a0.zip | |
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')
| -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; | |||
| 78 | 78 | ||
| 79 | #ifdef HAVE_GTK3 | 79 | #ifdef HAVE_GTK3 |
| 80 | static void emacs_menu_bar_get_preferred_width (GtkWidget *, gint *, gint *); | 80 | static void emacs_menu_bar_get_preferred_width (GtkWidget *, gint *, gint *); |
| 81 | static GType emacs_menu_bar_get_type (void); | ||
| 81 | 82 | ||
| 82 | struct _EmacsMenuBar | 83 | typedef struct _EmacsMenuBar |
| 83 | { | 84 | { |
| 84 | GtkMenuBar parent; | 85 | GtkMenuBar parent; |
| 85 | }; | 86 | } EmacsMenuBar; |
| 87 | |||
| 88 | typedef struct _EmacsMenuBarClass | ||
| 89 | { | ||
| 90 | GtkMenuBarClass parent; | ||
| 91 | } EmacsMenuBarClass; | ||
| 86 | 92 | ||
| 87 | G_DEFINE_TYPE (EmacsMenuBar, emacs_menu_bar, GTK_TYPE_MENU_BAR) | 93 | G_DEFINE_TYPE (EmacsMenuBar, emacs_menu_bar, GTK_TYPE_MENU_BAR) |
| 88 | #endif | 94 | #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_ | |||
| 83 | 83 | ||
| 84 | } xg_menu_item_cb_data; | 84 | } xg_menu_item_cb_data; |
| 85 | 85 | ||
| 86 | #ifdef HAVE_GTK3 | ||
| 87 | G_DECLARE_FINAL_TYPE (EmacsMenuBar, emacs_menu_bar, EMACS, MENU_BAR, GtkMenuBar) | ||
| 88 | #endif | ||
| 89 | |||
| 90 | extern bool xg_uses_old_file_dialog (void); | 86 | extern bool xg_uses_old_file_dialog (void); |
| 91 | 87 | ||
| 92 | extern char *xg_get_file_name (struct frame *f, | 88 | extern char *xg_get_file_name (struct frame *f, |