@@ -644,7 +644,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
644
644
FigureManager_set_icon (PyObject* null, PyObject* args) {
645
645
PyObject* icon_path;
646
646
if (!PyArg_ParseTuple (args, " O&" , &PyUnicode_FSDecoder, &icon_path)) {
647
- return NULL ;
647
+ return NULL ;
648
648
}
649
649
const char * icon_path_ptr = PyUnicode_AsUTF8 (icon_path);
650
650
if (!icon_path_ptr) {
@@ -653,7 +653,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
653
653
}
654
654
@autoreleasepool {
655
655
NSString * ns_icon_path = [NSString stringWithUTF8String: icon_path_ptr];
656
- Py_DECREF (icon_path);
656
+ Py_DECREF (icon_path);
657
657
if (!ns_icon_path) {
658
658
PyErr_SetString (PyExc_RuntimeError, " Could not convert to NSString*" );
659
659
return NULL ;
@@ -667,14 +667,14 @@ static CGFloat _get_device_scale(CGContextRef cr)
667
667
PyErr_SetString (PyExc_RuntimeError, " Image is not valid" );
668
668
return NULL ;
669
669
}
670
- @try {
671
- NSApplication * app = [NSApplication sharedApplication ];
672
- app.applicationIconImage = image;
673
- }
674
- @catch (NSException * exception ) {
675
- PyErr_SetString (PyExc_RuntimeError, exception .reason .UTF8String );
676
- return NULL ;
677
- }
670
+ @try {
671
+ NSApplication * app = [NSApplication sharedApplication ];
672
+ app.applicationIconImage = image;
673
+ }
674
+ @catch (NSException * exception ) {
675
+ PyErr_SetString (PyExc_RuntimeError, exception .reason .UTF8String );
676
+ return NULL ;
677
+ }
678
678
}
679
679
Py_RETURN_NONE;
680
680
}
@@ -740,10 +740,10 @@ static CGFloat _get_device_scale(CGContextRef cr)
740
740
{" destroy" ,
741
741
(PyCFunction)FigureManager_destroy,
742
742
METH_NOARGS},
743
- {" set_icon" ,
744
- (PyCFunction)FigureManager_set_icon,
745
- METH_STATIC | METH_VARARGS,
746
- " Set application icon" },
743
+ {" set_icon" ,
744
+ (PyCFunction)FigureManager_set_icon,
745
+ METH_STATIC | METH_VARARGS,
746
+ " Set application icon" },
747
747
{" set_window_title" ,
748
748
(PyCFunction)FigureManager_set_window_title,
749
749
METH_VARARGS},
0 commit comments