remove unused code

This commit is contained in:
Kovid Goyal 2026-03-31 22:57:19 +05:30
parent ea7a82c0c6
commit 12ea072fce
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
3 changed files with 1 additions and 18 deletions

View file

@ -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

View file

@ -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);

View file

@ -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;