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
71 | 71 |
self.box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
|
72 | 72 |
|
73 | 73 |
self.image = Gtk.Image(hexpand=True)
|
74 | |
self.image.show()
|
75 | 74 |
self.label = Gtk.Label(no_show_all=True)
|
76 | 75 |
self.box.pack_start(self.image, True, False, 0)
|
77 | 76 |
self.box.pack_start(self.label, False, False, 0)
|
|
82 | 81 |
self.set_relief(Gtk.ReliefStyle.NONE)
|
83 | 82 |
self.set_focus_on_click(False)
|
84 | 83 |
|
|
84 |
self.show_all()
|
|
85 |
|
85 | 86 |
flags = GObject.BindingFlags.DEFAULT | GObject.BindingFlags.SYNC_CREATE
|
86 | 87 |
|
87 | 88 |
self.proxy.bind_property("label", self.label, "label", flags)
|
|
101 | 102 |
|
102 | 103 |
self.update_orientation()
|
103 | 104 |
self.update_icon()
|
104 | |
|
105 | |
self.show_all()
|
106 | 105 |
|
107 | 106 |
def _on_icon_name_changed(self, proxy, gparamspec, data=None):
|
108 | 107 |
self.update_icon()
|
28 | 28 |
|
29 | 29 |
self.image.props.icon_size = Gtk.IconSize.DIALOG
|
30 | 30 |
self.set_icon(self.proxy.props.icon_name)
|
|
31 |
|
|
32 |
self.show_all()
|
|
33 |
|
31 | 34 |
self.proxy.bind_property("label", self.label, "label", flags)
|
32 | 35 |
self.proxy.bind_property("tooltip-text", self, "tooltip-text", flags)
|
33 | 36 |
self.proxy.bind_property("visible", self, "visible", flags)
|
|
133 | 136 |
|
134 | 137 |
self.indicators[name] = StatusWidget(proxy)
|
135 | 138 |
self.indicator_box.add(self.indicators[name])
|
136 | |
self.window.show_all()
|
137 | 139 |
|
138 | 140 |
self.sort_icons()
|
139 | 141 |
|