Mercurial > hg > xemacs-beta
comparison src/menubar-gtk.c @ 1346:01c57eb70ae9
[xemacs-hg @ 2003-03-09 02:27:27 by ben]
To: xemacs-patches@xemacs.org
i.c: Sleep between calls to check for I/O, since these calls are non-blocking.
behavior.el: Allow other keywords for forward compatibility.
cl-macs.el: Rewrite to eliminate byte-compiler warning when `return' is used
without `finally'.
cmdloop.el: Avoid truncated error messages for `end-of-file' and the like.
cmdloop.el: Avoid char-int error after syncing.
files.el: Eliminate byte-compile warnings.
printer.el: Fix line-width calculations.
#### This used to work. Someone's changes (perhaps by
Michael Sperber?) seem to have messed something up.
simple.el: Use new clear-left-side functions to avoid messages ending up on
the same line as other output.
xemacs.mak: Add override for info/ as well when separate source/build dirs.
xemacs.mak: Order sections in main build process and add comments. Add
additional dependencies to try and prevent later steps from
happening when failures in earlier steps have occurred.
Makefile.in.in: Order sections in main build process and add comments. Add
additional dependencies to try and prevent later steps from
happening when failures in earlier steps have occurred.
alloc.c: Don't arbitrarily clear Vconfigure_info_directory since it
messes up separate build/source dirs.
console.c, console.h, device-msw.c, device.c: Add accidentally omitted msprinter console and data descriptions.
print.c, console-msw.c: Add clear-left-side functionality to help keep stdio/stderr
output from separate sources on separate lines. Generalize
the different kinds of debugging output. Add dpa().
profile.c: Add better docs on Unix/Windows differences.
regex.c: Fix problems with rel-alloc compilation caused by previous patch.
emacs.c: Seg fault rather than abort on Cygwin, since gdb doesn't trap
aborts properly.
console-gtk-impl.h, console-gtk.h, console-msw.h, console-x-impl.h, console-x.h, dialog-gtk.c, dialog-x.c, event-msw.c, frame-gtk.c, frame-x.c, frameslots.h, glyphs-gtk.c, glyphs-x.c, gui-gtk.c, gui-x.c, inline.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, scrollbar-gtk.c, scrollbar-x.c, ui-gtk.c: Delete popup-data object. Delete menubar_data field from frames,
since its usage is frame-specific. Delete menubar-msw.h,
gui-x.h, gui-gtk.h. Clean up handling of lwlib callback data
GCPRO'ing and add missing GCPRO recomputation in widget code.
author | ben |
---|---|
date | Sun, 09 Mar 2003 02:27:46 +0000 |
parents | f0af455e89d9 |
children | b0c1d9dc4b08 |
comparison
equal
deleted
inserted
replaced
1345:3b27da507d56 | 1346:01c57eb70ae9 |
---|---|
1 /* Implements an elisp-programmable menubar -- X interface. | 1 /* Implements an elisp-programmable menubar -- X interface. |
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc. | 2 Copyright (C) 1993, 1994 Free Software Foundation, Inc. |
3 Copyright (C) 1995 Tinker Systems and INS Engineering Corp. | 3 Copyright (C) 1995 Tinker Systems and INS Engineering Corp. |
4 Copyright (C) 2002 Ben Wing. | 4 Copyright (C) 2002, 2003 Ben Wing. |
5 | 5 |
6 This file is part of XEmacs. | 6 This file is part of XEmacs. |
7 | 7 |
8 XEmacs is free software; you can redistribute it and/or modify it | 8 XEmacs is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 9 under the terms of the GNU General Public License as published by the |
27 #include <config.h> | 27 #include <config.h> |
28 #include "lisp.h" | 28 #include "lisp.h" |
29 | 29 |
30 #include "buffer.h" | 30 #include "buffer.h" |
31 #include "commands.h" /* zmacs_regions */ | 31 #include "commands.h" /* zmacs_regions */ |
32 #include "device.h" | 32 #include "device-impl.h" |
33 #include "events.h" | 33 #include "events.h" |
34 #include "device-impl.h" | |
35 #include "frame-impl.h" | 34 #include "frame-impl.h" |
36 #include "gui.h" | 35 #include "gui.h" |
37 #include "opaque.h" | 36 #include "opaque.h" |
38 #include "window.h" | 37 #include "window.h" |
39 #include "window-impl.h" | 38 #include "window-impl.h" |
40 | 39 |
41 #include "console-gtk-impl.h" | 40 #include "console-gtk-impl.h" |
42 #include "gui-gtk.h" | |
43 #include "ui-gtk.h" | 41 #include "ui-gtk.h" |
44 #include "menubar.h" | 42 #include "menubar.h" |
45 | 43 |
46 #ifdef HAVE_GNOME | 44 #ifdef HAVE_GNOME |
47 #include <libgnomeui/libgnomeui.h> | 45 #include <libgnomeui/libgnomeui.h> |
51 #define SUBMENU_TYPE 1 | 49 #define SUBMENU_TYPE 1 |
52 #define POPUP_TYPE 2 | 50 #define POPUP_TYPE 2 |
53 | 51 |
54 static GtkWidget *menu_descriptor_to_widget_1 (Lisp_Object descr); | 52 static GtkWidget *menu_descriptor_to_widget_1 (Lisp_Object descr); |
55 | 53 |
56 #define FRAME_MENUBAR_DATA(frame) ((frame)->menubar_data) | 54 #define FRAME_GTK_MENUBAR_DATA(f) (FRAME_GTK_DATA (f)->menubar_data) |
57 #define XFRAME_MENUBAR_DATA_LASTBUFF(frame) (XCAR ((frame)->menubar_data)) | 55 #define XFRAME_GTK_MENUBAR_DATA_LASTBUFF(f) XCAR (FRAME_GTK_MENUBAR_DATA (f)) |
58 #define XFRAME_MENUBAR_DATA_UPTODATE(frame) (XCDR ((frame)->menubar_data)) | 56 #define XFRAME_GTK_MENUBAR_DATA_UPTODATE(f) XCDR (FRAME_GTK_MENUBAR_DATA (f)) |
59 | 57 |
60 | 58 |
61 /* This is a bogus subclass of GtkMenuBar so that the menu never tries | 59 /* This is a bogus subclass of GtkMenuBar so that the menu never tries |
62 ** to be bigger than the text widget. This prevents weird resizing | 60 ** to be bigger than the text widget. This prevents weird resizing |
63 ** when jumping around between buffers with radically different menu | 61 ** when jumping around between buffers with radically different menu |
1124 | 1122 |
1125 Fset_buffer (old_buffer); | 1123 Fset_buffer (old_buffer); |
1126 unbind_to (count); | 1124 unbind_to (count); |
1127 } | 1125 } |
1128 | 1126 |
1129 FRAME_MENUBAR_DATA (f) = Fcons (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->buffer, Qt); | 1127 FRAME_GTK_MENUBAR_DATA (f) = Fcons (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->buffer, Qt); |
1130 | 1128 |
1131 return (menubar_visible); | 1129 return (menubar_visible); |
1132 } | 1130 } |
1133 | 1131 |
1134 /* Called from gtk_create_widgets() to create the inital menubar of a frame | 1132 /* Called from gtk_create_widgets() to create the inital menubar of a frame |
1150 or if the current buffer has changed, or if the menubar has never | 1148 or if the current buffer has changed, or if the menubar has never |
1151 been updated before. | 1149 been updated before. |
1152 */ | 1150 */ |
1153 int menubar_contents_changed = | 1151 int menubar_contents_changed = |
1154 (f->menubar_changed | 1152 (f->menubar_changed |
1155 || NILP (FRAME_MENUBAR_DATA (f)) | 1153 || NILP (FRAME_GTK_MENUBAR_DATA (f)) |
1156 || (!EQ (XFRAME_MENUBAR_DATA_LASTBUFF (f), | 1154 || (!EQ (XFRAME_GTK_MENUBAR_DATA_LASTBUFF (f), |
1157 XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->buffer))); | 1155 XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->buffer))); |
1158 | 1156 |
1159 gboolean menubar_was_visible = GTK_WIDGET_VISIBLE (FRAME_GTK_MENUBAR_WIDGET (f)); | 1157 gboolean menubar_was_visible = GTK_WIDGET_VISIBLE (FRAME_GTK_MENUBAR_WIDGET (f)); |
1160 gboolean menubar_will_be_visible = menubar_was_visible; | 1158 gboolean menubar_will_be_visible = menubar_was_visible; |
1161 gboolean menubar_visibility_changed; | 1159 gboolean menubar_visibility_changed; |