@@ -113,13 +113,22 @@ def __init__(self, **kwargs):
113
113
# self.resize(720, 288)
114
114
self ._set_ui_bars ()
115
115
116
- def init_window_content (self , gfile , get_cb ):
116
+ def init_window_content_async (self , content_params ):
117
117
"""Initialize the window's content, such as the minimap, the color
118
118
popovers, the tools, their options, and a new image. Depending on the
119
119
parameters, the new image can be imported from the clipboard, loaded
120
- from a GioFile, or (else) it can be a blank image."""
120
+ from a GioFile, or (else) it can be a blank image.
121
+
122
+ This method is called asynchronously, which isn't *correct* (not very
123
+ thread-safe or anything) but it allows the window to be shown quicker.
124
+ If it fails, a window is here anyway because this is independant from
125
+ the object constructor."""
126
+
121
127
self .prompt_action (_ ("Error starting the application, please report this bug." ))
122
128
129
+ gfile = content_params ['gfile' ]
130
+ get_cb = content_params ['get_cb' ]
131
+
123
132
self .tools = {}
124
133
self .minimap = DrMinimap (self , None )
125
134
self .options_manager = DrOptionsManager (self )
@@ -148,6 +157,9 @@ def init_window_content(self, gfile, get_cb):
148
157
self .set_picture_title ()
149
158
self ._try_show_release_notes ()
150
159
160
+ # has to return False to be removed from the mainloop immediatly
161
+ return False
162
+
151
163
def _try_show_release_notes (self ):
152
164
last_version = self .gsettings .get_string ('last-version' )
153
165
current_version = self .app .get_current_version ()
0 commit comments