From 5bbe0443e44c7e0747b59ba50747494e9303a585 Mon Sep 17 00:00:00 2001 From: Saumya-Mishra9129 Date: Thu, 28 May 2020 01:58:54 +0530 Subject: [PATCH] Use new classmethod to create an object of a class --- src/jarabe/view/viewsource.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py index 2967e82a78..e5a11c8a0a 100644 --- a/src/jarabe/view/viewsource.py +++ b/src/jarabe/view/viewsource.py @@ -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): @@ -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)