diff options
| author | Po Lu <luangruo@yahoo.com> | 2023-06-20 02:13:41 +0000 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2023-06-20 02:13:41 +0000 |
| commit | 8806bbbf2cdae00faacab9cec634072ce4e80b6f (patch) | |
| tree | a8a896aca37439cc8122d482fb75ee25650ccdad | |
| parent | 1e13610b75718e7904f8af181fb73571639e1211 (diff) | |
Signal error upon setting unsupported tool bar position
* src/haikufns.c (haiku_set_tool_bar_position): New function.
Port non-GTK code from X.
(haiku_frame_parm_handlers): Add new function.
| -rw-r--r-- | src/haikufns.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/haikufns.c b/src/haikufns.c index b591c143900..b4e68495a35 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -259,6 +259,22 @@ haiku_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval } static void +haiku_set_tool_bar_position (struct frame *f, + Lisp_Object new_value, + Lisp_Object old_value) +{ + Lisp_Object choice = list4 (Qleft, Qright, Qtop, Qbottom); + + if (!NILP (Fmemq (new_value, choice))) + { + if (!EQ (new_value, Qtop)) + error ("The only supported tool bar position is top"); + } + else + wrong_choice (choice, new_value); +} + +static void haiku_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) { if (FRAME_TOOLTIP_P (f)) @@ -3136,7 +3152,7 @@ frame_parm_handler haiku_frame_parm_handlers[] = gui_set_font_backend, gui_set_alpha, haiku_set_sticky, - NULL, /* set tool bar pos */ + haiku_set_tool_bar_position, haiku_set_inhibit_double_buffering, haiku_set_undecorated, haiku_set_parent_frame, |
