Skip to content

Commit

Permalink
Use new classmethod to create an object of a class
Browse files Browse the repository at this point in the history
  • Loading branch information
Saumya-Mishra9129 committed May 27, 2020
1 parent c2eccd6 commit 5bbe044
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jarabe/view/viewsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def __destroy_cb(self, window, document_path):
if document_path is not None and os.path.exists(document_path):
os.unlink(document_path)

self._gdk_window.set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR))
self._gdk_window.set_cursor(Gdk.Cursor.new(Gdk.CursorType.LEFT_PTR))
Gdk.flush()

def __key_press_event_cb(self, window, event):
Expand Down Expand Up @@ -418,9 +418,9 @@ def __set_busy_cursor(self, busy):
cursor = None

if busy:
cursor = Gdk.Cursor(Gdk.CursorType.WATCH)
cursor = Gdk.Cursor.new(Gdk.CursorType.WATCH)
else:
cursor = Gdk.Cursor(Gdk.CursorType.LEFT_PTR)
cursor = Gdk.Cursor.new(Gdk.CursorType.LEFT_PTR)

gdk_window = self.get_root_window()
gdk_window.set_cursor(cursor)
Expand Down

0 comments on commit 5bbe044

Please sign in to comment.