From 12ea072fce14e19b45d3fa0882eb914f60c1c803 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 31 Mar 2026 22:57:19 +0530 Subject: [PATCH] remove unused code --- kitty/options/definition.py | 3 +-- kitty/options/to-c-generated.h | 15 --------------- kitty/state.h | 1 - 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/kitty/options/definition.py b/kitty/options/definition.py index d5c3abf6a..1835d5c75 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -1664,8 +1664,7 @@ The horizontal alignment of the tab bar, can be one of: :code:`left`, ''' ) -opt('tab_bar_show_new_tab_button', 'no', option_type='to_bool', ctype='bool', - long_text=''' +opt('tab_bar_show_new_tab_button', 'no', option_type='to_bool', long_text=''' When set to :code:`yes`, a :code:`+` button is always shown at the end of the tab bar as a clickable shortcut to open a new tab. When set to :code:`no` (the default), the button is hidden at rest but still appears temporarily diff --git a/kitty/options/to-c-generated.h b/kitty/options/to-c-generated.h index ea1fd8633..fdbe17478 100644 --- a/kitty/options/to-c-generated.h +++ b/kitty/options/to-c-generated.h @@ -1097,19 +1097,6 @@ convert_from_opts_tab_bar_style(PyObject *py_opts, Options *opts) { Py_DECREF(ret); } -static void -convert_from_python_tab_bar_show_new_tab_button(PyObject *val, Options *opts) { - opts->tab_bar_show_new_tab_button = PyObject_IsTrue(val); -} - -static void -convert_from_opts_tab_bar_show_new_tab_button(PyObject *py_opts, Options *opts) { - PyObject *ret = PyObject_GetAttrString(py_opts, "tab_bar_show_new_tab_button"); - if (ret == NULL) return; - convert_from_python_tab_bar_show_new_tab_button(ret, opts); - Py_DECREF(ret); -} - static void convert_from_python_tab_bar_background(PyObject *val, Options *opts) { opts->tab_bar_background = color_or_none_as_int(val); @@ -1644,8 +1631,6 @@ convert_opts_from_python_opts(PyObject *py_opts, Options *opts) { if (PyErr_Occurred()) return false; convert_from_opts_tab_bar_style(py_opts, opts); if (PyErr_Occurred()) return false; - convert_from_opts_tab_bar_show_new_tab_button(py_opts, opts); - if (PyErr_Occurred()) return false; convert_from_opts_tab_bar_background(py_opts, opts); if (PyErr_Occurred()) return false; convert_from_opts_tab_bar_margin_color(py_opts, opts); diff --git a/kitty/state.h b/kitty/state.h index f652e626b..dfd2312db 100644 --- a/kitty/state.h +++ b/kitty/state.h @@ -122,7 +122,6 @@ typedef struct Options { char_type *url_excluded_characters; bool detect_urls; bool tab_bar_hidden; - bool tab_bar_show_new_tab_button; double font_size; struct { double outer, inner;