removed close button from ConnectionNotify

This commit is contained in:
Martin Wagner 2021-10-20 22:57:47 +02:00
parent f7fc3f1121
commit d8dc01e19a

View File

@ -3650,14 +3650,11 @@ class ConnectionNotify(Gtk.Revealer):
# widgets
self._label=Gtk.Label(wrap=True)
close_button=Gtk.Button(image=Gtk.Image.new_from_icon_name("window-close-symbolic", Gtk.IconSize.BUTTON))
close_button.set_relief(Gtk.ReliefStyle.NONE)
connect_button=Gtk.Button(label=_("Connect"))
settings_button=Gtk.Button(label=_("Preferences"))
settings_button.set_action_name("win.profile-settings")
# connect
close_button.connect("clicked", self._on_close_button_clicked)
connect_button.connect("clicked", self._on_connect_button_clicked)
self._client.emitter.connect("connection_error", self._on_connection_error)
self._client.emitter.connect("reconnected", self._on_reconnected)
@ -3666,7 +3663,6 @@ class ConnectionNotify(Gtk.Revealer):
box=Gtk.Box(spacing=12)
box.get_style_context().add_class("app-notification")
box.pack_start(self._label, False, True, 6)
box.pack_end(close_button, False, True, 0)
box.pack_end(connect_button, False, True, 0)
box.pack_end(settings_button, False, True, 0)
self.add(box)
@ -3686,9 +3682,6 @@ class ConnectionNotify(Gtk.Revealer):
def _on_reconnected(self, *args):
self.set_reveal_child(False)
def _on_close_button_clicked(self, *args):
self.set_reveal_child(False)
def _on_connect_button_clicked(self, *args):
self._client.reconnect()