kopia lustrzana https://github.com/ctjacobs/pyqso
Renamed switch_visible_callback to toggle_visible_callback.
rodzic
dd0084f206
commit
e1857e4489
|
@ -88,7 +88,7 @@ class PyQSO(Gtk.Window):
|
|||
self.show_all()
|
||||
|
||||
# Hide the DX cluster by default
|
||||
self.dx_cluster.switch_visible_callback()
|
||||
self.dx_cluster.toggle_visible_callback()
|
||||
|
||||
return
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ class DXCluster(Gtk.Frame):
|
|||
self.send.set_sensitive(not sensitive)
|
||||
return
|
||||
|
||||
def switch_visible_callback(self, widget=None):
|
||||
def toggle_visible_callback(self, widget=None):
|
||||
self.set_visible(not self.get_visible())
|
||||
return
|
||||
|
||||
|
|
|
@ -168,11 +168,9 @@ class Menu(Gtk.MenuBar):
|
|||
subm_view = Gtk.Menu()
|
||||
mitem_view.set_submenu(subm_view)
|
||||
|
||||
mitem_dxcluster = Gtk.ImageMenuItem("DX Cluster")
|
||||
icon = Gtk.Image()
|
||||
icon.set_from_stock(Gtk.STOCK_NETWORK, Gtk.IconSize.MENU)
|
||||
mitem_dxcluster.set_image(icon)
|
||||
mitem_dxcluster.connect("activate", parent.dx_cluster.switch_visible_callback)
|
||||
mitem_dxcluster = Gtk.CheckMenuItem("DX Cluster")
|
||||
mitem_dxcluster.set_active(False)
|
||||
mitem_dxcluster.connect("activate", parent.dx_cluster.toggle_visible_callback)
|
||||
subm_view.append(mitem_dxcluster)
|
||||
self.items["DX_CLUSTER"] = mitem_dxcluster
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue