Codebase list xapp / 7b36a1d
mate-xapp-status-applet.py: Call widget.show_all() before binding to the proxy's visible property. The binding is one way only - local changes can override the state initially set by the proxy. Fix the test script also, it had the same issue. Michael Webster 4 years ago
2 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
7171 self.box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
7272
7373 self.image = Gtk.Image(hexpand=True)
74 self.image.show()
7574 self.label = Gtk.Label(no_show_all=True)
7675 self.box.pack_start(self.image, True, False, 0)
7776 self.box.pack_start(self.label, False, False, 0)
8281 self.set_relief(Gtk.ReliefStyle.NONE)
8382 self.set_focus_on_click(False)
8483
84 self.show_all()
85
8586 flags = GObject.BindingFlags.DEFAULT | GObject.BindingFlags.SYNC_CREATE
8687
8788 self.proxy.bind_property("label", self.label, "label", flags)
101102
102103 self.update_orientation()
103104 self.update_icon()
104
105 self.show_all()
106105
107106 def _on_icon_name_changed(self, proxy, gparamspec, data=None):
108107 self.update_icon()
2828
2929 self.image.props.icon_size = Gtk.IconSize.DIALOG
3030 self.set_icon(self.proxy.props.icon_name)
31
32 self.show_all()
33
3134 self.proxy.bind_property("label", self.label, "label", flags)
3235 self.proxy.bind_property("tooltip-text", self, "tooltip-text", flags)
3336 self.proxy.bind_property("visible", self, "visible", flags)
133136
134137 self.indicators[name] = StatusWidget(proxy)
135138 self.indicator_box.add(self.indicators[name])
136 self.window.show_all()
137139
138140 self.sort_icons()
139141