@@ -113,13 +113,22 @@ def __init__(self, **kwargs):
113113 # self.resize(720, 288)
114114 self ._set_ui_bars ()
115115
116- def init_window_content (self , gfile , get_cb ):
116+ def init_window_content_async (self , content_params ):
117117 """Initialize the window's content, such as the minimap, the color
118118 popovers, the tools, their options, and a new image. Depending on the
119119 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+
121127 self .prompt_action (_ ("Error starting the application, please report this bug." ))
122128
129+ gfile = content_params ['gfile' ]
130+ get_cb = content_params ['get_cb' ]
131+
123132 self .tools = {}
124133 self .minimap = DrMinimap (self , None )
125134 self .options_manager = DrOptionsManager (self )
@@ -148,6 +157,9 @@ def init_window_content(self, gfile, get_cb):
148157 self .set_picture_title ()
149158 self ._try_show_release_notes ()
150159
160+ # has to return False to be removed from the mainloop immediatly
161+ return False
162+
151163 def _try_show_release_notes (self ):
152164 last_version = self .gsettings .get_string ('last-version' )
153165 current_version = self .app .get_current_version ()
0 commit comments