Skip to content

Commit

Permalink
hide and show in a box group
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@24689 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 10, 2019
1 parent b33d331 commit b1c04f1
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/xpra/client/gtk_base/sessions_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,21 @@ def __init__(self, options, title="Xpra Session Browser"):
self.warning.show()
self.vbox.add(self.warning)

hbox = Gtk.HBox(False, 10)
self.password_box = Gtk.HBox(False, 10)
self.password_label = Gtk.Label("Password:")
al = Gtk.Alignment(xalign=1, yalign=0.5)
al.add(self.password_label)
al.show()
hbox.add(al)
self.password_box.add(al)
self.password_entry = Gtk.Entry()
self.password_entry.set_max_length(128)
self.password_entry.set_width_chars(16)
self.password_entry.set_visibility(False)
al = Gtk.Alignment(xalign=0, yalign=0.5)
al.add(self.password_entry)
al.show()
hbox.add(al)
hbox.show()
self.vbox.add(hbox)
self.password_box.add(al)
self.vbox.add(self.password_box)

self.table = None
self.records = []
Expand Down Expand Up @@ -129,11 +128,9 @@ def update(self):

def populate(self):
if self.local_info_cache:
self.password_entry.show()
self.password_label.show()
self.password_box.show()
else:
self.password_entry.hide()
self.password_label.hide()
self.password_box.hide()
self.populate_table()

def poll_local_sessions(self):
Expand Down

0 comments on commit b1c04f1

Please sign in to comment.