From cc91bbbfdde9259521ba069bbbb6f43d0a7dd584 Mon Sep 17 00:00:00 2001 From: totaam Date: Sun, 8 Oct 2023 23:36:49 +0700 Subject: [PATCH] correct type for tooltip, bug found thanks to #3978 --- xpra/gtk/dialogs/start_gui.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xpra/gtk/dialogs/start_gui.py b/xpra/gtk/dialogs/start_gui.py index bad948db74..b958ef5c58 100644 --- a/xpra/gtk/dialogs/start_gui.py +++ b/xpra/gtk/dialogs/start_gui.py @@ -106,7 +106,7 @@ def __init__(self, options): # choose the session type: hbox = Gtk.HBox(homogeneous=True, spacing=40) - def rb(sibling=None, text="", cb=None, tooltip_text=None): + def rb(sibling=None, text="", cb=None, tooltip_text=""): btn = Gtk.RadioButton.new_with_label_from_widget(sibling, text) if cb: btn.connect("toggled", cb) @@ -730,7 +730,7 @@ def get_widget_options(self, fn): return getattr(self, "%s_options" % fn) - def bool_cb(self, text, option_name, tooltip_text=None, link=None): + def bool_cb(self, text, option_name, tooltip_text="", link=None): self.attach_label(text, tooltip_text, link) fn = option_name.replace("-", "_") value = getattr(self.options, fn) @@ -744,14 +744,14 @@ def bool_cb(self, text, option_name, tooltip_text=None, link=None): self.row.increase() return cb - def radio_cb_auto(self, text, option_name, tooltip_text=None, link=None): + def radio_cb_auto(self, text, option_name, tooltip_text="", link=None): return self.radio_cb(text, option_name, tooltip_text, link, { "yes" : TRUE_OPTIONS, "no" : FALSE_OPTIONS, "auto" : ("auto", "", None), }) - def radio_cb(self, text, option_name, tooltip_text=None, link=None, options=None): + def radio_cb(self, text, option_name, tooltip_text="", link=None, options=None): self.attach_label(text, tooltip_text, link) fn = option_name.replace("-", "_") widget_base_name = "%s_widget" % fn @@ -885,7 +885,7 @@ def valuesfromscale(self, option_name): widget = self.get_widget(fn) return (int(widget.get_value()), ) - def attach_label(self, text, tooltip_text=None, link=None): + def attach_label(self, text, tooltip_text="", link=None): lbl = label(text, tooltip=tooltip_text) lbl.set_margin_start(5) lbl.set_margin_top(5)