Skip to content

Commit

Permalink
correct type for tooltip, bug found thanks to #3978
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Oct 8, 2023
1 parent 1859301 commit cc91bbb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xpra/gtk/dialogs/start_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cc91bbb

Please sign in to comment.