Revert "kgtk: button avoid extra if"
This reverts commit 1ab8be5304bee29fbab25d8d768f50218ae4256e.
This commit is contained in:
parent
1ab8be5304
commit
036a09a4f0
@ -162,7 +162,6 @@ class KlippyGtk:
|
|||||||
b = Gtk.Button(hexpand=True, vexpand=True, can_focus=False, image_position=position, always_show_image=True)
|
b = Gtk.Button(hexpand=True, vexpand=True, can_focus=False, image_position=position, always_show_image=True)
|
||||||
if label is not None:
|
if label is not None:
|
||||||
b.set_label(label.replace("\n", " "))
|
b.set_label(label.replace("\n", " "))
|
||||||
format_label(b, lines)
|
|
||||||
if image_name is not None:
|
if image_name is not None:
|
||||||
b.set_name(image_name)
|
b.set_name(image_name)
|
||||||
if scale is None:
|
if scale is None:
|
||||||
@ -176,6 +175,9 @@ class KlippyGtk:
|
|||||||
box = find_widget(b, Gtk.Box)
|
box = find_widget(b, Gtk.Box)
|
||||||
if box:
|
if box:
|
||||||
box.add(spinner)
|
box.add(spinner)
|
||||||
|
|
||||||
|
if label is not None:
|
||||||
|
format_label(b, lines)
|
||||||
if style is not None:
|
if style is not None:
|
||||||
b.get_style_context().add_class(style)
|
b.get_style_context().add_class(style)
|
||||||
b.connect("clicked", self.screen.reset_screensaver_timeout)
|
b.connect("clicked", self.screen.reset_screensaver_timeout)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user