Skip to content

Commit

Permalink
renaming method
Browse files Browse the repository at this point in the history
  • Loading branch information
maoschanz committed Mar 24, 2024
1 parent afc99d7 commit 851c2a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, window, **kwargs):
self.filename = None
self._monitoring_disabled = False
self._gfile_monitor = None
self._can_reload()
self._update_can_reload_action()

# Closing the info bar
self.reload_info_bar.connect('close', self.hide_reload_message)
Expand Down Expand Up @@ -247,7 +247,7 @@ def try_load_file(self, gfile):
# ya pas de fenêtre) ouvrir un truc respectant les settings, plutôt
# qu'un petit pixbuf corrompu
self.try_load_pixbuf(pixbuf)
self._can_reload()
self._update_can_reload_action()

def _connect_gfile_monitoring(self):
flags = Gio.FileMonitorFlags.WATCH_MOUNTS
Expand All @@ -264,14 +264,14 @@ def reveal_reload_message(self, *args):
if args[3] != Gio.FileMonitorEvent.CHANGED:
self._monitoring_disabled = False
return
self._can_reload()
self._update_can_reload_action()
self.reload_label.set_visible(self.window.get_allocated_width() > 500)
self.reload_info_bar.set_visible(True)

def hide_reload_message(self, *args):
self.reload_info_bar.set_visible(False)

def _can_reload(self):
def _update_can_reload_action(self):
self.set_action_sensitivity('reload_file', self.gfile is not None)

############################################################################
Expand Down Expand Up @@ -348,7 +348,7 @@ def show_properties(self):

def update_image_wide_actions(self):
self.update_history_sensitivity()
self._can_reload()
self._update_can_reload_action()

############################################################################
# History management #######################################################
Expand Down

0 comments on commit 851c2a9

Please sign in to comment.