'is not None' is more pythonic. extra indention on some of the icon code.
This commit is contained in:
parent
cd2d50c32e
commit
d37362aadf
@ -31,7 +31,7 @@ class CruSSHConf:
|
|||||||
### Signal Hooks ###
|
### Signal Hooks ###
|
||||||
def save_hook(self, discard, save_func):
|
def save_hook(self, discard, save_func):
|
||||||
self.MainWin.destroy()
|
self.MainWin.destroy()
|
||||||
if save_func != None:
|
if save_func is not None:
|
||||||
save_func(self.Config)
|
save_func(self.Config)
|
||||||
|
|
||||||
def font_hook(self, fontbutton):
|
def font_hook(self, fontbutton):
|
||||||
@ -87,7 +87,7 @@ class CruSSHConf:
|
|||||||
|
|
||||||
# we'll wire up a supplied save_func that takes the Config dict as an argument.
|
# we'll wire up a supplied save_func that takes the Config dict as an argument.
|
||||||
def __init__(self, config=None, save_func=None):
|
def __init__(self, config=None, save_func=None):
|
||||||
if config != None:
|
if config is not None:
|
||||||
self.Config = config
|
self.Config = config
|
||||||
|
|
||||||
self.initGUI(save_func)
|
self.initGUI(save_func)
|
||||||
@ -170,7 +170,7 @@ class CruSSH:
|
|||||||
icon_list = []
|
icon_list = []
|
||||||
if theme.has_icon("terminal"):
|
if theme.has_icon("terminal"):
|
||||||
icon = theme.lookup_icon("terminal", 128, flags=gtk.ICON_LOOKUP_USE_BUILTIN)
|
icon = theme.lookup_icon("terminal", 128, flags=gtk.ICON_LOOKUP_USE_BUILTIN)
|
||||||
if icon != None:
|
if icon is not None:
|
||||||
gtk.window_set_default_icon(icon.load_icon())
|
gtk.window_set_default_icon(icon.load_icon())
|
||||||
self.MainWin.set_title("crussh: " + ' '.join(self.Terminals.keys()))
|
self.MainWin.set_title("crussh: " + ' '.join(self.Terminals.keys()))
|
||||||
self.MainWin.set_role(role="crussh_main_win")
|
self.MainWin.set_role(role="crussh_main_win")
|
||||||
|
Loading…
Reference in New Issue
Block a user