Skip to content

Commit aef95b2

Browse files
Use new classmethod to create an object of a class
1 parent e38100e commit aef95b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jarabe/view/viewsource.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def __destroy_cb(self, window, document_path):
334334
if document_path is not None and os.path.exists(document_path):
335335
os.unlink(document_path)
336336

337-
self._gdk_window.set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR))
337+
self._gdk_window.set_cursor(Gdk.Cursor.new(Gdk.CursorType.LEFT_PTR))
338338
Gdk.flush()
339339

340340
def __key_press_event_cb(self, window, event):
@@ -418,9 +418,9 @@ def __set_busy_cursor(self, busy):
418418
cursor = None
419419

420420
if busy:
421-
cursor = Gdk.Cursor(Gdk.CursorType.WATCH)
421+
cursor = Gdk.Cursor.new(Gdk.CursorType.WATCH)
422422
else:
423-
cursor = Gdk.Cursor(Gdk.CursorType.LEFT_PTR)
423+
cursor = Gdk.Cursor.new(Gdk.CursorType.LEFT_PTR)
424424

425425
gdk_window = self.get_root_window()
426426
gdk_window.set_cursor(cursor)

0 commit comments

Comments
 (0)